/* Base Styles */
:root {
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --light-text: #f5f5f5;
    --gold-accent: #d4af37;
    --bronze-accent: #cd7f32;
    --section-padding: 100px 0;
    --transition: all 0.3s ease;
    
    /* Responsive font sizes */
    --base-font-size: clamp(16px, 2.5vw, 18px);
    --small-font-size: clamp(14px, 2vw, 16px);
    --large-font-size: clamp(18px, 3vw, 22px);
    --heading-font-size: clamp(24px, 4vw, 32px);
    --hero-title-size: clamp(32px, 6vw, 56px);
    --hero-subtitle-size: clamp(18px, 3.5vw, 28px);
}

/* Page transition effects */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--dark-bg), var(--gold-accent));
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-transition.active {
    opacity: 1;
    visibility: visible;
}

.page-transition::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid var(--light-text);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(-45deg, #0a0a0a, #121212, #1a1a1a, #0f0f0f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: var(--base-font-size);
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Hologram effect for important elements */
.hologram {
    position: relative;
    background: linear-gradient(45deg, transparent 30%, rgba(212, 175, 55, 0.1) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: hologramScan 3s linear infinite;
}

.hologram::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
    animation: hologramSweep 2s linear infinite;
}

@keyframes hologramScan {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 200%;
    }
}

@keyframes hologramSweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}



h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.read-more-link {
    color: #FFD700;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #FFD700;
    border-radius: 25px;
    padding: 8px 16px;
    display: block;
    margin: 20px 0 12px auto;
    width: fit-content;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1));
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.read-more-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s ease;
}

.read-more-link:hover {
    color: var(--dark-bg);
    background: #FFD700;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.read-more-link:hover::before {
    left: 100%;
}

.read-more-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.email-link {
    color: var(--gold-accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.email-link:hover {
    color: var(--light-text);
    border-bottom-color: var(--gold-accent);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

ul {
    list-style: none;
}

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

section {
    padding: var(--section-padding);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

section.hero {
    opacity: 1;
    transform: translateY(0);
}

.section-underline {
    height: 3px;
    width: 60px;
    background: var(--gold-accent);
    margin: 15px 0 30px;
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

header.scrolled {
    padding: 6px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

header .container {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-accent);
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    margin-left: 1rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.6), 0 0 35px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.logo:hover {
    text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.7), 0 0 50px rgba(255, 215, 0, 0.5);
}

nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 3rem;
}

nav ul {
    display: flex;
    gap: 30px;
    align-items: center;
}

nav ul li a {
    font-size: var(--small-font-size);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

nav ul li a:hover {
    color: var(--gold-accent);
}

/* Language Selector Dropdown */
 .language-selector {
     position: relative;
     display: inline-block;
 }
 
 .current-language {
     background: rgba(10, 10, 10, 0.95);
     border: 1px solid rgba(212, 175, 55, 0.3);
     border-radius: 4px;
     padding: 8px 12px;
     color: var(--light-text);
     font-size: 12px;
     cursor: pointer;
     display: flex;
     align-items: center;
     gap: 8px;
     transition: var(--transition);
     min-width: 80px;
 }
 
 .current-language:hover {
     border-color: var(--gold-accent);
     background: rgba(212, 175, 55, 0.1);
 }
 
 .current-language i.fa-chevron-down {
     font-size: 10px;
     transition: transform 0.3s ease;
 }
 
 .language-selector.open .current-language i.fa-chevron-down {
     transform: rotate(180deg);
 }
 
 .language-dropdown {
     position: absolute;
     top: 100%;
     left: 0;
     right: 0;
     background: rgba(10, 10, 10, 0.98);
     border: 1px solid rgba(212, 175, 55, 0.3);
     border-top: none;
     border-radius: 0 0 4px 4px;
     opacity: 0;
     visibility: hidden;
     transform: translateY(-10px);
     transition: all 0.3s ease;
     z-index: 1001;
     backdrop-filter: blur(10px);
     min-width: 120px;
     box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
 }
 
 .language-selector.open .language-dropdown {
     opacity: 1 !important;
     visibility: visible !important;
     transform: translateY(0) !important;
     display: block !important;
 }
 
 /* Fallback for debugging - force visibility when open */
 .language-selector.open .language-dropdown {
     opacity: 1;
     visibility: visible;
     transform: translateY(0);
     display: block;
 }
 
 .language-option {
     padding: 8px 12px;
     font-size: 12px;
     cursor: pointer;
     transition: var(--transition);
     display: flex;
     align-items: center;
     gap: 8px;
     text-decoration: none;
     color: var(--light-text);
 }
 
 .language-option:hover {
     background: rgba(212, 175, 55, 0.1);
     color: var(--gold-accent);
 }
 
 .language-option.active {
     background: rgba(212, 175, 55, 0.2);
     color: var(--gold-accent);
 }
 
 .flag {
     font-size: 14px;
 }

.cta-button, .btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--gold-accent), var(--bronze-accent));
    color: var(--darker-bg);
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: ctaGlow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    z-index: 1;
    text-decoration: none;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--gold-accent);
    color: var(--gold-accent);
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: ctaGlow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    z-index: 1;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: ctaShimmer 3s linear infinite;
    z-index: 0;
    pointer-events: none;
}

