/* ==========================================================================
   MAIN SYSTEM CSS STYLE - SAHETALDAH
   ========================================================================== */

/* Define CSS Variables */
:root {
    /* Color Palette - Dark Mode (Default) */
    --color-bg-dark: #071510;
    --color-surface: rgba(10, 31, 24, 0.5);
    --color-surface-hover: rgba(15, 47, 36, 0.7);
    --color-emerald: #0d412e;
    --color-emerald-light: #166e50;
    --color-gold: #d4af37;
    --color-gold-hover: #f3cf58;
    --color-text-light: #f3f6f4;
    --color-text-muted: #8ca398;
    --glass-bg: rgba(10, 31, 24, 0.35);
    --glass-border: rgba(214, 175, 55, 0.18);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    
    /* Typography */
    --font-arabic: 'Tajawal', sans-serif;
    --font-serif: 'Amiri', serif;
    --font-english: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Variables Override */
body.light-mode {
    --color-bg-dark: #f4f8f6;
    --color-surface: rgba(255, 255, 255, 0.85);
    --color-surface-hover: rgba(255, 255, 255, 0.95);
    --color-emerald: #0b5e43;
    --color-emerald-light: #10805c;
    --color-gold: #ab8b22;
    --color-gold-hover: #8f7215;
    --color-text-light: #1d2b24;
    --color-text-muted: #5e6f66;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(11, 94, 67, 0.15);
    --card-shadow: 0 10px 25px rgba(11, 94, 67, 0.08);
    background: radial-gradient(circle at 50% 50%, #f4fcf8 0%, #e2eee7 70%, #d5e4dc 100%) no-repeat fixed;
    background-color: #d5e4dc;
}

/* General Settings */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at 50% 50%, #0d3b2b 0%, #061c14 65%, #030e0a 100%) no-repeat fixed;
    background-color: #030e0a;
    color: var(--color-text-light);
    font-family: var(--font-arabic);
    overflow-x: hidden;
    transition: background 0.5s ease, background-color 0.5s ease, color 0.3s ease;
    min-height: 100vh;
}

/* RTL / LTR Font Handlers */
html[dir="ltr"] body {
    font-family: var(--font-english);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-light);
    font-weight: 700;
}

.amiri-text {
    font-family: var(--font-serif);
}

/* 1. Starfield Particles Canvas */
.particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* 2. Glassmorphic Style Utility */
.glassmorphism {
    background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, rgba(0,0,0,0) 100%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0 L52 28 L80 40 L52 52 L40 80 L28 52 L0 40 L28 28 Z' fill='none' stroke='%23d4af37' stroke-width='0.5' stroke-opacity='0.07'/%3E%3Crect x='15' y='15' width='50' height='50' transform='rotate(45 40 40)' fill='none' stroke='%23d4af37' stroke-width='0.3' stroke-opacity='0.04'/%3E%3Crect x='15' y='15' width='50' height='50' fill='none' stroke='%23d4af37' stroke-width='0.3' stroke-opacity='0.04'/%3E%3Ccircle cx='40' cy='40' r='5' fill='none' stroke='%23d4af37' stroke-width='0.5' stroke-opacity='0.06'/%3E%3C/svg%3E");
    background-color: var(--color-surface);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.glassmorphism::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border: 1px dashed rgba(214, 175, 55, 0.18);
    border-radius: 15px;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1;
}
.glassmorphism::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: 20px;
    background-image: 
        radial-gradient(circle at 14px 14px, var(--color-gold) 1.5px, transparent 2.5px),
        radial-gradient(circle at calc(100% - 14px) 14px, var(--color-gold) 1.5px, transparent 2.5px),
        radial-gradient(circle at 14px calc(100% - 14px), var(--color-gold) 1.5px, transparent 2.5px),
        radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), var(--color-gold) 1.5px, transparent 2.5px);
    z-index: 1;
    opacity: 0.7;
    transition: var(--transition);
}
.glassmorphism:hover {
    border-color: rgba(214, 175, 55, 0.35);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 15px rgba(214, 175, 55, 0.15);
    transform: translateY(-2px);
}
.glassmorphism:hover::before {
    border-color: rgba(214, 175, 55, 0.4);
}
.glassmorphism:hover::after {
    opacity: 1;
}
.glassmorphism > * {
    position: relative;
    z-index: 2;
}
body.light-mode .glassmorphism {
    background-image: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0) 100%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0 L52 28 L80 40 L52 52 L40 80 L28 52 L0 40 L28 28 Z' fill='none' stroke='%230b5e43' stroke-width='0.5' stroke-opacity='0.08'/%3E%3Crect x='15' y='15' width='50' height='50' transform='rotate(45 40 40)' fill='none' stroke='%230b5e43' stroke-width='0.3' stroke-opacity='0.05'/%3E%3Crect x='15' y='15' width='50' height='50' fill='none' stroke='%230b5e43' stroke-width='0.3' stroke-opacity='0.05'/%3E%3Ccircle cx='40' cy='40' r='5' fill='none' stroke='%230b5e43' stroke-width='0.5' stroke-opacity='0.07'/%3E%3C/svg%3E");
}
body.light-mode .glassmorphism::before {
    border-color: rgba(11, 94, 67, 0.18);
}
body.light-mode .glassmorphism:hover::before {
    border-color: rgba(11, 94, 67, 0.4);
}
body.light-mode .glassmorphism:hover {
    border-color: rgba(11, 94, 67, 0.3);
    box-shadow: 0 12px 30px rgba(11, 94, 67, 0.12);
}

/* 3. Global App Layout wrapper */
.app-wrapper {
    position: relative;
    z-index: 2; /* Sits above the background canvas */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevents global horizontal scrolling on mobile (fallback for old browsers) */
    overflow-x: clip;    /* FIX: clip also prevents horizontal overflow but does NOT create a
                            scroll container — overflow:hidden here silently broke position:sticky
                            on .navbar (and .quran-toolbar/.burda-toolbar). Old Safari keeps the
                            hidden fallback above; modern browsers use clip and sticky works. */
}

/* Glow effects */
.gold-text { color: var(--color-gold) !important; }
.gold-glow {
    text-shadow: 0 0 15px rgba(214, 175, 55, 0.5);
    color: var(--color-gold);
}
.gold-border {
    border-color: var(--color-gold) !important;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gold) 0%, #b29023 100%);
    color: #071510 !important;
    border: none;
    box-shadow: 0 4px 15px rgba(214, 175, 55, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
}

.btn-outline:hover {
    background: rgba(214, 175, 55, 0.08);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10805c 0%, #085a40 100%);
    color: #fff;
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 128, 92, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Inputs styling */
input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="number"], input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(10, 31, 24, 0.55);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--color-text-light);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

body.light-mode input {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(11, 94, 67, 0.2);
}

input:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(214, 175, 55, 0.15);
}

/* 4. Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 30px;
    background: rgba(7, 21, 16, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(214, 175, 55, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

body.light-mode .navbar {
    background: rgba(244, 248, 246, 0.85);
    border-bottom: 1px solid rgba(11, 94, 67, 0.1);
}

.navbar .nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar .nav-logo i {
    font-size: 28px;
    color: var(--color-gold);
}

.navbar .nav-logo span {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: bold;
    color: var(--color-text-light);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--color-gold);
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Control buttons (Toggle language, mode) */
.ctrl-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(10, 31, 24, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--color-gold);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}
.ctrl-btn[title] {
    width: auto;
    border-radius: 20px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-sans);
}
.ctrl-btn:hover {
    background: var(--color-surface-hover);
    transform: scale(1.08);
}

.mobile-menu-btn {
    display: none;
    font-size: 22px;
    background: transparent;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

/* 5. Hero Section */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 60px 20px; /* Issue #19 */
    position: relative;
}

