/* =======================================================
 * TPQ AL HIKMAH - FULL CSS WITH GREEN & WHITE THEME
 * Version: 5.3 - Fixed Navbar & Hero Spacing Issue
 * ====================================================== */

/* =======================================================
   CSS CUSTOM PROPERTIES (CSS VARIABLES)
   ======================================================= */

:root {
    /* Color System */
    --color-primary: #2e8b57;
    --color-secondary: #20b2aa;
    --color-accent: #ffd700;
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --gradient-hero: linear-gradient(135deg, var(--color-primary), var(--color-success), #166534);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
    
    /* Spacing System */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Typography */
    --font-family-primary: 'Poppins', system-ui, -apple-system, sans-serif;
    --font-family-arabic: 'Amiri', 'Times New Roman', serif;
    
    /* Animation Easing */
    --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out-cubic: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-2xl: 1.5rem;
    --border-radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s var(--ease-out-cubic);
    --transition-normal: 0.3s var(--ease-out-cubic);
    --transition-slow: 0.5s var(--ease-out-cubic);
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 9999;
    
    /* Navbar Height Variables */
    --navbar-height-mobile: 4.5rem;
    --navbar-height-tablet: 5rem;
    --navbar-height-desktop: 6rem;
    --navbar-height-scrolled: 4rem;
}

/* =======================================================
   ENHANCED KEYFRAME ANIMATIONS
   ======================================================= */

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% { 
        transform: translateY(-10px) rotate(0deg); 
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        max-height: 800px;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -20px, 0);
    }
    70% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDownNavbar {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =======================================================
   ENHANCED BACKGROUND PATTERNS & EFFECTS
   ======================================================= */

.bg-islamic-pattern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cdefs%3E%3Cpattern id='islamic-star' x='0' y='0' width='60' height='60' patternUnits='userSpaceOnUse'%3E%3Cg fill='white' opacity='0.1'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3Cpath d='M30 20 L35 25 L40 20 L35 15 Z' opacity='0.3'/%3E%3Cpath d='M20 30 L25 35 L20 40 L15 35 Z' opacity='0.3'/%3E%3Cpath d='M40 30 L45 35 L40 40 L35 35 Z' opacity='0.3'/%3E%3Cpath d='M30 40 L35 45 L40 40 L35 35 Z' opacity='0.3'/%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Crect width='120' height='120' fill='url(%23islamic-star)'/%3E%3C/svg%3E");
    background-size: 120px 120px;
    background-repeat: repeat;
    animation: float 6s ease-in-out infinite;
}

.backdrop-blur-enhanced {
    backdrop-filter: blur(12px) saturate(1.8);
    -webkit-backdrop-filter: blur(12px) saturate(1.8);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@supports (backdrop-filter: blur(12px)) {
    .backdrop-blur-enhanced {
        background: rgba(255, 255, 255, 0.75);
    }
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) saturate(1.5);
    -webkit-backdrop-filter: blur(10px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* =======================================================
   FIXED HEADER & NAVBAR - MAIN FIX
   ======================================================= */

#header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(46, 139, 87, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-normal);
    transform: translateY(-100%);
    animation: slideDownNavbar 0.8s ease-out forwards;
    animation-delay: 0.3s;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

/* Navbar container dengan padding yang responsif */
#header .container {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all var(--transition-normal);
}

#header.scrolled .container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Navbar brand container */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 51;
}

/* Logo navbar yang responsif */
#header .navbar-logo {
    height: 2.5rem;
    width: auto;
    transition: all var(--transition-normal);
}

#header.scrolled .navbar-logo {
    height: 2rem;
}

/* Teks navbar yang responsif */
#header .navbar-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-family-arabic);
    color: var(--color-primary);
    transition: all var(--transition-normal);
}

#header.scrolled .navbar-title {
    font-size: 1.25rem;
}

/* Icon navbar yang responsif */
#header .navbar-icon {
    font-size: 1.5rem;
    color: var(--color-accent);
    transition: all var(--transition-normal);
}

#header.scrolled .navbar-icon {
    font-size: 1.25rem;
}

/* Background overlay untuk navbar */
#header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(255, 255, 255, 0.9) 100%);
    z-index: -1;
    transition: opacity var(--transition-normal);
}

#header.scrolled::before {
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.98) 0%, 
        rgba(255, 255, 255, 0.95) 100%);
}

/* Hover effects untuk navbar items */
#header .navbar-item {
    transition: all var(--transition-normal);
}

#header .navbar-item:hover {
    transform: translateY(-2px);
    color: var(--color-secondary);
}

