﻿/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0; /* Reset to use pseudo-element approach instead */
}

/* Create invisible anchor targets that position correctly */
#news-updates::before,
#quick-info::before,
#services-preview::before,
#why-choose-us::before,
#mission-vision::before,
#our-story::before,
#values::before,
#leadership::before,
#statistics-section::before,
#accreditation-section::before,
#emergency::before,
#general::before,
#diagnostics::before,
#mental::before,
#obstetrics::before,
#surgery::before,
#eye::before,
#ear::before,
#dental::before,
#pharmacy::before,
#mortuary::before {
    content: '';
    display: block;
    height: 110px; /* Height to account for header */
    margin-top: -110px; /* Pull back up to maintain visual positioning */
    visibility: hidden;
    pointer-events: none;
}

/* Direct padding approach for accreditation section */
#accreditation-section {
    padding-top: 140px;
    margin-top: -140px;
}

/* Remove pseudo-element for this section since we're using direct padding */
#accreditation-section::before {
    display: none !important;
}

@media (max-width: 768px) {
    #news-updates::before,
    #quick-info::before,
    #services-preview::before,
    #why-choose-us::before,
    #mission-vision::before,
    #our-story::before,
    #values::before,
    #leadership::before,
    #statistics-section::before,
    #accreditation-section::before,
    #emergency::before,
    #general::before,
    #diagnostics::before,
    #mental::before,
    #obstetrics::before,
    #surgery::before,
    #eye::before,
    #ear::before,
    #dental::before,
    #pharmacy::before,
    #mortuary::before {
        height: 115px;
        margin-top: -115px;
    }
    
    /* Mobile direct padding for accreditation section */
    #accreditation-section {
        padding-top: 145px;
        margin-top: -145px;
    }
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding: 60px 20px 0 20px; /* Minimal padding for tight anchor positioning */
}

/* Full-width utility class for elements that should extend edge-to-edge */
.full-width {
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
}

/* Responsive global padding */
@media (max-width: 768px) {
    body {
        padding: 60px 15px 0 15px; /* Minimal padding for tight anchor positioning */
    }
    
    .full-width,
    .header,
    .hero {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }
}

@media (max-width: 480px) {
    body {
        padding: 60px 10px 0 10px; /* Minimal padding for tight anchor positioning */
    }
    
    .full-width,
    .header,
    .hero {
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }
}

.container {
    max-width: 1200px;
    margin: 5px auto;
    padding: 0; /* No horizontal padding needed - using global body padding */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* Buttons - Modern Compact Design */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: rgba(37, 99, 235, 0.04);
    color: #2563eb;
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}

.btn-secondary:active {
    transform: translateY(-1px);
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 16px;
}

