/* ============================================================
   SV INSTITUTE – RESPONSIVE CSS
   Module 1: Mobile-first breakpoint overrides
   Breakpoints: xs<576 | sm≥576 | md≥768 | lg≥992 | xl≥1200
   ============================================================ */

/* ── BASE (xs, mobile-first — already set in global.css) ──── */

/* ── Small: ≥ 576px ───────────────────────────────────────── */
@media (min-width: 576px) {

  /* Float labels visible on wider mobile */
  .svi-float__label { display: inline; }

  /* Footer bottom flex */
  .svi-footer__bottom-inner {
    flex-direction: row;
  }
}

/* ── Medium: ≥ 768px (Tablet) ─────────────────────────────── */
@media (min-width: 768px) {

  /* Section spacing increase */
  .svi-section   { padding: var(--svi-space-2xl) 0; }
  .svi-section--sm { padding: var(--svi-space-xl) 0; }

  /* Stat blocks in a row */
  .svi-stats-row {
    display:   flex;
    gap:       0;
    flex-wrap: wrap;
  }
  .svi-stats-row .svi-stat {
    flex:    1 1 50%;
    border-right: 1px solid var(--svi-border);
    border-bottom: 1px solid var(--svi-border);
  }
  .svi-stats-row .svi-stat:nth-child(2n) { border-right: none; }

  /* Form card more padding */
  .svi-form-card {
    padding: var(--svi-space-xl) var(--svi-space-xl);
  }

  /* CTA section actions */
  .svi-cta-section .svi-cta-actions {
    flex-wrap: nowrap;
  }

  /* Float: push WhatsApp label visible on tablet+ */
  .svi-float {
    padding: 0 1.25rem;
  }
}

/* ── Large: ≥ 992px (Desktop) ─────────────────────────────── */
@media (min-width: 992px) {

  /* Navbar height back to full desktop size */
  .svi-navbar__inner {
    height: var(--svi-nav-height);
  }
  .svi-page-body {
    padding-top: var(--svi-nav-height);
  }

  /* Stats in a single row */
  .svi-stats-row .svi-stat {
    flex:         1 1 25%;
    border-bottom: none;
  }
  .svi-stats-row .svi-stat:nth-child(2n) { border-right: 1px solid var(--svi-border); }
  .svi-stats-row .svi-stat:last-child    { border-right: none; }

  /* Two-column form layout */
  .svi-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}

/* ── Extra-large: ≥ 1200px ────────────────────────────────── */
@media (min-width: 1200px) {

  /* Wider section inner padding */
  .svi-section--lg {
    padding: calc(var(--svi-space-2xl) * 1.5) 0;
  }

  /* Blog card thumbnail taller */
  .svi-card--blog .svi-card__thumb-wrap {
    height: 240px;
  }
}

/* ── xs only: < 576px (small mobile) ─────────────────────── */
@media (max-width: 575.98px) {

  /* Hide float labels on very small screens */
  .svi-float__label { display: none; }
  .svi-float {
    width:  52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  /* Scroll top lower so it doesn't overlap floats */
  .svi-scroll-top { bottom: 180px; }

  /* Full-width buttons on mobile */
  .svi-btn--block-mobile { width: 100%; }

  /* Section header */
  .svi-section-header { margin-bottom: var(--svi-space-lg); }

  /* CTA actions stacked */
  .svi-cta-section .svi-cta-actions {
    flex-direction: column;
    align-items:    stretch;
  }
  .svi-cta-section .svi-btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer bottom stacked */
  .svi-footer__bottom-inner {
    flex-direction: column;
    align-items:    flex-start;
    gap:            0.5rem;
  }

  /* Cards full-width on mobile */
  .svi-card--service,
  .svi-card--feature,
  .svi-card--testimonial { margin-bottom: 1rem; }
}

/* ── Mobile navbar overrides (< 992px) ───────────────────── */
@media (max-width: 991.98px) {

  .svi-navbar__inner {
    height: var(--svi-nav-height-mobile);
  }
  .svi-page-body {
    padding-top: var(--svi-nav-height-mobile);
  }

  /* Float buttons: repositioned for smaller screens */
  .svi-float--whatsapp { bottom: 84px; right: 1rem; }
  .svi-float--call     { bottom: 1rem;  right: 1rem; }
  .svi-scroll-top      { bottom: 155px; right: 1rem; }
}

/* ── Landscape mobile ─────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .svi-mobile-menu {
    overflow-y: auto;
  }
  .svi-mobile-nav__link,
  .svi-mobile-nav__accordion-toggle {
    padding-top:    0.6rem;
    padding-bottom: 0.6rem;
    min-height:     44px;
  }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .svi-header,
  .svi-float,
  .svi-float--whatsapp,
  .svi-float--call,
  .svi-scroll-top,
  .svi-mobile-menu,
  .svi-nav-overlay { display: none !important; }

  .svi-page-body  { padding-top: 0 !important; }
  .svi-footer     { background: #fff !important; color: #000 !important; }
}

/* ── Reduced Motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration:   0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration:  0.01ms !important;
    scroll-behavior:      auto !important;
  }
  .svi-fade-up { opacity: 1; transform: none; }
}
