/**
 * مؤسسة مدينة التلاوة
 * تصميم إسلامي احترافي
 * النسخة 3.0
 */

/* ===== استيراد خط زخرفي إسلامي ===== */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cairo:wght@300;400;500;600;700;800&display=swap');

/* ===== المتغيرات ===== */
:root {
    /* ألوان جديدة - بعيدة عن الأخضر */
    --primary: #1e3a5f;           /* أزرق داكن أنيق */
    --primary-rgb: 30, 58, 95;
    --primary-dark: #0f2744;
    --primary-light: #2d5a8a;
    --primary-lighter: #e8f0f8;
    
    --secondary: #d4af37;         /* ذهبي إسلامي */
    --secondary-rgb: 212, 175, 55;
    --secondary-light: #e8c84a;
    --secondary-lighter: #fdf8e8;
    --secondary-dark: #b8960f;
    
    --accent: #8b4513;            /* بني خشبي */
    --accent-light: #cd853f;
    
    /* ألوان الحالة */
    --success: #2e7d32;
    --success-light: #e8f5e9;
    --danger: #c62828;
    --danger-light: #ffebee;
    --warning: #ef6c00;
    --warning-light: #fff3e0;
    --info: #0277bd;
    --info-light: #e1f5fe;
    
    /* ألوان محايدة */
    --cream: #faf8f5;
    --cream-dark: #f5f0e8;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    
    /* الخطوط */
    --font-main: 'Cairo', sans-serif;
    --font-arabic: 'Amiri', serif;
    
    /* الظلال */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    
    /* الحدود */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* الانتقالات */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== أنماط الزخرفة الإسلامية ===== */
.islamic-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.08'%3E%3Cpath d='M40 0l40 40-40 40L0 40z'/%3E%3Cpath d='M40 10l30 30-30 30-30-30z'/%3E%3Cpath d='M40 20l20 20-20 20-20-20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.geometric-border {
    position: relative;
}

.geometric-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--secondary) 20%, 
        var(--secondary-light) 50%, 
        var(--secondary) 80%, 
        transparent 100%
    );
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-800);
    background: var(--cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--secondary);
    color: var(--primary-dark);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cream-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--secondary), var(--secondary-dark));
    border-radius: 5px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary);
    line-height: 1.4;
}

.arabic-title {
    font-family: var(--font-arabic);
    font-size: 1.2em;
}

.quran-text {
    font-family: var(--font-arabic);
    font-size: 1.5rem;
    color: var(--primary);
    line-height: 2;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.6); }
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-down {
    animation: fadeInDown 0.8s ease forwards;
}

.animate-fade-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-right {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-scale {
    animation: scaleIn 0.6s ease forwards;
}

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

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

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

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ===== Bootstrap Overrides ===== */
.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-gold {
    color: var(--secondary) !important;
}

.bg-gold {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%) !important;
}

/* ===== Buttons ===== */
.btn {
    font-family: var(--font-main);
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    color: white;
}

.btn-gold {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border: none;
    color: var(--primary-dark);
    box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--secondary-light) 0%, var(--secondary) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(var(--secondary-rgb), 0.5);
    color: var(--primary-dark);
}

.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.8);
    color: white;
    background: transparent;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary);
    border-color: white;
}

.btn-outline-gold {
    border: 2px solid var(--secondary);
    color: var(--secondary);
    background: transparent;
}

.btn-outline-gold:hover {
    background: var(--secondary);
    color: var(--primary-dark);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ===== Navbar ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.25rem 0;
    background: rgba(30, 58, 95, 0.98) !important;
    backdrop-filter: blur(10px);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--secondary) 20%, 
        var(--secondary-light) 50%, 
        var(--secondary) 80%, 
        transparent
    );
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: 50px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    color: rgba(255,255,255,0.9) !important;
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.1);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 60%;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 60%, #0a1929 100%);
    color: white;
    padding: 4rem 0 6rem;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 0L100 50L50 100L0 50Z' fill='%23d4af37' fill-opacity='0.03'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--cream), transparent);
}

