/* ===================================
   دار نشر الصحراء الكبرى - Stylesheet
   Sahara Desert Publishing
   Classic Heritage Design
   =================================== */

/* CSS Variables - Earthy Color Palette */
:root {
    /* Primary Colors - Light Mode */
    --sand-beige: #E8D5B7;
    --sand-light: #F5EDE0;
    --sand-cream: #FDF8F0;
    --gold: #C9A962;
    --gold-dark: #997D3D;
    --gold-light: #DFC070;

    /* Text Colors */
    --charcoal: #333333;
    --brown-dark: #4A3728;
    --brown-medium: #6B5344;
    --brown-light: #8B7355;

    /* Accent Colors */
    --sahara-orange: #D4A574;
    --desert-red: #A0522D;

    /* Neutral */
    --white: #FFFFFF;
    --off-white: #FAFAFA;

    /* Typography */
    --font-arabic: 'Amiri', 'Traditional Arabic', serif;
    --font-body: 'Tajawal', 'Arial', sans-serif;

    /* Spacing */
    --section-padding: 100px 0;
    --container-width: 1200px;

    /* Transitions */
    --transition-smooth: all 0.3s ease;
    --transition-slow: all 0.5s ease;

    /* Dynamic Theme Colors */
    --bg-primary: var(--sand-cream);
    --bg-secondary: var(--white);
    --bg-accent: var(--sand-light);
    --text-primary: var(--brown-dark);
    --text-secondary: var(--brown-medium);
    --card-bg: var(--white);
    --navbar-bg: rgba(253, 248, 240, 0.95);
}

/* Dark Mode - Desert Night Theme */
[data-theme="dark"] {
    --bg-primary: #0a0f1a;
    --bg-secondary: #111827;
    --bg-accent: #1a2332;
    --text-primary: #f5ede0;
    --text-secondary: #c9a962;
    --card-bg: #1a2332;
    --navbar-bg: rgba(10, 15, 26, 0.95);
    --sand-cream: #0a0f1a;
    --sand-light: #111827;
    --sand-beige: #1a2332;
    --white: #111827;
    --charcoal: #f5ede0;
    --brown-dark: #f5ede0;
    --brown-medium: #d4a574;
    --brown-light: #c9a962;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--sand-cream);
    color: var(--charcoal);
    line-height: 1.8;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-arabic);
    font-weight: 700;
    color: var(--brown-dark);
    line-height: 1.4;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Section Styles */
.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    position: relative;
}

.section-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.section-title {
    font-size: 2.75rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--brown-dark), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--brown-medium);
    max-width: 600px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* =====================
   Navigation
   ===================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 248, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 169, 98, 0.2);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo img {
    height: 60px;
    width: auto;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(74, 55, 40, 0.15);
    transition: var(--transition-smooth);
}

.nav-logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--brown-dark);
    padding: 8px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    transition: var(--transition-smooth);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--gold-dark);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--brown-dark);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* =====================
   Hero Section
   ===================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--sand-cream) 0%, var(--sand-beige) 50%, var(--sand-light) 100%);
    overflow: hidden;
    padding-top: 100px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 169, 98, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 165, 116, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="sand" patternUnits="userSpaceOnUse" width="50" height="50"><circle cx="25" cy="25" r="1" fill="rgba(201,169,98,0.1)"/></pattern></defs><rect fill="url(%23sand)" width="100" height="100"/></svg>');
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    margin-bottom: 30px;
}

.hero-logo img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow:
        0 20px 60px rgba(74, 55, 40, 0.25),
        0 0 0 4px var(--gold),
        0 0 0 8px rgba(201, 169, 98, 0.3);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 16px;
    color: var(--brown-dark);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animated Title - Al Jazeera Style */
.animated-title {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    perspective: 1000px;
}

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    animation: wordReveal 0.6s ease forwards;
    animation-delay: var(--delay, 0s);
}

.title-space {
    width: 0.3em;
}

/* Hide old letter-based animation elements */
.title-letter {
    display: none !important;
}

