/* ══════════════════════════════════════════════════════════════
   SecneurX — Responsive / Mobile Stylesheet
   Applies across all pages. Loaded after page-level styles.
══════════════════════════════════════════════════════════════ */

/* ── Products dropdown — 2-column grid (consistent across all pages) ─ */
.nav-dropdown:hover .dropdown-menu,
.dropdown:hover .dropdown-menu {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 6px !important;
  min-width: 620px !important;
  padding: 12px !important;
}
/* Remove the small triangle arrow — looks odd on wide 2-col dropdown */
.dropdown-menu::before {
  display: none !important;
}
/* Allow text to wrap naturally inside grid cells */
.dropdown-item {
  white-space: normal !important;
}

/* ── Hamburger button (hidden on desktop) ───────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 6px 4px;
  background: none;
  border: none;
  z-index: 101;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Tablet (≤ 960px) ───────────────────────────────────────── */
@media (max-width: 960px) {
  nav  { padding: 0 28px !important; }
  .nav { padding: 0 28px !important; }

  .breadcrumb  { padding: 12px 28px !important; }
  .section     { padding: 70px 36px !important; }
  .hero        { padding: 70px 36px 60px !important; }
  .trust-bar   { padding: 18px 28px !important; }
  .cta-section { padding: 70px 36px !important; }
  .awards-strip { padding: 40px 28px !important; }

  /* Collapse wider grids to 2 cols */
  .problem-grid,
  .cap-grid    { grid-template-columns: repeat(2, 1fr) !important; }
  .int-grid    { grid-template-columns: repeat(2, 1fr) !important; }
  .cards       { grid-template-columns: repeat(2, 1fr) !important; }
  .stats       { grid-template-columns: repeat(2, 1fr) !important; }
  .compare     { grid-template-columns: 1fr !important; }
  .how-steps   { grid-template-columns: 1fr !important; }

  /* Hide the connector line on how-steps */
  .how-steps::before { display: none !important; }
}

