/* ==========================================================================
   ISLAMIC PORTALS DESIGN SYSTEM (QURAN & SUNNAH DIGITAL ENCYCLOPEDIA)
   Ultra-Luxurious Islamic Architectural Aesthetics & Responsive Layouts
   ========================================================================== */

/* Google Fonts Import for Royal Arabic Typography */
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Cairo:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    /* Quran Royal Emerald Palette */
    --quran-portal-bg: #031c23;
    --quran-portal-surface: #062b35;
    --quran-portal-card: rgba(6, 43, 53, 0.75);
    --quran-portal-card-border: rgba(230, 165, 48, 0.22);
    --quran-portal-gold: #d4af37;
    --quran-portal-gold-bright: #f5c46b;
    --quran-portal-gold-glow: rgba(212, 175, 55, 0.35);
    --quran-portal-teal-accent: #0ec2c7;

    /* Sunnah Royal Midnight Sapphire & Antique Gold Palette */
    --sunnah-portal-bg: #09131f;
    --sunnah-portal-surface: #0e1d2e;
    --sunnah-portal-card: rgba(14, 28, 46, 0.85);
    --sunnah-portal-card-border: rgba(229, 165, 55, 0.28);
    --sunnah-portal-gold: #e6a836;
    --sunnah-portal-gold-bright: #fed988;
    --sunnah-portal-gold-glow: rgba(230, 168, 54, 0.38);
    --sunnah-portal-amber-accent: #f59e0b;
    --sunnah-portal-sapphire-accent: #38bdf8;
}

/* ==========================================================================
   PORTAL / WORKSPACE VIEW SWITCHER
   ========================================================================== */
.portal-main-switcher-wrapper {
    display: flex;
    justify-content: center;
    margin: 10px 0 25px;
    position: relative;
    z-index: 5;
}

.portal-main-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 14px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    gap: 6px;
}

.sunnah-theme-portal .portal-main-switcher {
    border-color: rgba(229, 160, 53, 0.35);
}

.portal-switcher-btn {
    border: none;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.portal-switcher-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.quran-theme-portal .portal-switcher-btn.active {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #031c23;
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.4);
}

