/*
Theme Name: Naat Academy
Theme URI: https://naatacademy.org
Author: Owais Razvi
Author URI: https://naatacademy.org
Description: A professional, Islamic-themed WordPress theme for Naat, Hamd, and Manqabat collections. Premium glassmorphism design with RTL support.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: naat-academy
Tags: two-columns, right-sidebar, custom-colors, custom-menu, rtl-language-support, translation-ready, sticky-post
*/

/* ==========================================================================
   PREMIUM DESIGN SYSTEM - CSS Custom Properties
   ========================================================================== */

:root {
    /* Premium Color Palette */
    --clr-primary: #047857;
    --clr-primary-light: #10b981;
    --clr-primary-dark: #065f46;
    --clr-accent: #d97706;
    --clr-accent-light: #fbbf24;
    --clr-surface: #ffffff;
    --clr-background: #f8fafc;
    --clr-text: #1e293b;
    --clr-text-muted: #64748b;

    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #047857 0%, #10b981 50%, #0d9488 100%);
    --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(4, 120, 87, 0.95) 0%, rgba(13, 148, 136, 0.85) 50%, rgba(4, 120, 87, 0.75) 100%);

    /* Premium Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
    --shadow-float: 0 8px 30px -8px rgba(4, 120, 87, 0.4);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-book: 3px 3px 15px rgba(0, 0, 0, 0.12), inset -2px -2px 8px rgba(0, 0, 0, 0.05);

    /* Premium Blur Effects */
    --blur-sm: blur(8px);
    --blur-md: blur(12px);
    --blur-lg: blur(20px);
    --blur-xl: blur(30px);

    /* Animation Timings */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
}

/* ==========================================================================
   Premium Base Styles
   ========================================================================== */

@font-face {
    font-family: 'NaatFont';
    src: url('https://res.cloudinary.com/awescreative/raw/upload/v1749150996/Awes/naatfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

html {
    font-size: 110%;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--clr-background);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    color: var(--clr-text);
}

.urdu-text {
    font-family: 'NaatFont', serif;
    line-height: 1.8;
}

h1.urdu-text,
h2.urdu-text,
h3.urdu-text,
h4.urdu-text {
    line-height: 1.6 !important;
    padding-bottom: 0.2em;
    padding-top: 0.1em;
    display: inline-block;
    width: 100%;
}

.glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Premium Glass Variants */
.glass-dark {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.8) 100%);
    backdrop-filter: var(--blur-lg);
    -webkit-backdrop-filter: var(--blur-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: var(--gradient-glass);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-card);
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.section-title-bar {
    position: relative;
    padding-right: 1rem;
}

.section-title-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    border-radius: 99px;
}

.typo-card {
    transition: all 0.4s var(--ease-out-back);
    border-radius: var(--radius-xl);
    background: var(--clr-surface);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.typo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s var(--ease-smooth);
}

.typo-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border-color: rgba(16, 185, 129, 0.3);
}

.typo-card:hover::before {
    opacity: 1;
}

/* Premium Card Shimmer Effect */
.card-shimmer {
    position: relative;
    overflow: hidden;
}

.card-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s var(--ease-smooth);
}

.card-shimmer:hover::after {
    left: 100%;
}

.book-cover {
    box-shadow:
        -2px 0 5px rgba(0, 0, 0, 0.1),
        inset 2px 0 5px rgba(255, 255, 255, 0.2),
        inset -2px 0 5px rgba(0, 0, 0, 0.1);
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 20%, rgba(0, 0, 0, 0.05) 100%);
}

.book-spine {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.1));
}

.book-3d-wrapper {
    perspective: 1000px;
}

.book-3d {
    transition: transform 0.4s ease;
    transform: rotateY(-10deg) translateX(5px);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15), -1px 0 2px rgba(0, 0, 0, 0.1) inset;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.group:hover .book-3d {
    transform: rotateY(0deg) translateX(0) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.shine-edge {
    position: relative;
    overflow: hidden;
}

.shine-edge::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 100%);
    opacity: 0.7;
}

