/* ===================================
   RESPONSIVE CSS - Bali Clinic
   Mobile-First Responsive Styles
   =================================== */

/* ===================================
   Desktop/Tablet - 1024px and below
   =================================== */

@media (max-width:1220px) {
    .logo-text {
        display: none;
    }
}

@media (max-width: 1024px) {

    /* Hero & Content Sections */
    .hero-content,
    .features-content,
    .appointment-content {
        grid-template-columns: 1fr;
    }

    .hero-slide {
        min-height: auto;
        padding: 60px 0;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* New Sections */
    .legacy-content,
    .why-choose-content,
    .location-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .legacy-image,
    .why-image,
    .location-map {
        order: -1;
    }

    /* Page-specific layouts */
    .story-content,
    .service-detail-item,
    .doctor-profile-content,
    .appointment-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .service-detail-item.reverse,
    .doctor-profile-content.reverse {
        direction: ltr;
    }

    .appointment-info-sidebar {
        order: -1;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 80px;
    }

    .timeline-year {
        flex: 0 0 auto;
        position: absolute;
        left: 0;
    }

    .timeline-year::after {
        left: 30px !important;
        right: auto !important;
    }

    /* Founder Section */
    .founder-content {
        grid-template-columns: 1fr;
    }

    .founder-image {
        max-width: 400px;
        margin: 0 auto;
        position: relative;
        top: 0;
    }
}

/* ===================================
   Tablet/Mobile Navigation - 991px and below
   =================================== */
@media (max-width: 991px) {

    /* Header & Navigation */
    .main-nav {
        display: none;
    }

     .logo-text {
        display: block;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .logo img {
        width: 65px;
        height: 65px;
    }

    .logo-text {
        font-size: 24px;
    }
}

/* ===================================
   Tablet - 768px and below
   =================================== */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 20px;
    }

    /* Top Bar */
    .top-bar {
        display: none;
    }

    .contact-info {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .contact-info span {
        display: block;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .social-links {
        display: flex;
        justify-content: center;
    }

    .logo img {
        width: 60px;
        height: 60px;
    }

    .logo-text {
        font-size: 22px;
    }

    /* Hero Section */
    .hero-slide {
        min-height: auto;
        padding: 40px 0 60px 0;
    }

    .hero-content-centered h1 {
        font-size: 36px;
    }

    .hero-content-centered p {
        font-size: 16px;
    }

    .hero-text h1 {
        font-size: 36px;
    }

    .hero-text h1::after {
        width: 60px;
        height: 4px;
        margin-top: 16px;
    }

    .hero-text p {
        font-size: 16px;
        max-width: 100%;
    }

    .hero-image img {
        height: 400px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        display: block;
        margin-bottom: 10px;
    }

    .hero-badge {
        bottom: 10px;
        right: 10px;
        padding: 20px 24px;
        border: 4px solid white;
    }

    .badge-number {
        font-size: 40px;
    }

    .hero-contact {
        padding: 20px 24px;
        max-width: 100%;
    }

    .header-actions .btn.btn-primary {
        display: none;
    }

    /* Swiper Navigation */
    .heroSwiper .swiper-button-next,
    .heroSwiper .swiper-button-prev {
        width: 40px;
        height: 40px;
    }

    .heroSwiper .swiper-button-next:after,
    .heroSwiper .swiper-button-prev:after {
        font-size: 16px;
    }

    .heroSwiper .swiper-pagination {
        bottom: 20px;
    }

    .heroSwiper .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }

    .heroSwiper .swiper-pagination-bullet-active {
        width: 24px;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    /* Section Headers */
    .section-header h2,
    .services-overview h2,
    .test-categories h2,
    .gallery h2,
    .latest-news h2,
    .legacy-text h2,
    .why-text h2,
    .location-info h2,
    .legacy-content-centered h2,
    .story-text h2 {
        font-size: 36px;
    }

    /* Stats */
    .stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-item {
        justify-content: center;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Categories Grid */
    .categories-grid {
        grid-template-columns: 1fr;
    }

    /* Gallery Grid */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item {
        height: 250px;
    }

    /* News Grid */
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* CTA Section */
    .cta-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .btn {
        width: 100%;
    }

    /* Newsletter */
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        min-width: 100%;
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form .btn {
        width: 100%;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 10px;
    }

    /* Page Header / Breadcrumbs */
    .page-header {
        padding: 100px 0 70px;
        background-attachment: scroll;
    }

    .page-header h1 {
        font-size: 40px;
    }

    .page-header p {
        font-size: 18px;
    }

    .breadcrumb {
        padding: 10px 24px;
        font-size: 14px;
    }

    .legacy-content-centered p {
        font-size: 16px;
    }

    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }

    .appointment-form-container,
    .contact-form-side {
        padding: 32px 24px;
    }

    .form-header h2,
    .form-container h3,
    .doctor-profile-info h3 {
        font-size: 36px;
    }

    /* Doctor Profiles */
    .doctor-profile-content {
        grid-template-columns: 1fr;
        padding: 40px 24px;
        gap: 20px;
    }


    .doctors-grid {
        grid-template-columns: 1fr;
    }

    /* Emergency Box */
    .emergency-box {
        flex-direction: column;
        text-align: center;
        padding: 36px 24px;
    }

    .emergency-action {
        width: 100%;
    }

    .emergency-action .btn {
        width: 100%;
    }

    /* Founder Section */
    .founder-quote {
        padding: 24px;
    }

    .founder-quote p {
        font-size: 17px;
    }

    .founder-bio h3,
    .doctor-profile-info h3 {
        font-size: 24px;
    }

    .founder-legacy {
        padding: 24px;
    }

    /* Statistics Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Mission, Vision & Values Tabs */
    .mv-tab {
        padding: 15px 18px;
    }

    .mv-tabs {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    /* Service Detail Items */
    .service-detail-item {
        gap: 40px;
        margin-bottom: 60px;
        padding-bottom: 60px;
    }

    /* Appointment Grid */
    .appointment-grid {
        gap: 40px;
    }

    /* Contact Methods */
    .contact-methods {
        gap: 24px;
    }

    .service-detail-image {
        position: relative;
    }

}

/* ===================================
   Mobile AOS Animation Override
   Only fade-up animations on mobile
   =================================== */
@media (max-width: 768px) {

    /* Override all AOS animations to only use fade-up on mobile */
    [data-aos='fade-right'],
    [data-aos='fade-left'],
    [data-aos='fade-down'],
    [data-aos='zoom-in'],
    [data-aos='zoom-out'],
    [data-aos='flip-left'],
    [data-aos='flip-right'],
    [data-aos='flip-up'],
    [data-aos='flip-down'],
    [data-aos='slide-up'],
    [data-aos='slide-down'],
    [data-aos='slide-left'],
    [data-aos='slide-right'] {
        transform: translateY(0) !important;
    }

    /* Force fade-up animation for all elements on mobile */
    [data-aos].aos-animate {
        transform: translateY(0) !important;
    }

    [data-aos]:not(.aos-animate) {
        transform: translateY(30px) !important;
        opacity: 0 !important;
    }

    /* Ensure horizontal transforms don't apply on mobile */
    [data-aos='fade-right'].aos-animate,
    [data-aos='fade-left'].aos-animate {
        transform: translateY(0) translateX(0) !important;
    }
}

/* ===================================
   Mobile - 480px and below
   =================================== */
@media (max-width: 480px) {

    /* Typography */
    .hero-content-centered h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .hero-text h1 {
        font-size: 28px;
        line-height: 1.2;
    }

    .section-header h2,
    .services-overview h2,
    .test-categories h2,
    .gallery h2,
    .latest-news h2,
    .legacy-content-centered h2,
    .why-text h2,
    .cta-text h2,
    .story-text h2 {
        font-size: 28px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .page-header p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .breadcrumb {
        padding: 8px 20px;
        font-size: 13px;
        gap: 8px;
    }

    /* Buttons */
    .btn {
        padding: 14px 28px;
        font-size: 14px;
    }

    .hero-text .btn {
        display: block;
        margin-bottom: 10px;
        width: 100%;
    }

    /* Hero Contact */
    .hero-contact {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .hero-contact i {
        font-size: 28px;
    }

    .hero-contact .phone {
        font-size: 20px;
    }

    /* Hero Badge */
    .hero-badge {
        padding: 16px 20px;
    }

    .badge-number {
        font-size: 32px;
    }

    .badge-text {
        font-size: 12px;
    }

    /* Service Cards */
    .service-card,
    .category-card {
        padding: 28px 20px;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-box h3 {
        font-size: 40px;
    }

    .stat-box p {
        font-size: 15px;
    }

    /* Gallery Items */
    .gallery-item {
        height: 220px;
    }

    /* News Cards */
    .news-card img {
        height: 200px;
    }

    .news-content {
        padding: 20px;
    }

    .news-content h3 {
        font-size: 18px;
    }

    /* Footer */
    .footer-top {
        padding: var(--spacing-lg) 0;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    /* Forms */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 14px;
    }

    .appointment-form-container,
    .contact-form-side {
        padding: 24px 20px;
    }

    /* Info Cards */
    .info-card {
        padding: 24px 20px;
    }

    /* Emergency Box */
    .emergency-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .emergency-content h3 {
        font-size: 24px;
    }

    /* Timeline */
    .timeline-item {
        padding-left: 60px;
    }

    .timeline-year {
        font-size: 24px;
    }

    .timeline-content {
        padding: 20px;
    }

    .timeline-content h3 {
        font-size: 18px;
    }

    /* Contact Methods */
    .method-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .method-content h4 {
        font-size: 16px;
    }

    .method-content a {
        font-size: 16px;
    }

    /* Social Icons */
    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* Scroll to Top */
    .scroll-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }

    /* Features & Why Features */
    .why-features,
    .features-list {
        gap: 16px;
    }

    .feature-icon,
    .location-icon,
    .legacy-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .feature-content h4,
    .location-item h4,
    .legacy-item h4 {
        font-size: 16px;
    }

    /* Doctor Cards */
    .doctor-card {
        border-radius: var(--radius-md);
    }

    .doctor-info {
        padding: 20px;
    }

    .doctor-info h3 {
        font-size: 20px;
    }

    /* Founder Year Badge */
    .founder-year {
        padding: 12px 20px;
        bottom: 16px;
        right: 16px;
    }

    .founder-year .year {
        font-size: 24px;
    }

    /* Legacy Items */
    .legacy-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    /* Service Detail */
    .service-icon-large {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .service-detail-content h3 {
        font-size: 24px;
    }

    .service-detail-content>p,
    .service-features li {
        font-size: 15px;
    }
}


/* ===================================
   Services Page Responsive Styles
   =================================== */

@media (max-width: 1024px) {
    .services-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-features-grid {
        grid-template-columns: 1fr;
    }

    .mobile-dropdown-menu {
        padding: 0 !important;
    }
}

@media (max-width: 768px) {
    .services-cards-grid {
        grid-template-columns: 1fr;
    }


    .doctors-page .doctor-profile {
        padding: var(--spacing-sm)
    }

    .services-detail {
        padding: var(--spacing-md);
    }

    .service-overview-card {
        padding: 32px 24px;
    }

    .service-card-icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .service-highlights {
        padding: 24px 20px;
    }

    .service-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-item {
        padding: 10px 14px;
    }

    .feature-item span {
        font-size: 14px;
    }

    .service-doctor-info {
        padding: 20px;
    }

    .doctor-mini img {
        width: 60px;
        height: 60px;
    }

    .doctor-mini strong {
        font-size: 16px;
    }

    .doctor-mini span {
        font-size: 12px;
    }

    .emergency-contact-box {
        flex-direction: column;
        padding: 24px;
        text-align: center;
        align-items: center;
    }

    .emergency-icon-large {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .emergency-number {
        font-size: 26px;
    }

    .why-services-grid {
        grid-template-columns: 1fr;
    }

    .why-service-card {
        padding: 32px 24px;
    }

    .why-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}




/* ===================================
   Modern Responsive Enhancements
   =================================== */

/* Improved Mobile Typography */
@media (max-width: 768px) {

    .section-header h2,
    .hero-content-centered h1,
    .legacy-content-centered h2,
    .why-text h2 {
        font-size: clamp(32px, 8vw, 48px);
        line-height: 1.2;
    }

    .section-header p,
    .hero-content-centered p,
    .legacy-content-centered p {
        font-size: clamp(16px, 4vw, 18px);
    }

    /* Better Button Sizing */
    .btn {
        padding: 14px 28px;
        font-size: 14px;
        width: 100%;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .btn {
        width: 100%;
    }

    /* Improved Card Spacing */
    .service-card,
    .doctor-card {
        padding: 32px 24px;
    }

    .service-icon,
    .service-card .icon {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }

    .service-icon i {
        font-size: 32px;
    }

    /* Better Grid Layouts */
    .services-grid,
    .doctors-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Enhanced Features */
    .why-feature {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
    }

    .feature-icon {
        margin: 0 auto 16px;
    }

    /* Mobile-Friendly Tables */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .service-card h3,
    .doctor-info h3 {
        font-size: 20px;
    }

    .section-label {
        font-size: 10px;
        padding: 8px 18px;
    }

    /* Stack everything vertically */
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-content {
        flex-direction: column;
    }

    .newsletter-form {
        min-width: 100%;
        flex-direction: column;
    }

    .newsletter-form input {
        width: 100%;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-slide {
        min-height: 60vh;
        padding: 40px 0;
    }

    .hero-content-centered h1 {
        font-size: 36px;
    }

    .hero-content-centered p {
        font-size: 16px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    .service-card,
    .doctor-card,
    .news-card {
        transition: transform 0.2s ease;
    }

    .service-card:active,
    .doctor-card:active,
    .news-card:active {
        transform: scale(0.98);
    }

    .btn:active {
        transform: scale(0.95);
    }

    /* Remove hover effects on touch devices */
    .service-card::after,
    .doctor-card::before {
        display: none;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Crisper borders and shadows */
    .service-card,
    .doctor-card,
    .btn {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Reduced Motion Preference */
@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;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* This can be expanded for future dark mode support */
}

/* Print Styles */
@media print {

    .top-bar,
    .main-header,
    .hero-slider,
    .contact-cta,
    .main-footer,
    .scroll-to-top,
    .mobile-menu {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
    }

    a {
        text-decoration: underline;
    }

    .service-card,
    .doctor-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}


@media (max-width: 480px) {

    .service-overview-card h3,
    .doctor-profile-info h3 {
        font-size: 20px;
    }

    .service-card-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .service-icon-large {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }

    .service-category {
        font-size: 11px;
    }

    .highlight-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .highlight-item i {
        font-size: 20px;
    }

    .highlight-item h4 {
        font-size: 16px;
    }

    .service-info-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 20px;
    }

    .service-badge {
        padding: 10px 16px;
    }

    .service-badge span {
        font-size: 12px;
    }

    .emergency-number {
        font-size: 22px;
    }
}


/* Service Page Sidebar Layout Responsive */
@media (max-width: 1024px) {
    .service-layout-container {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }

    .service-main-content {
        padding: 35px;
    }

    .sidebar-widget {
        padding: 25px;
    }

    .key-areas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .service-layout-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .service-sidebar {
        position: static;
        order: 2;
    }

    .service-main-content {
        padding: 30px 25px;
        order: 1;
    }

    .service-image-header {

        margin-bottom: 30px;
    }

    .service-content-body h3 {
        font-size: 28px;
    }

    .service-highlights {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .service-features-grid {
        grid-template-columns: 1fr;
    }

    .key-areas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-widget {
        padding: 25px 20px;
    }
}

@media (max-width: 480px) {
    .packages-grid-clean {
        grid-template-columns: 1fr;
    }

    .package-intro h2 {
        font-size: 28px;
    }

    .service-page-with-sidebar {
        padding: var(--spacing-lg) 0;
    }

    .key-areas-grid {
        grid-template-columns: 1fr;
    }

    .service-main-content {
        padding: 25px 20px;
        border-radius: var(--radius-md);
    }

    .service-image-header {
        margin-bottom: 25px;
        border-radius: var(--radius-sm);
    }

    .service-content-body h3 {
        font-size: 24px;
    }

    .service-content-body h4 {
        font-size: 20px;
    }

    .service-icon-large {
        width: 60px;
        height: 60px;
    }

    .service-icon-large i {
        font-size: 28px;
    }

    .highlight-item {
        padding: 20px;
    }

    .sidebar-widget {
        border-radius: var(--radius-md);
    }

    .sidebar-package-card {
        flex-direction: column;
        text-align: center;
    }

    .sidebar-package-icon {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .mv-tabs {
        display: block;
    }

    .mv-tab-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
        padding: 10px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .mv-tab {
        justify-content: center;
        padding: 13px 8px;
        border-left: 0;
        border-bottom: 3px solid transparent;
        text-align: center;
    }

    .mv-tab.is-active {
        border-left-color: transparent;
        border-bottom-color: var(--primary-color);
    }

    .mv-panel {
        padding: 36px 26px 42px;
    }
}