@media (max-width: 992px) {

    /* Hiding Desktop Elements */
    .desktop-nav {
        display: none !important;
    }

    .top-left .email-link {
        display: none;
    }

    /* Container Padding adjustment for mobile */
    .container,
    .header-inner {
        padding: 0 20px !important;
    }

    /* Showing Mobile Elements */
    .mobile-toggle {
        display: block !important;
        font-size: 32px;
        /* Enlarge Hamburger */
        cursor: pointer;
        padding: 5px;
        /* Increase clickable area */
    }

    /* Shrink Mobile Logo */
    .logo {
        font-size: 22px !important;
    }

    /* RE-ENABLE Mobile Menu Elements */
    #mobile-menu-overlay,
    #mobile-menu-container {
        display: block !important;
    }

    /* MOBILE MENU OVERLAY - Higher z-index to cover header */
    #mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 10001;
        /* Above header and top bar */
        opacity: 0;
        visibility: hidden;
        display: block !important;
        transition: all 0.3s ease;
    }

    #mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* MOBILE MENU CONTAINER - Highest z-index */
    #mobile-menu-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100%;
        background-color: var(--color-white);
        z-index: 10002;
        /* Highest - above everything */
        transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
        padding: 70px 20px 20px 20px;
        overflow-y: auto;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
        visibility: visible;
        border-left: 3px solid var(--color-primary);
    }

    #mobile-menu-container.active {
        right: 0;
    }

    /* Close Button - Bordo X in top-right */
    .mobile-close-btn {
        position: absolute;
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #fff;
        background-color: var(--color-primary);
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(128, 0, 0, 0.3);
    }

    .mobile-close-btn:hover {
        background-color: #5a0000;
        transform: rotate(90deg);
    }

    /* Mobile Menu Items Wrapper */
    .mobile-nav ul {
        display: flex;
        flex-direction: column;
    }

    .mobile-nav li {
        border-bottom: 1px solid #f0f0f0;
    }

    /* REVISION: Vertical Stack Layout for Dropdowns */
    .has-dropdown {
        display: flex;
        flex-direction: column !important;
        /* STRICT COLUMN */
        align-items: stretch !important;
    }

    /* Row 1: Header (Link + Arrow) */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-right: 10px;
        /* Space for arrow */
    }

    .mobile-nav a {
        display: block;
        padding: 18px 5px;
        font-family: var(--font-serif);
        font-size: 18px;
        color: #333;
        font-weight: 600;
        flex: 1;
        /* Take up space */
    }

    .mobile-nav a:hover,
    .mobile-nav a.active-page {
        /* Active State */
        color: var(--color-primary);
    }

    /* Active Page Border */
    .mobile-nav a.active-page {
        border-left: 4px solid var(--color-primary);
        /* Side accent instead of bottom for mobile list */
        padding-left: 15px;
        background-color: #fff5f5;
    }

    /* Dropdown Icon */
    .dropdown-toggle-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        color: var(--color-primary);
        cursor: pointer;
        transition: transform 0.3s ease;
        background: transparent !important;
        margin: 0;
    }

    .dropdown-toggle-icon.active {
        transform: rotate(180deg);
        background-color: transparent !important;
    }

    /* Row 2: Submenu (Directly Below) - Starts CLOSED */
    .mobile-submenu {
        width: 100%;
        display: none !important;
        /* JS Toggles this inline */
        background-color: #f9f9f9;
        padding-left: 20px;
        border-left: none;
        /* Removed border */
        margin-bottom: 10px;
    }

    /* When opened by JS click */
    .mobile-submenu.open {
        display: block !important;
    }

    .mobile-submenu li {
        border-bottom: 1px solid #eee;
    }

    .mobile-submenu a {
        font-size: 16px;
        padding: 14px 0;
        color: #555;
        font-weight: 500;
    }

    .mobile-submenu a.active-page {
        color: var(--color-primary);
        border-left: none;
        /* No heavy border for subitems */
        font-weight: 700;
        background: transparent;
    }

    .mobile-nav .nav-cta-btn {
        margin-top: 20px;
        text-align: center;
        width: 100%;
    }

    /* FOOTER RESPONSIVE */
    .footer-top .container {
        display: flex;
        /* Revert to Flex for Mobile Stack */
        flex-direction: column;
        padding: 0 20px;
    }

    .footer-col {
        width: 100%;
        margin-bottom: 30px;
    }

    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* =========================================
   PHASE 2 SECTION RESPONSIVENESS
   ========================================= */

@media (max-width: 768px) {

    /* TOP BAR: Phone left, Social right */
    .top-left .email-link {
        display: none !important;
    }

    .top-left {
        display: flex !important;
        flex: 1;
        justify-content: flex-start;
    }

    .top-right {
        display: flex !important;
        flex: 1;
        justify-content: flex-end;
        gap: 12px;
        padding-right: 15px;
        /* Move icons more to the right */
    }

    #top-bar .container {
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    /* Social Icons - Theme Compatible */
    #top-bar .social-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
        font-size: 14px;
        transition: all 0.3s ease;
    }

    #top-bar .social-icon:hover {
        background-color: var(--color-primary);
        transform: scale(1.1);
    }

    /* WhatsApp - Original Green */
    #top-bar .whatsapp-btn {
        background-color: #25D366 !important;
        color: #fff !important;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        display: flex !important;
        align-items: center;
        gap: 5px;
        transition: all 0.3s ease;
    }

    #top-bar .whatsapp-btn:hover {
        background-color: #1da851 !important;
        transform: scale(1.05);
    }

    #top-bar .whatsapp-btn i {
        font-size: 14px;
    }

    /* SECTION 1: HERO */
    .hero-content {
        width: 95%;
    }

    .hero-content h1 {
        font-size: 2rem !important;
        /* Resize for Mobile */
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 30px;
    }

    /* SECTION 2: BIOGRAPHY */
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .bio-image-wrapper {
        padding: 0;
        max-width: 350px;
        margin: 0 auto;
    }

    .bio-text {
        text-align: center;
        padding: 0 10px;
    }

    .bio-text h2::before {
        text-align: center;
        display: block;
    }

    .btn-link {
        justify-content: center;
    }

    /* SECTION 3: SPECIALTIES */
    .specialties-grid {
        grid-template-columns: 1fr;
        /* 1 Col */
    }

    .specialty-card {
        padding: 40px 20px;
    }

    /* SECTION 4: TESTIMONIALS */
    .testimonial-text {
        font-size: 1.1rem;
    }

    .google-logo-g {
        top: 20px;
        right: 20px;
    }

    /* SECTION 5: BLOG */
    .blog-grid {
        grid-template-columns: 1fr;
        /* 1 Col */
    }

    /* SECTION 6: AWARDS */
    .awards-flex {
        gap: 30px;
    }

    .award-logo {
        height: 40px;
    }
}

