/*
================================================================================
|                                                                              |
|                              بسمة شفاء - ملف الأنماط                           |
|                                                                              |
================================================================================

================================================================================
| جدول المحتويات:
================================================================================
| 1.  Design Tokens (CSS Variables)
| 2.  Dark Theme Overrides
| 3.  Global Styles
| 4.  Enhanced Navbar
| 5.  Control Buttons
| 6.  Hero Section
| 7.  CTA Button
| 8.  Section Styling
| 9.  About Section
| 10. Partners Section
| 11. Categories Section
| 12. Events Section
| 13. Contact Section
| 14. Footer
| 15. Responsive Design
| 16. Loading Animation
| 17. Scroll to Top Button
| 18. WhatsApp Button
================================================================================
*/

/* =============================
   1. Design Tokens (CSS Variables)
   ============================= */
:root {
    /* Brand Palette */
    /* Basmat Shifa brand colors */
    --color-brand-primary: #188d46;  /* green */
    --color-brand-secondary: #147095; /* sky blue */
    --color-brand-third: #ca912a;    /* warm gold */
    /* Aliases */
    --color-accent: var(--color-brand-third);
    --color-brand-accent: var(--color-brand-secondary);
    --accent-color: var(--color-brand-third);
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;

    /* Base (Light Theme Defaults) */
    --color-bg-page: #f1f5f9;              /* Page background */
    --color-bg-surface: #ffffff;          /* Elevated surfaces */
    --color-bg-surface-alt: #f8fafc;      /* Subtle alt surface */
    --color-bg-section-alt: #eef2f7;      /* Section band */
    --color-bg-inverse: #0f172a;          /* Inverse / footer */

    --color-text-primary: #0f172a;
    --color-footer-link: #ffffffe8;
    --color-text-secondary: #475569; /* Secondary body text */
    --color-text-muted: #586372;      /* Muted / helper text */
    --color-text-inverse: #ffffff;
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;

    /* Overlays & Effects */
    --overlay-hero: rgba(24,141,70,0.85), rgba(20,112,149,0.85);
    --overlay-glass-light: rgba(255,255,255,0.6);
    --overlay-glass-dark: rgba(15,23,42,0.6);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-brand-primary) 0%, var(--color-brand-secondary) 100%);
    /* Hero gradient overlay (subtle green→blue) */
    --gradient-hero: linear-gradient(135deg, rgba(24,141,70,0.28) 0%, rgba(20,112,149,0.75) 100%);

    /* Shadows & Radius */
    --shadow-soft: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0,0,0,0.12), 0 4px 6px -2px rgba(0,0,0,0.08);
    --shadow-large: 0 25px 50px -12px rgba(0,0,0,0.25);
    --border-radius: 12px;
    --transition: all 0.35s cubic-bezier(.4,0,.2,1);

    /* Component Specific */
    --nav-blur-bg: rgba(255,255,255,0.85);
    --nav-border-color: rgba(0,0,0,0.06);
    --glass-border-light: rgba(255,255,255,0.35);
    --focus-ring: 0 0 0 3px rgba(20,112,149,0.35);
}

/* =============================
   2. Dark Theme Overrides
   ============================= */
[data-theme="dark"] {
    --color-bg-page: #0f172a;
    --color-bg-surface: #1e293b;
    --color-bg-surface-alt: #162132;
    --color-bg-section-alt: #1b2535;
    --color-text-primary: #f1f5f9;
    --color-footer-link: #ffffffe8;
    --color-text-secondary: #cbd5e1;
    --color-text-muted: #94a3b8;
    --color-border: #243248;
    --color-border-strong: #334155;
    /* Dark-mode hero overlay tuned to brand */
    --gradient-hero: linear-gradient(135deg, rgba(20,112,149,0.35) 0%, rgba(24,141,70,0.35) 100%);
    --nav-blur-bg: rgba(15,23,42,0.85);
    --nav-border-color: rgba(255,255,255,0.1);
    --overlay-glass-light: rgba(255,255,255,0.08);
    --glass-border-light: rgba(255,255,255,0.18);
    --focus-ring: 0 0 0 3px rgba(20,112,149,0.45);
}

