/* ==========================================================================
   RAUSHEENA GROUP — RESPONSIVE LAYER
   Breakpoints tested against: 1920 / 1440 / 1366 / 1024 / 768 / 600 / 430 / 390 / 375 / 320
   Mobile-first overrides live in main.css via clamp(); this file handles
   structural reflows (grid → stack) at each breakpoint.
   ========================================================================== */

/* ---- ≤1200px : large laptop / small desktop ---- */
@media (max-width: 1200px){
  .footer-top{ grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-top .footer-col:nth-child(2){ grid-column: 1; }
  .biz-grid{ grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); }
}

/* ---- ≤1024px : tablets landscape / iPad ---- */
@media (max-width: 1024px){
  :root{ --nav-h: 82px; --nav-h-scrolled: 62px; }
  .brand img{ height: 58px; }
  .site-header.is-scrolled .brand img{ height: 44px; }

  .split-mv{ grid-template-columns: 1fr; }
  .mv-panel{ padding: 3rem clamp(1.6rem, 5vw, 3rem); }

  .split-media{ grid-template-columns: 1fr; }
  .split-media.reverse{ direction: ltr; }
  .split-media-figure{ order: -1; }

  .footer-top{ grid-template-columns: 1fr 1fr; gap: 2.4rem 1.6rem; }
  .footer-brand{ grid-column: 1 / -1; }

}

/* ---- ≤900px : tablet portrait ---- */
@media (max-width: 900px){
  .grid-2, .grid-3, .grid-4{ grid-template-columns: repeat(2, 1fr); }
  .leader-grid{ grid-template-columns: repeat(2, 1fr); }
  .values-row{ flex-direction: column; }
  .value-card:hover{ flex-grow: 1; }
  .form-grid{ grid-template-columns: 1fr; }
  .cta-band{ flex-direction: column; align-items: flex-start; text-align: left; }
  .mega-menu{ grid-template-columns: repeat(2, 1fr); width: min(640px, 90vw); }
}

/* ---- ≤768px : large phones / small tablets ---- */
@media (max-width: 768px){
  :root{ --section-pad-y: clamp(3.2rem, 10vw, 4.5rem); }

  .grid-2, .grid-3, .grid-4{ grid-template-columns: 1fr; }
  .leader-grid{ grid-template-columns: 1fr; }
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }

  .footer-top{ grid-template-columns: 1fr; gap: 2.2rem; padding-bottom: 2.2rem; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; text-align: left; }

  .modal-leader-head{ flex-direction: column; align-items: flex-start; text-align: left; }

  .timeline::before{ left: 14px; }
  .timeline-item{ padding-left: 42px; }
  .timeline-dot{ left: 6px; }
}

/* ---- ≤600px : phones ---- */
@media (max-width: 600px){
  .section-title{ font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .biz-card{ padding: 1.8rem 1.4rem; }

  .cert-grid, .product-card{ grid-template-columns: 1fr; }
  .stats-grid{ grid-template-columns: 1fr 1fr; }
  .stat-item{ padding: 1.8rem 1rem; }

  .mega-menu{ grid-template-columns: 1fr; padding: 1.4rem; }
  .modal-box{ padding: 1.5rem; }
  .modal-cert-frame{ height: 50vh; }

  .back-to-top{ right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ---- ≤430px : modern phones (iPhone Pro Max etc.) ---- */
@media (max-width: 430px){
  :root{ --nav-h: 74px; --nav-h-scrolled: 58px; }
  .brand img{ height: 52px; }
  .site-header.is-scrolled .brand img{ height: 40px; }
  .brand-name{ font-size: 0.9rem; }

  .cta-band{ padding: 2rem 1.4rem; }
  .stats-grid{ grid-template-columns: 1fr 1fr; }
  .contact-info-card{ padding: 1.6rem; }
}

/* ---- ≤390px / 375px : compact phones ---- */
@media (max-width: 390px){
  .container{ padding-inline: 18px; }
  .btn{ padding: 0.9rem 1.6rem; font-size: 0.84rem; }
}

/* ---- ≤320px : smallest supported ---- */
@media (max-width: 320px){
  .container{ padding-inline: 14px; }
  .section-title{ font-size: 1.5rem; }
  .value-card{ flex-basis: 100%; }
  .mobile-menu-links a, .mobile-menu-links button.mobile-toggle{ font-size: 1.1rem; }
}

/* ---- Landscape phones (short viewport height) ---- */
@media (max-height: 480px) and (orientation: landscape){
  .mobile-menu{ overflow-y: auto; }
}

/* ---- Fine-pointer only: keep hover-only affordances off touch devices ---- */
@media (hover: none){
  .custom-cursor{ display: none !important; }
  .biz-card:hover{ transform: none; }
}
/* Shared accessibility and containment safeguards. */
html { scroll-padding-top: 100px; }
main, .container, .form-field { min-width: 0; }
input, select, textarea { max-width: 100%; }
:focus-visible { outline: 2px solid var(--rg-cyan); outline-offset: 5px; }
.mobile-menu { visibility: hidden; overscroll-behavior: contain; }
.mobile-menu.is-open { visibility: visible; }
.modal-overlay { transition: opacity .3s var(--ease-out); }
.has-mega.is-dismissed .mega-menu { opacity: 0; visibility: hidden; pointer-events: none; }
.mega-menu { transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.mobile-submenu { visibility: hidden; }
.mobile-submenu.is-open { visibility: visible; }
.hero-vertical-dots { gap: 2px; align-items: center; }
.hero-vertical-dots button { width: 32px; height: 36px; display: grid; place-items: center; background: transparent; cursor: pointer; }
.hero-vertical-dots button:not(.slideshow-pause)::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; opacity: .6; transition: transform .25s, opacity .25s; }
.hero-vertical-dots button.is-active::before { opacity: 1; background: var(--rg-cyan); transform: scale(1.4); }
.hero-vertical-dots .slideshow-pause { width: auto; padding: 0 10px; border-radius: 18px; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; }
/* The page can paint immediately, even without JavaScript or external libraries. */
#preloader { display: none; }
@media (max-width: 600px) {
  .hero-vertical-dots { bottom: .4rem; right: 12px; }
  .hero-vertical-dots button { width: 26px; }
  .contact-info-card a { overflow-wrap: anywhere; }
  .form-field input, .form-field select, .form-field textarea { font-size: 16px; }
}