@keyframes wordReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
        filter: blur(5px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0px);
    }
}

/* Continuous floating animation after reveal */
.title-word.revealed {
    opacity: 1;
    animation: wordFloat 4s ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
}

@keyframes wordFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Hover effect on words */
.title-word:hover {
    color: var(--gold);
    cursor: default;
    transform: scale(1.05);
    transition: transform 0.3s ease, color 0.3s ease;
}

.hero-tagline {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--gold-dark);
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--brown-medium);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.hero-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(201, 169, 98, 0.4);
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.hero-btn.btn-outline {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold-dark);
    box-shadow: none;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(201, 169, 98, 0.5);
}

.hero-btn.btn-outline:hover {
    background: var(--gold);
    color: var(--white);
}

.hero-scroll {
    margin-top: 60px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-self: center;
    /* Force centering within flex parent */
    justify-content: center;
    animation: bounce 2s ease-in-out infinite;
}

.hero-scroll span {
    display: block;
    font-size: 0.875rem;
    color: var(--brown-light);
    margin-bottom: 8px;
    text-align: center;
    /* Force center alignment */
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    margin: 0 auto;
    border-left: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    transform: rotate(-45deg);
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(10px);
    }
}

/* =====================
   About Section
   ===================== */
.about {
    padding: var(--section-padding);
    background: var(--white);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sand-beige), var(--gold), var(--sand-beige));
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text {
    padding-left: 20px;
}

.about-description {
    font-size: 1.1rem;
    color: var(--brown-medium);
    margin-bottom: 20px;
    text-align: justify;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(201, 169, 98, 0.3);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-arabic);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--brown-light);
    margin-top: 8px;
    display: block;
}

.about-map {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(74, 55, 40, 0.15);
}

.about-map img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.about-map:hover img {
    transform: scale(1.02);
}

.map-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(74, 55, 40, 0.9), transparent);
    color: var(--white);
    text-align: center;
}

.map-caption p {
    font-size: 1rem;
    font-weight: 500;
}

/* =====================
   Publications Section
   ===================== */
.publications {
    padding: var(--section-padding);
    background: linear-gradient(180deg, var(--sand-cream) 0%, var(--sand-light) 100%);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.book-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(74, 55, 40, 0.1);
    transition: var(--transition-smooth);
    border: 1px solid rgba(201, 169, 98, 0.1);
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(74, 55, 40, 0.15);
}

.book-cover {
    height: 220px;
    background: linear-gradient(135deg, var(--sand-beige), var(--sand-light));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: var(--transition-slow);
}

.book-card:hover .book-cover::before {
    transform: translateX(100%);
}

.book-placeholder {
    width: 120px;
    height: 160px;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        4px 4px 20px rgba(74, 55, 40, 0.2),
        -2px -2px 10px rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(201, 169, 98, 0.2);
}

.book-icon {
    font-size: 3rem;
}

.book-info {
    padding: 24px;
    text-align: center;
}

.book-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--brown-dark);
}

.book-author {
    font-size: 0.95rem;
    color: var(--brown-light);
    margin-bottom: 12px;
}

.book-category {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1), rgba(201, 169, 98, 0.2));
    color: var(--gold-dark);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 20px;
}

.publications-cta {
    text-align: center;
    margin-top: 50px;
}

.btn-secondary {
    display: inline-block;
    padding: 14px 36px;
    border: 2px solid var(--gold);
    color: var(--gold-dark);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    background: transparent;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: var(--gold);
    color: var(--white);
}

/* Books Grid - 2 Column Layout */
.books-grid-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
    margin: 0 auto;
}

/* Book Cover Image */
.book-cover {
    height: 360px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sand-beige), var(--sand-light));
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.05);
}

/* Coming Soon Badge */
.book-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: var(--font-body);
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
    z-index: 2;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6); }
}

/* Book Translator */
.book-translator {
    font-size: 0.85rem;
    color: var(--gold-dark);
    margin-bottom: 12px;
    font-style: italic;
}

