/* ==========================================================================
   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 */
}

/* 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;
}

/* 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;
    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: 75%; /* 4:3 */
    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);
}
.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;
    gap: 4px;
    margin-top: 8px;
    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;
    }
    .navbar .nav-logo span {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .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;
    }
    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;
    }
    .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: 9px;
        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: 6px 12px;
    }
    .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. */