/* =======================================================
   HERO SECTION - SPACING FIX
   ======================================================= */

/* Hero section dengan padding-top yang cukup untuk mengompensasi fixed navbar */
.hero-section {
    padding-top: var(--navbar-height-mobile) !important;
    min-height: 100vh;
    position: relative;
}

/* Hero content container */
.hero-content {
    margin-top: 0 !important;
    padding-top: 1rem;
}

/* Hero logo container dengan spacing tambahan */
.hero-logo-container {
    margin-top: 1rem;
}

/* =======================================================
   MOBILE MENU BUTTON STYLING
   ======================================================= */

#mobile-menu-btn {
    background: rgba(46, 139, 87, 0.1);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 0.75rem;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
    font-size: 1.25rem;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-menu-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

#mobile-menu-btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* =======================================================
   MOBILE MENU - GREEN & WHITE THEME ONLY
   ======================================================= */

#mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: min(85vw, 360px);
    background: #ffffff !important;
    border-left: 3px solid var(--color-primary);
    box-shadow: -15px 0 40px rgba(46, 139, 87, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#mobile-menu.active {
    transform: translateX(0);
}

/* Header mobile menu dengan gradient hijau */
#mobile-menu .flex.justify-between.items-center {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)) !important;
    color: #ffffff !important;
    padding: 1.5rem !important;
    margin: 0 !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#mobile-menu .flex.justify-between.items-center h3 {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.125rem;
}

#mobile-menu .flex.justify-between.items-center button {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#mobile-menu .flex.justify-between.items-center button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
}

/* Container menu items dengan background putih */
#mobile-menu ul {
    background: #ffffff !important;
    padding: 1.5rem !important;
    margin: 0 !important;
    min-height: calc(100vh - 80px);
}

/* Menu items dengan tema hijau-putih */
#mobile-menu ul li {
    margin-bottom: 0.5rem;
    opacity: 1 !important;
    transform: translateX(0) !important;
}

#mobile-menu ul li a {
    background: #ffffff !important;
    color: var(--color-primary) !important;
    padding: 1rem 1.25rem !important;
    border-radius: 0.75rem !important;
    border: 2px solid rgba(46, 139, 87, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(46, 139, 87, 0.1) !important;
}

#mobile-menu ul li a:hover {
    background: var(--color-primary) !important;
    color: #ffffff !important;
    border-color: var(--color-primary) !important;
    transform: translateX(8px) scale(1.02) !important;
    box-shadow: 0 8px 20px rgba(46, 139, 87, 0.3) !important;
}

/* Icon dalam menu items */
#mobile-menu ul li a i {
    color: var(--color-primary) !important;
    font-size: 1.125rem !important;
    margin-right: 0.75rem !important;
    min-width: 24px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
}

#mobile-menu ul li a:hover i {
    color: #ffffff !important;
    transform: scale(1.1) !important;
}

#mobile-menu ul li a span {
    color: inherit !important;
    font-weight: inherit !important;
    transition: all 0.3s ease !important;
}

/* Overlay dengan background hijau transparan */
#mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(46, 139, 87, 0.4) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Animasi untuk menu items saat muncul */
#mobile-menu.active ul li {
    animation: slideInRight 0.4s ease forwards;
}

#mobile-menu.active ul li:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.active ul li:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.active ul li:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.active ul li:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu.active ul li:nth-child(5) { animation-delay: 0.3s; }
#mobile-menu.active ul li:nth-child(6) { animation-delay: 0.35s; }
#mobile-menu.active ul li:nth-child(7) { animation-delay: 0.4s; }
#mobile-menu.active ul li:nth-child(8) { animation-delay: 0.45s; }
#mobile-menu.active ul li:nth-child(9) { animation-delay: 0.5s; }

/* Override untuk memastikan tidak ada styling yang bertentangan */
#mobile-menu * {
    box-sizing: border-box;
}

#mobile-menu ul li a {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Active state untuk menu item yang sedang aktif */
#mobile-menu ul li a.active {
    background: rgba(46, 139, 87, 0.1) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-primary) !important;
    font-weight: 700 !important;
}

/* =======================================================
   EXPANDABLE CONTENT (ACCORDION)
   ======================================================= */

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out-cubic),
                opacity 0.4s ease-out,
                padding 0.4s ease-out,
                transform 0.4s ease-out;
    opacity: 0;
    padding: 0;
    transform: translateY(-10px);
}

.expandable-content.expanded {
    max-height: 1000px;
    opacity: 1;
    padding: var(--space-lg) 0;
    transform: translateY(0);
}

.accordion-button {
    position: relative;
    overflow: hidden;
}

