/* =========================================================
   Medicare.co — Main Stylesheet
   ========================================================= */

/* --- Variables --- */
:root {
  --blue:        #005A9C;
  --blue-dark:   #1B4F8A;
  --blue-light:  #E8F0FA;
  --orange:      #D05A00;
  --orange-hover:#B54D00;
  --text:        #1A1A1A;
  --text-mid:    #444;
  --text-light:  #666;
  --border:      #D0D9E8;
  --bg-light:    #F4F7FB;
  --white:       #FFFFFF;
  --green:       #1A6E35;
  --red:         #C0392B;
  --nav-h:       56px;
  --max-w:       1120px;
  --radius:      6px;
  --shadow:      0 2px 8px rgba(0,0,0,0.10);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
       color: var(--text); background: var(--white); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 2px; }
ul, ol { padding-left: 1.4rem; }
h1,h2,h3,h4,h5 { line-height: 1.25; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p  { margin-bottom: 0.85rem; }
p:last-child { margin-bottom: 0; }

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute; top: -100px; left: 0; background: var(--blue-dark);
  color: #fff; padding: 8px 16px; z-index: 9999; border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* --- Layout --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: 36px 0; }
.section-sm { padding: 24px 0; }
.section-lg { padding: 52px 0; }
.bg-light { background: var(--bg-light); }
.bg-blue-dark { background: var(--blue-dark); }
.text-center { text-align: center; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.four-col { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.sidebar-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }

/* --- Navigation --- */
#site-header {
  background: var(--blue-dark); position: sticky; top: 0; z-index: 500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h); gap: 8px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.nav-logo-text { font-size: 1.35rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.nav-logo-text span { color: #7BBFFF; }

.nav-menu { display: flex; align-items: center; list-style: none; padding: 0; margin: 0; gap: 4px; }
.nav-menu > li { position: relative; }
.nav-menu > li > a, .nav-menu > li > button {
  color: #DCE9FF; font-size: 0.88rem; font-weight: 500; padding: 6px 10px;
  border-radius: var(--radius); background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.nav-menu > li > a:hover, .nav-menu > li > button:hover { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; }
.nav-caret { font-size: 0.65rem; opacity: 0.7; }

.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 220px; z-index: 600; padding: 6px 0;
  list-style: none; margin-top: 4px;
}
/* Invisible bridge fills the gap so cursor can reach the dropdown without hover breaking */
.nav-dropdown::before {
  content: ''; position: absolute; top: -8px; left: 0; right: 0; height: 8px;
}
.nav-menu > li:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: 8px 16px; color: var(--text); font-size: 0.875rem;
  border-left: 3px solid transparent;
}
.nav-dropdown a:hover { background: var(--bg-light); color: var(--blue); border-left-color: var(--blue); text-decoration: none; }

.nav-cta {
  background: var(--orange) !important; color: #fff !important;
  border-radius: 20px !important; padding: 7px 16px !important; font-weight: 600 !important;
}
.nav-cta:hover { background: var(--orange-hover) !important; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, #1B4F8A 0%, #005A9C 60%, #0074CC 100%);
  color: #fff; padding: 32px 0 28px;
}
.hero h1 { color: #fff; margin-bottom: 10px; }
.hero-sub { font-size: 1.1rem; color: #C5DEFF; margin-bottom: 18px; max-width: 580px; }
.hero-form { display: flex; gap: 8px; max-width: 480px; margin-bottom: 14px; flex-wrap: wrap; }
.hero-form input {
  flex: 1; min-width: 160px; padding: 10px 14px; border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.12); color: #fff; border-radius: var(--radius); font-size: 1rem;
}
.hero-form input::placeholder { color: rgba(255,255,255,0.6); }
.hero-form input:focus { outline: none; border-color: #fff; }
.hero-trust { display: flex; gap: 20px; flex-wrap: wrap; }
.hero-trust span { font-size: 0.82rem; color: #A8CEFD; display: flex; align-items: center; gap: 5px; }
.hero-trust span::before { content: "✓"; color: #5EFFB4; font-weight: 700; }
.hero-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.hero-popular { margin-top: 20px; }
.hero-popular-label { font-size: 0.78rem; color: #7BBFFF; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.hero-popular-links { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-popular-links a { font-size: 0.82rem; color: #C5DEFF; background: rgba(255,255,255,0.09); border: 1px solid rgba(255,255,255,0.18); border-radius: 20px; padding: 4px 12px; text-decoration: none; transition: background 0.15s, color 0.15s; white-space: nowrap; }
.hero-popular-links a:hover { background: rgba(255,255,255,0.18); color: #fff; }
.hero-right { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
              border-radius: 10px; padding: 20px; }
.hero-right h3 { color: #fff; margin-bottom: 12px; font-size: 1rem; }
.hero-checklist { list-style: none; padding: 0; }
.hero-checklist li { color: #C5DEFF; font-size: 0.88rem; padding: 4px 0; display: flex; gap: 8px; }
.hero-checklist li::before { content: "→"; color: #5EFFB4; flex-shrink: 0; }

/* --- Buttons --- */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem; cursor: pointer; border: 2px solid transparent;
  transition: background 0.15s, color 0.15s; text-decoration: none !important;
}
.btn-primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.btn-secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: var(--blue-light); }
.btn-white { background: #fff; color: var(--blue-dark); border-color: #fff; }
.btn-white:hover { background: var(--bg-light); }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }

/* --- Cards --- */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; padding: 20px; box-shadow: var(--shadow);
}
.card-grid { display: grid; gap: 20px; }
.card-grid-2 { grid-template-columns: repeat(2,1fr); }
.card-grid-3 { grid-template-columns: repeat(3,1fr); }
.card-grid-4 { grid-template-columns: repeat(4,1fr); }
.card h3 { color: var(--blue-dark); margin-bottom: 8px; }
.card-link-arrow::after { content: " →"; }

.plan-card { border-top: 4px solid var(--blue); }
.plan-card.part-a { border-top-color: #1A6E35; }
.plan-card.part-b { border-top-color: #005A9C; }
.plan-card.part-c { border-top-color: #7B2D8B; }
.plan-card.part-d { border-top-color: #C05A00; }
.plan-card.medigap { border-top-color: #1A5A8A; }

/* --- Quick Nav --- */
.quick-nav { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.quick-nav-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 18px 12px; background: var(--white); border: 1px solid var(--border);
  border-radius: 8px; box-shadow: var(--shadow); text-decoration: none !important;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quick-nav-item:hover { border-color: var(--blue); box-shadow: 0 4px 12px rgba(0,90,156,0.15); }
.quick-nav-item .qni-icon { font-size: 1.6rem; margin-bottom: 8px; }
.quick-nav-item .qni-label { font-size: 0.9rem; font-weight: 600; color: var(--blue-dark); }
.quick-nav-item .qni-sub { font-size: 0.78rem; color: var(--text-light); margin-top: 3px; }

/* --- Section Headers --- */
.section-header { margin-bottom: 24px; }
.section-header h2 { margin-bottom: 6px; }
.section-header p { color: var(--text-mid); font-size: 1rem; max-width: 700px; }
.section-tag { font-size: 0.78rem; font-weight: 700; color: var(--orange); letter-spacing: 0.08em;
               text-transform: uppercase; margin-bottom: 6px; display: block; }

/* --- Tables --- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th { background: var(--blue-dark); color: #fff; text-align: left; padding: 10px 12px; font-size: 0.85rem; }
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.data-table tr:nth-child(even) td { background: var(--bg-light); }
.data-table tr:hover td { background: var(--blue-light); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

/* --- Accordion --- */
.accordion { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }
.accordion-btn {
  width: 100%; text-align: left; padding: 14px 18px; background: var(--white);
  border: none; cursor: pointer; font-size: 0.95rem; font-weight: 600;
  color: var(--text); display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.accordion-btn:hover { background: var(--bg-light); }
.accordion-btn[aria-expanded="true"] { background: var(--blue-light); color: var(--blue-dark); }
.accordion-chevron { font-size: 0.8rem; flex-shrink: 0; transition: transform 0.2s; }
.accordion-btn[aria-expanded="true"] .accordion-chevron { transform: rotate(180deg); }
.accordion-body { display: none; padding: 14px 18px 16px; background: var(--bg-light); font-size: 0.92rem; color: var(--text-mid); }
.accordion-body.open { display: block; }

/* --- Notices --- */
.notice {
  border-left: 4px solid var(--blue); background: var(--blue-light);
  padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0; font-size: 0.92rem;
}
.notice.notice-warning { border-left-color: #C05A00; background: #FFF4EB; }
.notice.notice-success { border-left-color: var(--green); background: #EBF7EF; }
.notice.notice-disclaimer { border-left-color: #888; background: #F5F5F5; color: var(--text-mid); font-size: 0.86rem; }
.notice strong { display: block; margin-bottom: 4px; }

/* --- Breadcrumbs --- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; list-style: none;
              padding: 10px 0; font-size: 0.82rem; color: var(--text-light); }
.breadcrumb li + li::before { content: "›"; margin: 0 7px; color: var(--text-light); }
.breadcrumb a { color: var(--blue); }
.breadcrumb a:hover { color: var(--blue-dark); text-decoration: underline; }
/* Dark hero breadcrumbs */
.page-hero .breadcrumb { color: rgba(255,255,255,0.75); }
.page-hero .breadcrumb a { color: rgba(255,255,255,0.9); }
.page-hero .breadcrumb a:hover { color: #fff; }

/* --- Stats --- */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat-box { text-align: center; padding: 18px 12px; background: var(--white);
            border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.stat-number { font-size: clamp(1.5rem,3vw,2rem); font-weight: 800; color: var(--blue); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-mid); margin-top: 5px; }

/* --- Comparison Table --- */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th { padding: 12px 16px; text-align: center; font-size: 0.9rem; }
.compare-table th:first-child { text-align: left; }
.compare-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: top; }
.compare-table td:not(:first-child) { text-align: center; }
.compare-table tr:nth-child(even) td { background: var(--bg-light); }
.compare-table .col-head { background: var(--blue-dark); color: #fff; }
.compare-table .col-highlight { background: #E8F0FA; }
.check { color: var(--green); font-weight: 700; }
.cross { color: var(--red); }

/* --- Countdown --- */
.countdown-bar { background: #1A3A6A; color: #fff; padding: 10px 0; }
.countdown-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.countdown-label { font-size: 0.88rem; font-weight: 600; color: #9CC8FF; }
.countdown-digits { display: flex; gap: 8px; }
.cd-box { background: rgba(255,255,255,0.1); border-radius: 4px; padding: 4px 10px; text-align: center; }
.cd-num { font-size: 1.2rem; font-weight: 800; display: block; line-height: 1.2; }
.cd-unit { font-size: 0.62rem; color: #9CC8FF; display: block; }

/* --- Glossary --- */
.glossary-alpha { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.glossary-alpha a { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
                   background: var(--bg-light); border: 1px solid var(--border); border-radius: 4px;
                   font-size: 0.85rem; font-weight: 600; color: var(--blue); }
.glossary-alpha a:hover { background: var(--blue); color: #fff; text-decoration: none; }
.glossary-section { margin-bottom: 28px; }
.glossary-letter { font-size: 1.5rem; font-weight: 800; color: var(--blue-dark); border-bottom: 2px solid var(--border);
                   padding-bottom: 6px; margin-bottom: 14px; }
.glossary-term { margin-bottom: 14px; padding-left: 12px; border-left: 3px solid var(--border); }
.glossary-term dt { font-weight: 700; color: var(--text); }
.glossary-term dd { color: var(--text-mid); font-size: 0.92rem; }

/* --- Sidebar --- */
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.sidebar-widget { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 18px; }
.sidebar-widget h4 { color: var(--blue-dark); margin-bottom: 12px; font-size: 0.95rem;
                     border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.sidebar-links { list-style: none; padding: 0; }
.sidebar-links li { padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a { color: var(--blue); }

/* --- Footer --- */
footer { background: #0D2240; color: #B0BFCF; padding: 36px 0 0; margin-top: 48px; font-size: 0.88rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-brand h2 { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.footer-brand p { font-size: 0.83rem; color: #8A9BB0; }
.footer-col h4 { color: #fff; margin-bottom: 12px; font-size: 0.9rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { padding: 4px 0; }
.footer-links a { color: #8A9BB0; font-size: 0.85rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0;
  font-size: 0.78rem; color: #6A7A8A;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap;
}
.footer-disclaimer { max-width: 720px; line-height: 1.5; }
.footer-legal { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-legal a { color: #8A9BB0; }

/* --- Cookie Consent --- */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  background: #0D2240; color: #D0DBE8; padding: 14px 0;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.3); display: none;
}
.cookie-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cookie-text { flex: 1; font-size: 0.82rem; min-width: 240px; }
.cookie-text a { color: #7BBFFF; }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-accept { background: var(--orange); color: #fff; border: none; border-radius: 4px;
                 padding: 8px 18px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.cookie-accept:hover { background: var(--orange-hover); }
.cookie-decline { background: transparent; color: #8A9BB0; border: 1px solid #3A4D5C;
                  border-radius: 4px; padding: 8px 14px; font-size: 0.85rem; cursor: pointer; }

/* --- Page Hero (inner pages) --- */
.page-hero { background: var(--blue-dark); color: #fff; padding: 26px 0 22px; }
.page-hero h1 { color: #fff; }
.page-hero .page-hero-sub { color: #9CC8FF; font-size: 0.95rem; margin-top: 6px; max-width: 680px; }

/* --- Tag badges --- */
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.72rem;
       font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.tag-a { background: #DFF0E4; color: #1A6E35; }
.tag-b { background: #E0EEFF; color: #005A9C; }
.tag-c { background: #F0E0FF; color: #7B2D8B; }
.tag-d { background: #FFE8D0; color: #C05A00; }
.tag-gap { background: #E0F0FF; color: #1A5A8A; }

/* --- Helpers --- */
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-mid { color: var(--text-mid); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.bold { font-weight: 700; }
.mt-1 { margin-top: 8px; } .mb-1 { margin-bottom: 8px; }
.mt-2 { margin-top: 16px; } .mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; } .mb-3 { margin-bottom: 24px; }
.mt-4 { margin-top: 36px; }

/* ======================== RESPONSIVE ======================== */
@media (max-width: 960px) {
  .card-grid-4, .quick-nav, .stat-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-widget { flex: 1 1 260px; }
}
@media (max-width: 768px) {
  .nav-menu { display: none; flex-direction: column; position: absolute; top: var(--nav-h);
              left: 0; right: 0; background: #0D2A56; padding: 12px 0; gap: 0; z-index: 400; }
  .nav-menu.open { display: flex; }
  .nav-menu > li { width: 100%; }
  .nav-menu > li > a, .nav-menu > li > button { padding: 10px 20px; border-radius: 0; width: 100%; justify-content: flex-start; }
  .nav-dropdown { position: static; border: none; box-shadow: none; background: #0A2040; padding-left: 16px; display: block; }
  .nav-toggle { display: block; }
  .three-col, .card-grid-3, .two-col { grid-template-columns: 1fr; }
  .quick-nav { grid-template-columns: repeat(2,1fr); }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-form { flex-direction: column; }
  .hero-form input, .hero-form .btn { width: 100%; }
  .footer-bottom { flex-direction: column; }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .quick-nav, .stat-grid { grid-template-columns: 1fr 1fr; }
  .card-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media print {
  #site-header, #cookie-banner, .countdown-bar, .sidebar, footer { display: none; }
  .container { max-width: 100%; }
}