.hero-decoration {
    position: absolute;
    width: 400px;
    height: 400px;
    border: 2px solid rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: rotate 60s linear infinite;
}

.hero-decoration::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(212, 175, 55, 0.05);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-logo {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.hero-logo img {
    max-height: 180px;
    filter: drop-shadow(0 10px 40px rgba(0,0,0,0.4));
    animation: float 4s ease-in-out infinite;
}

.hero-logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-section .bismillah {
    font-family: var(--font-arabic);
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    animation: fadeInDown 1s ease;
}

.hero-section .lead {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    animation: fadeInUp 1s ease 0.4s backwards;
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    border-radius: 2px;
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

.section-header .islamic-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.section-header .islamic-divider span {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.section-header .islamic-divider i {
    color: var(--secondary);
    font-size: 1.5rem;
}

/* ===== Cards ===== */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    background: white;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white;
    border: none;
}

/* ===== Service Cards ===== */
.service-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-lighter);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover::after {
    opacity: 1;
}

.service-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2.25rem;
    box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.25);
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    box-shadow: var(--shadow-gold);
}

.service-card h5 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

/* Featured Services - الأسنان وتحفيظ القرآن */
.service-card.featured {
    border: 2px solid var(--secondary);
    background: linear-gradient(145deg, white 0%, var(--secondary-lighter) 100%);
}

.service-card.featured::before {
    transform: scaleX(1);
    height: 5px;
}

.service-card.featured .service-icon {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    animation: glow 3s ease-in-out infinite;
}

.service-card.featured .badge-featured {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ===== Quran Section ===== */
.quran-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.quran-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23d4af37' fill-opacity='0.05'/%3E%3C/svg%3E");
}

.quran-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.quran-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--secondary);
    transform: translateY(-5px);
}

.quran-card .verse {
    font-family: var(--font-arabic);
    font-size: 1.75rem;
    color: white;
    line-height: 2.2;
    margin-bottom: 1rem;
}

.quran-card .reference {
    color: var(--secondary);
    font-size: 1rem;
}

/* ===== Media Gallery Section ===== */
.gallery-section {
    padding: 5rem 0;
    background: var(--cream);
}

.gallery-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 0.75rem 2rem;
    border: 2px solid var(--primary);
    border-radius: var(--radius-xl);
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}

.gallery-tab:hover,
.gallery-tab.active {
    background: var(--primary);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(30, 58, 95, 0.9), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

.gallery-item .overlay h6 {
    color: white;
    margin: 0;
}

.gallery-item .overlay span {
    color: var(--secondary);
    font-size: 0.85rem;
}

/* Video Items */
.video-item {
    position: relative;
}

.video-item .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 2;
}

.video-item:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: var(--shadow-gold);
}

/* ===== YouTube Videos Section ===== */
.videos-section {
    padding: 5rem 0;
    background: var(--cream-dark);
}

.youtube-video-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.youtube-video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.youtube-video-card .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.youtube-video-card .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.youtube-video-card .video-info {
    padding: 1.25rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.youtube-video-card .video-info h6 {
    color: white;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.youtube-video-card .video-info p {
    color: var(--secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Video Thumbnail (Lazy Load) */
.video-thumbnail {
    position: relative;
    cursor: pointer;
    background: #000;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: var(--transition);
}

.video-thumbnail:hover img {
    opacity: 0.8;
}

.video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 50px;
    background: #ff0000;
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.video-thumbnail:hover .play-button {
    background: #cc0000;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-thumbnail .play-button i {
    margin-left: 2px;
}

/* ===== Dental Section ===== */
.dental-section {
    padding: 5rem 0;
    background: white;
    position: relative;
}

.dental-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--cream);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    margin-bottom: 1rem;
}

.dental-feature:hover {
    background: var(--primary-lighter);
    transform: translateX(-5px);
}

.dental-feature i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 1.25rem;
}

.dental-feature h6 {
    margin: 0;
    color: var(--primary);
}

.dental-feature p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

/* ===== Stats Section ===== */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 0l20 20-20 20L0 20z' fill='%23ffffff' fill-opacity='0.03'/%3E%3C/svg%3E");
}