/* =============================
   3. Global Styles
   ============================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    background: var(--color-bg-page);
    color: var(--color-text-primary) !important;
    transition: var(--transition);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body[dir="ltr"] {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

/* =============================
   4. Enhanced Navbar
   ============================= */
.navbar {
    background: var(--nav-blur-bg);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--nav-border-color);
    padding: 0.85rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    font-weight: 500 bold;
    margin-inline: 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Explicit base color for better contrast in both themes */
.navbar-nav .nav-link { color: var(--color-text-primary); }
[data-theme="dark"] .navbar-nav .nav-link { color: var(--color-text-secondary); }

/* Sitting packground for Navlink */

/* Active / current section indicator */
.navbar-nav .nav-link.active, .navbar-nav .nav-link[aria-current="page"] {
    /* background: var(--gradient-primary); */ 
    background: var(--color-brand-third);
    color: var(--color-text-inverse) !important;
    box-shadow: 0 2px 6px -2px rgba(0,0,0,.25);
}

/* Focus ring accessibility */
.navbar-nav .nav-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.navbar-nav .nav-link:hover {
    background: var(--gradient-primary);
    color: white !important;
    transform: translateY(-2px);
}

/* Subtle underline grow effect */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    inset-inline-start: 12px;
    bottom: 6px;
    height: 2px;
    width: 0;
    border-radius: 2px;
    background: var(--color-accent);
    transition: width .35s ease;
    opacity: .85;
}
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after { width: calc(100% - 24px); }

/* Dark theme stronger backdrop & contrast */
[data-theme="dark"] .navbar { background: rgba(15,23,42,0.92); box-shadow: 0 4px 12px -4px rgba(0,0,0,0.55); }

/* Navbar scrolled state */
.navbar.navbar-scrolled { backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%); box-shadow: var(--shadow-medium); }
[data-theme="dark"] .navbar.navbar-scrolled { background: rgba(15,23,42,0.95); }

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: var(--transition);
    z-index: -1;
}

.navbar-nav .nav-link:hover::before {
    left: 0;
}

/* =============================
   5. Control Buttons
   ============================= */
.control-btn {
    background: var(--gradient-primary);
    border: none;
    color: var(--color-text-inverse);
    padding: 0.55rem 1rem;
    border-radius: 40px;
    margin-inline: 0.25rem;
    transition: var(--transition);
    font-weight: 600;
    box-shadow: var(--shadow-soft);
    display: inline-flex;
    gap: .5rem;
    align-items: center;
    font-size: .9rem;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* =============================
   6. Hero Section
   ============================= */
.hero {
    background: var(--gradient-hero), url('../img/heroimage2.jpg') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: radial-gradient(circle at 30% 70%, rgba(37, 99, 235, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(6, 182, 212, 0.3) 0%, transparent 50%);
    animation: shimmer 8s ease-in-out infinite; */
}

/* @keyframes shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
} */

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

/* Glass container for hero texts to improve readability over background */
.hero .hero-glass {
    background: rgba(15, 23, 42, 0.55); /* slate-900 with opacity */
    /* backdrop-filter: blur(12px) saturate(140%); */
    /* -webkit-backdrop-filter: blur(12px) saturate(140%); */
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-medium);
    color: var(--color-text-inverse);
    display: inline-block;
    max-width: 820px;
}
[data-theme="dark"] .hero .hero-glass {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255,255,255,0.15);
}
.hero .hero-glass .hero-title { color: var(--color-text-inverse); text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.hero .hero-glass .hero-subtitle { color: rgba(255,255,255,0.92); text-shadow: 0 1px 3px rgba(0,0,0,.35); }

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out 0.2s both;
}

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

/* Hero Images */
.hero-images {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    backdrop-filter: blur(1px);
}

.hero-image-container {
    position: relative;
    width: 350px;
    height: 550px;
    backdrop-filter: blur(2px);
    border-radius: 20px;
    padding: 20px;
}

.hero-image {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(20, 112, 149, 0.15);
    transition: var(--transition);
    filter: brightness(1.05) contrast(1.1) saturate(1.1);
    opacity: 0;
    animation: fadeInImage 1s ease-out forwards;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.image1 {
    animation-delay: 0.2s;
}

.image2 {
    animation-delay: 0.4s;
}

.image3 {
    animation-delay: 0.6s;
}

.hero-image:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 0 10px 25px rgba(20, 112, 149, 0.2);
    filter: brightness(1.1) contrast(1.2) saturate(1.2);
    z-index: 10;
}

