/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B6B;
    --secondary-color: #4ECDC4;
    --accent-color: #FFE66D;
    --purple: #9B59B6;
    --blue: #3498DB;
    --green: #2ECC71;
    --orange: #E67E22;
    --dark: #2C3E50;
    --light: #ECF0F1;
    --white: #FFFFFF;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.2);
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.8;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Amiri', serif;
    font-weight: 700;
    line-height: 1.3;
}

/* ===== Navigation ===== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand h2 {
    font-size: 1.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

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

.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--dark);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    background: var(--gradient-1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.3), transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(78, 205, 196, 0.3), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(155, 89, 182, 0.3), transparent 50%);
    animation: pulse 10s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="2" fill="white" opacity="0.1"/></svg>');
    animation: float 20s linear infinite;
}

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

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    padding: 3rem 1rem;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    animation: fadeInDown 1s ease-out;
}

.hero-subtitle {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.hero-author {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.9s backwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--white);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== Buttons ===== */
.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-2);
    color: var(--white);
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(245, 87, 108, 0.5);
}

.btn-secondary {
    background: var(--white);
    color: var(--purple);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.4);
}

.btn-white {
    background: var(--white);
    color: var(--purple);
}

.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}

/* ===== Sections ===== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-decoration {
    width: 100px;
    height: 4px;
    background: var(--gradient-2);
    margin: 0 auto;
    border-radius: 10px;
}

/* ===== About Book Section ===== */
.about-book {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.book-intro {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.book-cover {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-3d {
    width: 300px;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.book-front {
    width: 100%;
    height: 100%;
    background: var(--gradient-1);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    transition: transform 0.6s;
}

.book-3d:hover .book-front {
    transform: rotateY(-10deg) rotateX(5deg);
}

.book-front h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.book-description {
    line-height: 2;
}

.lead-text {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--purple);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 2rem 0;
}

.feature-list li {
    padding: 0.8rem 0;
    font-size: 1.1rem;
    color: var(--dark);
}

.book-quote {
    background: var(--white);
    padding: 2rem;
    border-right: 5px solid var(--primary-color);
    border-radius: 10px;
    font-style: italic;
    color: var(--dark);
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
}

/* ===== Features Section ===== */
.features {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:nth-child(1) { border-color: #FF6B6B; }
.feature-card:nth-child(2) { border-color: #4ECDC4; }
.feature-card:nth-child(3) { border-color: #FFE66D; }
.feature-card:nth-child(4) { border-color: #9B59B6; }
.feature-card:nth-child(5) { border-color: #3498DB; }
.feature-card:nth-child(6) { border-color: #2ECC71; }

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--purple);
    margin-bottom: 0.5rem;
}

.feature-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.feature-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.feature-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-link:hover {
    color: var(--purple);
    text-decoration: underline;
}

/* ===== CTA Section ===== */
.cta {
    background: var(--gradient-3);
    color: var(--white);
    text-align: center;
    padding: 5rem 0;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.cta-note {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    padding: 0.5rem 0;
}

.footer-section a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .book-intro {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-author {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .book-3d {
        width: 250px;
        height: 350px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Chapter Pages Styles ===== */
.chapter-header {
    background: var(--gradient-1);
    color: var(--white);
    padding: 6rem 0 3rem;
    margin-top: 70px;
    text-align: center;
}

.chapter-number {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.chapter-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.chapter-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

.chapter-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 20px;
    line-height: 2;
}

.chapter-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    flex: 1;
    min-width: 200px;
}

/* ===== Contents Page ===== */
.contents-list {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 20px;
}

.chapter-item {
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-right: 5px solid var(--primary-color);
}

.chapter-item:nth-child(even) {
    border-right-color: var(--secondary-color);
}

.chapter-item:hover {
    transform: translateX(-10px);
    box-shadow: var(--shadow-md);
}

.chapter-item h3 {
    color: var(--purple);
    margin-bottom: 0.5rem;
}

.chapter-item h4 {
    color: var(--dark);
    margin-bottom: 1rem;
}

.chapter-item p {
    color: #666;
    margin-bottom: 1rem;
}

.chapter-item .btn {
    font-size: 1rem;
    padding: 0.8rem 2rem;
}

/* ===== About Page ===== */
.author-intro {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 3rem;
}

.author-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

.author-bio {
    line-height: 2;
}

.author-bio h2 {
    color: var(--purple);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .author-intro {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .author-image {
        margin: 0 auto;
    }
}

/* ===== Float Animation ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===== Book Cover Styles ===== */
.hero-book-cover img {
    transition: transform 0.3s ease;
}

.hero-book-cover img:hover {
    transform: scale(1.05);
}