/* Publications Announcement */
.publications-announcement {
    margin-top: 50px;
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1), rgba(201, 169, 98, 0.05));
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.announcement-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.publications-announcement p {
    font-size: 1.05rem;
    color: var(--brown-medium);
    line-height: 1.8;
    text-align: right;
}

/* Dark mode book badge */
[data-theme="dark"] .book-badge {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

[data-theme="dark"] .publications-announcement {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.08), rgba(201, 169, 98, 0.03));
    border-color: rgba(201, 169, 98, 0.2);
}

@media (max-width: 768px) {
    .books-grid-2 {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .book-cover {
        height: 300px;
    }

    .publications-announcement {
        flex-direction: column;
        padding: 20px;
        gap: 12px;
    }

    .publications-announcement p {
        text-align: center;
    }
}


/* =====================
   Studies Center Section
   ===================== */
.studies-center {
    padding: var(--section-padding);
    background: var(--bg-primary);
    position: relative;
}

.studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.study-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(74, 55, 40, 0.05);
    border: 1px solid rgba(201, 169, 98, 0.1);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    opacity: 0;
    transition: var(--transition-smooth);
}

.study-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(74, 55, 40, 0.1);
    border-color: var(--gold-light);
}

.study-card:hover::before {
    opacity: 1;
}

.study-icon {
    font-size: 3rem;
    margin-bottom: 24px;
    display: inline-block;
}

.study-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.study-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* =====================
   Scientific Forum Section
   ===================== */
.scientific-forum {
    padding: var(--section-padding);
    background: var(--bg-accent);
    overflow: hidden;
}

.forum-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.forum-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.forum-decoration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.decoration-circle {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--sahara-orange));
    opacity: 0.1;
    animation: pulse 4s ease-in-out infinite;
}

.decoration-icon {
    position: absolute;
    font-size: 8rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    animation: float 5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.15;
    }
}

@media (max-width: 968px) {
    .forum-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .decoration-circle {
        width: 200px;
        height: 200px;
    }

    .decoration-icon {
        font-size: 5rem;
    }
}

/* =====================
   Footer
   ===================== */
.footer {
    background: linear-gradient(135deg, var(--brown-dark) 0%, #3D2E24 100%);
    color: var(--sand-light);
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(232, 213, 183, 0.2);
}

.footer-brand {
    text-align: right;
}

.footer-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.footer-brand h3 {
    font-family: var(--font-arabic);
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.footer-brand p {
    color: rgba(232, 213, 183, 0.7);
    font-size: 0.95rem;
}

.footer-contact h4,
.footer-links h4 {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 24px;
    font-weight: 600;
}

.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: var(--gold-light);
    flex-shrink: 0;
}

.contact-list a:hover {
    color: var(--gold);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(232, 213, 183, 0.8);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--gold);
    padding-right: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    font-size: 0.875rem;
    color: rgba(232, 213, 183, 0.5);
}

/* =====================
   Responsive Design
   ===================== */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.25rem;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-text {
        padding-left: 0;
        order: 2;
    }

    .about-map {
        order: 1;
    }

    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--sand-cream);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid rgba(201, 169, 98, 0.2);
    }

    .nav-links a {
        display: block;
        padding: 16px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-logo img {
        width: 150px;
        height: 150px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .books-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand,
    .footer-contact,
    .footer-links {
        text-align: center;
    }

    .contact-list li {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .hero {
        min-height: 100dvh;
        /* Dynamic viewport height for mobile */
        padding-top: 120px;
        padding-bottom: 80px;
        height: auto;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        margin-bottom: 30px;
    }

    .hero-btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
    }

    /* Adjust Discover More position on mobile */
    .hero-scroll {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* =====================
   Language Switcher
   ===================== */
.language-switcher {
    position: relative;
    z-index: 1001;
    margin-right: 20px;
}

[dir="ltr"] .language-switcher {
    margin-right: 0;
    margin-left: 20px;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--brown-dark);
    box-shadow: 0 4px 20px rgba(74, 55, 40, 0.15);
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.lang-toggle:hover {
    background: var(--white);
    box-shadow: 0 6px 25px rgba(74, 55, 40, 0.2);
    transform: translateY(-2px);
}

.lang-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--gold-dark);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(74, 55, 40, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: var(--transition-smooth);
    min-width: 180px;
    border: 1px solid rgba(201, 169, 98, 0.2);
}

[dir="ltr"] .lang-dropdown {
    left: auto;
    right: 0;
}

.language-switcher:hover .lang-dropdown,
.language-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--brown-dark);
    text-align: right;
    transition: var(--transition-smooth);
}

