/* ═══════════════════════════════════════════════════════════════════
   ZAHWAH GLOBAL — Mobile-First Responsive System
   Loads after all other stylesheets — highest cascade priority.
   Redesigns every section for mobile rather than shrinking desktop.
   Targets: 320 / 360 / 375 / 390 / 414 / 430 / 480 / 576 / 768 /
            820 / 1024px
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 1. GLOBAL FOUNDATION ──────────────────────────────────────── */

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

img,
video,
iframe,
svg,
canvas {
  max-width: 100%;
  height: auto;
}

/* iOS prevents zoom on form focus when font-size >= 16px */
@media (max-width: 991px) {
  input,
  textarea,
  select,
  .zv-contact-form-shell input,
  .zv-contact-form-shell textarea,
  .zv-contact-form-shell select {
    font-size: 16px !important;
  }
}

/* ─── 2. CONTAINER PADDING ──────────────────────────────────────── */

@media (max-width: 575px) {
  .container {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
    max-width: 100%;
  }
}

@media (max-width: 375px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ─── 3. GLOBAL BUTTONS — TOUCH-FRIENDLY ───────────────────────── */

@media (max-width: 991px) {
  .zv-btn {
    min-height: 48px;
    padding-block: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }
}

@media (max-width: 767px) {
  .zv-btn {
    min-height: 52px;
    font-size: 0.95rem;
  }
}

/* ─── 4. NAVIGATION — PREMIUM MOBILE ───────────────────────────── */

@media (max-width: 991px) {
  /* Nav container */
  .zv-nav {
    padding: 0.5rem 0.875rem;
  }

  .zv-nav-inner {
    height: 58px;
    padding-inline: 0.75rem;
    border-radius: 18px;
  }

  .zv-nav-logo img {
    height: 36px;
  }

  /* The generic .zv-btn touch-sizing rule above also matches the nav CTA
     (it shares the .zv-btn class) and would otherwise re-show it here,
     crowding out the hamburger. Keep it hidden in favor of the mobile menu. */
  .zv-nav-links, .zv-lang-btn, .zv-nav-cta {
    display: none !important;
  }

  /* Hamburger — larger, cleaner touch target */
  .zv-hamburger {
    display: flex;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .zv-hamburger span,
  .zv-ham-line {
    display: block;
    background: var(--zv-text);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.32, 0, 0.67, 0),
                opacity 0.25s ease,
                width 0.25s ease;
  }

  .zv-ham-line:nth-child(1) { width: 22px; height: 2px; }
  .zv-ham-line:nth-child(2) { width: 16px; height: 2px; margin-top: 5px; margin-left: auto; }
  .zv-ham-line:nth-child(3) { width: 22px; height: 2px; margin-top: 5px; }

  .zv-hamburger.is-open .zv-ham-line:nth-child(1),
  .zv-hamburger.open  .zv-ham-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    width: 22px;
  }
  .zv-hamburger.is-open .zv-ham-line:nth-child(2),
  .zv-hamburger.open  .zv-ham-line:nth-child(2) {
    opacity: 0;
    width: 0;
    transform: scaleX(0);
  }
  .zv-hamburger.is-open .zv-ham-line:nth-child(3),
  .zv-hamburger.open  .zv-ham-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    width: 22px;
  }

  /* Mobile overlay — GPU-accelerated slide from right (iOS-safe) */
  .zv-mobile-overlay {
    position: fixed !important;
    /* Override inset: 0 from base CSS */
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: min(360px, 90vw);
    height: 100dvh;
    background: rgba(7, 5, 16, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -24px 0 80px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 5.5rem 1.5rem 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    /* Use transform — GPU accelerated, no layout shift, works on iOS */
    opacity: 1 !important;
    pointer-events: none;
    transform: translateX(105%);
    will-change: transform;
    transition: transform 0.42s cubic-bezier(0.32, 0, 0.67, 0) !important;
  }

  .zv-mobile-overlay.is-open,
  .zv-mobile-overlay.open {
    transform: translateX(0) !important;
    pointer-events: auto;
    transition: transform 0.42s cubic-bezier(0.33, 1, 0.68, 1) !important;
  }

  /* Backdrop */
  .zv-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .zv-overlay-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Mobile inner content */
  .zv-mobile-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 0;
  }

  /* Nav links */
  .zv-mobile-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    text-align: left;
    max-width: 100%;
    width: 100%;
  }

  .zv-mobile-links > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .zv-mobile-link,
  .zv-mobile-links a,
  .zv-mobile-links button {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 0.25rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--zv-text);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
    min-height: 54px;
    text-align: left;
    border-radius: 0;
    transition: color 0.2s;
  }

  .zv-mobile-link:hover,
  .zv-mobile-links a:hover,
  .zv-mobile-links button:hover {
    background: transparent;
    color: var(--zv-primary);
  }

  /* Services sub-menu */
  .zv-mobile-sub {
    list-style: none;
    padding: 0.25rem 0 0.75rem 0.5rem;
    margin: 0;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
  }

  .zv-mobile-sub li {
    border-bottom: none;
  }

  .zv-mobile-sub-link {
    display: flex !important;
    align-items: center;
    padding: 0.65rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
    min-height: 44px;
  }

  .zv-mobile-sub-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--zv-text);
  }

  /* Language switcher */
  .zv-mobile-lang {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: auto;
    margin-bottom: 0.875rem;
  }

  .zv-mobile-lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .zv-mobile-lang-btn.is-active {
    background: rgba(124, 61, 255, 0.2);
    border-color: rgba(124, 61, 255, 0.45);
    color: var(--zv-text);
  }

  /* Mobile CTA button */
  .zv-mobile-cta {
    min-height: 52px;
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
  }
}