.btn-secondary:hover {
    background: var(--gold-accent);
    color: var(--darker-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    animation: ctaGlowHover 1.5s ease-in-out infinite;
}

.cta-button::before, .btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: ctaShimmer 3s linear infinite;
    z-index: 0;
    pointer-events: none;
}

.cta-button::after, .btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--gold-accent), var(--bronze-accent));
    border-radius: 3px;
    z-index: -1;
}

.cta-button:hover, .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    animation: ctaGlowHover 1.5s ease-in-out infinite;
}

.cta-button.small {
        padding: 8px 20px;
        font-size: 12px;
        animation: ctaGlow 2.5s ease-in-out infinite;
    }
    
    .cta-button.small:hover {
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 10px 20px rgba(212, 175, 55, 0.4), 0 0 20px rgba(212, 175, 55, 0.5);
    }

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--darker-bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 50%, rgba(212, 175, 55, 0.1) 0%, rgba(10, 10, 10, 0) 70%);
    animation: parallaxGlow 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(205, 127, 50, 0.05) 0%, transparent 50%);
    animation: floatingParticles 15s linear infinite;
    pointer-events: none;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: var(--hero-title-size);
    margin-bottom: 20px;
    color: var(--light-text);
    line-height: 1.1;
}

.hero-text h2 {
    font-size: var(--hero-subtitle-size);
    margin-bottom: 40px;
    color: var(--gold-accent);
    font-weight: 400;
    line-height: 1.3;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.book-cover {
    width: 300px;
    height: 450px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-30deg) rotateX(5deg);
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 30px 20px rgba(0, 0, 0, 0.3));
}

.book-cover:hover {
    transform: rotateY(-15deg) rotateX(5deg);
    filter: drop-shadow(0 35px 25px rgba(0, 0, 0, 0.4));
}

.book-spine {
    position: absolute;
    width: 50px;
    height: 450px;
    background: linear-gradient(to right, #8B7D3A, var(--gold-accent), #8B7D3A);
    transform: translateX(-25px) rotateY(90deg);
    transform-origin: right;
}

.book-front {
    position: absolute;
    width: 300px;
    height: 450px;
    background: rgba(10, 10, 10, 0.8);
    border: 2px solid var(--gold-accent);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.book-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    z-index: 1;
    animation: shimmer 2s linear infinite;
}

.book-front::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    z-index: 1;
    animation: shimmer 2s linear infinite reverse;
}



@keyframes shimmer {
    0% {
        background: linear-gradient(90deg, transparent, transparent, transparent);
    }
    25% {
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    }
    50% {
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
    }
    75% {
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.8), transparent);
    }
    100% {
        background: linear-gradient(90deg, transparent, var(--gold-accent), transparent);
    }
}



@keyframes floatingParticles {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    33% {
        transform: translateY(-10px) rotate(120deg);
        opacity: 0.6;
    }
    66% {
        transform: translateY(-5px) rotate(240deg);
        opacity: 0.4;
    }
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}