.image1 {
    top: 20px;
    left: 10px;
}

.image2 {
    top: 20px;
    left: 240px;
}

.image3 {
    top: 200px;
    left: 125px;
}

/* =============================
   7. CTA Button
   ============================= */
.cta-btn {
    --cta-bg: var(--gradient-primary);
    background: var(--cta-bg);
    color: var(--color-text-inverse);
    padding: 0.95rem 2.1rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    margin-block: 0.5rem;
    margin-inline-end: 0.75rem;
    transition: all 0.3s ease-in-out;
    box-shadow: var(--shadow-medium);
    animation: fadeInUp 1s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
    background-size: 200% 200%;
}
.cta-btn::after { 
    content: ''; 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 65%); 
    opacity: 0; 
    transition: opacity .45s ease; 
}
.cta-btn:hover { 
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-large); 
    background-position: 100% 0; 
}
.cta-btn:hover::after { 
    opacity: 1; 
}
.cta-btn:focus-visible { 
    outline: none; 
    box-shadow: var(--focus-ring), var(--shadow-medium); 
}
.cta-btn:active { 
    transform: translateY(-2px) scale(.98); 
}
.cta-btn.secondary { 
    background: transparent; 
    color: var(--color-text-inverse); 
    border: 2px solid rgba(255,255,255,0.9); 
    box-shadow: none; 
}
.cta-btn.secondary:hover { 
    background: rgba(255,255,255,0.18); 
    border-color: rgba(255,255,255,1);
}
[data-theme="dark"] .cta-btn.secondary { 
    border-color: rgba(255,255,255,0.85); 
}
@media (prefers-reduced-motion: reduce) { 
    .cta-btn, .cta-btn:hover { 
        transition: none; 
        animation: none; 
    } 
}

/* =============================
   8. Section Styling
   ============================= */
.section {
    padding: 5rem 0;
    position: relative;
    background: var(--color-bg-page);
    transition: var(--transition);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: #1b2535;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* =============================
   9. About Section
   ============================= */
.about {
    background: linear-gradient(135deg, var(--color-bg-section-alt) 0%, var(--color-bg-surface-alt) 100%);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(24, 141, 70, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(20, 112, 149, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.about-card {
    background: var(--color-bg-surface);
    padding: 4rem 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 4px;
    /* Use gold accent for a subtle identity cue */
    background: linear-gradient(90deg, var(--color-brand-third), var(--color-brand-primary));
}

[data-theme="dark"] .about-card {
    border-color: var(--color-border-strong);
    background: var(--color-bg-surface);
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-large);
}

/* About Header */
.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.about-icon {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow-large);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: var(--shadow-large);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
    }
}

.about-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Content */
.about-content {
    margin-bottom: 4rem;
}

.about-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 500;
}

/* About Features */
.about-features {
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--color-bg-surface-alt);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-item:hover::before {
    transform: scaleX(1);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    background: white;
    border-color: var(--color-brand-primary);
}

[data-theme="dark"] .feature-item {
    background: var(--color-bg-surface-alt);
    border-color: var(--color-border-strong);
}

[data-theme="dark"] .feature-item:hover {
    background: var(--color-bg-surface);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-large);
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-block-end: 1rem;
}

.feature-description {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* About Stats */
.about-stats {
    margin-bottom: 4rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-brand-primary), var(--color-brand-secondary));
    border-radius: var(--border-radius);
    color: white;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-large);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-block-end: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

/* About CTA */
.about-cta {
    text-align: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.about-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 200px;
}

.about-btn-secondary {
    background: transparent;
    color: var(--color-brand-primary);
    border: 2px solid var(--color-brand-primary);
}

.about-btn-secondary:hover {
    background: var(--color-brand-primary);
    color: white;
}