.notification-slider {
    height: 24px;
    overflow: hidden;
    position: relative;
}

/* Modal Transitions */
#ai-modal,
#story-modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#ai-modal.hidden,
#story-modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#ai-modal:not(.hidden),
#story-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ai-modal:not(.hidden) .modal-content,
#story-modal:not(.hidden) .modal-content {
    transform: scale(1);
}

.story-progress-bar {
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    flex: 1;
}

.story-progress-fill {
    height: 100%;
    background-color: white;
    width: 0%;
    transition: width 0.1s linear;
}

.story-progress-fill.active {
    width: 100%;
}

.gsc-control-cse {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* Ensure admin bar doesn't break sticky header */
body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ==========================================================================
   Single Naat Page Styles
   ========================================================================== */

/* Section Card */
.section-card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

/* ==========================================================================
   Clickable Card Pattern - Site-Wide
   ========================================================================== */

/* Base card - NO pointer by default */
.typo-card,
.section-card,
.card {
    cursor: default;
}

/* Clickable card - only with link */
.clickable-card {
    position: relative;
    transition: all 0.3s ease;
}

/* Only apply pointer when card has actual link */
.clickable-card:has(> .card-link),
a.clickable-card,
.clickable-card[data-href] {
    cursor: pointer;
}

/* Stretching link covers entire card */
.clickable-card>.card-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Content inside card */
.clickable-card .card-content {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* Re-enable pointer events for interactive elements inside */
.clickable-card .card-content a,
.clickable-card .card-content button,
.clickable-card .card-content input,
.clickable-card .card-content .clickable {
    pointer-events: auto;
    position: relative;
    z-index: 3;
}

/* Dictionary Word - Dotted Underline */
.dict-word {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #10b981;
    text-underline-offset: 6px;
    cursor: help;
    transition: background-color 0.2s;
}

.dict-word:hover {
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
}

/* Mobile Bottom Nav */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #64748b;
    font-size: 0.65rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.bottom-nav-item.active {
    color: #10b981;
}

.bottom-nav-item:hover {
    color: #059669;
}

/* Safe Bottom Padding for iOS */
.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom);
}

/* Background Pattern */
.bg-mesh-green {
    background-color: #f0fdf4;
    background-image:
        radial-gradient(at 0% 0%, rgba(52, 211, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(251, 191, 36, 0.05) 0px, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2310b981' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}

/* Nastaliq Typography Classes */
.text-nastaliq {
    font-family: 'NaatFont', 'Noto Naskh Arabic', serif;
    line-height: 1.8;
}

.text-nastaliq-lg {
    font-family: 'NaatFont', 'Noto Naskh Arabic', serif;
    line-height: 2.2;
}

.font-naskh {
    font-family: 'Noto Naskh Arabic', serif;
}

.font-sans-eng {
    font-family: 'Inter', 'Outfit', system-ui, sans-serif;
    direction: ltr;
}

/* Dictionary Modal Transitions */
#meaning-popup {
    transition: opacity 0.2s ease;
}

#meaning-popup.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#meaning-popup:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#meaning-content {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Lyrics Content Adjustable Font */
.lyrics-content {
    --lyrics-font-size: 1.3rem;
    --lyrics-line-height: 2.2rem;
}

.lyrics-content p {
    font-size: var(--lyrics-font-size);
    line-height: var(--lyrics-line-height);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .section-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-left: -1rem;
        margin-right: -1rem;
    }

    .lyrics-content {
        --lyrics-font-size: 1.1rem;
        --lyrics-line-height: 1.9rem;
    }
}

/* Scroll Smooth for Anchor Navigation */
html {
    scroll-behavior: smooth;
}

/* ==========================================================================
   Enhanced Naat Single Page - Tab System & Typography
   ========================================================================== */

/* Tab Navigation Container */
.naat-tabs-nav {
    display: flex;
    gap: 0.25rem;
    padding: 0.5rem;
    background: #f1f5f9;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.naat-tabs-nav::-webkit-scrollbar {
    display: none;
}

/* Tab Button */
.naat-tab-btn {
    flex: 1;
    min-width: max-content;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: 'NaatFont', serif;
}

.naat-tab-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #334155;
}