.hero-content {
    max-width: 800px;
    z-index: 5;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-badge {
    background: rgba(214, 175, 55, 0.08);
    border: 1px solid rgba(214, 175, 55, 0.3);
    color: var(--color-gold);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    margin-bottom: 25px;
}

.hero-content h2 {
    font-family: var(--font-serif);
    font-size: 52px;
    margin: 0 0 20px 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, var(--color-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

body.light-mode .hero-content h2 {
    background: linear-gradient(135deg, #071510 0%, #ab8b22 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0 0 35px 0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* 6. Section Styles */
.section {
    padding: 80px 20px;
    width: 100%; /* Explicit width: prevents flex-column shrink-to-fit blowout on narrow screens */
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: 38px;
    margin: 0 0 10px 0;
}

.section-header p {
    font-size: 15px;
    color: var(--color-text-muted);
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.section-divider {
    height: 1px;
    background: radial-gradient(circle, var(--color-gold) 0%, rgba(255,255,255,0) 70%);
    opacity: 0.4; /* Issue #21 */
    margin: 20px auto 0 auto;
    max-width: 400px;
    position: relative;
}
.section-divider::after {
    content: '◆';
    position: absolute;
    left: 50%;
    top: -6px;
    transform: translateX(-50%);
    color: var(--color-gold);
    font-size: 10px;
    opacity: 0.8;
}

/* 7. Schedule Section Components */
.schedule-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.days-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.day-btn {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.day-btn:hover {
    color: var(--color-gold);
    border-color: var(--color-gold);
    background: var(--color-surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(214, 175, 55, 0.15);
}

.day-btn.active {
    background: linear-gradient(135deg, var(--color-emerald) 0%, #07261b 100%);
    border-color: var(--color-gold);
    color: var(--color-gold);
    font-weight: bold;
    box-shadow: var(--card-shadow), 0 0 15px rgba(214, 175, 55, 0.25);
    transform: translateY(-2px);
}

body.light-mode .day-btn.active {
    background: linear-gradient(135deg, var(--color-emerald) 0%, #159a6e 100%);
    color: #fff;
    border-color: var(--color-emerald);
    box-shadow: 0 4px 15px rgba(11, 94, 67, 0.2);
}

.schedule-list {
    min-height: 200px;
}

/* Empty State / No Events Card */
.no-events-card {
    display: none;
    padding: 50px 30px;
    text-align: center;
    border-radius: 24px;
    max-width: 600px;
    margin: 40px auto;
    border: 1px dashed var(--glass-border);
    background: rgba(10, 31, 24, 0.25);
    backdrop-filter: blur(10px);
    box-shadow: var(--card-shadow);
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.light-mode .no-events-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed rgba(11, 94, 67, 0.25);
}

.no-events-card i {
    font-size: 54px;
    color: var(--color-gold);
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(214, 175, 55, 0.2));
}

body.light-mode .no-events-card i {
    color: var(--color-emerald);
    filter: none;
}

.no-events-card h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: var(--color-text-light);
    margin: 0 0 10px 0;
}

.no-events-card p {
    font-size: 15px;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.6;
}

.schedule-card {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 25px;
    align-items: center;
    padding: 25px 30px;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: slideIn 0.6s forwards cubic-bezier(0.16, 1, 0.3, 1);
    animation-delay: calc(var(--i, 0) * 0.12s);
    border-right: 4px solid rgba(214, 175, 55, 0.25);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s;
}

html[dir="ltr"] .schedule-card {
    border-right: 1px solid var(--glass-border);
    border-left: 4px solid rgba(214, 175, 55, 0.25);
}

.schedule-card:hover {
    transform: translateY(-5px) scale(1.005);
    border-right-color: var(--color-gold);
    box-shadow: var(--card-shadow), 0 12px 24px rgba(214, 175, 55, 0.15);
}

html[dir="ltr"] .schedule-card:hover {
    border-left-color: var(--color-gold);
}

body.light-mode .schedule-card {
    border-right-color: rgba(11, 94, 67, 0.25);
}

html[dir="ltr"].light-mode .schedule-card {
    border-left-color: rgba(11, 94, 67, 0.25);
}

body.light-mode .schedule-card:hover {
    border-right-color: var(--color-emerald);
    box-shadow: var(--card-shadow), 0 10px 20px rgba(11, 94, 67, 0.12);
}

html[dir="ltr"].light-mode .schedule-card:hover {
    border-left-color: var(--color-emerald);
}
.sheikh-avatar-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 31, 24, 0.6);
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.2);
    flex-shrink: 0;
    transition: var(--transition);
    /* Anti-alias circular overflow boundary in Chrome/Safari */
    -webkit-mask-image: -webkit-radial-gradient(circle, white 100%, transparent 100%);
    mask-image: radial-gradient(circle, white 100%, transparent 100%);
}
.schedule-card:hover .sheikh-avatar-container {
    transform: scale(1.05);
    border-color: var(--color-gold-hover);
    box-shadow: 0 0 20px rgba(214, 175, 55, 0.35);
}
body.light-mode .sheikh-avatar-container {
    border-color: var(--color-emerald);
    box-shadow: 0 0 10px rgba(11, 94, 67, 0.15);
}
body.light-mode .schedule-card:hover .sheikh-avatar-container {
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.2);
}
.sheikh-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Force anti-aliased circular rendering */
    transform: translate3d(0, 0, 0); /* Force GPU bilinear interpolation for downscaled high-res images */
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.sheikh-avatar-placeholder {
    font-size: 38px;
    color: var(--color-gold);
    opacity: 0.85;
}
body.light-mode .sheikh-avatar-placeholder {
    color: var(--color-emerald);
}
.schedule-badge-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(214, 175, 55, 0.08);
    border: 1px solid rgba(214, 175, 55, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: 12px;
}
body.light-mode .schedule-badge-time {
    background: rgba(11, 94, 67, 0.06);
    border: 1px solid rgba(11, 94, 67, 0.2);
    color: var(--color-emerald);
}
.schedule-info h3 {
    font-size: 20px;
    margin: 0 0 8px 0;
    color: var(--color-gold);
}
body.light-mode .schedule-info h3 {
    color: var(--color-emerald);
}
.schedule-info p {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0 0 10px 0;
    line-height: 1.5;
}
.schedule-presenter {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.schedule-presenter i {
    color: var(--color-gold);
}
body.light-mode .schedule-presenter i {
    color: var(--color-emerald);
}

/* 8. Lectures & Series Library */
.library-controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    width: 100%;
    max-width: 500px;
    border-radius: 40px;
    background: rgba(10, 31, 24, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
}
body.light-mode .search-container {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(11, 94, 67, 0.2);
}
.search-container:focus-within {
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.2);
}
.search-container i {
    color: var(--color-text-muted);
}
.search-container input {
    background: transparent;
    border: none;
    flex: 1;
    padding: 0;
    color: var(--color-text-light);
    outline: none;
    box-shadow: none;
    font-size: 15px;
}

.results-count {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: bold;
}

/* 8. Lectures Slider */
.lectures-slider-outer-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}
@media (max-width: 768px) {
    .lectures-slider-outer-container {
        margin: 0 auto;
    }
}

/* 8. Lectures & Series Library */
.library-controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    width: 100%;
    max-width: 500px;
    border-radius: 40px;
    background: rgba(10, 31, 24, 0.4);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
}
body.light-mode .search-container {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(11, 94, 67, 0.2);
}
.search-container:focus-within {
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.2);
}
.search-container i {
    color: var(--color-text-muted);
}
.search-container input {
    background: transparent;
    border: none;
    flex: 1;
    padding: 0;
    color: var(--color-text-light);
    outline: none;
    box-shadow: none;
    font-size: 15px;
}

.results-count {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: bold;
}

/* 8. Series Scroll Container (Lectures) */
.series-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.series-scroll::-webkit-scrollbar { display: none; }

.series-scroll .series-card-link {
    flex: 0 0 75%;
    max-width: 280px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 577px) {
    .series-scroll .series-card-link {
        flex: 0 0 45%;
        max-width: 300px;
    }
}
@media (min-width: 769px) {
    .series-scroll .series-card-link {
        flex: 0 0 30%;
        max-width: 320px;
    }
}
@media (min-width: 1201px) {
    .series-scroll .series-card-link {
        flex: 0 0 22%;
        max-width: 340px;
    }
}

/* 9. Gallery Scroll Container */
.gallery-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.gallery-scroll::-webkit-scrollbar { display: none; }

.gallery-card {
    flex: 0 0 65%;
    max-width: 240px;
    scroll-snap-align: start;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #092c20 0%, #03140e 100%);
    border: 1.5px solid rgba(214, 175, 55, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 12px;
    background: linear-gradient(to top, rgba(3, 10, 7, 0.9) 0%, transparent 100%);
    pointer-events: none;
}
.gallery-overlay h3 {
    font-size: 13px;
    margin: 0;
    color: var(--color-gold);
    font-weight: 600;
}

@media (min-width: 577px) {
    .gallery-card {
        flex: 0 0 40%;
        max-width: 280px;
    }
}
@media (min-width: 769px) {
    .gallery-card {
        flex: 0 0 28%;
        max-width: 300px;
        aspect-ratio: 4/5;
    }
}
@media (min-width: 1201px) {
    .gallery-card {
        flex: 0 0 20%;
        max-width: 320px;
    }
}

.gallery-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(10, 31, 24, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(214, 175, 55, 0.25);
    border-radius: 30px;
    color: var(--color-gold);
    font-size: 13px;
    font-weight: 600;
}
body.light-mode .gallery-counter-badge {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(11, 94, 67, 0.2);
    color: var(--color-emerald);
}

.series-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    background-image: none !important;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    background: var(--color-surface);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    height: 100%;
}
.series-card::before, .series-card::after {
    display: none;
}
.series-card:hover {
    transform: translateY(-8px);
    border-color: rgba(214, 175, 55, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(214, 175, 55, 0.15);
}

.series-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 video frame */
    background: linear-gradient(135deg, #092c20 0%, #03140e 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.series-sheikh-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Real YouTube thumbnail of the first video in the series */
.series-thumb-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.series-card:hover .series-thumb-img {
    transform: scale(1.06);
}
/* Small circular sheikh avatar overlaid on the video thumbnail */
.series-sheikh-chip {
    position: absolute;
    bottom: 12px;
    left: 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 2px solid rgba(214, 175, 55, 0.55);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    background: #03140e;
    z-index: 3;
    transition: var(--transition);
}
html[dir="ltr"] .series-sheikh-chip {
    left: auto;
    right: 12px;
}
.series-card:hover .series-sheikh-chip {
    border-color: var(--color-gold);
    transform: scale(1.08);
}
.sheikh-avatar-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #072218 0%, #020c08 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.placeholder-pattern {
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    opacity: 0.05;
    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 0 L40 20 L60 30 L40 40 L30 60 L20 40 L0 30 L20 20 Z' fill='none' stroke='%23d4af37' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 50px 50px;
    transform: rotate(15deg);
    transition: transform 0.6s ease;
}
.series-card:hover .placeholder-pattern {
    transform: rotate(35deg) scale(1.1);
}
.placeholder-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 1.5px solid rgba(214, 175, 55, 0.25);
    background: rgba(7, 21, 16, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(214, 175, 55, 0.15), inset 0 0 15px rgba(214, 175, 55, 0.08);
    z-index: 2;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.placeholder-ring::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 1px dashed rgba(214, 175, 55, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.series-card:hover .placeholder-ring {
    border-color: rgba(214, 175, 55, 0.5);
    transform: scale(1.08);
    box-shadow: 0 0 25px rgba(214, 175, 55, 0.3), inset 0 0 20px rgba(214, 175, 55, 0.12);
}
.series-card:hover .placeholder-ring::before {
    transform: rotate(45deg);
    border-color: rgba(214, 175, 55, 0.35);
}
.placeholder-ring i {
    font-size: 32px;
    color: var(--color-gold);
    text-shadow: 0 0 12px rgba(214, 175, 55, 0.5);
    transition: var(--transition);
}
.series-card:hover .placeholder-ring i {
    color: var(--color-gold-hover);
    transform: scale(1.05);
}

.series-count-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(7, 21, 16, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(214, 175, 55, 0.3);
    color: var(--color-gold);
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 3;
    transition: var(--transition);
}
html[dir="ltr"] .series-count-badge {
    right: auto;
    left: 15px;
}
.series-card:hover .series-count-badge {
    background: rgba(13, 65, 46, 0.85);
    border-color: var(--color-gold);
    box-shadow: 0 0 12px rgba(214, 175, 55, 0.3);
    transform: translateY(-2px);
}

.series-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(7, 21, 16, 0.7) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}
.series-card:hover .series-play-overlay {
    opacity: 1;
}
.series-card:hover .series-sheikh-img {
    transform: scale(1.08);
}
.series-play-overlay i {
    font-size: 20px;
    color: var(--color-gold);
    background: rgba(10, 31, 24, 0.85);
    border: 2px solid var(--color-gold);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    box-shadow: 0 0 20px rgba(214, 175, 55, 0.35);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
html[dir="rtl"] .series-play-overlay i {
    padding-left: 0;
    padding-right: 4px;
}
.series-card:hover .series-play-overlay i {
    transform: scale(1.15);
    color: #071510;
    background: var(--color-gold);
    box-shadow: 0 0 25px rgba(214, 175, 55, 0.6);
    border-color: var(--color-gold);
}

.series-content {
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-top: 1px solid rgba(214, 175, 55, 0.1);
}
.series-content h3 {
    font-size: 17px;
    margin: 0 0 14px 0;
    color: var(--color-text-light);
    line-height: 1.55;
    font-weight: 600;
    transition: var(--transition);
}
.series-card:hover .series-content h3 {
    color: var(--color-gold);
}
.series-presenter {
    font-size: 13px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: var(--transition);
}
.series-presenter i {
    color: var(--color-gold);
    transition: var(--transition);
}
.series-card:hover .series-presenter {
    color: var(--color-text-light);
}
.series-card:hover .series-presenter i {
    transform: scale(1.1);
}

/* Light Mode Overrides for Series Cards */
body.light-mode .series-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(11, 94, 67, 0.15);
    box-shadow: 0 10px 25px rgba(11, 94, 67, 0.06);
}
body.light-mode .series-card:hover {
    border-color: var(--color-emerald);
    box-shadow: 0 15px 30px rgba(11, 94, 67, 0.15);
}
body.light-mode .sheikh-avatar-placeholder {
    background: linear-gradient(135deg, #e4eee8 0%, #cbe0d3 100%);
}
body.light-mode .placeholder-pattern {
    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 0 L40 20 L60 30 L40 40 L30 60 L20 40 L0 30 L20 20 Z' fill='none' stroke='%2310805c' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.1;
}
body.light-mode .placeholder-ring {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(11, 94, 67, 0.25);
    box-shadow: 0 0 15px rgba(11, 94, 67, 0.1), inset 0 0 10px rgba(11, 94, 67, 0.05);
}
body.light-mode .placeholder-ring::before {
    border-color: rgba(11, 94, 67, 0.2);
}
body.light-mode .placeholder-ring i {
    color: var(--color-emerald);
    text-shadow: none;
}
body.light-mode .series-card:hover .placeholder-ring {
    border-color: var(--color-emerald);
    box-shadow: 0 0 20px rgba(11, 94, 67, 0.2), inset 0 0 15px rgba(11, 94, 67, 0.08);
}
body.light-mode .series-card:hover .placeholder-ring::before {
    border-color: var(--color-emerald-light);
}
body.light-mode .series-card:hover .placeholder-ring i {
    color: var(--color-emerald-light);
}
body.light-mode .series-count-badge {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(11, 94, 67, 0.3);
    color: var(--color-emerald);
}
body.light-mode .series-card:hover .series-count-badge {
    background: var(--color-emerald);
    border-color: var(--color-emerald);
    color: #fff;
    box-shadow: 0 0 10px rgba(11, 94, 67, 0.2);
}
body.light-mode .series-content h3 {
    color: #071510;
}
body.light-mode .series-card:hover .series-content h3 {
    color: var(--color-emerald-light);
}

/* Videos detail view */
.videos-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px;
    margin-bottom: 30px;
}
.videos-header .btn {
    align-self: flex-start;
}
.videos-header-info {
    display: flex;
    align-items: center;
    gap: 20px;
}
.videos-header-info img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-gold);
}
.vhi-text h3 {
    font-family: var(--font-serif);
    font-size: 26px;
    margin: 0 0 8px 0;
    color: var(--color-text-light);
}

.lectures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.lecture-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    background-image: none !important;
}
.lecture-card::before, .lecture-card::after {
    display: none;
}