/* About section animations */
.about-card {
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-item {
    animation: fadeInScale 0.6s ease-out forwards;
    opacity: 0;
    transform: scale(0.9);
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }
.feature-item:nth-child(5) { animation-delay: 0.5s; }
.feature-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-item {
    animation: countUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.stat-item:nth-child(1) { animation-delay: 0.2s; }
.stat-item:nth-child(2) { animation-delay: 0.4s; }
.stat-item:nth-child(3) { animation-delay: 0.6s; }
.stat-item:nth-child(4) { animation-delay: 0.8s; }

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

/* =============================
   10. Partners Section
   ============================= */
.partners {
    background: var(--gradient-primary);
    color: var(--color-text-inverse);
    overflow: hidden;
}

.partners-marquee {
    display: flex;
    animation: scroll 30s linear infinite;
    width: max-content;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.partner-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    margin: 0 1rem;
    border-radius: var(--border-radius);
    min-width: 200px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.partner-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.partner-logo {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    margin-inline: auto;
    margin-block-end: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-brand-primary);
}

/* =============================
   11. Categories Section
   ============================= */
.category-card {
    background: var(--color-bg-surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid var(--color-border);
    margin-block-end: 2rem;
}
[data-theme="dark"] .category-card { border-color: var(--color-border-strong); }

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
}

.category-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
    font-weight: 600;
    font-size: 1.25rem;
}

.category-items {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-item {
    flex: 1;
    min-width: 120px;
    text-align: center;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: var(--color-bg-surface-alt);
    transition: var(--transition);
    border: 1px solid var(--color-border);
}
[data-theme="dark"] .category-item { background: var(--color-bg-surface-alt); border-color: var(--color-border-strong); }

.category-item:hover {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
}

.category-icon {
    font-size: 2rem;
    margin-block-end: 0.5rem;
    color: var(--color-brand-primary);
}

.category-item:hover .category-icon {
    color: white;
}

/* =============================
   12. Events Section
   ============================= */
.events {
    background: linear-gradient(135deg, var(--color-bg-section-alt) 0%, var(--color-bg-surface-alt) 100%);
}

.event-card {
    background: var(--color-bg-surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    border: 1px solid var(--color-border);
    height: 100%;
}
[data-theme="dark"] .event-card { border-color: var(--color-border-strong); }

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-large);
}

.event-image {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.event-content {
    padding: 1.5rem;
}

.event-date {
    color: var(--color-brand-secondary);
    font-weight: 600;
    margin-block-end: 0.5rem;
}

.event-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-block-end: 1rem;
}

.event-excerpt {
    color: var(--color-text-secondary);
    margin-block-end: 1rem;
}

/* =============================
   12.1 FAQ / Q&A Section
   ============================= */
.faq {
    background: linear-gradient(135deg, var(--color-bg-section-alt) 0%, var(--color-bg-surface-alt) 100%);
}

.faq .accordion { background: transparent; }

.faq .accordion-item {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-block: .75rem;
}

[data-theme="dark"] .faq .accordion-item {
    background: var(--color-bg-surface);
    border-color: var(--color-border-strong);
}

.faq .accordion-button {
    background: transparent;
    color: var(--color-text-primary);
    padding-block: 1.1rem;
    /* Logical paddings: keep start roomy, reserve space at end for caret */
    padding-inline-start: 1.25rem;
    padding-inline-end: 2.25rem;
    font-weight: 700;
    text-align: start;
    position: relative; /* for absolutely positioned caret */
}

.faq .accordion-button i {
    color: var(--color-brand-primary);
    margin-inline-end: .5rem;
}

.faq .accordion-button:not(.collapsed) {
    background: var(--overlay-glass-light);
    box-shadow: inset 0 -1px 0 var(--color-border);
}

[data-theme="dark"] .faq .accordion-button:not(.collapsed) {
    background: var(--overlay-glass-dark);
}

.faq .accordion-button:focus { box-shadow: var(--focus-ring); }

.faq .accordion-body {
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    padding: 1rem 1.25rem;
    line-height: 1.9;
}

.faq .accordion-button::after {
    /* Pin caret to inline-end (right in LTR, left in RTL) without overriding rotation */
    position: absolute;
    inset-inline-end: 0.5rem;
    /* Center vertically without using transform (preserve Bootstrap rotation) */
    inset-block-start: 0;
    inset-block-end: 0;
    margin-block: auto;
    margin-inline: 0;
    filter: none;
}
[data-theme="dark"] .faq .accordion-button::after { filter: invert(1) brightness(1.2); }

@media (max-width: 768px) {
    .faq .accordion-button { padding-inline: 1rem 2.5rem; }
    .faq .accordion-body { padding: .9rem 1rem; }
}

/* =============================
   13. Contact Section
   ============================= */
.contact {
    background: var(--gradient-primary);
    color: var(--color-text-inverse);
}

.contact-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--glass-border-light);
    box-shadow: var(--shadow-soft);
}
[data-theme="dark"] .contact-card { background: rgba(0,0,0,0.25); }

