/* Importar fuentes premium */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Playfair+Display:wght@700&family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary: #2a2a4a;       /* Morado oscuro (tema Hogwarts) */
    --secondary: #c9a568;     /* Dorado (tema Hogwarts) */
    --tertiary: #5c3d2e;      /* Marrón oscuro (como madera de varita) */
    --light: #f8f4e9;         /* Pergamino */
    --accent: #8a5a44;        /* Verde oscuro (como Slytherin) */
    --text: #2b2b2b;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: #0d0d1a;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Fondo cinematográfico mágico */
.cinematic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    background: 
        linear-gradient(rgba(13, 13, 26, 0.9), rgba(42, 42, 74, 0.95)),
        url('https://images.unsplash.com/photo-1533035353720-f1c6a75cd8ab?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center;
    background-size: cover;
    transition: transform 0.1s ease-out;
    filter: brightness(0.6);
}

.magic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(201, 165, 104, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 80% 70%, rgba(100, 100, 200, 0.1) 0%, transparent 25%);
    pointer-events: none;
}

.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--secondary);
    border-radius: 50%;
    opacity: 0.7;
    animation: floatParticle 8s infinite ease-in-out;
}

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.7; }
    50% { transform: translateY(-100px) translateX(20px); opacity: 0.2; }
}

/* Efectos mágicos flotantes */
.magic-effect-1, .magic-effect-2 {
    position: fixed;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 165, 104, 0.2), transparent 70%);
    z-index: -5;
    pointer-events: none;
    animation: floatEffect 15s infinite alternate;
}

.magic-effect-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.magic-effect-2 {
    bottom: 15%;
    right: 5%;
    animation-delay: -5s;
}

@keyframes floatEffect {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.3; }
    100% { transform: translate(50px, 50px) rotate(180deg); opacity: 0.1; }
}

/* Header */
header {
    background: linear-gradient(135deg, rgba(42, 42, 74, 0.95), rgba(74, 58, 106, 0.95));
    color: white;
    padding: 1.8rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(15px);
    border-bottom: 2px solid var(--secondary);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(201, 165, 104, 0.8);
    letter-spacing: 1.5px;
    animation: glowText 3s infinite alternate;
}

@keyframes glowText {
    0% { text-shadow: 0 0 10px rgba(201, 165, 104, 0.6); }
    100% { text-shadow: 0 0 20px rgba(201, 165, 104, 0.9), 0 0 30px rgba(201, 165, 104, 0.5); }
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.6rem 0;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary);
    transition: width 0.4s ease, transform 0.4s ease;
    border-radius: 2px;
    transform-origin: left;
}

nav a:hover {
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(201, 165, 104, 0.6);
}

nav a:hover::after {
    width: 100%;
    transform: scaleX(1.1);
}

/* Main Content */
main {
    flex: 1;
    padding: 4rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Hero Section */
.hero {
    background: 
        linear-gradient(rgba(42, 42, 74, 0.9), rgba(42, 42, 74, 0.95)),
        url('https://images.unsplash.com/photo-1543002568-d5d9ec0b6f27?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80') no-repeat center center;
    background-size: cover;
    height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-bottom: 6rem;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
    border: 4px solid var(--secondary);
    animation: fadeInHero 2s ease-out;
}

@keyframes fadeInHero {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(201, 165, 104, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(100, 100, 200, 0.1) 0%, transparent 30%);
    pointer-events: none;
}

.hero h1 {
    font-family: 'Cinzel', serif;
    font-size: 4rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(201, 165, 104, 0.9);
    letter-spacing: 2.5px;
    animation: glowText 2s infinite alternate;
}

.hero p {
    font-size: 1.6rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    animation: fadeInUp 2.2s ease-out;
}

/* Features */
.features {
    display: flex;
    justify-content: space-around;
    padding: 5rem 2rem;
    flex-wrap: wrap;
    gap: 4rem;
    margin-bottom: 6rem;
}

.feature {
    background: rgba(248, 244, 233, 0.95);
    padding: 3rem;
    border-radius: 25px;
    width: 30%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid var(--secondary);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.feature:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    border-color: #e6d3a7;
    background: rgba(255, 255, 255, 0.98);
}

.feature .icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: floatIcon 4s infinite ease-in-out;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.feature h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
}