[dir="ltr"] .lang-option {
    text-align: left;
}

.lang-option:hover {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.1), rgba(201, 169, 98, 0.15));
}

.lang-option.active {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.2), rgba(201, 169, 98, 0.25));
    color: var(--gold-dark);
    font-weight: 600;
}

.lang-option.active::after {
    content: '✓';
    margin-right: auto;
    margin-left: 10px;
    color: var(--gold-dark);
}

[dir="ltr"] .lang-option.active::after {
    margin-right: 10px;
    margin-left: auto;
}

.lang-flag {
    font-size: 1.3rem;
    line-height: 1;
}

/* LTR specific adjustments */
[dir="ltr"] body {
    text-align: left;
}

[dir="ltr"] .section-label::after {
    right: auto;
    left: 0;
}

[dir="ltr"] .nav-links a::after {
    right: auto;
    left: 0;
}

[dir="ltr"] .footer-brand {
    text-align: left;
}

[dir="ltr"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 8px;
}

[dir="ltr"] .about-text {
    padding-left: 0;
    padding-right: 20px;
}

/* =====================
   Theme Toggle Button
   ===================== */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: rgba(201, 169, 98, 0.15);
    border: 2px solid var(--gold);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    margin-right: 15px;
}

[dir="ltr"] .theme-toggle {
    margin-right: 0;
    margin-left: 15px;
}

.theme-toggle:hover {
    background: var(--gold);
    transform: rotate(15deg) scale(1.1);
}

.theme-toggle:hover svg {
    stroke: var(--white);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    stroke: var(--gold-dark);
    transition: var(--transition-smooth);
}

.theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
    stroke: var(--gold-light);
}

[data-theme="dark"] .theme-toggle {
    background: rgba(201, 169, 98, 0.2);
    border-color: var(--gold-light);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--gold);
}

/* =====================
   Stars Container - Desert Night Sky
   ===================== */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
    /* High enough to be over sections, below Nav (1000) */
    opacity: 0;
    transition: opacity 0.5s ease;
    mix-blend-mode: screen;
}

[data-theme="dark"] .stars-container {
    opacity: 1;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.3);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Shooting Star Effect */
.shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(to right, #fff, transparent);
    border-radius: 50%;
    animation: shooting 3s ease-in-out infinite;
}

@keyframes shooting {
    0% {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateX(-300px) translateY(300px);
    }
}

/* Dark Mode Specific Styles */
[data-theme="dark"] .navbar {
    background: var(--navbar-bg);
    border-bottom-color: rgba(201, 169, 98, 0.3);
}