.contact-info {
    margin-block-end: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-block-end: 1rem;
    padding: 1rem 1.15rem;
    background: rgba(255, 255, 255, 0.14);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.25);
}
.contact-item:hover { background: rgba(255,255,255,0.22); }

.contact-item i {
    font-size: 1.5rem;
    margin-inline: 1rem;
    color: var(--accent-color);
}

.form-control {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    color: var(--color-text-inverse);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}
.form-control:focus {
    background: rgba(255,255,255,0.25);
    border-color: var(--color-accent);
    box-shadow: var(--focus-ring);
    color: var(--color-text-inverse);
}
.form-control::placeholder { color: rgba(255,255,255,0.65); }

/* =============================
   14. Footer
   ============================= */
.footer {
    background: var(--color-bg-inverse);
    color: var(--color-text-inverse);
    padding: 3rem 0 1rem;
}

.footer-section h5 {
    color: var(--accent-color);
    margin-block-end: 1rem;
}

.footer-link {
    color: var(--color-footer-link);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
}

.footer-link:hover {
    color: var(--color-brand-primary);
    transform: translateX(5px);
}

[dir="rtl"] .footer-link:hover {
    transform: translateX(-5px);
}


/* Muted text (override Bootstrap for better contrast) */
.text-muted {
    color: var(--color-text-muted) !important;
    opacity: 1 !important; /* Keep color predictable */
}
/* Inside dark footer use higher luminance for readability */
.footer .text-muted { color: rgba(255,255,255,0.70) !important; }
[data-theme="dark"] .footer .text-muted { color: rgba(255,255,255,0.72) !important; }

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: var(--color-text-inverse);
    text-align: center;
    border-radius: 50%;
    margin-inline: 0.25rem;
    transition: var(--transition);
    box-shadow: var(--shadow-soft);
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    color: white;
}

/* Footer legal links */
.legal-links a {
    color: var(--color-text-muted);
    font-size: .85rem;
    text-decoration: none !important;
    transition: var(--transition);
    position: relative;
}
.legal-links a:hover { color: var(--color-accent); }
.legal-links a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius:4px; }
.footer-bottom { font-size: .85rem; }
.footer-bottom .copyright-text { font-size: .85rem; }

/* =============================
   15. Responsive Design
   ============================= */