.naat-tab-btn.active {
    background: white;
    color: #047857;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.naat-tab-btn[data-tab="roman"] {
    font-family: 'Inter', 'Outfit', sans-serif;
    direction: ltr;
}

/* Tab Panel Container */
.naat-tabs-content {
    position: relative;
    min-height: 200px;
}

/* Tab Panel */
.naat-tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.naat-tab-panel.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Tazmeen Block Styling
   ========================================================================== */

.tazmeen-block {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    position: relative;
}

.tazmeen-block::before {
    content: attr(data-band);
    position: absolute;
    top: 0;
    right: 0;
    background: #3b82f6;
    color: white;
    font-size: 0.65rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0 1rem 0 0.5rem;
    font-weight: 600;
}

/* ==========================================================================
   Sharh (Explanation) Styling
   ========================================================================== */

.sharh-block {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.sharh-explanation {
    font-family: 'NaatFont', serif;
    font-size: 1rem;
    line-height: 2;
    color: #475569;
    text-align: justify;
}

/* ==========================================================================
   Roman Content Styling - Now handled by NaatPoetryEngine (.na-roman)
   Legacy classes removed. Engine provides unified styling.
   ========================================================================== */


/* Mobile Tab Nav Adjustments */
@media (max-width: 768px) {
    .naat-tabs-nav {
        padding: 0.375rem;
        margin-bottom: 1rem;
    }

    .naat-tab-btn {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Dictionary Word Highlight (Enhanced)
   ========================================================================== */

.dict-word {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #10b981;
    text-underline-offset: 6px;
    cursor: help;
    transition: all 0.2s ease;
    padding: 0 0.1em;
    border-radius: 3px;
}

.dict-word:hover {
    background-color: rgba(16, 185, 129, 0.12);
    text-decoration-color: #059669;
}

/* ==========================================================================
   Font Size Controls
   ========================================================================== */

.font-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}

.font-controls button {
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.font-controls button:hover {
    background: white;
    color: #047857;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Mobile Bottom Navigation Enhancement
   ========================================================================== */

.mobile-tab-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-tab-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        background: white;
        border-top: 1px solid #e2e8f0;
        padding: 0.5rem 0.25rem;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
        gap: 0.25rem;
    }

    .mobile-tab-nav .mobile-tab-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.5rem 0.25rem;
        background: none;
        border: none;
        color: #64748b;
        font-size: 0.6rem;
        font-weight: 600;
        cursor: pointer;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
        font-family: 'NaatFont', serif;
    }

    .mobile-tab-nav .mobile-tab-btn i {
        font-size: 1.25rem;
    }

    .mobile-tab-nav .mobile-tab-btn.active {
        color: #047857;
        background: #ecfdf5;
    }

    .mobile-tab-nav .mobile-tab-btn:hover {
        color: #059669;
    }
}

/* ==========================================================================
   PREMIUM ANIMATIONS & EFFECTS
   ========================================================================== */

/* Entrance Animations */
@keyframes premiumFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes premiumSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes premiumGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    }
}

@keyframes premiumFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Animation Utility Classes */
.animate-premium-fade {
    animation: premiumFadeIn 0.6s var(--ease-out-back) forwards;
}

.animate-premium-slide {
    animation: premiumSlideUp 0.7s var(--ease-out-back) forwards;
}

.animate-glow {
    animation: premiumGlow 3s ease-in-out infinite;
}

.animate-float {
    animation: premiumFloat 4s ease-in-out infinite;
}

/* Staggered Entrance */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* ==========================================================================
   PREMIUM HOVER EFFECTS
   ========================================================================== */

/* Lift Effect */
.hover-lift {
    transition: transform 0.3s var(--ease-out-back), box-shadow 0.3s var(--ease-smooth);
}