.sunnah-theme-portal .portal-switcher-btn.active {
    background: linear-gradient(135deg, #e6a836 0%, #b87b14 100%);
    color: #08121d;
    box-shadow: 0 4px 18px rgba(230, 168, 54, 0.4);
}

.return-to-portal-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 16px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.sunnah-theme-portal .return-to-portal-banner {
    border-color: rgba(229, 160, 53, 0.25);
}

.return-to-portal-btn {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border: 1px solid var(--quran-portal-gold);
    color: var(--quran-portal-gold-bright);
    border-radius: 10px;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.sunnah-theme-portal .return-to-portal-btn {
    border-color: var(--sunnah-portal-gold);
    color: var(--sunnah-portal-gold-bright);
    background: linear-gradient(135deg, rgba(229, 160, 53, 0.2) 0%, rgba(229, 160, 53, 0.1) 100%);
}

.return-to-portal-btn:hover {
    background: var(--quran-portal-gold);
    color: #031c23;
    transform: translateY(-2px);
}

.sunnah-theme-portal .return-to-portal-btn:hover {
    background: var(--sunnah-portal-gold);
    color: #08121d;
}

/* ==========================================================================
   PORTAL WRAPPER & BACKGROUNDS
   ========================================================================== */
.islamic-portal-body {
    min-height: 100vh;
    font-family: 'Tajawal', 'Cairo', sans-serif !important;
    color: #ffffff;
    position: relative;
    overflow-x: hidden;
    line-height: 1.6;
}

.quran-theme-portal {
    background: radial-gradient(circle at 80% 15%, rgba(14, 194, 199, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 10% 40%, rgba(212, 175, 55, 0.07) 0%, transparent 45%),
                linear-gradient(160deg, #02161b 0%, #04222a 45%, #062b35 100%);
    background-attachment: fixed;
}

.sunnah-theme-portal {
    background: radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
                radial-gradient(circle at 15% 50%, rgba(230, 168, 54, 0.09) 0%, transparent 45%),
                linear-gradient(160deg, #070f1a 0%, #0c1a2b 45%, #112338 100%);
    background-attachment: fixed;
}

/* Islamic Subtle Arabesque Background Pattern */
.islamic-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.035;
    background-image: radial-gradient(#d4af37 1px, transparent 1px);
    background-size: 24px 24px;
    z-index: 0;
}

.portal-container {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   BREADCRUMBS (الرئيسية > القرآن الكريم وعلومه)
   ========================================================================== */
.portal-breadcrumb {
    padding: 14px 0 4px;
    font-size: 13px;
    font-weight: 600;
}
.portal-breadcrumb a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}
.portal-breadcrumb a:hover {
    color: var(--quran-portal-gold);
}
.portal-breadcrumb .sep {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
}
.portal-breadcrumb .current {
    color: var(--quran-portal-gold-bright);
    font-weight: 700;
}
.sunnah-theme-portal .portal-breadcrumb .current {
    color: var(--sunnah-portal-gold-bright);
}

/* ==========================================================================
   HERO SECTION (العنوان الرئيسي، شريط البحث، والمجسم ثلاثي الأبعاد)
   ========================================================================== */
.portal-hero-section {
    padding: 24px 0 35px;
    position: relative;
}

.portal-hero-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 28px;
    padding: 35px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    position: relative;
    overflow: hidden;
}

.quran-theme-portal .portal-hero-card {
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 20px 50px rgba(2, 22, 27, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.sunnah-theme-portal .portal-hero-card {
    border-color: rgba(230, 168, 54, 0.28);
    box-shadow: 0 20px 50px rgba(4, 9, 16, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Hero Artwork 3D Image Container */
.portal-hero-artwork-col {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.portal-hero-img-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-hero-img-halo {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    filter: blur(40px);
    z-index: 1;
    pointer-events: none;
}

.quran-theme-portal .portal-hero-img-halo {
    background: radial-gradient(circle, rgba(230, 165, 48, 0.35) 0%, rgba(14, 194, 199, 0.25) 60%, transparent 70%);
}

.sunnah-theme-portal .portal-hero-img-halo {
    background: radial-gradient(circle, rgba(230, 168, 54, 0.35) 0%, rgba(14, 116, 144, 0.25) 60%, transparent 70%);
}

.portal-hero-img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px var(--quran-portal-gold-glow);
    border: 2px solid rgba(212, 175, 55, 0.35);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: gentleFloat 5s ease-in-out infinite;
}

.sunnah-theme-portal .portal-hero-img {
    border-color: rgba(230, 168, 54, 0.35);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px var(--sunnah-portal-gold-glow);
}

.portal-hero-img:hover {
    transform: scale(1.03) translateY(-4px);
}

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

/* Hero Content Typography */
.portal-hero-title {
    font-size: 38px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
}

.quran-theme-portal .portal-hero-title span.highlight {
    color: var(--quran-portal-gold);
}

.sunnah-theme-portal .portal-hero-title span.highlight {
    color: var(--sunnah-portal-gold);
}

.portal-hero-subtitle {
    font-size: 15.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 26px;
    line-height: 1.8;
}

/* Universal Glassmorphic Search Bar */
.portal-search-wrapper {
    position: relative;
    max-width: 680px;
    margin: 0;
}

.portal-search-bar {
    display: flex;
    align-items: center;
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 6px 10px 6px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(212, 175, 55, 0.45) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-search-bar:focus-within {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 3px #d4af37, 0 0 25px rgba(212, 175, 55, 0.35) !important;
    transform: translateY(-2px);
    background: #ffffff !important;
}

.sunnah-theme-portal .portal-search-bar:focus-within {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--sunnah-portal-gold) !important;
}

.portal-search-icon {
    color: #4a5568;
    font-size: 18px;
    margin-left: 12px;
    transition: color 0.2s;
}

.portal-search-bar:focus-within .portal-search-icon {
    color: #d4af37 !important;
}

.portal-search-input,
.portal-search-input:focus,
.portal-search-input:hover,
.portal-search-input:active {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    font-size: 15px;
    font-weight: 600;
    color: #1a202c !important;
    padding: 8px 10px;
    font-family: inherit;
    box-shadow: none !important;
}

.portal-search-input::placeholder {
    color: #718096 !important;
    font-weight: 500;
    opacity: 0.8 !important;
    visibility: visible !important;
}

.portal-search-input:focus::placeholder {
    color: #a0aec0 !important;
    opacity: 0.6 !important;
    visibility: visible !important;
}

.portal-search-btn {
    border: none;
    outline: none;
    border-radius: 10px !important;
    padding: 9px 22px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.quran-theme-portal .portal-search-btn {
    background: linear-gradient(135deg, #062b35 0%, #031c23 100%);
    color: #f5c46b;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.quran-theme-portal .portal-search-btn:hover {
    background: linear-gradient(135deg, #0b424d 0%, #062b35 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(14, 194, 199, 0.35);
}

.sunnah-theme-portal .portal-search-btn {
    background: linear-gradient(135deg, #10243a 0%, #091422 100%);
    color: #fed988;
    border: 1px solid rgba(230, 168, 54, 0.4);
}

.sunnah-theme-portal .portal-search-btn:hover {
    background: linear-gradient(135deg, #163250 0%, #10243a 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(230, 168, 54, 0.35);
}

/* ==========================================================================
   QUICK ACTION CARDS ROW (7 CARDS)
   ========================================================================== */
.portal-quick-actions-row {
    margin-bottom: 35px;
}

.portal-quick-cards-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 14px;
}

@media (max-width: 1200px) {
    .portal-quick-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .portal-quick-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.portal-action-card {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 18px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: #ffffff;
}

.quran-theme-portal .portal-action-card:hover {
    background: rgba(6, 43, 53, 0.85);
    border-color: var(--quran-portal-gold);
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), 0 0 18px rgba(212, 175, 55, 0.25);
    color: #ffffff;
}

.sunnah-theme-portal .portal-action-card:hover {
    background: rgba(16, 33, 54, 0.92);
    border-color: var(--sunnah-portal-gold);
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4), 0 0 18px rgba(230, 168, 54, 0.25);
    color: #ffffff;
}

.portal-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--quran-portal-gold), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.sunnah-theme-portal .portal-action-card::before {
    background: linear-gradient(90deg, transparent, var(--sunnah-portal-gold), transparent);
}

.portal-action-card:hover::before {
    opacity: 1;
}

.action-card-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-size: 20px;
    transition: all 0.3s ease;
}

.quran-theme-portal .action-card-icon-box {
    background: rgba(212, 175, 55, 0.12);
    color: var(--quran-portal-gold-bright);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.sunnah-theme-portal .action-card-icon-box {
    background: rgba(229, 160, 53, 0.12);
    color: var(--sunnah-portal-gold-bright);
    border: 1px solid rgba(229, 160, 53, 0.25);
}

.portal-action-card:hover .action-card-icon-box {
    transform: scale(1.1) rotate(5deg);
    background: var(--quran-portal-gold);
    color: #031c23;
}

.sunnah-theme-portal .portal-action-card:hover .action-card-icon-box {
    background: var(--sunnah-portal-gold);
    color: #08121d;
}

.action-card-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #ffffff;
    letter-spacing: -0.2px;
}

.action-card-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    line-height: 1.4;
}

/* ==========================================================================
   SHOWCASE MIDDLE 3-COLUMN ROW (تلاوات / آية اليوم / أدوات سريعة)
   ========================================================================== */
.portal-showcase-row {
    margin-bottom: 40px;
}

.portal-widget-box {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 22px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: border-color 0.3s;
}

.quran-theme-portal .portal-widget-box {
    border-color: rgba(212, 175, 55, 0.18);
}

.sunnah-theme-portal .portal-widget-box {
    border-color: rgba(229, 160, 53, 0.18);
}

.portal-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.portal-widget-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quran-theme-portal .portal-widget-title i {
    color: var(--quran-portal-gold);
}

.sunnah-theme-portal .portal-widget-title i {
    color: var(--sunnah-portal-gold);
}

.portal-widget-viewall {
    font-size: 12px;
    font-weight: 700;
    color: var(--quran-portal-gold-bright);
    text-decoration: none;
    transition: opacity 0.2s;
}

.sunnah-theme-portal .portal-widget-viewall {
    color: var(--sunnah-portal-gold-bright);
}

.portal-widget-viewall:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Reciters List Widget (تلاوات مميزة) */
.reciter-list-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.reciter-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.25s ease;
    cursor: pointer;
}

.reciter-list-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateX(-4px);
}

.reciter-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reciter-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--quran-portal-gold);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.reciter-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.reciter-play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--quran-portal-gold);
    color: #031c23;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reciter-play-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 0 12px var(--quran-portal-gold-glow);
}

/* Ayah / Hadith of the Day Widget (آية اليوم / حديث اليوم) */
.featured-text-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: 16px;
    padding: 22px 18px;
    position: relative;
    overflow: hidden;
}

/* Quran Ayah of the day parchment style */
.ayah-parchment-card {
    background: linear-gradient(145deg, #fdfbf7 0%, #f5eee0 100%);
    color: #1a202c;
    border: 2px solid #d4af37;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(212, 175, 55, 0.2);
}

.ayah-ornament-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    color: #b8860b;
    opacity: 0.5;
    font-size: 18px;
}
.ayah-ornament-corner.top-right { top: 8px; right: 8px; }
.ayah-ornament-corner.bottom-left { bottom: 8px; left: 8px; }

.ayah-body-text {
    font-family: 'Amiri', serif !important;
    font-size: 21px;
    font-weight: 700;
    line-height: 2.1;
    text-align: center;
    color: #1a202c;
    margin: 10px 0 12px;
}

.ayah-source-badge {
    text-align: center;
    font-size: 12.5px;
    font-weight: 800;
    color: #795548;
    margin-bottom: 14px;
}

.ayah-actions-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(184, 134, 11, 0.3);
}

.ayah-num-bracket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: 0.88em;
    font-weight: 800;
    color: #8c6008;
    margin: 0 4px;
    padding: 0 2px;
    vertical-align: baseline;
    user-select: none;
    line-height: 1;
}

