* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    overflow-y: auto !important;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero {
        animation: none;
    }
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
    font-size: 0.9rem;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Reading Progress Indicator */
.reading-progress {
    position: fixed;
    top: 0;
    right: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(61, 40, 23, 0.25);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(61, 40, 23, 0.35);
    border-color: rgba(255, 255, 255, 0.4);
}

.back-to-top:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

:root {
    --primary-color: #3d2817;
    --secondary-color: #8b6f47;
    --accent-color: #5d4037;
    --text-color: #2c1810;
    --bg-light: #f5f1eb;
    --bg-white: #faf8f5;
    --border-color: #d4c4b0;
    --shadow: 0 1px 3px rgba(61, 40, 23, 0.08);
    --shadow-hover: 0 2px 6px rgba(61, 40, 23, 0.12);
}

body {
    font-family: 'Amiri', 'Cairo', serif;
    direction: rtl;
    text-align: right;
    color: var(--text-color);
    line-height: 1.9;
    background-color: var(--bg-white);
    font-size: 1.1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand-link {
    text-decoration: none;
    display: block;
    transition: opacity 0.2s ease;
}

.nav-brand-link:hover,
.nav-brand-link:focus {
    opacity: 0.8;
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.nav-brand h1 {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: 0.08em;
    word-spacing: 0.2em;
    line-height: 1.8;
    text-transform: none;
    font-variant: normal;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 4px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--primary-color);
    opacity: 1;
    outline: none;
}

/* Nav Actions */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    opacity: 0.7;
    transition: all 0.2s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.theme-toggle:hover,
.theme-toggle:focus,
.theme-toggle:active {
    opacity: 1;
    background-color: var(--bg-light);
    outline: none;
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    color: var(--text-color);
    padding: 5rem 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30L30 0z' fill='none' stroke='%238b6f47' stroke-width='0.5' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

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

/* Decorative ornament */
.hero-ornament {
    margin: 2rem auto 0;
    width: 200px;
    height: 30px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 15 Q25 0 50 15 T100 15 T150 15 T200 15' fill='none' stroke='%238b6f47' stroke-width='1.5' opacity='0.6'/%3E%3Ccircle cx='100' cy='15' r='4' fill='%238b6f47' opacity='0.6'/%3E%3Ccircle cx='50' cy='15' r='2' fill='%238b6f47' opacity='0.4'/%3E%3Ccircle cx='150' cy='15' r='2' fill='%238b6f47' opacity='0.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    animation: floatOrnament 3s ease-in-out infinite;
}

@keyframes floatOrnament {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

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

/* Scroll Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for grid items */
.fade-in-item:nth-child(1) { transition-delay: 0.1s; }
.fade-in-item:nth-child(2) { transition-delay: 0.2s; }
.fade-in-item:nth-child(3) { transition-delay: 0.3s; }
.fade-in-item:nth-child(4) { transition-delay: 0.4s; }
.fade-in-item:nth-child(5) { transition-delay: 0.5s; }
.fade-in-item:nth-child(6) { transition-delay: 0.6s; }

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Amiri', serif;
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    letter-spacing: 0.1em;
    word-spacing: 0.25em;
    overflow: hidden;
    white-space: nowrap;
    border-left: 3px solid var(--primary-color);
    animation: typewriter 3s steps(30) 0.5s forwards, blink 0.8s step-end infinite;
    width: 0;
    margin-left: auto;
    margin-right: auto;
}

@keyframes typewriter {
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.15rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: 0 4px 14px rgba(93, 64, 55, 0.3);
}

.cta-button:hover,
.cta-button:focus {
    background-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(93, 64, 55, 0.4);
    outline: none;
}

/* Section Dividers */
.section-divider {
    width: 100%;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20 Q300 0 600 20 T1200 20' fill='none' stroke='%238b6f47' stroke-width='1' opacity='0.3'/%3E%3Ccircle cx='600' cy='20' r='4' fill='%238b6f47' opacity='0.4'/%3E%3Ccircle cx='300' cy='20' r='2' fill='%238b6f47' opacity='0.2'/%3E%3Ccircle cx='900' cy='20' r='2' fill='%238b6f47' opacity='0.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Section Titles */
.section-title {
    font-family: 'Amiri', serif;
    font-size: 2.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.1em;
    word-spacing: 0.25em;
    line-height: 1.8;
}

.current-reading-section .section-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.reading-badge {
    font-size: 1rem;
    font-weight: 400;
    color: var(--secondary-color);
    opacity: 0.8;
    font-style: italic;
    display: block;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Rules Section */
.rules-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
    scroll-margin-top: 100px;
}

.rule-item {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.rule-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rule-content {
    display: flex;
    flex-direction: column;
}

.rule-content h3 {
    font-family: 'Aref Ruqaa', 'Amiri', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
    letter-spacing: 0.05em;
    word-spacing: 0.15em;
    line-height: 1.7;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.rule-number {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

.rule-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 700px;
}

.rule-content p strong {
    font-weight: 700;
    color: var(--primary-color);
}

.rule-content p u {
    text-decoration: underline;
    text-decoration-color: var(--secondary-color);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 0.1em;
}

.hero-description strong {
    font-weight: 700;
    color: var(--primary-color);
}

.hero-description u {
    text-decoration: underline;
    text-decoration-color: var(--secondary-color);
    text-underline-offset: 0.2em;
    text-decoration-thickness: 0.1em;
}

.section-subtitle strong {
    font-weight: 700;
    color: var(--primary-color);
}

/* How It Works Section */
.how-it-works-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.timeline {
    display: flex;
    justify-content: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '←';
    position: absolute;
    left: -1.5rem;
    top: 2rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
    opacity: 0.5;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(93, 64, 55, 0.4);
}

.timeline-content h3 {
    font-family: 'Aref Ruqaa', 'Amiri', serif;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.timeline-content p {
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .timeline {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
    }

    .timeline-item:not(:last-child)::after {
        content: '↓';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
        bottom: -2rem;
    }

    .timeline-item {
        max-width: 100%;
    }
}

[data-theme="dark"] .how-it-works-section {
    background-color: var(--bg-light);
}

/* Join Section */
.join-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Form Container */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    min-height: 700px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.form-container iframe {
    width: 100%;
    height: 700px;
    border: none;
}

/* Join Section */
.join-section {
    scroll-margin-top: 100px;
    scroll-behavior: smooth;
    position: relative;
}

.join-section:focus {
    outline: none;
}

.join-section:focus-within {
    outline: none;
}

/* Ensure page remains scrollable even when iframe has focus */
body {
    overflow-x: hidden;
    overflow-y: auto !important;
}

html {
    overflow-y: auto !important;
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .reading-progress,
    .skip-link,
    .form-container,
    .cta-button,
    .mobile-menu-toggle,
    .theme-toggle {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .section-title {
        page-break-after: avoid;
    }
    
    .rule-item {
        page-break-inside: avoid;
    }
}

/* Current Reading Section */
.current-reading-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
    scroll-margin-top: 100px;
}

.current-reading-section .books-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
}

/* Books Section */
.books-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
    scroll-margin-top: 100px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.book-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.book-cover {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1),
        4px 0 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.book-card:hover::before {
    left: 150%;
}

.book-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(41, 128, 85, 0.08);
    border-color: var(--primary-color);
}

.book-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    transition: all 0.3s ease;
    will-change: transform;
}

.book-card {
    transition: all 0.3s ease;
}

.book-card.featured {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    flex-direction: column;
    text-align: center;
}

.book-card.featured .book-cover {
    width: 120px;
    height: 180px;
    margin-bottom: 1rem;
}

.book-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    text-align: right;
    gap: 0.3rem;
}

.book-card.featured .book-info {
    text-align: center;
}

.book-title {
    font-family: 'Aref Ruqaa', 'Amiri', serif;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--primary-color);
    line-height: 1.7;
    letter-spacing: 0.05em;
    word-spacing: 0.15em;
    flex-grow: 1;
}

.book-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.2s ease;
    display: block;
}