.lecture-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    background: #030e0a;
    overflow: hidden;
}
.lecture-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.lecture-card:hover .lecture-thumb {
    transform: scale(1.08);
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(7, 21, 16, 0.5) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.lecture-card:hover .play-overlay {
    opacity: 1;
}

.play-overlay i {
    font-size: 20px;
    color: var(--color-gold);
    background: rgba(10, 31, 24, 0.85);
    border: 2px solid var(--color-gold);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    box-shadow: 0 0 20px rgba(214, 175, 55, 0.35);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

html[dir="rtl"] .play-overlay i {
    padding-left: 0;
    padding-right: 4px;
}

.lecture-card:hover .play-overlay i {
    transform: scale(1.2);
    color: #071510;
    background: var(--color-gold);
    box-shadow: 0 0 25px rgba(214, 175, 55, 0.6);
    border-color: var(--color-gold);
}

.lecture-content {
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border-top: 1px solid rgba(214, 175, 55, 0.1);
}

.lecture-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-gold);
    background: rgba(214, 175, 55, 0.1);
    border: 1px solid rgba(214, 175, 55, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    display: inline-block;
    align-self: flex-start;
}

.lecture-content h3 {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 12px 0;
    flex-grow: 1;
    color: var(--color-text-light);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lecture-date {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 9. Litanies (PDF) Grid */
.litanies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.litany-card {
    padding: 30px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.litany-card:hover {
    border-color: var(--color-gold);
    transform: translateY(-5px);
}

.litany-icon {
    font-size: 44px;
    color: var(--color-gold);
    margin-bottom: 20px;
    background: rgba(214, 175, 55, 0.08);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(214, 175, 55, 0.15);
}

.litany-card h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    margin: 0 0 10px 0;
    color: var(--color-gold);
}

.litany-card p {
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 0 25px 0;
    flex-grow: 1;
}

.litany-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.litany-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
}

/* 10. Gallery Slider */
.gallery-slider-outer-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.gallery-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Lectures Slider Wrapper (was missing!) */
.lectures-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.gallery-slider-viewport {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    gap: 22px;
    padding: 15px 5px;
}

.gallery-slider-viewport::-webkit-scrollbar {
    display: none;
}

/* Gallery Item - Premium Card */
.gallery-slider-viewport .gallery-item {
    flex: 0 0 calc(45% - 11px);
    scroll-snap-align: start;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, #092c20 0%, #03140e 100%);
    border: 1.5px solid rgba(214, 175, 55, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(214, 175, 55, 0.05);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-slider-viewport .gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(214, 175, 55, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(214, 175, 55, 0.12);
}

/* Shimmer loading skeleton */
.gallery-item-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        rgba(214, 175, 55, 0.03) 0%,
        rgba(214, 175, 55, 0.08) 40%,
        rgba(214, 175, 55, 0.03) 60%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite ease-in-out;
    z-index: 1;
    border-radius: 20px;
    pointer-events: none;
}

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

.gallery-item img.loaded ~ .gallery-item-shimmer,
.gallery-item:has(img.loaded) .gallery-item-shimmer {
    opacity: 0;
    transition: opacity 0.5s ease;
}

@media (max-width: 992px) {
    .gallery-slider-viewport .gallery-item {
        flex: 0 0 calc(55% - 11px);
    }
}

@media (max-width: 576px) {
    .gallery-slider-viewport .gallery-item {
        flex: 0 0 calc(70% - 10px); /* ~1.4 cards peeking on mobile */
        border-radius: 16px;
        aspect-ratio: 3/4; /* shorter cards on mobile */
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    position: relative;
    z-index: 2;
}

.gallery-item img.loaded {
    opacity: 1;
}

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

/* Premium Gallery Overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(3, 10, 7, 0.95) 0%,
        rgba(3, 10, 7, 0.4) 35%,
        rgba(3, 10, 7, 0.0) 55%,
        rgba(3, 10, 7, 0.0) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 24px 20px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

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

.gallery-overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(214, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(214, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    font-size: 20px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 30px rgba(214, 175, 55, 0.2);
}

.gallery-item:hover .gallery-overlay-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-overlay-text {
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .gallery-overlay-text {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 15px;
    margin: 0 0 4px 0;
    color: var(--color-gold);
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.gallery-overlay p {
    font-size: 12px;
    color: rgba(243, 246, 244, 0.8);
    margin: 0;
    line-height: 1.4;
}

/* Gallery Counter Badge */
.gallery-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(10, 31, 24, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(214, 175, 55, 0.25);
    border-radius: 30px;
    color: var(--color-gold);
    font-size: 13px;
    font-weight: 600;
    margin: 18px auto 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.light-mode .gallery-counter-badge {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(11, 94, 67, 0.2);
    color: var(--color-emerald);
}

/* === Slider Nav Buttons (Shared between Gallery + Lectures) === */
.slider-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(10, 31, 24, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(214, 175, 55, 0.25);
    color: var(--color-gold);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(214, 175, 55, 0.08);
}

.slider-nav-btn:hover {
    background: rgba(13, 65, 46, 0.85);
    border-color: var(--color-gold);
    box-shadow: 0 0 20px rgba(214, 175, 55, 0.4), 0 8px 25px rgba(0, 0, 0, 0.5);
    color: var(--color-gold-hover);
    transform: translateY(-50%) scale(1.1);
}

body.light-mode .slider-nav-btn {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(11, 94, 67, 0.2);
    color: var(--color-emerald);
    box-shadow: 0 4px 15px rgba(11, 94, 67, 0.1);
}

body.light-mode .slider-nav-btn:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--color-emerald);
    box-shadow: 0 0 15px rgba(11, 94, 67, 0.2);
}

/* Gallery Nav Button Positions (RTL default) */
.gallery-prev-btn {
    right: -20px;
}
.gallery-next-btn {
    left: -20px;
}
html[dir="ltr"] .gallery-prev-btn {
    left: -20px;
    right: auto;
}
html[dir="ltr"] .gallery-next-btn {
    right: -20px;
    left: auto;
}
html[dir="ltr"] .gallery-prev-btn i,
html[dir="ltr"] .gallery-next-btn i {
    transform: rotate(180deg);
}

/* Lectures Nav Button Positions (RTL default) */
.lectures-prev-btn {
    right: -20px;
}
.lectures-next-btn {
    left: -20px;
}
html[dir="ltr"] .lectures-prev-btn {
    left: -20px;
    right: auto;
}
html[dir="ltr"] .lectures-next-btn {
    right: -20px;
    left: auto;
}
html[dir="ltr"] .lectures-prev-btn i,
html[dir="ltr"] .lectures-next-btn i {
    transform: rotate(180deg);
}

/* Mobile: hide nav buttons to prevent horizontal scroll */
@media (max-width: 768px) {
    .slider-nav-btn {
        display: none !important;
    }
    .gallery-slider-outer-container {
        margin: 0 auto;
        width: 100%;
        padding: 0;
    }
    .gallery-slider-viewport {
        padding: 15px;
    }
    .lectures-slider-outer-container {
        margin: 0 auto;
        width: 100%;
        padding: 0;
    }
    .lectures-slider-viewport {
        padding: 15px;
    }
}

/* Indicators / Dots */
.gallery-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    min-height: 30px;
}

.gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(214, 175, 55, 0.25);
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
}

body.light-mode .gallery-dot {
    background: rgba(11, 94, 67, 0.25);
}

.gallery-dot.active {
    width: 28px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-hover));
    opacity: 1;
    box-shadow: 0 0 14px rgba(214, 175, 55, 0.5), 0 0 4px rgba(214, 175, 55, 0.3);
}

body.light-mode .gallery-dot.active {
    background: linear-gradient(90deg, var(--color-emerald), var(--color-emerald-light));
    box-shadow: 0 0 10px rgba(11, 94, 67, 0.3);
}

/* ============================================================
   PREMIUM FULL-SCREEN GALLERY LIGHTBOX
   ============================================================ */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
}

.gallery-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 5, 0.92);
    backdrop-filter: blur(30px) saturate(120%);
    -webkit-backdrop-filter: blur(30px) saturate(120%);
}

.gallery-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(214, 175, 55, 0.1);
    border: 1.5px solid rgba(214, 175, 55, 0.3);
    color: var(--color-gold);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-lightbox-close:hover {
    background: rgba(214, 175, 55, 0.2);
    border-color: var(--color-gold);
    transform: rotate(90deg) scale(1.1);
}

html[dir="ltr"] .gallery-lightbox-close {
    right: auto;
    left: 20px;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(214, 175, 55, 0.08);
    border: 1.5px solid rgba(214, 175, 55, 0.25);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-lightbox-nav:hover {
    background: rgba(214, 175, 55, 0.2);
    border-color: var(--color-gold);
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 25px rgba(214, 175, 55, 0.3);
}

.gallery-lightbox-prev {
    right: 20px;
}
.gallery-lightbox-next {
    left: 20px;
}

html[dir="ltr"] .gallery-lightbox-prev {
    left: 20px;
    right: auto;
}
html[dir="ltr"] .gallery-lightbox-next {
    right: 20px;
    left: auto;
}
html[dir="ltr"] .gallery-lightbox-prev i,
html[dir="ltr"] .gallery-lightbox-next i {
    transform: rotate(180deg);
}

.gallery-lightbox-stage {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 80px 90px;
}

.gallery-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-user-drag: none;
}

.gallery-lightbox-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 30px;
    background: linear-gradient(to top, rgba(3, 7, 5, 0.85) 0%, transparent 100%);
    z-index: 10;
}

.gallery-lightbox-caption {
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-counter {
    color: var(--color-gold);
    font-size: 14px;
    font-weight: 600;
    background: rgba(214, 175, 55, 0.1);
    border: 1px solid rgba(214, 175, 55, 0.25);
    padding: 5px 14px;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .gallery-lightbox-stage {
        padding: 70px 15px;
    }
    .gallery-lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    .gallery-lightbox-prev {
        right: 8px;
    }
    .gallery-lightbox-next {
        left: 8px;
    }
    html[dir="ltr"] .gallery-lightbox-prev {
        left: 8px;
        right: auto;
    }
    html[dir="ltr"] .gallery-lightbox-next {
        right: 8px;
        left: auto;
    }
    .gallery-lightbox-bar {
        padding: 14px 16px;
    }
    .gallery-lightbox-caption {
        font-size: 13px;
    }
}

body.light-mode .slider-nav-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(11, 94, 67, 0.15);
    color: var(--color-emerald);
}

body.light-mode .slider-nav-btn:hover {
    background: #fff;
    border-color: var(--color-emerald);
    color: var(--color-emerald-light);
}

body.light-mode .gallery-dot {
    background: rgba(11, 94, 67, 0.2);
}

body.light-mode .gallery-dot.active {
    background: var(--color-emerald);
}

body.light-mode .gallery-slider-indicator {
    color: var(--color-emerald);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(11, 94, 67, 0.15);
}

/* 11. Adhkar & Tasbih Counter Component */
.adhkar-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.dhikr-card {
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
    gap: 25px;
    cursor: pointer;
    min-height: auto;
}

.dhikr-card:hover {
    border-color: var(--color-gold);
    background: var(--color-surface-hover);
}

.dhikr-body {
    flex-grow: 1;
}

.dhikr-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 8px;
    display: inline-block;
}

.dhikr-text {
    font-size: 22px;
    line-height: 1.6;
    margin: 0 0 10px 0;
    color: var(--color-text-light);
}

.dhikr-trans {
    font-size: 14px;
    color: var(--color-text-muted);
    margin: 0;
}

/* Circular Progress Ring for Tasbih */
.tasbih-widget {
    position: relative;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-dasharray: 251.2; /* 2 * PI * r (r=40) */
    stroke-dashoffset: 251.2;
}

.tasbih-count-display {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tasbih-number {
    font-size: 20px;
    font-weight: bold;
    color: var(--color-gold);
}

.tasbih-target {
    font-size: 10px;
    color: var(--color-text-muted);
}

.dhikr-card.completed .tasbih-number {
    color: #4ade80;
    animation: pulse 1s infinite alternate;
}

.tasbih-reset-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
    padding: 8px 12px;
    min-height: 34px;
    border-radius: 10px;
    transition: var(--transition);
}

.tasbih-reset-btn:hover {
    color: #ff6b6b;
}

/* 12. Video & Lightbox Modal Overlays */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    width: 90%;
    max-width: 900px;
    aspect-ratio: 16/9;
    border: 2px solid var(--color-gold);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 30px rgba(214, 175, 55, 0.2);
}

.lightbox-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--color-gold);
}

/* 13. Footer Styles */
.footer {
    background: rgba(7, 21, 16, 0.9);
    border-top: 1px solid rgba(214, 175, 55, 0.12);
    padding: 50px 20px 20px 20px;
    text-align: center;
    margin-top: auto;
    position: relative;
    z-index: 5;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 26px;
    color: var(--color-gold);
    margin-bottom: 12px;
}