@media (max-width: 375px) {
  .zv-mobile-overlay {
    width: 100vw;
    border-left: none;
  }
}

/* ─── 5. MOBILE STICKY CTA BAR ──────────────────────────────────── */

.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 8999;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  gap: 0;
  align-items: center;
  justify-content: center;
  width: auto !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
}

@media (max-width: 991px) {
  .mobile-sticky-cta { display: flex; }
}

.mobile-sticky-cta a {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 999px;
  background: #0077B6;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,119,182,0.35);
  transition: background 0.2s, transform 0.2s;
}

.mobile-sticky-cta a:hover,
.mobile-sticky-cta a:active {
  background: #005F8F;
  transform: translateY(-1px);
}

.mobile-sticky-cta i {
  font-size: 1.1rem;
  line-height: 1;
}

/* Add bottom padding so sticky CTA doesn't overlap footer content */
@media (max-width: 991px) {
  .zv-footer { padding-bottom: 5rem; }
}

/* ─── 6. HOMEPAGE — HERO ─────────────────────────────────────────── */

@media (max-width: 991px) {
  .ph-hero {
    min-height: auto;
    padding-top: 84px;
  }

  .ph-hero-inner {
    grid-template-columns: 1fr;
    padding-block: 2rem 3.5rem;
    gap: 2.5rem;
    min-height: 0;
    text-align: left;
  }

  .ph-hero-text {
    order: -1;
    max-width: 100%;
    margin: 0;
  }

  .ph-kicker-wrap,
  .ph-hero-actions,
  .ph-svc-dots {
    justify-content: flex-start;
  }

  .ph-deck-wrap {
    order: 0;
    display: flex;
    justify-content: center;
  }

  .ph-deck {
    width: min(78vw, 340px);
    height: min(86vw, 400px);
  }

  .ph-hero-actions {
    gap: 0.75rem;
  }

  .ph-tagline-wrap {
    min-height: auto;
    height: auto !important;
    margin-block: 1.25rem 1.5rem;
  }

  .ph-tagline {
    font-size: 1rem;
    line-height: 1.65;
    max-width: 100%;
    margin-inline: 0;
  }
}

@media (max-width: 767px) {
  .ph-hero { padding-top: 76px; }

  .ph-hero-inner {
    padding-block: 1.75rem 3rem;
    gap: 2rem;
  }

  .ph-hero-title {
    font-size: clamp(2.35rem, 11vw, 3.75rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
  }

  .ph-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ph-hero-actions .zv-btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
  }

  .ph-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.625rem;
    align-items: stretch;
  }

  .ph-stat {
    padding: 0.75rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    text-align: center;
  }

  .ph-stat-sep { display: none; }
  .ph-stat-num { font-size: 1.05rem; }
  .ph-stat-label { font-size: 0.6rem; letter-spacing: 0.04em; }

  .ph-deck {
    width: min(84vw, 310px);
    height: min(92vw, 370px);
  }
}