.book-title a:hover,
.book-title a:focus {
    opacity: 0.6;
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.book-author {
    font-size: 1.05rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-top: auto;
    font-style: italic;
    margin-bottom: 0;
}

/* Book Category Badge */
.book-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.book-card.featured .book-info {
    align-items: center;
}

.book-category {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--bg-white);
    background-color: var(--secondary-color);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    margin-top: 0.4rem;
    font-family: 'Amiri', serif;
    white-space: nowrap;
}

/* Book Cover Hover Effect */
.book-cover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover .book-cover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Discussions Section */
.discussions-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
    scroll-margin-top: 100px;
}

.discussion-featured {
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Lazy Video Loading */
.video-lazy {
    cursor: pointer;
    background-color: #000;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.video-lazy:hover .video-thumbnail {
    opacity: 0.8;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 70px;
    height: 70px;
    background-color: rgba(255, 0, 0, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(255, 0, 0, 1);
}

.play-icon {
    color: white;
    font-size: 1.8rem;
    margin-right: -3px;
}

.video-title {
    margin-top: 1rem;
    font-family: 'Aref Ruqaa', 'Amiri', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.discussions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.discussion-item {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.discussion-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.discussion-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
}

.discussion-link:hover,
.discussion-link:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.discussion-icon {
    font-size: 1.5rem;
    color: #c4302b;
}

.discussion-title {
    font-family: 'Aref Ruqaa', 'Amiri', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

[data-theme="dark"] .discussions-section {
    background-color: var(--bg-white);
}

[data-theme="dark"] .discussion-item {
    background-color: var(--bg-light);
    border-color: var(--border-color);
}

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

    .discussion-link {
        padding: 1.5rem;
    }

    .discussion-title {
        font-size: 1.1rem;
    }
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand h3 {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    color: var(--bg-white);
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--bg-white);
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    width: 100%;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .footer-links {
        gap: 1rem;
    }
}

/* Dark Mode */
[data-theme="dark"] {
    --primary-color: #e8d5c4;
    --secondary-color: #c9a86c;
    --accent-color: #b8956c;
    --text-color: #f5f1eb;
    --bg-light: #1a1410;
    --bg-white: #252018;
    --bg-color: #1e1914;
    --card-background: #2d261f;
    --border-color: #4a3d32;
}

[data-theme="dark"] body {
    background-color: var(--bg-color);
}

[data-theme="dark"] .navbar,
[data-theme="dark"] .hero,
[data-theme="dark"] .rules-section,
[data-theme="dark"] .current-reading-section {
    background-color: var(--bg-white);
}

[data-theme="dark"] .navbar.scrolled {
    background-color: rgba(37, 32, 24, 0.95);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .join-section,
[data-theme="dark"] .books-section,
[data-theme="dark"] .footer {
    background-color: var(--bg-light);
}

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

[data-theme="dark"] .book-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .form-container {
    border-color: var(--border-color);
}

[data-theme="dark"] .section-title {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="dark"] .faq-item {
    background-color: var(--card-background);
}

[data-theme="dark"] .faq-question:hover {
    background: rgba(201, 168, 108, 0.1);
}

[data-theme="dark"] .benefit-item {
    background-color: var(--card-background);
}

[data-theme="dark"] .rule-item {
    background-color: var(--card-background);
}

[data-theme="dark"] .cta-button {
    background-color: var(--secondary-color);
    color: #1a1410;
}

[data-theme="dark"] .cta-button:hover {
    background-color: var(--primary-color);
}

[data-theme="dark"] .back-to-top {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

[data-theme="dark"] .testimonials-section {
    background-color: var(--bg-light);
}

/* Responsive Design */
@media (max-width: 900px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        left: 1.5rem;
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
        border-radius: 10px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .theme-toggle {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }
    
    .books-section .section-title {
        display: block;
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background-color: rgba(250, 248, 245, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        padding: 2rem 0;
        border-left: 1px solid var(--border-color);
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        width: 100%;
    }
    
    .nav-menu a:hover,
    .nav-menu a:focus {
        background-color: var(--bg-light);
        outline: none;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-description {
        font-size: 1.15rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .rule-content {
        text-align: right;
    }
    
    .rule-content h3 {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.5rem;
        line-height: 1.5;
        flex-wrap: wrap;
    }
    
    .rule-number {
        margin-left: 0;
        margin-right: 0.5rem;
        flex-shrink: 0;
        min-width: auto;
    }

    .form-container {
        min-height: 600px;
        border-radius: 0;
    }

    .form-container iframe {
        height: 600px;
    }

    .books-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .book-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 1rem;
    }

    .book-cover {
        width: 60px;
        height: 90px;
    }

    .book-card.featured {
        width: 100%;
        max-width: 100%;
        padding: 1.5rem;
    }

    .book-card.featured .book-cover {
        width: 100px;
        height: 150px;
    }

    .book-title {
        font-size: 1.2rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.4;
    }

    .book-author {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }

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

    .section-title {
        font-size: 1.5rem;
    }

    .rule-content h3 {
        font-size: 1.25rem;
        line-height: 1.6;
    }

    .rule-content p {
        font-size: 1.1rem;
    }
}

/* Section Header */
.section-header {
    margin-bottom: 2rem;
}





/* Reading Status Styling */
.reading-status {
    margin-top: 1rem;
    text-align: center;
}

.reading-month {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--font-cairo);
    font-weight: 500;
    opacity: 0.8;
}

/* Mobile adjustments for reading status */
@media (max-width: 768px) {
    .reading-month {
        font-size: 0.8rem;
    }
    
    .book-card.featured {
        min-height: 200px;
        height: auto;
        padding: 2rem 1.5rem;
    }
    
    .book-title {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    
    .book-author {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
        line-height: 1.3;
    }
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    text-align: center;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(61, 40, 23, 0.12);
    border-color: var(--primary-color);
    background-color: var(--bg-white);
}

.faq-item h3 {
    font-family: var(--font-cairo);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .faq-item {
        padding: 1.5rem;
    }

    .faq-item h3 {
        font-size: 1.1rem;
    }

    .faq-item p {
        font-size: 0.95rem;
    }
}

/* Hero Quote Styling */
.hero-quote {
    margin-top: 2.5rem;
    padding: 2rem;
    text-align: center;
}

.hero-quote blockquote {
    position: relative;
    border-right: 3px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 0;
    border-radius: 0 6px 6px 0;
}

.hero-quote blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: var(--font-cairo);
}

.hero-quote p {
    font-family: var(--font-cairo);
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.hero-quote cite {
    display: block;
    margin-top: 1rem;
    font-family: 'Aref Ruqaa', 'Amiri', serif;
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 400;
    font-style: italic;
}

@media (max-width: 768px) {
    .hero-quote {
        margin-top: 2rem;
        padding: 1.5rem 1rem;
    }
    
    .hero-quote blockquote {
        padding: 1rem 1.5rem;
    }
    
    .hero-quote p {
        font-size: 1.05rem;
    }
    
    .hero-quote cite {
        font-size: 0.9rem;
    }
}

/* Weekly Reading Section */
.weekly-reading-section {
    padding: 4rem 0;
    background-color: var(--bg-white);
}

.weekly-reading-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--card-background);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.weekly-reading-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(61, 40, 23, 0.1);
    border-color: var(--primary-color);
}

.weekly-reading-card h3 {
    font-family: var(--font-amiri);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.weekly-author {
    font-family: var(--font-cairo);
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.weekly-description {
    font-family: var(--font-amiri);
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .weekly-reading-card {
        padding: 2rem 1.5rem;
    }

    .weekly-reading-card h3 {
        font-size: 1.6rem;
    }

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

[data-theme="dark"] .weekly-reading-section {
    background-color: var(--bg-white);
}

[data-theme="dark"] .weekly-reading-card {
    background: var(--card-background);
}

/* Benefits Section */
.benefits-section {
    padding: 4rem 0;
    background-color: var(--bg-light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.benefit-item {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.benefit-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(41, 128, 85, 0.03), transparent);
    transition: left 0.6s ease;
}

.benefit-item:hover::before {
    left: 100%;
}

.benefit-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(61, 40, 23, 0.15);
    border-color: var(--primary-color);
}

.benefit-item h3 {
    font-family: var(--font-cairo);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.benefit-item p {
    color: var(--text-color);
    line-height: 1.7;
    font-size: 1rem;
    font-family: var(--font-cairo);
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .benefit-item {
        padding: 1.5rem;
    }
    
    .benefit-item h3 {
        font-size: 1.1rem;
    }
    
    .benefit-item p {
        font-size: 0.95rem;
    }
}

/* Testimonials Section */
.testimonials-section {
    padding: 3rem 0;
    background-color: var(--bg-light);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5L35 20H50L38 30L43 45L30 35L17 45L22 30L10 20H25L30 5Z' fill='%238b6f47' fill-opacity='0.03'/%3E%3C/svg%3E");
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 850px;
    margin: 0 auto;
    align-items: stretch;
}

.testimonial-card {
    background: #f9f6f2;
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 10px;
    border: none;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 6px 20px rgba(61, 40, 23, 0.1);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .testimonial-card {
    background: #2a2520;
}

.testimonial-card::before {
    content: '❝';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.3;
    line-height: 1;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(61, 40, 23, 0.15);
    border-top-color: var(--secondary-color);
}

.testimonial-content {
    margin-bottom: 1rem;
    flex: 1;
}

.testimonial-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-color);
    font-family: var(--font-amiri);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-amiri);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-cairo);
}

.author-role {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

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

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-content p {
        font-size: 0.95rem;
    }

    .testimonial-author::before {
        width: 40px;
        height: 40px;
    }
}

/* Quick Stats Styling */
.quick-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(41, 128, 85, 0.1);
}

.stat-item.limited-offer {
    position: relative;
    animation: pulse-attention 2s ease-in-out infinite;
}

.stat-item.limited-offer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(231, 76, 60, 0.15);
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
    z-index: -1;
}

.stat-item.limited-offer .stat-number {
    background: linear-gradient(45deg, var(--primary-color), #e74c3c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.stat-item.limited-offer .stat-label {
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.85rem;
}

@keyframes pulse-attention {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.8; }
}

.stat-item {
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    opacity: 1;
}

.stat-number {
    display: block;
    font-family: var(--font-cairo);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

.stat-label {
    display: block;
    font-family: var(--font-cairo);
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Mobile adjustments for quick stats */
@media (max-width: 768px) {
    .quick-stats {
        gap: 1rem;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}
