/* ==========================================================================
   WaterGate — Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .nav-list > li > a.nav-link,
  .nav-list .dropdown-toggle {
    padding-inline: 0.55rem;
    font-size: 0.9rem;
  }
  .primary-nav { gap: 1rem; }
  .btn-nav-cta { padding-inline: 1rem; font-size: 0.85rem; }
  .dropdown-panel--solutions { min-width: 340px; }

  .brand-tagline { display: none; }

  .hero-grid,
  .capability-grid,
  .feature-split,
  .story-grid,
  .contact-grid,
  .intel-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-split.reverse .feature-content,
  .feature-split.reverse .feature-media { order: unset; }

  .hero-content {
    max-width: none;
    margin-inline: 0;
    text-align: left;
  }
  .hero-content h1,
  .hero-content .lead {
    max-width: none;
    text-align: left;
  }
  .hero-content .btn-group { justify-content: flex-start; }
  .hero-visual {
    min-height: 300px;
    width: min(100%, 360px);
    max-width: min(100%, 360px);
    margin-inline: auto !important;
    justify-self: center !important;
    place-self: center;
    transform: none !important;
  }
  .hero-shell { max-width: 100%; }
  .float-chip { display: none; }

  .intel-visual {
    width: min(100%, 420px);
    max-width: 100%;
    min-height: 0;
    margin-inline: auto;
    justify-content: center;
    overflow: hidden;
    transform: none !important;
  }
  .intel-visual-img {
    width: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: 1;
    object-fit: cover;
    /* PNG composition sits on the right — crop left void so graphic reads centered */
    object-position: 82% center;
  }

  .capability-visual {
    width: min(100%, 360px);
    margin-inline: auto;
  }

  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stat + .hero-stat { border-left: none; }
  .hero-stat:nth-child(odd) { border-right: 1px solid rgba(255, 106, 26, 0.2); }
  .hero-stat:nth-child(even) { padding-left: 0.65rem; }

  .solution-cards,
  .why-grid,
  .solutions-grid { grid-template-columns: 1fr; }

  .solutions-head {
    padding: 3.5rem 0 6.5rem;
  }
  .solutions-head-inner {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.25rem;
  }
  .solutions-head h2 { max-width: none; }
  .solutions-cta { width: fit-content; }
  .solutions-grid { margin-top: -4rem; }

  .why-premium-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .why-center {
    order: -1;
    width: min(100%, 280px);
    margin-bottom: 0.5rem;
  }

  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .process-track { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .process-track::before { display: none; }
  .metrics-grid,
  .intel-core .stats-row { grid-template-columns: repeat(2, 1fr); }
  .leadership-grid,
  .values-grid,
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
  .industries-grid { grid-template-columns: repeat(3, 1fr); }
  .pillar-feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars-home-list { grid-template-columns: 1fr; }
  .outcome-board { grid-template-columns: repeat(2, 1fr); }
  .industries-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .industries-visual {
    order: -1;
    width: min(100%, 260px);
  }
  .industries-stats {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .industries-stats-metrics {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 1.1rem;
  }
  .outcomes-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2.25rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col--contact { grid-column: 1 / -1; }
  .footer-cta__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  :root { --header-h: 76px; }

  .container,
  .header-inner {
    padding-inline: 1rem;
  }

  .brand-copy { display: none; }
  .brand-logo { height: 48px; max-width: 260px; }
  .nav-toggle { display: flex; }

  .site-header {
    z-index: 2000;
  }

  .primary-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #eef0f3;
    box-shadow: 0 16px 40px rgba(7, 27, 59, 0.1);
    padding: 0.85rem 1rem 1.35rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    margin-left: 0;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
    max-height: calc(100dvh - var(--header-h));
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 2001;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }
  .primary-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    width: 100%;
  }
  .nav-list > li > a.nav-link,
  .nav-list .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.9rem 0.35rem;
    font-size: 1rem;
  }
  .nav-list > li > a.nav-link::after,
  .nav-list .dropdown-toggle::after {
    left: 0;
    transform: translateX(0) scaleX(0);
    bottom: 0.35rem;
  }
  .nav-list > li > a.nav-link:hover::after,
  .nav-list .dropdown-toggle:hover::after,
  .nav-list .dropdown-toggle[aria-expanded="true"]::after,
  .nav-list > li > a.nav-link.active::after,
  .nav-list .dropdown-toggle.active::after,
  .has-dropdown.active > .dropdown-toggle::after {
    transform: translateX(0) scaleX(1);
  }

  /* Accordion chevron → + / − */
  .nav-list .dropdown-toggle i {
    font-size: 1.15rem;
    font-weight: 500;
    font-style: normal;
    line-height: 1;
    opacity: 1;
    width: 1.25rem;
    text-align: center;
    transform: none !important;
  }
  .nav-list .dropdown-toggle i::before {
    content: '+' !important;
    font-family: inherit !important;
    font-weight: 500;
  }
  .has-dropdown.open > .dropdown-toggle i::before,
  .nav-list .dropdown-toggle[aria-expanded="true"] i::before {
    content: '−' !important;
  }
  .has-dropdown.open > .dropdown-toggle,
  .nav-list .dropdown-toggle[aria-expanded="true"] {
    color: #F05000;
  }
  .has-dropdown.open > .dropdown-toggle i,
  .nav-list .dropdown-toggle[aria-expanded="true"] i {
    color: #F05000;
    transform: none !important;
  }

  .dropdown-panel,
  .dropdown-panel--solutions,
  .dropdown-panel--resources {
    position: static;
    left: auto;
    top: auto;
    width: 100%;
    min-width: 0;
    transform: none !important;
    border: none;
    border-radius: 10px;
    box-shadow: none;
    background: #F7F9FC;
    margin: 0.15rem 0 0.45rem;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
    display: block;
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .has-dropdown:hover > .dropdown-panel {
    max-height: 0 !important;
    pointer-events: none;
  }
  .has-dropdown.open > .dropdown-panel {
    max-height: 520px !important;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
  }
  .dropdown-panel__head {
    padding: 0.85rem 0.85rem 0.35rem;
  }
  .dropdown-panel__items {
    padding: 0.25rem 0.45rem 0.55rem;
  }
  .dropdown-item {
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
  }
  .dropdown-item__arrow {
    display: none;
  }
  .dropdown-panel__footer {
    background: transparent;
    border-top: 1px solid rgba(10, 50, 120, 0.08);
    padding: 0.75rem 0.95rem;
  }
  .btn-nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
  }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-vision { grid-template-columns: 1fr; }

  .solutions-cta { width: 100%; justify-content: center; }
  .solutions-grid { margin-top: -3.25rem; }

  .hero {
    min-height: auto;
    width: 100%;
  }
  .hero-glow.g1,
  .hero-glow.g2 {
    width: min(70vw, 280px);
    height: min(70vw, 280px);
  }
}