.footer-content p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.footer-bottom {
    font-size: 12px;
    color: var(--color-text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 20px;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

/* 15. Responsive Styles */
@media (max-width: 992px) {
    .navbar {
        padding: 15px 20px;
        border-radius: 0;
    }
    /* Remove glassmorphism decorative pseudo-elements on navbar for mobile */
    .navbar.glassmorphism::before,
    .navbar.glassmorphism::after {
        display: none;
    }
    /* FIX: allow the mobile dropdown menu (position:absolute, top:100%) to escape
       the navbar — it was clipped by .glassmorphism's overflow:hidden and the menu
       appeared "broken" (tapping the burger did nothing visible). */
    .navbar,
    .navbar.glassmorphism {
        overflow: visible;
    }
    .navbar .nav-logo span {
        display: none;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .nav-links {
        display: none; /* JS toggles active-flex */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(7, 21, 16, 0.95);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-bottom: 1px solid rgba(214, 175, 55, 0.15);
        padding: 25px 0;
        gap: 15px;
        z-index: 100;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }
    body.light-mode .nav-links {
        background: rgba(244, 248, 246, 0.98);
        border-bottom: 1px solid rgba(11, 94, 67, 0.1);
    }
    .nav-links.active-flex {
        display: flex;
    }
    .nav-links a {
        display: block;
        padding: 10px 18px;
        font-size: 15px;
    }
    .hero-content h2 {
        font-size: 38px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 50px 15px;
    }
    .section-header {
        text-align: center;
        width: 100%;
        margin-bottom: 35px;
        padding: 0 15px;
        box-sizing: border-box;
    }
    .section-header h2 {
        font-family: var(--font-serif) !important;
        font-size: 28px;
        color: var(--color-text-light) !important;
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
        margin: 0 0 10px 0;
    }
    .section-header p {
        font-size: 14.5px;
        color: var(--color-text-muted) !important;
        max-width: 600px;
        margin: 0 auto;
        line-height: 1.6;
    }
    .hero {
        padding: 90px 15px 30px 15px;
        min-height: auto;
    }
    .hero-content h2 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    .hero-content p {
        font-size: 15px;
        margin-bottom: 25px;
    }
    .hero-container {
        gap: 30px;
    }
    .hero-image-container {
        max-width: 100%;
    }
    .hero-sheikhs-img {
        max-height: 260px;
    }
    .hero-sheikhs-glow {
        width: 90%;
        max-width: 320px;
        height: 220px;
        border-radius: 160px 160px 0 0;
    }
    .schedule-card {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 15px;
        padding: 20px 15px;
        border-right: none !important;
        border-left: none !important;
        border-top: 4px solid rgba(214, 175, 55, 0.25);
    }
    .sheikh-avatar-container {
        width: 70px;
        height: 70px;
    }
    .schedule-info h3 {
        font-size: 18px;
    }
    html[dir="ltr"].light-mode .schedule-card,
    body.light-mode .schedule-card {
        border-top-color: rgba(11, 94, 67, 0.25);
        border-right-color: transparent !important;
        border-left-color: transparent !important;
    }
    .schedule-card:hover {
        border-top-color: var(--color-gold);
        transform: none;
    }
    body.light-mode .schedule-card:hover {
        border-top-color: var(--color-emerald);
    }
    .dhikr-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px 15px;
    }
    .library-controls-wrapper {
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        gap: 12px;
        border-radius: 16px;
    }
    .filter-dropdown-container, .search-container {
        min-width: 100%;
        max-width: 100%;
    }
    .search-container {
        padding: 10px 18px;
    }
    .search-container input {
        font-size: 15px;
    }
    .search-container i {
        font-size: 15px;
    }
    .days-nav {
        gap: 10px;
        justify-content: center;
    }
    .day-btn {
        padding: 10px 16px;
        font-size: 14.5px;
        font-weight: 700;
        color: #ffffff;
        background: rgba(13, 65, 46, 0.45);
        border: 1px solid rgba(214, 175, 55, 0.35);
        flex: 1 1 calc(33.333% - 10px);
        text-align: center;
        border-radius: 20px;
    }
    body.light-mode .day-btn {
        color: var(--color-emerald);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(11, 94, 67, 0.25);
    }
    .day-btn.active {
        color: var(--color-gold) !important;
        background: linear-gradient(135deg, var(--color-emerald) 0%, #051a12 100%) !important;
        border-color: var(--color-gold) !important;
        box-shadow: 0 4px 12px rgba(214, 175, 55, 0.25) !important;
    }
    body.light-mode .day-btn.active {
        color: #ffffff !important;
        background: linear-gradient(135deg, var(--color-emerald) 0%, #159a6e 100%) !important;
        border-color: var(--color-emerald) !important;
        box-shadow: 0 4px 12px rgba(11, 94, 67, 0.2) !important;
    }
    .series-grid, .lectures-grid, .litanies-grid, .gallery-grid, .adhkar-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .videos-header {
        padding: 15px;
        gap: 15px;
    }
    .videos-header-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .vhi-text h3 {
        font-size: 20px;
    }
    .litany-card {
        padding: 20px 15px;
    }
    .litany-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 15px;
    }
    .litany-actions {
        flex-direction: column;
    }
    /* Location section responsive */
    .location-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px 15px;
    }
    .location-map iframe {
        height: 250px;
    }
    .loc-card {
        gap: 15px;
    }
    .loc-card i {
        font-size: 22px;
    }
    .loc-card h3 {
        font-size: 17px;
    }
    /* Ahl-Bayt section responsive */
    .ahl-bayt-tabs {
        flex-wrap: wrap;
        gap: 10px;
    }
    .ahl-bayt-tab-btn {
        padding: 10px 20px;
        font-size: 13px;
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
    }
    /* Shrine cards on mobile */
    .shrine-card {
        padding: 20px 15px;
    }
    .shrine-content h3 {
        font-size: 16px;
    }
    .shrine-meta-item {
        font-size: 12px;
    }
    .shrine-desc {
        font-size: 12px;
    }
    .shrine-avatar {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
    
    /* Mobile Gallery Overrides */
    .gallery-overlay {
        opacity: 1 !important;
        background: linear-gradient(
            to top,
            rgba(3, 10, 7, 0.95) 0%,
            rgba(3, 10, 7, 0.6) 50%,
            transparent 100%
        ) !important;
        padding: 15px 12px !important;
    }
    .gallery-overlay-icon {
        display: none !important;
    }
    .gallery-overlay-text {
        transform: translateY(0) !important;
    }
    .gallery-overlay h3 {
        font-size: 13px !important;
        margin-bottom: 2px !important;
    }
    .gallery-overlay p {
        font-size: 10px !important;
        line-height: 1.3 !important;
    }
    /* Footer responsive */
    .footer {
        padding: 35px 15px 15px 15px;
    }
    .footer-logo {
        font-size: 22px;
    }
    .footer-content p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .day-btn {
        flex: 1 1 calc(50% - 10px);
        padding: 10px 14px;
        font-size: 13.5px;
    }
    .series-grid, .lectures-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .litanies-grid, .adhkar-list {
        grid-template-columns: 1fr;
    }
    /* Compact video and series cards on mobile */
    .lecture-card .lecture-content, .series-card .series-content {
        padding: 14px 12px;
    }
    .lecture-card .lecture-content h3, .series-card .series-content h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .lecture-card .lecture-cat, .series-card .lecture-cat {
        font-size: 10px;
        padding: 2px 8px;
        margin-bottom: 8px;
    }
    .lecture-card .lecture-content .lecture-date, .series-card .series-presenter {
        font-size: 11px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    .hero-content h2 {
        font-size: 26px;
    }
    .hero-content p {
        font-size: 14px;
    }
    .hero-badge {
        font-size: 11px;
        padding: 5px 12px;
    }
    .site-logo-img {
        height: 38px;
        width: 38px;
        min-width: 38px;
    }
    .navbar .nav-logo i {
        font-size: 22px;
    }
    .navbar {
        padding: 10px 12px;
    }
    .nav-controls {
        gap: 8px;
    }
    .ctrl-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    .ctrl-btn[title] {
        padding: 0 10px;
        font-size: 11px;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    .hero-buttons .btn {
        width: 100%;
    }
    /* Section header on very small screens */
    .section-header h2 {
        font-size: 22px !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    }
    .section-header p {
        font-size: 13.5px !important;
        line-height: 1.5;
        padding: 0 5px;
    }
    /* Schedule info text smaller */
    .schedule-info h3 {
        font-size: 16px;
    }
    .schedule-info p {
        font-size: 13px;
    }
    .schedule-badge-time {
        font-size: 12px;
        padding: 5px 10px;
    }
    /* Suggested ward on very small screens */
    .sw-text h3 {
        font-size: 20px;
    }
    .sw-text p {
        font-size: 13px;
    }
    .sw-badge {
        font-size: 11px;
        padding: 5px 10px;
    }
    /* Location on very small */
    .location-container {
        padding: 15px 12px;
        gap: 20px;
    }
    .loc-card h3 {
        font-size: 15px;
    }
    .loc-card p {
        font-size: 13px;
    }
    .location-map iframe {
        height: 220px;
    }
    /* Glassmorphism adjustments on mobile */
    .glassmorphism {
        border-radius: 16px;
    }
    .glassmorphism::before {
        border-radius: 12px;
    }
}

/* Mobile-first optimizations for Adhkar component */
@media (max-width: 600px) {
    .adhkar-list {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .dhikr-card {
        flex-direction: row !important;
        text-align: start !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 16px !important;
        padding: 16px 20px !important;
    }
    .dhikr-body {
        text-align: start !important;
        flex-grow: 1 !important;
    }
    .dhikr-text {
        font-size: 18px !important;
        line-height: 1.5 !important;
        margin: 0 0 6px 0 !important;
    }
    .dhikr-trans {
        font-size: 13px !important;
    }
    .tasbih-container {
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        flex-shrink: 0 !important;
    }
    .tasbih-widget {
        transform: scale(0.85) !important;
        margin: -7px 0 -5px 0 !important;
    }
    .tasbih-reset-btn {
        font-size: 11px !important;
        margin-top: 0 !important;
    }
}

/* ==========================================================================
   VISUAL BRANDING & NEW SECTIONS
   ========================================================================== */
.site-logo-img {
    height: 48px;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(214, 175, 55, 0.45));
    transition: var(--transition);
}
.site-logo-img:hover {
    transform: scale(1.08) rotate(5deg);
}

/* Hero Section Centered Stacked Layout */
.hero {
    min-height: auto;
    padding: 120px 20px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 45px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}
html[dir="rtl"] .hero-container, html[dir="ltr"] .hero-container {
    text-align: center !important;
}
.hero-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 100%;
    max-width: 650px; /* Issue #20 */
    margin: 0 auto;
}
.hero-sheikhs-img {
    max-height: 420px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6)) drop-shadow(0 0 35px rgba(214, 175, 55, 0.18));
    animation: floatSheikhs 6s ease-in-out infinite;
    z-index: 2;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}
.hero-sheikhs-glow {
    position: absolute;
    width: 550px;
    height: 440px;
    background: radial-gradient(circle at 50% 30%, rgba(214, 175, 55, 0.18) 0%, rgba(214, 175, 55, 0.02) 75%);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    pointer-events: none;
    border-radius: 275px 275px 0 0;
    border: 2px solid rgba(214, 175, 55, 0.28);
    border-bottom: none;
    box-shadow: 0 -10px 40px rgba(214, 175, 55, 0.12);
    mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
}
body.light-mode .hero-sheikhs-glow {
    background: radial-gradient(circle at 50% 30%, rgba(11, 94, 67, 0.14) 0%, rgba(11, 94, 67, 0.02) 75%);
    border-color: rgba(11, 94, 67, 0.25);
    box-shadow: 0 -10px 30px rgba(11, 94, 67, 0.08);
}
@keyframes floatSheikhs {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* Location Map Section */
.location-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    align-items: center;
}
.location-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.loc-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.loc-card i {
    font-size: 26px;
    color: var(--color-gold);
    margin-top: 3px;
    filter: drop-shadow(0 0 5px rgba(214,175,55,0.2));
}
body.light-mode .loc-card i {
    color: var(--color-emerald);
}
.loc-card h3 {
    margin: 0 0 6px 0;
    font-size: 19px;
    color: var(--color-gold);
}
body.light-mode .loc-card h3 {
    color: var(--color-emerald);
}
.loc-card p {
    margin: 0;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.6;
}
.location-map {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

/* Responsiveness adjustments */
@media (max-width: 992px) {
    .hero-sheikhs-img {
        max-height: 320px;
    }
    .hero-sheikhs-glow {
        width: 360px;
        height: 300px;
        border-radius: 180px 180px 0 0;
    }
    .location-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px;
    }
}
@media (max-width: 576px) {
    .hero-sheikhs-glow {
        width: 280px;
        height: 240px;
        border-radius: 140px 140px 0 0;
    }
}

/* 3D Parallax Tilt Class */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s;
}
.card-3d > * {
    transform: translateZ(20px);
}
.card-3d .sheikh-avatar-container, 
.card-3d .litany-icon, 
.card-3d .lecture-thumb-container,
.card-3d .location-map {
    transform: translateZ(35px);
    transition: transform 0.25s ease;
}

/* Lectures Library Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    z-index: 5;
    position: relative;
}

.page-btn {
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.page-info {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 600;
    margin: 0 10px;
}

.page-btn:hover:not(:disabled) {
    color: var(--color-gold);
    border-color: var(--color-gold);
    background: var(--color-surface-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(214, 175, 55, 0.15);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--color-emerald) 0%, #07261b 100%);
    border-color: var(--color-gold);
    color: var(--color-gold);
    font-weight: bold;
    box-shadow: var(--card-shadow), 0 0 15px rgba(214, 175, 55, 0.25);
    transform: translateY(-2px);
}

body.light-mode .page-btn.active {
    background: linear-gradient(135deg, var(--color-emerald) 0%, #159a6e 100%);
    color: #fff;
    border-color: var(--color-emerald);
}

.page-btn:disabled, .page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}


/* PLAYLIST PAGE STYLES */
.playlist-container { display: grid; grid-template-columns: 1fr 350px; gap: 30px; max-width: 1300px; margin: 0 auto; align-items: start; }
.playlist-player-wrapper { overflow: hidden; }
.playlist-video-container { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }
.playlist-video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.playlist-info { padding: 30px; }
.playlist-sheikh-badge { display: flex; align-items: center; gap: 20px; }
.playlist-sheikh-badge img, .playlist-sheikh-badge .placeholder { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-gold); display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--color-gold); background: rgba(10,31,24,0.6); }
.playlist-sheikh-badge h1 { font-size: 24px; color: var(--color-gold); margin: 5px 0; }
.playlist-sheikh-badge .presenter { color: var(--color-text-light); font-size: 16px; margin: 0; }
.playlist-episodes { padding: 25px; max-height: calc(100vh - 120px); overflow-y: auto; }
.episodes-title { font-size: 18px; color: var(--color-gold); margin-bottom: 20px; border-bottom: 1px solid rgba(214,175,55,0.2); padding-bottom: 15px; }
.episodes-list { display: flex; flex-direction: column; gap: 15px; }
.episode-item { display: flex; gap: 15px; padding: 12px; border-radius: 12px; cursor: pointer; transition: all 0.3s ease; border: 1px solid transparent; }
.episode-item:hover { background: rgba(255,255,255,0.05); }
.episode-item.active { background: rgba(214,175,55,0.1); border-color: rgba(214,175,55,0.3); }
.episode-thumb { position: relative; width: 120px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.episode-thumb img { width: 100%; height: auto; display: block; }
.episode-thumb .play-icon { 
    position: absolute; 
    top:0; left:0; right:0; bottom:0; 
    display: flex; align-items: center; justify-content: center; 
    background: rgba(0,0,0,0.4); 
    opacity: 0; 
    transition: opacity 0.3s; 
}
.episode-thumb .play-icon i { color: var(--color-gold); font-size: 24px; }
.episode-item:hover .play-icon, .episode-item.active .play-icon { opacity: 1; }
.episode-details { display: flex; flex-direction: column; justify-content: center; }
.episode-details h4 { font-size: 15px; margin: 0 0 8px 0; line-height: 1.4; }
.episode-date { font-size: 12px; color: var(--color-text-muted); }

@media (max-width: 992px) { 
    .playlist-container { grid-template-columns: 1fr; } 
    .playlist-episodes { max-height: 500px; } 
}
@media (max-width: 768px) {
    .playlist-info { padding: 20px 15px; }
    .playlist-sheikh-badge { flex-direction: column; text-align: center; gap: 12px; }
    .playlist-sheikh-badge img, .playlist-sheikh-badge .placeholder { width: 60px; height: 60px; font-size: 24px; }
    .playlist-sheikh-badge h1 { font-size: 20px; }
    .playlist-episodes { padding: 15px; }
    .episode-thumb { width: 90px; }
    .episode-details h4 { font-size: 13px; }
    .episode-item { gap: 10px; padding: 8px; }
}

/* Category Filter Dropdown */
.library-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}
.filter-dropdown-container {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}
.filter-dropdown-container .filter-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gold);
    pointer-events: none;
}
html[dir="rtl"] .filter-dropdown-container .filter-icon { right: 15px; }
html[dir="ltr"] .filter-dropdown-container .filter-icon { left: 15px; }