@media (max-width: 768px) {
    .hero .hero-glass { max-width: none; width: 100%; }
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-items {
        flex-direction: column;
    }
    
    .partners-marquee {
        animation-duration: 20s;
    }

    /* Hide hero images on mobile */
    .hero-images {
        display: none;
    }

    .hero-content {
        text-align: center;
    }

    /* About section mobile optimizations */
    .about-card {
        padding: 2rem 1.5rem;
    }

    .about-title {
        font-size: 1.8rem;
    }

    .about-description {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-item {
        padding: 2rem 1.5rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .about-cta {
        flex-direction: column;
        align-items: center;
    }

    .about-btn {
        min-width: 250px;
    }
}

@media (max-width: 992px) and (min-width: 769px) {
    /* Adjust hero images for tablets */
    .hero-image-container {
        width: 280px;
        height: 450px;
    }

    .hero-image {
        width: 160px;
        height: 160px;
    }

    .image1 {
        top: 15px;
        left: 5px;
    }
    [dir="rtl"] .image1 {
        right: 5px;
        left: auto;
    }
[dir="rtl"] .image1 {
        right: 5px;
        left: auto;
    }

    .image2 {
        top: 15px;
        left: 190px;
    }
    [dir="rtl"] .image2 {
        right: 190px;
        left: auto;
    }

    .image3 {
        top: 160px;
        left: 100px;
    }
    [dir="rtl"] .image3 {
        right: 100px;
        left: auto;
    }

    /* About section tablet optimizations */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================
   16. Loading Animation
   ============================= */
.loading {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity .55s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================
   17. Scroll to Top Button
   ============================= */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    inset-inline-start: 2rem;
    width: 50px;
    height: 50px;
    /* Use layered backgrounds so JS can update a CSS variable for progress */
    --scroll-progress: 0deg; /* will be updated via JS as 0deg-360deg */
    background:
        conic-gradient(var(--color-brand-primary) var(--scroll-progress), var(--color-bg-surface) var(--scroll-progress)),
        var(--color-brand-accent);
    color: var(--color-text-inverse);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    transition: background 0.35s ease, transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    position: fixed;
    isolation: isolate; /* ensure pseudo elements stack correctly */
}

/* Inner circle so progress ring appears as border */
.scroll-top::before {
    content: "";
    position: absolute;
    inset: 5px; /* thickness of ring */
    background: var(--gradient-primary);
    border-radius: 50%;
    z-index: -1;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    transition: background 0.35s ease;
}

[data-theme="dark"] .scroll-top::before {
    /* Fix undefined var(--color-surface-alt) -> use bg-surface-alt */
    background: linear-gradient(145deg, var(--color-bg-surface-alt), var(--color-bg-surface));
}

/* High contrast / prefers-reduced-motion fallback: no conic gradient animation */
@media (prefers-reduced-motion: reduce) {
    .scroll-top { transition: opacity 0.4s ease; }
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-large);
}

.scroll-top:active {
    transform: translateY(-1px) scale(0.95);
}

.scroll-top:focus-visible {
    outline: 3px solid var(--color-brand-primary);
    outline-offset: 4px;
}

/* Dark theme adjustments for progress ring */
[data-theme="dark"] .scroll-top {
    background:
    conic-gradient(var(--color-brand-primary) var(--scroll-progress), var(--color-bg-surface) var(--scroll-progress)),
    linear-gradient(145deg, #1e293b, #0f172a);
}

[data-theme="dark"] .scroll-top:hover::before {
    background: linear-gradient(145deg, var(--color-bg-surface), var(--color-bg-surface-alt));
}

/* =============================
   17.5 Event Detail Page Contrast Improvements
   ============================= */
/* Ensure strong readable typography in light mode for event detail content */
#event-details article {
    color: var(--color-text-primary);
    font-size: 1.0625rem; /* ~17px for better legibility */
    line-height: 1.8;
}

#event-details article h1,
#event-details article h2,
#event-details article h3,
#event-details article h4 {
    color: var(--color-text-primary);
    margin-top: 1.25rem;
    margin-bottom: .5rem;
}

#event-details article p,
#event-details article li {
    color: var(--color-text-secondary);
}

#event-details article a {
    color: var(--color-brand-secondary);
    text-decoration: underline;
}
#event-details article a:hover { color: var(--color-brand-primary); }

/* Tweak the meta chip on the header for optimal contrast */
.event-header .event-meta {
    color: rgba(255,255,255,0.98);
    border: 1px solid rgba(255,255,255,0.2);
}
.event-header .event-meta i { color: #fff; opacity: .95; }

/* =============================
   18. WhatsApp Button
   ============================= */
.whatsapp-btn {
    position: fixed;
    bottom: 6rem;
    inset-inline-start: 2rem;
    width: 50px;
    height: 50px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    opacity: 0;
    pointer-events: none;
}

/* =============================
   19. Reading Progress Bar (Global)
   ============================= */
#reading-progress-wrapper {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: 100%;
    height: 8px;
    z-index: 1600; /* above navbar */
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0,0,0,0.18), rgba(0,0,0,0));
    backdrop-filter: blur(6px) saturate(190%);
    -webkit-backdrop-filter: blur(6px) saturate(190%);
}

#reading-progress {
    height: 100%;
    width: 0%;
    --bar-glow: 0 0 6px var(--color-brand-primary), 0 0 14px rgba(0,0,0,0.35);
    background: linear-gradient(90deg,
        var(--color-brand-primary) 0%,
        var(--color-brand-accent) 55%,
        var(--color-brand-primary) 100%);
    transition: width 0.12s cubic-bezier(.4,.6,.3,1), filter .3s ease;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.18), var(--bar-glow);
    border-radius: 0 10px 10px 0;
    position: relative;
    overflow: hidden;
}

