/**
 * ==========================================================================
 * CHIRAAYU AYURVEDA HOSPITAL - RESPONSIVE STYLESHEET
 * File: assets/css/responsive.css
 * 
 * Provides comprehensive, fluid, and robust responsiveness across all device
 * form factors:
 *   - Ultra-Wide & 4K Displays (>= 1440px)
 *   - Desktops & Laptops (1200px - 1439px)
 *   - Small Laptops & Landscape Tablets (992px - 1199px)
 *   - Portrait Tablets (768px - 991px)
 *   - Large Mobile / Phablets (576px - 767px)
 *   - Standard Mobile Phones (375px - 575px)
 *   - Ultra-Compact Screens (<= 374px)
 * ==========================================================================
 */

/* ==========================================================================
   1. GLOBAL FLUID TYPOGRAPHY & SCALING (All Screens)
   ========================================================================== */
:root {
  /* Fluid font sizes using clamp(min, preferred, max) */
  --fluid-h1: clamp(26px, 4vw + 12px, 44px);
  --fluid-h2: clamp(22px, 3vw + 10px, 34px);
  --fluid-h3: clamp(18px, 2vw + 8px, 24px);
  --fluid-h4: clamp(16px, 1.5vw + 6px, 20px);
  --fluid-lead: clamp(14.5px, 1vw + 11px, 17px);
  --fluid-body: clamp(14px, 0.5vw + 12px, 15.5px);
  --fluid-small: clamp(12px, 0.4vw + 10px, 13.5px);

  /* Fluid Section Spacing */
  --fluid-section-pad: clamp(40px, 6vw + 10px, 80px);
  --fluid-card-pad: clamp(18px, 2.5vw + 8px, 32px);
  --fluid-gap-lg: clamp(24px, 3vw + 10px, 48px);
  --fluid-gap-md: clamp(16px, 2vw + 8px, 28px);
  --fluid-gap-sm: clamp(10px, 1.5vw + 4px, 18px);
}

/* Apply fluid scale to fundamental elements */
h1,
.hero h1 {
  font-size: var(--fluid-h1);
  line-height: 1.2;
}

h2,
.section-head h2 {
  font-size: var(--fluid-h2);
  line-height: 1.26;
}

h3 {
  font-size: var(--fluid-h3);
  line-height: 1.32;
}

h4 {
  font-size: var(--fluid-h4);
  line-height: 1.35;
}

p.lead-text {
  font-size: var(--fluid-lead);
}

.section-pad {
  padding: var(--fluid-section-pad) 0;
}

/* Ensure images and media never overflow their parent containers */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/* Global overflow containment */
body,
html {
  overflow-x: hidden;
  width: 100%;
}

/* Touch targets optimization */
button,
a,
input,
select,
textarea,
.mode-option,
.slot-pill-box {
  -webkit-tap-highlight-color: transparent;
}


/* ==========================================================================
   2. ULTRA-WIDE & LARGE DESKTOPS (min-width: 1400px)
   ========================================================================== */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero h1 {
    font-size: 46px;
    line-height: 1.16;
  }

  .hero-img-wrap img {
    height: 480px;
  }

  .feature-img {
    min-height: 460px;
  }

  .feature-content {
    padding: 64px 60px;
  }

  .booking-card {
    padding: 44px;
  }
}


/* ==========================================================================
   3. SMALL LAPTOPS & DESKTOPS (1200px to 1399px)
   ========================================================================== */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .container {
    max-width: 1140px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-img-wrap img {
    height: 430px;
  }

  .doctors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: 30px;
  }
}


/* ==========================================================================
   4. LARGE TABLETS & SMALL LAPTOPS (992px to 1199px)
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }

  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 32px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-img-wrap img {
    height: 380px;
  }

  .main-nav .nav-link {
    font-size: 13.5px;
    padding: 8px 10px !important;
  }

  .conditions-grid,
  .treatments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
  }

  .doctors-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .feature-content {
    padding: 40px 32px;
  }

  .spotlight-grid {
    grid-template-columns: 4.5fr 7.5fr;
  }

  .appointment-grid {
    grid-template-columns: 1fr 1.1fr;
    gap: 32px;
  }

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


/* ==========================================================================
   5. PORTRAIT TABLETS (768px to 991px)
   ========================================================================== */