.book-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(1.05) contrast(1.05);
    transition: transform 0.5s ease;
    will-change: transform;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.video-title {
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 3;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.video-title span {
    background-color: rgba(10, 10, 10, 0.7);
    color: var(--gold-accent);
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    letter-spacing: 1px;
    padding: 5px 15px;
    border-radius: 2px;
    border-bottom: 1px solid var(--gold-accent);
}

.book-front:hover .video-title {
    opacity: 1;
}

.play-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: rgba(212, 175, 55, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    opacity: 0.7;
    transition: all 0.3s ease;
}



.play-indicator i {
    color: var(--darker-bg);
    font-size: 12px;
}

.book-front:hover .play-indicator {
    opacity: 1;
    transform: scale(1.1);
}

/* Arabic-specific styles */
[lang="ar"] .book-cover {
    transform: rotateY(30deg) rotateX(5deg);
}

[lang="ar"] .book-cover:hover {
    transform: rotateY(15deg) rotateX(5deg);
}

[lang="ar"] .value-highlights {
    text-align: right;
}

[lang="ar"] .value-highlights ul {
    direction: rtl;
}

[lang="ar"] .value-highlights li {
    text-align: right;
    direction: rtl;
    padding-left: 0;
    padding-right: 25px;
    position: relative;
}

[lang="ar"] .value-icon {
    position: absolute;
    left: auto;
    right: 0;
    top: 0;
}

/* About Section */
.about {
    background-color: var(--dark-bg);
}

.about h2 {
    font-size: var(--heading-font-size);
    color: var(--light-text);
}

.about p {
    font-size: var(--large-font-size);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}

/* Learn Section */
.learn {
    background-color: var(--darker-bg);
}

.learn h2 {
    font-size: var(--heading-font-size);
    color: var(--light-text);
}

.learn-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.learn-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.learn-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(212, 175, 55, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.learn-list li:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4), 0 0 20px rgba(212, 175, 55, 0.3);
}

.learn-list li:hover::before {
    opacity: 1;
}

.learn-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-accent), var(--bronze-accent));
    border-radius: 50%;
    color: var(--darker-bg);
    font-size: 20px;
}

.learn-text {
    font-size: var(--base-font-size);
    font-weight: 400;
    line-height: 1.5;
}

/* Languages Section */
.languages {
    background-color: var(--dark-bg);
    text-align: center;
}

.languages h2 {
    font-size: var(--heading-font-size);
    color: var(--light-text);
}

.language-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.language-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 10px;
    text-decoration: none;
    color: var(--light-text);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    width: 180px;
}

.language-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.6s ease;
}

.language-button:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4), 0 0 20px rgba(212, 175, 55, 0.3);
}

.language-button:hover::before {
    left: 100%;
}

.language-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.language-name {
    font-size: var(--base-font-size);
    font-weight: 500;
}

/* Author Section */
.author {
    background-color: var(--darker-bg);
}

.author h2 {
    font-size: var(--heading-font-size);
    color: var(--light-text);
}

.author-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
}

.author-image {
    flex: 0 0 200px;
}

.author-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold-accent);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: grayscale(20%) contrast(1.1);
}

.author-photo:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.5);
    filter: grayscale(0%) contrast(1.2) brightness(1.1);
}

.author-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: var(--gold-accent);
    border: 3px solid var(--gold-accent);
}

.author-bio {
    flex: 1;
}

.author-bio h3 {
    font-size: clamp(20px, 4vw, 28px);
    text-shadow: 0 0 10px rgba(255,223,186,0.8);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    color: var(--gold-accent);
    line-height: 1.2;
}

.author-bio h3:hover {
    color: var(--gold-accent);
    transform: translateY(-2px);
    animation: float 3s ease-in-out infinite;
}

.author-bio p {
    font-size: clamp(16px, 3vw, 20px);
    position: relative;
    animation: subtleGlow 3s ease-in-out infinite alternate;
    line-height: 1.8;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--dark-bg);
    text-align: center;
}

.testimonials h2 {
    font-size: var(--heading-font-size);
    color: var(--light-text);
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 50px auto 30px;
    height: 200px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.testimonial-slide:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.2);
}

.testimonial-slide.active {
    opacity: 1;
}

.quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(16px, 3.5vw, 24px);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
    line-height: 1.6;
}

.quote i {
    color: var(--gold-accent);
    font-size: 1.2rem;
    opacity: 0.7;
}

.quote i.fa-quote-left {
    margin-right: 10px;
}

.quote i.fa-quote-right {
    margin-left: 10px;
}

.testimonial-author {
    font-size: 1rem;
    color: var(--gold-accent);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--gold-accent);
}

