/* 
====================================================================
   أذكار المسلم - Emerald Design System v1.0
   Theme: Emerald Green & Gold (Modern Islamic)
   Fonts: Cairo (UI), Tajawal (Headings), Amiri (Quran)
   Note: Fonts are loaded via includes/performance.php (non-blocking)
====================================================================
*/


:root {
    /* Emerald Color Palette */
    --primary-color: #047857;
    /* Emerald 700 */
    --primary-dark: #064e3b;
    /* Emerald 900 */
    --primary-light: #10b981;
    /* Emerald 500 */
    --primary-soft: #d1fae5;
    /* Emerald 100 */

    --accent-color: #d97706;
    /* Amber 600 - Gold */
    --accent-light: #fbbf24;
    /* Amber 400 - Soft Gold */
    --accent-soft: #fef3c7;
    /* Amber 100 */

    /* Backgrounds */
    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-gradient: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    --bg-gradient-gold: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, var(--primary-dark), var(--primary-color));

    /* Text */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-light: #94a3b8;
    /* Slate 400 */
    --text-white: #ffffff;

    /* Borders */
    --border-color: #e2e8f0;

    /* UI Elements */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;

    --shadow-sm: 0 2px 4px rgba(4, 120, 87, 0.05);
    --shadow-md: 0 8px 16px -4px rgba(4, 120, 87, 0.1);
    --shadow-lg: 0 20px 40px -8px rgba(4, 120, 87, 0.15);
    --shadow-xl: 0 25px 50px -12px rgba(4, 120, 87, 0.2);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.4);

    /* Typography */
    --font-ui: 'Cairo', sans-serif;
    --font-heading: 'Tajawal', sans-serif;
    --font-quran: 'Scheherazade New', serif;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Support */