[data-theme="dark"] .hero {
    background: linear-gradient(180deg, #0a0f1a 0%, #111827 50%, #1a2332 100%);
}

[data-theme="dark"] .hero::before {
    background-image:
        radial-gradient(circle at 20% 80%, rgba(201, 169, 98, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 169, 98, 0.05) 0%, transparent 50%);
}

[data-theme="dark"] .about {
    background: var(--bg-secondary);
}

[data-theme="dark"] .about::before {
    background: linear-gradient(90deg, #1a2332, var(--gold-dark), #1a2332);
}

[data-theme="dark"] .publications {
    background: linear-gradient(180deg, #0a0f1a 0%, #111827 100%);
}

[data-theme="dark"] .book-card {
    background: var(--card-bg);
    border-color: rgba(201, 169, 98, 0.2);
}

[data-theme="dark"] .book-cover {
    background: linear-gradient(135deg, #1a2332, #0a0f1a);
}

[data-theme="dark"] .book-placeholder {
    background: #111827;
    border-color: rgba(201, 169, 98, 0.3);
}

/* Coming Soon Card Styles */
.coming-soon-card {
    text-align: center;
    padding: 60px 40px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(74, 55, 40, 0.1);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border: 1px dashed var(--gold);
}

.coming-soon-card .book-icon {
    font-size: 4rem;
    margin-bottom: 24px;
    display: inline-block;
}

[data-theme="dark"] .coming-soon-card {
    background: var(--card-bg);
    border-color: rgba(201, 169, 98, 0.3);
}

/* Footer Colors */
[data-theme="dark"] .footer {
    background: linear-gradient(135deg, #0a0f1a 0%, #111827 100%);
}

[data-theme="dark"] .footer-brand h3,
[data-theme="dark"] .footer-contact h4,
[data-theme="dark"] .footer-links h4 {
    color: var(--gold-light);
}

[data-theme="dark"] .footer-brand p,
[data-theme="dark"] .contact-list li,
[data-theme="dark"] .contact-list a,
[data-theme="dark"] .contact-list span,
[data-theme="dark"] .footer-links a {
    color: #f5ede0;
}

[data-theme="dark"] .footer-bottom p {
    color: rgba(245, 237, 224, 0.6);
}

[data-theme="dark"] .nav-links a {
    color: var(--text-primary);
}

[data-theme="dark"] .section-title {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .hero-title {
    color: var(--text-primary);
}

[data-theme="dark"] .about-stats {
    border-top-color: rgba(201, 169, 98, 0.3);
}

/* Dark Mode Language Switcher */
[data-theme="dark"] .lang-toggle {
    background: rgba(26, 35, 50, 0.95);
    border-color: rgba(201, 169, 98, 0.4);
    color: var(--text-primary);
}

[data-theme="dark"] .lang-dropdown {
    background: #1a2332;
    border-color: rgba(201, 169, 98, 0.3);
}

[data-theme="dark"] .lang-option {
    color: var(--text-primary);
}

[data-theme="dark"] .lang-option:hover {
    background: rgba(201, 169, 98, 0.15);
}

/* Print Styles */
@media print {

    .navbar,
    .hero-scroll,
    .nav-toggle,
    .theme-toggle,
    .stars-container {
        display: none;
    }

    body {
        background: white;
    }
}

/* Responsive Styles for Theme Toggle */
@media (max-width: 768px) {
    .theme-toggle {
        width: 38px;
        height: 38px;
        margin-right: 10px;
    }

    [dir="ltr"] .theme-toggle {
        margin-right: 0;
        margin-left: 10px;
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }
}

/* =====================
   Contact Section
   ===================== */
.contact-section {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: flex-start;
}

.main-contact-form {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(74, 55, 40, 0.1);
    border: 1px solid rgba(201, 169, 98, 0.1);
}

.contact-info-side {
    position: relative;
}

.contact-illustration {
    width: 350px;
    height: auto;
    opacity: 0.85;
    margin-top: 30px;
    display: block;
}

/* For RTL languages (Arabic) */
[dir="rtl"] .contact-illustration {
    margin-left: -50px;
    margin-right: 0;
}

/* For LTR languages */
[dir="ltr"] .contact-illustration {
    margin-right: -50px;
    margin-left: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 20px;
    background: var(--bg-accent);
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.1);
}

[data-theme="dark"] .main-contact-form {
    background: var(--card-bg);
}

@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* =====================
   Social Media Links
   ===================== */
.footer-social {
    text-align: center;
}

.footer-social h4 {
    color: var(--gold-light);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(201, 169, 98, 0.15);
    border: 2px solid rgba(201, 169, 98, 0.3);
    transition: var(--transition-smooth);
}

.social-link svg {
    width: 22px;
    height: 22px;
    fill: var(--gold);
    transition: var(--transition-smooth);
}

.social-link:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(201, 169, 98, 0.35);
}

.social-link.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-link.facebook:hover svg {
    fill: #fff;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #dc2743;
}

.social-link.instagram:hover svg {
    fill: #fff;
}

.social-link.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.social-link.twitter:hover svg {
    fill: #fff;
}

.social-link.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.social-link.youtube:hover svg {
    fill: #fff;
}

/* Dark Mode Social Links */
[data-theme="dark"] .social-link {
    background: rgba(201, 169, 98, 0.1);
    border-color: rgba(201, 169, 98, 0.3);
}

/* Responsive Social Links */
@media (max-width: 768px) {
    .social-link {
        width: 44px;
        height: 44px;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }
}

/* =====================
   News & Events Section
   ===================== */
.news-section {
    padding: var(--section-padding);
    background: var(--bg-secondary);
    position: relative;
}

.news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--sahara-orange), var(--gold));
}

.news-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(74, 55, 40, 0.1);
    border: 1px solid rgba(201, 169, 98, 0.15);
    transition: var(--transition-smooth);
}