.stat-card {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.stat-card .icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.1);
    border: 2px solid var(--secondary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: var(--secondary);
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: rgba(255,255,255,0.8);
    margin: 0;
    font-size: 1.1rem;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: 5rem 0;
    background: var(--cream-dark);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 4rem 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    text-align: center;
    border: 1px solid var(--secondary-lighter);
}

.cta-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-content p {
    color: var(--gray-600);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 5rem 0;
    background: white;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--cream);
    border-radius: var(--radius-xl);
    transition: var(--transition);
    height: 100%;
}

.contact-card:hover {
    background: var(--primary-lighter);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-card h6 {
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.contact-card p {
    color: var(--gray-600);
    margin: 0;
}

/* ===== Footer ===== */
.footer {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding-top: 4rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
}

.footer h5, .footer h6 {
    color: white;
    font-weight: 700;
}

.footer a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--secondary);
    padding-right: 5px;
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 1.25rem 0;
    margin-top: 3rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.1);
    color: white;
    transition: var(--transition);
    margin-left: 0.5rem;
    font-size: 1.1rem;
}

.social-links a:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 450px;
    width: 90%;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: fadeInDown 0.4s ease;
    background: white;
    border-right: 4px solid;
}

.toast-notification.toast-success { border-color: var(--success); }
.toast-notification.toast-danger { border-color: var(--danger); }
.toast-notification.toast-warning { border-color: var(--warning); }
.toast-notification.toast-info { border-color: var(--info); }

.toast-icon {
    font-size: 1.5rem;
}

.toast-success .toast-icon { color: var(--success); }
.toast-danger .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info .toast-icon { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.toast-message {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
}

/* ===== Forms ===== */
.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.25rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* ===== Tables ===== */
.table thead th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    padding: 1rem;
    border: none;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover td {
    background: var(--cream);
}

/* ===== Badges ===== */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: var(--radius);
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.badge.bg-gold {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%) !important;
    color: var(--primary-dark);
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23d4af37' fill-opacity='0.05'/%3E%3C/svg%3E");
}

.login-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    overflow: hidden;
    max-width: 420px;
    width: 90%;
    position: relative;
    z-index: 1;
}

.login-header {
    background: linear-gradient(135deg, var(--cream) 0%, white 100%);
    padding: 2.5rem 2rem;
    text-align: center;
    border-bottom: 3px solid var(--secondary);
}

.login-header img {
    max-height: 100px;
    margin-bottom: 1rem;
}

.login-header h4 {
    color: var(--primary);
    margin: 0;
}

.login-body {
    padding: 2rem;
}

.login-footer {
    padding: 1.5rem;
    background: var(--cream);
    text-align: center;
}

/* ===== Confirm Dialog ===== */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.confirm-dialog.show {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.9);
    transition: var(--transition);
}

.confirm-dialog.show .confirm-dialog-content {
    transform: scale(1);
}

.confirm-dialog-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.confirm-dialog-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.confirm-dialog-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ===== Responsive ===== */

