
/* ===== Base resets & mobile full width ===== */
html, body { width:100%; overflow-x:hidden; }
img{ max-width:100%; height:auto; display:block; }

/* Container full width on mobile */
@media (max-width: 768px){
  .container{ width:100%; max-width:100%; padding:0 16px; }
}

/* ===== Ribbon ===== */
.rc-ribbon{
  position: sticky;
  top: 0;
  z-index: 960;

  width:100%; background:#0f766e; color:#fff; text-align:center; padding:10px 12px; font-weight:600;
}
.rc-ribbon a{ color:#fff; text-decoration:underline; }

/* ===== Calculator ===== */
.rc-calc { margin-top: 10px; }
.rc-calc-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; }
@media (max-width: 900px){ .rc-calc-grid { grid-template-columns: 1fr; } }

.rc-calc-group { display:flex; flex-direction:column; gap:6px; }
.rc-calc-group span { font-weight:600; }
.rc-calc-group input {
  height:44px; border:1px solid #e5e7eb; border-radius:10px; padding:0 12px;
  outline:none; transition:border .2s ease, box-shadow .2s ease;
  background:#fff; font-size:16px;
}
.rc-calc-group input:focus { border-color:#0f766e; box-shadow:0 0 0 6px rgba(15,118,110,.15); }

.rc-calc-actions { display:flex; gap:12px; margin-top:14px; flex-wrap:wrap; }
.rc-calc-result {
  display:none; margin-top:16px; background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:16px;
}
.rc-calc-result.show { display:block; }

.rc-calc-cards { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width: 800px){ .rc-calc-cards { grid-template-columns:1fr; } }

.rc-calc-card { border:1px solid #e5e7eb; border-radius:10px; padding:12px; }
.rc-calc-card h4 { margin:0 0 6px 0; }
.rc-calc-savings { font-size:20px; font-weight:800; margin:10px 0 0; }
.rc-calc-badge { display:inline-block; padding:6px 10px; border-radius:999px; background:#ecfdf5; color:#065f46; font-weight:700; font-size:13px; }
.rc-calc-badge--neg { background:#fee2e2; color:#b91c1c; } /* red badge */
.rc-calc-note { font-size:13px; color:#6b7280; margin-top:6px; }
.rc-calc-hint { margin-top:10px; color:#6b7280; font-size:14px; }

/* ===== FAB (desktop/tablet only) ===== */
.rc-fab{
  position:fixed; right:16px; bottom:18px; z-index:9999;
  background:#0f766e; color:#fff; font-weight:800; text-decoration:none;
  padding:12px 16px; border-radius:999px; box-shadow:0 10px 25px rgba(2,6,23,.2);
  transition: transform .06s ease, background .2s ease;
}
.rc-fab:hover{ background:#0d5f59; transform: translateY(-1px); }
@media (max-width:768px){ .rc-fab{ display:none; } }

/* ===== Sticky mobile bar ===== */
.rc-stickybar{
  display:none;
}
@media (max-width:768px){
  .rc-stickybar{
    display:block; position:fixed; left:0; right:0; bottom:0; z-index:1000;
    background:#ffffff; border-top:1px solid #e5e7eb; padding:10px 12px; text-align:center;
  }
  .rc-stickybtn{
    display:inline-block; background:#0f766e; color:#fff; text-decoration:none; font-weight:700;
    padding:12px 18px; border-radius:999px;
  }
}

/* ===== Mobile Typography & Header spacing ===== */
@media (max-width: 768px){
  .header { padding: 8px 0; }
  .logo-link .logo-text { font-size: 18px; }
  .nav ul { gap: 10px; }
  .nav a { font-size: 14px; padding: 6px 4px; line-height: 1.2; }

  .hero { padding: 32px 0 20px; }
  .hero .hero-title { font-size: clamp(24px, 7vw, 32px); line-height: 1.15; margin-bottom: 6px; }
  .hero .hero-subtitle { font-size: clamp(16px, 4.8vw, 20px); line-height: 1.25; margin-bottom: 10px; }
  .hero .hero-text { font-size: 15px; line-height: 1.5; }
  .hero .btn { padding: 10px 14px; font-size: 15px; }
}

/* ===== Mobile Nav (<=768px: hamburger) ===== */
@media (max-width:768px){
  .nav ul { display:none; }             /* hide desktop menu */
  .nav-toggle { display:inline-flex; align-items:center; justify-content:center; }
}
@media (min-width:769px){
  .nav-toggle { display:none; }
}

header.header { position: sticky; top: var(--ribbon-h, 0); z-index: 950; background:#fff; }

/* Dropdown fixed to viewport with safe-areas */
.mobile-menu {
  position: fixed;
  top: calc(56px + env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  right: max(8px, env(safe-area-inset-right));
  width: auto;
  max-width: 100vw;
  max-height: 70vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(2,6,23,.25);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform .15s ease, opacity .15s ease;
  z-index: 1001;
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu ul { list-style: none; margin: 6px 0; padding: 8px 10px; }
.mobile-menu li { margin: 0; }
.mobile-menu a {
  display: block;
  padding: 12px 10px;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  color: #111;
  border-radius: 8px;
}
.mobile-menu a:active,
.mobile-menu a:hover { background: #f3f4f6; }

/* Body lock when menu open */
.body-lock { overflow: hidden; touch-action: none; }



/* === Prominent hamburger button (brand-matched) === */
.nav-toggle{
  appearance:none; border:1px solid #e5e7eb; background:#ffffff;
  width:44px; height:44px; border-radius:12px;
  display:inline-flex; align-items:center; justify-content:center;
  box-shadow: 0 6px 16px rgba(2,6,23,0.10);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  color:#0f766e; /* brand tint for icon */
}
.nav-toggle:hover{ transform: translateY(-1px); box-shadow: 0 10px 24px rgba(2,6,23,0.14); border-color:#d1d5db; }
.nav-toggle:active{ transform: translateY(0); }

/* Custom hamburger lines */
.nav-toggle-box { position: relative; width:20px; height:14px; display:block; }
.nav-toggle-bar,
.nav-toggle-box::before,
.nav-toggle-box::after{
  content:""; position:absolute; left:0; right:0; height:2px; background: currentColor; border-radius:2px;
  transition: transform .2s ease, opacity .2s ease, top .2s ease, bottom .2s ease;
}
.nav-toggle-bar{ top:6px; }
.nav-toggle-box::before{ top:0; }
.nav-toggle-box::after{ bottom:0; }

/* Animate to "X" when open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bar{ opacity:0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::before{ top:6px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-box::after{ bottom:6px; transform: rotate(-45deg); }

/* On dark ribbon overlap, ensure z-index */
.header { z-index: 950; }

/* Slightly larger touch target on small phones */
@media (max-width:380px){
  .nav-toggle{ width:48px; height:48px; }
}



/* ===== Conditional burger only when needed ===== */
.nav-toggle{ display:none; }
.use-burger .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }
.use-burger .nav ul{ display:none !important; }



/* ===== Mobile menu header & polish ===== */
.mobile-menu__header{
  position: sticky; top: 0; background:#fff; border-bottom:1px solid #e5e7eb;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; z-index:2;
}
.mobile-menu__close{
  appearance:none; border:1px solid #e5e7eb; background:#fff; border-radius:10px; padding:8px 10px; font-size:16px;
}
.mobile-menu{ backdrop-filter: saturate(180%) blur(4px); }
.mobile-menu ul{ margin:6px 0 10px; padding:8px 10px 16px; }
.mobile-menu a{ border:1px solid transparent; }
.mobile-menu a:focus{ outline:none; border-color:#d1d5db; background:#f9fafb; }

.header.is-scrolled{ box-shadow:0 8px 20px rgba(2,6,23,.08); }


/* Fixed fallback (if sticky misbehaves) */
.header-spacer{ display:none; height:var(--header-h,64px); }
body.force-fixed header.header{ position: fixed; top: var(--ribbon-h, 0); left:0; right:0; }
body.force-fixed .header-spacer{ display:block; }