.btn-rotate-ayah-icon {
    background: rgba(212, 175, 55, 0.15) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    color: var(--quran-portal-gold-bright) !important;
    border-radius: 6px !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
}
.btn-rotate-ayah-icon:hover {
    background: var(--quran-portal-gold) !important;
    color: #041f26 !important;
    transform: rotate(45deg);
}

/* Specific High-Contrast Button Styling for Parchment Card */
.ayah-parchment-card .portal-ayah-btn {
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    padding: 8px 16px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

/* نسخ الآية - Primary Gold Button with Dark Text */
.ayah-parchment-card .portal-ayah-btn.btn-copy-ayah {
    background: linear-gradient(135deg, #e6a530 0%, #b87b14 100%) !important;
    color: #0a1b24 !important;
    border: 1px solid #9e690a !important;
    box-shadow: 0 3px 10px rgba(184, 123, 20, 0.3) !important;
}
.ayah-parchment-card .portal-ayah-btn.btn-copy-ayah:hover {
    background: linear-gradient(135deg, #f3b94a 0%, #ca8b1a 100%) !important;
    color: #000000 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 14px rgba(184, 123, 20, 0.45) !important;
}

/* تفسير الآية - Dark Contrast Button with Amber Border (Clear visibility on parchment) */
.ayah-parchment-card .portal-ayah-btn.btn-tafseer-ayah {
    background: rgba(184, 123, 20, 0.12) !important;
    color: #4a2e00 !important;
    border: 1.5px solid #b87b14 !important;
}
.ayah-parchment-card .portal-ayah-btn.btn-tafseer-ayah:hover {
    background: #4a2e00 !important;
    color: #ffffff !important;
    border-color: #4a2e00 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(74, 46, 0, 0.35) !important;
}

/* آية أخرى - Elegant Dark Teal Button */
.ayah-parchment-card .portal-ayah-btn.btn-shuffle-ayah {
    background: rgba(0, 32, 44, 0.08) !important;
    color: #002534 !important;
    border: 1px solid rgba(0, 37, 52, 0.3) !important;
}
.ayah-parchment-card .portal-ayah-btn.btn-shuffle-ayah:hover {
    background: #002534 !important;
    color: #ffffff !important;
    border-color: #002534 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 37, 52, 0.3) !important;
}

/* Fallback: any button in parchment card defaults to dark readable text */
.ayah-parchment-card .portal-ayah-btn:not(.btn-copy-ayah):not(.btn-tafseer-ayah):not(.btn-shuffle-ayah) {
    background: rgba(184, 123, 20, 0.12) !important;
    color: #4a2e00 !important;
    border: 1.5px solid #b87b14 !important;
}

/* Sunnah Hadith of the Day antique leather card */
.hadith-antique-card {
    background: linear-gradient(145deg, rgba(14, 28, 46, 0.95) 0%, rgba(8, 17, 28, 0.95) 100%);
    border: 1.5px solid rgba(230, 168, 54, 0.38);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 0 25px rgba(0, 0, 0, 0.5);
}

.hadith-body-text {
    font-family: 'Amiri', serif !important;
    font-size: 19px;
    font-weight: 600;
    line-height: 2.1;
    text-align: justify;
    color: #f1f5f9;
    margin: 10px 0 12px;
}

.hadith-source-badge {
    text-align: center;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--sunnah-portal-gold);
    margin-bottom: 14px;
}

.hadith-actions-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(229, 160, 53, 0.3);
}

.hadith-action-btn {
    background: rgba(229, 160, 53, 0.12);
    border: 1px solid rgba(229, 160, 53, 0.4);
    color: var(--sunnah-portal-gold-bright);
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hadith-action-btn:hover {
    background: var(--sunnah-portal-gold);
    color: #08121d;
    transform: translateY(-2px);
}

/* Quick Tools List Widget (أدوات سريعة) */
.quick-tools-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.quick-tool-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    color: #ffffff;
}

.quick-tool-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.35);
    transform: translateX(-4px);
    color: #ffffff;
}

