@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&family=Tajawal:wght@400;500;700&display=swap');

:root {
    --bg-color-main: #0a0a0a;
    --bg-gradient: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%);
    --accent-red: #7c0a02; /* Burgundy / Blood Red */
    --accent-red-hover: #9e0e04;
    --text-primary: #e0e0e0;
    --text-secondary: #999999;
    --card-bg: rgba(25, 25, 25, 0.8);
    --card-border: rgba(124, 10, 2, 0.3);
    
    --font-heading: 'Cairo', sans-serif;
    --font-text: 'Tajawal', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    background-color: var(--bg-color-main);
    color: var(--text-primary);
    font-family: var(--font-text);
    line-height: 1.6;
    min-height: 100vh;
    direction: rtl;
    overflow-x: hidden;
}

/* Global Background Image */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('images/thetower.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    pointer-events: none;
}

/* Global Overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.85) 50%,
        rgba(0, 0, 0, 0.95) 100%
    );
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

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

/* Base CTA Button */
.order-btn {
    display: inline-block;
    background-color: var(--accent-red);
    color: #fff;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-decoration: none;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(124, 10, 2, 0.4);
    text-align: center;
    cursor: pointer;
}

.order-btn:hover {
    background-color: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124, 10, 2, 0.6);
}

/* Sections */
section, footer {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 100px;
}

.hero-bg-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-bg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin-bottom: 40px;
}

.title {
    font-size: 5rem;
    font-weight: 900;
    color: var(--accent-red);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8), 0 0 20px rgba(124,10,2,0.5);
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 500;
    color: #ccc;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
    margin-bottom: 40px;
}

.hero-image-wrapper {
    position: relative;
    margin: 0 auto 40px;
    width: 100%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 40px rgba(124,10,2,0.15);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.hero-image-wrapper:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 50px rgba(124,10,2,0.3);
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: contrast(1.1) brightness(0.9) grayscale(0.2);
}

/* Gradient overlay to make the image blend into the dark background seamlessly */
.hero-image-wrapper .image-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(10,10,10,0) 50%, rgba(10,10,10,0.8) 100%), 
                radial-gradient(circle at center, rgba(124,10,2,0) 60%, rgba(124,10,2,0.2) 100%);
    pointer-events: none;
}

/* Synopsis Section */
.synopsis {
    /* Background removed to show global body background */
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    text-align: center;
}

/* 3D Book Cover */
.book-3d-wrapper {
    margin-bottom: 40px;
}

.book-3d-wrapper img {
    width: 100%;
    max-width: 550px;
    height: auto;
    display: block;
    margin: 0 auto;
    image-rendering: -webkit-optimize-contrast;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}

.card p {
    font-size: 1.25rem;
    line-height: 2;
    color: var(--text-primary);
}

/* Wiki Section */
.wiki-section {
    position: relative;
    z-index: 1;
}

/* Wiki Button */
.wiki-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 50px;
    border: 2px solid var(--accent-red);
    color: #fff;
    background: rgba(124, 10, 2, 0.15);
    border-radius: 12px;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    box-shadow: 0 0 20px rgba(124, 10, 2, 0.3), inset 0 0 10px rgba(124, 10, 2, 0.2);
    backdrop-filter: blur(5px);
}

.wiki-button:hover {
    background: var(--accent-red);
    color: #fff;
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 30px rgba(124, 10, 2, 0.6), 0 0 40px rgba(124, 10, 2, 0.4);
    border-color: var(--accent-red-hover);
}



.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--accent-red);
}


/* Secondary CTA Section */
.cta-section {
    text-align: center;
    padding: 60px 0;
    background: linear-gradient(to right, transparent, rgba(124, 10, 2, 0.1), transparent);
}

/* Footer Section */
footer {
    background-color: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(5px);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(124, 10, 2, 0.2);
}

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

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.footer-socials-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex: 2;
}

.social-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-section h4 {
    font-size: 1.1rem;
    color: var(--accent-red);
    opacity: 0.9;
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--accent-red);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: -100px; /* Hidden by default */
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px;
    text-align: center;
    z-index: 1000;
    border-top: 1px solid var(--accent-red);
    transition: bottom 0.3s ease;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.sticky-cta.visible {
    bottom: 0;
}

.sticky-cta .order-btn {
    width: 100%;
    max-width: 400px;
    padding: 12px 20px;
}

/* Responsive */
@media (min-width: 768px) {
    .footer-socials-wrapper {
        flex-direction: row;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 3.5rem;
    }
    .tagline {
        font-size: 1.2rem;
    }
    .hero {
        padding-top: 60px;
    }
    .book-3d-wrapper img {
        max-width: 90%;
    }
    .card {
        padding: 30px 20px;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .social-links {
        justify-content: center;
    }
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .wiki-button {
        display: block;
        width: 90%;
        margin: 0 auto;
    }
}