/* Hero Section Button Container */
.hero-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-buttons .btn {
    min-width: 160px;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.hero-buttons .btn-primary {
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.hero-buttons .btn-secondary {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .hero-buttons .btn {
        min-width: auto;
        width: 100%;
        max-width: 280px;
        align-self: center;
    }
}

/* Header & Navigation - Modern Compact Design */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
    transition: all 0.2s ease;
}

.navbar {
    padding: 0.5rem 0 0.5rem 0; /* Reduced top/bottom padding to make room for larger logo */
    max-width: 1440px;
    margin: 0 auto;
    padding-left: clamp(1rem, 3vw, 2.5rem);
    padding-right: clamp(1rem, 3vw, 2.5rem);
    transition: padding 0.2s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    position: relative;
    min-height: 85px; /* Increased from 72px to accommodate floating navigation icons */
    padding-top: 6px; /* Reduced space at top to accommodate larger logo */
    padding-bottom: 6px; /* Reduced space at bottom to accommodate larger logo */
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.logo {
    height: clamp(45px, 4.5vw, 55px); /* Increased from clamp(32px, 3.5vw, 38px) */
    width: auto;
    transition: all 0.2s ease;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

.logo:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

.logo-text {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 600;
    color: #1f2937;
    line-height: 1.1;
    letter-spacing: -0.02em;
    transition: all 0.2s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.125rem;
    align-items: center;
    margin-left: auto;
    padding: 0;
    margin: 0 0 0 auto;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 500;
    color: #6b7280;
    padding: 0.5rem 0.75rem;
    position: relative;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: transparent;
    text-decoration: none;
    overflow: hidden;
    letter-spacing: -0.005em;
}

.nav-link:hover {
    color: #1f2937;
    background: #f8fafc;
    transform: translateY(-0.5px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}


.nav-link.active {
    color: #2563eb;
    background: #eff6ff;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2563eb;
    border-radius: 0 0 8px 8px;
}

.btn-appointment {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: white !important;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 
        0 4px 14px 0 rgba(220, 38, 38, 0.35),
        0 2px 4px 0 rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: none;
    position: relative;
    text-decoration: none;
    text-transform: uppercase;
    overflow: hidden;
    white-space: nowrap;
}


.btn-appointment:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 10px 25px 0 rgba(220, 38, 38, 0.5),
        0 5px 10px 0 rgba(0, 0, 0, 0.15);
}



.btn-appointment:active {
    transform: translateY(0);
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Dropdown Menu - Flat Modern Design */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.dropdown-toggle i {
    font-size: 0.75rem;
    transition: all 0.2s ease;
    color: #9ca3af;
    margin-left: 0.375rem;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
    color: #2563eb;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.6);
    min-width: 240px;
    max-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 0.5rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-bottom: none;
    border-right: none;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    border: none;
    position: relative;
    margin: 0 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    letter-spacing: -0.005em;
    overflow: hidden;
}

.dropdown-link::before {
    content: '';
    position: absolute;
    left: 1rem;
    width: 4px;
    height: 4px;
    background: #d1d5db;
    border-radius: 50%;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.dropdown-link:hover {
    background: #f8fafc;
    color: #1f2937;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.dropdown-link:hover::before {
    background: #2563eb;
    opacity: 1;
}

/* Modern Focus States */
.nav-link:focus-visible,
.dropdown-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    background: #eff6ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-appointment:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
}

.hamburger:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* ================================ */
/* RESPONSIVE BREAKPOINTS & LAYOUTS */
/* ================================ */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .navbar {
        padding: 1.25rem 0;
    }
    
    .nav-link {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .btn-appointment {
        padding: 1rem 1.75rem;
        font-size: 0.95rem;
    }
    
    .dropdown-menu {
        min-width: 320px;
        max-width: 360px;
    }
}

/* Desktop (1200px - 1439px) */
@media (min-width: 1200px) and (max-width: 1439px) {
    .navbar {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
    
    .nav-container {
        gap: 2rem;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .navbar {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .nav-container {
        gap: 1.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-appointment {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .dropdown-menu {
        min-width: 260px;
        max-width: 300px;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 769px) and (max-width: 991px) {
    .navbar {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        padding-top: 0;
        padding-bottom: 0.875rem;
    }
    
    .nav-container {
        gap: 1.25rem;
    }
    
    .nav-link {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .btn-appointment {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
    
    .logo {
        height: 38px;
    }
    
    .logo-text {
        font-size: 1.15rem;
    }
    
    .dropdown-menu {
        min-width: 240px;
        max-width: 280px;
        padding: 0.625rem 0;
    }
    
    .dropdown-link {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Large (481px - 768px) - Handled by mobile-responsive.css */
/* Mobile Small (320px - 480px) - Handled by mobile-responsive.css */

/* Compact header scroll effect for larger screens */
@media (min-width: 769px) {
    .header.scrolled {
        backdrop-filter: blur(18px) saturate(160%);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    }
    
    .header.scrolled .navbar {
        padding-top: 0;
        padding-bottom: 0.375rem;
    }

    /* Compact focus states for larger screens */
    .nav-link:focus-visible,
    .dropdown-link:focus-visible {
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    }
    
    .btn-appointment:focus-visible {
        box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
    }
}

/* ================================ */
/* MODERN NAVIGATION BAR STYLES */
/* ================================ */

/* Modern Navigation Container */
.nav-bar-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-grow: 1;
    margin-left: auto;
    padding-right: 40px;
    padding-top: 8px; /* Increased from 2px to provide space for floating icons */
    padding-bottom: 8px; /* Increased from 2px to provide space for floating icons */
}

.nav-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(229, 231, 235, 0.3);
    border-radius: 28px;
    padding: 5px 10px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
    gap: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 58px;
}

/* Navigation bar mask for creating holes */
.nav-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: inherit;
    z-index: 0;
    pointer-events: none;
}


.nav-bar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-bar:hover::before {
    opacity: 1;
}

/* Modern Navigation Item */
.nav-item-modern {
    position: relative;
    margin: 0;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.nav-link-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    text-decoration: none;
    color: #6b7280;
    border-radius: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    min-width: 76px;
    background: transparent;
    overflow: visible;
    user-select: none;
    height: 48px;
    contain: layout style;
}

/* Navigation Icon */
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-bottom: 3px;
    border-radius: 50%; /* Perfect circle */
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 
        0 1px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    border: 1px solid rgba(226, 232, 240, 0.5);
    aspect-ratio: 1 / 1; /* Force perfect circle */
    flex-shrink: 0; /* Prevent compression */
}

.nav-icon i {
    font-size: 14px;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

/* Navigation Text */
.nav-text {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    white-space: nowrap;
    line-height: 1;
}

/* Hover Effects - Pop Off Animation */
.nav-link-modern:hover {
    transform: translateY(-2px);
    color: #1f2937;
}

.nav-link-modern:hover .nav-icon {
    transform: translateY(-3px) scale(1.15);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 
        0 6px 16px rgba(37, 99, 235, 0.25),
        0 3px 8px rgba(37, 99, 235, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(37, 99, 235, 0.3);
}

.nav-link-modern:hover .nav-icon i {
    color: #ffffff;
    transform: scale(1.05);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-link-modern:hover .nav-text {
    color: #1f2937;
    transform: translateY(1px);
    font-weight: 700;
}

/* Active State - Complete Detachment with Hole */
.nav-item-modern.active .nav-link-modern {
    color: #2563eb;
    position: relative;
}

.nav-item-modern.active .nav-link-modern::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 26px;
    background: 
        radial-gradient(ellipse 24px 13px at center bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.08) 40%, transparent 70%),
        linear-gradient(to bottom, rgba(220,220,220,0.3) 0%, rgba(240,240,240,0.6) 30%, rgba(248,250,252,0.9) 60%, #f8fafc 100%);
    border-radius: 0 0 24px 24px;
    box-shadow: 
        inset 0 -8px 16px rgba(0, 0, 0, 0.15),
        inset 0 -4px 8px rgba(0, 0, 0, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.02);
    z-index: 0;
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-top: none;
}

/* Create additional depth shadow behind the cutout */
.nav-item-modern.active .nav-link-modern::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 28px;
    background: radial-gradient(ellipse 27px 14px at center bottom, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.06) 50%, transparent 80%);
    border-radius: 0 0 27px 27px;
    z-index: -2;
    filter: blur(1px);
}

.nav-item-modern.active .nav-icon {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 
        0 15px 35px rgba(37, 99, 235, 0.35),
        0 10px 25px rgba(37, 99, 235, 0.25),
        0 5px 15px rgba(37, 99, 235, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateY(-20px) scale(1.15);
    z-index: 10;
    position: relative;
    animation: float 2s ease-in-out infinite;
}

.nav-item-modern.active .nav-icon i {
    color: #ffffff;
    transform: scale(1.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-item-modern.active .nav-text {
    color: #2563eb;
    font-weight: 700;
    transform: translateY(-2px);
}

/* Click Animation - Complete Detachment Effect */
.nav-link-modern:active {
    transform: translateY(-2px) scale(0.98);
}

.nav-link-modern:active .nav-icon {
    transform: translateY(-18px) scale(1.3);
    box-shadow: 
        0 18px 40px rgba(37, 99, 235, 0.4),
        0 10px 25px rgba(37, 99, 235, 0.3),
        0 5px 15px rgba(37, 99, 235, 0.2);
    animation: detach-bounce 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes detach-bounce {
    0% {
        transform: translateY(-3px) scale(1.15);
    }
    50% {
        transform: translateY(-24px) scale(1.35) rotate(5deg);
    }
    100% {
        transform: translateY(-18px) scale(1.3);
    }
}

/* Special Styling for Appointment Button */
.appointment-item .nav-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(220, 38, 38, 0.3);
    box-shadow: 
        0 4px 12px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.appointment-item .nav-icon i {
    color: #ffffff;
}

.appointment-item .nav-text {
    color: #dc2626;
    font-weight: 700;
}

.appointment-item .nav-link-modern:hover .nav-icon {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-3px) scale(1.15);
    box-shadow: 
        0 8px 20px rgba(220, 38, 38, 0.3),
        0 4px 10px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.appointment-item .nav-link-modern:hover .nav-text {
    color: #b91c1c;
}

/* Special Active State for Appointment Button */
.appointment-item.active .nav-link-modern::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 26px;
    background: 
        radial-gradient(ellipse 24px 13px at center bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.08) 40%, transparent 70%),
        linear-gradient(to bottom, rgba(220,220,220,0.3) 0%, rgba(240,240,240,0.6) 30%, rgba(248,250,252,0.9) 60%, #f8fafc 100%);
    border-radius: 0 0 24px 24px;
    box-shadow: 
        inset 0 -8px 16px rgba(0, 0, 0, 0.15),
        inset 0 -4px 8px rgba(0, 0, 0, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.05),
        0 1px 3px rgba(0, 0, 0, 0.02);
    z-index: 0;
    border: 1px solid rgba(200, 200, 200, 0.5);
    border-top: none;
}

/* Create additional depth shadow behind the appointment cutout */
.appointment-item.active .nav-link-modern::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 28px;
    background: radial-gradient(ellipse 27px 14px at center bottom, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.06) 50%, transparent 80%);
    border-radius: 0 0 27px 27px;
    z-index: -2;
    filter: blur(1px);
}

.appointment-item.active .nav-icon {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-20px) scale(1.15);
    box-shadow: 
        0 15px 35px rgba(220, 38, 38, 0.4),
        0 10px 25px rgba(220, 38, 38, 0.3),
        0 5px 15px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 10;
    position: relative;
    animation: float 2s ease-in-out infinite;
}

.appointment-item.active .nav-text {
    color: #dc2626;
    font-weight: 700;
    transform: translateY(-2px);
}

.appointment-item .nav-link-modern:active .nav-icon {
    transform: translateY(-18px) scale(1.3);
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 
        0 18px 40px rgba(220, 38, 38, 0.4),
        0 10px 25px rgba(220, 38, 38, 0.3),
        0 5px 15px rgba(220, 38, 38, 0.2);
    animation: detach-bounce-red 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes detach-bounce-red {
    0% {
        transform: translateY(-3px) scale(1.15);
    }
    50% {
        transform: translateY(-24px) scale(1.35) rotate(-5deg);
    }
    100% {
        transform: translateY(-18px) scale(1.3);
    }
}

/* Floating animation for active detached icons */
@keyframes float {
    0%, 100% {
        transform: translateY(-16px) scale(1.15);
    }
    50% {
        transform: translateY(-18px) scale(1.15);
    }
}

/* Minimal Dropdown Menu */
.nav-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 4px;
    min-width: 180px;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 1000;
}

.nav-item-modern:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #4b5563;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s ease-out;
    margin: 1px 0;
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
}

/* Modern shimmer effect */
.nav-dropdown a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 6px;
    transition: left 0.5s ease;
    z-index: -1;
}

/* Modern arrow indicator */
.nav-dropdown a::after {
    content: '→';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%) translateX(4px) scale(0.9);
    color: #94a3b8;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-weight: bold;
}

/* Modern hover animation with scale, glow, and gradient */
.nav-dropdown a {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.nav-dropdown a:hover {
    color: #1f2937;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    transform: scale(1.05) translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 
        0 10px 25px rgba(59, 130, 246, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(59, 130, 246, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-dropdown a:hover::before {
    left: 100%;
    opacity: 1;
    animation: shimmer 0.8s ease-out;
}

.nav-dropdown a:hover::after {
    opacity: 1;
    color: #3b82f6;
    transform: translateY(-50%) translateX(0) scale(1.1);
    animation: arrowPulse 0.6s ease-out;
}

/* Modern shimmer keyframe */
@keyframes shimmer {
    0% {
        left: -100%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Arrow pulse animation */
@keyframes arrowPulse {
    0% {
        transform: translateY(-50%) translateX(0) scale(1);
    }
    50% {
        transform: translateY(-50%) translateX(-2px) scale(1.15);
    }
    100% {
        transform: translateY(-50%) translateX(0) scale(1.1);
    }
}

/* Service Layout CSS */
.service-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.8rem;
    margin-bottom: 2rem;
    align-items: start;
}

.service-details {
    order: 1;
}

.service-image {
    order: 2;
}

.service-list-title {
    font-size: 1.5rem;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.service-image img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16/9;
}

.service-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.service-hours {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 0;
}

.service-hours h4 {
    color: #1f2937;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.service-hours p {
    color: #6b7280;
    margin-bottom: 0;
    font-weight: 500;
}

/* Mobile responsiveness for service layout */
@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .service-details {
        order: 1;
    }
    
    .service-image {
        order: 2;
    }
    
    .service-list-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

/* No entry animation for dropdown items - clean instant appearance */

/* No additional icons needed for clean design */

/* Hide mobile menu on desktop */
.mobile-only {
    display: none;
}

/* Responsive Breakpoints for Modern Nav */
@media (max-width: 1200px) {
    .nav-link-modern {
        padding: 6px 12px;
        min-width: 68px;
        height: 42px;
        transition: all 0.2s ease;
    }
    
    .nav-link-modern:hover {
        transform: scale(1.05);
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border-color: rgba(59, 130, 246, 0.2);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    }
    
    .nav-icon {
        width: 24px;
        height: 24px;
        aspect-ratio: 1 / 1; /* Force perfect circle */
        flex-shrink: 0; /* Prevent compression */
        transition: all 0.2s ease;
    }
    
    .nav-link-modern:hover .nav-icon {
        transform: translateY(-1px) scale(1.1);
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
    }
    
    .nav-icon i {
        font-size: 12px;
    }
    
    .nav-text {
        font-size: 9px;
        transition: all 0.2s ease;
    }
    
    .nav-link-modern:hover .nav-text {
        color: #1f2937;
        font-weight: 600;
    }
    
    .nav-bar {
        height: 52px;
        padding: 4px 8px;
    }
}

@media (max-width: 992px) {
    .nav-link-modern {
        padding: 5px 10px;
        min-width: 60px;
        height: 38px;
        transition: all 0.2s ease;
    }
    
    .nav-link-modern:hover {
        transform: scale(1.04);
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border-color: rgba(59, 130, 246, 0.2);
        box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
    }
    
    .nav-icon {
        width: 22px;
        height: 22px;
        aspect-ratio: 1 / 1; /* Force perfect circle */
        flex-shrink: 0; /* Prevent compression */
        transition: all 0.2s ease;
    }
    
    .nav-link-modern:hover .nav-icon {
        transform: translateY(-1px) scale(1.08);
        box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
    }
    
    .nav-icon i {
        font-size: 11px;
    }
    
    .nav-text {
        font-size: 8px;
        transition: all 0.2s ease;
    }
    
    .nav-link-modern:hover .nav-text {
        color: #1f2937;
        font-weight: 600;
    }
    
    .nav-bar {
        padding: 3px 6px;
        gap: 2px;
        height: 48px;
    }
}

@media (max-width: 768px) {
    .nav-bar-container {
        display: none;
    }
    
    .mobile-only {
        display: flex;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .dropdown-menu,
    .btn-appointment,
    .hamburger,
    .bar,
    .nav-link-modern,
    .nav-icon,
    .nav-text,
    .nav-dropdown {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    .nav-link::before,
    .btn-appointment::before,
    .dropdown-link::after {
        display: none !important;
    }
    
    .nav-link-modern:hover,
    .nav-link-modern:active {
        transform: none !important;
    }
    
    .nav-link-modern:hover .nav-icon,
    .nav-link-modern:active .nav-icon {
        transform: none !important;
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    height: 82vh; /* Increased from 78vh */
    min-height: 570px; /* Increased from 550px */
    max-height: 720px; /* Increased from 700px */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0; /* Remove negative margin to avoid hiding under navbar */
    padding-top: 65px; /* Slightly increased for proper header clearance */
    margin-left: -20px;
    margin-right: -20px;
    width: calc(100% + 40px);
}

/* Hero Slider */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.05);
    transition: all 1.2s ease-in-out;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

/* Fade Transition */
.slide.fade-in {
    transition: opacity 1.2s ease-in-out;
}

.slide.fade-in.active {
    opacity: 1;
}

/* Slide from Right */
.slide.slide-right {
    transform: translateX(100%) scale(1);
    transition: transform 1.2s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.slide-right.active {
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* Slide from Left */
.slide.slide-left {
    transform: translateX(-100%) scale(1);
    transition: transform 1.2s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.slide-left.active {
    transform: translateX(0) scale(1);
    opacity: 1;
}

/* Zoom In */
.slide.zoom-in {
    transform: scale(1.3);
    transition: transform 1.5s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.zoom-in.active {
    transform: scale(1);
    opacity: 1;
}

/* Zoom Out */
.slide.zoom-out {
    transform: scale(0.8);
    transition: transform 1.5s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.zoom-out.active {
    transform: scale(1);
    opacity: 1;
}

/* Rotate In */
.slide.rotate-in {
    transform: rotate(5deg) scale(1.1);
    transition: transform 1.5s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.rotate-in.active {
    transform: rotate(0deg) scale(1);
    opacity: 1;
}

/* Slide Up */
.slide.slide-up {
    transform: translateY(50px) scale(1);
    transition: transform 1.3s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.slide-up.active {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Slide Down */
.slide.slide-down {
    transform: translateY(-50px) scale(1);
    transition: transform 1.3s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.slide-down.active {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Flip In */
.slide.flip-in {
    transform: rotateY(90deg) scale(0.9);
    transition: transform 1.4s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.flip-in.active {
    transform: rotateY(0deg) scale(1);
    opacity: 1;
}

/* Bounce In */
.slide.bounce-in {
    transform: scale(0.3);
    transition: transform 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 1.2s ease-in-out;
}

.slide.bounce-in.active {
    transform: scale(1);
    opacity: 1;
}

/* Diagonal Slide */
.slide.diagonal-in {
    transform: translateX(100px) translateY(-100px) scale(0.9);
    transition: transform 1.4s ease-in-out, opacity 1.2s ease-in-out;
}

.slide.diagonal-in.active {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
}

/* Hero Overlay - Removed for clearer images */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none; /* Overlay removed for image clarity */
    z-index: 2;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero-text {
    color: white;
}

.hero-text h1 {
    font-size: 3.5rem; /* Reduced from 4rem for compact design */
    font-weight: 800;
    margin-bottom: 1.25rem; /* Reduced margin */
    text-shadow: 
        0 0 30px rgba(0, 0, 0, 0.95),
        3px 3px 15px rgba(0, 0, 0, 0.9),
        0 0 50px rgba(0, 0, 0, 0.8),
        -3px -3px 10px rgba(0, 0, 0, 0.85),
        6px 6px 25px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
    color: white;
    letter-spacing: -0.02em;
}

.hero-text p {
    font-size: 1.2rem; /* Slightly reduced */
    margin-bottom: 2rem; /* Reduced margin */
    text-shadow: 
        0 0 25px rgba(0, 0, 0, 0.95),
        2px 2px 10px rgba(0, 0, 0, 0.9),
        0 0 35px rgba(0, 0, 0, 0.8),
        -2px -2px 8px rgba(0, 0, 0, 0.85),
        4px 4px 20px rgba(0, 0, 0, 0.7);
    max-width: 650px; /* Slightly reduced */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    color: white;
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-buttons .btn-primary {
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.9), rgba(29, 78, 216, 0.9));
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons .btn-primary:hover {
    background: linear-gradient(145deg, rgba(29, 78, 216, 0.95), rgba(30, 64, 175, 0.95));
    transform: translateY(-3px);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.5),
        0 3px 15px rgba(37, 99, 235, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.hero-buttons .btn-secondary {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.hero-buttons .btn-secondary:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    color: #2563eb;
    text-shadow: none;
    transform: translateY(-3px);
    box-shadow: 
        0 6px 25px rgba(0, 0, 0, 0.4),
        0 3px 15px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 4;
    pointer-events: none;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: all;
    font-size: 1.2rem;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Slider Indicators */
.slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 4;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.6);
    padding: 0;
    outline: none;
    position: relative;
    overflow: hidden;
}

/* Animated ring effect */
.indicator::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulsing animation for active indicator */
.indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.indicator:hover::before {
    opacity: 0.6;
    transform: scale(1);
}

/* Active indicator animations - Modern Desktop Pulse */
.indicator.active {
    background: white;
    transform: scale(1.3);
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 2px rgba(255, 255, 255, 0.6),
        0 0 18px rgba(255, 255, 255, 0.45),
        0 0 36px rgba(255, 255, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    /* Match the 4s slide interval for a synced, calm pulse */
    animation: indicatorGlowPulse 4s ease-in-out infinite;
}

.indicator.active::before {
    opacity: 1;
    transform: scale(1.2);
    border-width: 2px;
    /* Subtle outward ripple */
    animation: indicatorRingPulse 4s ease-out infinite;
}

.indicator.active::after {
    transform: translate(-50%, -50%) scale(1.05);
    background: rgba(255, 255, 255, 1);
    /* Gentle inner breathing */
    animation: indicatorInnerPulse 4s ease-in-out infinite;
}

/* Modern pulsating keyframe animations (Desktop) */
@keyframes indicatorGlowPulse {
    0% {
        transform: scale(1.3);
        box-shadow: 
            0 0 0 2px rgba(255, 255, 255, 0.6),
            0 0 10px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 255, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
    50% {
        transform: scale(1.45);
        box-shadow: 
            0 0 0 3px rgba(255, 255, 255, 0.8),
            0 0 22px rgba(255, 255, 255, 0.6),
            0 0 36px rgba(255, 255, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 1);
    }
    100% {
        transform: scale(1.3);
        box-shadow: 
            0 0 0 2px rgba(255, 255, 255, 0.6),
            0 0 10px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 255, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
    }
}

@keyframes indicatorRingPulse {
    0% {
        opacity: 0.6;
        transform: scale(1.2);
        border-color: rgba(255, 255, 255, 0.45);
    }
    60% {
        opacity: 0;
        transform: scale(2.1);
        border-color: rgba(255, 255, 255, 0.1);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
        border-color: rgba(255, 255, 255, 0.45);
    }
}

@keyframes indicatorInnerPulse {
    0% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.85;
        background: rgba(255, 255, 255, 0.95);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
        background: rgba(255, 255, 255, 1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.85;
        background: rgba(255, 255, 255, 0.95);
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .indicator,
    .indicator::before,
    .indicator::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Progressive loading animation when slide changes */
.indicator.loading {
    animation: loadingPulse 0.6s ease-out;
}

@keyframes loadingPulse {
    0% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.4);
        background: rgba(255, 255, 255, 0.8);
    }
    100% {
        transform: scale(1.3);
        background: white;
    }
}

/* Mobile responsive indicators */
@media (max-width: 768px) {
    .slider-indicators {
        gap: 8px;
        padding: 6px 12px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .indicator.active {
        transform: scale(1.5);
    }
    
    .indicator::after {
        width: 4px;
        height: 4px;
    }
}

/* Quick Info Section */
.quick-info {
    padding: 4rem 0;
    background-color: #2563eb;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-icon {
    /*display: inline-block;*/
    width: 80px;
    height: 80px;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.info-card h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.info-card p {
    color: #64748b;
    margin: 0;
}

/* Services Preview */
.services-preview {
    padding: 5rem 0;
    background-color: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
   display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.service-icon {
    /*display: inline-block;*/
    width: 80px;
    height: 80px;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.service-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.service-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.service-link {
    color: #2563eb;
    font-weight: 500;
}

.service-link:hover {
    color: #1d4ed8;
}

/* Why Choose Us */
.why-choose-us {
    padding: 5rem 0;
}

.content-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.content-text h2 {
    color: #1e293b;
    margin-bottom: 2rem;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature i {
    color: #2563eb;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.feature h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #64748b;
    margin: 0;
}

.content-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* News Updates */
.news-updates {
    padding: 2rem 0; /* Balanced padding for proper section spacing */
    background-color: #f8fafc;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    height: 480px;
    perspective: 1000px;
    position: relative;
}

.news-card:hover {
    transform: translateY(-5px);
}

/* News Card Flip Animation Styles */
.news-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

.news-card.flipped .news-card-inner {
    transform: rotateY(180deg);
}

.news-card-front,
.news-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-card-front {
    transform: rotateY(0deg);
    background-color: white;
}

.news-card-back {
    transform: rotateY(180deg);
    background-color: white;
    padding: 0;
}

.news-full-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4rem 1.5rem 1.5rem 1.5rem; /* Top padding for close button */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

/* Custom scrollbar for webkit browsers */
.news-full-content::-webkit-scrollbar {
    width: 6px;
}

.news-full-content::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 3px;
}

.news-full-content::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 3px;
}

.news-full-content::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

.close-card {
    background: #64748b;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.close-card:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

.close-card:active {
    background: #b91c1c;
    transform: translateY(0);
}

/* Scroll indicator for news cards */
.news-card-back.has-scroll::after {
    content: '↓ Scroll for more';
    position: absolute;
    bottom: 60px;
    right: 1rem;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    z-index: 10;
    animation: fadeInOut 2s ease-in-out infinite;
    opacity: 0;
}

.news-card-back.has-scroll::after {
    opacity: 1;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.news-card-front img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-date {
    color: #2563eb;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.news-card h3 {
    color: #1e293b;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    line-height: 1.3;
}

.news-card p {
    color: #64748b;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.5;
}

.read-more {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: flex-start;
    font-size: 0.9rem;
}

.read-more:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.read-more:active {
    background: #1e40af;
    transform: translateY(0);
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 40px;
}

.footer-logo span {
    font-size: 0.95rem;
    font-weight: 600;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #f1f5f9;
    font-size: 0.9rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.footer-section a {
    color: #cbd5e1;
    transition: color 0.3s ease;
    font-size: 0.8rem;
}

.footer-section a:hover {
    color: #3b82f6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    /*display: inline-block;*/
    width: 40px;
    height: 40px;
    background-color: #334155;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #2563eb;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.contact-item i {
    color: #3b82f6;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
}

.footer-bottom a {
    color: #3b82f6;
    font-size: 0.75rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.7) 0%, rgba(29, 78, 216, 0.8) 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: white;
    padding: 60px 0 80px; /* Reduced top padding since body has padding-top */
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(29, 78, 216, 0.4) 100%);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

/* Specific Page Header Backgrounds */
.about-header {
    background-image: url('../images/header/about-header.jpg');
}

.services-header {
    background-image: url('../images/header/services-header.jpg');
}

.contact-header {
    background-image: url('../images/header/contact-header.jpg');
}

.gallery-header {
    background-image: url('../images/header/gallery-header.jpg');
}

.appointments-header {
    background-image: url('../images/header/appointments-header.jpg');
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.page-header p {
    font-size: 1.2rem;
    color: #f1f5f9;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    font-weight: 400;
}

/* About Page Styles */
.about-content {
    padding: 5rem 0;
}

/* Scroll offset for anchor targets to prevent hiding behind fixed header */
/* About page sections */
.mission-vision,
.our-story,
.values-section,
.leadership-section,
/* Services page sections */
.service-detail,
/* Contact page sections */
.emergency-banner,
.contact-main,
.map-section,
.department-contacts,
/* General sections with IDs */
#quick-info,
#services-preview,
#why-choose-us,
#news-updates,
#contact-info,
#emergency,
#directions,
#hours,
#map-section,
#department-contacts {
    scroll-margin-top: 75px; /* Reduced space for tighter positioning */
}

/* Fallback for older browsers using pseudo-element */
.mission-vision::before,
.our-story::before,
.values-section::before,
.leadership-section::before,
.service-detail::before,
.emergency-banner::before,
.contact-main::before,
.map-section::before,
.department-contacts::before,
#quick-info::before,
#services-preview::before,
#why-choose-us::before,
#news-updates::before,
#contact-info::before,
#emergency::before,
#directions::before,
#hours::before,
#map-section::before,
#department-contacts::before {
    content: '';
    display: block;
    height: 75px; /* Reduced height for tighter positioning */
    margin-top: -75px; /* Pull back up to maintain layout */
    visibility: hidden;
    pointer-events: none;
}

.mission-vision {
    margin-bottom: 4rem;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.mission, .vision {
    background-color: #f8fafc;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
}

.icon-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.icon-header i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.icon-header h2 {
    color: #1e293b;
    margin: 0;
}

.our-story {
    margin-bottom: 4rem;
}

.our-story .content-text {
    padding-right: 2rem;
}

.values-section {
    margin-bottom: 4rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
}

.value-icon {
    width: 80px;
    height: 80px;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

/* Leadership Section Styles */
.leadership-section {
    margin-bottom: 4rem;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Responsive layout for smaller screens */
@media (max-width: 1200px) {
    .leadership-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .leader-card {
        height: 460px;
    }
    
    .leader-card-front {
        padding: 0.25rem;
        gap: 0.2rem;
    }
    
    .leader-card-front img {
        width: 180px;
        height: 220px;
    }
    
    .leader-front-info h3 {
        font-size: 0.95rem;
    }
    
    .leader-title {
        font-size: 0.8rem;
    }
    
    .learn-more {
        padding: 6px 14px;
        font-size: 0.75rem;
        min-width: 90px;
    }
}

@media (max-width: 768px) {
    .leadership-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .leader-card {
        height: 480px;
    }
    
    .leader-card-front {
        padding: 0.25rem;
        gap: 0.3rem;
    }
    
    .leader-card-front img {
        width: 220px;
        height: 260px;
    }
    
    .leader-front-info h3 {
        font-size: 1.05rem;
        margin-bottom: 0.5rem;
    }
    
    .leader-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .leader-credentials {
        font-size: 0.85rem;
    }
    
    .learn-more {
        padding: 8px 20px;
        font-size: 0.85rem;
        min-width: 120px;
        margin-top: 0;
    }
}

.leader-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    height: 420px;
    perspective: 1000px;
    position: relative;
    width: 100%;
}

.leader-card:hover {
    transform: translateY(-5px);
}

/* Leader Card Flip Animation Styles */
.leader-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

.leader-card.flipped .leader-card-inner {
    transform: rotateY(180deg);
}

.leader-card-front,
.leader-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    background-color: white;
}

.leader-card-front {
    transform: rotateY(0deg);
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.25rem;
    gap: 0.25rem;
    justify-content: space-between;
}

.leader-card-back {
    transform: rotateY(180deg);
    padding: 0;
    flex-direction: column;
}

.leader-card-front img {
    width: 200px;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    margin: 0 auto;
}

.leader-front-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
    width: 100%;
    min-height: 0;
    gap: 0;
}

.leader-text-container {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}

.leader-front-info h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.1;
    font-weight: 600;
}

.leader-title {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.leader-credentials {
    color: #64748b;
    font-size: 0.8rem;
    margin-bottom: 0;
    font-style: italic;
    line-height: 1.1;
}

.learn-more {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    align-self: center;
    font-size: 0.85rem;
    margin-top: 0;
    width: auto;
    min-width: 110px;
    flex-shrink: 0;
}

.learn-more:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.learn-more:active {
    background: #1e40af;
    transform: translateY(0);
}

/* Leader Card Back Styles */
.leader-full-info {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4rem 0.5rem 0.5rem 0.5rem; /* Top padding for close button */
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
    display: flex;
    flex-direction: column;
}

.leader-header {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.leader-header h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    line-height: 1.3;
}

.leader-header .leader-title {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.leader-header .leader-credentials {
    color: #64748b;
    font-size: 0.8rem;
    margin: 0;
    font-style: italic;
}

.leader-biography {
    flex: 1;
}

.leader-biography h4 {
    color: #1e293b;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1rem;
    border-bottom: 2px solid #eff6ff;
    padding-bottom: 0.25rem;
}

.leader-biography h4:first-child {
    margin-top: 0;
}

.leader-biography ul {
    list-style: none;
    margin: 0.75rem 0;
    padding-left: 0;
}

.leader-biography li {
    color: #64748b;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    line-height: 1.5;
    font-size: 0.85rem;
}

.leader-biography li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.leader-biography p {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.close-leader-card {
    background: #64748b;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 1rem 0 0 0;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.close-leader-card:hover {
    background: #475569;
    transform: translateY(-2px);
}

.close-leader-card:active {
    background: #334155;
    transform: translateY(0);
}

/* Top close buttons for flip cards */
.close-card-top, .close-leader-card-top {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c); /* Red gradient */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.close-card-top:hover, .close-leader-card-top:hover {
    background: linear-gradient(135deg, #f87171, #ef4444, #dc2626); /* Lighter red gradient on hover */
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.close-card-top:active, .close-leader-card-top:active {
    background: linear-gradient(135deg, #dc2626, #b91c1c, #991b1b); /* Darker red gradient on click */
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.5);
}

/* Make the X icon more prominent */
.close-card-top i, .close-leader-card-top i {
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Hide close buttons by default */
.close-card-top,
.close-leader-card-top {
    display: none !important;
}

/* Show close buttons only when cards are flipped */
.news-card.flipped .close-card-top,
.leader-card.flipped .close-leader-card-top {
    display: flex !important;
    animation: buttonFadeIn 0.3s ease 0.3s both;
}

@keyframes buttonFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile responsive styles for top close buttons */
@media (max-width: 768px) {
    .close-card-top, .close-leader-card-top {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    /* Reduce top padding on mobile for better space utilization */
    .news-full-content {
        padding: 3.5rem 1rem 1rem 1rem;
    }
    
    .leader-full-info {
        padding: 3.5rem 0.5rem 0.5rem 0.5rem;
    }
}


/* Custom scrollbar for leader card content */
.leader-full-info::-webkit-scrollbar {
    width: 6px;
}

.leader-full-info::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 3px;
}

.leader-full-info::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 3px;
}

.leader-full-info::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* Scroll indicator for leader cards */
.leader-card-back.has-scroll::after {
    content: '↓ Scroll for more';
    position: absolute;
    bottom: 60px;
    right: 1rem;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    z-index: 10;
    animation: fadeInOut 2s ease-in-out infinite;
    opacity: 0;
}

.leader-card-back.has-scroll::after {
    opacity: 1;
}

.statistics-section {
    margin-bottom: 4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-card {
    background-color: #2563eb;
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.accreditation-section {
    background-color: #f8fafc;
    padding: 3rem;
    border-radius: 12px;
}

.accreditation-text {
    text-align: center;
    margin-bottom: 3rem;
}

.accreditation-text p {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* 4-Card Horizontal Layout */
.accreditation-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.accreditation-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.accreditation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-image {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.accreditation-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content h4 {
    color: #1e293b;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.card-content p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

/* Awards List */
.accreditation-awards {
    margin-top: 2rem;
}

.awards-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.awards-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    color: #1e293b;
    transition: background-color 0.3s ease;
}

.awards-list li:hover {
    background-color: #eff6ff;
}

.awards-list i {
    color: #f59e0b;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .accreditation-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .card-image {
        height: 100px;
    }
}

@media (max-width: 768px) {
    .accreditation-section {
        padding: 2rem;
    }
    
    .accreditation-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .accreditation-card {
        padding: 1.5rem;
    }
    
    .card-image {
        height: 80px;
        margin-bottom: 1rem;
    }
    
    .awards-list {
        grid-template-columns: 1fr;
    }
}

/* Services Page Styles */
.services-content {
    padding: 3rem 0;
}

.service-detail {
    margin-bottom: 4rem;
    background-color: white;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.service-icon-large {
    width: 80px;
    height: 80px;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.service-header-text h2 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.service-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

.service-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.8rem;
    align-items: start;
}

.service-description h3 {
    color: #1e293b;
    margin: 2rem 0 1rem;
}

.service-list {
    list-style: none;
    margin: 1.5rem 0;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.service-list i {
    color: #10b981;
    font-size: 1rem;
}

.service-hours {
    background-color: #f0f9ff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    margin-top: 0;
}

.service-hours h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-hours p {
    color: #64748b;
    margin: 0;
}

.service-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    color: #dbeafe;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cta-buttons .btn-secondary {
    border-color: white;
    color: white;
}

.cta-buttons .btn-secondary:hover {
    background-color: white;
    color: #2563eb;
}

/* Gallery Styles */
.gallery-content {
    padding: 3rem 0;
}

.gallery-content .container {
    max-width: 1400px;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background-color: white;
    color: #64748b;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

/* Gallery responsive design */
@media (max-width: 1400px) {
    .gallery-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.3rem;
    }
    
    .gallery-item {
        border-radius: 6px;
    }
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
    max-height: 180px;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    color: white;
    padding: 1.5rem;
}

.gallery-info h3 {
    margin-bottom: 0.5rem;
}

.gallery-info p {
    color: #e2e8f0;
    margin: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

#caption {
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-size: 1.2rem;
}

/* Modern Gallery Modal Styles */
.modern-gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: hidden;
}

.modern-gallery-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.modern-gallery-modal .modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* Modal Navigation Buttons */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 2rem;
}

.modal-next {
    right: 2rem;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.25rem;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* Main Image Display */
.modal-main-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem 1rem 1rem;
    max-height: 75vh;
}

.modal-main-image img {
    max-width: 95%;
    max-height: calc(100% - 50px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.modal-info {
    text-align: center;
    color: white;
    margin-top: 1.5rem;
    max-width: 800px;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.modal-info p {
    color: #e2e8f0;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Thumbnail Section */
.modal-thumbnails {
    background: rgba(0, 0, 0, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    max-height: 30vh;
    overflow: hidden;
}

.thumbnail-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
    justify-content: flex-start;
    align-items: center;
}

/* Custom scrollbar for thumbnails */
.thumbnail-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    transition: background 0.3s ease;
}

.thumbnail-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Individual Thumbnails */
.modal-thumbnail {
    flex-shrink: 0;
    width: 85px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.modal-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

.modal-thumbnail.active {
    border-color: #3b82f6;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.modal-thumbnail.active::after {
    opacity: 0;
}

.modal-thumbnail:hover {
    transform: scale(1.02);
    border-color: rgba(255, 255, 255, 0.3);
}

.modal-thumbnail:hover::after {
    opacity: 0.1;
}

.modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .modal-prev {
        left: 1rem;
    }
    
    .modal-next {
        right: 1rem;
    }
    
    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .modal-main-image {
        padding: 4rem 1rem 1rem 1rem;
        max-height: 65vh;
    }
    
    .modal-info h3 {
        font-size: 1.25rem;
    }
    
    .modal-info p {
        font-size: 0.875rem;
    }
    
    .modal-thumbnails {
        max-height: 35vh;
        padding: 1rem;
    }
    
    .modal-thumbnail {
        width: 100px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .modal-prev {
        left: 0.5rem;
    }
    
    .modal-next {
        right: 0.5rem;
    }
    
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .modal-main-image {
        padding: 3rem 0.5rem 0.5rem 0.5rem;
        max-height: 60vh;
    }
    
    .modal-thumbnails {
        max-height: 40vh;
        padding: 0.75rem;
    }
    
    .modal-thumbnail {
        width: 80px;
        height: 60px;
    }
}

/* Contact Page Styles */
.contact-content {
    padding: 3rem 0;
}

.emergency-banner {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.emergency-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.emergency-icon {
    font-size: 3rem;
    color: #fecaca;
}

.emergency-text h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.emergency-text p {
    color: #fecaca;
    margin: 0;
}

.emergency-btn {
    background-color: white;
    color: #dc2626;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.emergency-btn:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

.contact-main {
    margin-bottom: 4rem;
}

.contact-info-section {
    width: 100%;
}

.contact-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 2rem;
    margin-top: 2rem;
}

/* Two-column layout for contact section */
.contact-two-column-layout {
    display: grid;
    grid-template-columns: 65% 35%;
    gap: 3rem;
    margin-top: 2rem;
    align-items: start;
}

.contact-info-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-form-column {
    display: flex;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-method {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Contact Form Card - spans 2 rows and positioned on the left */
.contact-form-card {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    align-items: stretch;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 100%;
}

/* Contact Form Card in two-column layout */
.contact-form-column .contact-form-card {
    grid-column: unset;
    grid-row: unset;
    width: 100%;
}

.contact-form-card .method-icon {
    align-self: flex-start;
}

.contact-form-card .method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.method-icon {
    width: 50px;
    height: 50px;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.method-info h3 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.method-info p {
    color: #64748b;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.method-info a {
    color: #2563eb;
    font-weight: 500;
}

/* Contact Form */
.contact-form-card .contact-form-container {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
}

.contact-form-card .form-group {
    margin-bottom: 1rem;
}

.contact-form-card .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.contact-form-card .form-group input,
.contact-form-card .form-group select,
.contact-form-card .form-group textarea {
    padding: 8px 10px;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
}

.contact-form-card .form-row {
    gap: 1rem;
}

.contact-form-card .checkbox-group {
    margin-bottom: 1rem;
}

.contact-form-card .checkbox-label {
    font-size: 0.75rem;
    line-height: 1.3;
}

.btn-form-submit {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Enhanced Form Validation Styles */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc2626 !important;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid {
    border-color: #10b981 !important;
    background-color: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.field-message {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-message.error {
    color: #dc2626;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
}

.field-message.success {
    color: #059669;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.field-message.warning {
    color: #d97706;
    background-color: #fffbeb;
    border: 1px solid #fed7aa;
}

/* Form progress indicator */
.form-progress {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Input guides and help text */
.input-guide {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Character counters */
.char-counter {
    font-size: 0.85rem;
    text-align: right;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Date and age warnings */
.date-restriction,
.age-warning {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-restriction {
    color: #d97706;
    background-color: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.age-warning {
    color: #dc2626;
    background-color: #fef2f2;
    border-left: 3px solid #dc2626;
}

/* Suggestions dropdown */
.reason-suggestions {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f9fafb;
}

/* Phone number formatting */
.phone-info {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Form animations */
.form-group input,
.form-group select,
.form-group textarea {
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.contact-form-container h2 {
    color: #1e293b;
    margin-bottom: 2rem;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.5;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

input[type="checkbox"]:checked + .checkmark {
    background-color: #2563eb;
    border-color: #2563eb;
}

input[type="checkbox"]:checked + .checkmark::after {
    content: 'âœ“';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="checkbox"] {
    display: none;
}

/* Map Section */
.map-section {
    margin-top: 4rem;
}

.map-container {
    margin: 2rem 0;
}

.map-placeholder {
    background-color: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 4rem;
    text-align: center;
}

.map-info i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.directions {
    margin-top: 3rem;
}

.directions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.direction-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.direction-item i {
    color: #2563eb;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.direction-item h4 {
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.direction-item p {
    color: #64748b;
    margin: 0;
}

.department-contacts {
    margin-top: 4rem;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.department-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.department-card:hover {
    transform: translateY(-5px);
}

.dept-icon {
    width: 60px;
    height: 60px;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

.dept-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #2563eb;
    font-weight: 500;
}

/* Appointment Page Styles */
.appointment-booking {
    padding: 3rem 0;
}

.booking-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.booking-option {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.booking-option:hover {
    transform: translateY(-5px);
}

.option-icon {
    width: 70px;
    height: 70px;
    background-color: #eff6ff;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 1.5rem;
}

.appointment-form-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.form-container {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eff6ff;
}

.form-submit {
    text-align: center;
    margin-top: 2rem;
}

.form-note {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.clinic-schedule {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

.schedule-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.schedule-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.schedule-item h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-item i {
    color: #2563eb;
}

.schedule-item p {
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

.alternative-booking {
    margin-bottom: 4rem;
}

.booking-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.method-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.method-card:hover {
    transform: translateY(-5px);
}

.method-details {
    margin-top: 1rem;
    text-align: left;
}

.method-details p {
    margin-bottom: 0.5rem;
}

.appointment-info {
    margin-top: 4rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.info-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.info-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card i {
    color: #2563eb;
}

.info-card ul {
    list-style: none;
    margin-left: 0;
}

.info-card ul li {
    margin-bottom: 0.5rem;
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 48px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    /* Mobile Navigation Item Styles */
    .nav-item {
        min-width: auto; /* Remove fixed width on mobile */
        width: 100%;
    }
    
/* Mobile Dropdown Styles - Fix positioning issues */
    .dropdown {
        width: 100%;
    }
    
    .dropdown-toggle {
        justify-content: center;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static !important;
        opacity: 1;
        visibility: visible;
        transform: none !important;
        box-shadow: none;
        border: none;
        background-color: #f8fafc;
        min-width: auto;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-radius: 0;
        margin-top: 0.5rem;
        /* Ensure dropdown stays within viewport */
        left: auto !important;
        right: auto !important;
    }
    
    /* Fix modern navigation dropdown on mobile too */
    .nav-dropdown {
        position: static !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
        background: #f8fafc !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        margin-top: 0.5rem !important;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease, opacity 0.3s ease;
        max-height: 0;
        overflow: hidden;
    }
    
    .nav-item-modern:hover .nav-dropdown,
    .nav-item-modern.active .nav-dropdown {
        opacity: 1;
        visibility: visible;
        max-height: 200px;
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 400px;
    }
    
    .dropdown-link {
        padding: 1rem 2rem;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
        font-size: 0.9rem;
    }
    
    .dropdown-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-link:hover {
        padding-left: 2rem;
        background-color: #eff6ff;
    }
    
    .dropdown-link:hover::before {
        display: none;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Slider Mobile Styles */
    .hero {
        height: 70vh; /* Increased slightly from 65vh */
        min-height: 480px; /* Increased from 450px */
        max-height: 580px; /* Increased from 550px */
        margin-top: -48px;
        padding-top: 48px;
    }
    
    .hero-content {
        padding: 0 1rem;
    }

    .hero-text h1 {
        font-size: 2.25rem; /* Reduced for compact mobile design */
        margin-bottom: 0.875rem;
    }
    
    .hero-text p {
        font-size: 1rem; /* Reduced for compact mobile design */
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    /* Hide slider navigation on mobile */
    .slider-nav {
        display: none;
    }
    
    /* Adjust slider indicators for mobile */
    .slider-indicators {
        bottom: 20px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }

    .content-split {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mission-vision-grid {
        grid-template-columns: 1fr;
    }

    .service-content {
        gap: 0.5rem;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .contact-main {
        margin-bottom: 2rem;
    }
    
    .contact-methods-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.5rem;
    }
    
    /* Two-column layout mobile styles */
    .contact-two-column-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Form is already first, no need to reorder on mobile */
    .contact-form-column {
        order: 0;
    }
    
    .contact-form-card {
        grid-column: 1;
        grid-row: auto;
        order: -1; /* Move form to the top on mobile */
    }

    .appointment-form-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .emergency-content {
        flex-direction: column;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .accreditation-content {
        grid-template-columns: 1fr;
    }

    /* Leadership Section Mobile Styles */
    .leader-card {
        flex-direction: column;
        text-align: center;
    }
    
    .leader-card img {
        width: 220px;
        height: 260px;
        margin: 0 auto;
    }

    .gallery-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
    }

    /* Logo text responsive sizing */
    .logo-text {
        font-size: 1.1rem; /* Proportionally smaller for tablet/mobile */
        font-weight: 600;
        line-height: 1.2;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 40px 0 60px;
        min-height: 280px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .page-header {
        background-attachment: scroll; /* Better performance on mobile */
        min-height: 250px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* Logo text sizing for very small screens */
    .logo-text {
        font-size: 0.95rem; /* Compact but professional size for very small screens */
        font-weight: 600;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn,
    .hamburger {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .page-header {
        background: none;
        color: black;
        padding: 2rem 0;
    }
}
/*
 * Mobile Responsive CSS for St. Peter Hospital Website
 * ====================================================
 * This file contains ONLY mobile-specific optimizations that don't affect desktop.
 * All rules are strictly contained within mobile media queries.
 */

/* =========================
 * MOBILE-ONLY OPTIMIZATIONS
 * All rules only apply to screens 767px and below
 * ========================= */

@media (max-width: 768px) {
    /* Base mobile optimizations */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        font-size: 16px;
        scroll-padding-top: 0 !important; /* Reset to use pseudo-element approach instead */
    }
    
    body {
        padding-top: 70px !important;
        overflow-x: hidden;
        min-width: 320px;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure root elements don't cause horizontal scroll */
    * {
        box-sizing: border-box !important;
    }
    
    html, body {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Force header to be fixed on mobile */
    .header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
        border-bottom: 1px solid rgba(229, 231, 235, 0.8) !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure navbar container stays within bounds */
    .navbar {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure nav container stays within bounds */
    .nav-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Beautiful Modern Hamburger Menu */
    .hamburger {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1200 !important;
        position: relative !important;
        padding: 0.875rem !important;
        background: rgba(255, 255, 255, 0.9) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(229, 231, 235, 0.6) !important;
        border-radius: 12px !important;
        box-shadow: 
            0 4px 6px -1px rgba(0, 0, 0, 0.1) !important,
            0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
        flex-direction: column !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        min-width: 52px !important;
        min-height: 52px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .hamburger:hover {
        background: rgba(248, 250, 252, 0.95) !important;
        border-color: rgba(209, 213, 219, 0.8) !important;
        transform: translateY(-2px) scale(1.05) !important;
        box-shadow: 
            0 10px 15px -3px rgba(0, 0, 0, 0.1) !important,
            0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Beautiful Modern Hamburger bars */
    .bar {
        width: 26px !important;
        height: 3px !important;
        background: linear-gradient(135deg, #374151, #4b5563) !important;
        margin: 3.5px 0 !important;
        border-radius: 2px !important;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        display: block !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Beautiful Modern hamburger animation to X */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg) scale(1.1) !important;
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3) !important;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0 !important;
        transform: scale(0) rotate(180deg) !important;
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg) scale(1.1) !important;
        background: linear-gradient(135deg, #ef4444, #dc2626) !important;
        box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3) !important;
    }
    
    /* Hide modern nav bar on mobile */
    .nav-bar-container {
        display: none !important;
    }
    
    /* Show mobile-only fallback nav */
    .mobile-only {
        display: flex !important;
    }
    
    /* Compact Mobile navigation menu */
    .nav-menu {
        position: fixed !important;
        top: 70px !important;
        left: -100% !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
        border-top: 1px solid rgba(229, 231, 235, 0.8) !important;
        box-shadow: 
            0 25px 50px -12px rgba(0, 0, 0, 0.25) !important,
            0 0 0 1px rgba(255, 255, 255, 0.1) !important;
        z-index: 1100 !important;
        transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        overflow-y: auto !important;
        padding: 1rem 0.75rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.25rem !important;
    }
    
    .nav-menu.active {
        left: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    
    /* Compact mobile navigation items */
    .nav-item {
        width: 95% !important;
        max-width: 320px !important;
        margin-bottom: 0.125rem !important;
    }
    
    /* Compact mobile dropdown styling */
    .dropdown {
        width: 100% !important;
        max-width: 320px !important;
    }
    
    /* Compact dropdown container */
    .dropdown-container {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(229, 231, 235, 0.8) !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        box-shadow: 
            0 2px 4px -1px rgba(0, 0, 0, 0.06) !important,
            0 1px 2px -1px rgba(0, 0, 0, 0.04) !important;
        margin: 0 auto !important;
    }
    
    .dropdown-container:hover {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
        border-color: rgba(209, 213, 219, 0.9) !important;
        transform: translateY(-2px) !important;
        box-shadow: 
            0 10px 15px -3px rgba(0, 0, 0, 0.1) !important,
            0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    }
    
    /* Navigation text link - clickable for navigation */
    .nav-link-text {
        color: #374151 !important;
        font-weight: 600 !important;
        font-size: 1.05rem !important;
        text-decoration: none !important;
        flex: 1 !important;
        text-align: left !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        transition: color 0.3s ease !important;
    }
    
    .nav-link-text:hover {
        color: #1f2937 !important;
        text-decoration: none !important;
    }
    
    .nav-link-text.active {
        color: #2563eb !important;
        font-weight: 700 !important;
    }
    
    /* Compact dropdown arrow button */
    .dropdown-arrow {
        background: rgba(59, 130, 246, 0.1) !important;
        border: 2px solid #3b82f6 !important;
        border-radius: 50% !important;
        width: 32px !important;
        height: 32px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
        flex-shrink: 0 !important;
        margin-left: 6px !important;
    }
    
    .dropdown-arrow:hover {
        background: rgba(59, 130, 246, 0.2) !important;
        transform: scale(1.1) !important;
        border-color: #2563eb !important;
    }
    
    .dropdown-arrow i {
        font-size: 0.875rem !important;
        color: #3b82f6 !important;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
    }
    
    /* Remove pulse animation for better performance */
    
    /* Active dropdown state */
    .dropdown.active .dropdown-container {
        background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%) !important;
        border-color: transparent !important;
        transform: translateY(-1px) !important;
        box-shadow: 
            0 10px 25px -5px rgba(37, 99, 235, 0.4) !important,
            0 4px 6px -2px rgba(0, 0, 0, 0.1) !important;
    }
    
    .dropdown.active .nav-link-text {
        color: white !important;
    }
    
    .dropdown.active .dropdown-arrow {
        background: rgba(255, 255, 255, 0.2) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
        transform: rotate(180deg) scale(1.1) !important;
        animation: none !important;
    }
    
    .dropdown.active .dropdown-arrow i {
        color: white !important;
    }
    
    /* Disable desktop dropdown arrow on mobile */
    .dropdown-menu::before {
        display: none !important;
    }
    
    /* Compact mobile dropdown menu */
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        max-width: 290px !important;
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        margin: 0.25rem auto 0 auto !important;
        /* Hidden by default */
        display: none !important;
        padding: 0 !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
        /* Clear any desktop positioning */
        top: auto !important;
        left: auto !important;
        /* NO TRANSITIONS - instant response */
        transition: none !important;
    }
    
    /* Show dropdown instantly when active */
    .dropdown.active .dropdown-menu {
        display: block !important; /* Instant show */
        max-height: 60vh !important; /* Use viewport height for long lists */
        overflow-y: auto !important; /* Allow scrolling */
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important; /* Smooth scrolling on iOS */
        padding: 0 !important;
    }
    
    /* Disable any hover interference on mobile */
    .dropdown:hover .dropdown-menu {
        /* Don't override active state */
    }
    
    /* Removed complex animations for better mobile performance */
    
    /* Force hover states to be disabled on mobile - but NOT when active */
    .dropdown:hover:not(.active) .dropdown-menu,
    .dropdown.hover:not(.active) .dropdown-menu {
        opacity: 0 !important;
        visibility: hidden !important;
        max-height: 0 !important;
        display: none !important;
    }
    
    /* Ensure active dropdowns always show regardless of hover state */
    .dropdown.active .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        max-height: 60vh !important;
    }
    
    /* Fix z-index issues that might hide dropdowns */
    .nav-menu {
        z-index: 1100 !important;
    }
    
    .dropdown {
        z-index: 1101 !important;
        position: relative !important;
    }
    
    .dropdown-menu {
        z-index: 1102 !important;
    }
    
    
    /* Compact mobile dropdown links */
    .dropdown-link {
        display: block !important;
        padding: 8px 12px !important;
        color: #374151 !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        text-decoration: none !important;
        background: white !important;
        border-bottom: 1px solid #f3f4f6 !important;
        cursor: pointer !important;
        text-align: center !important;
        /* iOS touch target size */
        min-height: 36px !important;
        line-height: 16px !important;
        /* Force clickability */
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1) !important;
        /* Ensure visibility */
        position: relative !important;
        z-index: 1 !important;
        /* No transitions for performance */
        transition: none !important;
    }
    
    .dropdown-link:last-child {
        border-bottom: none !important;
    }
    
    /* Simple hover state */
    .dropdown-link:hover {
        background: #f8fafc !important;
    }
    
    /* Active state for touch feedback */
    .dropdown-link:active {
        background: #e0f2fe !important;
    }
    
    /* Clean mobile dropdown styling */
    
    /* Compact appointment button in mobile nav */
    .btn-appointment {
        background-color: #dc2626 !important;
        color: white !important;
        border: 2px solid #dc2626 !important;
        padding: 12px 20px !important;
        border-radius: 10px !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
        margin-top: 0.75rem !important;
        min-width: 180px !important;
        max-width: 280px !important;
        text-align: center !important;
        align-self: center !important;
    }
    
    .btn-appointment:hover {
        background-color: #b91c1c !important;
        border-color: #b91c1c !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
    }
    
    /* Typography optimizations for mobile */
    h1 {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    h2 {
        font-size: 1.8rem !important;
        line-height: 1.25 !important;
        margin-bottom: 0.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }
    
    h4 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    /* Better paragraph and text readability */
    p, li {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Container optimizations */
    .container {
        padding: 0 16px !important;
        max-width: 100% !important;
    }
    
    section {
        padding: 2rem 0 !important;
        margin: 0 !important;
    }
    
    /* Ensure first section after header has proper clearance */
    section:first-of-type:not(.hero):not(.page-header) {
        padding-top: calc(70px + 2rem) !important;
        margin-top: -70px !important;
    }
    
    /* Make grids single column on mobile */
    .stats-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
    
    .awards-list {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }
    
    .accreditation-logos {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin: 1rem 0 !important;
    }
    
    .contact-methods-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .service-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    /* General grid layouts become single column */
    .news-grid {
        display: grid !important;
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 1.5rem !important;
        align-items: start !important;
    }
    .services-grid,
    .team-grid,
    .gallery-grid,
    .info-cards,
    .values-grid,
    .mission-vision-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    /* Form optimizations */
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        min-height: 44px !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    textarea {
        min-height: 88px !important;
    }
    
    /* Button optimizations */
    .btn,
    button {
        min-height: 44px !important;
        padding: 12px 16px !important;
        touch-action: manipulation !important;
    }
    
    /* Hero optimizations - Fix header overlap */
    .hero {
        min-height: 450px !important;
        height: 65vh !important;
        max-height: 650px !important;
        /* Remove body padding-top effect since we're handling it here */
        margin-top: 0 !important;
        /* Add proper top padding to push hero content below fixed header */
        padding-top: 85px !important; /* 70px header + 15px extra clearance */
        /* Ensure hero content is not hidden */
        position: relative !important;
        /* Ensure hero extends full width */
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
    }
    
    .hero-content {
        text-align: center !important;
        padding: 1rem !important;
        /* Ensure content is properly positioned within hero */
        position: relative !important;
        z-index: 3 !important;
        /* Remove additional margin since padding-top handles spacing */
        margin-top: 0 !important;
        /* Ensure content is vertically centered */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        min-height: 320px !important;
        /* Add max-width to prevent content from being too wide */
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .hero-text h1 {
        font-size: 2rem !important;
        text-shadow: 
            0 0 15px rgba(0, 0, 0, 0.95) !important,
            2px 2px 10px rgba(0, 0, 0, 0.9) !important,
            0 0 30px rgba(0, 0, 0, 0.7) !important,
            -2px -2px 6px rgba(0, 0, 0, 0.8) !important;
        font-weight: 800 !important;
        letter-spacing: -0.01em !important;
    }
    
    .hero-text p {
        font-size: 1.1rem !important;
        text-shadow: 
            0 0 12px rgba(0, 0, 0, 0.95) !important,
            1px 1px 8px rgba(0, 0, 0, 0.9) !important,
            0 0 20px rgba(0, 0, 0, 0.7) !important,
            -1px -1px 4px rgba(0, 0, 0, 0.8) !important;
        font-weight: 500 !important;
    }
    
    .hero-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
        margin-bottom: 3rem !important;
        align-items: center !important;
    }
    
    .hero-buttons .btn {
        width: 100% !important;
        max-width: 280px !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
    }
    
    /* Fix slider navigation positioning on mobile */
    .slider-nav {
        position: absolute !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        padding: 0 1rem !important;
        z-index: 4 !important;
        pointer-events: none !important;
        /* Ensure nav is not hidden under header */
        margin-top: 0 !important;
    }
    
    .slider-btn {
        background: rgba(255, 255, 255, 0.25) !important;
        border: 2px solid rgba(255, 255, 255, 0.4) !important;
        color: white !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        pointer-events: all !important;
        font-size: 1.1rem !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    .slider-btn:hover {
        background: rgba(255, 255, 255, 0.35) !important;
        border-color: rgba(255, 255, 255, 0.6) !important;
        transform: scale(1.1) !important;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Fix slider indicators positioning on mobile */
    .slider-indicators {
        position: absolute !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        gap: 8px !important;
        z-index: 4 !important;
        /* Ensure indicators are visible and accessible */
        margin-bottom: 0 !important;
        padding: 0 !important;
    }
    
    .indicator {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.4) !important;
        border: 2px solid rgba(255, 255, 255, 0.6) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }
    
    .indicator.active,
    .indicator:hover {
        background: rgba(255, 255, 255, 0.9) !important;
        border-color: rgba(255, 255, 255, 1) !important;
        transform: scale(1.2) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }
    
    /* Page header optimizations - Fix header overlap */
    .page-header {
        min-height: 200px !important;
        height: 30vh !important;
        max-height: 300px !important;
        /* Fix padding to account for 70px fixed header */
        padding: calc(70px + 2rem) 0 2rem 0 !important;
        margin-top: -70px !important; /* Pull back to maintain layout */
    }
    
    /* Logo optimization */
    .logo {
        max-height: 65px !important; /* Increased from 50px to match new desktop sizing */
    }
    
    /* Image responsiveness */
    img, video, iframe {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Fix background attachment for mobile performance */
    .hero,
    .page-header,
    .slide {
        background-attachment: scroll !important;
    }
    
    /* Cards and content optimization */
    .card,
    .service-card,
    .team-card,
    .value-card {
        margin-bottom: 1.5rem !important;
        padding: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Info cards with enhanced centering */
    .info-card {
        margin-bottom: 1.5rem !important;
        padding: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .info-card h3 {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto 0.5rem auto !important;
        display: block !important;
        padding: 0 !important;
        font-weight: 600 !important;
        color: #1e293b !important;
    }
    
    .info-card p {
        text-align: center !important;
        width: 100% !important;
        margin: 0.25rem 0 !important;
    }
    
    .info-card .phone-link {
        display: inline-block !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    /* Enhanced News cards for mobile with visible front content */
    .news-card {
        margin-bottom: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
        height: 450px !important; /* Increased height for better content access */
        perspective: 1000px !important;
    }
    
    .news-card-inner {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        transition: transform 0.8s !important;
        transform-style: preserve-3d !important;
    }
    
    .news-card.flipped .news-card-inner {
        transform: rotateY(180deg) !important;
    }
    
    .news-card-front, .news-card-back {
        position: absolute !important;
        width: 100% !important;
        height: 100% !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
        background-color: white !important;
        border-radius: 12px !important;
        box-shadow: 0 5px 20px rgba(0,0,0,0.08) !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .news-card-front {
        transform: rotateY(0deg) !important;
        z-index: 2 !important; /* Ensure front is always on top initially */
    }
    
    .news-card-back {
        transform: rotateY(180deg) !important;
        padding: 0 !important;
    }
    
    .news-card-front img {
        width: 100% !important;
        height: 160px !important; /* Optimal mobile image height */
        object-fit: cover !important;
        flex-shrink: 0 !important;
        display: block !important;
    }
    
    .news-card-front .news-content {
        padding: 1rem !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: 0.4rem !important;
        overflow-y: auto !important;
        min-height: 0 !important;
        background: white !important;
    }
    
    .news-card-front .news-content h3 {
        font-size: 1rem !important;
        line-height: 1.2 !important;
        margin: 0 0 0.5rem 0 !important;
        color: #1e293b !important;
        font-weight: 600 !important;
        flex-shrink: 0 !important;
    }
    
    .news-card-front .news-content p {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
        color: #64748b !important;
        flex: 1 !important;
    }
    
    .news-card-front .read-more {
        background: #2563eb !important;
        color: white !important;
        border: none !important;
        padding: 0.6rem 1rem !important;
        border-radius: 6px !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        align-self: flex-start !important;
        font-size: 0.8rem !important;
        margin-top: 0.5rem !important;
        flex-shrink: 0 !important;
        touch-action: manipulation !important;
    }
    
    .news-card-front .read-more:hover,
    .news-card-front .read-more:active {
        background: #1d4ed8 !important;
        transform: translateY(-1px) !important;
    }
    
    .news-card:not(.flipped) {
        /* Ensure non-flipped cards show front content clearly */
        z-index: 1 !important;
    }
    
    .news-card:not(.flipped) .news-card-front {
        /* Extra visibility assurance for front cards */
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* Mobile-specific news card back styling - Enhanced scrolling */
    .news-card-back {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        height: 100% !important;
        overflow: hidden !important;
        background: white !important;
    }
    
    .news-full-content {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        text-align: left !important;
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        padding: 0 !important; /* Remove padding to maximize space */
        /* Enable momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch !important;
        /* Ensure smooth scrolling */
        scroll-behavior: smooth !important;
        /* Custom scrollbar for mobile */
        scrollbar-width: thin !important;
        scrollbar-color: #2563eb #f1f5f9 !important;
        /* Proper height calculation for maximum content visibility */
        height: auto !important;
        max-height: none !important; /* Remove height restrictions */
        min-height: 300px !important;
        box-sizing: border-box !important;
        /* Force scrolling container */
        position: relative !important;
    }
    
    /* Content wrapper with proper padding */
    .news-full-content > * {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Close button at bottom - mobile specific */
    .news-full-content .close-card {
        margin: 2rem 1rem 1rem 1rem !important; /* More top margin to separate from content */
        padding: 0.75rem 1.2rem !important; /* Slightly larger for better touch */
        align-self: center !important; /* Center the button */
        max-width: 200px !important; /* Limit button width */
        width: calc(100% - 2rem) !important; /* Full width minus margins */
    }
    
    /* News date and title spacing */
    .news-full-content .news-date,
    .news-full-content h3 {
        padding-top: 0.5rem !important;
    }
    
    /* Article content gets bottom padding for scroll space */
    .news-full-content .full-article {
        padding-bottom: 3rem !important; /* Extra space at bottom */
    }
    
    /* Mobile webkit scrollbar styling for news content - Always visible */
    .news-full-content::-webkit-scrollbar {
        width: 6px !important; /* Slightly wider for better visibility */
    }
    
    .news-full-content::-webkit-scrollbar-track {
        background: rgba(241, 245, 249, 0.8) !important;
        border-radius: 3px !important;
    }
    
    .news-full-content::-webkit-scrollbar-thumb {
        background: #2563eb !important;
        border-radius: 3px !important;
        /* Always visible scrollbar */
        min-height: 40px !important;
    }
    
    .news-full-content::-webkit-scrollbar-thumb:hover,
    .news-full-content::-webkit-scrollbar-thumb:active {
        background: #1d4ed8 !important;
    }
    
    /* Force scrollbar to be always visible on mobile */
    .news-full-content {
        scrollbar-width: auto !important; /* Override thin to make it more visible */
    }
    
    /* Mobile scroll indicator for news cards */
    .news-card-back::after {
        content: '' !important;
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 20px !important;
        background: linear-gradient(to top, rgba(255,255,255,0.9) 0%, transparent 100%) !important;
        pointer-events: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
        z-index: 10 !important;
    }
    
    .news-card-back.has-scroll::after {
        opacity: 1 !important;
        animation: fadeInOut 2s ease-in-out infinite !important;
    }
    
    /* Full article content styling for mobile */
    .full-article {
        color: #374151 !important;
        line-height: 1.5 !important;
        padding-bottom: 1rem !important; /* Reduced since button is now at bottom */
        margin-bottom: 1rem !important; /* Add margin to separate from button */
    }
    
    .full-article p {
        margin-bottom: 1rem !important;
        font-size: 0.85rem !important;
    }
    
    .full-article ul {
        margin: 1rem 0 !important;
        padding-left: 1.2rem !important;
    }
    
    .full-article ul li {
        margin-bottom: 0.5rem !important;
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .close-card {
        background: #64748b !important;
        color: white !important;
        border: none !important;
        padding: 0.75rem 1.2rem !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        flex-shrink: 0 !important;
        touch-action: manipulation !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        position: relative !important;
        z-index: 20 !important; /* Above scroll indicator */
        /* Bottom positioning styles */
        margin: 2rem auto 1.5rem auto !important; /* Centered with space from content */
        max-width: 180px !important;
        width: 80% !important;
        box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3) !important;
        transition: all 0.3s ease !important;
        /* Mobile: override desktop order to show at bottom */
        order: 999 !important;
        /* Add subtle visual separation */
        border-top: 1px solid rgba(226, 232, 240, 0.6) !important;
        margin-top: 1.5rem !important;
        padding-top: 1.5rem !important;
    }
    
    .close-card:hover {
        background: #475569 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4) !important;
    }
    
    .close-card:active {
        background: #334155 !important;
        transform: translateY(0) !important;
        box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3) !important;
    }
    
    /* Improve mobile touch interactions */
    .news-card-front .read-more,
    .close-card {
        min-height: 44px !important; /* Minimum touch target size */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Prevent double-tap zoom on news cards */
    .news-card {
        touch-action: manipulation !important;
    }
    
    /* Comprehensive mobile scrolling support */
    @supports (-webkit-overflow-scrolling: touch) {
        .news-full-content {
            -webkit-overflow-scrolling: touch !important;
        }
    }
    
    /* Force scrolling on mobile if needed */
    .news-card.flipped .news-full-content {
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Ensure content is scrollable with proper boundaries */
    .news-card-back {
        contain: layout !important;
    }
    
    /* Enhanced content accessibility rules */
    .news-card.flipped {
        /* Ensure flipped card takes full height */
        height: 100% !important;
    }
    
    .news-card.flipped .news-card-back {
        /* Full height for back card when flipped */
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .news-card.flipped .news-full-content {
        /* Maximum available space for content */
        flex: 1 !important;
        height: 100% !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Ensure all content elements are visible and accessible */
    .full-article p,
    .full-article ul,
    .full-article li {
        margin-bottom: 0.8rem !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .full-article ul li:last-child,
    .full-article p:last-child {
        margin-bottom: 2rem !important; /* Extra space at the end */
    }
    
    /* ========================================
     * LEADER CARD MOBILE STYLING (Same as News Cards)
     * ========================================*/
    
    /* Leader card back styling - Enhanced scrolling */
    .leader-card-back {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        height: 100% !important;
        overflow: hidden !important;
        background: white !important;
    }
    
    .leader-full-info {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        text-align: left !important;
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        padding: 0 !important; /* Remove padding to maximize space */
        /* Enable momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch !important;
        /* Ensure smooth scrolling */
        scroll-behavior: smooth !important;
        /* Custom scrollbar for mobile */
        scrollbar-width: thin !important;
        scrollbar-color: #2563eb #f1f5f9 !important;
        /* Proper height calculation for maximum content visibility */
        height: auto !important;
        max-height: none !important; /* Remove height restrictions */
        min-height: 300px !important;
        box-sizing: border-box !important;
        /* Force scrolling container */
        position: relative !important;
    }
    
    /* Content wrapper with minimal padding for leader cards */
    .leader-full-info > * {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    /* Close button at bottom - leader card specific */
    .leader-full-info .close-leader-card {
        margin: 2rem 1rem 1rem 1rem !important; /* More top margin to separate from content */
        padding: 0.75rem 1.2rem !important; /* Slightly larger for better touch */
        align-self: center !important; /* Center the button */
        max-width: 200px !important; /* Limit button width */
        width: calc(100% - 2rem) !important; /* Full width minus margins */
    }
    
    /* Leader card header spacing */
    .leader-full-info .leader-header {
        padding-top: 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Leader biography content gets bottom spacing */
    .leader-full-info .leader-biography {
        padding-bottom: 1rem !important; /* Reduced since button is now at bottom */
        margin-bottom: 1rem !important; /* Add margin to separate from button */
    }
    
    /* Main styling for close-leader-card button (same as news cards) */
    .close-leader-card {
        background: #64748b !important;
        color: white !important;
        border: none !important;
        padding: 0.75rem 1.2rem !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        flex-shrink: 0 !important;
        touch-action: manipulation !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        position: relative !important;
        z-index: 20 !important; /* Above scroll indicator */
        /* Bottom positioning styles */
        margin: 2rem auto 1.5rem auto !important; /* Centered with space from content */
        max-width: 180px !important;
        width: 80% !important;
        box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3) !important;
        transition: all 0.3s ease !important;
        /* Mobile: override desktop order to show at bottom */
        order: 999 !important;
        /* Add subtle visual separation */
        border-top: 1px solid rgba(226, 232, 240, 0.6) !important;
        margin-top: 1.5rem !important;
        padding-top: 1.5rem !important;
        /* Minimum touch target size */
        min-height: 44px !important;
    }
    
    .close-leader-card:hover {
        background: #475569 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(100, 116, 139, 0.4) !important;
    }
    
    .close-leader-card:active {
        background: #334155 !important;
        transform: translateY(0) !important;
        box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3) !important;
    }
    
    /* Mobile webkit scrollbar styling for leader content */
    .leader-full-info::-webkit-scrollbar {
        width: 6px !important; /* Slightly wider for better visibility */
    }
    
    .leader-full-info::-webkit-scrollbar-track {
        background: rgba(241, 245, 249, 0.8) !important;
        border-radius: 3px !important;
    }
    
    .leader-full-info::-webkit-scrollbar-thumb {
        background: #2563eb !important;
        border-radius: 3px !important;
        /* Always visible scrollbar */
        min-height: 40px !important;
    }
    
    .leader-full-info::-webkit-scrollbar-thumb:hover,
    .leader-full-info::-webkit-scrollbar-thumb:active {
        background: #1d4ed8 !important;
    }
    
    /* Force scrollbar to be always visible on mobile for leader cards */
    .leader-full-info {
        scrollbar-width: auto !important; /* Override thin to make it more visible */
    }
    
    /* Table responsiveness */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    table {
        min-width: 600px !important;
        font-size: 0.9rem !important;
    }
    
    /* Accessibility improvements */
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 3px solid #2563eb !important;
        outline-offset: 2px !important;
    }
    
    /* Performance optimizations */
    *,
    *::before,
    *::after {
        animation-duration: 0.2s !important;
        transition-duration: 0.2s !important;
    }
    
    /* Touch optimization */
    button, 
    input, 
    select, 
    textarea, 
    a,
    .btn,
    .nav-link {
        touch-action: manipulation !important;
    }
    
    /* Mobile Footer Comprehensive Styling */
    .footer-logo img {
        height: 35px !important; /* Slightly increased from 30px to maintain proportion with header logo */
        max-height: 35px !important;
    }
    
    .footer-logo span {
        font-size: 0.8rem !important; /* More readable on mobile */
    }
    
    .footer-logo {
        gap: 8px !important; /* Reduced gap */
        margin-bottom: 0.5rem !important;
    }
    
    /* Footer section text sizing for mobile */
    .footer-section h4 {
        font-size: 0.8rem !important; /* More readable headings */
        margin-bottom: 0.5rem !important;
    }
    
    .footer-section p {
        font-size: 0.7rem !important; /* More readable paragraph text */
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .footer-section ul li {
        font-size: 0.7rem !important; /* More readable list text */
        margin-bottom: 0.25rem !important;
        line-height: 1.3 !important;
    }
    
    .footer-section a {
        font-size: 0.7rem !important; /* More readable link text */
        line-height: 1.3 !important;
    }
    
    /* Footer services column text */
    .service-column ul li {
        font-size: 0.7rem !important;
        margin-bottom: 0.2rem !important;
        white-space: normal !important; /* Allow wrapping on mobile */
    }
    
    .service-column a {
        font-size: 0.7rem !important;
        white-space: normal !important; /* Allow wrapping on mobile */
        line-height: 1.2 !important;
    }
    
    .footer-services h4 {
        font-size: 0.8rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    /* Contact info text sizing */
    .contact-item span {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
    
    /* Social links sizing */
    .social-links a {
        width: 32px !important; /* Smaller social icons */
        height: 32px !important;
        font-size: 0.8rem !important;
    }
    
    /* Footer bottom text - Match footer section text size exactly */
    .footer .footer-bottom,
    footer .footer-bottom,
    .footer-bottom,
    .footer .footer-bottom p,
    footer .footer-bottom p,
    .footer-bottom p {
        font-size: 0.7rem !important; /* Same size as footer section text */
        padding-top: 0.5rem !important;
        line-height: 1.3 !important;
    }
    
    .footer .footer-bottom a,
    footer .footer-bottom a,
    .footer-bottom a,
    .footer .footer-bottom p a,
    footer .footer-bottom p a,
    .footer-bottom p a {
        font-size: 0.7rem !important;
    }
    
    /* Hide slider navigation on mobile */
    .slider-nav {
        display: none !important;
    }
    
    /* Ultra-specific mobile indicator sizing */
    .hero .slider-indicators .indicator,
    section.hero .slider-indicators .indicator,
    .slider-indicators button.indicator,
    button.indicator {
        width: 12px !important;
        height: 12px !important;
        min-width: 12px !important;
        min-height: 12px !important;
        max-width: 12px !important;
        max-height: 12px !important;
        border-width: 2px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Ultra-specific mobile indicator container */
    .hero .slider-indicators,
    section.hero .slider-indicators,
    .slider-indicators {
        bottom: 10px !important;
        gap: 12px !important;
        z-index: 10 !important;
    }
    
    /* Reduce scaling effects on mobile indicators */
    .hero .slider-indicators .indicator:hover,
    .slider-indicators .indicator:hover,
    button.indicator:hover {
        transform: scale(1.02) !important;
    }
    
    .hero .slider-indicators .indicator.active,
    .slider-indicators .indicator.active,
    button.indicator.active {
        transform: scale(1.05) !important;
        animation: none !important; /* Remove pulse animation on mobile */
    }
    
    /* Remove pseudo-element effects on mobile */
    .indicator::before {
        display: none !important;
    }
}

/* NUCLEAR OVERRIDE for 480px screens */
@media (max-width: 480px) {
    html body .footer .footer-bottom,
    html body footer .footer-bottom,
    html body .footer-bottom,
    html body .footer .footer-bottom p,
    html body footer .footer-bottom p,
    html body .footer-bottom p {
        font-size: 0.6rem !important;
        line-height: 1.3 !important;
    }
    
    html body .footer .footer-bottom a,
    html body footer .footer-bottom a,
    html body .footer-bottom a,
    html body .footer .footer-bottom p a,
    html body footer .footer-bottom p a,
    html body .footer-bottom p a {
        font-size: 0.6rem !important;
    }
}

/* NUCLEAR OVERRIDE for 374px screens */
@media (max-width: 374px) {
    html body .footer .footer-bottom,
    html body footer .footer-bottom,
    html body .footer-bottom,
    html body .footer .footer-bottom p,
    html body footer .footer-bottom p,
    html body .footer-bottom p {
        font-size: 0.55rem !important;
        line-height: 1.2 !important;
    }
    
    html body .footer .footer-bottom a,
    html body footer .footer-bottom a,
    html body .footer-bottom a,
    html body .footer .footer-bottom p a,
    html body footer .footer-bottom p a,
    html body .footer-bottom p a {
        font-size: 0.55rem !important;
    }
}

/* Very small screens (320px-480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem !important;
    }
    
    h2 {
        font-size: 1.6rem !important;
    }
    
    /* Further optimize news cards for very small screens */
    .news-card {
        height: 400px !important; /* Better height for content access on small screens */
    }
    
    .news-card-front img {
        height: 140px !important; /* Smaller image for very small screens */
    }
    
    .news-card-front .news-content {
        padding: 0.8rem !important;
        gap: 0.3rem !important;
    }
    
    .news-card-front .news-content h3 {
        font-size: 0.95rem !important;
    }
    
    .news-card-front .news-content p {
        font-size: 0.8rem !important;
    }
    
    .news-card-front .read-more {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.8rem !important;
    }
    
    h3 {
        font-size: 1.3rem !important;
    }
    
    .container {
        padding: 0 12px !important;
    }
    
    /* Footer text for very small screens */
    .footer-section h4 {
        font-size: 0.7rem !important;
    }
    
    .footer-section p,
    .footer-section ul li,
    .footer-section a,
    .service-column ul li,
    .service-column a,
    .contact-item span {
        font-size: 0.6rem !important;
    }
    
    .footer .footer-bottom,
    footer .footer-bottom,
    .footer-bottom,
    .footer .footer-bottom p,
    footer .footer-bottom p,
    .footer-bottom p {
        font-size: 0.6rem !important; /* Same size as footer section text */
    }
    
    .footer .footer-bottom a,
    footer .footer-bottom a,
    .footer-bottom a,
    .footer .footer-bottom p a,
    footer .footer-bottom p a,
    .footer-bottom p a {
        font-size: 0.6rem !important;
    }
    
    section {
        padding: 1.5rem 0 !important;
    }
    
    .card,
    .service-card {
        padding: 1rem !important;
    }
    
    .info-card {
        padding: 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    
    
    .news-date {
        font-size: 0.85rem !important;
        margin-bottom: 0.4rem !important;
        flex-shrink: 0 !important;
        color: #2563eb !important;
        font-weight: 500 !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    
    .hero-text h1 {
        font-size: 1.8rem !important;
    }
    
    .hero-buttons .btn {
        font-size: 0.9rem !important;
        padding: 12px 16px !important;
    }
}

/* Extra small screens (below 375px) */
@media (max-width: 374px) {
    .container {
        padding: 0 8px !important;
    }
    
    
    .hero-text h1 {
        font-size: 1.6rem !important;
    }
    
    .logo {
        max-height: 50px !important; /* Increased from 40px for better visibility on small screens */
    }
    
    .logo-text {
        font-size: 0.8rem !important;
    }
    
    /* News cards for extra small screens */
    .news-card {
        height: 380px !important; /* Better height for content access */
    }
    
    .news-card-front img {
        height: 120px !important;
    }
    
    .news-card-front .news-content {
        padding: 0.7rem !important;
    }
    
    .news-card-front .news-content h3 {
        font-size: 0.9rem !important;
        line-height: 1.1 !important;
    }
    
    .news-card-front .news-content p {
        font-size: 0.75rem !important;
    }
    
    .news-date {
        font-size: 0.8rem !important;
    }
    
    /* Footer text for extra small screens */
    .footer-logo span {
        font-size: 0.6rem !important;
    }
    
    .footer-section h4 {
        font-size: 0.65rem !important;
    }
    
    .footer-section p,
    .footer-section ul li,
    .footer-section a,
    .service-column ul li,
    .service-column a,
    .contact-item span {
        font-size: 0.55rem !important;
        line-height: 1.2 !important;
    }
    
    .footer .footer-bottom,
    footer .footer-bottom,
    .footer-bottom,
    .footer .footer-bottom p,
    footer .footer-bottom p,
    .footer-bottom p {
        font-size: 0.55rem !important; /* Same size as footer section text */
        line-height: 1.2 !important;
    }
    
    .footer .footer-bottom a,
    footer .footer-bottom a,
    .footer-bottom a,
    .footer .footer-bottom p a,
    footer .footer-bottom p a,
    .footer-bottom p a {
        font-size: 0.55rem !important;
    }
    
    .social-links a {
        width: 28px !important; /* Very small social icons */
        height: 28px !important;
        font-size: 0.7rem !important;
    }
}

/* Desktop Preservation Rules - Prevent mobile overrides from affecting desktop */
@media (min-width: 768px) {
    /* Ensure consistent news card behavior across all screen sizes */
    .news-card {
        height: 480px !important;
        min-height: auto !important;
        max-height: auto !important;
        margin-bottom: 2rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .news-card-front {
        height: 100% !important;
        min-height: auto !important;
        max-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .news-card-front img {
        height: 220px !important;
        object-fit: cover !important;
        flex-shrink: 0 !important;
    }
    
    .news-card-front .news-content {
        padding: 1.3rem !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        gap: 0.5rem !important;
        overflow-y: auto !important;
        min-height: 0 !important;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 #f8fafc;
    }
    
    .news-card-front .news-content h3 {
        font-size: 1.1rem !important;
        line-height: 1.2 !important;
        margin: 0 0 0.5rem 0 !important;
        flex-shrink: inherit !important;
    }
    
    .news-card-front .news-content p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
        flex: inherit !important;
    }
    
    .news-card-front .read-more {
        background: #2563eb !important;
        color: white !important;
        border: none !important;
        padding: 0.6rem 1.2rem !important;
        border-radius: 6px !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        align-self: flex-start !important;
        font-size: 0.85rem !important;
        margin-top: 0.5rem !important;
        flex-shrink: 0 !important;
    }
    
    .news-date {
        color: #2563eb !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        display: block !important;
        margin-bottom: 0.5rem !important;
        flex-shrink: inherit !important;
    }
    
    /* Restore other desktop card styles */
    .card,
    .service-card,
    .team-card,
    .value-card {
        margin-bottom: inherit !important;
        padding: inherit !important;
        width: inherit !important;
        box-sizing: inherit !important;
    }
    
    /* Maintain info card centering on desktop */
    .info-card {
        margin-bottom: inherit !important;
        padding: 2rem !important;
        width: inherit !important;
        box-sizing: inherit !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    
    .info-card h3 {
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto 0.5rem auto !important;
        display: block !important;
        padding: 0 !important;
        font-weight: 600 !important;
        font-size: 1.25rem !important;
        color: #1e293b !important;
    }
    
    .info-card p {
        text-align: center !important;
        width: 100% !important;
        margin: 0.25rem 0 !important;
    }
    
    .info-card .phone-link {
        display: inline-block !important;
        text-align: center !important;
        width: 100% !important;
    }
}

/* =========================
 * FINAL MOBILE INDICATOR OVERRIDE
 * Ultra-specific rules to ensure small indicators on mobile
 * ========================= */

@media screen and (max-width: 768px) {
    /* Nuclear option - force bigger indicators for mobile touch */
    html body section.hero div.slider-indicators button.indicator,
    html body .hero .slider-indicators .indicator,
    html body .slider-indicators button.indicator {
        width: 12px !important;
        height: 12px !important;
        min-width: 12px !important;
        min-height: 12px !important;
        max-width: 12px !important;
        max-height: 12px !important;
        font-size: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border-width: 2px !important;
        box-sizing: border-box !important;
    }
    
    /* Force minimal scaling */
    html body section.hero div.slider-indicators button.indicator:hover,
    html body .hero .slider-indicators .indicator:hover {
        transform: scale(1.02) !important;
    }
    
    html body section.hero div.slider-indicators button.indicator.active,
    html body .hero .slider-indicators .indicator.active {
        transform: scale(1.05) !important;
        animation: none !important;
    }
    
    /* Remove all pseudo-elements */
    html body .slider-indicators .indicator::before,
    html body .slider-indicators .indicator::after {
        display: none !important;
        content: none !important;
    }
    
    /* Ultra-specific footer logo mobile sizing */
    html body .footer .footer-logo img,
    html body footer .footer-logo img,
    .footer .footer-logo img {
        height: 25px !important;
        max-height: 25px !important;
        width: auto !important;
    }
    
    html body .footer .footer-logo span,
    html body footer .footer-logo span,
    .footer .footer-logo span {
        font-size: 0.6rem !important;
        line-height: 1.2 !important;
    }
    
    html body .footer .footer-logo,
    html body footer .footer-logo,
    .footer .footer-logo {
        gap: 5px !important;
        margin-bottom: 0.3rem !important;
    }
    
    /* NUCLEAR OPTION: Force footer-bottom text to match footer section text */
    html body .footer .footer-bottom,
    html body footer .footer-bottom,
    html body .footer-bottom,
    html body .footer .footer-bottom p,
    html body footer .footer-bottom p,
    html body .footer-bottom p {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }
    
    html body .footer .footer-bottom a,
    html body footer .footer-bottom a,
    html body .footer-bottom a,
    html body .footer .footer-bottom p a,
    html body footer .footer-bottom p a,
    html body .footer-bottom p a {
        font-size: 0.7rem !important;
    }
}

/* =========================
 * SMALL MOBILE OPTIMIZATIONS
 * Additional fixes for very small screens (480px and below)
 * ========================= */
@media (max-width: 480px) {
    /* Enhanced hero section positioning for small screens */
    .hero {
        min-height: 400px !important;
        height: 60vh !important;
        max-height: 550px !important;
        /* Increase padding for smaller screens where header might be slightly larger */
        padding-top: 90px !important; /* 70px header + 20px extra clearance */
    }
    
    .hero-content {
        padding: 0.75rem !important;
        min-height: 280px !important;
    }
    
    .hero-text h1 {
        font-size: 1.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .hero-text p {
        font-size: 1rem !important;
        margin-bottom: 1.25rem !important;
    }
    
    /* Adjust slider controls for small screens */
    .slider-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
    }
    
    .slider-nav {
        padding: 0 0.75rem !important;
    }
    
    .slider-indicators {
        bottom: 15px !important;
        gap: 6px !important;
    }
    
    .indicator {
        width: 10px !important;
        height: 10px !important;
    }
    
    /* Ensure body has proper spacing */
    body {
        padding-top: 75px !important; /* Slightly more padding for small screens */
    }
    
    /* Adjust header height for small screens */
    .header {
        min-height: 70px !important;
    }
}

/* =========================
 * DROPDOWN POSITIONING FIX
 * Prevents dropdowns from hiding at screen edges
 * ========================= */

@media (max-width: 1200px) {
    /* Enhanced dropdown positioning for smaller screens */
    .nav-dropdown {
        /* Use right alignment for items on the right side of screen */
        left: auto !important;
        right: 0 !important;
        transform: none !important;
        /* Ensure dropdown stays within viewport */
        max-width: calc(100vw - 40px) !important;
        /* Prevent overflow */
        overflow-x: hidden !important;
    }
    
    /* For navigation items that are positioned on the left side, align dropdown to left */
    .nav-item-modern:first-child .nav-dropdown,
    .nav-item-modern:nth-child(2) .nav-dropdown {
        left: 0 !important;
        right: auto !important;
        transform: none !important;
    }
    
    /* For center navigation items, use smart centering that respects viewport bounds */
    .nav-item-modern:nth-child(3) .nav-dropdown {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        /* Add media query constraint to prevent overflow */
    }
}

@media (max-width: 992px) {
    /* More aggressive positioning fixes for tablet/small desktop */
    .nav-dropdown {
        /* Always align to right edge for better mobile experience */
        left: auto !important;
        right: 0 !important;
        transform: none !important;
        /* Reduce width for better mobile experience */
        min-width: 160px !important;
        max-width: calc(100vw - 60px) !important;
    }
    
    /* Exception for first navigation item */
    .nav-item-modern:first-child .nav-dropdown {
        left: 0 !important;
        right: auto !important;
    }
}

@media (max-width: 768px) {
    /* Mobile-specific dropdown positioning - center under navigation icons */
    .nav-dropdown {
        /* Center the dropdown under the navigation icon */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        /* Ensure proper sizing for mobile */
        min-width: 140px !important;
        max-width: calc(100vw - 40px) !important;
        /* Remove margins since we're centering */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Handle edge cases where centering would cause overflow */
    .nav-item-modern:first-child .nav-dropdown {
        /* For leftmost items, ensure minimum left margin */
        left: max(50%, 80px) !important;
        transform: translateX(-50%) !important;
    }
    
    .nav-item-modern:last-child .nav-dropdown {
        /* For rightmost items, ensure minimum right margin */
        left: min(50%, calc(100vw - 80px)) !important;
        transform: translateX(-50%) !important;
    }
    
    /* Ensure dropdown links are properly sized for touch */
    .nav-dropdown a {
        padding: 12px 14px !important;
        font-size: 12px !important;
        /* Ensure adequate touch target size */
        min-height: 40px !important;
        display: flex !important;
        align-items: center !important;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile screens - centered positioning with overflow protection */
    .nav-dropdown {
        /* Center under navigation icon with safety bounds */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        min-width: 120px !important;
        max-width: calc(100vw - 60px) !important;
        /* Remove margins for cleaner centering */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Enhanced edge protection for very small screens */
    .nav-item-modern:first-child .nav-dropdown {
        /* Ensure leftmost dropdown doesn't overflow left edge */
        left: max(50%, 75px) !important;
        transform: translateX(-50%) !important;
    }
    
    .nav-item-modern:last-child .nav-dropdown {
        /* Ensure rightmost dropdown doesn't overflow right edge */
        left: min(50%, calc(100vw - 75px)) !important;
        transform: translateX(-50%) !important;
    }
    
    /* Optimize dropdown content for very small screens */
    .nav-dropdown a {
        padding: 10px 12px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }
}

/* Additional utility class for JavaScript-based positioning */
.nav-dropdown.align-left {
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    margin-left: 10px !important;
    margin-right: 0 !important;
}

.nav-dropdown.align-right {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    margin-left: 0 !important;
    margin-right: 10px !important;
}

.nav-dropdown.align-center {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Mobile-specific utility classes with higher specificity */
@media (max-width: 768px) {
    .nav-dropdown.align-left {
        left: max(50%, 80px) !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .nav-dropdown.align-right {
        left: min(50%, calc(100vw - 80px)) !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .nav-dropdown.align-center {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Prevent dropdown from extending beyond navbar bounds */
@media (max-width: 1200px) {
    .nav-bar {
        /* Ensure nav bar can contain positioned dropdowns */
        position: relative !important;
        overflow: visible !important;
    }
    
    .nav-item-modern {
        /* Ensure nav items can contain their dropdowns */
        position: relative !important;
        overflow: visible !important;
    }
}

/* =========================
 * TOP BACK BUTTONS FOR FLIP CARDS
 * Styling for the additional back buttons at the top of flip card backs
 * ========================= */

/* News card top back button - FIXED POSITION */
.close-card-top {
    position: fixed !important; /* Changed from absolute to fixed */
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c) !important; /* Red gradient */
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important; /* Slightly larger for better visibility */
    height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 1000 !important; /* Higher z-index for fixed positioning */
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important; /* Enhanced shadow for fixed element */
    font-size: 16px !important; /* Slightly larger icon */
    padding: 0 !important;
    min-height: 40px !important;
    touch-action: manipulation !important;
    backdrop-filter: blur(10px) !important; /* Add blur effect for modern look */
}

.close-card-top:hover {
    background: linear-gradient(135deg, #f87171, #ef4444, #dc2626) !important; /* Lighter red gradient on hover */
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.close-card-top:active {
    background: linear-gradient(135deg, #dc2626, #b91c1c, #991b1b) !important; /* Darker red gradient on click */
    transform: scale(0.95) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

.close-card-top i {
    font-size: 14px !important;
    color: white !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Leader card top back button - FIXED POSITION */
.close-leader-card-top {
    position: fixed !important; /* Changed from absolute to fixed */
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c) !important; /* Red gradient */
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 40px !important; /* Slightly larger for better visibility */
    height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 1000 !important; /* Higher z-index for fixed positioning */
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important; /* Enhanced shadow for fixed element */
    font-size: 16px !important; /* Slightly larger icon */
    padding: 0 !important;
    min-height: 40px !important;
    touch-action: manipulation !important;
    backdrop-filter: blur(10px) !important; /* Add blur effect for modern look */
}

.close-leader-card-top:hover {
    background: linear-gradient(135deg, #f87171, #ef4444, #dc2626) !important; /* Lighter red gradient on hover */
    transform: scale(1.1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.close-leader-card-top:active {
    background: linear-gradient(135deg, #dc2626, #b91c1c, #991b1b) !important; /* Darker red gradient on click */
    transform: scale(0.95) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

.close-leader-card-top i {
    font-size: 14px !important;
    color: white !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Mobile optimizations for fixed top back buttons */
@media (max-width: 768px) {
    .close-card-top,
    .close-leader-card-top {
        width: 44px !important; /* Larger for mobile */
        height: 44px !important;
        top: 20px !important; /* More space from top on mobile */
        right: 20px !important; /* More space from edge on mobile */
        font-size: 18px !important;
        /* Enhanced visibility and touch target for mobile */
    }
    
    .close-card-top i,
    .close-leader-card-top i {
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    .close-card-top,
    .close-leader-card-top {
        width: 42px !important;
        height: 42px !important;
        top: 15px !important;
        right: 15px !important;
        font-size: 17px !important;
        /* Optimized for very small screens */
    }
    
    .close-card-top i,
    .close-leader-card-top i {
        font-size: 17px !important;
    }
}

/* Ensure card backs work well with fixed top buttons */
.news-card-back,
.leader-card-back {
    position: relative !important;
    /* Ensure proper positioning for scrollable content under fixed button */
    height: 100% !important;
    overflow: hidden !important;
}

/* Show/hide fixed button based on card state */
.close-card-top,
.close-leader-card-top {
    /* Hide by default */
    display: none !important;
}

/* Show button only when cards are flipped */
.news-card.flipped .close-card-top,
.leader-card.flipped .close-leader-card-top {
    display: flex !important;
    animation: topButtonFadeIn 0.3s ease 0.3s both;
    /* Show with fade-in animation after card flip */
}

@keyframes topButtonFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Ensure fixed top button doesn't interfere with scrolling content */
.news-full-content,
.leader-full-info {
    /* No top padding needed since button is now fixed */
    padding-top: 20px !important;
    /* Standard bottom padding for content */
    padding-bottom: 20px !important;
    /* Ensure content can scroll under the fixed button */
    position: relative !important;
}

@media (max-width: 768px) {
    .news-full-content,
    .leader-full-info {
        /* Slightly more padding for mobile */
        padding-top: 25px !important;
        padding-bottom: 25px !important;
    }
}


/* =========================
 * EXTRA SMALL MOBILE SCREENS
 * Additional fixes for screens 480px and below
 * ========================= */

@media (max-width: 480px) {
    /* Ensure header is absolutely full width on very small screens */
    .header {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .navbar {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .nav-container {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Ensure logo and hamburger fit properly */
    .nav-logo {
        max-width: calc(100vw - 80px) !important;
        overflow: hidden !important;
    }
    
    .logo-text {
        font-size: clamp(0.8rem, 4vw, 1rem) !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .hamburger {
        flex-shrink: 0 !important;
        min-width: 52px !important;
        width: 52px !important;
    }
}

/* =========================
 * EXTRA SMALL MOBILE OPTIMIZATIONS
 * For very small screens (360px and below)
 * ========================= */
@media (max-width: 360px) {
    .hero {
        min-height: 350px !important;
        height: 55vh !important;
        max-height: 500px !important;
        padding-top: 95px !important; /* Extra clearance for very small screens */
    }
    
    .hero-content {
        padding: 0.5rem !important;
        min-height: 250px !important;
    }
    
    .hero-text h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-text p {
        font-size: 0.95rem !important;
    }
    
    .slider-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 0.9rem !important;
    }
    
    .slider-nav {
        padding: 0 0.5rem !important;
    }
    
    .indicator {
        width: 8px !important;
        height: 8px !important;
    }
    
    /* Extra compact navigation for very small screens */
    .nav-menu {
        padding: 1rem 0.75rem !important;
        gap: 0.375rem !important;
    }
    
    .nav-item {
        max-width: 280px !important;
        margin-bottom: 0.125rem !important;
    }
    
    .dropdown {
        max-width: 280px !important;
    }
    
    .dropdown-container {
        padding: 0.75rem 1rem !important;
        border-radius: 10px !important;
    }
    
    .dropdown-arrow {
        width: 28px !important;
        height: 28px !important;
        margin-left: 6px !important;
    }
    
    .dropdown-arrow i {
        font-size: 0.75rem !important;
    }
    
    .dropdown-menu {
        max-width: 260px !important;
        margin: 0.25rem auto 0 auto !important;
    }
    
    .dropdown-link {
        padding: 8px 12px !important;
        font-size: 14px !important;
        min-height: 36px !important;
        line-height: 16px !important;
    }
    
    .btn-appointment {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        min-width: 160px !important;
        max-width: 240px !important;
        margin-top: 0.5rem !important;
    }
}