/* ===== Large Tablets & Small Desktops ===== */
@media (max-width: 991.98px) {
    /* Hero Section */
    .hero-section {
        padding: 2.5rem 0 3.5rem;
        min-height: auto;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .bismillah {
        font-size: 1.5rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .hero-logo img {
        max-height: 130px;
    }
    
    .hero-decoration {
        width: 300px;
        height: 300px;
    }
    
    /* Section Headers */
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    /* Navbar */
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    /* Services */
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    /* Quran Section */
    .quran-section {
        padding: 3.5rem 0;
    }
    
    .quran-card {
        padding: 2rem;
    }
    
    .quran-card .verse {
        font-size: 1.4rem;
    }
    
    /* Stats */
    .stat-card h3 {
        font-size: 2.5rem;
    }
    
    /* Footer */
    .footer {
        padding-top: 3rem;
    }
}

/* ===== Tablets ===== */
@media (max-width: 767.98px) {
    /* Global */
    body {
        font-size: 0.95rem;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 2rem 0 3rem;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 1.6rem;
        line-height: 1.5;
    }
    
    .hero-section .bismillah {
        font-size: 1.3rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .hero-logo img {
        max-height: 110px;
    }
    
    .hero-logo::before {
        width: 180px;
        height: 180px;
    }
    
    .hero-decoration {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    /* Navbar */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand img {
        height: 35px;
    }
    
    .navbar-brand span {
        font-size: 0.9rem;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1.1rem;
    }
    
    .navbar-collapse {
        background: var(--primary-dark);
        margin: 0.5rem -0.75rem -0.5rem;
        padding: 1rem;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: var(--radius);
        margin: 0.25rem 0;
    }
    
    /* Section Headers */
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header h2::after {
        width: 60px;
        height: 3px;
    }
    
    .section-header p {
        font-size: 0.95rem;
    }
    
    .section-header .islamic-divider i {
        font-size: 1.25rem;
    }
    
    /* Cards */
    .card {
        border-radius: var(--radius-lg);
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    /* Services */
    .service-card {
        padding: 1.5rem 1.25rem;
        margin-bottom: 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-card h5 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .service-card.featured .badge-featured {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Quran Section */
    .quran-section {
        padding: 3rem 0;
    }
    
    .quran-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .quran-card .verse {
        font-size: 1.2rem;
        line-height: 2;
    }
    
    .quran-card .reference {
        font-size: 0.9rem;
    }
    
    /* Dental Section */
    .dental-section {
        padding: 3rem 0;
    }
    
    .dental-feature {
        padding: 1rem;
    }
    
    .dental-feature i {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .dental-feature h6 {
        font-size: 0.95rem;
    }
    
    .dental-feature p {
        font-size: 0.85rem;
    }
    
    /* Gallery */
    .gallery-section {
        padding: 3rem 0;
    }
    
    .gallery-tabs {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .gallery-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-radius: var(--radius-lg);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .gallery-item {
        border-radius: var(--radius-lg);
    }
    
    .gallery-item .overlay {
        padding: 1rem;
    }
    
    .gallery-item .overlay h6 {
        font-size: 0.9rem;
    }
    
    .gallery-item .overlay span {
        font-size: 0.75rem;
    }
    
    /* Videos Section */
    .videos-section {
        padding: 3rem 0;
    }
    
    .youtube-video-card .video-info {
        padding: 1rem;
    }
    
    .youtube-video-card .video-info h6 {
        font-size: 0.95rem;
    }
    
    .youtube-video-card .video-info p {
        font-size: 0.8rem;
    }
    
    /* Stats */
    .stats-section {
        padding: 3rem 0;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-card .icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .stat-card p {
        font-size: 0.9rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-content {
        padding: 2rem 1.5rem;
    }
    
    .cta-content h3 {
        font-size: 1.5rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    /* Contact */
    .contact-section {
        padding: 3rem 0;
    }
    
    .contact-card {
        padding: 1.25rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    /* Footer */
    .footer {
        padding-top: 2.5rem;
    }
    
    .footer h6 {
        font-size: 1rem;
        margin-bottom: 1rem !important;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-bottom {
        margin-top: 2rem;
        padding: 1rem 0;
    }
    
    /* Buttons */
    .btn {
        padding: 0.65rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 0.85rem 2rem;
        font-size: 1rem;
    }
    
    /* Forms */
    .form-control, .form-select {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    /* Tables - Make them scrollable */
    .table-responsive {
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
    }
    
    .table thead th {
        padding: 0.75rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .table tbody td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Admin Stats Cards */
    .stats-card .card-body {
        padding: 1rem;
    }
    
    .stats-card h2 {
        font-size: 1.75rem;
    }
    
    .stats-card h6 {
        font-size: 0.8rem;
    }
    
    .stats-card .stats-icon {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    /* Login Page */
    .login-card {
        max-width: 100%;
        margin: 1rem;
        border-radius: var(--radius-xl);
    }
    
    .login-header {
        padding: 1.5rem;
    }
    
    .login-header img {
        max-height: 70px;
    }
    
    .login-header h4 {
        font-size: 1.1rem;
    }
    
    .login-body {
        padding: 1.5rem;
    }
    
    /* Toast Notifications */
    .toast-container {
        top: 80px;
        max-width: 90%;
    }
    
    .toast-notification {
        padding: 0.85rem 1rem;
    }
    
    .toast-icon {
        font-size: 1.25rem;
    }
    
    .toast-title {
        font-size: 0.85rem;
    }
    
    .toast-message {
        font-size: 0.8rem;
    }
    
    /* Confirm Dialog */
    .confirm-dialog-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .confirm-dialog-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .confirm-dialog-buttons {
        flex-direction: column;
    }
    
    .confirm-dialog-buttons .btn {
        width: 100%;
    }
}

/* ===== Small Phones ===== */
@media (max-width: 575.98px) {
    /* Global */
    body {
        font-size: 0.9rem;
    }
    
    /* Hero */
    .hero-section {
        padding: 1.5rem 0 2.5rem;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
    }
    
    .hero-section .bismillah {
        font-size: 1.1rem;
    }
    
    .hero-section .lead {
        font-size: 0.9rem;
    }
    
    .hero-logo img {
        max-height: 90px;
    }
    
    /* Section Headers */
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .section-header p {
        font-size: 0.85rem;
    }
    
    /* Gallery - Single Column */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .gallery-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .gallery-tab {
        padding: 0.5rem 0.85rem;
        font-size: 0.8rem;
    }
    
    /* Services */
    .service-card {
        padding: 1.25rem 1rem;
    }
    
    .service-icon {
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
    
    /* Stats - 2 columns */
    .stat-card h3 {
        font-size: 1.75rem;
    }
    
    .stat-card p {
        font-size: 0.8rem;
    }
    
    .stat-card .icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    
    /* Videos */
    .youtube-video-card .video-info {
        padding: 0.85rem;
    }
    
    .youtube-video-card .video-info h6 {
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        text-align: center;
    }
    
    .footer .col-lg-4,
    .footer .col-lg-3,
    .footer .col-lg-5 {
        margin-bottom: 1.5rem;
    }
    
    .footer ul li {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Admin */
    .stats-card h2 {
        font-size: 1.5rem;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    /* Quick Actions - Stack them */
    .d-flex.gap-2 {
        flex-wrap: wrap;
    }
    
    /* Pagination */
    .pagination .page-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.85rem;
    }
    
    /* Activity Item */
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ===== Extra Small Phones (iPhone SE, etc.) ===== */
@media (max-width: 374.98px) {
    .hero-section h1 {
        font-size: 1.25rem;
    }
    
    .hero-logo img {
        max-height: 75px;
    }
    
    .section-header h2 {
        font-size: 1.15rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .gallery-tab {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
    }
    
    .stat-card h3 {
        font-size: 1.5rem;
    }
}

/* ===== Touch Device Optimizations ===== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects for touch devices */
    .card:hover,
    .service-card:hover,
    .gallery-item:hover,
    .youtube-video-card:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Make buttons easier to tap */
    .btn {
        min-height: 44px;
    }
    
    /* Increase touch targets */
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control, .form-select {
        min-height: 48px;
    }
    
    /* Gallery overlay always visible on touch */
    .gallery-item .overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(30, 58, 95, 0.85), transparent 60%);
    }
}

/* ===== Landscape Mode Adjustments ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 1.5rem 0;
        min-height: auto;
    }
    
    .hero-logo img {
        max-height: 80px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-section .lead {
        display: none;
    }
    
    .hero-buttons {
        flex-direction: row;
        margin-top: 1rem;
    }
    
    .hero-buttons .btn {
        width: auto;
    }
}

/* ===== Safe Area for Notched Phones (iPhone X+) ===== */
@supports (padding: max(0px)) {
    .navbar {
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .footer-bottom {
        padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    }
    
    .login-page {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
}

/* ===== Admin Stats Cards ===== */
.stats-card {
    border-radius: var(--radius-xl);
    transition: var(--transition);
    border: none;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stats-card.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.stats-card.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, #43a047 100%) !important;
}

.stats-card.bg-info {
    background: linear-gradient(135deg, var(--info) 0%, #0288d1 100%) !important;
}

.stats-card.bg-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #fb8c00 100%) !important;
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* ===== Admin Dashboard ===== */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .activity-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-item .activity-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.activity-item .activity-content small {
    color: var(--gray-500);
}

/* Action Buttons */
.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Quick Links */
.quick-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--cream);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    margin-bottom: 0.75rem;
    border: 1px solid transparent;
}

.quick-link:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
    transform: translateX(-5px);
}

.quick-link i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.quick-link span {
    font-weight: 600;
    color: var(--primary);
}

/* Pagination */
.pagination .page-link {
    border-color: var(--gray-200);
    color: var(--primary);
    border-radius: var(--radius);
    margin: 0 0.15rem;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary);
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 80px;
    height: 80px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35em 0.75em;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.active {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.active::before {
    background: var(--success);
}

.status-badge.inactive {
    background: var(--danger-light);
    color: var(--danger);
}

.status-badge.inactive::before {
    background: var(--danger);
}

.status-badge.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.status-badge.pending::before {
    background: var(--warning);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: var(--cream);
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.file-upload-area i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.file-upload-area.dragover {
    border-color: var(--secondary);
    background: var(--secondary-lighter);
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 3rem;
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--gray-200);
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-600);
    font-weight: 600;
    padding: 1rem 1.5rem;
    margin-bottom: -2px;
    transition: var(--transition);
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--secondary);
    background: transparent;
}

/* Data Display */
.data-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.data-value {
    font-size: 1rem;
    color: var(--gray-800);
    font-weight: 600;
}

/* ===== Print ===== */
@media print {
    .navbar, .footer, .btn, .toast-container, .confirm-dialog {
        display: none !important;
    }
    
    body {
        background: white;
    }
}

/* ===== Mobile Form Optimizations ===== */
@media (max-width: 767.98px) {
    /* Form rows - stack on mobile */
    .row > [class*="col-md-"] {
        margin-bottom: 0.5rem;
    }
    
    /* Cards on mobile */
    .card {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
        border-radius: var(--radius);
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Form buttons stack on mobile */
    .d-md-flex.justify-content-md-end {
        flex-direction: column;
    }
    
    .d-md-flex.justify-content-md-end .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Action buttons group */
    .btn-group-action {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-group-action .btn {
        flex: 1;
        min-width: 80px;
    }
}

/* ===== Utility Classes for Mobile ===== */
.mobile-hidden {
    display: block;
}

.mobile-visible {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .mobile-visible {
        display: block !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
    
    .mobile-mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mobile-p-2 {
        padding: 0.5rem !important;
    }
}

/* ===== Swipe-friendly Gallery ===== */
@media (max-width: 767.98px) {
    .gallery-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
        gap: 1rem;
    }
    
    .gallery-grid .gallery-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
}

/* ===== Better Video Aspect Ratio on Mobile ===== */
@media (max-width: 575.98px) {
    .youtube-video-card .video-wrapper {
        padding-bottom: 75%; /* Taller on mobile for better viewing */
    }
}