[data-theme="dark"] {
    --primary-color: #10b981;
    --primary-dark: #064e3b;
    --primary-light: #34d399;
    --primary-soft: #064e3b;

    --bg-body: #020617;
    --bg-card: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(15, 23, 42, 0.95);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-light: #64748b;

    --border-color: #334155;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.7;
    direction: rtl;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 10% 10%, rgba(4, 120, 87, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 90%, rgba(217, 119, 6, 0.03) 0%, transparent 20%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    margin-bottom: var(--spacing-md);
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
    color: var(--text-primary);
}

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

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.main-header {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 80px;
    display: flex;
    align-items: center;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .main-header {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
    font-family: var(--font-heading);
}

[data-theme="dark"] .site-logo {
    color: var(--text-primary);
}

.site-logo i {
    font-size: 2rem;
    color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(4, 120, 87, 0.2));
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 1.05rem;
    position: relative;
    padding: 8px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Mobile Navigation */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(4px);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: var(--bg-card);
    z-index: 1002;
    padding: 30px;
    padding-bottom: 100px;
    transition: right var(--transition-normal);
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 30px;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    transition: background var(--transition-fast);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: var(--primary-soft);
    color: var(--primary-color);
}

.mobile-nav-links i {
    width: 24px;
    text-align: center;
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: var(--bg-gradient);
    color: white;
    padding: 100px 0 120px;
    text-align: center;
    position: relative;
    border-radius: 0 0 60px 60px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    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%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -1px;
    font-family: var(--font-heading);
    color: var(--text-white);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* Slider Styles */
.hero-slider {
    position: relative;
    height: 600px;
    margin-bottom: 60px;
    border-radius: 0 0 60px 60px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.slider-container {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(4, 120, 87, 0.8), rgba(4, 120, 87, 0.6));
}

.slide-content {
    position: relative;
    z-index: 2;
    color: white;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

/* Favorites Button Fix */
.btn-favorite {
    background: white;
    color: var(--text-secondary);
    border: 1px solid #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-favorite.active {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
}

.btn-favorite:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Mobile Button Fix */
@media (max-width: 768px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}



.slider-btn:hover {
    background: white;
    color: var(--primary-color);
}

.slider-btn.prev {
    right: 30px;
}

.slider-btn.next {
    left: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .hero-slider {
        height: 500px;
        border-radius: 0 0 40px 40px;
    }

    .slider-btn {
        display: none;
    }

    .main-header .theme-toggle {
        display: none;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-family: var(--font-ui);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(4, 120, 87, 0.4);
}

.btn-accent {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.3);
}

.btn-accent:hover {
    background: var(--accent-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(217, 119, 6, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    transition: all var(--transition-normal);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(4, 120, 87, 0.2);
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.2);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(4, 120, 87, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    background: var(--bg-body);
    color: var(--text-primary);
    border-color: var(--text-light);
}

/* Mobile Button Improvements */
@media (max-width: 480px) {
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        gap: 6px;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Hero Section Buttons Override */
.hero-section .btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

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

/* Unified Action Buttons */
.btn-action {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-action:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.2);
}

.btn-action i {
    transition: transform 0.3s ease;
}

.btn-action:hover i {
    transform: scale(1.1);
}

/* Active state for Like/Favorite */
.btn-action.active {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Cards Grid (Index) */
.azkar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

.azkar-card {
    background: var(--bg-card);
    padding: 40px 25px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.azkar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: var(--bg-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.azkar-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.azkar-card:hover::before {
    opacity: 1;
}

.icon-box {
    width: 80px;
    height: 80px;
    background: var(--primary-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.5);
}

.azkar-card:hover .icon-box {
    background: var(--bg-gradient);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(4, 120, 87, 0.3);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    color: var(--primary-dark);
    font-family: var(--font-heading);
}

[data-theme="dark"] .card-title {
    color: var(--text-primary);
}

/* Zekr Card (Page.php) */
.zekr-card {
    background: var(--bg-card);
    border-radius: 30px;
    padding: 0;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    transition: all var(--transition-normal);
    overflow: hidden;
}

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

.zekr-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 8px;
    background: var(--bg-gradient);
}

.zekr-text {
    font-family: var(--font-quran);
    font-size: 2.2rem;
    line-height: 2.6;
    color: var(--primary-dark);
    padding: 50px 40px 30px;
    text-align: center;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .zekr-text {
    color: var(--text-primary);
}

.zekr-meta {
    background: var(--bg-body);
    margin: 0 40px 30px;
    padding: 15px 25px;
    border-radius: 16px;
    font-size: 1rem;
    color: var(--text-secondary);
    border-right: 5px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.zekr-controls {
    background: linear-gradient(to bottom, var(--bg-card), var(--bg-body));
    padding: 25px 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Footer */
.main-footer {
    background: var(--primary-dark);
    color: white;
    padding: 80px 0 30px;
    margin-top: 100px;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-section {
        padding: 80px 0 100px;
        border-radius: 0 0 40px 40px;
    }

    .zekr-text {
        font-size: 1.6rem;
        padding: 30px 20px;
    }

    .zekr-controls {
        flex-direction: column;
        gap: 20px;
    }

    .azkar-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }

    .azkar-card {
        padding: 30px 15px;
    }

    .icon-box {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Footer Styles */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    opacity: 0.8;
    transition: all 0.2s;
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
    padding-right: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

/* Slider Image optimization */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 7s ease-in-out;
    /* Subtle zoom effect */
}

.slide.active .slide-bg {
    transform: scale(1.05);
}

/* Ensure overlay stays on top */
.slide-overlay {
    z-index: 1;
}

.slide-content {
    z-index: 2;
}

/* Card Image Hover Effect */
.azkar-card:hover img {
    transform: scale(1.1);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-xl);
    padding: 10px;
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.dropdown-menu a:hover {
    background: var(--primary-soft);
    color: var(--primary-color);
    padding-right: 20px;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Mobile Dropdown */
.mobile-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 12px;
    border-radius: var(--border-radius-sm);
}

.dropdown-arrow {
    transition: transform var(--transition-normal);
    font-size: 0.8rem;
    color: var(--text-light);
}

.mobile-dropdown-btn.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.mobile-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.mobile-dropdown-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding-right: 20px;
    margin-top: 5px;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-dropdown-menu.show {
    display: flex;
}

.mobile-dropdown-menu a {
    font-size: 1rem;
    padding: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.mobile-dropdown-menu a:hover {
    color: var(--primary-color);
    padding-right: 15px;
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary-color, #047857);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Cairo', sans-serif;
}

.pagination-btn:hover {
    background: var(--primary-dark, #064e3b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-num {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--text-primary, #1e293b);
    background: var(--card-bg, #fff);
    border: 2px solid var(--border-color, #e2e8f0);
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
}

.pagination-num:hover {
    border-color: var(--primary-color, #047857);
    color: var(--primary-color, #047857);
    background: rgba(4, 120, 87, 0.05);
}

.pagination-num.active {
    background: var(--primary-color, #047857);
    color: white;
    border-color: var(--primary-color, #047857);
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
    transform: scale(1.05);
}

.pagination-dots {
    padding: 0 6px;
    color: var(--text-light, #94a3b8);
    font-weight: 700;
}

/* Dark Mode */
[data-theme="dark"] .pagination-num {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .pagination-num:hover {
    border-color: var(--primary-color, #10b981);
    color: var(--primary-color, #10b981);
}

[data-theme="dark"] .pagination-num.active {
    background: var(--primary-color, #10b981);
    color: white;
    border-color: var(--primary-color, #10b981);
}

@media (max-width: 600px) {
    .pagination {
        flex-direction: column;
        gap: 12px;
        margin: 30px 0 15px;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
        border-radius: 12px;
    }

    .pagination-numbers {
        order: -1;
        gap: 6px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-num {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .pagination-dots {
        padding: 0 4px;
    }
}

/* ==================== Related Articles ==================== */
.related-articles-section {
    margin: 50px 0 30px;
    padding: 40px 0;
    background: var(--bg-body, #f8fafc);
    border-top: 2px solid var(--border-color, #e2e8f0);
}

.related-articles-header {
    margin-bottom: 25px;
}

.related-articles-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary, #1e293b);
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-articles-header h3 i {
    color: var(--primary-color, #047857);
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-article-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg, #fff);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.related-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color, #047857);
}

.related-article-img {
    height: 160px;
    overflow: hidden;
    background: var(--bg-body, #f1f5f9);
}

.related-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.related-article-card:hover .related-article-img img {
    transform: scale(1.05);
}

.related-article-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light, #94a3b8);
}

.related-article-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.related-article-cat {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-color, #047857);
    background: rgba(4, 120, 87, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    width: fit-content;
}

.related-article-info h4 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text-primary, #1e293b);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-info p {
    font-size: 0.85rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-meta {
    font-size: 0.8rem;
    color: var(--text-light, #94a3b8);
    margin-top: auto;
}

[data-theme="dark"] .related-articles-section {
    background: var(--bg-body, #0f172a);
    border-top-color: var(--border-color, #1e293b);
}

[data-theme="dark"] .related-article-card {
    background: var(--card-bg, #1e293b);
    border-color: var(--border-color, #334155);
}

[data-theme="dark"] .related-article-info h4 {
    color: var(--text-primary, #f1f5f9);
}

@media (max-width: 600px) {
    .related-articles-grid {
        grid-template-columns: 1fr;
    }

    .related-article-card {
        flex-direction: row;
        border-radius: 12px;
    }

    .related-article-img {
        width: 120px;
        min-width: 120px;
        height: auto;
        min-height: 100px;
    }

    .related-article-info {
        padding: 12px;
    }

    .related-article-info h4 {
        font-size: 0.9rem;
    }
}