/* ==========================================================================
   Doctors Branding: Responsive Rules
   Breakpoints: >1360 desktop-xl, 1024-1360 laptop, 768-1024 tablet, <768 mobile
   ========================================================================== */

/* ---------------------------------- */
/* Laptop (<=1180px)                   */
/* ---------------------------------- */
@media (max-width: 1180px){
  .main-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .mega-menu{ grid-template-columns:repeat(2,1fr); }

  .hero-grid{ grid-template-columns:1fr; text-align:center; }
  .hero-visual{ margin-inline:auto; max-width:520px; }
  .hero-cta-row{ justify-content:center; }
  .hero-social-proof .flex{ justify-content:center; }
  .hero-empower-line{ margin-inline:auto; }

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

/* ---------------------------------- */
/* Tablet (<=1024px)                   */
/* ---------------------------------- */
@media (max-width: 1024px){
  :root{ --space-section: clamp(56px, 8vw, 110px); }

  .process-timeline{ padding-left:20px; }

  .footer-grid{ grid-template-columns:repeat(2,1fr); }
}

/* ---------------------------------- */
/* Tablet / small (<=860px)            */
/* ---------------------------------- */
@media (max-width: 860px){
  .grid-2{ grid-template-columns:1fr; }
  .why-grid{ grid-template-columns:1fr; }
  .services-grid{ grid-template-columns:repeat(2,1fr); }
  .industries-grid{ grid-template-columns:repeat(2,1fr); }
  .testimonial-grid{ grid-template-columns:1fr; }
  .final-cta-inner{ flex-direction:column; text-align:center; }
}

/* ---------------------------------- */
/* Mobile (<=640px)                    */
/* ---------------------------------- */
@media (max-width: 640px){
  .container{ padding-inline:18px; }
  section{ padding-block: clamp(52px, 12vw, 88px); }

  .brand-logo{ height:40px; }
  .footer-logo{ height:44px; }
  .header-actions .btn{ display:none; }

  .section-title{ font-size: clamp(1.7rem, 8vw, 2.2rem); }

  .grid-4, .grid-3{ grid-template-columns:1fr; }
  .services-grid{ grid-template-columns:1fr; }
  .industries-grid{ grid-template-columns:repeat(2,1fr); gap:14px; }

  .stat-card{ padding:16px 10px; }

  .btn{ width:100%; }
  .hero-cta-row{ flex-direction:column; }
  .hero-cta-row .btn{ width:100%; }

  .mega-menu{ grid-template-columns:1fr; }

  .footer-grid{ grid-template-columns:1fr; gap:32px; }
  .footer-bottom{ flex-direction:column; gap:12px; text-align:center; }

  .back-to-top{ width:44px; height:44px; right:16px; bottom:16px; }
  .whatsapp-fab{ width:50px; height:50px; left:16px; bottom:16px; }

  .process-num{ width:40px; height:40px; font-size:13px; }
  .timeline-line{ left:20px; }
}

/* ---------------------------------- */
/* Very small (<=380px)                */
/* ---------------------------------- */
@media (max-width: 380px){
  .brand-logo{ height:24px; }
  .industries-grid{ grid-template-columns:1fr; }
  .stat-num{ font-size:1.7rem; }
}

/* ---------------------------------- */
/* Reveal-animation overflow guard      */
/* translateX pre-reveal offsets can    */
/* push elements past the viewport      */
/* edge on narrow screens (contributing */
/* to scrollable overflow / iOS rubber- */
/* band overscroll); translateY reveals */
/* are unaffected and keep their motion */
/* ---------------------------------- */
@media (max-width: 1024px){
  [data-reveal="left"]{ transform: translateX(0); }
  [data-reveal="right"]{ transform: translateX(0); }
}

/* Pull the floating review card fully inside the frame on narrow phones
   where there's no margin to spare for its usual -6% overhang */
@media (max-width: 600px){
  .hero-float-br{ right:0; }
}

/* ---------------------------------- */
/* Large desktop refinement (>1600px)  */
/* ---------------------------------- */
@media (min-width: 1600px){
  :root{ --container-max: 1480px; }
}

/* ---------------------------------- */
/* Team Section Responsive             */
/* ---------------------------------- */
@media (max-width: 1180px){
  .team-grid{
    grid-template-columns:repeat(2, 1fr);
    gap:28px;
  }
}

@media (max-width: 860px){
  .team-grid{
    grid-template-columns:repeat(2, 1fr);
    gap:24px;
  }

  .team-card{
    padding:32px 20px;
  }

  #team .section-head{
    margin-bottom:48px;
  }
}

@media (max-width: 640px){
  .team-grid{
    grid-template-columns:1fr;
    gap:20px;
    margin-bottom:32px;
  }

  .team-card{
    padding:28px 16px;
  }

  .team-image{
    width:300px;
    height:300px;
    margin-bottom:16px;
  }

  .team-name{
    font-size:1rem;
    margin-bottom:4px;
  }

  .team-role{
    font-size:12px;
    margin-bottom:10px;
  }

  .team-bio{
    font-size:13px;
    margin-bottom:16px;
  }

  #team .section-head{
    margin-bottom:40px;
  }
}

/* ---------------------------------- */
/* Case Studies Responsive             */
/* ---------------------------------- */
@media (max-width: 1180px){
  .case-study-card{
    grid-template-columns:1fr;
    gap:32px;
  }

  .case-study-image{
    min-height:280px;
  }
}

@media (max-width: 860px){
  .case-study-card{
    padding:32px 24px;
    gap:24px;
    margin-bottom:24px;
  }

  .case-study-results{
    grid-template-columns:repeat(3,1fr);
    gap:16px;
    padding:20px;
  }

  .result-number{
    font-size:24px;
  }
}

@media (max-width: 640px){
  #case-studies .section-head{
    margin-bottom:40px;
  }

  .case-study-card{
    padding:24px 16px;
    gap:20px;
  }

  .case-study-image{
    grid-template-columns:1fr 1fr;
    gap:12px;
    min-height:240px;
  }

  .case-preview{
    border-radius: var(--r-sm);
  }

  .case-study-title{
    font-size:1.3rem;
    margin-bottom:12px;
  }

  .case-study-overview{
    font-size:14px;
    margin-bottom:20px;
  }

  .case-study-section{
    margin-bottom:20px;
    padding-bottom:20px;
  }

  .case-section-text{
    font-size:13px;
  }

  .case-study-results{
    grid-template-columns:1fr;
    gap:12px;
    padding:16px;
    margin:24px 0;
  }

  .result-number{
    font-size:22px;
  }

  .result-label{
    font-size:11px;
  }

  .case-study-testimonial{
    margin-top:20px;
    padding:16px;
    border-left-width:2px;
  }

  .testimonial-text{
    font-size:13px;
    margin-bottom:12px;
  }

  .case-study-card .btn{
    font-size:14px;
    padding:12px 20px;
  }
}

/* Print */
@media print{
  .site-header, .back-to-top, .whatsapp-fab, .bg-fx, .scroll-progress, .mobile-drawer{ display:none !important; }
}
