/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CSS VARIABLES ── */
:root {
  --navy:        #0C2340;
  --navy-mid:    #163659;
  --blue:        #1a6fba;
  --blue-bright: #2684d4;
  --blue-pale:   #e8f2fb;
  --blue-muted:  #b8d4ef;
  --gold:        #e8a000;
  --gold-light:  #fdf3dc;
  --white:       #ffffff;
  --off-white:   #f5f7fa;
  --gray-100:    #eaecf0;
  --gray-200:    #d1d5db;
  --gray-400:    #5c6b7d;
  --gray-600:    #4b5563;
  --gray-800:    #1f2937;
  --route-color: #4a5568;
  --font: 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 4px rgba(12,35,64,0.07), 0 3px 14px rgba(12,35,64,0.06);
}

/* ── BASE ── */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font); background: var(--off-white); color: var(--gray-800); font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #c8cdd4; }
::-webkit-scrollbar-thumb { background: #5a6a7e; border-radius: 5px; border: 2px solid #c8cdd4; }
::-webkit-scrollbar-thumb:hover { background: #3d4f63; }
a { color: inherit; text-decoration: none; }

/* ── NAV ── */
nav { background: var(--navy); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 28px; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo img { height: 42px; display: block; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a { color: rgba(255,255,255,0.72); font-size: 16px; padding: 8px 15px; border-radius: 6px; white-space: nowrap; transition: color .12s, background .12s; }
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav-cta { background: var(--blue) !important; color: #fff !important; padding: 9px 20px !important; font-weight: 500 !important; }
.nav-cta:hover { background: #2272be !important; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-direction: column; align-items: center; gap: 5px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: rgba(255,255,255,0.8); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--navy); z-index: 101; overflow-y: auto; padding: 0; flex-direction: column; }
.nav-mobile.open { display: flex; }
.nav-mob-header { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px 0 28px; border-bottom: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.nav-mob-header img { height: 42px; display: block; }
.nav-mob-close { background: none; border: none; cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.8); }
.nav-mob-close svg { width: 26px; height: 26px; display: block; }
.nav-mob-links { padding: 8px 0; overflow-y: auto; flex: 1; }
.nav-mobile a { display: block; color: rgba(255,255,255,0.72); font-size: 17px; padding: 15px 28px; border-bottom: 1px solid rgba(255,255,255,0.06); transition: color .12s, background .12s; }
.nav-mobile a:hover, .nav-mobile a.active { color: #fff; background: rgba(255,255,255,0.07); }
.nav-mobile .mob-cta { background: var(--blue) !important; color: #fff !important; margin: 14px 28px 0; border-radius: 8px; border: none !important; text-align: center; }

/* ── ALERT BAR ── */
.alert-bar { background: #fff3cd; border-bottom: 2px solid #e8a000; padding: 14px 28px; }
.alert-bar-inner { max-width: 1160px; margin: 0 auto; display: flex; gap: 14px; align-items: flex-start; }
.alert-bar-inner svg { width: 22px; height: 22px; min-width: 22px; margin-top: 2px; color: #92620a; }
.alert-bar-inner p { font-size: 16px; font-weight: 500; color: #5c3a00; line-height: 1.6; }
.alert-bar-inner a { color: #92620a; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ── PAGE HEADER ── */
.page-header { background: var(--route-color); padding: 40px 28px 36px; }
.page-header-inner { max-width: 1160px; margin: 0 auto; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,0.38); margin-bottom: 12px; }
.breadcrumb a { color: rgba(255,255,255,0.5); transition: color .12s; }
.breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.breadcrumb span { margin: 0 7px; }
.page-header-title { display: flex; align-items: center; gap: 16px; }
.route-badge-lg { font-size: 22px; font-weight: 700; color: #fff; background: rgba(255,255,255,0.15); border-radius: 8px; padding: 6px 14px; letter-spacing: 0.04em; flex-shrink: 0; }
.page-header h1 { font-size: 36px; font-weight: 700; color: #fff; letter-spacing: -0.02em; line-height: 1.1; }
.page-header p { font-size: 16px; color: rgba(255,255,255,0.52); margin-top: 10px; }

/* ── LAYOUT ── */
.main { max-width: 1160px; margin: 0 auto; padding: 48px 28px 96px; display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.main-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ── CARD ── */
.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.card-head { padding: 22px 24px 0; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.card-head-icon { width: 40px; height: 40px; border-radius: 9px; background: var(--blue-pale); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card-head-icon svg { width: 20px; height: 20px; color: var(--blue); }
.card-head h2 { font-size: 19px; font-weight: 600; color: var(--navy); letter-spacing: -0.01em; }
.card-body { padding: 0 24px 24px; }

/* ── FOOTER ── */
footer { background: var(--navy); padding: 44px 28px 32px; color: rgba(255,255,255,0.45); }
.footer-inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 200px 1fr auto; gap: 40px; align-items: start; margin-bottom: 28px; }
.footer-logo img { height: 32px; opacity: 0.8; margin-bottom: 10px; display: block; }
.footer-logo p { font-size: 14px; line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 32px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.45); transition: color .12s; }
.footer-links a:hover { color: rgba(255,255,255,0.82); }
.footer-social { display: flex; gap: 9px; }
.soc-link, .footer-soc-link { width: 38px; height: 38px; border-radius: 8px; background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; transition: background .12s; }
.soc-link:hover, .footer-soc-link:hover { background: rgba(255,255,255,0.13); }
.soc-link img, .footer-soc-link img { width: 18px; height: 18px; filter: brightness(0) invert(0.6); }
.footer-bottom { max-width: 1160px; margin: 0 auto; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.28); flex-wrap: wrap; gap: 6px; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .page-header h1 { font-size: 26px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}

/* ── WCAG 2.2 AA ── */
.skip-link { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; width: auto; height: auto; overflow: visible; padding: 12px 20px; background: #0C2340; color: #fff; font-size: 16px; font-weight: 600; border-radius: 8px; z-index: 9999; text-decoration: none; outline: 3px solid #2684d4; outline-offset: 2px; }
*:focus-visible { outline: 3px solid #2684d4; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
footer { color: rgba(255,255,255,0.80) !important; }
.footer-links a { color: rgba(255,255,255,0.80) !important; }
.footer-links a:hover { color: rgba(255,255,255,1) !important; }
.footer-bottom { color: rgba(255,255,255,0.68) !important; }
.footer-logo p { color: rgba(255,255,255,0.80) !important; }
.breadcrumb { color: rgba(255,255,255,0.68) !important; }
.breadcrumb a { color: rgba(255,255,255,0.80) !important; }
.route-chip-desc { color: rgba(255,255,255,0.80) !important; }
.routes-panel-foot a { color: #7cc5f5 !important; }
a[href*="gobroomecounty.com/transit"],
a[href*="ridebctransit.com"],
a[href*="broomecountyny.gov/transit"] { text-decoration: underline; }
