/* Nittany Valley HHH — mobile-first */
:root {
  --bg: #faf7f0;
  --surface: #ffffff;
  --ink: #2b2b2b;
  --muted: #6b6b6b;
  --accent: #b03a2e;   /* hash red */
  --accent-dark: #8f2c22;
  --line: #e5ded0;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
.site-header {
  background: linear-gradient(180deg, #0779bf 0%, #48a9e4 100%);
  color: #fff; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; }
.brand-logo { width: 44px; height: 44px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.brand-slogan { font-size: .78rem; color: #eaf4fb; font-style: italic; }
.brand:hover, .brand:hover .brand-name { color: #ffe08a; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.4); border-radius: 8px; cursor: pointer; flex-shrink: 0;
}
.nav-toggle-bar { display: block; height: 2px; width: 100%; background: #fff; border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: none; background: #0779bf; border-top: 1px solid rgba(255,255,255,.2); }
.site-nav.open { display: block; }
.nav-inner { display: flex; flex-direction: column; padding-top: 4px; padding-bottom: 8px; }
.nav-inner a {
  padding: 12px 4px; text-decoration: none; color: #fff; font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.2);
}
.nav-inner a:last-child { border-bottom: none; }
.nav-inner a.active { color: #ffe08a; }
.nav-inner a:hover { color: #ffe08a; }

/* ---------- main ---------- */
main { padding-top: 20px; padding-bottom: 40px; }

main h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 16px; }
main h2 { font-size: 1.3rem; margin: 28px 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
main h3 { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 24px 0 8px; }
main p { margin: 0 0 14px; }
main ul, main ol { margin: 0 0 14px; padding-left: 22px; }
main li { margin-bottom: 6px; }
main blockquote {
  margin: 0 0 14px; padding: 10px 16px; border-left: 4px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--muted);
}
main code { background: #f0ece2; padding: 2px 5px; border-radius: 4px; font-size: .9em; }
main hr { border: none; border-top: 1px solid var(--line); margin: 24px 0; }

.table-wrap { overflow-x: auto; margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
th { background: #f3eee2; font-weight: 600; }
td img { max-height: 28px; vertical-align: middle; }

/* cards / callouts */
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 16px; margin: 0 0 16px; box-shadow: var(--shadow);
}
.callout h2 { border: none; margin-top: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 20px 0; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }

/* ---------- calendar ---------- */
.calendar-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.calendar-toolbar .btn { text-decoration: none; }
.btn {
  display: inline-block; background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 8px; font-weight: 600; border: none; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
.btn.secondary:hover { background: #f6ecea; }

#calendar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
#loading { display: none; text-align: center; padding: 20px; color: var(--muted); }

/* mobile "next 10 trails" list */
.trail-list { list-style: none; margin: 0; padding: 0; }
.trail-list li { padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.trail-list li:last-child { border-bottom: none; }
.trail-list li:active { background: #f3eee2; }
.trail-when { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.trail-title { font-weight: 600; margin-top: 2px; }
.trail-loc { display: block; font-size: .9rem; color: var(--muted); margin-top: 2px; }
.muted { color: var(--muted); }

/* FullCalendar mobile tweaks */
.fc .fc-toolbar-title { font-size: 1.1rem !important; }
.fc .fc-button { font-size: .85rem !important; padding: 4px 8px !important; }
.fc .fc-col-header-cell { font-size: .8rem; }
.fc .fc-daygrid-day-number { font-size: .85rem; }
.fc .fc-list-event-title { font-size: .9rem; }

/* event modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); display: none;
  align-items: flex-end; justify-content: center; z-index: 200;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--surface); width: 100%; max-width: 560px; border-radius: 14px 14px 0 0;
  padding: 20px; max-height: 80vh; overflow-y: auto;
}
.modal h3 { margin-top: 0; }
.modal .modal-close { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.modal dl { margin: 0; }
.modal dt { font-weight: 600; margin-top: 10px; }
.modal dd { margin: 2px 0 0; white-space: pre-wrap; }

/* ---------- responsive: tablet+ ---------- */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; border-top: none; }
  .nav-inner { flex-direction: row; flex-wrap: wrap; gap: 4px; padding: 0; }
  .nav-inner a { border: none; padding: 10px 14px; border-radius: 8px; }
  .nav-inner a.active { background: rgba(255,255,255,.18); }
  main h1 { font-size: 2rem; }
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 14px; }
}

@media (min-width: 1024px) {
  .brand-logo { width: 52px; height: 52px; }
  .brand-name { font-size: 1.15rem; }
}
