/* =========================================================
   Navigrow Consulting - Corporate Minimalist Theme (clean)
   Order:
   1) Root + Resets
   2) Base Type & Containers
   3) Header / Nav / Dropdowns / Mobile Nav
   4) Hero
   5) Layout: grids, cards, badges, logos, testimonials, approach
   6) Buttons (global)
   7) Forms (case form, consent, chips, success)
   8) Cookie banner + modal
   9) Services layout
   10) Case Hub
   11) Request Deck modal
   12) Contact block
   13) Footer
   14) Utilities / Overflow guards
   15) Responsive tweaks
   ========================================================= */

/* ============ 1) Root + Resets ============ */
:root{
  --navy:#1B263B;
  --teal:#2EC4B6;
  --white:#FFFFFF;
  --light:#F8F9FA;
  --dark:#444444;
  --coral:#FF6B6B;

  --container:1140px;
  --radius:14px;
  --shadow:0 6px 24px rgba(0,0,0,0.06);
  --font:'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";

  /* Fixed header height (updated by JS) */
  --header-h:86px;
}

*{ box-sizing:border-box }
html,body{
  margin:0; padding:0;
  background:var(--white); color:var(--dark);
  font-family:var(--font); line-height:1.6;
  max-width:100%; overflow-x:hidden; /* guard against sideways scroll */
}
img{ max-width:100%; height:auto; display:block }
a{ color:var(--navy); text-decoration:none }
a:hover{ opacity:.9 }
.container{ max-width:var(--container); margin:0 auto; padding:0 20px }