.hover-lift:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* Scale Effect */
.hover-scale {
    transition: transform 0.3s var(--ease-out-back);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Glow Effect */
.hover-glow {
    transition: box-shadow 0.3s var(--ease-smooth);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   PREMIUM BUTTON STYLES
   ========================================================================== */

.btn-premium {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-float);
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s var(--ease-smooth);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-premium:active {
    transform: translateY(0);
}

/* ==========================================================================
   PREMIUM SECTION DIVIDER
   ========================================================================== */

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--clr-primary-light), transparent);
}

.section-divider-icon {
    color: var(--clr-accent);
    font-size: 1.25rem;
}

/* ==========================================================================
   PREMIUM SCROLLBAR
   ========================================================================== */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--clr-primary-light), var(--clr-primary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--clr-primary);
}

/* ==========================================================================
   PREMIUM FOCUS STATES
   ========================================================================== */

/* Accessible Focus Outline */
:focus-visible {
    outline: 2px solid var(--clr-primary-light);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Input Focus Enhancement */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    border-color: var(--clr-primary-light) !important;
}

/* ==========================================================================
   PREMIUM SELECTION
   ========================================================================== */

::selection {
    background: rgba(16, 185, 129, 0.2);
    color: var(--clr-primary-dark);
}

/* ==========================================================================
   eBook Reader System - Scholarly-Grade Digital Book Styles
   ========================================================================== */

/* eBook Reading Area */
.ebook-reading-area {
    --ebook-font-size: 1.2rem;
    --ebook-line-height: 2.4;
}

.ebook-reading-area .ebook-prose {
    font-family: 'NaatFont', serif;
    font-size: var(--ebook-font-size);
    line-height: var(--ebook-line-height);
    color: var(--clr-text);
    direction: rtl;
    text-align: right;
}

.ebook-reading-area .ebook-prose p {
    margin-bottom: 1.5em;
}

/* eBook Headings */
.ebook-reading-area .ebook-h1 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--clr-primary);
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #d1fae5;
}

.ebook-reading-area .ebook-h2 {
    font-size: 1.4em;
    font-weight: 600;
    color: #0f766e;
    margin: 1.5rem 0 1rem;
    padding-right: 1rem;
    border-right: 4px solid var(--clr-primary-light);
}

/* Chapter Dividers - Islamic Geometric */
.ebook-chapter-divider {
    height: 80px;
    margin: 3rem 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.4;
}

/* TOC Sidebar Styles */
.ebook-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ebook-toc-h1 {
    margin-bottom: 0.5rem;
}

.ebook-toc-h1>.ebook-toc-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--clr-text);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-smooth);
    text-decoration: none;
}

.ebook-toc-h1>.ebook-toc-link:hover,
.ebook-toc-h1>.ebook-toc-link.active {
    background: #ecfdf5;
    color: var(--clr-primary);
}

.ebook-toc-children {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
}

.ebook-toc-h2>.ebook-toc-link {
    display: block;
    padding: 0.375rem 0.75rem;
    color: var(--clr-text-muted);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-smooth);
    text-decoration: none;
}

.ebook-toc-h2>.ebook-toc-link:hover,
.ebook-toc-h2>.ebook-toc-link.active {
    background: #f0fdf4;
    color: #059669;
}

/* eBook Progress Bar */
#ebook-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 3px;
    background: rgba(226, 232, 240, 0.5);
}

#ebook-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.15s ease-out;
}

/* Admin bar adjustment */
body.admin-bar #ebook-progress-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #ebook-progress-bar {
        top: 46px;
    }
}

/* Mobile eBook Adjustments */
@media (max-width: 768px) {
    .ebook-reading-area {
        --ebook-font-size: 1.05rem;
        --ebook-line-height: 2.2;
    }

    .ebook-reading-area .ebook-h1 {
        font-size: 1.5em;
    }

    .ebook-reading-area .ebook-h2 {
        font-size: 1.25em;
    }

    .ebook-chapter-divider {
        height: 50px;
        margin: 2rem 0;
    }
}