.custom-select.cat-filter-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 12px 45px;
    color: var(--color-text);
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.custom-select.cat-filter-select:hover,
.custom-select.cat-filter-select:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.2);
    outline: none;
}
.custom-select.cat-filter-select option {
    background: var(--color-bg);
    color: var(--color-text);
}
body.light-mode .custom-select.cat-filter-select option {
    background: #fff;
    color: #333;
}
.filter-dropdown-container .select-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
    transition: transform 0.3s ease;
}
html[dir="rtl"] .filter-dropdown-container .select-arrow { left: 15px; }
html[dir="ltr"] .filter-dropdown-container .select-arrow { right: 15px; }

/* ==========================================================================
   Noble Idrisi Litanies Section & PDF Reader Custom CSS
   ========================================================================== */

/* 1. Suggested Litany of the Day Horizontal Section */
.suggested-ward-section {
    padding: 20px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.suggested-ward-horizontal {
    padding: 25px 30px;
    border: 1.5px solid rgba(214, 175, 55, 0.35);
    background: linear-gradient(135deg, rgba(10, 31, 24, 0.5) 0%, rgba(22, 65, 46, 0.2) 100%);
    box-shadow: var(--card-shadow), 0 0 20px rgba(214, 175, 55, 0.1);
    position: relative;
    overflow: hidden;
}
.suggested-ward-horizontal:hover {
    border-color: rgba(214, 175, 55, 0.5);
    box-shadow: var(--card-shadow), 0 0 30px rgba(214, 175, 55, 0.2);
    transform: translateY(-3px);
}
.sw-badge-row {
    margin-bottom: 12px;
    display: flex;
}
.sw-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(214, 175, 55, 0.12);
    border: 1px solid rgba(214, 175, 55, 0.35);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-gold);
}
.pulse-gold {
    animation: goldPulse 2s infinite ease-in-out;
}
@keyframes goldPulse {
    0%, 100% { opacity: 0.6; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.15); text-shadow: 0 0 10px rgba(214, 175, 55, 0.6); }
}
.sw-horizontal-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.sw-text {
    flex: 1;
    text-align: right;
}
html[dir="ltr"] .sw-text {
    text-align: left;
}
.sw-text h3 {
    font-family: var(--font-serif);
    font-size: 26px;
    margin: 0 0 8px 0;
    color: var(--color-gold-hover);
}
.sw-text p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 0;
}
.sw-btn-action {
    flex-shrink: 0;
}
.sw-btn-action .btn {
    padding: 12px 35px;
    font-weight: 700;
}

/* 2. Litanies Section Categories Tabs Re-designed as Cards Grid */
.litanies-categories-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 960px;
    margin: 0 auto 45px auto;
    padding: 0 10px;
}
.litany-cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    padding: 24px 15px;
    border-radius: 18px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    transition: var(--transition);
    aspect-ratio: 1.1 / 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}
.litany-cat-btn::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed rgba(214, 175, 55, 0.1);
    border-radius: 14px;
    pointer-events: none;
    transition: var(--transition);
}
.litany-cat-btn i {
    font-size: 26px;
    color: var(--color-gold);
    margin-bottom: 12px;
    transition: var(--transition);
}
body.light-mode .litany-cat-btn i {
    color: var(--color-emerald-light);
}
.litany-cat-btn span {
    font-size: 13px;
    line-height: 1.3;
    transition: var(--transition);
    color: var(--color-text-muted);
}
.litany-cat-btn:hover {
    color: var(--color-gold);
    border-color: rgba(214, 175, 55, 0.4);
    background: var(--color-surface-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(214, 175, 55, 0.15);
}
.litany-cat-btn:hover i {
    transform: scale(1.15);
    color: var(--color-gold-hover);
}
.litany-cat-btn:hover span {
    color: var(--color-text-light);
}
.litany-cat-btn.active {
    background: linear-gradient(135deg, var(--color-emerald) 0%, #061c14 100%);
    border-color: var(--color-gold);
    box-shadow: var(--card-shadow), 0 0 20px rgba(214, 175, 55, 0.3);
    transform: translateY(-4px);
}
.litany-cat-btn.active::before {
    border-color: rgba(214, 175, 55, 0.35);
}
.litany-cat-btn.active i {
    color: var(--color-gold);
    transform: scale(1.15);
}
.litany-cat-btn.active span {
    color: var(--color-gold);
    font-weight: 700;
}
body.light-mode .litany-cat-btn.active {
    background: linear-gradient(135deg, var(--color-emerald) 0%, #159a6e 100%);
    box-shadow: 0 6px 18px rgba(11, 94, 67, 0.25);
    border-color: var(--color-emerald);
}
body.light-mode .litany-cat-btn.active i,
body.light-mode .litany-cat-btn.active span {
    color: #fff;
}
body.light-mode .litany-cat-btn.active::before {
    border-color: rgba(255, 255, 255, 0.25);
}

/* 3. Litanies Grid & Cards */
.litanies-grids-container {
    position: relative;
    min-height: 250px;
}
.litanies-grid-view {
    animation: fadeIn 0.5s ease forwards;
}
.litanies-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.litany-card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    text-align: center;
    border-top: 4px solid rgba(214, 175, 55, 0.25);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.litany-card:hover {
    border-top-color: var(--color-gold);
    transform: translateY(-5px);
}
body.light-mode .litany-card {
    border-top-color: rgba(11, 94, 67, 0.25);
}
body.light-mode .litany-card:hover {
    border-top-color: var(--color-emerald);
}
.litany-card.coming-soon {
    opacity: 0.85;
}
.coming-soon-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
html[dir="ltr"] .coming-soon-badge {
    right: auto;
    left: 15px;
}
.litany-icon {
    font-size: 36px;
    color: var(--color-gold);
    margin-bottom: 20px;
}
body.light-mode .litany-icon {
    color: var(--color-emerald);
}
.litany-card h3 {
    font-family: var(--font-serif);
    font-size: 22px;
    margin: 0 0 12px 0;
    color: var(--color-text-light);
}
.litany-card p {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 0 25px 0;
    flex-grow: 1;
}
.litany-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.litany-actions .btn {
    flex: 1;
    font-size: 13px;
    padding: 10px 12px;
}

/* 4. Dedicated Standalone PDF Reader Page CSS */
.reader-page-body {
    overflow: hidden !important;
    height: 100vh !important;
    margin: 0;
    padding: 0;
    background-color: #050d0a !important;
}
.pdf-reader-fullscreen-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}
.pdf-reader-fullscreen-container .pdf-reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(7, 21, 16, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}
.pdf-reader-fullscreen-container .pdf-reader-title-container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pdf-reader-fullscreen-container .pdf-reader-title-container .pdf-icon {
    font-size: 20px;
    color: #e24949;
}
.pdf-reader-fullscreen-container #pdf-reader-title {
    margin: 0;
    font-size: 18px;
    font-family: var(--font-serif);
    color: var(--color-text-light);
}
.pdf-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-gold);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}
.pdf-back-btn:hover {
    background: rgba(214, 175, 55, 0.15);
    border-color: var(--color-gold);
    transform: translateY(-1px);
}
.pdf-viewer-viewport {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #0b1511;
    padding: 25px;
    position: relative;
    -webkit-overflow-scrolling: touch;
}
body.light-mode .reader-page-body {
    background-color: #f2f7f4 !important;
}
body.light-mode .pdf-viewer-viewport {
    background: #e1eae4;
}
#pdf-render-canvas {
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    background: #fff;
    display: block;
    max-width: 100%;
    transform-origin: top center;
    transition: transform 0.2s ease-in-out;
}
.pdf-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    color: var(--color-text-muted);
}
.spinner-ring {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(214, 175, 55, 0.1);
    border-top-color: var(--color-gold);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.pdf-reader-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    border-top: 1px solid var(--glass-border);
    background: rgba(7, 21, 16, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}
.pdf-ctrl-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-gold);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.pdf-ctrl-btn:hover {
    background: rgba(214, 175, 55, 0.15);
    border-color: var(--color-gold);
    transform: scale(1.08);
}
.pdf-ctrl-btn:disabled, .pdf-ctrl-btn.disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
}
.pdf-page-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-light);
    padding: 0 10px;
}
.pdf-page-divider {
    color: var(--color-text-muted);
}
.pdf-zoom-controls {
    display: flex;
    gap: 8px;
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    padding: 0 15px;
}
html[dir="rtl"] .pdf-zoom-controls {
    border-left: none;
    border-right: none;
    border-right: 1px solid var(--glass-border);
    border-left: 1px solid var(--glass-border);
}
@media (max-width: 768px) {
    .pdf-viewer-viewport {
        padding: 10px;
    }
    .pdf-reader-controls {
        padding: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }
    .pdf-ctrl-btn {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
    .pdf-zoom-controls {
        padding: 0 8px;
    }
    .pdf-reader-fullscreen-container .pdf-reader-header {
        padding: 10px 15px;
        flex-wrap: wrap;
        gap: 8px;
        border-radius: 0;
    }
    .pdf-reader-fullscreen-container .pdf-reader-header.glassmorphism::before,
    .pdf-reader-fullscreen-container .pdf-reader-header.glassmorphism::after {
        display: none;
    }
    .pdf-reader-fullscreen-container #pdf-reader-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }
    .pdf-back-btn {
        font-size: 12px;
        padding: 9px 14px;
        min-height: 36px;
    }
    .pdf-reader-controls.glassmorphism::before,
    .pdf-reader-controls.glassmorphism::after {
        display: none;
    }
    .suggested-ward-horizontal {
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
    }
    .sw-horizontal-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .sw-text {
        text-align: center !important;
    }
    .sw-btn-action {
        display: flex;
        justify-content: center;
    }
    .sw-btn-action .btn {
        width: 100%;
    }
    .litanies-categories-nav {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .litany-cat-btn {
        aspect-ratio: 1.1 / 1;
        padding: 15px 10px;
    }
    .litany-cat-btn i {
        font-size: 22px;
        margin-bottom: 8px;
    }
    .litany-cat-btn span {
        font-size: 11px;
    }
}

/* ============================================================
   14. AHL AL-BAYT MAP & TREE SECTION
   ============================================================ */
.ahl-bayt-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.ahl-bayt-tab-btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: rgba(10, 31, 24, 0.6);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    transition: all 0.3s ease;
}

.ahl-bayt-tab-btn:hover {
    color: var(--color-gold);
    border-color: rgba(214, 175, 55, 0.4);
    background: rgba(15, 47, 36, 0.5);
}

.ahl-bayt-tab-btn.active {
    background: linear-gradient(135deg, var(--color-gold) 0%, #b29023 100%);
    color: #071510;
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.3);
}

body.light-mode .ahl-bayt-tab-btn {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(11, 94, 67, 0.2);
    color: var(--color-text-muted);
}
body.light-mode .ahl-bayt-tab-btn:hover {
    color: var(--color-emerald);
    border-color: rgba(11, 94, 67, 0.4);
    background: rgba(11, 94, 67, 0.05);
}
body.light-mode .ahl-bayt-tab-btn.active {
    background: linear-gradient(135deg, var(--color-emerald) 0%, var(--color-emerald-light) 100%);
    color: #fff;
    border-color: var(--color-emerald);
    box-shadow: 0 4px 15px rgba(11, 94, 67, 0.15);
}

.ahl-bayt-tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ahl-bayt-tab-content.active {
    display: block;
    opacity: 1;
}

/* Shrines Grid View */
.shrines-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 10px 0;
}

@media (max-width: 992px) {
    .shrines-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 650px) {
    .shrines-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.shrine-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.shrine-badge-egypt {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(214, 175, 55, 0.15);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
html[dir="ltr"] .shrine-badge-egypt {
    right: auto;
    left: 15px;
}

body.light-mode .shrine-badge-egypt {
    background: rgba(11, 94, 67, 0.1);
    border-color: var(--color-emerald);
    color: var(--color-emerald);
}

.shrine-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    background: rgba(10, 31, 24, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--color-gold);
    margin: 15px auto 20px auto;
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.1);
}

