/* ==========================================================================
   Responsive Breakpoints & Touch Optimization
   Strictly Mobile-First & No Horizontal Scroll
   ========================================================================== */

/* Universal mobile viewport safety */
html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative !important;
  -webkit-overflow-scrolling: touch;
}

/* Large Tablets & Small Laptops (<= 1080px) */
@media (max-width: 1080px) {
  .treatments-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .trust-item-box:nth-child(2) {
    border-right: none;
  }

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

/* Tablets (<= 920px) */
@media (max-width: 920px) {
  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .nav-pill {
    padding: 8px 16px;
  }

  .about-grid,
  .guru-grid,
  .medicines-grid,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .timeline-grid,
  .process-grid,
  .gallery-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .about-visual-main img {
    height: 380px;
    width: 100%;
    object-fit: cover;
  }

  .about-badge-card {
    position: relative;
    bottom: auto;
    right: auto;
    margin-top: 16px;
    max-width: 100%;
  }

  .guru-frame {
    width: 100%;
    padding: 10px;
  }

  .guru-img {
    height: 380px;
    max-width: 100%;
    width: 100%;
    object-fit: cover;
  }

  .photo-identity-bar {
    width: 100%;
    margin-top: 14px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Devices (< 768px): Single WhatsApp control & Safe-area padding */
@media (max-width: 767.98px) {
  .floating-whatsapp {
    display: none !important; /* Single WhatsApp rule: on mobile, only smart action bar displays WhatsApp */
  }

  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Mobile Devices (<= 640px) - Handsets (Galaxy A-series, iPhones, etc.) */
@media (max-width: 640px) {
  /* Prevent any element from exceeding viewport */
  * {
    max-width: 100%;
  }

  body {
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
  }

  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .top-bar {
    display: none; /* Keep mobile viewport clean */
  }

  /* Buttons on Mobile */
  .btn {
    white-space: normal !important;
    max-width: 100% !important;
    word-break: break-word !important;
    text-align: center !important;
    padding: 13px 20px;
    font-size: 0.9rem;
    line-height: 1.35;
  }

  /* Section Typography */
  .section-tag {
    font-size: 0.7rem !important;
    padding: 4px 12px !important;
    margin-bottom: 12px !important;
  }

  .section-title {
    font-size: clamp(1.45rem, 5.5vw, 1.85rem) !important;
    line-height: 1.26 !important;
    margin-bottom: 12px !important;
  }

  .section-subtitle {
    font-size: 0.875rem !important;
    line-height: 1.55 !important;
    margin-bottom: 28px !important;
  }



  .trust-item-title {
    font-size: 0.9rem !important;
  }

  .trust-item-desc {
    font-size: 0.75rem !important;
  }

  /* Founder & Guru Sections */
  .about-section,
  .guru-spotlight {
    padding: 70px 0 !important;
  }

  .about-visual-main {
    border-width: 4px !important;
    border-radius: 18px !important;
  }

  .about-visual-main img {
    height: 320px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .photo-identity-bar {
    margin-top: 12px !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    width: 100% !important;
  }

  .photo-person-name {
    font-size: 1.15rem !important;
    line-height: 1.28 !important;
    margin-bottom: 3px !important;
  }

  .photo-person-role {
    font-size: 0.78rem !important;
    margin-bottom: 6px !important;
  }

  .photo-person-badge {
    font-size: 0.6875rem !important;
    padding: 3px 10px !important;
    line-height: 1.3 !important;
  }

  .lead-text {
    font-size: 1rem !important;
    line-height: 1.65 !important;
  }

  .body-text {
    font-size: 0.875rem !important;
    line-height: 1.65 !important;
    margin-bottom: 22px !important;
  }

  .founder-quote-box {
    padding: 16px 18px 16px 24px !important;
    margin-bottom: 24px !important;
  }

  .founder-quote-box::before {
    font-size: 2.8rem !important;
    top: 6px !important;
    left: 6px !important;
  }

  .founder-quote-text {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
  }

  .guru-frame {
    width: 100% !important;
    padding: 8px !important;
    border-radius: 20px !important;
  }

  .guru-img {
    height: 340px !important;
    max-width: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 14px !important;
  }

  .guru-lead {
    font-size: 1rem !important;
    margin-bottom: 16px !important;
  }

  .guru-desc {
    font-size: 0.875rem !important;
    line-height: 1.65 !important;
    margin-bottom: 20px !important;
  }

  .lineage-highlights {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
  }

  .lineage-item {
    padding: 14px 16px !important;
  }

  /* Treatments Grid */
  .treatments-section {
    padding: 70px 0 !important;
  }

  .treatments-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .treatment-img-wrap {
    height: 190px !important;
  }

  .treatment-body {
    padding: 20px 18px 16px !important;
  }

  .treatment-title {
    font-size: 1.15rem !important;
  }

  .treatment-sanskrit {
    font-size: 0.78rem !important;
  }

  .treatment-text {
    font-size: 0.84rem !important;
    margin-bottom: 16px !important;
  }

  /* Behind the Medicine */
  .medicines-banner {
    padding: 70px 0 !important;
  }

  .medicines-gallery-mosaic {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 24px !important;
  }

  .mosaic-img-1,
  .mosaic-img-2 {
    height: 160px !important;
    border-radius: 14px !important;
    border-width: 3px !important;
  }

  .medicine-points {
    gap: 16px !important;
    margin-top: 20px !important;
  }

  .point-number {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.875rem !important;
  }

  .point-title {
    font-size: 0.9375rem !important;
  }

  .point-desc {
    font-size: 0.8125rem !important;
  }

  /* Packages */
  .packages-section {
    padding: 70px 0 !important;
  }

  .packages-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .package-card {
    padding: 24px 20px !important;
    border-radius: 18px !important;
  }

  .package-name {
    font-size: 1.2rem !important;
  }

  .package-desc {
    font-size: 0.84rem !important;
  }

  /* Video Showcase */
  .video-section {
    padding: 70px 0 !important;
  }

  .video-showcase-card {
    border-radius: 16px !important;
    aspect-ratio: 16 / 9 !important;
  }

  .video-play-btn {
    width: 56px !important;
    height: 56px !important;
  }

  .video-play-btn svg {
    width: 24px !important;
    height: 24px !important;
  }

  .video-caption-bar {
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }

  .video-caption-title {
    font-size: 0.875rem !important;
    line-height: 1.3 !important;
  }

  .video-caption-sub {
    font-size: 0.72rem !important;
  }

  .video-badge {
    font-size: 0.6875rem !important;
    padding: 4px 10px !important;
  }

  .video-showcase-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .short-container-wrapper {
    margin: 0 auto !important;
    max-width: 320px !important;
  }

  .short-frame {
    max-width: 320px !important;
    border-radius: 18px !important;
  }

  .channel-info-card {
    padding: 20px 18px !important;
    border-radius: 16px !important;
  }

  .channel-action-btns {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .channel-action-btns .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Testimonials */
  .testimonials-section {
    padding: 70px 0 !important;
  }

  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .testimonial-card {
    padding: 24px 20px !important;
    border-radius: 18px !important;
  }

  .testimonial-quote {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
    margin-bottom: 18px !important;
  }

  /* FAQ */
  .faq-section {
    padding: 70px 0 !important;
  }

  .faq-accordion {
    gap: 12px !important;
  }

  .faq-question {
    padding: 16px 18px !important;
    font-size: 0.95rem !important;
    gap: 12px !important;
  }

  .faq-answer {
    padding: 0 18px !important;
  }

  .faq-item.active .faq-answer {
    padding-bottom: 16px !important;
  }

  .faq-answer p {
    font-size: 0.875rem !important;
    line-height: 1.6 !important;
  }

  /* Contact & Map */
  .contact-section {
    padding: 70px 0 50px !important;
  }

  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .contact-info-panel {
    padding: 28px 20px !important;
    border-radius: 18px !important;
  }

  .contact-info-title {
    font-size: 1.5rem !important;
  }

  .contact-info-subtitle {
    font-size: 0.875rem !important;
    margin-bottom: 24px !important;
  }

  .contact-detail-item {
    gap: 12px !important;
  }

  .contact-detail-value {
    font-size: 0.875rem !important;
  }

  .contact-form-card {
    padding: 24px 18px !important;
    border-radius: 18px !important;
  }

  .form-title {
    font-size: 1.45rem !important;
  }

  .form-subtitle {
    font-size: 0.84rem !important;
    margin-bottom: 20px !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .form-group.full {
    grid-column: span 1 !important;
  }

  .form-label {
    font-size: 0.8125rem !important;
    margin-bottom: 6px !important;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px !important; /* Prevents auto-zoom in mobile browsers */
    padding: 12px 14px !important;
  }

  .form-submit-btn {
    padding: 14px 18px !important;
    font-size: 0.9375rem !important;
  }

  .form-trust-note {
    font-size: 0.72rem !important;
    gap: 8px !important;
    text-align: center !important;
  }

  /* Footer */
  .site-footer {
    padding: 50px 0 24px !important;
  }

  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding-bottom: 40px !important;
  }

  .site-footer .footer-top > div:first-child {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-footer .footer-brand-logo {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-since-wrap {
    justify-content: center !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 8px !important;
  }



  /* Subpage Grids & Hero Overrides */
  .hero-bg-img {
    transform: none !important;
    max-width: 100% !important;
  }

  .timeline-grid,
  .process-grid,
  .gallery-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .gallery-card-item {
    height: 260px !important;
  }

  .gallery-card-item img {
    object-position: center top !important;
  }

  .gallery-card-overlay {
    padding: 16px !important;
  }

  .gallery-card-title {
    font-size: 0.95rem !important;
  }

  .gallery-filters {
    gap: 8px !important;
    margin-bottom: 28px !important;
  }

  .gallery-filter-btn {
    padding: 8px 16px !important;
    font-size: 0.78rem !important;
  }

  .transit-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .inauguration-archive-section {
    padding: 60px 0 70px !important;
  }

  .inauguration-card-body {
    padding: 16px 14px 18px !important;
  }

  .inauguration-card-title {
    font-size: 1.05rem !important;
  }
}