@media (max-width: 575px) {
  .ph-hero-title {
    font-size: clamp(2.1rem, 12vw, 3.1rem);
  }

  .ph-hero-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .ph-deck {
    width: min(90vw, 290px);
    height: 330px;
  }
}

@media (max-width: 390px) {
  .ph-hero-title {
    font-size: clamp(1.9rem, 12.5vw, 2.75rem);
  }

  .ph-hero-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .ph-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
    padding: 0.75rem 1rem;
  }

  .ph-stat-num { font-size: 1.2rem; white-space: nowrap; }

  .ph-svc-cycle { height: 1.15em; }

  .ph-deck {
    width: min(92vw, 275px);
    height: 310px;
  }
}

/* ─── 7. HOMEPAGE — SERVICES ─────────────────────────────────────── */

@media (max-width: 991px) {
  /* Hide right-side tagline — no room on tablet */
  .ph-section-tagline { display: none; }

  .ph-section-header--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
  }

  /* Switch to individual card styling — remove grid-level clip and separator trick */
  .ph-svc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    overflow: visible;
    background: transparent;
    border: none !important;
    border-radius: 0;
  }
  /* Reset the "centre lone 7th card" rule — only valid in 3-col desktop layout */
  .ph-svc-grid .ph-svc-card:last-child:nth-child(3n+1) {
    grid-column: auto;
  }
  /* Give each card its own border since grid no longer provides separators */
  .ph-svc-card {
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
  }
}

@media (max-width: 767px) {
  .ph-services { padding: 4rem 0 4.5rem; }

  .ph-section-header { margin-bottom: 2rem; }

  .ph-section-title {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.05;
  }

  .ph-svc-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .ph-svc-card {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .ph-svc-name { font-size: 1.05rem; }
  .ph-svc-blurb { font-size: 0.875rem; line-height: 1.6; }
}

@media (max-width: 575px) {
  .ph-svc-card {
    padding: 1.25rem 1.25rem 1.125rem;
  }
}

/* ─── 8. HOMEPAGE — PROCESS ──────────────────────────────────────── */

@media (max-width: 991px) {
  .ph-process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .ph-process-steps::before { display: none; }
}

@media (max-width: 767px) {
  .ph-process { padding: 4rem 0; }

  .ph-process-steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ph-step-num { font-size: 1rem; }
  .ph-step-body h3 { font-size: 1rem; }
  .ph-step-body p { font-size: 0.875rem; }
}

/* ─── 9. HOMEPAGE — WORK / PORTFOLIO ─────────────────────────────── */

@media (max-width: 991px) {
  .ph-work-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 100%;
    margin: 0;
  }
}

@media (max-width: 767px) {
  .ph-work { padding: 4rem 0; }

  .ph-work-visual {
    height: 180px;
    border-radius: 18px 18px 0 0;
  }

  .ph-work-content {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .ph-work-content h3 { font-size: 1.05rem; }
  .ph-work-content p  { font-size: 0.875rem; }
}

@media (max-width: 575px) {
  .ph-work-visual { height: 155px; }
}

/* ─── 10. HOMEPAGE — TESTIMONIALS ────────────────────────────────── */

@media (max-width: 991px) {
  .ph-testi-carousel { align-items: flex-start; }
  .ph-testi-arrow { margin-top: 0.5rem; }
}

@media (max-width: 767px) {
  .ph-testimonials { padding: 4rem 0; }

  .ph-testi { padding: 1.5rem; border-radius: 18px; }
  .ph-testi-arrow { width: 44px; height: 44px; }
  .ph-testi-carousel { gap: 0.75rem; }
  .ph-testi-quote { font-size: 0.9rem; line-height: 1.65; }
}

@media (max-width: 575px) {
  .ph-testi { padding: 1.25rem; }
  .ph-testi-arrow { width: 44px; height: 44px; border-radius: 12px; }
}

/* ─── 11. HOMEPAGE — METRICS ─────────────────────────────────────── */

@media (max-width: 767px) {
  .ph-metrics { padding: 3.5rem 0; }

  .ph-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }

  .ph-metric-num {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }
}