#reading-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.35), rgba(255,255,255,0) 60%);
    mix-blend-mode: overlay;
    pointer-events: none;
    opacity: .55;
}

#reading-progress::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, rgba(255,255,255,0.15) 0 8px, transparent 8px 16px);
    opacity: .35;
    animation: progressStripes 1.4s linear infinite;
}

@keyframes progressStripes {
    0% { transform: translateX(0); }
    100% { transform: translateX(32px); }
}

[dir="rtl"] #reading-progress {
    border-radius: 8px 0 0 8px;
}

@media (prefers-reduced-motion: reduce) {
    #reading-progress { transition: none; }
}

[data-theme="dark"] #reading-progress-wrapper {
    background: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(255,255,255,0));
}

[data-theme="dark"] #reading-progress {
    box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 2px 8px -2px rgba(0,0,0,0.65), 0 0 10px -2px var(--color-brand-primary);
}

.whatsapp-btn.visible {
    opacity: 1;
    pointer-events: all;
}

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

/* =============================
   /* Events Page Enhancements
   ============================= */
.search-filters-container {
    background: var(--color-bg-surface);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-medium);
    margin-bottom: 2rem;
}

[data-theme="dark"] .search-filters-container {
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--color-border-strong);
}

.search-box {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.search-box .form-control {
    padding-inline-start: 3rem;
    border-radius: 25px;
    border: 2px solid var(--color-border);
    background: var(--color-bg-page);
    color: var(--color-text-primary);
}

.search-box .form-control:focus {
    border-color: var(--color-brand-primary);
    box-shadow: var(--focus-ring);
}

.search-icon {
    position: absolute;
    inset-inline-start: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-border);
    background: var(--color-bg-page);
    color: var(--color-text-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-btn:hover, .view-btn.active {
    border-color: var(--color-brand-primary);
    background: var(--color-brand-primary);
    color: white;
}

.tags-filter {
    text-align: center;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.tag-btn {
    padding: 0.375rem 0.75rem;
    border: 2px solid var(--color-border);
    background: var(--color-bg-page);
    color: var(--color-text-primary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.tag-btn:hover, .tag-btn.active {
    border-color: var(--color-brand-secondary);
    background: var(--color-brand-secondary);
    color: white;
}

/* List View Styles */
.event-card.list-view {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
}

.event-card.list-view .event-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-inline-end: 1.5rem;
    margin-block-end: 0;
}

.event-card.list-view .event-content {
    flex: 1;
    text-align: start;
}

.event-card.list-view .event-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-block-end: 0.5rem;
}

.event-card.list-view .event-title {
    font-size: 1.25rem;
    margin-block-end: 0.5rem;
}

.event-card.list-view .event-excerpt {
    margin-block-end: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* List View Styles */
.events.list-view .event-item {
    width: 100%;
    margin-block-end: 1rem;
}

.events.list-view .event-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 1.5rem;
}

.events.list-view .event-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    margin-inline-end: 1.5rem;
    margin-block-end: 0;
}

.events.list-view .event-content {
    flex: 1;
    text-align: start;
}

.events.list-view .event-date {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-block-end: 0.5rem;
}

.events.list-view .event-title {
    font-size: 1.25rem;
    margin-block-end: 0.5rem;
}

.events.list-view .event-excerpt {
    margin-block-end: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination Styles */
.pagination-container {
    margin-block-start: 3rem;
}

.pagination {
    --bs-pagination-color: var(--color-brand-primary);
    --bs-pagination-bg: var(--color-bg-page);
    --bs-pagination-border-color: var(--color-border);
    --bs-pagination-hover-color: white;
    --bs-pagination-hover-bg: var(--color-brand-primary);
    --bs-pagination-focus-color: white;
    --bs-pagination-focus-bg: var(--color-brand-primary);
    --bs-pagination-active-color: white;
    --bs-pagination-active-bg: var(--color-brand-primary);
    --bs-pagination-disabled-color: var(--color-text-muted);
    --bs-pagination-disabled-bg: var(--color-bg-surface-alt);
}

[data-theme="dark"] .pagination {
    --bs-pagination-bg: rgba(0,0,0,0.25);
    --bs-pagination-border-color: var(--color-border-strong);
    --bs-pagination-disabled-bg: rgba(255,255,255,0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-filters-container {
        padding: 1.5rem;
    }
    
    .tags-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding-block-end: 0.5rem;
    }
    
    .tags-container::-webkit-scrollbar {
        height: 4px;
    }
    
    .tags-container::-webkit-scrollbar-track {
        background: var(--color-bg-surface-alt);
    }
    
    .tags-container::-webkit-scrollbar-thumb {
        background: var(--color-border);
        border-radius: 2px;
    }
    
    .view-toggle {
        justify-content: flex-start;
    }
    
    .event-card.list-view {
        flex-direction: column;
        text-align: center;
    }
    
    .event-card.list-view .event-image {
        margin-inline-end: 0;
        margin-block-end: 1rem;
    }
    
    .event-card.list-view .event-content {
        text-align: center;
    }
}

/* =============================
   Event Modal Styles
   ============================= */
.modal-content {
    background-color: var(--color-bg-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
}

[data-theme="dark"] .modal-content {
    background-color: var(--color-bg-surface-alt);
    border: 1px solid var(--color-border-strong);
}

.modal-header {
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem;
}

[data-theme="dark"] .modal-header {
    border-bottom: 1px solid var(--color-border-strong);
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    background-color: var(--color-bg-surface-alt);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

[data-theme="dark"] .modal-footer {
    border-top: 1px solid var(--color-border-strong);
    background-color: var(--color-bg-surface);
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.event-modal-content {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    text-align: start;
}

.event-modal-image {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    box-shadow: var(--shadow-soft);
}

.event-modal-details {
    flex-grow: 1;
}

.event-modal-details h3 {
    color: var(--color-text-primary);
    margin-block-end: 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.event-modal-date {
    color: var(--color-brand-primary);
    font-weight: 600;
    margin-block-end: 1rem;
    font-size: 0.9rem;
}

.event-modal-description {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-block-end: 1.5rem;
}

.event-modal-tags {
    margin-block-end: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.event-modal-tags .badge {
    font-size: 0.85rem;
    padding: 0.4em 0.8em;
}


/* =============================
   Sort Options Styles
   ============================= */
.sort-options {
    margin-block-end: 1rem;
}

.sort-options .form-select {
    max-width: 200px;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-bg-surface);
    color: var(--color-text-primary);
}

.sort-options .form-select:focus {
    border-color: var(--color-brand-primary);
    box-shadow: var(--focus-ring);
}

@media (max-width: 768px) {
    .event-modal-content {
        flex-direction: column;
        text-align: center;
    }
    
    .event-modal-image {
        margin-inline: auto;
    }
}

@media (max-width: 768px) {
    /* Responsive search and filters */
    .search-filters-container {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        order: 1;
    }

    .view-toggle {
        order: 2;
        justify-content: center;
    }

    .sort-options {
        order: 3;
        text-align: center;
    }

    .sort-options .form-select {
        max-width: 100%;
    }

    .tags-filter {
        order: 4;
    }

    .tags-container {
        justify-content: center;
        flex-wrap: wrap;
    }

    .tag-btn {
        margin: 0.25rem;
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }

    /* Better list view on mobile */
    .event-card.list-view {
        padding: 1.5rem;
    }

    .event-card.list-view .event-content {
        text-align: right;
    }

    .event-card.list-view .event-image {
        width: 60px;
        height: 60px;
        margin-right: 1rem;
        margin-bottom: 0;
    }

    .event-card.list-view .event-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .event-card.list-view .event-date {
        font-size: 0.875rem;
    }

    .event-card.list-view .event-excerpt {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
}
[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Pagination Bottuns Radius for RTL Direction */
[dir="rtl"] .page-item:last-child .page-link {
    border-top-left-radius: var(--bs-pagination-border-radius);
    border-bottom-left-radius: var(--bs-pagination-border-radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
[dir="rtl"] .page-item:first-child .page-link {
    border-top-right-radius: var(--bs-pagination-border-radius);
    border-bottom-right-radius: var(--bs-pagination-border-radius);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