@media (min-width: 769px) and (max-width: 991px) {

    /* Tablet Rules */
    .hero-content h1 {
        font-size: 3rem;
    }

    .bio-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 Cols */
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* FIX: Hide Mobile Menu on Desktop Strict */
@media (min-width: 993px) {

    #mobile-menu-container,
    .mobile-toggle,
    #mobile-menu-overlay,
    .mobile-nav,
    .mobile-menu-header {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        width: 0 !important;
        height: 0 !important;
    }
}

/* ================================
   PATIENT REVIEWS SECTION MOBILE
   ================================ */

@media (max-width: 768px) {
    .patient-reviews-section {
        padding: 50px 0;
    }

    .section-header-center h2 {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .patient-reviews-slider .swiper-slide {
        padding: 0 5px;
    }

    .review-card {
        padding: 25px 20px;
        border-radius: 12px;
    }

    .review-text {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .reviews-pagination {
        margin-top: 15px !important;
    }
}

/* ================================
   AWARDS SHOWCASE - Footer Spacing
   ================================ */

.awards-showcase {
    margin-bottom: 60px;
    /* Space between awards and footer */
}

@media (max-width: 768px) {
    .awards-showcase {
        margin-bottom: 40px;
    }
}
/* =========================================
   HAKKIMDA PAGE - MOBILE RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    
    /* SECTION 1: BIOGRAPHY */
    .section-biography {
        padding: 60px 0;
    }
    
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .bio-image-wrapper {
        padding: 0;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .bio-image-container::after {
        top: 10px;
        right: -10px;
    }
    
    .bio-signature img {
        max-width: 200px;
    }
    
    .bio-text {
        padding-left: 0;
        text-align: left;
    }
    
    .bio-text h2 {
        font-size: 2rem;
    }
    
    .bio-lead {
        font-size: 1.05rem;
    }
    
    .bio-highlights {
        flex-direction: column;
        gap: 20px;
    }
    
    /* SECTION 2: TIMELINE - CRITICAL MOBILE FIX */
    .section-timeline {
        padding: 60px 0;
    }
    
    .section-timeline h2 {
        font-size: 2rem;
    }
    
    /* Move vertical line to left */
    .timeline-wrapper::before {
        left: 20px;
        transform: none;
    }
    
    /* All items to right of line */
    .timeline-item.left,
    .timeline-item.right {
        left: 0;
        width: 100%;
        text-align: left;
        padding-left: 60px;
        padding-right: 20px;
    }
    
    /* Adjust dots position for mobile */
    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 10px;
        right: auto;
    }
    
    .timeline-content {
        padding: 20px;
    }
    
    .timeline-content h3 {
        font-size: 1.4rem;
    }
    
    .timeline-content h4 {
        font-size: 1.1rem;
    }
    
    /* SECTION 3: PUBLICATIONS */
    .section-publications {
        padding: 60px 0;
    }
    
    .section-publications h2 {
        font-size: 2rem;
    }
    
    /* Grid to single column */
    .publications-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Optional: Hide publications 5-8 on mobile to save space */
    .publication-card:nth-child(n+5) {
        display: none;
    }
    
    .btn-outline {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

/* Tablet View */
@media (min-width: 769px) and (max-width: 991px) {
    
    .bio-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .publications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline-item {
        width: 50%;
    }
}

/* =========================================
   UZMANLIKLAR - MOBILE RESPONSIVE
   ========================================= */

@media (max-width: 992px) {
    /* Vitrine Grid - Tablet */
    .specialties-vitrine {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 60px 0;
    }
    
    /* Detail Layout - Stack on tablet */
    .service-detail-layout {
        flex-direction: column;
    }
    
    .main-content {
        max-width: 100%;
    }
    
    .sidebar {
        width: 100%;
        max-width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    /* Vitrine Grid - Mobile */
    .specialties-vitrine {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 40px 0;
    }
    
    .card-image {
        height: 200px;
    }
    
    .card-content {
        padding: 25px 20px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        margin: -40px auto 15px;
    }
    
    .card-icon svg {
        width: 28px;
        height: 28px;
    }
    
    /* Service Detail - Mobile */
    .service-detail-layout {
        padding: 40px 0;
        gap: 30px;
    }
    
    .service-hero-header {
        flex-direction: column;
        text-align: center;
    }
    
    .service-hero h2 {
        font-size: 2rem;
    }
    
    .accordion-header {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .accordion-body-inner {
        padding: 20px;
    }
    
    .scientific-box {
        padding: 20px;
        margin: 30px 0;
    }
    
    .sidebar-module {
        padding: 20px;
    }
}