.accordion-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: -1;
}

.accordion-button:hover::after {
    opacity: 0.05;
}

/* =======================================================
   UTILITY CLASSES
   ======================================================= */

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce 2s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s var(--ease-out-cubic) forwards;
}

.animate-slide-down {
    animation: slideDown 0.5s var(--ease-out-cubic) forwards;
}

.animate-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

.rotate-180 {
    transform: rotate(180deg);
    transition: transform var(--transition-normal);
}

.scale-105 {
    transform: scale(1.05);
}

.hover-lift {
    transition: transform var(--transition-normal), 
                box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

/* =======================================================
   LAYOUT COMPONENTS
   ======================================================= */

.map-container {
    height: clamp(250px, 40vh, 450px);
    border-radius: var(--border-radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    transition: transform var(--transition-normal), 
                box-shadow var(--transition-normal);
    position: relative;
}

.map-container:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 35px 80px -12px rgba(46, 139, 87, 0.3);
}

.location-card {
    background: var(--gradient-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-xl);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
}

.location-card:hover {
    background: rgba(255, 255, 255, 0.98);
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(46, 139, 87, 0.2);
}

/* =======================================================
   LOADING & PERFORMANCE
   ======================================================= */

body {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    font-family: var(--font-family-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.loaded {
    opacity: 1;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-md);
}

/* =======================================================
   COMPONENT ENHANCEMENTS
   ======================================================= */

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius-full);
    padding: var(--space-md) var(--space-xl);
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card {
    background: var(--gradient-card);
    border-radius: var(--border-radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
}

.form-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid rgba(46, 139, 87, 0.2);
    border-radius: var(--border-radius-lg);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.1);
    background: rgba(255, 255, 255, 1);
}

/* =======================================================
   SECTION HIGHLIGHTS & NAVIGATION
   ======================================================= */

#nav-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-highlight {
    position: relative;
    animation: sectionPulse 2.5s ease-in-out;
}

@keyframes sectionPulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(46, 139, 87, 0.4);
        transform: scale(1);
    }
    30% { 
        box-shadow: 0 0 0 20px rgba(46, 139, 87, 0.2);
        transform: scale(1.01);
    }
    70% { 
        box-shadow: 0 0 0 40px rgba(46, 139, 87, 0.05);
        transform: scale(1);
    }
    100% { 
        box-shadow: 0 0 0 0 rgba(46, 139, 87, 0);
        transform: scale(1);
    }
}

.card-spotlight {
    position: relative;
    z-index: 10;
    animation: cardSpotlight 3s ease-in-out;
}

@keyframes cardSpotlight {
    0% { 
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
    25% { 
        transform: scale(1.05) translateY(-8px);
        box-shadow: 0 25px 50px rgba(46, 139, 87, 0.25);
    }
    50% { 
        transform: scale(1.08) translateY(-12px);
        box-shadow: 0 30px 60px rgba(46, 139, 87, 0.3);
    }
    75% { 
        transform: scale(1.03) translateY(-5px);
        box-shadow: 0 20px 40px rgba(46, 139, 87, 0.2);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
}

/* =======================================================
   RESPONSIVE DESIGN - ENHANCED
   ======================================================= */

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

/* Mobile First - Default (up to 639px) */
@media (max-width: 639px) {
    :root {
        --navbar-height-mobile: 4.5rem;
    }
    
    .hero-section {
        padding-top: var(--navbar-height-mobile) !important;
    }
    
    .bg-islamic-pattern {
        background-size: 80px 80px;
        animation-duration: 8s;
    }
    
    .map-container {
        height: clamp(200px, 35vh, 300px);
        border-radius: var(--border-radius-xl);
    }
    
    #mobile-menu {
        width: min(90vw, 320px);
    }
    
    #mobile-menu-btn {
        padding: 0.625rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    .animate-float {
        animation-duration: 6s;
    }
    
    #header .navbar-logo {
        height: 2rem;
    }
    
    #header .navbar-title {
        font-size: 1.125rem;
    }
    
    #header .navbar-icon {
        font-size: 1.125rem;
    }
    
    #header.scrolled .navbar-logo {
        height: 1.75rem;
    }
    
    #header.scrolled .navbar-title {
        font-size: 1rem;
    }
    
    #header.scrolled .navbar-icon {
        font-size: 1rem;
    }
}

/* Small tablets and large phones (640px and up) */
@media (min-width: 640px) {
    .container {
        max-width: 640px;
        padding-left: var(--space-lg);
        padding-right: var(--space-lg);
    }
    
    .bg-islamic-pattern {
        background-size: 100px 100px;
    }
    
    #mobile-menu {
        width: min(80vw, 340px);
    }
    
    .hero-section {
        padding-top: var(--navbar-height-tablet) !important;
    }
}