@media (max-width: 640px) {
  .container,
  .header-inner {
    padding-inline: 1rem;
  }
  body { font-size: 0.975rem; }

  .section { padding: 3.25rem 0; }
  .hero {
    padding: calc(var(--header-h) + 1.75rem) 0 2.5rem;
    min-height: auto;
  }
  .page-hero { padding: calc(var(--header-h) + 2.5rem) 0 2.75rem; }

  .hero-content h1 {
    font-size: clamp(1.85rem, 8vw, 2.4rem);
    max-width: none;
  }
  .hero-visual {
    min-height: 260px;
    width: min(100%, 300px);
    max-width: min(100%, 300px);
    margin-inline: auto !important;
    justify-self: center !important;
    place-self: center;
  }
  .intel-visual {
    width: min(100%, 320px);
  }
  .intel-visual-img {
    object-position: 84% center;
  }
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 1rem 1.1rem;
  }
  .hero-stat {
    padding: 0.85rem 0.25rem;
  }
  .hero-stat:nth-child(odd) { border-right: none; }
  .hero-stat + .hero-stat {
    border-left: none;
    border-top: 1px solid rgba(255, 106, 26, 0.2);
  }
  .hero-scroll { margin-top: 1.25rem; }

  .btn-group { flex-direction: column; align-items: stretch; }
  .btn-group .btn { width: 100%; max-width: none; }

  .dash-grid { grid-template-columns: 1fr; }
  .dash-card.wide { grid-column: auto; }

  .process-track { grid-template-columns: 1fr; }
  .process-step {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1rem;
    text-align: left;
    align-items: center;
  }
  .process-num { margin: 0; }

  .metrics-grid,
  .intel-core .stats-row,
  .services-grid,
  .leadership-grid,
  .values-grid,
  .insights-grid,
  .industries-grid,
  .capability-list,
  .form-row,
  .footer-top,
  .why-grid,
  .pillar-feature-grid,
  .pillars-home-list,
  .outcome-board,
  .outcomes-grid {
    grid-template-columns: 1fr;
  }
  .why-premium-layout { grid-template-columns: 1fr; }
  .industries-stats-metrics { grid-template-columns: 1fr; }
  .ind-sat { width: 28px; height: 28px; font-size: 0.65rem; }
  .pillar-block { padding: 1.35rem; }
  .pillar-block-head {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .sol-card-img { height: 180px; }

  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal { justify-content: center; }
  .footer-tagline { max-width: none; }
  .footer-cta__copy h2 { font-size: 1.35rem; }
  .footer-cta__btn { width: 100%; justify-content: center; }

  .contact-form, .contact-info-card { padding: 1.35rem; }
  .solpage-hero { padding: calc(var(--header-h) + 2.5rem) 0 3rem; }
  .solpage-hero h1 { max-width: none; }
}

@media (max-width: 400px) {
  .brand-logo { height: 40px; max-width: 210px; }
  h1 { font-size: 1.85rem; }
  .hero-stat strong { font-size: 1.25rem; }
}