/* Purchase Section */
.purchase {
    background-color: var(--darker-bg);
    text-align: center;
}

.purchase h2 {
    font-size: 2.5rem;
    color: var(--light-text);
}

/* Language Selection in Purchase Section */
.language-selection {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.language-selection h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--light-text);
}

.language-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.language-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: var(--transition);
    width: 120px;
    cursor: pointer;
    border: 2px solid transparent;
}

.language-option:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.08);
}

.language-option.active {
    border-color: var(--gold-accent);
    background-color: rgba(212, 175, 55, 0.1);
}

.language-option.selected {
    border-color: var(--gold-accent);
    background-color: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.language-option .language-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.language-option .language-name {
    font-size: 1rem;
    font-weight: 500;
}

.selected-language {
    font-size: 1.1rem;
    color: var(--gold-accent);
    font-weight: 500;
}

.purchase-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.purchase-option {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    padding: 40px 30px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 5px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.2);
}

.purchase-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), transparent, rgba(205, 127, 50, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.purchase-option:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.3), 0 0 30px rgba(212, 175, 55, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.6);
}

.purchase-option:hover::before {
    opacity: 1;
}

.purchase-option.featured {
    border: 1px solid var(--gold-accent);
    transform: scale(1.05);
    z-index: 1;
    animation: magicalGlowPurchase 3s ease-in-out infinite;
}

.purchase-option.featured:hover {
    transform: scale(1.05) translateY(-5px);
}



@keyframes magicalGlowPurchase {
    0%, 100% {
        border-color: var(--gold-accent);
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    }
    25% {
        border-color: #ffeb3b;
        box-shadow: 0 0 15px rgba(255, 235, 59, 0.4);
    }
    50% {
        border-color: #ffc107;
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    }
    75% {
        border-color: #ff9800;
        box-shadow: 0 0 15px rgba(255, 152, 0, 0.4);
    }
}

@keyframes ctaGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.5), 0 0 35px rgba(255, 193, 7, 0.3);
    }
}

@keyframes ctaGlowHover {
    0%, 100% {
        box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4), 0 0 25px rgba(212, 175, 55, 0.6);
    }
    50% {
        box-shadow: 0 15px 30px rgba(212, 175, 55, 0.6), 0 0 35px rgba(255, 193, 7, 0.8);
    }
}

@keyframes ctaShimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}



.featured-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--gold-accent), var(--bronze-accent));
    color: var(--darker-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 3;
}



.purchase-option h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.price-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.original-price {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
    font-family: 'Cormorant Garamond', serif;
}

.price {
    font-size: 2.5rem;
    color: var(--gold-accent);
    font-family: 'Cormorant Garamond', serif;
}

.social-proof {
    background-color: rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.5;
    border-left: 3px solid var(--gold-accent);
    border-right: 3px solid var(--gold-accent);
}

.readers-count {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
}

.highlight {
    color: var(--gold-accent);
    font-weight: 600;
}

.value-highlights {
    margin: 25px 0;
    text-align: left;
}

.value-highlights h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
    color: var(--light-text);
}

.value-highlights ul {
    margin-bottom: 30px;
}

.value-highlights ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    line-height: 1.4;
}

.value-icon {
    color: var(--gold-accent);
    position: absolute;
    left: 0;
    font-size: 0.9rem;
}

.purchase-option ul {
    margin-bottom: 30px;
    text-align: left;
}

.purchase-option ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.purchase-option ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold-accent);
}

/* Footer */
footer {
    background-color: var(--darker-bg);
    padding: 60px 0 30px;
    font-size: var(--small-font-size);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--gold-accent);
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a:hover {
    color: var(--gold-accent);
}

.contact-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.contact-button:hover {
    color: var(--gold-accent);
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background-color: var(--gold-accent);
    color: var(--darker-bg);
}

.footer-message {
    text-align: center;
    margin-bottom: 30px;
}