/* Medium tablets (768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
    
    .map-container {
        height: clamp(300px, 45vh, 400px);
    }
    
    .hero-section {
        padding-top: var(--navbar-height-tablet) !important;
    }
    
    #header .navbar-logo {
        height: 2.25rem;
    }
    
    #header .navbar-title {
        font-size: 1.375rem;
    }
    
    #header .navbar-icon {
        font-size: 1.375rem;
    }
    
    #header.scrolled .navbar-logo {
        height: 1.875rem;
    }
    
    #header.scrolled .navbar-title {
        font-size: 1.125rem;
    }
}

/* Large tablets and small desktops (1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
    
    .bg-islamic-pattern {
        background-size: 120px 120px;
    }
    
    #mobile-menu,
    #mobile-menu-overlay,
    #mobile-menu-btn {
        display: none !important;
    }
    
    .hero-section {
        padding-top: var(--navbar-height-desktop) !important;
    }
    
    #header:not(.scrolled) {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(15px);
    }
    
    #header .navbar-logo {
        height: 2.5rem;
    }
    
    #header .navbar-title {
        font-size: 1.5rem;
    }
    
    #header .navbar-icon {
        font-size: 1.5rem;
    }
    
    #header.scrolled .navbar-logo {
        height: 2rem;
    }
    
    #header.scrolled .navbar-title {
        font-size: 1.25rem;
    }
    
    #header.scrolled .navbar-icon {
        font-size: 1.25rem;
    }
}

/* Large desktops (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Extra large desktops (1536px and up) */
@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* =======================================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================================= */

/* Smooth scroll behavior untuk seluruh halaman */
html {
    scroll-behavior: smooth;
}

*:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

.btn:focus,
.nav-link:focus,
button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.1);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-float,
    .animate-pulse-slow,
    .animate-bounce-slow {
        animation: none;
        transform: none;
    }
    
    .bg-islamic-pattern {
        animation: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =======================================================
   PRINT STYLES
   ======================================================= */

@media print {
    #header,
    #mobile-menu,
    #mobile-menu-overlay,
    .fixed,
    .sticky {
        display: none !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    .bg-gradient-to-br,
    .bg-gradient-to-r {
        background: #fff !important;
    }
    
    .text-white {
        color: #000 !important;
    }
    
    .shadow-xl,
    .shadow-2xl {
        box-shadow: none !important;
    }
    
    .hero-section {
        padding-top: 0 !important;
    }
}

/* =======================================================
   BROWSER COMPATIBILITY & FALLBACKS
   ======================================================= */

/* Fallback untuk browser yang tidak mendukung backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
    #header {
        background: rgba(255, 255, 255, 0.95);
    }
    
    #mobile-menu {
        background: #ffffff !important;
    }
    
    .backdrop-blur-enhanced {
        background: rgba(255, 255, 255, 0.9);
    }
    
    .glass-morphism {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Fallback untuk browser lama */
@supports not (min-height: 100dvh) {
    #mobile-menu {
        height: 100vh;
    }
}

/* Memastikan semua elemen mobile menu terlihat */
#mobile-menu,
#mobile-menu *,
#mobile-menu ul,
#mobile-menu ul li,
#mobile-menu ul li a,
#mobile-menu ul li a span,
#mobile-menu ul li a i {
    opacity: 1 !important;
    visibility: visible !important;
}

/* =======================================================
   PERFORMANCE OPTIMIZATIONS
   ======================================================= */

/* GPU acceleration untuk animasi */
.animate-float,
.animate-pulse-slow,
.animate-bounce-slow,
#header,
.navbar-brand > * {
    will-change: transform;
}

/* Contain untuk better performance */
#mobile-menu {
    contain: layout style paint;
}

.hero-section {
    contain: layout;
}


/* =======================================================
   END OF ENHANCED CSS WITH FIXED NAVBAR
   ======================================================= */
/* Carousel Gallery Enhancements */
.carousel-slide {
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.indicator.active {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Hover effects */
#carousel:hover .absolute button {
  transform: scale(1.05);
}

/* Loading animation */
@keyframes slideIn {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

#carousel {
  animation: slideIn 0.8s ease-out;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .carousel-slide .absolute.bottom-8 {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
  }
  
  .carousel-slide h3 {
    font-size: 1.5rem;
  }
  
  .carousel-slide p {
    font-size: 1rem;
  }
}