@media (max-width: 991.98px) {

  /* Navigation Bar */
  #site-header {
    padding: 4px 0;
  }

  #site-header.scrolled {
    padding: 2px 0;
  }

  .brand-logo img {
    height: 72px;
    width: 72px;
  }

  #site-header.scrolled .brand-logo img {
    height: 62px;
    width: 62px;
  }

  .navbar-collapse {
    background: #FFFFFF;
    margin-top: 12px;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 16px 36px rgba(39, 25, 77, 0.12);
    border: 1px solid var(--border-soft);
  }

  .main-nav {
    width: 100%;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-soft);
  }

  .main-nav .nav-link {
    padding: 10px 14px !important;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }

  .main-nav .nav-dropdown-menu {
    border: none;
    box-shadow: none;
    background: var(--brand-indigo-light);
    border-radius: var(--radius-sm);
    margin: 4px 0 10px 10px;
    padding: 6px 8px;
    border-left: 3px solid var(--primary-color);
  }

  .main-nav .nav-dropdown-item {
    padding: 8px 12px !important;
    margin-bottom: 2px;
  }

  .main-nav .nav-dropdown-item .dropdown-item-title {
    font-size: 13.5px;
  }

  .header-actions {
    width: 100%;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .header-actions .btn-sm-pill {
    flex: 1;
    text-align: center;
    padding: 10px 16px;
  }

  /* Sub-Navbar Link Strip */
  .sub-navbar-strip {
    padding: 9px 0;
  }

  .sub-navbar-strip .container {
    gap: 8px;
  }

  /* Hero Section */
  .hero {
    padding: 48px 0 44px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
  }

  .hero h1 {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .hero p.lead-text {
    margin: 0 auto 24px;
  }

  .hero .hero-cta {
    justify-content: center;
  }

  .hero-img-wrap {
    max-width: 640px;
    margin: 0 auto;
  }

  .hero-img-wrap img {
    height: 360px;
  }

  .hero-badge {
    left: 16px;
    bottom: 16px;
    padding: 10px 14px;
  }

  /* Trust Bar */
  .trust-bar {
    padding: 22px 0;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .trust-item {
    justify-content: flex-start;
  }

  /* Grids: Conditions, Treatments, Doctors */
  .conditions-grid,
  .treatments-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  /* Doctors Slider (4 cards on screens >= 768px) */
  .doctors-swiper .doctor-photo {
    height: 185px;
  }

  .doctors-swiper .doctor-body {
    padding: 14px 12px;
  }

  .doctors-swiper .doctor-body h3 {
    font-size: 14.5px;
  }

  .doctors-swiper .doctor-body .qual {
    font-size: 11px;
  }

  .doctors-swiper .doctor-body .spec {
    font-size: 12px;
    margin-bottom: 10px;
  }

  /* Spotlight Ksharasutra */
  .spotlight-grid {
    grid-template-columns: 1fr;
  }

  .feature-img {
    height: 280px;
    min-height: 280px;
  }

  .feature-content {
    padding: 36px 28px;
  }

  /* Approach Process */
  .approach-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Why Chiraayu */
  .why-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .why-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    text-align: left;
  }

  /* Blogs & Events */
  .blogs-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* FAQ */
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .faq-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
  }

  /* Appointment Section */
  .appointment-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .appointment-info-col {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
  }

  .apt-contact-strip {
    text-align: left;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}


/* ==========================================================================
   6. LARGE MOBILE PHONES / PHABLETS (576px to 767px)
   ========================================================================== */
@media (max-width: 767.98px) {

  /* Section Spacing & Headings */
  .section-pad {
    padding: 44px 0;
  }

  .section-head {
    margin-bottom: 28px;
    text-align: center;
  }

  .section-head h2 {
    font-size: 25px;
    margin-top: 6px;
    margin-bottom: 10px;
  }

  .section-head p {
    font-size: 14px;
  }

  /* Hero Section */
  .hero {
    padding: 36px 0 32px;
  }

  .hero h1 {
    font-size: 28px;
    line-height: 1.22;
  }

  .hero p.lead-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
  }

  .hero-img-wrap img {
    height: 290px;
  }

  .hero .hero-cta {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero .hero-cta .btn {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }

  .hero-badge {
    position: static;
    margin-top: 14px;
    max-width: 100%;
    width: 100%;
  }

  /* Sub Navbar Link Strip */
  .sub-navbar-strip .container {
    flex-direction: column;
    gap: 6px;
    text-align: center;
    justify-content: center;
  }

  .strip-text {
    font-size: 12px;
    justify-content: center;
    text-align: center;
  }

  /* Trust Items */
  .trust-item {
    font-size: 13.5px;
    gap: 10px;
  }

  .trust-item i {
    font-size: 20px;
  }

  /* Cards (How We Help & Treatments) */
  .care-card {
    padding: 24px 20px;
  }

  .care-card h3 {
    font-size: 17px;
  }

  /* Why Chiraayu Features */
  .why-features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .why-item {
    padding: 12px 14px;
  }

  /* Form Elements */
  .booking-card {
    padding: 24px 18px;
  }

  .booking-card-head h3 {
    font-size: 19px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mode-switch {
    flex-direction: column;
    gap: 4px;
    border-radius: var(--radius-md);
  }

  .mode-option {
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 13px;
  }

  /* Slot Pickers */
  .slot-pill-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .btn-book-submit {
    padding: 14px 20px;
    font-size: 15px;
  }

  /* Contact Strip in Appointment */
  .apt-contact-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
  }

  .apt-strip-actions {
    width: 100%;
    display: flex;
    gap: 10px;
  }

  .apt-strip-btn {
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  /* Prakruthi Test Card */
  .prakruthi-card {
    padding: 28px 18px;
    margin: 20px auto;
  }

  .prakruthi-title {
    font-size: 22px;
  }

  .prakruthi-subtitle {
    font-size: 11px;
    margin-bottom: 20px;
  }

  .prakruthi-question-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 0;
  }

  .prakruthi-q-label {
    width: 100%;
    font-size: 12.5px;
  }

  .prakruthi-q-options {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 6px;
  }

  .prakruthi-radio-label {
    padding: 10px 14px;
  }

  .prakruthi-meter-row {
    grid-template-columns: 130px 1fr 40px;
    gap: 8px;
  }
}


/* ==========================================================================
   7. STANDARD MOBILE PHONES (375px to 575px - iPhone, Galaxy, Pixel)
   ========================================================================== */
@media (max-width: 575.98px) {

  /* Global Typography Tuning */
  body {
    font-size: 14.5px;
    line-height: 1.62;
  }

  .section-pad {
    padding: 38px 0;
  }

  .section-head h2 {
    font-size: 23px;
  }

  .eyebrow {
    font-size: 11.5px;
    padding: 4px 10px;
  }

  /* Header Brand Logo */
  .brand-logo img {
    height: 58px;
    width: 58px;
  }

  #site-header.scrolled .brand-logo img {
    height: 50px;
    width: 50px;
  }

  .brand-logo .brand-text {
    font-size: 15px;
  }

  .brand-logo .brand-text small {
    font-size: 10px;
  }

  .header-actions {
    gap: 8px;
  }

  /* Hero Section */
  .hero {
    padding: 28px 0 24px;
  }

  .hero h1 {
    font-size: 25px;
    line-height: 1.24;
  }

  .hero-img-wrap img {
    height: 240px;
    border-radius: var(--radius-md);
  }

  .hero-badge strong {
    font-size: 12.5px;
  }

  .hero-badge span {
    font-size: 11px;
  }

  .hero-call {
    font-size: 13.5px;
    margin-top: 14px;
  }

  /* Trust Grid */
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .trust-item {
    background: #FFFFFF;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
  }

  /* 1-Column Grids for Small Devices */
  .conditions-grid,
  .treatments-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .doctors-swiper .doctor-card {
    max-width: 100%;
  }

  /* Symptom Finder Pills */
  .symptom-pill {
    font-size: 12.5px;
    padding: 7px 13px;
    margin: 4px 2px;
  }

  /* Spotlight Feature Card */
  .feature-img {
    height: 220px;
    min-height: 220px;
  }

  .feature-content {
    padding: 24px 18px;
  }

  .feature-content h2 {
    font-size: 22px;
  }

  .feature-list li {
    font-size: 13.5px;
    gap: 8px;
  }

  /* Yoga Section */
  .yoga-bg {
    min-height: 320px;
  }

  .yoga-content {
    padding: 24px 18px;
  }

  .yoga-content h2 {
    font-size: 22px;
  }

  /* Event Cards */
  .event-card {
    flex-direction: column;
    padding: 18px;
    gap: 14px;
  }

  .event-date-badge {
    width: 60px;
    height: 60px;
  }

  .event-date-badge .day {
    font-size: 20px;
  }

  .event-date-badge .month {
    font-size: 11px;
  }

  /* FAQ Accordion */
  .faq-btn {
    padding: 14px 16px;
    font-size: 14px;
  }

  .faq-card .card-body {
    padding: 0 16px 16px;
    font-size: 13.5px;
  }

  /* Appointment Features (4 items) */
  .apt-features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .apt-feat-item {
    padding: 12px 14px;
  }

  /* Footer */
  footer {
    padding: 40px 0 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-logo {
    height: 110px;
    width: 110px;
  }

  .footer-bottom {
    margin-top: 24px;
    padding-top: 16px;
    font-size: 11.5px;
  }

  /* Prakruthi Test Form */
  .prakruthi-card {
    padding: 22px 14px;
  }

  .prakruthi-title {
    font-size: 19px;
  }

  .prakruthi-meter-row {
    grid-template-columns: 110px 1fr 36px;
    font-size: 12px;
    gap: 6px;
  }

  .prakruthi-meter-row div:first-child {
    font-size: 11.5px !important;
  }

  .prakruthi-result-actions {
    flex-direction: column;
    width: 100%;
  }

  .prakruthi-result-actions .btn {
    width: 100%;
  }

  /* Doctors Slider Mobile Controls */
  .doctors-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .doctors-slider-controls {
    gap: 12px;
  }

  /* Floating Buttons */
  .fab-wrap {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }

  .fab {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  /* Chatbot Window on Mobile */
  .ai-chat-window {
    /* right: 5px; */
    bottom: 8px;
    /* width: calc(100vw - 16px); */
    max-width: calc(100vw - 16px);
    height: calc(100vh - 10px);
    max-height: 100%;
    border-radius: 14px;
  }

  .ai-slot-choice-btn {
    padding: 10px 12px;
  }

  .ai-slot-choice-btn .slot-title {
    font-size: 12.5px;
  }

  .ai-slot-choice-btn .slot-sub {
    font-size: 11px;
  }
}


/* ==========================================================================
   8. ULTRA-COMPACT SCREENS (<= 374px - iPhone SE, Fold Outer, 320px-360px)
   ========================================================================== */
@media (max-width: 374.98px) {
  body {
    font-size: 13.5px;
  }

  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Header */
  .brand-logo img {
    height: 48px;
    width: 48px;
  }

  .btn-sm-pill {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* Hero */
  .hero h1 {
    font-size: 22px;
  }

  .hero p.lead-text {
    font-size: 13.5px;
  }

  .hero-img-wrap img {
    height: 200px;
  }

  /* Section Titles */
  .section-head h2 {
    font-size: 20px;
  }

  .eyebrow {
    font-size: 10.5px;
  }

  /* Booking Form Card */
  .booking-card {
    padding: 18px 12px;
  }

  .booking-card-head h3 {
    font-size: 17.5px;
  }

  .form-control-custom {
    padding: 10px 12px 10px 36px;
    font-size: 13px;
  }

  .slot-pill-box {
    padding: 8px 10px;
  }

  .slot-pill-box .slot-name {
    font-size: 12px;
  }

  .slot-pill-box .slot-time {
    font-size: 10.5px;
  }

  .btn-book-submit {
    font-size: 14px;
    padding: 12px 16px;
  }

  /* Prakruthi Test */
  .prakruthi-card {
    padding: 18px 10px;
  }

  .prakruthi-title {
    font-size: 17px;
  }

  .prakruthi-meter-row {
    grid-template-columns: 1fr;
    gap: 4px;
    text-align: left;
    margin-bottom: 14px;
  }

  .prakruthi-meter-row .text-right {
    text-align: left !important;
  }

  /* FAB */
  .fab {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}


/* ==========================================================================
   9. ACCESSIBILITY & PREFERS-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;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}


/* ==========================================================================
   10. PRINT MEDIA QUERY
   ========================================================================== */
@media print {

  #site-header,
  .fab-wrap,
  .ai-chat-window,
  .sub-navbar-strip,
  .appointment-section,
  footer {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .prakruthi-card {
    box-shadow: none !important;
    border: 1px solid #CCCCCC !important;
    padding: 0 !important;
  }
}