/* Sections */
.section{ padding:72px 0 }
.section.alt{ background:#f2f4f7; border-top:1px solid #e5e7eb }
.section .eyebrow{ letter-spacing:.08em; text-transform:uppercase; color:#6b7280; font-size:.8rem; margin-bottom:8px }

/* ============ 2) Base Type ============ */
h1,h2,h3{ color:var(--navy); line-height:1.2; margin:0 0 16px 0 }
h1{ font-size:clamp(32px,4vw,48px) }
h2{ font-size:clamp(24px,3vw,36px) }
h3{ font-size:clamp(18px,2.25vw,24px) }
p{ margin:0 0 14px 0 }

/* ============ 3) Header / Nav / Dropdowns / Mobile Nav ============ */
body{ padding-top:var(--header-h) }

.header{
  position:fixed; top:0; left:0; right:0; z-index:1000;
  background:rgba(255,255,255,0.9);
  backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid #e5e7eb;
}
.header.is-scrolled{
  background:rgba(255,255,255,0.75);
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}
.header .bar{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; gap:12px }
.logo-wrap{ display:flex; align-items:center; gap:12px; text-decoration:none; min-width:0 }
.logo-wrap img{ width:36px; height:auto; filter:none }
.brand-text{ display:flex; flex-direction:column; gap:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.brand-name{ font-size:1.5rem; font-weight:700; color:var(--navy) }
.brand-sub{ font-size:.85rem; color:#555 }

/* Top-level nav */
.nav{ display:flex; gap:22px; align-items:center }
.nav > a,
.nav .nav-item > a{
  display:inline-flex; align-items:center;
  padding:10px 12px;
  color:#111827; border-radius:8px;
  transition:background-color .2s ease, color .2s ease;
}
.nav a:hover, .nav a:focus-visible{ background:rgba(0,0,0,0.05); outline:none }
.nav .cta{ margin-left:6px }

/* Dropdowns (desktop) */
.nav-item{ position:relative }
.dropdown{
  position:absolute; top:100%; left:0; z-index:40;
  min-width:280px; padding:10px;
  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  box-shadow:0 12px 24px rgba(0,0,0,.12);
  display:none;
}
.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown{ display:block }
.dropdown a{
  display:block; padding:10px 12px;
  color:#111827; border-radius:6px;
  transition:background-color .2s ease, box-shadow .2s ease;
}
.dropdown a:hover, .dropdown a:focus-visible{
  background:var(--teal); color:#fff;
  box-shadow:inset 0 0 0 1px var(--teal);
}

/* Mobile hamburger + menu (hidden by default) */
.nav-toggle{
  display:none; appearance:none; background:transparent;
  border:1px solid #e5e7eb; border-radius:10px;
  padding:8px 12px; font-size:1rem; line-height:1; cursor:pointer; margin-left:auto;
}

/* Mobile state */
@media (max-width:900px){
  .nav-toggle{ display:inline-block }

  /* Hide nav by default on mobile; show when header has .is-open (JS) */
  .nav{
    display:none; position:absolute; top:var(--header-h); left:0; right:0;
    background:#fff; border-bottom:1px solid #e5e7eb;
    box-shadow:var(--shadow); padding:10px 16px 14px;
    flex-direction:column; gap:6px; max-width:100vw;
  }
  .header.is-open .nav{ display:flex }

  .nav > a, .nav .nav-item > a{ display:block; padding:12px 10px; border-radius:8px; font-weight:700 }

  /* Submenu closed by default on mobile; opened by .nav-item.is-open (JS) */
  .nav .dropdown{
    position:static; display:none; border:0; box-shadow:none;
    padding:0 0 8px 12px; margin:0;
  }
  .nav-item.is-open > .dropdown{ display:block }
}

/* ============ 4) Hero ============ */
.hero{
  display:grid; grid-template-columns:1.2fr 0.8fr;
  gap:40px; align-items:center;
}
.hero .kicker{ color:#6b7280; text-transform:uppercase; letter-spacing:.1em; font-size:.8rem; margin-bottom:10px }
.hero p{ font-size:1.05rem }
.hero .panel{
  background:rgba(255,255,255,0.7);
  backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
  border-radius:var(--radius); padding:26px;
  border:1px solid rgba(255,255,255,0.3);
  box-shadow:0 4px 16px rgba(0,0,0,0.08);
}

/* ============ 5) Layout: grids/cards/etc. ============ */
.grid{ display:grid; gap:20px }
.grid.cols-3{ grid-template-columns:repeat(3,1fr) }
.grid.cols-4{ grid-template-columns:repeat(4,1fr) }

.card{
  background:#fff; border:1px solid #e5e7eb; border-radius:var(--radius);
  padding:22px; box-shadow:var(--shadow); cursor:default;
  transition:transform .2s ease, box-shadow .2s ease;
}
.card:hover{ transform:translateY(-3px); box-shadow:0 8px 20px rgba(0,0,0,.10) }
.card h3{ margin-bottom:10px }
a.card{ display:block; cursor:pointer; text-decoration:none }
.card:not(a){ cursor:default }
.badge{ display:inline-block; padding:6px 10px; font-size:.8rem; border-radius:999px; background:#E6FFFA; color:#065F46 }

/* Logos grid */
.logos{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(140px,1fr));
  gap:24px; align-items:center;
}
.logos img{
  height:44px; width:auto; justify-self:center; object-fit:contain;
  filter:none; opacity:1; transition:none;
}

/* Testimonials & Approach */
.testimonials{ display:grid; grid-template-columns:repeat(3,1fr); gap:22px }
.quote{ font-style:italic }
.cite{ color:#6b7280; font-size:.9rem; margin-top:8px }

.approach-steps{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px }
.step{ border-left:4px solid var(--teal); padding-left:16px }

/* ============ 6) Buttons (global) ============ */
/* (This is the effective style you’re using across the site) */
.btn{
  display:inline-block; padding:.75rem 1.5rem;
  font-size:1rem; font-weight:600; border-radius:.5rem;
  cursor:pointer; border:none; text-align:center;
  transition:all .2s ease-in-out;
}
.btn.primary{ background-color:#2EC4B6; color:#fff }
.btn.primary:hover{ background-color:#1B9E90 }
.btn.cta{ box-shadow:0 4px 6px rgba(0,0,0,0.1) }
.btn.cta:hover{ box-shadow:0 6px 10px rgba(0,0,0,0.15) }

/* ============ 7) Forms (case form, consent, chips, success) ============ */
.case-form{ margin-top:1rem; max-width:720px }
.form-field{ margin-bottom:1rem }
.form-field label,
.form-field legend{ font-weight:600; margin-bottom:.35rem; display:block }

.case-form input,
.case-form select,
.case-form textarea{
  width:100%; padding:.65rem .75rem;
  border:1px solid #D6D9DE; border-radius:8px;
  font:inherit; background:#fff; color:#111827;
}

.grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:.85rem }
.chip-group{ display:flex; flex-wrap:wrap; gap:.5rem 1rem }
.chip-group label{ display:inline-flex; align-items:center; gap:.4rem; font-weight:500 }

.form-consent{
  display:flex !important; align-items:flex-start; gap:.6rem;
  font-size:1rem; line-height:1.4; margin:.5rem 0 1rem;
}
.form-consent input[type="checkbox"]{
  flex:0 0 auto; width:1.1rem; height:1.1rem; margin-top:.2em;
}
.form-consent a{ text-decoration:underline }
.form-row--consent{ grid-column:1 / -1 }

.form-success{
  padding:1rem; border:1px solid #CFE6E2; background:#F4FBFA;
  border-radius:12px; margin-bottom:1rem;
}
.form-success h3{ margin:0 0 .25rem }
.hidden{ display:none !important }

/* ============ 8) Cookie banner + modal ============ */
.cookie-banner{
  position:fixed; bottom:18px; left:18px; right:18px; z-index:60;
  background:#fff; border:1px solid #e5e7eb; border-radius:12px;
  box-shadow:var(--shadow); padding:16px; display:none;
}
.cookie-banner.show{ display:block }
.cookie-actions{ display:flex; gap:10px; margin-top:8px }

.cookie-modal[hidden]{ display:none !important }
.cookie-modal{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  display:grid; place-items:center; z-index:9999;
}
.cookie-modal__dialog{
  width:min(680px,92vw); background:#fff; color:#1B263B;
  border-radius:14px; padding:1.25rem 1.25rem 1rem;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  border:1px solid rgba(27,38,59,.08);
}
.cookie-modal__close{
  appearance:none; border:0; background:transparent;
  font-size:1.6rem; line-height:1; float:right; cursor:pointer; color:#1B263B;
}
.cookie-group{ margin:1rem 0; border:1px solid #e7edf1; border-radius:10px; padding:.8rem 1rem }
.cookie-group legend{ font-weight:600; padding:0 .4rem }
.toggle{ display:flex; gap:.5rem; align-items:center; font-weight:500 }
.toggle.disabled{ opacity:.6 }
.hint{ margin:.25rem 0 0; font-size:.9rem; color:#4b5563 }
.cookie-actions{ display:flex; gap:.5rem; justify-content:flex-end; margin-top:1rem }
.btn-primary{ background:#2EC4B6; color:#fff; border:1px solid #29b6a9; border-radius:10px; cursor:pointer; padding:.6rem .9rem }
.btn-secondary{ background:#F8F9FA; color:#1B263B; border:1px solid #e5e7eb; border-radius:10px; cursor:pointer; padding:.6rem .9rem }

/* ============ 9) Services layout ============ */
.services-layout{
  display:grid; grid-template-columns:320px 1fr; gap:24px;
}
.services-list{
  background:#fff; border:1px solid #e5e7eb; border-radius:var(--radius);
  padding:12px; box-shadow:var(--shadow);
  position:sticky; top:calc(var(--header-h) + 18px); align-self:start;
}
.service-item{
  width:100%; text-align:left; padding:12px 14px; margin:6px 0;
  border-radius:10px; border:1px solid transparent;
  background:#F8F9FA; color:var(--navy); font-weight:600; cursor:pointer;
  transition:background .15s ease, border-color .15s ease, transform .15s ease;
}
.service-item:hover{ transform:translateY(-1px) }
.service-item.is-active{
  background:#fff; border-color:var(--teal);
  box-shadow:0 2px 10px rgba(0,0,0,.06), inset 0 0 0 1px var(--teal);
}
.services-cta{ margin-top:10px; display:flex; justify-content:flex-start }
.service-detail{
  background:#fff; border:1px solid #e5e7eb; border-radius:var(--radius);
  padding:22px; box-shadow:var(--shadow);
  max-height:64vh; overflow:auto;
}
.service-detail .detail-title{ margin-top:4px }

/* ============ 10) Case Hub ============ */
.case-hub .case-layout{ display:grid; grid-template-columns:260px 340px 1fr; gap:24px }
.case-hub .case-domains,
.case-hub .case-titles,
.case-hub .case-detail{
  background:#fff; border:1px solid #e5e7eb; border-radius:14px; box-shadow:var(--shadow); padding:14px;
}
.case-hub .case-domains{ position:sticky; top:calc(var(--header-h) + 18px); align-self:start }
.case-hub .case-titles{ position:sticky; top:calc(var(--header-h) + 18px); align-self:start; max-height:64vh; overflow:auto }
.case-hub .case-detail{ max-height:64vh; overflow:auto }
.case-hub .chip{
  display:block; width:100%; text-align:left; padding:10px 12px; margin:6px 0;
  border-radius:10px; border:1px solid transparent; background:#F8F9FA; color:var(--navy); font-weight:600; cursor:pointer;
}
.case-hub .chip.is-active{ background:#fff; border-color:var(--teal); box-shadow:inset 0 0 0 1px var(--teal) }
.case-hub .title-item{
  display:block; text-align:left; padding:10px 12px; margin:6px 0;
  border-radius:10px; border:1px solid transparent; background:#fff; cursor:pointer;
}
.case-hub .title-item:hover{ background:#F8F9FA }
.case-hub .title-item .t{ color:var(--navy); font-weight:700 }
.case-hub .title-item .s{ color:#444; font-size:.92rem }

/* ============ 11) Request Deck modal ============ */
.request-modal[hidden]{ display:none !important }
.request-modal{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  display:grid; place-items:center; z-index:9999;
}
.request-modal__dialog{
  width:min(720px,92vw); background:#fff; color:#1B263B;
  border-radius:14px; padding:1.25rem;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  border:1px solid rgba(27,38,59,.08);
}
.request-modal__close{
  appearance:none; border:0; background:transparent;
  font-size:1.6rem; line-height:1; float:right; cursor:pointer; color:#1B263B;
}
.request-modal input[type="text"],
.request-modal input[type="email"],
.request-modal textarea,
.request-modal select{
  width:100%; padding:.6rem .7rem; border:1px solid #e5e7eb; border-radius:10px;
  font:inherit; color:#111827; background:#fff;
}
.request-modal label{ display:block; font-weight:600; margin:8px 0 6px }
.request-modal .grid.cols-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px }
@media (max-width:900px){ .request-modal .grid.cols-2{ grid-template-columns:1fr } }

/* ============ 12) Contact block ============ */
.contact-card{ margin-top:16px }
.contact-line{ display:flex; gap:8px; align-items:flex-start; margin:.25rem 0 }
.contact-line .icon{ flex:0 0 18px; color:#2EC4B6; line-height:1 }
.office-address{ margin:0; line-height:1.5; font-style:normal }
.contact-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px }

/* ============ 13) Footer ============ */
.footer{ background:var(--navy); color:#d1d5db; padding:40px 0; margin-top:40px }
.footer a{ color:#e5e7eb }
.footer .grid{ grid-template-columns:2fr 1fr 1fr 1fr }

/* Footer brand: logo + text on navy (single clean definition) */
.footer .logo-wrap{ display:inline-flex; align-items:center; gap:12px; text-decoration:none; color:#e5e7eb }
.footer .brand-name{ color:#fff; font-weight:700; font-size:1.25rem; line-height:1.2 }
.footer .brand-sub{ color:rgba(255,255,255,0.75); font-size:.95rem }
.footer .logo-wrap:hover .brand-name{ opacity:.95 }
.footer .footer-note{ margin-top:12px; color:rgba(255,255,255,0.60); font-size:.9rem }

/* Footer logo: remove outlines/borders/highlights */
.footer .footer-logo{
  width:48px; height:auto; display:block; border:0 !important; outline:0 !important;
  box-shadow:none !important; background:transparent !important; filter:none !important;
}
.footer a img{ border:0 } /* legacy quirk */

/* ============ 14) Utilities ============ */
.notice{ font-size:.875rem; color:#6b7280 }

/* ============ 15) Responsive tweaks ============ */
@media (max-width:900px){
  .hero{ grid-template-columns:1fr }
  .grid.cols-3{ grid-template-columns:1fr }
  .grid.cols-4{ grid-template-columns:1fr 1fr }
  .testimonials{ grid-template-columns:1fr }
  .logos{ grid-template-columns:repeat(auto-fit, minmax(120px,1fr)); gap:16px }
  .logos img{ height:32px }
  .footer .grid{ grid-template-columns:1fr 1fr }
  .footer .brand-name{ font-size:1.1rem }
}

@media (max-width:720px){
  .grid-2{ grid-template-columns:1fr }
}

@media (max-width:480px){
  .container{ padding:0 12px } /* reduce side padding on very small screens */
}

/* === HOTFIX: Restore global pill buttons & scope modal buttons === */

/* 1) Scope cookie modal buttons so they don't override global .btn */
.cookie-modal .btn {
  padding: .6rem .9rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}
.cookie-modal .btn-primary {
  background: #2EC4B6;
  color: #fff;
  border-color: #29b6a9;
}
.cookie-modal .btn-secondary {
  background: #F8F9FA;
  color: #1B263B;
  border: 1px solid #e5e7eb;
}

/* 2) Restore the global pill button look (used by "Explore Services" & About-page CTA) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--navy);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.btn.primary:hover {
  background: var(--navy);
  border-color: var(--navy);
}
.btn.secondary { background: #fff; color: var(--navy); }
.btn.icon::after { content: "→"; }

/* Optional emphasis */
.btn.cta { box-shadow: 0 4px 6px rgba(0,0,0,.1); }
.btn.cta:hover { box-shadow: 0 6px 10px rgba(0,0,0,.15); }

/* === HOTFIX: restore normal scrolling on mobile, keep layout tidy === */

/* 1) Re-enable page scrolling (we previously hid all horizontal overflow globally). */
html, body {
  overflow-x: visible;    /* restore default so no scroll jitter */
  max-width: none;        /* remove clamp that could create weird behavior */
}

/* 2) Clamp only the header/menu to the viewport width so they never cause sideways scroll. */
.header,
.header .bar,
@media (max-width: 900px) {
  .nav { max-width: 100vw; }   /* already present, keep it */
}

/* 3) Ensure intentionally scrollable panels feel natural on iOS/Android. */
.service-detail,
.case-hub .case-titles,
.case-hub .case-detail,
.request-modal__dialog,
.cookie-modal__dialog {
  -webkit-overflow-scrolling: touch;   /* smooth momentum scrolling on mobile */
}

/* 4) Safety: long brand names shouldn’t push the hamburger off-screen. (You already have most of this.) */
.logo-wrap { min-width: 0; }
.brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-toggle { margin-left: auto; }