.sunnah-theme-portal .quick-tool-item:hover {
    background: rgba(229, 160, 53, 0.1);
    border-color: rgba(229, 160, 53, 0.35);
}

.quick-tool-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-tool-icon {
    font-size: 15px;
    color: var(--quran-portal-gold);
    width: 20px;
    text-align: center;
}

.sunnah-theme-portal .quick-tool-icon {
    color: var(--sunnah-portal-gold);
}

.quick-tool-name {
    font-size: 13.5px;
    font-weight: 700;
}

.quick-tool-arrow {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s;
}

.quick-tool-item:hover .quick-tool-arrow {
    transform: translateX(-3px);
    color: var(--quran-portal-gold);
}

/* ==========================================================================
   3D REALISTIC LEATHER BOOK COVERS (التفاسير & أبرز كتب السنة)
   ========================================================================== */
.portal-books-section {
    margin-bottom: 45px;
}

.portal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.portal-section-title {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-books-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

@media (max-width: 1200px) {
    .portal-books-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .portal-books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.portal-book-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.portal-book-card:hover {
    transform: translateY(-8px);
}

/* ==========================================================================
   REAL 3D BOOK COVERS (التفاسير الحقيقية وكتب السنة المعتمدة)
   ========================================================================== */
.real-book-cover-3d {
    width: 100%;
    aspect-ratio: 1 / 1.48;
    border-radius: 6px 12px 12px 6px;
    position: relative;
    box-shadow: -5px 8px 18px rgba(0, 0, 0, 0.5), 
                -12px 16px 30px rgba(0, 0, 0, 0.6),
                inset 2px 0 5px rgba(255, 255, 255, 0.15);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    margin-bottom: 12px;
    background: #021217;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.sunnah-theme-portal .real-book-cover-3d {
    background: #08121d;
    border-color: rgba(230, 168, 54, 0.28);
}

.real-book-cover-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 5px 11px 11px 5px;
    transition: transform 0.4s ease;
}

.portal-book-card:hover .real-book-cover-3d {
    transform: translateY(-8px) scale(1.03);
    box-shadow: -8px 14px 28px rgba(0, 0, 0, 0.65), 
                0 0 25px var(--quran-portal-gold-glow);
    border-color: var(--quran-portal-gold);
}

.sunnah-theme-portal .portal-book-card:hover .real-book-cover-3d {
    box-shadow: -8px 14px 28px rgba(0, 0, 0, 0.65), 
                0 0 25px var(--sunnah-portal-gold-glow);
    border-color: var(--sunnah-portal-gold);
}

.portal-book-card:hover .real-book-cover-3d img {
    transform: scale(1.04);
}

/* 3D Spine ridge effect */
.real-book-cover-3d::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 10px;
    background: linear-gradient(90deg, rgba(0,0,0,0.5) 0%, rgba(255,255,255,0.18) 45%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
}

/* 3D Realistic Book Cover (CSS Fallback) */
.book-cover-3d {
    width: 100%;
    aspect-ratio: 1 / 1.45;
    border-radius: 8px 14px 14px 8px;
    position: relative;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: -4px 6px 15px rgba(0, 0, 0, 0.4), 
                -12px 14px 28px rgba(0, 0, 0, 0.5), 
                inset 3px 0 6px rgba(255, 255, 255, 0.2), 
                inset -3px 0 6px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 12px;
}

.portal-book-card:hover .book-cover-3d {
    box-shadow: -6px 10px 20px rgba(0, 0, 0, 0.5), 
                -16px 20px 35px rgba(0, 0, 0, 0.65), 
                0 0 20px var(--quran-portal-gold-glow);
}

/* Spine ridge line on the right side (RTL) */
.book-cover-3d::after {
    content: '';
    position: absolute;
    top: 0;
    right: 12px;
    bottom: 0;
    width: 3px;
    background: rgba(0, 0, 0, 0.25);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

/* Gold Foil Ornate Border */
.book-cover-inner-frame {
    border: 1.5px solid rgba(212, 175, 55, 0.6);
    outline: 1px solid rgba(212, 175, 55, 0.3);
    outline-offset: 3px;
    border-radius: 4px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 8px;
    text-align: center;
    position: relative;
}

/* Distinct Rich Leather Colors */
.book-leather-emerald {
    background: linear-gradient(135deg, #093b2a 0%, #031e15 100%);
}
.book-leather-sapphire {
    background: linear-gradient(135deg, #0e2f56 0%, #071930 100%);
}
.book-leather-ruby {
    background: linear-gradient(135deg, #5c1818 0%, #300c0c 100%);
}
.book-leather-parchment {
    background: linear-gradient(135deg, #d4c8ad 0%, #a89a7a 100%);
    color: #2b1e0f !important;
}
.book-leather-parchment .book-cover-inner-frame {
    border-color: #6b512c;
    outline-color: #8c6a3b;
}
.book-leather-parchment .book-cover-title {
    color: #2b1e0f !important;
    text-shadow: none !important;
}
.book-leather-parchment .book-cover-author {
    color: #573f22 !important;
}
.book-leather-walnut {
    background: linear-gradient(135deg, #442a17 0%, #201309 100%);
}
.book-leather-teal {
    background: linear-gradient(135deg, #0d3d44 0%, #051d21 100%);
}
.book-leather-amber {
    background: linear-gradient(135deg, #664312 0%, #3a2408 100%);
}
.book-leather-onyx {
    background: linear-gradient(135deg, #25282a 0%, #111314 100%);
}

.book-cover-ornament {
    font-size: 16px;
    color: #d4af37;
    margin-bottom: 4px;
}

.book-cover-title {
    font-family: 'Amiri', serif !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #f7e096;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    margin: 0;
}

.book-cover-author {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    margin: 0;
}

.book-meta-title {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    margin: 4px 0 2px;
}

.book-meta-author {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.book-browse-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--quran-portal-gold-bright);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
}

.sunnah-theme-portal .book-browse-btn {
    border-color: rgba(229, 160, 53, 0.35);
    color: var(--sunnah-portal-gold-bright);
}

.book-browse-btn:hover {
    background: var(--quran-portal-gold);
    color: #031c23;
    transform: scale(1.05);
}

.sunnah-theme-portal .book-browse-btn:hover {
    background: var(--sunnah-portal-gold);
    color: #08121d;
}

/* ==========================================================================
   SUNNAH TAXONOMY CATEGORIES (تصفح السنة النبوية)
   ========================================================================== */
.sunnah-categories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .sunnah-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sunnah-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sunnah-cat-card {
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(229, 160, 53, 0.2);
    border-radius: 18px;
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
}

.sunnah-cat-card:hover {
    background: rgba(16, 33, 54, 0.95);
    border-color: var(--sunnah-portal-gold);
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(229, 160, 53, 0.25);
    color: #ffffff;
}

.sunnah-cat-icon {
    font-size: 26px;
    color: var(--sunnah-portal-gold);
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.sunnah-cat-card:hover .sunnah-cat-icon {
    transform: scale(1.18);
    color: var(--sunnah-portal-gold-bright);
}

.sunnah-cat-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    color: #ffffff;
}

.sunnah-cat-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   STATISTICS METRICS ROW (عدادات إحصائية أنيقة)
   ========================================================================== */
.portal-stats-row {
    margin-bottom: 40px;
}

.portal-stats-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.quran-theme-portal .portal-stats-card {
    border-color: rgba(212, 175, 55, 0.2);
}

.sunnah-theme-portal .portal-stats-card {
    border-color: rgba(229, 160, 53, 0.2);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 6px 12px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.quran-theme-portal .stat-icon {
    background: rgba(212, 175, 55, 0.12);
    color: var(--quran-portal-gold);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.sunnah-theme-portal .stat-icon {
    background: rgba(229, 160, 53, 0.12);
    color: var(--sunnah-portal-gold);
    border: 1px solid rgba(229, 160, 53, 0.25);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    font-family: 'Cairo', sans-serif;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   SURAHS INDEX PILLS GRID (سور القرآن الكريم)
   ========================================================================== */
.surahs-pills-container {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-top: 15px;
}

@media (max-width: 1200px) {
    .surahs-pills-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .surahs-pills-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.surah-pill-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.surah-pill-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--quran-portal-gold);
    color: #ffffff;
    transform: translateY(-2px);
}

.surah-pill-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--quran-portal-gold-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

/* ==========================================================================
   AUDIBLE SUNNAH (السنة المسموعة)
   ========================================================================== */
.audible-sunnah-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

@media (max-width: 1200px) {
    .audible-sunnah-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .audible-sunnah-grid {
        grid-template-columns: 1fr;
    }
}

.audio-sunnah-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(229, 160, 53, 0.22);
    border-radius: 16px;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    cursor: pointer;
}

.audio-sunnah-card:hover {
    background: rgba(16, 33, 54, 0.92);
    border-color: var(--sunnah-portal-gold);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.audio-sunnah-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.audio-sunnah-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(229, 160, 53, 0.12);
    border: 1px solid rgba(229, 160, 53, 0.3);
    color: var(--sunnah-portal-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.audio-sunnah-title {
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.audio-sunnah-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.audio-sunnah-btn {
    background: rgba(229, 160, 53, 0.15);
    border: 1px solid rgba(229, 160, 53, 0.4);
    color: var(--sunnah-portal-gold-bright);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
}

.audio-sunnah-btn:hover {
    background: var(--sunnah-portal-gold);
    color: #08121d;
}

/* ==========================================================================
   WORKSPACE ANCHOR & DIVIDERS
   ========================================================================== */
.portal-workspace-anchor {
    scroll-margin-top: 30px;
}

.portal-section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    margin: 40px 0;
}

/* ==========================================================================
   ELEGANT FLOATING WORKSPACE / READER HEADER
   ========================================================================== */
.reader-floating-header {
    background: rgba(13, 27, 34, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 20px;
    padding: 16px 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    transition: all 0.3s ease;
}

.sunnah-theme-portal .reader-floating-header {
    background: rgba(10, 22, 36, 0.92);
    border-color: rgba(229, 160, 53, 0.35);
}

.btn-return-portal-pill {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.08));
    border: 1.5px solid var(--quran-portal-gold);
    color: #ffffff;
    font-weight: 800;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 10px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.sunnah-theme-portal .btn-return-portal-pill {
    background: linear-gradient(135deg, rgba(229, 160, 53, 0.25), rgba(229, 160, 53, 0.08));
    border-color: var(--sunnah-portal-gold);
}

.btn-return-portal-pill:hover {
    background: var(--quran-portal-gold);
    color: #041f26;
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.sunnah-theme-portal .btn-return-portal-pill:hover {
    background: var(--sunnah-portal-gold);
    color: #08121d;
    box-shadow: 0 6px 20px rgba(229, 160, 53, 0.35);
}

.active-surah-indicator {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   PORTAL AYAH & HADITH ACTION BUTTONS (NO CLIPPING, FULL TEXT)
   ========================================================================== */
.portal-ayah-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #ffffff;
    font-weight: 700;
    font-size: 12.5px;
    padding: 7px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}

.sunnah-theme-portal .portal-ayah-btn {
    border-color: rgba(229, 160, 53, 0.35);
}

.portal-ayah-btn:hover {
    background: var(--quran-portal-gold);
    color: #041f26;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.sunnah-theme-portal .portal-ayah-btn:hover {
    background: var(--sunnah-portal-gold);
    color: #08121d;
    box-shadow: 0 4px 12px rgba(229, 160, 53, 0.3);
}

/* Hero image soft radial mask - blends into background naturally */
.portal-hero-img-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.portal-hero-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 20px;
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.6));
    transition: transform 0.5s ease;
}

.portal-hero-img:hover {
    transform: scale(1.02);
}

/* ==========================================================================
   SUNNAH DEDICATED WORKSPACE PANELS & MODULAR SYSTEM
   ========================================================================== */
.hadith-workspace-panel {
    display: none;
    animation: fadeInPanel 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hadith-workspace-panel.active-panel {
    display: block;
}

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

/* 9 Canonical Books Catalog Cards */
.canonical-book-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(229, 160, 53, 0.22);
    border-radius: 20px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.canonical-book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e5a035, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.canonical-book-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 160, 53, 0.6);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 25px rgba(229, 160, 53, 0.2);
}

.canonical-book-card:hover::before {
    opacity: 1;
}

.canonical-cover-wrapper {
    width: 100%;
    max-width: 150px;
    margin: 0 auto 16px;
    aspect-ratio: 1 / 1.4;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    transition: transform 0.4s ease;
}

.canonical-book-card:hover .canonical-cover-wrapper {
    transform: scale(1.04) rotate(-1deg);
}

.canonical-cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.canonical-book-title {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.4;
}

.canonical-book-author {
    font-size: 12px;
    color: var(--sunnah-portal-gold-bright);
    font-weight: 700;
    margin-bottom: 8px;
}

.canonical-book-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.btn-read-book-action {
    background: linear-gradient(135deg, #e5a035 0%, #b87b14 100%);
    border: none;
    color: #08121d;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 12px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(229, 160, 53, 0.35);
    transition: all 0.25s ease;
}

.btn-read-book-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 160, 53, 0.5);
    color: #000;
}

/* Single Book Reader Header */
.single-book-reader-header {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(229, 160, 53, 0.3);
    border-radius: 18px;
    padding: 18px 22px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: gap;
    gap: 16px;
}

.active-book-meta-box {
    display: flex;
    align-items: center;
    gap: 14px;
}

.active-book-thumb {
    width: 50px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(229, 160, 53, 0.4);
}

/* Takhreej & Grades Cards */
.takhreej-grade-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 20px;
    height: 100%;
    transition: transform 0.3s ease;
}

.takhreej-grade-card:hover {
    transform: translateY(-4px);
}

.grade-pill-badge {
    font-size: 13px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Narrator Profile Cards */
.narrator-card-grid-item {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(229, 160, 53, 0.25);
    border-radius: 18px;
    padding: 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.narrator-card-grid-item:hover {
    transform: translateY(-5px);
    border-color: rgba(229, 160, 53, 0.55);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.narrator-avatar-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(229, 160, 53, 0.15);
    border: 2px solid #e5a035;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    color: #e5a035;
}

/* Hadith Science Track */
.science-track-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.science-track-card:hover {
    transform: translateY(-5px);
    border-color: rgba(229, 160, 53, 0.45);
}

/* ==========================================================================
   FLOATING AUDIO PLAYER & OFFSET CONTROL
   ========================================================================== */
.quran-floating-player {
    display: flex !important;
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 99999 !important;
    transition: all 0.3s ease-in-out !important;
}

.has-active-player,
#quran-reader-view {
    padding-bottom: 120px !important;
}

#ayahs-container {
    padding-bottom: 35px;
}

#tafseer-box {
    padding-bottom: 25px;
}

.portal-container {
    padding-bottom: 30px;
}

/* ==========================================================================
   CRITICAL FIX: UNIVERSAL RESET ON BADGES & RADII ACROSS ALL PORTALS & MODALS
   Eradicates ebukz theme border-radius: 50% on badges and restores sleek 6px radius.
   ========================================================================== */
.badge,
span.badge,
.modal .badge,
.modal-body .badge,
.islamic-portal-body .badge,
.islamic-portal-body span.badge,
.quran-workspace-panel .badge,
.reader-area .badge,
.side-info-panel .badge,
.tafseer-book-card-item .badge,
.portal-hero-section .badge,
.portal-book-card .badge,
.quran-floating-player .badge,
#quran-reader-view .badge,
.badge-pill,
.islamic-portal-body .badge-pill,
.modal .badge-pill {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    width: auto !important;
    margin: 0 4px !important;
    transform: none !important;
    float: none !important;
    border-radius: 6px !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* Fix Bootstrap Badge Colors in Dark Mode & Modals */
.modal .badge.bg-info,
.badge.bg-info {
    background-color: rgba(14, 165, 233, 0.18) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.modal .badge.bg-warning,
.badge.bg-warning {
    background-color: rgba(212, 175, 55, 0.18) !important;
    color: #ffd700 !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
}

.modal .badge.bg-success,
.badge.bg-success {
    background-color: rgba(34, 197, 94, 0.18) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.35) !important;
}

.modal .badge.bg-danger,
.badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.18) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.35) !important;
}

.modal .badge.bg-primary,
.badge.bg-primary {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(96, 165, 250, 0.35) !important;
}

.modal .badge.bg-secondary,
.badge.bg-secondary {
    background-color: rgba(148, 163, 184, 0.18) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(203, 213, 225, 0.35) !important;
}

.modal .badge.bg-dark,
.badge.bg-dark {
    background-color: rgba(15, 23, 42, 0.8) !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

/* Global rounded-pill override: replaces 50px pill with modern 10px rounded rectangle */
.rounded-pill,
.btn.rounded-pill,
button.rounded-pill,
a.rounded-pill,
span.rounded-pill {
    border-radius: 10px !important;
}

/* Quran Workspace Panels System */
.quran-workspace-panel {
    display: none;
    animation: fadeInPortal 0.35s ease;
    padding-bottom: 120px !important;
}
.quran-workspace-panel.active-panel {
    display: block;
}
.quran-workspace-tab-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.25s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.quran-workspace-tab-btn:hover {
    color: #ffffff;
    background: rgba(212, 175, 55, 0.15);
}
.quran-workspace-tab-btn.active {
    background: linear-gradient(135deg, #d4af37, #aa8c2c);
    color: #0d1b1e !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    font-weight: 800;
}

/* Dedicated Tafseer Cards & Reader */
.tafseer-book-card-item {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.tafseer-book-card-item:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.tafseer-cover-thumb {
    width: 100%;
    aspect-ratio: 1/1.38;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.tafseer-cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.tafseer-book-card-item:hover .tafseer-cover-thumb img {
    transform: scale(1.04);
}

.tafseer-ayah-display-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(0, 0, 0, 0.4));
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 20px;
    padding: 24px 28px;
    margin-bottom: 24px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.tafseer-ayah-text {
    font-family: 'Amiri', serif;
    font-size: 26px;
    line-height: 2.2;
    color: #ffd700;
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.tafseer-content-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    padding: 24px 28px;
    font-size: 16px;
    line-height: 2.3;
    color: #e2e8f0;
    text-align: justify;
}

/* Quran Reciters Studio Cards */
.reciter-studio-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.3s ease;
    text-align: center;
}
.reciter-studio-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}
.reciter-avatar-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
    border: 2px solid rgba(212, 175, 55, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 28px;
    color: #ffd700;
}

/* Qira'at Academy Cards */
.qiraat-academy-card {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 18px;
    padding: 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}
.qiraat-academy-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.55);
}

/* Tajweed Atlas Cards */
.tajweed-atlas-card {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 16px;
    padding: 20px;
    border-right: 5px solid;
    height: 100%;
    transition: transform 0.25s ease;
}
.tajweed-atlas-card:hover {
    transform: translateY(-4px);
}

/* Qira'at Comparative Matrix Luxury Table */
.qiraat-matrix-container {
    background: rgba(0, 24, 36, 0.78);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
    margin-bottom: 40px;
}

.qiraat-matrix-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0, 18, 28, 0.6);
}

.qiraat-matrix-table th {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.25) 0%, rgba(0, 30, 44, 0.95) 100%);
    color: #ffd700;
    font-weight: 800;
    font-size: 13.5px;
    padding: 16px 14px;
    text-align: center;
    border-bottom: 2px solid rgba(212, 175, 55, 0.5);
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    vertical-align: middle;
}

