/* ===================================================================
   Responsive Stylesheet — Complete Mobile-First Overhaul
   Breakpoints: 1024px, 992px, 768px, 480px, 360px
   =================================================================== */

/* ===== 1024px — Large Tablets / Small Desktops ===== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.8rem;
  }
  
  .hero-grid, 
  .about-intro-grid,
  .contact-grid {
    gap: 40px;
  }
  
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

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

  .cta-section h2 {
    font-size: 2rem;
  }
}

/* ===== 992px — Mobile Navigation Drawer ===== */
@media (max-width: 992px) {
  /* Header & Mobile Navigation */
  header {
    top: 12px;
    width: calc(100% - 24px);
    border-radius: 30px;
  }
  
  header.scrolled {
    top: 8px;
  }

  .nav-container {
    padding: 10px 16px;
  }

  header.scrolled .nav-container {
    padding: 8px 16px;
  }

  .menu-toggle {
    display: flex;
    z-index: 1001;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    height: 100dvh;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.08);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 40px;
    z-index: 1000;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-item {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-menu.active .nav-item {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
  .nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.15s; }
  .nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.2s; }
  .nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.25s; }
  .nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.3s; }
  .nav-menu.active .nav-item:nth-child(6) { transition-delay: 0.35s; }
  .nav-menu.active .nav-item:nth-child(7) { transition-delay: 0.4s; }
  .nav-menu.active .nav-item:nth-child(8) { transition-delay: 0.45s; }
  .nav-menu.active .nav-item:nth-child(9) { transition-delay: 0.5s; }
  .nav-menu.active .nav-item:nth-child(10) { transition-delay: 0.55s; }
  
  .nav-item a {
    font-size: 1.1rem;
    padding: 10px 0;
    display: block;
  }
  
  .nav-cta {
    width: 100%;
    text-align: center;
    margin-top: 10px;
  }

  /* Carousel */
  .carousel-container {
    max-width: 100%;
    height: 450px;
  }

  /* Video grid — 2 columns on tablet */
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== 768px — Tablets ===== */
@media (max-width: 768px) {
  /* Reduce section padding globally */
  .legacy-showcase,
  .about-intro,
  .expertise,
  .research-highlights,
  .publications-section,
  .awards-premium,
  .gallery-section,
  .articles-section,
  .media-section,
  .faq-section {
    padding: 60px 0;
  }

  .contact-section {
    padding: 40px 0 !important;
  }

  .container {
    padding: 0 16px;
  }

  /* Hero adjustments */
  .hero {
    padding-top: 110px;
    padding-bottom: 50px;
    min-height: auto;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-statement {
    border-left: none;
    border-top: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    padding: 16px 0;
    font-size: 1.1rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image-wrapper {
    order: -1;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .badge-1 {
    left: -10px;
  }
  
  .badge-2 {
    right: -10px;
  }

  .badge-floating {
    padding: 10px 18px;
    border-radius: 12px;
    white-space: nowrap;
  }

  .badge-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .badge-title {
    font-size: 0.7rem;
  }

  .badge-desc {
    font-size: 0.82rem;
  }

  /* Grid Layouts — Stack everything */
  .showcase-grid,
  .about-intro-grid,
  .expertise-grid,
  .research-grid,
  .publications-grid,
  .video-grid,
  .contact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Publications grid fix — prevent overflow from minmax(350px) */
  .publications-grid {
    grid-template-columns: 1fr;
  }

  /* Articles grid fix — prevent overflow from minmax(350px) */
  .articles-grid {
    grid-template-columns: 1fr;
  }

  /* Awards grid fix */
  .awards-grid {
    grid-template-columns: 1fr;
  }

  /* Expertise grid fix — prevent overflow from minmax(320px) */
  .expertise-grid {
    grid-template-columns: 1fr;
  }
  
  .about-intro-img {
    max-width: 400px;
    margin: 0 auto;
  }

  .about-intro-content h3 {
    font-size: 1.5rem;
  }

  /* About Intro Philosophies — stack on mobile */
  .about-philosophies {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Timeline */
  .timeline-orb {
    display: none;
  }

  .timeline-section {
    padding: 60px 0;
  }

  .timeline-container {
    margin-top: 40px;
  }

  .timeline-container::before {
    left: 24px;
    transform: none;
  }
  
  .timeline-container::after {
    display: none;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 15px;
  }
  
  /* Reposition node to left side */
  .timeline-left .timeline-node,
  .timeline-right .timeline-node {
    left: 4px;
    right: auto;
    top: 20px;
    width: 40px;
    height: 40px;
  }

  .timeline-node-icon {
    font-size: 1rem;
  }
  
  .timeline-right {
    left: 0%;
  }

  /* All arrows point to left on mobile */
  .timeline-left .timeline-content::before,
  .timeline-right .timeline-content::before {
    right: auto;
    left: -8px;
    border-right: none;
    border-top: none;
    border-left: 1px solid rgba(226, 232, 240, 0.5);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transform: rotate(45deg);
  }

  .timeline-step-num {
    font-size: 3rem;
  }

  .timeline-content {
    padding: 24px 20px 20px;
  }

  /* Typography */
  .section-title {
    font-size: 1.85rem;
  }
  
  .section-header {
    margin-bottom: 40px;
  }

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

  footer {
    padding: 50px 0 24px;
  }

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

  .footer-statement {
    font-size: 1rem;
  }

  /* Contact Form */
  .contact-form-panel {
    padding: 24px;
  }

  .contact-grid {
    gap: 24px;
  }

  /* CTA Section */
  .cta-section {
    padding: 50px 0;
  }

  .cta-section h2 {
    font-size: 1.75rem;
  }

  .cta-section p {
    font-size: 0.95rem;
  }

  /* Gallery — 2 columns on tablet */
  .masonry-grid {
    columns: 2 200px;
    column-gap: 16px;
  }

  .gallery-item {
    margin-bottom: 16px;
  }

  /* Lightbox */
  .lightbox-content {
    max-width: 95%;
    max-height: 75vh;
  }

  .lightbox-content img {
    max-height: 70vh;
  }

  .lightbox-close {
    top: -36px;
    font-size: 1.6rem;
  }

  /* FAQ */
  .faq-question {
    font-size: 1rem;
    padding: 16px 0;
  }

  .faq-container {
    margin-top: 24px;
  }

  /* Filters */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin-bottom: 24px;
  }
  
  .search-box {
    max-width: none;
  }
  
  .gallery-section {
    overflow: visible;
  }

  .filter-tabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 12px 4px;
    gap: 8px;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .filter-tab {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  /* Carousel */
  .carousel-container {
    height: 350px;
    border-radius: 16px;
  }

  .carousel-btn {
    opacity: 1;
    pointer-events: auto;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .prev-btn {
    left: 12px;
  }

  .next-btn {
    right: 12px;
  }

  /* Image slider section */
  .image-slider-section {
    padding: 20px 0 50px;
  }

  /* Showcase cards */
  .showcase-img {
    height: 200px;
  }

  /* Research cards */
  .research-card-header {
    padding: 20px;
  }

  .research-card-body {
    padding: 20px;
  }

  .research-card-title {
    font-size: 1.25rem;
  }

  /* Publication cards */
  .pub-card {
    padding: 20px;
  }

  /* Article cards */
  .article-card-body {
    padding: 20px;
  }

  .article-title {
    font-size: 1.15rem;
  }

  /* Award cards */
  .award-card-img {
    height: 180px;
  }

  .award-card-body {
    padding: 20px;
  }

  /* Map iframe */
  .media-section iframe {
    height: 300px !important;
  }

  /* WhatsApp widget */
  .whatsapp-float {
    width: 52px;
    height: 52px;
    bottom: 20px;
    right: 16px;
    font-size: 26px;
  }

  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }

  /* Loader */
  .loader-brand {
    font-size: 1.4rem;
  }

  .loader-sub {
    font-size: 0.65rem;
    letter-spacing: 2px;
  }

  .loader-progress {
    width: 120px;
  }

  /* Inner page banners */
  .about-intro[style*="padding-top: 140px"] {
    padding-top: 100px !important;
  }

  /* Video cards */
  .video-info {
    padding: 12px;
  }

  .video-title {
    font-size: 0.85rem;
  }

  /* Scroll-to-top responsive */
  .scroll-to-top {
    bottom: 80px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* ===== 480px — Small Phones ===== */
@media (max-width: 480px) {
  .hero {
    padding-top: 100px;
    padding-bottom: 40px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.75rem;
  }

  .hero-taglines {
    font-size: 0.9rem;
  }

  .hero-statement {
    font-size: 1rem;
    padding: 12px 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .hero-image-wrapper {
    max-width: 280px;
  }

  .badge-floating {
    padding: 8px 14px;
    border-radius: 10px;
    gap: 10px;
    white-space: nowrap;
  }

  .badge-icon {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }

  .badge-title {
    font-size: 0.62rem;
  }

  .badge-desc {
    font-size: 0.75rem;
  }

  .badge-1 {
    left: -5px;
    top: 5%;
  }

  .badge-2 {
    right: -5px;
    bottom: 10%;
  }

  /* Header logo */
  .logo-title {
    font-size: 1.2rem;
  }
  
  .logo-sub {
    font-size: 0.6rem;
    letter-spacing: 1px;
  }

  /* Section typography */
  .section-title {
    font-size: 1.55rem;
  }

  .section-subtitle {
    font-size: 0.75rem;
    letter-spacing: 1.5px;
  }

  .section-header {
    margin-bottom: 30px;
  }

  /* Carousel */
  .carousel-container {
    height: 220px;
    border-radius: 14px;
    border-width: 2px;
  }

  .carousel-dots {
    bottom: 12px;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .prev-btn {
    left: 8px;
  }

  .next-btn {
    right: 8px;
  }

  /* Showcase */
  .showcase-img {
    height: 180px;
  }

  .showcase-content {
    padding: 16px;
  }

  .showcase-title {
    font-size: 1.1rem;
  }

  .showcase-desc {
    font-size: 0.88rem;
  }

  /* About Intro */
  .about-intro {
    padding: 40px 0;
  }

  .about-intro-content h3 {
    font-size: 1.35rem;
  }

  .about-intro-content p {
    font-size: 0.95rem;
  }

  .about-intro-img {
    max-width: 100%;
    border-width: 4px;
  }

  /* Expertise cards */
  .expertise-card {
    padding: 28px 20px;
  }

  .expertise-icon-box {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    border-radius: 12px;
    margin-bottom: 16px;
  }

  .expertise-title {
    font-size: 1.2rem;
  }

  /* Timeline */
  .timeline-item {
    padding-left: 60px;
    padding-right: 10px;
    margin-bottom: 30px;
  }

  .timeline-container::before {
    left: 20px;
  }

  .timeline-left .timeline-node,
  .timeline-right .timeline-node {
    left: 2px;
    width: 36px;
    height: 36px;
  }

  .timeline-node-icon {
    font-size: 0.85rem;
  }

  .timeline-content {
    padding: 20px 16px 16px;
  }

  .timeline-title {
    font-size: 1.1rem;
  }

  .timeline-date {
    font-size: 0.75rem;
    padding: 4px 12px;
  }

  .timeline-desc {
    font-size: 0.85rem;
  }

  .timeline-step-num {
    font-size: 2.5rem;
  }

  .timeline-img {
    max-height: 160px;
  }

  /* Research cards */
  .research-card-header {
    padding: 16px;
  }

  .research-card-body {
    padding: 16px;
  }

  .research-card-title {
    font-size: 1.15rem;
  }

  /* Publication cards */
  .pub-card {
    padding: 16px;
  }

  .pub-title {
    font-size: 1.05rem;
  }

  .pub-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Awards */
  .awards-premium {
    padding: 50px 0;
  }

  .award-card-img {
    height: 160px;
  }

  .award-card-body {
    padding: 16px;
  }

  .award-card-title {
    font-size: 1.1rem;
  }

  /* Gallery — 2 columns */
  .masonry-grid {
    columns: 2;
    column-gap: 12px;
  }

  .gallery-item-info {
    padding: 12px;
  }

  /* Articles */
  .article-card-img {
    height: 180px;
  }

  .article-card-body {
    padding: 16px;
  }

  .article-title {
    font-size: 1.05rem;
  }

  /* FAQ */
  .faq-question {
    font-size: 0.92rem;
    padding: 14px 0;
    gap: 12px;
  }

  .faq-answer p {
    font-size: 0.88rem;
    padding-bottom: 14px;
  }

  .faq-icon {
    font-size: 1rem;
    flex-shrink: 0;
  }

  /* Contact */
  .contact-form-panel {
    padding: 20px;
  }

  .contact-form-panel h3 {
    font-size: 1.25rem !important;
  }

  .clinic-card {
    padding: 20px;
  }

  .clinic-name {
    font-size: 1.2rem;
  }

  .clinic-detail-text p {
    font-size: 0.88rem;
  }

  .form-control {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .form-group label {
    font-size: 0.78rem;
  }

  /* Map */
  .media-section iframe {
    height: 250px !important;
  }

  /* CTA Section */
  .cta-section {
    padding: 40px 0;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  .cta-section p {
    font-size: 0.88rem;
  }

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

  .footer-title {
    font-size: 0.95rem;
    margin-bottom: 16px;
  }

  .footer-desc {
    font-size: 0.85rem;
  }

  .footer-bottom p {
    font-size: 0.72rem;
  }

  .footer-social-links a {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .footer-statement {
    font-size: 0.92rem;
  }

  /* Lightbox */
  .lightbox-content {
    max-width: 98%;
    padding: 0 8px;
  }

  .lightbox-content img {
    max-height: 60vh;
    border-radius: 6px;
  }

  .lightbox-close {
    top: -32px;
    font-size: 1.4rem;
  }

  .lightbox-caption {
    font-size: 0.85rem;
    bottom: -32px;
  }

  /* WhatsApp */
  .whatsapp-float {
    width: 48px;
    height: 48px;
    bottom: 16px;
    right: 12px;
  }

  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }

  /* Loader */
  .loader-brand {
    font-size: 1.25rem;
  }

  .loader-sub {
    font-size: 0.6rem;
    letter-spacing: 1.5px;
  }

  .loader-pulse {
    width: 90px;
    height: 45px;
  }

  .loader-progress {
    width: 100px;
  }

  /* Video cards */
  .video-grid {
    grid-template-columns: 1fr;
  }

  /* Scroll-to-top responsive */
  .scroll-to-top {
    bottom: 72px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
}

/* ===== 360px — Very Small Phones ===== */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.35rem;
  }

  .logo-title {
    font-size: 1.05rem;
  }

  .logo-sub {
    font-size: 0.55rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .hero-image-wrapper {
    max-width: 240px;
  }

  /* Hide floating badges on very small screens */
  .badge-floating {
    display: none;
  }

  .carousel-container {
    height: 180px;
    border-radius: 12px;
  }

  .timeline-item {
    padding-left: 52px;
  }

  .timeline-container::before {
    left: 16px;
  }

  .timeline-left .timeline-node,
  .timeline-right .timeline-node {
    left: 0px;
    width: 32px;
    height: 32px;
  }

  .timeline-node-icon {
    font-size: 0.75rem;
  }

  .timeline-step-num {
    font-size: 2rem;
  }

  .contact-form-panel {
    padding: 16px;
  }

  .clinic-card {
    padding: 16px;
  }

  .filter-tab {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .premium-carousel {
    width: 94%;
    aspect-ratio: 4 / 5;
    height: auto;
    max-height: none;
    min-height: 400px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .premium-carousel {
    width: 92%;
    aspect-ratio: 3 / 4;
    min-height: 350px;
  }
}