/* ── Mobile (≤ 768px) ───────────────────────────────────────── */
@media (max-width: 768px) {

  /* ·· Navigation ············································ */
  nav  { padding: 0 16px !important; }
  .nav { padding: 0 16px !important; }

  /* Logo — constrain image size and prevent overflow */
  .nav-logo { overflow: hidden; max-width: 160px; display: flex !important; align-items: center !important; }
  .nav-logo img { max-height: 34px !important; width: auto !important; max-width: 140px !important; object-fit: contain !important; }
  .nav-logo span, .nav-logo a { font-size: 18px !important; white-space: nowrap; }

  /* Hide the desktop link list, show hamburger */
  .nav-links     { display: none !important; }
  .nav-hamburger { display: flex !important; margin-left: auto; }

  /* Mobile nav drawer — revealed by JS toggle */
  .nav-links.mobile-open {
    display: flex !important;
    /* absolute avoids being trapped by .snx-nav's backdrop-filter
       containing block (which breaks position:fixed on iOS/Chrome) */
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(100vh - 68px) !important;
    flex-direction: column !important;
    background: rgba(12, 3, 1, 0.98);
    border-bottom: 1px solid rgba(201, 65, 26, 0.25);
    padding: 12px 20px 24px !important;
    gap: 0 !important;
    z-index: 98;
    overflow-y: auto;
  }
  .nav-links.mobile-open li {
    list-style: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links.mobile-open li:last-child { border-bottom: none; }
  .nav-links.mobile-open a {
    display: block !important;
    padding: 13px 4px !important;
    font-size: 15px !important;
    color: rgba(255, 255, 255, 0.82) !important;
  }
  /* Keep dropdown hidden on mobile (links are visible at top level) */
  .nav-links.mobile-open .dropdown-menu { display: none !important; }
  /* Request Demo CTA pill in mobile nav */
  .nav-links.mobile-open .nav-cta {
    display: block !important;
    text-align: center;
    margin-top: 10px;
    padding: 12px 20px !important;
    border-radius: 8px !important;
  }

  /* ·· Page spacing ·········································· */
  .breadcrumb  { padding: 10px 20px !important; font-size: 11px !important; }
  .section     { padding: 52px 20px !important; }
  .hero        { padding: 48px 20px 44px !important; }
  .trust-bar   { padding: 14px 20px !important; gap: 6px !important; flex-wrap: wrap !important; }
  .awards-strip { padding: 36px 20px !important; }
  .cta-section { padding: 56px 20px !important; }
  .section-header { margin-bottom: 32px !important; }

  /* ·· Hero ·················································· */
  .hero-badge-row { flex-wrap: wrap !important; gap: 8px !important; justify-content: center !important; }
  .hero-sub { font-size: 15px !important; }
  .hero-stats {
    gap: 20px !important;
    padding-top: 24px !important;
    margin-top: 32px !important;
    justify-content: center !important;
  }
  .hero-stat-value { font-size: 26px !important; }
  .hero-card { padding: 36px 24px !important; }

  /* Stack CTA button rows vertically */
  .hero-cta-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-ghost,
  .hero-cta-row a {
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
  }

  /* ·· Grid collapses ········································ */
  .problem-grid,
  .cap-grid,
  .int-grid,
  .deploy-grid,
  .ff-grid,
  .cards       { grid-template-columns: 1fr !important; }

  .stats       { grid-template-columns: repeat(2, 1fr) !important; }
  .compare     { grid-template-columns: 1fr !important; }
  .how-steps   { grid-template-columns: 1fr !important; }
  .how-steps::before { display: none !important; }

  /* Pipeline steps — 2 per row */
  .pipe-step { flex: 0 0 50% !important; min-width: 120px !important; margin-bottom: 24px !important; }

  /* Awards strip */
  .awards-grid  { flex-direction: column !important; align-items: center !important; }
  .award-divider { width: 60px !important; height: 1px !important; margin: 14px 0 !important; }
  .award-row    { gap: 12px !important; }

  /* ·· Typography ·············································*/
  .section-title    { font-size: clamp(22px, 6vw, 32px) !important; }
  .cta-section h2   { font-size: clamp(22px, 6vw, 34px) !important; }

  /* ·· Footer ················································ */
  .footer-inner { grid-template-columns: 1fr !important; gap: 2rem !important; }

  /* ·· Inline-style overrides ································ */
  /* Grids defined with inline style attributes */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr !important;
  }

  /* Inline padding that uses 60px+ horizontal padding */
  [style*="padding:80px 60px"],
  [style*="padding: 80px 60px"],
  [style*="padding:100px 60px"],
  [style*="padding: 100px 60px"],
  [style*="padding:90px 60px"],
  [style*="padding: 90px 60px"] {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* ·· Modal form ············································ */
  /* Stack the 2-column Name/Email and Company/Phone fields */
  #demoModal [style*="grid-template-columns:1fr 1fr"],
  #demoModal [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  /* Reduce modal padding on small screens */
  #demoModal > div > div {
    padding: 28px 18px 24px !important;
    border-radius: 12px !important;
  }
  #demoModal {
    padding: 12px !important;
  }
}

/* ── Small mobile (≤ 480px) ─────────────────────────────────── */
@media (max-width: 480px) {
  .stats       { grid-template-columns: 1fr !important; }
  .pipe-step   { flex: 0 0 100% !important; }
  .hero-stats  {
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
  }
  .plat-pill   { font-size: 12px !important; padding: 8px 14px !important; }
  .badge-red,
  .badge-gold  { font-size: 10px !important; padding: 5px 10px !important; }
  .btn-primary,
  .btn-ghost   { font-size: 14px !important; padding: 12px 20px !important; }
  .trust-bar span { font-size: 11px !important; }
}

/* ── Footer responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  footer > div > div:first-child,
  footer [style*="grid-template-columns:2fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }
  footer [style*="padding:60px 60px"] {
    padding: 40px 20px 0 !important;
  }
}
@media (max-width: 480px) {
  footer > div > div:first-child,
  footer [style*="grid-template-columns:2fr"] {
    grid-template-columns: 1fr !important;
  }
}