.qiraat-matrix-table th:last-child {
    border-left: none;
}

.qiraat-matrix-table td {
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(212, 175, 55, 0.15);
    vertical-align: middle;
    text-align: right;
    transition: background 0.2s ease;
}

.qiraat-matrix-table td:last-child {
    border-left: none;
}

.qiraat-matrix-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.qiraat-matrix-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.07);
}

.qiraat-matrix-table .riwayah-name-cell {
    white-space: nowrap;
    width: 210px;
    min-width: 210px;
    text-align: right;
    background: rgba(0, 28, 42, 0.7);
}

.rule-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.rule-chip.chip-gold {
    background: rgba(212, 175, 55, 0.18);
    color: #ffd700;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.rule-chip.chip-cyan {
    background: rgba(6, 182, 212, 0.18);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.rule-chip.chip-green {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.rule-chip.chip-blue {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.rule-chip.chip-amber {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.rule-chip.chip-purple {
    background: rgba(139, 92, 246, 0.18);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.riwayah-card-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-xs {
    padding: 3px 8px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    border-radius: 6px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMMERSIVE HADITH BOOK READER HERO
   ═══════════════════════════════════════════════════════════════════════════ */

.hadith-reader-hero {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    background: linear-gradient(135deg, rgba(229,160,53,0.07) 0%, rgba(8,18,29,0) 60%),
                rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(229, 160, 53, 0.3);
    border-radius: 24px;
    padding: 28px 30px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.hadith-reader-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 260px;
    height: 100%;
    background: radial-gradient(ellipse at right center, rgba(229,160,53,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Left: Cover Spotlight */
.reader-cover-spotlight {
    position: relative;
    flex-shrink: 0;
}

.reader-cover-glow {
    position: absolute;
    inset: -12px;
    background: radial-gradient(ellipse, rgba(229,160,53,0.35) 0%, transparent 70%);
    border-radius: 20px;
    animation: coverGlowPulse 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes coverGlowPulse {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

.reader-cover-img {
    width: 130px;
    height: 180px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(229, 160, 53, 0.5);
    position: relative;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: block;
}

.reader-cover-img:hover {
    transform: scale(1.04) rotate(-1.5deg);
}

/* Right: Book Details */
.reader-book-details {
    flex: 1;
    min-width: 0;
}

.reader-content-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(229, 160, 53, 0.15);
    border: 1px solid rgba(229, 160, 53, 0.35);
    color: #f6c867;
    font-size: 11.5px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.reader-scientific-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.reader-book-main-title {
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.35;
    margin: 10px 0 8px;
}

.reader-book-author-line {
    font-size: 13.5px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
}

.reader-book-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.reader-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 8px;
}

.reader-grade-chip {
    background: rgba(229, 160, 53, 0.15);
    border-color: rgba(229, 160, 53, 0.4);
    color: #f6c867;
}

/* Navigation controls */
.reader-nav-controls {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.reader-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(229, 160, 53, 0.12);
    border: 1.5px solid rgba(229, 160, 53, 0.5);
    color: #e5a035;
    font-size: 13px;
    font-weight: 800;
    padding: 9px 18px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.reader-back-btn:hover {
    background: rgba(229, 160, 53, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 160, 53, 0.2);
}

.reader-book-switcher-wrap {
    flex: 1;
    min-width: 200px;
}

.reader-book-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(229, 160, 53, 0.35);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-family: inherit;
    direction: rtl;
}

.reader-book-select:focus {
    border-color: rgba(229, 160, 53, 0.7);
    box-shadow: 0 0 0 3px rgba(229, 160, 53, 0.1);
}

.reader-book-select option {
    background: #0d1f2d;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   READER SEARCH TOOLBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.reader-search-toolbar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(229, 160, 53, 0.2);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
}

.reader-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.reader-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(229, 160, 53, 0.3);
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 11px 44px 11px 16px;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    direction: rtl;
}

.reader-search-input:focus {
    border-color: rgba(229, 160, 53, 0.6);
    box-shadow: 0 0 0 3px rgba(229, 160, 53, 0.1);
}

.reader-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.reader-search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #e5a035;
    font-size: 14px;
    pointer-events: none;
}

.reader-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #e5a035 0%, #b87b14 100%);
    border: none;
    color: #08121d;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(229, 160, 53, 0.35);
}

.reader-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 160, 53, 0.5);
}

.reader-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.07);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.reader-reset-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Topic Chips in Reader */
.reader-topic-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.reader-topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.reader-topic-chip:hover {
    background: rgba(229, 160, 53, 0.12);
    border-color: rgba(229, 160, 53, 0.4);
    color: #f6c867;
    transform: translateY(-1px);
}

.reader-topic-chip.active {
    background: rgba(229, 160, 53, 0.2);
    border-color: rgba(229, 160, 53, 0.6);
    color: #f6c867;
    box-shadow: 0 0 12px rgba(229, 160, 53, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .hadith-reader-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
    }
    .reader-book-stats,
    .reader-nav-controls {
        justify-content: center;
    }
    .reader-book-switcher-wrap {
        min-width: unset;
        width: 100%;
    }
    .reader-book-main-title {
        font-size: 18px;
    }
}

/* ==========================================================================
   LTR & ENGLISH INTERNATIONALIZATION (html[dir="ltr"])
   ========================================================================== */
html[dir="ltr"] .islamic-portal-body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif !important;
    text-align: left;
}

html[dir="ltr"] .portal-hero-title {
    text-align: left;
    justify-content: flex-start;
}

html[dir="ltr"] .portal-hero-subtitle {
    text-align: left;
}

html[dir="ltr"] .portal-search-bar {
    padding: 6px 10px 6px 20px !important;
}

html[dir="ltr"] .portal-search-icon {
    margin-left: 0;
    margin-right: 12px;
}

html[dir="ltr"] .portal-search-btn {
    flex-direction: row;
}

html[dir="ltr"] .portal-action-card {
    text-align: left;
}

html[dir="ltr"] .action-card-title,
html[dir="ltr"] .action-card-desc {
    text-align: left;
}

html[dir="ltr"] .showcase-card-title {
    text-align: left;
}

html[dir="ltr"] .portal-breadcrumb {
    text-align: left;
    justify-content: flex-start;
}

html[dir="ltr"] .return-to-portal-banner {
    flex-direction: row;
}

html[dir="ltr"] .return-to-portal-btn i {
    transform: rotate(180deg);
}

html[dir="ltr"] .section-header-title {
    text-align: left;
}

/* Quran & Hadith Arabic Preservations */
html[dir="ltr"] .daily-ayah-text,
html[dir="ltr"] .quran-verse-arabic,
html[dir="ltr"] .tafseer-ayah-text,
html[dir="ltr"] .ayah-arabic-text,
html[dir="ltr"] .quran-font,
html[dir="ltr"] .hadith-matn,
html[dir="ltr"] .hadith-arabic-text,
html[dir="ltr"] .hadith-text-scrollbox,
html[dir="ltr"] #daily-hadith-text,
html[dir="ltr"] #translation-ayah-arabic-text,
html[dir="ltr"] .compare-arabic-text {
    direction: rtl !important;
    text-align: right !important;
    font-family: 'Amiri', serif !important;
}

html[dir="ltr"] .daily-hadith-card {
    text-align: left;
}

html[dir="ltr"] .daily-hadith-meta {
    justify-content: flex-start;
}

html[dir="ltr"] .reader-book-stats {
    justify-content: flex-start;
}

html[dir="ltr"] .reader-nav-controls {
    flex-direction: row;
}

html[dir="ltr"] .reader-nav-btn.prev i,
html[dir="ltr"] .reader-nav-btn.next i {
    transform: rotate(180deg);
}

html[dir="ltr"] .hadith-card-item {
    text-align: left;
}

html[dir="ltr"] .modal-header .btn-outline-danger {
    margin-left: auto;
    margin-right: 0;
}