body.light-mode .shrine-avatar {
    border-color: var(--color-emerald);
    color: var(--color-emerald);
    background: rgba(255, 255, 255, 0.9);
}

.shrine-content {
    text-align: center;
    padding: 0 10px 20px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.shrine-content h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: var(--color-text-light);
}

.shrine-meta-item {
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.shrine-meta-label {
    display: block;
    color: var(--color-gold);
    font-weight: 700;
    margin-bottom: 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light-mode .shrine-meta-label {
    color: var(--color-emerald);
}

.shrine-meta-value {
    color: var(--color-text-muted);
}

.shrine-desc {
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-text-muted);
    margin: 10px 0 20px 0;
    flex: 1;
}

.shrine-btn {
    width: 100%;
    margin-top: auto;
}

/* Family Tree View */
.tree-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
    display: flex;
    justify-content: flex-start;
}

@media (min-width: 2090px) {
    .tree-wrapper {
        justify-content: center;
    }
}

.tree-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    min-width: 2050px;
    position: relative;
    padding: 20px;
}

/* Connector Line down */
.tree-generation-connector {
    width: 2px;
    height: 35px;
    background: var(--color-gold);
    position: relative;
    opacity: 0.6;
}

body.light-mode .tree-generation-connector {
    background: var(--color-emerald);
}

.tree-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    width: 100%;
    position: relative;
    flex-wrap: nowrap;
}

/* Horizontal connectors for siblings */
.tree-row::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--color-gold);
    opacity: 0.6;
    z-index: 1;
}
.tree-row.single-node::before {
    display: none;
}

/* Precise sibling connector line offsets */
.tree-row.gen-2-row::before {
    left: 6.25%;
    right: 6.25%;
}
.tree-row.gen-3-row::before {
    left: 25%;
    right: 25%;
}
.tree-row.gen-4-row::before {
    left: 16.6%;
    right: 16.6%;
}
.tree-row.gen-5-row::before {
    left: 25%;
    right: 25%;
}

body.light-mode .tree-row::before {
    background: var(--color-emerald);
}

.tree-row > * {
    position: relative;
}

.tree-row > *::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    width: 2px;
    height: 18px;
    background: var(--color-gold);
    opacity: 0.6;
}
.tree-row.single-node > *::before {
    display: none;
}

body.light-mode .tree-row > *::before {
    background: var(--color-emerald);
}

.tree-node-card {
    padding: 15px 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--glass-border);
    background: rgba(10, 31, 24, 0.4);
    min-width: 200px;
    max-width: 260px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.tree-node-card.highlighted-branch-node {
    border-color: var(--color-gold);
    box-shadow: 0 0 15px rgba(214, 175, 55, 0.25), var(--card-shadow);
    background: rgba(214, 175, 55, 0.08);
}

body.light-mode .tree-node-card.highlighted-branch-node {
    border-color: var(--color-emerald);
    box-shadow: 0 0 15px rgba(11, 94, 67, 0.2), var(--card-shadow);
    background: rgba(11, 94, 67, 0.04);
}

.tree-node-card:hover {
    border-color: rgba(214, 175, 55, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.tree-node-card.egypt-resident {
    border-color: rgba(214, 175, 55, 0.3);
}
.tree-node-card.egypt-resident::after {
    content: '▲ بمصر';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-gold);
    color: #071510;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
html[dir="ltr"] .tree-node-card.egypt-resident::after {
    content: '▲ Egypt';
}

body.light-mode .tree-node-card.egypt-resident::after {
    background: var(--color-emerald);
    color: #fff;
}

body.light-mode .tree-node-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(11, 94, 67, 0.15);
}
body.light-mode .tree-node-card:hover {
    border-color: rgba(11, 94, 67, 0.35);
}

.tree-node-card h4 {
    font-size: 15px;
    margin: 0 0 5px 0;
    color: var(--color-text-light);
}

.tree-node-card .node-relation {
    font-size: 11px;
    color: var(--color-gold);
    font-weight: bold;
}
body.light-mode .tree-node-card .node-relation {
    color: var(--color-emerald);
}

.tree-node-card .node-lineage {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 5px;
    line-height: 1.3;
}

/* ==========================================================================
   26. Native Dialog Lightboxes
   ========================================================================== */
dialog.native-lightbox {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1200px;
    height: 90vh;
    max-height: 800px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(214, 175, 55, 0.2);
    border-radius: 24px;
    background: rgba(3, 14, 10, 0.85);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(214, 175, 55, 0.1);
    color: var(--color-text-light);
    overflow: hidden;
    z-index: 100000;
}

dialog.native-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.lightbox-controls {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 10;
}

.lightbox-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: rotate(90deg);
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.video-content iframe {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.image-content img {
    max-width: 100%;
    max-height: calc(100% - 40px);
    object-fit: contain;
    border-radius: 12px;
}

.lightbox-caption {
    margin-top: 15px;
    font-size: 18px;
    color: var(--color-gold);
    text-align: center;
}

/* ==========================================================================
   27. Series Grid Native Scroll Snap
   ========================================================================== */
.series-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 22px;
    padding: 15px 5px;
    width: 100%;
}
.series-grid::-webkit-scrollbar {
    display: none;
}

/* ==========================================================================
   28. Out-Of-The-Box Premium Mobile Layouts (Under 768px)
   ========================================================================== */
/* Reverted mobile vertical stack to horizontal swipe sliders for lectures and gallery to prevent excessive page length on mobile. */

/* ==========================================================================
   29. PWA — Install Button + Hint Toast
   ========================================================================== */
.pwa-install-btn {
    position: fixed;
    bottom: 18px;
    inset-inline-end: 18px;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.6);
    background: linear-gradient(135deg, var(--color-gold), #b8912a);
    color: #03140e;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), 0 0 20px rgba(212, 175, 55, 0.25);
    transition: var(--transition);
    animation: pwaFloatIn 0.45s ease;
}
.pwa-install-btn:hover {
    background: linear-gradient(135deg, var(--color-gold-hover), var(--color-gold));
    transform: translateY(-2px);
}
.pwa-install-btn i { font-size: 16px; }
@keyframes pwaFloatIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.pwa-hint-toast {
    position: fixed;
    left: 50%;
    bottom: 88px;
    transform: translate(-50%, 20px);
    z-index: 960;
    max-width: 90vw;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(7, 21, 16, 0.96);
    color: var(--color-text-light);
    border: 1px solid var(--glass-border);
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.pwa-hint-toast.show { opacity: 1; transform: translate(-50%, 0); }
body.light-mode .pwa-hint-toast { background: rgba(255, 255, 255, 0.97); }

/* ==========================================================================
   30. Prayer Times Section
   ========================================================================== */
#prayer { scroll-margin-top: 90px; }
.prayer-card {
    max-width: 1000px;
    margin: 0 auto;
    padding: 26px 26px 20px;
    border-radius: 24px;
}
.prayer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.prayer-dates { display: flex; flex-direction: column; gap: 4px; }
.prayer-hijri {
    color: var(--color-gold);
    font-weight: 700;
    font-size: 17px;
    font-family: var(--font-serif);
    display: flex;
    align-items: center;
    gap: 9px;
}
.prayer-greg { color: var(--color-text-muted); font-size: 13px; }
.prayer-controls { display: flex; align-items: center; gap: 8px; }
.prayer-city-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--color-surface);
    color: var(--color-text-light);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 9px 14px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    min-width: 150px;
    outline: none;
    transition: var(--transition);
}
.prayer-city-select:focus { border-color: var(--color-gold); }
body.light-mode .prayer-city-select { background: #fff; }
.prayer-locate-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-gold);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}
.prayer-locate-btn:hover { border-color: var(--color-gold); background: var(--color-surface-hover); }
.prayer-next {
    margin: 18px 0 14px;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(13, 65, 46, 0.65), rgba(7, 21, 16, 0.85));
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
body.light-mode .prayer-next { background: linear-gradient(135deg, rgba(11, 94, 67, 0.1), rgba(255, 255, 255, 0.92)); }
.prayer-next-label { color: var(--color-text-muted); font-size: 13px; }
.prayer-next-name { color: var(--color-gold); font-weight: 700; font-size: 17px; }
.prayer-countdown {
    margin-inline-start: auto;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.prayer-times-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.prayer-time-card {
    text-align: center;
    padding: 14px 6px;
    border-radius: 14px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}
.prayer-time-card.is-next {
    border-color: var(--color-gold);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.22);
}
.ptc-name { color: var(--color-text-muted); font-size: 13px; margin-bottom: 6px; }
.ptc-time { color: var(--color-text-light); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.prayer-time-card.is-next .ptc-name,
.prayer-time-card.is-next .ptc-time { color: var(--color-gold); }
.prayer-footer {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--color-text-muted);
    font-size: 12.5px;
}
#prayer-qibla-deg { color: var(--color-gold); font-weight: 700; }
@media (max-width: 860px) {
    .prayer-times-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .prayer-times-grid { grid-template-columns: repeat(2, 1fr); }
    .prayer-countdown { margin-inline-start: 0; width: 100%; }
    .prayer-card { padding: 18px 14px 14px; }
}

/* ==========================================================================
   31. Quran Page (index + reader)
   ========================================================================== */
:root { --font-quran: 'Amiri Quran', 'Amiri', 'Traditional Arabic', serif; --font-amiri: 'Amiri', 'Traditional Arabic', serif; }

.btn-gold {
    background: linear-gradient(135deg, var(--color-gold), #b8912a);
    color: #03140e;
    border: none;
    font-weight: 700;
}
.btn-gold:hover {
    background: linear-gradient(135deg, var(--color-gold-hover), var(--color-gold));
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.3);
    color: #03140e;
}

.quran-search-wrap {
    max-width: 720px;
    margin: 0 auto 26px;
    position: relative;
}
.quran-search-wrap > i {
    position: absolute;
    inset-inline-start: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}
.quran-search {
    width: 100%;
    padding: 15px 52px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-text-light);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}
.quran-search:focus { border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12); }
body.light-mode .quran-search { background: #fff; }

.quran-surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 13px;
    max-width: 1250px;
    margin: 0 auto;
}
.quran-surah-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    transition: var(--transition);
}
.quran-surah-card:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-gold);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.qsc-badge {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-emerald), #07261b);
    border: 1px solid var(--glass-border);
    color: var(--color-gold);
    font-weight: 700;
    font-size: 15px;
    font-family: var(--font-serif);
}
body.light-mode .qsc-badge { color: #fff; }
.qsc-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.qsc-name { color: var(--color-text-light); font-family: var(--font-serif); font-size: 19px; font-weight: 700; }
.qsc-meta { color: var(--color-text-muted); font-size: 12.5px; }
.qsc-name-en { color: var(--color-text-muted); font-size: 12px; font-family: var(--font-english); }
.quran-no-results { text-align: center; color: var(--color-text-muted); margin-top: 24px; }

/* --- reader --- */
.quran-reader { max-width: 980px; margin: 0 auto; }
.quran-reader-head {
    border-radius: 20px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.quran-back-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    transition: var(--transition);
}
.quran-back-link:hover { color: var(--color-gold); }
.quran-surah-title { display: flex; align-items: center; gap: 14px; }
.quran-surah-badge {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    flex: 0 0 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-emerald), #07261b);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 700;
}
.quran-surah-title h1 { font-family: var(--font-serif); color: var(--color-text-light); font-size: 30px; margin: 0 0 4px; }
.quran-surah-title p { color: var(--color-text-muted); font-size: 13.5px; margin: 0; }
.quran-head-nav { display: flex; gap: 10px; }
.quran-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 13.5px;
    font-family: var(--font-serif);
    transition: var(--transition);
}
.quran-nav-link:hover { border-color: var(--color-gold); color: var(--color-gold); }

.quran-toolbar {
    position: sticky;
    top: 80px;
    z-index: 40;
    margin: 16px 0;
    padding: 12px 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.quran-play-btn { padding: 10px 22px; }
.quran-repeat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.quran-repeat-btn:hover { border-color: var(--color-gold); color: var(--color-gold); }
.quran-repeat-btn.active {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.18);
}
.quran-reciter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 13px;
    white-space: nowrap;
}
.quran-reciter-wrap select {
    background: var(--color-surface);
    color: var(--color-text-light);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13.5px;
    cursor: pointer;
    max-width: 250px;
    outline: none;
}
body.light-mode .quran-reciter-wrap select { background: #fff; }
.quran-progress-wrap { flex: 1 1 160px; min-width: 140px; display: flex; flex-direction: column; gap: 6px; }
.quran-status {
    color: var(--color-text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.quran-progress-bar,
.burda-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    cursor: pointer;
    overflow: hidden;
}
body.light-mode .quran-progress-bar,
body.light-mode .burda-progress-bar { background: rgba(0, 0, 0, 0.08); }
.quran-progress-fill,
.burda-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-gold-hover));
    transition: width 0.15s linear;
}

.quran-mushaf {
    border-radius: 22px;
    padding: 30px 30px 22px;
    scroll-margin-top: 150px;
}
.quran-bismillah {
    text-align: center;
    font-family: var(--font-quran);
    font-size: 30px;
    color: var(--color-gold);
    margin: 6px 0 24px;
    line-height: 2;
}
.quran-ayah {
    position: relative;
    padding: 13px 16px;
    border-radius: 14px;
    border-inline-start: 3px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}