/* ─── 12. HOMEPAGE — WHY US ──────────────────────────────────────── */

@media (max-width: 991px) {
  .ph-why-grid { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 767px) {
  .ph-why { padding: 4rem 0; }

  .ph-why-title {
    font-size: clamp(2rem, 9vw, 3rem);
    margin-bottom: 2rem;
  }

  .ph-why-card {
    padding: 1.5rem;
    border-radius: 20px;
  }

  .ph-why-card h3 { font-size: 1.05rem; }
  .ph-why-card p  { font-size: 0.875rem; }
}

@media (max-width: 575px) {
  .ph-why-card { padding: 1.25rem; }
}

/* ─── 13. HOMEPAGE — CTA ─────────────────────────────────────────── */

@media (max-width: 767px) {
  .ph-cta { padding: 4.5rem 0; }

  .ph-cta-title {
    font-size: clamp(2rem, 9vw, 3.25rem);
  }

  .ph-cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .ph-cta-actions .zv-btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
  }
}

/* ─── 14. ABOUT PAGE ─────────────────────────────────────────────── */

@media (max-width: 991px) {
  .zv-about-hero { padding: 7.5rem 0 4rem; }

  .zv-about-hero-inner {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
    max-width: 100%;
  }

  .zv-about-hero-stats {
    min-width: 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .zv-about-stat-card {
    padding: 1.5rem 1.25rem;
  }

  .zv-about-stat-card strong { font-size: 1.9rem; }
}

@media (max-width: 767px) {
  .zv-about-hero { padding: 6.5rem 0 3.5rem; }

  .zv-about-hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .zv-about-hero-sub { font-size: 0.95rem; line-height: 1.7; }

  /* Story */
  .zv-about-story { padding: 4rem 0; }
  .zv-about-story-grid { grid-template-columns: 1fr; gap: 2rem; }
  .zv-about-story-title { font-size: clamp(1.75rem, 8vw, 2.75rem); }
  .zv-about-story-body p { font-size: 0.9rem; line-height: 1.75; }

  /* Story visual cards — horizontal row on mobile */
  .zv-about-story-visual {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .zv-story-card {
    flex: 1;
    min-width: 80px;
    padding: 1rem;
  }

  .zv-story-year, .zv-story-stat { font-size: 1.4rem; }

  /* Values */
  .zv-about-values { padding: 4rem 0; }
  .zv-why-grid { grid-template-columns: 1fr; gap: 0.875rem; }
  .zv-why-card { padding: 1.5rem; border-radius: 20px; }
  .zv-why-card h3 { font-size: 1rem; }
  .zv-why-card p  { font-size: 0.875rem; }

  /* Metrics */
  .zv-about-metrics { padding: 3.5rem 0; }
  .zv-about-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem 1rem; }
  .zv-metric-num { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  /* Services grid */
  .zv-about-services { padding: 4rem 0; }
  .zv-about-svc-grid { grid-template-columns: 1fr; gap: 0.75rem; }

  /* Regions */
  .zv-about-regions { padding: 4rem 0; }
  .zv-about-regions-inner { grid-template-columns: 1fr; gap: 2rem; }
  .zv-about-section-title { font-size: clamp(1.75rem, 8vw, 2.75rem); }

  /* Region globe — smaller on mobile */
  .zv-region-globe {
    width: 220px;
    height: 220px;
    margin-inline: auto;
  }

  /* CTA */
  .zv-about-cta { padding: 4.5rem 0 5rem; }
  .zv-about-cta-title { font-size: clamp(2rem, 9vw, 3rem); }
  .zv-about-cta-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .zv-about-cta-actions .zv-btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .zv-about-hero { padding: 6rem 0 3rem; }
  .zv-about-hero-title { font-size: clamp(1.75rem, 9.5vw, 2.5rem); }
  .zv-about-hero-stats { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .zv-about-stat-card { padding: 1rem 0.875rem; }
  .zv-about-stat-card strong { font-size: 1.35rem; }
  .zv-about-stat-card span { font-size: 0.62rem; letter-spacing: 0.05em; }
  .zv-about-svc-grid { grid-template-columns: 1fr; }
}

/* ─── 15. CONTACT PAGE ───────────────────────────────────────────── */

@media (max-width: 991px) {
  .zv-contact-hero { padding: 7.5rem 0 3.5rem; }
  .zv-contact-hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .zv-contact-hero-inner { max-width: 100%; }
}

@media (max-width: 767px) {
  .zv-contact-hero { padding: 6.5rem 0 3rem; }

  .zv-contact-hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .zv-contact-hero-sub {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  /* Trust cards — compact list on mobile */
  .zv-contact-trust { gap: 0.75rem; }

  .zv-trust-item {
    padding: 1rem 1.125rem;
    border-radius: 14px;
  }

  .zv-trust-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .zv-trust-body strong { font-size: 0.875rem; }
  .zv-trust-body span   { font-size: 0.78rem; }

  /* Contact main form */
  .zv-contact-main { padding: 2.5rem 0 5rem; }

  .zv-contact-layout {
    max-width: 100%;
    grid-template-columns: 1fr;
  }

  .zv-contact-form-shell {
    padding: 1.75rem;
    border-radius: 20px;
  }
}

@media (max-width: 575px) {
  .zv-contact-hero { padding: 6rem 0 2.5rem; }

  .zv-contact-hero-title {
    font-size: clamp(1.75rem, 9.5vw, 2.5rem);
  }

  .zv-trust-item { padding: 0.875rem 1rem; }
  .zv-contact-form-shell { padding: 1.25rem; border-radius: 16px; }
}

/* ─── 16. FOOTER ─────────────────────────────────────────────────── */

/* Pre-footer CTA band */
@media (max-width: 1024px) {
  .zv-prefooter-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.75rem;
  }
  .zv-prefooter-actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 767px) {
  .zv-prefooter { padding: 3rem 0; }

  .zv-prefooter-heading {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .zv-prefooter-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .zv-prefooter-actions .zv-btn,
  .zv-prefooter-wa {
    width: 100%;
    justify-content: center;
    min-height: 52px;
  }
}

/* Stats strip */
@media (max-width: 767px) {
  .zv-footer-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .zv-fstat-divider { display: none; }
  .zv-footer-stat {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .zv-footer-stat:nth-child(odd) {
    border-right: 1px solid rgba(255,255,255,0.06);
  }
}

/* Main grid */
@media (max-width: 1199px) {
  .zv-footer-grid {
    grid-template-columns: 1.4fr 0.9fr 1fr;
    gap: 2.5rem;
  }
  .zv-footer-col--contact {
    grid-column: span 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
  }
  .zv-footer-col--contact .zv-footer-heading {
    grid-column: span 2;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 991px) {
  .zv-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0 2.5rem;
  }
  .zv-footer-brand { grid-column: span 2; }
  .zv-footer-col--contact {
    grid-column: span 2;
    grid-template-columns: auto 1fr;
  }
  .zv-footer-col--contact .zv-footer-heading {
    grid-column: span 2;
  }
}

@media (max-width: 575px) {
  .zv-footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding: 2.5rem 0 2rem;
  }
  .zv-footer-brand { grid-column: span 1; }
  .zv-footer-logo-img { height: 44px; }
  .zv-footer-desc { max-width: 100%; }

  .zv-footer-col--contact {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }
  .zv-footer-col--contact .zv-footer-heading { grid-column: span 1; }

  .zv-footer-links a { font-size: 0.9rem; padding-block: 0.45rem; min-height: 44px; }
  .zv-footer-heading { margin-bottom: 1rem; }

  .zv-footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    padding-bottom: 7rem;
  }
  .zv-footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem;
  }
  .zv-footer-tagline { display: none; }

  .zv-footer-regions {
    justify-content: flex-start;
    gap: 0.35rem;
  }

  .zv-social-link { width: 44px; height: 44px; font-size: 1.15rem; }
}

/* ─── 17. SERVICE PAGES ──────────────────────────────────────────── */

@media (max-width: 991px) {
  .svc-hero { padding: 7rem 0 3.5rem; }

  .svc-hero-inner {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  .svc-hero-card { display: none; }

  .svc-layout {
    grid-template-columns: 1fr !important;
    gap: 2.5rem;
  }

  .svc-sidebar {
    position: static !important;
    top: auto !important;
  }

  .svc-toc { display: none; }
}

@media (max-width: 767px) {
  .svc-hero { padding: 6rem 0 3rem; }

  .svc-hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .svc-hero-sub { font-size: 0.95rem; }

  .svc-benefits-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .svc-benefit-item { padding: 1rem 1.25rem; border-radius: 14px; }

  .svc-steps { gap: 1.25rem; }
  .svc-step { padding: 1.25rem; border-radius: 18px; }
}

@media (max-width: 575px) {
  .svc-hero { padding: 5.5rem 0 2.5rem; }
  .svc-hero-title { font-size: clamp(1.8rem, 11vw, 2.75rem); }
}

/* ─── 18. PORTFOLIO PAGE ─────────────────────────────────────────── */

@media (max-width: 991px) {
  .pf-hero-grid { grid-template-columns: 1fr !important; gap: 2rem; }
}

@media (max-width: 767px) {
  .pf-hero { padding: 6rem 0 3rem; }
}

/* ─── 19. PREVENT ALL OVERFLOW ───────────────────────────────────── */

@media (max-width: 1024px) {
  /* These sections have large decorative orbs — clip them */
  .ph-hero,
  .ph-services,
  .ph-process,
  .ph-work,
  .ph-testimonials,
  .ph-metrics,
  .ph-cta,
  .ph-why,
  .zv-about-hero,
  .zv-about-story,
  .zv-about-values,
  .zv-about-regions,
  .zv-about-cta,
  .zv-contact-hero,
  .zv-contact-main,
  .zv-footer,
  .svc-hero,
  .pf-hero {
    overflow-x: clip;
  }
}

/* ─── 20. KICKER / UTILITY TYPOGRAPHY ───────────────────────────── */

@media (max-width: 767px) {
  .zv-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }
}

/* ─── 21. PRICING SECTION (service pages) ────────────────────────── */

@media (max-width: 767px) {
  .pricing-section { padding: 3.5rem 0 4rem; }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pricing-card { padding: 1.5rem; }
  .plan-price   { font-size: 1.75rem; }

  .plan-cta {
    min-height: 48px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ─── 22. REDUCED MOTION COMPLIANCE ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .zv-mobile-overlay {
    transform: none !important;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
  }

  .zv-mobile-overlay.is-open,
  .zv-mobile-overlay.open {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Lighten decorative background animation cost on phones/tablets — these
   blurred orbs are purely ambient decoration and the continuous drift +
   heavy blur filter is a real battery/GPU cost on lower-powered devices. */
@media (max-width: 991px) {
  .ph-orb,
  .zv-region-pulse-1,
  .zv-region-pulse-2,
  .zv-region-pulse-3,
  .zv-region-pulse-4 {
    animation: none !important;
  }
  .ph-orb {
    filter: blur(50px);
  }
}

/* ─── 23. TALL VIEWPORT / NOTCH SAFETY ───────────────────────────── */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-sticky-cta {
    bottom: max(1.125rem, env(safe-area-inset-bottom));
  }
}

/* ─── 24. PRODUCT / POS PAGES ────────────────────────────────────── */

@media (max-width: 767px) {
  .prod-hero-grid  { grid-template-columns: 1fr !important; gap: 2rem; }
  .prod-dashboard  { order: -1; width: 100%; max-width: 100%; }
  .prod-stat-row, .prod-features-grid, .prod-industry-grid, .prod-metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.875rem;
  }
  .prod-steps-grid { grid-template-columns: 1fr !important; gap: 1rem; }
  .prod-step-arrow { display: none !important; }
  .prod-compare-grid { grid-template-columns: 1fr !important; gap: 1.5rem; }
}

@media (max-width: 575px) {
  .prod-stat-row,
  .prod-metrics-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ─── 25. TINY TEXT — ENFORCE MINIMUM LEGIBLE SIZES ─────────────── */

@media (max-width: 767px) {
  /* Stat labels in hero */
  .ph-stat-label { font-size: 0.68rem; }

  /* Deck card inner text — prevent sub-10px */
  .ph-dc-sub  { font-size: 0.82rem; }
  .ph-dc-kpi span { font-size: 0.72rem; }

  /* Footer text */
  .zv-footer-links a { min-height: 44px; display: flex; align-items: center; }

  /* Service page pill tags */
  .svc-tag,
  .ph-dc-pills span {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }
}

/* Nav items inherit proper size */
@media (max-width: 991px) {
  .zv-nav-inner { gap: 0.5rem; }
}

/* ─── 26. SMALL PHONE FIXES (≤575px / ~375–430px real devices) ───── */

/* About hero title + stat cards: precision fixes for small viewports */
@media (max-width: 575px) {
  .zv-about-hero-title {
    font-size: clamp(1.5rem, 8vw, 1.95rem);
    letter-spacing: -0.02em;
  }

  /* Stat cards: switch to horizontal single-column at 375px — labels too wide for half-width cells */
  .zv-about-hero-stats {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }
  .zv-about-stat-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    text-align: left !important;
  }
  .zv-about-stat-card strong {
    font-size: 1.35rem !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
    min-width: 3rem !important;
  }
  .zv-about-stat-card span {
    font-size: 0.65rem !important;
    letter-spacing: 0.04em !important;
    min-width: 0 !important;
  }

  /* Contact hero: "extraordinary." at 11vw = 41px hits viewport edge */
  .zv-contact-hero-title {
    font-size: clamp(1.6rem, 8.5vw, 2.1rem);
  }
}

/* ─── 27. HERO TEXT + BUTTON FIXES FOR MOBILE ───────────────────── */

@media (max-width: 767px) {
  /* Service hero text column containment */
  .svc-hero-text {
    max-width: 100%;
    min-width: 0;
  }
  /* Service hero intro description: override 540px from inline style */
  .svc-hero-intro {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  /* Service CTA button: stack and stretch so it doesn't overflow */
  .svc-hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .svc-hero-actions .zv-btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    text-align: center;
  }
  /* About hero subtitle: override 640px from zahwah-v2.css */
  .zv-about-hero-sub {
    max-width: 100%;
  }
  /* Contact hero subtitle: override 580px from inline style in contact blade */
  .zv-contact-hero-sub {
    max-width: 100%;
  }
}

/* ─── 28. GLOBAL WORD-BREAK SAFETY FOR HERO HEADINGS ──────────────── */

@media (max-width: 575px) {
  .zv-about-hero-title,
  .zv-contact-hero-title,
  .svc-hero-title,
  .ph-hero-title {
    overflow-wrap: break-word;
    word-break: break-word;
  }
}

/* ─── 29. LIGHT THEME — Mobile Overrides ─────────────────────────── */

/* Hamburger button */
@media (max-width: 991px) {
  .zv-hamburger {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #E2E8F0 !important;
  }

  /* Mobile slide-out overlay */
  .zv-mobile-overlay {
    background: #FFFFFF !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-left: 1px solid #E2E8F0 !important;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.10) !important;
  }

  /* Nav link dividers */
  .zv-mobile-links > li {
    border-bottom: 1px solid #E2E8F0 !important;
  }

  /* Sub-menu links */
  .zv-mobile-sub-link {
    color: #6B7280 !important;
  }
  .zv-mobile-sub-link:hover {
    background: rgba(0, 119, 182, 0.06) !important;
    color: #0077B6 !important;
  }

  /* Language switcher */
  .zv-mobile-lang {
    border-top: 1px solid #E2E8F0 !important;
  }
  .zv-mobile-lang-btn {
    background: #F8FAFC !important;
    border: 1px solid #E2E8F0 !important;
    color: #6B7280 !important;
  }
  .zv-mobile-lang-btn.is-active {
    background: rgba(0, 119, 182, 0.08) !important;
    border-color: rgba(0, 119, 182, 0.35) !important;
    color: #0077B6 !important;
  }
  .zv-mobile-lang-btn:hover {
    background: rgba(0, 119, 182, 0.06) !important;
    border-color: rgba(0, 119, 182, 0.25) !important;
    color: #0077B6 !important;
  }

  /* Service card mobile border */
  .ph-svc-card {
    border: 1px solid #E2E8F0 !important;
  }
}

/* Hero stat cards at small viewports */
@media (max-width: 767px) {
  .ph-stat {
    border: 1px solid #E2E8F0 !important;
    background: rgba(0, 0, 0, 0.02) !important;
  }
}

@media (max-width: 390px) {
  .ph-stat {
    border: 1px solid #E2E8F0 !important;
    background: rgba(0, 0, 0, 0.02) !important;
  }
}
