/* ====================================================
   ELF Design System 2.0 — Responsive Styles
   Breakpoints: 1200 | 900 | 600
   ==================================================== */

/* ══════════════════════════════════════════════════
   PILL-NAV HAMBURGER BUTTON
   ══════════════════════════════════════════════════ */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 7px;
  margin-left: auto;
  flex-shrink: 0;
  background: none;
  border: none;
}
.nav-menu-btn span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #364152;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ══════════════════════════════════════════════════
   PILL-NAV MOBILE DRAWER
   ══════════════════════════════════════════════════ */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
}
.nav-drawer.open { display: block; }

.nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 18, 28, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(280px, 82vw);
  height: 100%;
  background: #fff;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.14);
  overflow-y: auto;
}
.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.nav-drawer-logo {
  font-family: 'Instrument Serif', serif;
  font-size: 20px;
  color: #0d121c;
}
.nav-drawer-logo span { color: #006cb6; }

.nav-drawer-close {
  background: none;
  border: none;
  font-size: 22px;
  color: #9aa4b2;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
}
.nav-drawer-close:hover { color: #364152; }

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-drawer-links a {
  display: block;
  padding: 13px 16px;
  border-radius: 8px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #364152;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.nav-drawer-links a:hover { background: #deefff; color: #006cb6; }
.nav-drawer-links a.active { color: #006cb6; background: #deefff; }

/* ══════════════════════════════════════════════════
   SIDEBAR-PAGE HAMBURGER BUTTON (hdr)
   ══════════════════════════════════════════════════ */
.sb-toggle-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.sb-toggle-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #364152;
  border-radius: 2px;
}

/* ══════════════════════════════════════════════════
   SIDEBAR OVERLAY BACKDROP
   ══════════════════════════════════════════════════ */
.sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 18, 28, 0.38);
  z-index: 150;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sb-overlay.open { display: block; }


/* ══════════════════════════════════════════════════
   ≤ 1200px  — Fluid containers
   ══════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .inner {
    width: 100% !important;
    padding-left: 32px;
    padding-right: 32px;
  }
  .footer-inner {
    width: 100% !important;
    padding-left: 32px;
    padding-right: 32px;
  }
  .contribute-card { width: 100% !important; }
  .team-grid { width: 100% !important; padding: 0 32px; }
}


/* ══════════════════════════════════════════════════
   ≤ 900px  — Tablet & smaller
   ══════════════════════════════════════════════════ */
@media (max-width: 900px) {

  /* Remove hardcoded minimum width */
  body { min-width: 0 !important; }

  /* Restore body scroll (overrides sidebar-page overflow:hidden) */
  html { overflow: auto !important; height: auto !important; }
  body { height: auto !important; overflow: auto !important; }

  /* ── PILL NAVBAR ──────────────────────────────── */
  .navbar {
    width: calc(100% - 24px) !important;
    height: auto !important;
    padding: 12px 16px !important;
    top: 12px !important;
    gap: 0 !important;
  }
  .nav-brand-name { font-size: 22px !important; line-height: 28px !important; }
  .nav-links { display: none !important; }
  .nav-menu-btn { display: flex !important; }

  /* ── HOME HERO ────────────────────────────────── */
  .s-hero--main {
    height: 540px !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 16px 40px !important;
  }
  .s-hero--main .hero-content {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 560px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border-radius: 16px !important;
    border: 0.5px solid rgba(233, 234, 235, 0.7) !important;
    padding: 28px 24px !important;
    gap: 24px !important;
  }
  .hero-title { font-size: 36px !important; line-height: 46px !important; }
  .hero-desc  { font-size: 15px !important; }

  /* ── ABOUT / FEEDBACK BANNER HERO ──────────────── */
  .s-hero--banner { height: 320px !important; }

  /* ── WAVE SEPARATORS — hide (pixel-perfect positioning breaks) */
  .bg-wave { display: none !important; }

  /* ── BENEFITS SECTION ─────────────────────────── */
  .s-benefits { padding-top: 40px !important; padding-bottom: 60px !important; }
  .benefits-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
  .benefit-card  { height: auto !important; }
  .sec-heading   { font-size: 26px !important; line-height: 34px !important; margin-bottom: 20px !important; }

  /* ── COMPONENTS SECTION (home page) ───────────── */
  .s-components { padding-top: 40px !important; padding-bottom: 60px !important; }
  .comp-grid    { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
  .comp-card    { height: auto !important; }
  .comp-preview { flex: none !important; height: 180px !important; }
  .comp-info    { height: auto !important; }

  /* ── CONTRIBUTE SECTION ───────────────────────── */
  .s-contribute { padding-top: 40px !important; padding-bottom: 60px !important; }
  .contribute-card {
    height: auto !important;
    padding: 40px 24px !important;
  }
  .contribute-content {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
  }
  .contribute-sub { width: auto !important; }
  /* Hide decorative sticker / cursor images */
  .contribute-card > img { display: none !important; }

  /* ── TEAM SECTION (about) ─────────────────────── */
  .s-team { padding-top: 32px !important; padding-bottom: 60px !important; }
  .team-heading-block {
    width: 100% !important;
    padding: 0 24px !important;
    margin-bottom: 48px !important;
  }
  .team-title { font-size: 36px !important; line-height: 48px !important; }
  .team-grid  { grid-template-columns: 1fr !important; max-width: 560px !important; margin: 0 auto !important; }

  /* ── FEEDBACK SECTION ─────────────────────────── */
  .s-feedback { padding-top: 32px !important; padding-bottom: 60px !important; }
  .feedback-heading-block { width: 100% !important; max-width: 100% !important; padding: 0 24px !important; }
  .feedback-title { font-size: 40px !important; line-height: 52px !important; }
  .feedback-card  { width: calc(100% - 32px) !important; max-width: 600px !important; }

  /* ── FOOTER ───────────────────────────────────── */
  .site-footer { height: auto !important; padding-bottom: 32px !important; }
  .footer-inner {
    flex-direction: column !important;
    gap: 20px !important;
    padding-top: 28px !important;
  }
  .footer-nav   { flex-wrap: wrap !important; }
  .footer-nav a { padding: 10px 16px !important; font-size: 14px !important; }
  .footer-logo-name { font-size: 26px !important; line-height: 34px !important; }

  /* ══════════════════════════════════════════
     SIDEBAR LAYOUT (components + component detail pages)
     ══════════════════════════════════════════ */

  /* Page becomes scrollable column */
  .page  { overflow: visible !important; flex-direction: column !important; height: auto !important; }
  .main  { overflow: visible !important; height: auto !important; }
  .main-scroll {
    overflow: visible !important;
    height: auto !important;
    padding: 16px !important;
  }

  /* Sidebar → fixed slide-in panel */
  .sidebar {
    position: fixed !important;
    left: -280px !important;
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 252px !important;
    z-index: 200 !important;
    padding-top: calc(68px + 8px) !important;
    transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    background: var(--bg, #eef1f6) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  .sidebar.open {
    left: 0 !important;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.14) !important;
  }

  /* Sidebar card fills the panel */
  .sidebar-card, .sb-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    height: auto !important;
    min-height: 100% !important;
  }

  /* Header: show hamburger, hide search + user */
  .sb-toggle-btn { display: flex !important; }
  .hdr-search    { display: none !important; }
  .hdr-user      { display: none !important; }
  .hdr { padding: 0 16px !important; gap: 0 !important; }
  .logo-wrap { width: auto !important; }
  .hdr-nav { justify-content: flex-end !important; gap: 2px !important; }
  .nav-item { padding: 8px 10px !important; font-size: 13px !important; }

  /* Components overview grid */
  .components-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
}


/* ══════════════════════════════════════════════════
   ≤ 600px  — Mobile phones
   ══════════════════════════════════════════════════ */
@media (max-width: 600px) {

  /* Pill navbar */
  .navbar { width: calc(100% - 16px) !important; top: 8px !important; padding: 10px 14px !important; }
  .nav-brand-name { font-size: 18px !important; }

  /* Hero (home) */
  .s-hero--main { height: 460px !important; padding: 0 12px 32px !important; }
  .hero-title   { font-size: 28px !important; line-height: 38px !important; }
  .hero-btns    { flex-direction: column !important; align-items: stretch !important; }
  .hero-btns a  { justify-content: center !important; }
  .s-hero--banner { height: 260px !important; }

  /* Single-column grids */
  .benefits-grid    { grid-template-columns: 1fr !important; }
  .comp-grid        { grid-template-columns: 1fr !important; }
  .components-grid  { grid-template-columns: 1fr !important; }

  /* Typography scale-down */
  .sec-heading    { font-size: 22px !important; line-height: 30px !important; }
  .team-title     { font-size: 28px !important; line-height: 38px !important; }
  .feedback-title { font-size: 28px !important; line-height: 38px !important; }

  /* Inner containers tighter padding */
  .inner        { padding-left: 16px !important; padding-right: 16px !important; }
  .team-grid    { padding: 0 16px !important; }
  .footer-inner { padding-left: 16px !important; padding-right: 16px !important; }

  /* Feedback form */
  .feedback-card         { width: calc(100% - 16px) !important; padding: 24px 18px !important; }
  .feedback-heading-block { padding: 0 8px !important; }

  /* Contribute */
  .contribute-card    { padding: 32px 16px !important; }
  .contribute-content { gap: 24px !important; }

  /* Sidebar header: hide nav items on tiny screens */
  .hdr-nav { display: none !important; }

  /* Footer */
  .footer-nav a     { padding: 8px 12px !important; }
  .footer-logo-name { font-size: 22px !important; line-height: 30px !important; }
}