.quran-ayah:hover { background: rgba(212, 175, 55, 0.05); }
.quran-ayah.playing {
    background: rgba(212, 175, 55, 0.09);
    border-inline-start-color: var(--color-gold);
}
.quran-ayah-text {
    font-family: var(--font-quran);
    font-size: 27px;
    line-height: 2.2;
    color: var(--color-text-light);
    word-spacing: 2px;
}
.quran-ayah-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-inline-start: 10px;
    vertical-align: middle;
    border-radius: 50%;
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    font-family: var(--font-serif);
    font-size: 14px;
    background: rgba(212, 175, 55, 0.07);
    user-select: none;
}
.quran-ayah-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-inline-start: 8px;
    vertical-align: middle;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--color-surface);
    color: var(--color-gold);
    cursor: pointer;
    font-size: 10px;
    opacity: 0;
    transition: var(--transition);
}
@media (hover: none) { .quran-ayah-play { opacity: 0.5; } }
.quran-ayah:hover .quran-ayah-play,
.quran-ayah.playing .quran-ayah-play { opacity: 1; }
.quran-ayah.playing .quran-ayah-play { background: var(--color-gold); color: #03140e; border-color: var(--color-gold); }

.quran-surah-end {
    text-align: center;
    color: var(--color-gold);
    font-family: var(--font-serif);
    font-size: 17px;
    margin: 30px 0 20px;
    opacity: 0.95;
}
.quran-surah-end i { font-size: 12px; margin: 0 8px; opacity: 0.7; }
.quran-mushaf-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .quran-toolbar { top: 64px; padding: 10px 12px; gap: 10px; }
    .quran-reciter-wrap { width: 100%; }
    .quran-reciter-wrap select { flex: 1; max-width: none; }
    .quran-mushaf { padding: 18px 12px 16px; }
    .quran-ayah { padding: 10px 8px; }
    .quran-ayah-text { font-size: 22px; line-height: 2.1; }
    .quran-surah-title h1 { font-size: 24px; }
    .quran-surah-badge { width: 46px; height: 46px; flex-basis: 46px; font-size: 18px; }
    .quran-bismillah { font-size: 24px; }
    .quran-reader-head { padding: 16px; }
    .quran-surah-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .quran-surah-card { padding: 11px 12px; gap: 9px; flex-wrap: wrap; }
    .qsc-badge { flex-basis: 36px; width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
    .qsc-name { font-size: 16.5px; }
    .qsc-name-en { display: none; }
}

/* ==========================================================================
   32. Burda Page
   ========================================================================== */
.burda-author-line {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 14px;
    margin: -4px auto 22px;
    max-width: 720px;
}
.burda-lazima {
    max-width: 720px;
    margin: 0 auto 22px;
    padding: 22px 26px 18px;
    border-radius: 20px;
    text-align: center;
    position: relative;
}
.burda-lazima-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-emerald);
    color: var(--color-gold);
    border: 1px solid var(--glass-border);
    padding: 4px 18px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.burda-lazima-text {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--color-gold);
    line-height: 2.1;
    margin: 6px 0 0;
}
.burda-story {
    max-width: 820px;
    margin: 0 auto 22px;
    border-radius: 16px;
    padding: 0 22px;
}
.burda-story summary {
    cursor: pointer;
    padding: 16px 0;
    color: var(--color-gold);
    font-weight: 700;
    font-family: var(--font-serif);
    font-size: 18px;
    list-style: none;
}
.burda-story summary::-webkit-details-marker { display: none; }
.burda-story summary i { margin-inline-end: 10px; }
.burda-story p {
    color: var(--color-text-muted);
    line-height: 2.1;
    font-size: 14.5px;
    margin: 0 0 18px;
}
.burda-toolbar {
    position: sticky;
    top: 80px;
    z-index: 40;
    max-width: 980px;
    margin: 0 auto 10px;
    padding: 12px 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.burda-play-btn { padding: 10px 22px; }
.burda-chapter-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 13px;
    white-space: nowrap;
    flex: 1 1 220px;
}
.burda-chapter-select-wrap select {
    background: var(--color-surface);
    color: var(--color-text-light);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
    outline: none;
    font-family: var(--font-serif);
}
body.light-mode .burda-chapter-select-wrap select { background: #fff; }
.burda-progress-wrap { flex: 1 1 200px; min-width: 160px; display: flex; flex-direction: column; gap: 6px; }
.burda-status {
    color: var(--color-text-muted);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.burda-credit {
    max-width: 980px;
    margin: 0 auto 18px;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 11.5px;
    opacity: 0.85;
}
.burda-toc {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 16px;
    max-width: 980px;
    margin: 0 auto;
    scrollbar-width: none;
}
.burda-toc::-webkit-scrollbar { display: none; }
.burda-toc-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--glass-border);
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 12.5px;
    font-family: var(--font-serif);
    transition: var(--transition);
}
.burda-toc-chip:hover { color: var(--color-gold); border-color: var(--color-gold); }
.burda-toc-chip.active {
    color: var(--color-gold);
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.15);
}
.btc-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--color-gold);
    font-family: var(--font-english);
}
.burda-chapter {
    max-width: 980px;
    margin: 0 auto 22px;
    border-radius: 22px;
    padding: 24px 28px;
    scroll-margin-top: 150px;
}
.burda-chapter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 14px;
    margin-bottom: 16px;
}
.burda-chapter-titles h3 {
    font-family: var(--font-serif);
    color: var(--color-gold);
    font-size: 21px;
    margin: 0 0 4px;
    line-height: 1.9;
}
.burda-chapter-en { color: var(--color-text-muted); font-size: 12px; font-family: var(--font-english); }
.burda-chapter-play {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    border: 1px solid var(--color-gold);
    background: rgba(212, 175, 55, 0.08);
    color: var(--color-gold);
    cursor: pointer;
    font-size: 15px;
    transition: var(--transition);
}
.burda-chapter-play:hover { background: var(--color-gold); color: #03140e; }
.burda-verse {
    padding: 12px 14px;
    border-radius: 12px;
    border-inline-start: 3px solid transparent;
    text-align: center;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
    font-family: var(--font-serif);
    font-size: 22px;
    line-height: 2.05;
    color: var(--color-text-light);
}
.burda-verse:hover { background: rgba(212, 175, 55, 0.05); }
.burda-verse.playing {
    background: rgba(212, 175, 55, 0.1);
    border-inline-start-color: var(--color-gold);
}
.bv-sep { color: var(--color-gold); opacity: 0.75; font-size: 14px; margin: 0 12px; }
.burda-back-top { text-align: center; margin: 4px 0 30px; }
.burda-majlis {
    max-width: 980px;
    margin: 0 auto;
    border-radius: 22px;
    padding: 24px 26px;
}
.burda-majlis-head h3 {
    color: var(--color-gold);
    font-family: var(--font-serif);
    margin: 0 0 6px;
    font-size: 22px;
}
.burda-majlis-head p { color: var(--color-text-muted); font-size: 13.5px; margin: 0 0 16px; }
.burda-majlis-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.burda-majlis-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.burda-majlis-link { margin-top: 16px; }

@media (max-width: 640px) {
    .burda-toolbar { top: 64px; padding: 10px 12px; gap: 10px; }
    .burda-chapter { padding: 18px 14px; }
    .burda-verse { font-size: 19px; line-height: 2; padding: 10px 8px; }
    .burda-lazima-text { font-size: 20px; }
    .burda-lazima { padding: 18px 16px 14px; }
    .bv-sep { margin: 0 7px; }
    .burda-chapter-titles h3 { font-size: 18px; }
    .burda-chapter-play { width: 40px; height: 40px; flex-basis: 40px; font-size: 13px; }
}

/* ==========================================================================
   SEERAH — حكاية الحبيب ﷺ (مواقف متحركة للأطفال)
   ========================================================================== */

/* ---------- بطاقات المواقف ---------- */
.seerah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 10px;
}