.news-card.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.news-content {
    padding: 50px;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.15), rgba(212, 165, 116, 0.15));
    padding: 8px 20px;
    border-radius: 50px;
    margin-bottom: 24px;
    border: 1px solid rgba(201, 169, 98, 0.3);
}

.badge-icon {
    font-size: 1.2rem;
}

.news-badge span:last-child {
    color: var(--gold-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.news-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.5;
    background: linear-gradient(135deg, var(--brown-dark), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(201, 169, 98, 0.2);
}

.news-location,
.news-date {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.news-location svg,
.news-date svg {
    width: 18px;
    height: 18px;
    stroke: var(--gold);
}

.news-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 16px;
    text-align: justify;
}

.news-text.highlight {
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.08), rgba(212, 165, 116, 0.08));
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid var(--gold);
    margin-top: 20px;
    font-weight: 500;
}

.news-spacer {
    height: 60px;
    width: 100%;
}

/* News Gallery */
.news-gallery {
    background: linear-gradient(135deg, var(--sand-beige), var(--sand-light));
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gallery-main {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(74, 55, 40, 0.2);
    margin-bottom: 20px;
}

.gallery-main img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    transition: var(--transition-slow);
}

.paris-gallery .gallery-main {
    margin-bottom: 0;
}

.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.gallery-thumbnails .thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition-smooth);
    opacity: 0.7;
}

.gallery-thumbnails .thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}

.gallery-thumbnails .thumb.active {
    border-color: var(--gold);
    opacity: 1;
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.4);
}

/* Video in Gallery */
.gallery-main video {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    border-radius: 16px;
}

.thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--sahara-orange));
    color: var(--white);
}

.thumb-video .video-icon {
    font-size: 1.5rem;
}

.thumb-video:hover {
    background: linear-gradient(135deg, var(--gold-dark), var(--desert-red));
}

/* Dark Mode News Section */
[data-theme="dark"] .news-card {
    background: var(--card-bg);
    border-color: rgba(201, 169, 98, 0.2);
}

[data-theme="dark"] .news-title {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .news-gallery {
    background: linear-gradient(135deg, #1a2332, #111827);
}

/* Responsive News Section */
@media (max-width: 968px) {
    .news-card.featured {
        grid-template-columns: 1fr;
    }

    .news-content {
        padding: 35px;
    }

    .news-title {
        font-size: 1.5rem;
    }

    .gallery-main img {
        height: 280px;
    }

    .gallery-thumbnails .thumb {
        height: 65px;
    }
}

@media (max-width: 576px) {
    .news-content {
        padding: 25px;
    }

    .news-title {
        font-size: 1.3rem;
    }

    .news-meta {
        flex-direction: column;
        gap: 12px;
    }

    .gallery-main img {
        height: 220px;
    }

    .gallery-thumbnails {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .gallery-thumbnails .thumb {
        height: 55px;
    }
}