.feature p {
    color: var(--text);
    font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 6rem 0;
    padding: 5rem;
    background: 
        linear-gradient(135deg, rgba(92, 61, 46, 0.95), rgba(138, 90, 68, 0.95)),
        url('https://www.transparenttextures.com/patterns/paper.png');
    border-radius: 30px;
    color: white;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    position: relative;
    border: 4px solid var(--secondary);
    animation: fadeInSection 2.5s ease-out;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cta-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--secondary);
    text-shadow: 0 0 20px rgba(201, 165, 104, 0.6);
}

.cta-section p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
}

/* CTA Button */
.cta-btn {
    background: var(--secondary);
    color: var(--primary);
    padding: 1.5rem 3.5rem;
    text-decoration: none;
    border-radius: 60px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 15px 35px rgba(201, 165, 104, 0.5);
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    border: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
    animation: pulseButton 2.5s infinite;
}

@keyframes pulseButton {
    0%, 100% { box-shadow: 0 15px 35px rgba(201, 165, 104, 0.4); }
    50% { box-shadow: 0 15px 50px rgba(201, 165, 104, 0.8); }
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: 0.6s;
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn:hover {
    background: #e6d3a7;
    transform: scale(1.15);
    box-shadow: 0 20px 50px rgba(201, 165, 104, 0.8);
}

/* Sections genéricas */
.introduction, .narrators, .how-to-listen, .books-overview {
    margin-bottom: 5rem;
    padding: 3.5rem;
    background: rgba(248, 244, 233, 0.95);
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    border: 2px solid var(--secondary);
}

.introduction h2, .narrators h2, .how-to-listen h2, .books-overview h2 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 2.2rem;
    font-family: 'Cinzel', serif;
}

.introduction p, .narrators p, .how-to-listen p, .books-overview p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.narrators h3 {
    color: var(--secondary);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
}

.how-to-listen ol, .books-overview ol {
    padding-left: 1.8rem;
    margin-bottom: 1.5rem;
}

.how-to-listen li, .books-overview li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text);
}

/* FAQs */
.faq-section {
    background: rgba(248, 244, 233, 0.98);
    padding: 5rem;
    border-radius: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    margin: 6rem auto;
    max-width: 1000px;
    border: 4px solid var(--secondary);
    position: relative;
    animation: fadeInSection 2.5s ease-out;
}

.faq-section h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 4rem;
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    text-shadow: 0 0 15px rgba(201, 165, 104, 0.3);
}

.faq-item {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 3px dashed var(--secondary);
}

.faq-item h3 {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 1.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
}

.faq-item p {
    color: var(--text);
    font-size: 1.25rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary), #1d1d35);
    color: white;
    padding: 4rem;
    text-align: center;
    margin-top: auto;
    border-top: 4px solid var(--secondary);
}

footer ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 2.5rem;
    gap: 4rem;
}

footer a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #e6d3a7;
    text-shadow: 0 0 10px rgba(201, 165, 104, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1.8rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        width: 100%;
        max-width: 480px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero {
        height: 600px;
    }

    main {
        padding: 3rem 1.8rem;
    }

    footer ul {
        flex-direction: column;
        gap: 2rem;
    }

    .faq-section {
        padding: 3rem;
    }

    .introduction, .narrators, .how-to-listen, .books-overview {
        padding: 2.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .cta-btn {
        padding: 1.2rem 2.2rem;
        font-size: 1.2rem;
    }

    nav .logo {
        font-size: 2rem;
    }
}