.seerah-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    border: 1px solid var(--glass-border);
}
.seerah-card:hover {
    transform: translateY(-4px);
    border-color: var(--ep-color, var(--color-accent));
    box-shadow: 0 18px 40px -18px var(--ep-color, var(--color-accent));
}
.seerah-card-icon {
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 24px;
    color: var(--ep-color, var(--color-accent));
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 24px -12px var(--ep-color, var(--color-accent));
}
.seerah-card-num {
    position: absolute;
    top: 10px;
    inset-inline-start: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ep-color, var(--color-accent));
    opacity: 0.85;
}
.seerah-card-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.seerah-card-title { font-family: var(--font-amiri, 'Amiri', serif); font-size: 22px; font-weight: 700; }
.seerah-card-sub { font-size: 13.5px; color: var(--color-text-muted); }
.seerah-card-meta { font-size: 12.5px; color: var(--color-text-muted); opacity: 0.8; margin-top: 4px; }
.seerah-card-play {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 15px;
    color: #131007;
    background: linear-gradient(135deg, #f0d68d, #c9a44c);
    box-shadow: 0 8px 20px -8px rgba(232, 196, 106, 0.65);
    transition: transform 0.3s ease;
}
.seerah-card:hover .seerah-card-play { transform: scale(1.08); }

/* ---------- رأس الموقف ---------- */
.seerah-player { display: flex; flex-direction: column; gap: 16px; }

.seerah-ep-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px 20px;
    border-radius: 20px;
}
.seerah-head-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.seerah-head-title { display: flex; align-items: center; gap: 14px; }
.seerah-head-title h1 { font-family: var(--font-amiri, 'Amiri', serif); font-size: 30px; margin: 0; }
.seerah-head-title p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 14px; }
.seerah-num-badge {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--ep-color, #e8c46a);
    border: 2px solid var(--ep-color, #e8c46a);
    box-shadow: 0 0 26px -8px var(--ep-color, #e8c46a), inset 0 0 18px -10px var(--ep-color, #e8c46a);
}
.seerah-head-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- المسرح ---------- */
.seerah-stage-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: radial-gradient(120% 100% at 50% 0%, #0a2b1c 0%, #041209 68%, #020a06 100%);
    box-shadow: 0 30px 70px -34px rgba(0, 0, 0, 0.9), inset 0 0 90px rgba(0, 0, 0, 0.45);
}
.seerah-player:not(.js-on) .seerah-stage-wrap,
.seerah-player:not(.js-on) .seerah-toolbar { display: none; }

.seerah-stage { position: absolute; inset: 0; }
.seerah-stage.srz-paused .srz-scene * { animation-play-state: paused !important; }

.srz-scene { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.srz-scene.srz-in { opacity: 1; }
.srz-scene.srz-out { opacity: 0; }
.srz-scene-inner { position: absolute; inset: 0; }
.srz-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.srz-cityline { position: absolute; inset-inline: 0; bottom: 0; height: 56%; }
.srz-cityline-faint { height: 38%; opacity: 0.55; }
.srz-cityline .srz-art { position: absolute; inset: 0; width: 100%; height: 100%; }

/* نجوم وشرر */
.srz-star {
    position: absolute;
    border-radius: 50%;
    background: #fff8dd;
    box-shadow: 0 0 6px 1px rgba(255, 248, 221, 0.55);
    animation: srzTwinkle 3.6s ease-in-out infinite;
}
.srz-floater {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 230, 166, 0.85);
    box-shadow: 0 0 10px 2px rgba(255, 230, 166, 0.4);
    animation: srzFloat 5.2s ease-in-out infinite;
}

/* السطور */
.srz-lines {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 6% 2%;
    pointer-events: none;
}
.srz-lines-inner { display: flex; flex-direction: column; gap: 12px; align-items: center; max-width: 96%; }
/* في مشاهد الكلمة الكبيرة (اقرأ / محمد ﷺ) وأختام المواقف: الكلمة في النص والسطور تحت */
.srz-scene.srz-has-word .srz-lines { align-items: flex-end; padding-bottom: 3%; }
.srz-line {
    margin: 0;
    font-family: var(--font-amiri, 'Amiri', serif);
    font-size: clamp(25px, 4.4vw, 44px);
    line-height: 1.6;
    font-weight: 700;
    color: #fff8e6;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 0 26px rgba(0, 0, 0, 0.85), 0 0 60px rgba(0, 0, 0, 0.55);
    max-height: 190px;
    opacity: 0;
    transform: translateY(16px);
    filter: blur(7px);
    transition: opacity 0.65s ease, transform 0.65s ease, filter 0.65s ease, max-height 0.45s ease 0.25s;
}
.srz-line.is-on { opacity: 1; transform: none; filter: none; }
.srz-line.is-dim { opacity: 0.45; transform: scale(0.92); }
.srz-line.is-gone { opacity: 0; transform: scale(0.85); max-height: 0; overflow: hidden; }

/* الكلمة الكبيرة */
.srz-word-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 0 8%;
    text-align: center;
    opacity: 0;
    transform: scale(0.86);
    filter: blur(10px);
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.2), filter 0.9s ease;
}
.srz-word-wrap.is-on { opacity: 1; transform: none; filter: none; }
.srz-word {
    font-family: var(--font-amiri, 'Amiri', serif);
    font-weight: 700;
    font-size: clamp(52px, 9.5vw, 108px);
    line-height: 1.35;
    color: #ffeec2;
    text-shadow: 0 0 30px rgba(232, 196, 106, 0.75), 0 0 90px rgba(232, 196, 106, 0.35), 0 4px 26px rgba(0, 0, 0, 0.8);
    animation: srzWordPulse 3.2s ease-in-out infinite;
}
.srz-word-verse {
    font-family: var(--font-quran, 'Amiri Quran', 'Amiri', serif);
    font-weight: 400;
    font-size: clamp(24px, 4.4vw, 46px);
    line-height: 2;
    color: #fdf8e7;
}
.srz-word-long {
    font-size: clamp(34px, 6.4vw, 76px);
}
.srz-word-sub {
    font-size: clamp(14px, 1.6vw, 18px);
    color: #d9c98f;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* نص النشيد الكبير */
.srz-bigtext-wrap {
    position: absolute;
    inset-inline: 6%;
    top: 16%;
    text-align: center;
    opacity: 0;
    transform: translateY(22px) scale(0.94);
    filter: blur(8px);
    transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
}
.srz-bigtext-wrap.is-on { opacity: 1; transform: none; filter: none; }
.srz-bigtext {
    font-family: var(--font-amiri, 'Amiri', serif);
    font-size: clamp(22px, 3.8vw, 40px);
    color: #ffeec2;
    text-shadow: 0 0 26px rgba(232, 196, 106, 0.6), 0 3px 20px rgba(0, 0, 0, 0.85);
}

/* ختم المواقف */
.srz-badge-wrap { position: absolute; inset: 0; display: grid; place-items: center; }
.srz-badge {
    position: relative;
    width: min(62%, 400px);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 36%, rgba(232, 196, 106, 0.16), rgba(232, 196, 106, 0.03) 62%, transparent 75%);
}
.srz-badge-ring { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(232, 196, 106, 0.5); }
.srz-ring-1 { animation: srzSpin 46s linear infinite; }
.srz-ring-2 { inset: 9%; border-style: solid; border-color: rgba(232, 196, 106, 0.28); animation: srzSpin 32s linear infinite reverse; }
.srz-badge-star { font-size: clamp(20px, 2.6vw, 30px); color: #e8c46a; margin-bottom: 6px; }
.srz-badge-word {
    font-family: var(--font-amiri, 'Amiri', serif);
    font-weight: 700;
    font-size: clamp(26px, 4.6vw, 46px);
    color: #ffeec2;
    text-shadow: 0 0 34px rgba(232, 196, 106, 0.8), 0 0 80px rgba(232, 196, 106, 0.35), 0 3px 22px rgba(0, 0, 0, 0.85);
}
.srz-badge-sub { font-size: clamp(13px, 1.6vw, 16px); color: #cdbd8a; letter-spacing: 1px; }
/* الختم مع السطور الكبيرة: نرفعه ونصغّره شوية عشان ما يتقاطعوش */
.srz-scene.srz-k-badge .srz-badge-wrap { padding-bottom: 15%; }
.srz-scene.srz-k-badge .srz-badge { width: min(56%, 370px); }

/* ---------- مشاهد محددة ---------- */
.srz-summit, .srz-lift-glow { animation: srzBeamPulse 4.6s ease-in-out infinite; }
.srz-beam, .srz-riselight, .srz-summit-beam { animation: srzBeamSoft 4.6s ease-in-out infinite; }
.srz-risestar { animation: srzTwinkle 2.6s ease-in-out infinite; }
.srz-risestar-flare { transform-box: fill-box; transform-origin: center; animation: srzSpin 24s linear infinite; }
.srz-flock { position: absolute; left: -260px; animation: srzFlockFly 20s linear infinite; }
.srz-elephant { animation: srzSway 5.4s ease-in-out infinite; }
.srz-grow { transform-origin: 400px 404px; animation: srzGrow 2.6s cubic-bezier(0.2, 0.8, 0.3, 1.1) both; }
.srz-palm-sway { transform-box: fill-box; transform-origin: 50% 6%; animation: srzSway 5.6s ease-in-out infinite; }
.srz-caravan-walk { animation: srzWalk 22s ease-in-out infinite alternate; }
.srz-camel { transform-box: fill-box; }
.srz-scale-beam { transform-box: fill-box; transform-origin: center; animation: srzScaleSway 6.5s ease-in-out infinite; }
.srz-pan { transform-box: fill-box; transform-origin: top center; animation: srzPanSway 6.5s ease-in-out infinite; }
.srz-in .srz-badge { animation: srzEndIn 1s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.srz-window { animation: srzWindowPulse 3.4s ease-in-out infinite; }
.srz-web { stroke-dasharray: 900; stroke-dashoffset: 900; animation: srzDrawWeb 3.2s ease-out 0.5s forwards; }
.srz-flame { transform-box: fill-box; transform-origin: center; animation: srzFlicker 0.9s ease-in-out infinite alternate; }
.srz-mist { animation: srzMist 9s ease-in-out infinite alternate; }
.srz-stone, .srz-stone-glow { transform-box: fill-box; transform-origin: center; }
.srz-stone { animation: srzStonePulse 2.2s ease-in-out infinite; }
.srz-stone-glow { animation: srzBeamPulse 2.2s ease-in-out infinite; }
.srz-cloth { transform-box: fill-box; animation: srzClothFloat 5.4s ease-in-out infinite; }
.srz-lanterns circle { animation: srzTwinkle 3.2s ease-in-out infinite; }
.srz-lanterns circle:nth-child(2n) { animation-delay: -1.4s; }

/* ---------- شريط التحكم ---------- */
.seerah-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: 20px;
}
.srz-ctl-group { display: flex; align-items: center; gap: 8px; }
.srz-ctl {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-text);
    font-size: 15px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}
.srz-ctl:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.srz-ctl.srz-play {
    width: 56px;
    height: 56px;
    font-size: 18px;
    color: #131007;
    background: linear-gradient(135deg, #f0d68d, #c9a44c);
    border: none;
    box-shadow: 0 10px 26px -10px rgba(232, 196, 106, 0.7);
}
.srz-ctl.active { border-color: var(--color-accent); color: var(--color-accent); box-shadow: inset 0 0 16px -8px var(--color-accent); }

.srz-progress-wrap { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 7px; }
.srz-progress {
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.srz-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #c9a44c, #f0d68d);
    transition: width 0.25s linear;
}
.srz-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#srz-counter { font-size: 13px; color: var(--color-text-muted); white-space: nowrap; }
.srz-dots { display: flex; align-items: center; gap: 6px; }
.srz-dots button {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.18);
    transition: all 0.25s ease;
}
.srz-dots button.active { width: 24px; border-radius: 99px; background: linear-gradient(90deg, #c9a44c, #f0d68d); }

/* ---------- طبقات البدء والنهاية ---------- */
.seerah-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
    padding: 20px;
    background: radial-gradient(90% 90% at 50% 50%, rgba(2, 10, 6, 0.55) 0%, rgba(2, 10, 6, 0.82) 100%);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 5;
}
.seerah-big-play {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ffeec2;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.srz-big-play-ring {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 30px;
    color: #131007;
    background: linear-gradient(135deg, #f0d68d, #c9a44c);
    box-shadow: 0 0 0 0 rgba(232, 196, 106, 0.55), 0 16px 44px -14px rgba(232, 196, 106, 0.8);
    animation: srzPlayRing 2.6s ease-out infinite;
    transition: transform 0.3s ease;
}
.seerah-big-play:hover .srz-big-play-ring { transform: scale(1.07); }
.srz-big-play-label { font-family: var(--font-amiri, 'Amiri', serif); font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8); }
.seerah-overlay-hint { margin: 0; font-size: 13.5px; color: rgba(246, 241, 223, 0.72); }
.seerah-resume-box { display: flex; flex-direction: column; gap: 12px; align-items: center; background: rgba(4, 18, 9, 0.72); border: 1px solid var(--glass-border); border-radius: 18px; padding: 18px 22px; }
.seerah-resume-box p { margin: 0; font-size: 15px; }
.srz-resume-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.seerah-end-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(90% 90% at 50% 50%, rgba(2, 10, 6, 0.72) 0%, rgba(2, 10, 6, 0.9) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 6;
}
.srz-end-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 20px; animation: srzEndIn 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.srz-end-inner > i { font-size: 34px; color: #e8c46a; text-shadow: 0 0 30px rgba(232, 196, 106, 0.6); }
.srz-end-inner h3 { font-family: var(--font-amiri, 'Amiri', serif); font-size: clamp(24px, 3.4vw, 34px); margin: 0; color: #ffeec2; }
.srz-end-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- نص الحكاية ---------- */
.seerah-read-card {
    padding: 20px 22px;
    border-radius: 20px;
    max-height: 64vh;
    overflow-y: auto;
    scrollbar-width: thin;
}
.seerah-player.js-on .seerah-read-card { display: none; }
.seerah-player.js-on.srz-read-mode .seerah-read-card { display: block; }
.seerah-player.js-on.srz-read-mode .seerah-stage-wrap { display: none; }
.seerah-read-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 17px;
    color: var(--color-accent);
}
.seerah-read-scene { padding: 10px 12px; border-radius: 14px; transition: background 0.4s ease; }
.seerah-read-scene.active-scene { background: rgba(232, 196, 106, 0.06); }
.seerah-read-line {
    margin: 0 0 8px;
    font-family: var(--font-amiri, 'Amiri', serif);
    font-size: 18px;
    line-height: 1.9;
    color: var(--color-text);
    opacity: 0.82;
    border-inline-start: 3px solid transparent;
    padding-inline-start: 10px;
    transition: all 0.35s ease;
}
.seerah-read-line.is-current {
    opacity: 1;
    color: #ffeec2;
    border-inline-start-color: var(--color-accent);
}
.seerah-read-word {
    margin: 4px 0 8px;
    padding-inline-start: 10px;
    font-weight: 700;
    color: var(--color-accent);
    font-size: 16px;
}
.seerah-read-word span { color: var(--color-text-muted); font-weight: 400; }

/* ---------- حركات ---------- */
@keyframes srzTwinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
@keyframes srzFloat { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-14px); opacity: 0.95; } }
@keyframes srzSway { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-4px) rotate(1.1deg); } }
@keyframes srzWalk { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
@keyframes srzFlicker { from { opacity: 0.55; transform: scale(0.92); } to { opacity: 1; transform: scale(1.08); } }
@keyframes srzMist { from { transform: translateX(-24px); opacity: 0.07; } to { transform: translateX(24px); opacity: 0.03; } }
@keyframes srzBeamSoft { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.45; } }
@keyframes srzBeamPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes srzGrow { from { transform: scale(0.5); } to { transform: scale(1); } }
@keyframes srzDrawWeb { to { stroke-dashoffset: 0; } }
@keyframes srzClothFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes srzFlockFly { from { transform: translateX(0); } to { transform: translateX(150vw); } }
@keyframes srzSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes srzWordPulse { 0%, 100% { text-shadow: 0 0 26px rgba(232, 196, 106, 0.6), 0 0 70px rgba(232, 196, 106, 0.28), 0 4px 26px rgba(0, 0, 0, 0.8); } 50% { text-shadow: 0 0 42px rgba(232, 196, 106, 0.95), 0 0 110px rgba(232, 196, 106, 0.45), 0 4px 26px rgba(0, 0, 0, 0.8); } }
@keyframes srzScaleSway { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-2.4deg); } 62% { transform: rotate(2.1deg); } 82% { transform: rotate(-0.8deg); } }
@keyframes srzPanSway { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(2deg); } 62% { transform: rotate(-1.6deg); } }
@keyframes srzWindowPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.82; } }
@keyframes srzStonePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
@keyframes srzPlayRing { 0% { box-shadow: 0 0 0 0 rgba(232, 196, 106, 0.5), 0 16px 44px -14px rgba(232, 196, 106, 0.8); } 70% { box-shadow: 0 0 0 26px rgba(232, 196, 106, 0), 0 16px 44px -14px rgba(232, 196, 106, 0.8); } 100% { box-shadow: 0 0 0 0 rgba(232, 196, 106, 0), 0 16px 44px -14px rgba(232, 196, 106, 0.8); } }
@keyframes srzEndIn { from { opacity: 0; transform: scale(0.88) translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- موبايل ---------- */
@media (max-width: 640px) {
    .seerah-grid { grid-template-columns: 1fr; gap: 14px; }
    .seerah-card { padding: 14px 16px; gap: 12px; }
    .seerah-card-icon { flex-basis: 52px; width: 52px; height: 52px; font-size: 20px; }
    .seerah-card-title { font-size: 19px; }
    .seerah-stage-wrap { aspect-ratio: 3 / 4; border-radius: 20px; }
    .seerah-head-title h1 { font-size: 24px; }
    .seerah-num-badge { flex-basis: 48px; width: 48px; height: 48px; font-size: 20px; }
    .srz-lines { padding: 0 4% 2%; }
    .srz-scene.srz-has-word .srz-lines { padding-bottom: 4%; }
    .srz-line { font-size: clamp(22px, 5.6vw, 32px); }
    .seerah-toolbar { gap: 10px; padding: 12px; justify-content: center; }
    .srz-progress-wrap { order: 3; min-width: 100%; }
    .srz-ctl { width: 42px; height: 42px; }
    .srz-ctl.srz-play { width: 52px; height: 52px; }
    .seerah-read-card { padding: 16px; max-height: 55vh; }
}