.footer-message p {
    font-size: 1rem;
    color: var(--light-text);
    font-style: italic;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.footer-copyright {
    text-align: center;
    font-size: var(--small-font-size);
    color: rgba(255, 255, 255, 0.5);
}

@keyframes subtleGlow {
    from {text-shadow: 0 0 10px rgba(255,223,186,0.3);}
    to {text-shadow: 0 0 20px rgba(255,223,186,0.6);}
}

@keyframes float {
    0% {transform: translateY(0);}
    50% {transform: translateY(-5px);}
    100% {transform: translateY(0);}
}

@keyframes parallaxGlow {
    0%, 100% { 
        opacity: 0.8;
        transform: scale(1) rotate(0deg);
    }
    50% { 
        opacity: 1;
        transform: scale(1.05) rotate(1deg);
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatingParticles {
    0% { transform: translateX(-10%) translateY(-10%) rotate(0deg); }
    25% { transform: translateX(0%) translateY(-5%) rotate(90deg); }
    50% { transform: translateX(5%) translateY(0%) rotate(180deg); }
    75% { transform: translateX(0%) translateY(5%) rotate(270deg); }
    100% { transform: translateX(-10%) translateY(-10%) rotate(360deg); }
}

/* Responsive Styles */
/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        padding: 0 30px;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .learn-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .hero-text h1 {
        font-size: 3rem;
    }
    
    .hero-text h2 {
        font-size: 1.5rem;
    }
    
    .book-cover {
        width: 250px;
        height: 375px;
    }
    
    .book-spine {
        height: 375px;
    }
    
    .book-front {
        width: 250px;
        height: 375px;
    }
    
    
    
    .section-padding {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .container {
        padding: 0 20px;
    }
    
    body {
        font-size: clamp(16px, 4vw, 18px);
    }
    
    header {
        padding: 8px 0;
        min-height: 50px;
        background-color: rgba(10, 10, 10, 0.95);
    }
    
    header.scrolled {
        padding: 6px 0;
        min-height: 45px;
    }
    
    header .container {
        display: flex;
        align-items: center;
        height: 100%;
        position: relative;
    }
    
    .logo {
        font-size: 1.8rem;
        margin: 0;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.6), 0 0 35px rgba(255, 215, 0, 0.4);
        animation: glow 2s ease-in-out infinite alternate;
    }
    
    .language-selector {
        margin: 0;
        flex: 1;
        display: flex;
        justify-content: flex-start;
    }
    
    .current-language {
        padding: 10px 12px;
        font-size: 13px;
        min-width: 55px;
        border-radius: 8px;
        background: rgba(10, 10, 10, 0.9);
        border: 1px solid rgba(212, 175, 55, 0.4);
    }
    
    .language-option {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 35px;
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 6px;
        color: var(--gold-accent);
        font-size: 16px;
        z-index: 1001;
        position: absolute;
        top: 8px;
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .menu-toggle:hover {
        background: rgba(212, 175, 55, 0.2);
        border-color: var(--gold-accent);
        transform: scale(1.05);
    }
    
    /* موضع زر القائمة للغات من اليسار لليمين (EN, FR, ES) - على اليمين */
    body:not([dir="rtl"]) .menu-toggle {
        right: 15px;
    }
    
    /* موضع زر القائمة للغة العربية (RTL) - على اليسار */
    html[dir="rtl"] .menu-toggle {
        left: 15px;
    }
    
    /* تعديل الموضع عند التمرير */
     header.scrolled .menu-toggle {
         top: 6px;
     }
     
     /* تأثير التوهج للشعار */
     @keyframes glow {
         from {
             text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 25px rgba(255, 215, 0, 0.6), 0 0 35px rgba(255, 215, 0, 0.4);
         }
         to {
             text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.6);
         }
     }
    
    /* ترتيب العناصر للغات من اليسار لليمين (EN, FR, ES) */
    body:not([dir="rtl"]) .language-selector {
        justify-content: flex-start;
    }
    
    /* ترتيب العناصر للغة العربية (RTL) */
    html[dir="rtl"] .language-selector {
        justify-content: flex-end;
    }
    
    html[dir="rtl"] .logo {
        left: 50%;
        transform: translateX(-50%);
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--darker-bg);
        transition: var(--transition);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-text {
        padding: 0 10px;
    }
    
    .about p, .author-bio p {
        padding: 0 10px;
    }
    
    .learn-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .language-buttons {
        gap: 20px;
    }
    
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .book-cover {
        width: 220px;
        height: 330px;
    }
    
    .book-spine {
        height: 330px;
    }
    
    .book-front {
        width: 220px;
        height: 330px;
    }
    
    .video-title span {
        font-size: 12px;
        padding: 4px 12px;
    }
    
    .play-indicator {
        width: 25px;
        height: 25px;
        bottom: 10px;
        right: 10px;
    }
    
    .play-indicator i {
        font-size: 10px;
    }
    
    .hero-text h2 {
        font-size: 1.3rem;
    }
    
    .language-selection {
        padding: 20px 15px;
    }
    
    .language-options {
        gap: 10px;
    }
    
    .language-option {
        width: 100px;
        padding: 10px;
    }
    
    .language-option .language-icon {
        font-size: 1.8rem;
    }
    
    .language-option .language-name {
        font-size: 0.9rem;
    }
    
    .social-proof {
        padding: 12px 10px;
        font-size: 1rem;
        margin: 15px 0;
    }
    
    .value-highlights h4 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .value-highlights ul li {
        font-size: 0.95rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .section-underline {
        margin: 15px auto 30px;
    }
    
    .author-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .author-image {
        margin-bottom: 0;
    }
    
    .author-bio {
        text-align: center;
    }
    
    .testimonial-slider {
        height: auto;
        min-height: 200px;
    }
    
    .purchase-options {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-message p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    
    .purchase-option.featured {
        transform: scale(1);
    }
    
    .purchase-option.featured:hover {
        transform: translateY(-5px);
    }
    
    /* Mobile-optimized CTA buttons for better touch accessibility */
    .cta-button {
        padding: 16px 32px;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .cta-button.small {
        padding: 12px 24px;
        font-size: 14px;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 6px 0;
    }
    
    header.scrolled {
        padding: 3px 0;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text h2 {
        font-size: 1.1rem;
    }
    
    .book-cover {
        width: 200px;
        height: 300px;
    }
    
    .book-spine {
        height: 300px;
    }
    
    .book-front {
        width: 200px;
        height: 300px;
    }
    
    .video-title span {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .play-indicator {
        width: 22px;
        height: 22px;
        bottom: 8px;
        right: 8px;
    }
    
    .play-indicator i {
        font-size: 9px;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .footer-message p {
        font-size: 0.9rem;
        padding: 0 15px;
        line-height: 1.5;
    }
    
    /* Enhanced mobile CTA buttons for smallest screens */
    .cta-button {
        padding: 18px 36px;
        font-size: 18px;
        min-height: 52px;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .cta-button.small {
        padding: 14px 28px;
        font-size: 16px;
        min-height: 48px;
        width: auto;
        max-width: none;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improve language option touch targets */
    .language-option {
        min-height: 44px;
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Ensure all interactive elements have proper touch targets */
    nav ul li a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 8px 12px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    .menu-toggle {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Video performance optimization for mobile */
    .book-cover-image {
        will-change: auto;
    }
    
    /* Prevent zoom on input focus for iOS */
    input, select, textarea {
        font-size: 16px !important;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 0;
    }
    
    /* Improve scrolling performance */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure images don't overflow */
    img, video {
        max-width: 100%;
        height: auto;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    :root {
        --base-font-size: clamp(14px, 4vw, 16px);
        --small-font-size: clamp(12px, 3vw, 14px);
        --large-font-size: clamp(16px, 4vw, 18px);
        --heading-font-size: clamp(20px, 5vw, 24px);
        --hero-title-size: clamp(24px, 7vw, 32px);
        --hero-subtitle-size: clamp(16px, 4vw, 20px);
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    header {
        padding: 6px 0;
        min-height: 45px;
    }
    
    header.scrolled {
        padding: 4px 0;
        min-height: 40px;
    }
    
    .logo {
        font-size: 1.3rem;
        text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    }
    
    .current-language {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 45px;
        border-radius: 5px;
    }
    
    .language-option {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .menu-toggle {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .hero-text {
        padding: 0 5px;
    }
    
    .about p, .author-bio p {
        padding: 0 5px;
        line-height: 1.6;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .learn-item {
        padding: 20px 15px;
    }
    
    .author-bio h3 {
        font-size: clamp(18px, 5vw, 22px);
    }
    
    .author-bio p {
        font-size: clamp(14px, 4vw, 16px);
    }
    
    .quote {
        font-size: clamp(14px, 4vw, 18px);
    }
    
    nav ul li a {
        font-size: clamp(12px, 3vw, 14px);
    }
}