/* ============================================================
   1. VARIABLES Y BASE GLOBALES
   ============================================================ */
:root {
    /* Paleta Principal Unificada */
    --bg-dark: #050505;
    --bg-darker: #0a0a0a;
    --text-light: #eee;
    --text-muted: #999;
    --accent-primary: #00ff9d; /* Neón principal */
    --accent-secondary: #ff6b35; /* Naranja RESET */
    --border-color: #222;
    --surface-color: rgba(255, 255, 255, 0.03);
    
    /* Tipografía */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Merriweather', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 1. MATAR EL SCROLL HORIZONTAL DE RAÍZ */
html, body {
    overflow-x: hidden !important; 
    width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

ul.styled-list {
    line-height: 2em;
    padding-left: 3em;
}

/* ============================================================
   2. TIPOGRAFÍA Y UTILIDADES GLOBALES
   ============================================================ */
.text-center {
    text-align: center;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: white;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-heading::before {
    content: '';
    display: block;
    width: 4px;
    height: 35px;
    background: var(--accent-primary);
}

.lead-text {
    font-size: 1.15rem;
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 40px;
}

.cta-badge {
    display: inline-block;
    background: rgba(0, 255, 157, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 6px 14px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.cta-badge.highlight {
    background: var(--accent-primary);
    color: #000;
}

/* ============================================================
   3. COMPONENTES GLOBALES (Botones)
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: #050505;
}

.btn-primary:hover {
    background: white;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.flex-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .btn { width: 100%; }
    .flex-buttons { justify-content: center; }
}

/* ============================================================
   4. NAVEGACIÓN Y MENÚ MÓVIL (CORREGIDO)
   ============================================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.95); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color); 
    z-index: 9999; 
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 400;
    text-transform: uppercase;
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    letter-spacing: 2px;
    z-index: 10001; /* Siempre arriba del panel móvil */
}

.logo-surname {
    font-weight: 900;
    color: var(--accent-primary);
    margin-left: 5px;
    transition: color 0.3s;
}

.logo:hover .logo-surname {
    color: white;
}

/* ENLACES DE ESCRITORIO */
.nav-links-container {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links-container > li > a {
    color: #ccc;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

.nav-links-container > li > a:hover {
    color: white;
}

/* Estado activo en escritorio */
.nav-links-container li a.active {
    color: var(--accent-primary);
    font-weight: 700;
}

.nav-links-container li a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(0, 255, 157, 0.4); 
    border-radius: 2px;
}

/* DROPDOWN DE OBRAS (ESCRITORIO) */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.nav-dropdown > a::after {
    content: "▼";
    font-size: 0.6rem;
    transition: transform 0.3s ease;
    color: var(--accent-primary);
}
.nav-dropdown:hover > a::after { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    background: rgba(10, 10, 10, 0.98);
    border-top: 3px solid var(--accent-primary); 
    border-radius: 0 0 4px 4px;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 255, 157, 0.05);
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 12px 25px;
    color: #ccc;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.dropdown-menu li:last-child a { border-bottom: none; }
.dropdown-menu li a:hover {
    color: var(--accent-primary);
    background: rgba(0, 255, 157, 0.05);
    padding-left: 30px; 
}

/* 2. OCULTAR LA HAMBURGUESA EN ESCRITORIO */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10000;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* 3. ACTIVAR MÓVIL (Menos de 900px) */
@media (max-width: 900px) {
    /* Mostrar hamburguesa */
    .hamburger {
        display: flex;
    }

    /* Animación de la X (Sincronizado con la clase .active de tu JS) */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--accent-primary);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--accent-primary);
    }

    /* Convertir el menú horizontal en panel lateral oculto */
    .nav-links-container {
        position: fixed;
        top: 0;
        right: 0;
        /* Usamos translateX en lugar de "right: -100%" para evitar el scroll horizontal */
        transform: translateX(100%); 
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.8);
        border-left: 1px solid var(--border-color);
        z-index: 9999;
        margin: 0;
        padding: 0;
    }

    /* Mostrar panel (Sincronizado con la clase .open de tu JS) */
    .nav-links-container.open {
        transform: translateX(0);
    }

    /* Diseño de los enlaces dentro del móvil */
    .nav-links-container > li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    .nav-links-container > li > a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    /* Arreglo del submenú "Obras" en móvil (Acordeón) */
    .nav-dropdown > a { justify-content: center; }
    .dropdown-menu {
        position: static;
        width: 100%;
        border: none;
        border-left: 2px solid var(--accent-primary);
        background: rgba(0, 255, 157, 0.02);
        box-shadow: none;
        margin-top: 5px;
        visibility: visible; 
        opacity: 1;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }
    
    /* Mostrar submenú al tocar */
    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.open .dropdown-menu {
        max-height: 500px;
    }
    .dropdown-menu li a {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    }
}
/* ============================================================
   5. PÁGINA: INICIO (HOME)
   ============================================================ */
.home-hero {
    position: relative;
    padding: 180px 20px 120px 20px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.home-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 255, 157, 0.08) 0%, var(--bg-dark) 70%);
    z-index: -1;
}

.home-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 5rem);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
}

.home-subtitle {
    font-family: var(--font-heading);
    color: var(--accent-primary);
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.home-description {
    font-size: 1.2rem;
    color: #ccc;
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.8;
}

.home-section {
    padding: 100px 20px;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

/* Tarjetas de Proyectos */
.project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 15px 30px rgba(0, 255, 157, 0.1);
}

.project-card-img {
    position: relative;
    width: 100%;
    height: 350px;
    background: #111;
    overflow: hidden;
}

.project-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card-img img { transform: scale(1.05); }

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.8);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 5px 12px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.project-card-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-body h3 {
    font-family: var(--font-heading);
    color: white;
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-card-body p {
    color: #aaa;
    margin-bottom: 25px;
    flex-grow: 1;
    font-size: 1.05rem;
}

.project-meta {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.project-link {
    color: var(--accent-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

/* Destacado Substack */
.substack-highlight {
    padding-top: 80px;
    padding-bottom: 80px;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 255, 157, 0.03) 50%, transparent 100%);
}

.substack-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.substack-content { text-align: left; }
.substack-content p.lead-text { color: white; margin-bottom: 20px; }
.substack-note { font-size: 1.05rem; color: #aaa; line-height: 1.7; margin-bottom: 0; }
.substack-image-container { perspective: 1000px; text-align: center; }
.substack-promo-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.7), 0 0 15px rgba(0, 255, 157, 0.1);
    transition: all 0.5s ease;
}
.substack-image-container:hover .substack-promo-img {
    transform: rotateY(-3deg) scale(1.02);
}

@media (max-width: 900px) {
    .substack-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .substack-content { order: 2; text-align: center; }
    .substack-image-container { order: 1; max-width: 450px; margin: 0 auto; }
    .substack-content .section-heading { justify-content: center; }
}

/* Timeline (Roadmap) */
.roadmap-container { max-width: 800px; margin: 0 auto; position: relative; }
.roadmap-container::before { content: ''; position: absolute; top: 0; bottom: 0; left: 140px; width: 2px; background: var(--border-color); }
.roadmap-item { display: flex; gap: 40px; margin-bottom: 40px; position: relative; }
.roadmap-item::before { content: ''; position: absolute; left: 136px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-dark); border: 2px solid var(--accent-primary); transition: all 0.3s ease; z-index: 1; }
.roadmap-item:hover::before { background: var(--accent-primary); box-shadow: 0 0 10px var(--accent-primary); }
.roadmap-date { font-family: var(--font-heading); color: var(--accent-primary); font-weight: 700; text-transform: uppercase; width: 120px; text-align: right; padding-top: 2px; }
.roadmap-content { background: var(--surface-color); border: 1px solid var(--border-color); padding: 25px; border-radius: 6px; flex-grow: 1; transition: transform 0.3s ease; }
.roadmap-item:hover .roadmap-content { transform: translateX(5px); border-color: rgba(0, 255, 157, 0.3); }
.roadmap-content h3 { font-family: var(--font-heading); color: white; font-size: 1.2rem; margin-bottom: 10px; }

@media (max-width: 768px) {
    .roadmap-container::before { left: 20px; }
    .roadmap-item { flex-direction: column; gap: 15px; }
    .roadmap-item::before { left: 16px; }
    .roadmap-date { text-align: left; padding-left: 40px; width: auto; }
}

/* ============================================================
   6. PÁGINA: CATÁLOGO Y AUTOR
   ============================================================ */
.catalog-hero, .author-hero, .oficio-hero, .contact-hero {
    margin-top: 70px;
    padding: 80px 20px 60px 20px;
    background: linear-gradient(135deg, var(--bg-darker) 0%, rgba(0, 255, 157, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
}

.catalog-content, .author-content { padding-top: 60px; padding-bottom: 80px; }

/* Grid Catálogo */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 30px; }
.catalog-card { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; transition: all 0.3s ease; }
.catalog-card:hover { transform: translateY(-5px); border-color: var(--accent-primary); box-shadow: 0 10px 20px rgba(0, 255, 157, 0.1); }
.catalog-card-img { position: relative; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; }
.catalog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.catalog-card:hover .catalog-card-img img { transform: scale(1.03); }

.catalog-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.8); border: 1px solid var(--accent-primary); color: var(--accent-primary); padding: 4px 10px; font-family: var(--font-heading); font-size: 0.7rem; text-transform: uppercase; border-radius: 4px; backdrop-filter: blur(5px); }
.catalog-card-body { padding: 20px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; }
.catalog-card-body h3 { font-family: var(--font-heading); color: white; font-size: 1.1rem; margin-bottom: 10px; text-transform: uppercase; }
.catalog-meta { font-family: var(--font-body); font-size: 0.85rem; color: #888; margin-bottom: 20px; flex-grow: 1; }

@media (max-width: 600px) { .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; } }

/* Grid Autor */
.author-title { font-family: var(--font-heading); font-size: clamp(2.5rem, 5vw, 4rem); text-transform: uppercase; letter-spacing: 3px; color: white; margin-bottom: 15px; }
.author-subtitle { font-family: var(--font-body); font-size: 1.5rem; font-style: italic; color: var(--accent-primary); }
.author-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; align-items: start; }
.bio-section h2 { font-family: var(--font-heading); font-size: 2rem; text-transform: uppercase; color: white; margin-bottom: 25px; display: flex; align-items: center; gap: 15px; }
.bio-section h2::before { content: ''; width: 4px; height: 30px; background: var(--accent-primary); }
.bio-section p { font-size: 1.15rem; color: #d4d4d4; line-height: 1.9; margin-bottom: 20px; }

.author-sidebar { display: flex; flex-direction: column; gap: 30px; position: sticky; top: 100px; }
.philosophy-card { background: var(--surface-color); border-left: 4px solid var(--accent-primary); padding: 30px; border-radius: 0 6px 6px 0; text-align: center; }
.philosophy-card p { font-size: 1.4rem; font-style: italic; color: white; margin: 0; }
.sidebar-card { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); padding: 25px; border-radius: 6px; }
.sidebar-card h3 { font-family: var(--font-heading); color: var(--accent-primary); font-size: 1.2rem; text-transform: uppercase; margin-bottom: 15px; }

@media (max-width: 900px) { .author-grid { grid-template-columns: 1fr; } .author-sidebar { position: static; } }

/* ============================================================
   7. PÁGINA: LIBRO Y FICHA GEO
   ============================================================ */
.libro-hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 60px 0; overflow: hidden; }
.hero-bg-video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.8; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.2) 50%, rgba(0, 255, 157, 0.15) 100%); z-index: -1; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; width: 100%; }

.cta-title { font-family: var(--font-heading); font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; line-height: 1.1; margin-bottom: 15px; color: white; }
.work-tagline { font-family: var(--font-body); font-style: italic; color: var(--accent-primary); font-size: 1.4rem; margin-bottom: 25px; }
.hero-cover-container { perspective: 1000px; text-align: center; }
.hero-book-cover { max-width: 100%; height: auto; border-radius: 4px; box-shadow: -15px 25px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 255, 157, 0.1); transform: rotateY(-15deg) scale(0.95); transition: transform 0.5s ease; }
.hero-book-cover:hover { transform: rotateY(-5deg) scale(1); }

.libro-main-content { padding-top: 80px; padding-bottom: 80px; }

/* Ficha Técnica (GEO) */
.libro-ficha-tecnica { margin: 4rem 0; padding: 2.5rem; background: var(--bg-darker); border: 1px solid var(--border-color); border-top: 4px solid var(--accent-primary); border-radius: 4px; }
.ficha-titulo { font-family: var(--font-heading); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-primary); margin: 0 0 2rem 0; display: flex; align-items: center; gap: 10px; }
.ficha-titulo::after { content: ''; flex-grow: 1; height: 1px; background: linear-gradient(to right, var(--accent-primary), transparent); }
.ficha-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
.ficha-item { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.ficha-item dt { font-family: var(--font-heading); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.ficha-item dd { font-family: var(--font-body); font-size: 0.95rem; color: var(--text-light); text-align: right; }
.ficha-item dd a,
.ficha-item dd a:visited,
.ficha-item dd a:active { color: var(--accent-primary); text-decoration: none; transition: all 0.3s ease;}
.ficha-item dd a:hover { color: white; text-shadow: 0 0 8px var(--accent-primary);}

@media (max-width: 640px) { .ficha-grid { grid-template-columns: 1fr; } .ficha-item { padding: 0.8rem 0; } }

/* Director's Cut (GEO) */
.extracto-anotado { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); padding: 40px; border-radius: 8px; margin-bottom: 60px; }
.extracto-content { font-size: 1.1rem; line-height: 1.8; color: #ddd; max-width: 800px; }
.annotated-text.neon-primary { position: relative;
    cursor: help;
    border-bottom: 1px dashed #00ffcc;
    color: #00ffcc;
    transition: all 0.3s ease;
    outline: none; }
.annotated-text.neon-primary:hover,
.annotated-text.neon-primary:focus {
    background-color: rgba(0, 255, 204, 0.1);
}
/* El panel holográfico (ESCRITORIO) */
.director-note {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    
    width: 340px; /* Más ancho para que el texto respire */
    padding: 16px 20px; /* Más espacio interno */
    background-color: #0d1117; 
    border-left: 3px solid #00ffcc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 255, 204, 0.2);
    
    color: #e6edf3;
    font-family: 'Courier New', Courier, monospace; 
    font-size: 0.95rem; /* Texto más grande */
    line-height: 1.6; /* Mejor interlineado para lectura */
    text-align: left;
    
    /* Oculto visualmente, indexable por IA */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
}

/* El triángulo apuntador (Escritorio) */
.director-note::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #0d1117 transparent transparent transparent;
}

.annotated-text.neon-primary:hover .director-note,
.annotated-text.neon-primary:focus .director-note {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
@media (max-width: 768px) {
    .director-note {
        /* Se ancla al fondo de la pantalla, evitando desbordamientos */
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto; /* Ocupa el ancho disponible menos el margen */
        
        transform: translateY(20px); /* Animación desde abajo */
        
        border-left: none;
        border-top: 3px solid #00ffcc; /* Borde táctico en la parte superior */
        font-size: 1rem; /* Letra aún más legible en móviles */
        z-index: 99999; /* Por encima de todo, incluyendo el menú */
        box-shadow: 0 -10px 40px rgba(0,0,0,0.9);
    }
    
    /* Ocultamos el triángulo porque el panel ya no flota sobre la palabra */
    .director-note::after {
        display: none;
    }

    .annotated-text.neon-primary:hover .director-note,
    .annotated-text.neon-primary:focus .director-note {
        transform: translateY(0);
    }
}
/* Acordeón de Detalles */
.book-details-accordion { max-width: 850px; margin: 0 auto 60px auto; }
.book-detail { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 6px; margin-bottom: 15px; }
.book-detail summary { padding: 20px 25px; font-family: var(--font-heading); font-weight: 600; color: white; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.book-detail summary::-webkit-details-marker { display: none; }
.book-detail summary::after { content: '+'; color: var(--accent-primary); font-size: 1.5rem; transition: transform 0.3s ease; }
.book-detail[open] summary::after { transform: rotate(45deg); }
.book-detail[open] summary { background: rgba(0, 255, 157, 0.05); border-bottom: 1px solid var(--border-color); }
.detail-content { padding: 25px; color: #ccc; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content { order: 2; }
    .hero-cover-container { order: 1; max-width: 400px; margin: 0 auto; }
    .hero-book-cover { transform: none; }
}

/* ============================================================
   8. PÁGINA: OFICIO Y CONTACTO
   ============================================================ */
.cursos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; margin-bottom: 80px; }
.curso-card { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); border-top: 3px solid var(--accent-primary); border-radius: 6px; padding: 40px; transition: all 0.3s ease; display: flex; flex-direction: column; }
.curso-card:hover { transform: translateY(-5px); border-color: rgba(0, 255, 157, 0.5); }
.curso-numero { font-family: var(--font-heading); font-size: 3rem; font-weight: 900; color: rgba(0, 255, 157, 0.2); margin-bottom: 15px; line-height: 1; }
.curso-card h3 { font-family: var(--font-heading); font-size: 1.5rem; color: white; text-transform: uppercase; margin-bottom: 15px; }

.tutorial-layout { display: grid; grid-template-columns: 280px 1fr; gap: 50px; align-items: start; margin-bottom: 80px; }
.tutorial-sidebar { position: sticky; top: 100px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); border-top: 3px solid var(--accent-primary); border-radius: 6px; padding: 25px 20px; }
.tutorial-nav { list-style: none; padding: 0; }
.tutorial-nav a { color: #999; font-size: 0.9rem; text-decoration: none; display: block; padding-bottom: 12px; }

.form-wrapper { width: 100%; max-width: 700px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); border-top: 3px solid var(--accent-primary); padding: 40px; border-radius: 6px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 25px; }
.form-control { width: 100%; padding: 15px; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--border-color); border-radius: 4px; color: white; font-size: 1rem; transition: all 0.3s ease; }
.form-control:focus { outline: none; border-color: var(--accent-primary); background: rgba(0, 255, 157, 0.05); }

@media (max-width: 900px) { .cursos-grid { grid-template-columns: 1fr; } .tutorial-layout { grid-template-columns: 1fr; } .tutorial-sidebar { position: relative; top: 0; } }

/* ============================================================
   9. CTA SECUNDARIO Y FOOTER
   ============================================================ */
/* Centrado Restaurado para "Historias que Importan" */
.cta-secondary {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 80px 20px;
    text-align: center; /* RESTAURADO: Centra el texto */
}

.cta-secondary h2 {
    font-family: var(--font-heading);
    color: white;
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.cta-secondary p {
    color: #ccc;
    max-width: 600px;
    margin: 0 auto 35px auto; /* RESTAURADO: Centra el bloque de texto */
    font-size: 1.1rem;
}

.site-footer { background: var(--bg-darker); border-top: 1px solid var(--border-color); padding: 70px 0 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-brand .footer-logo { font-family: var(--font-heading); font-size: 2.2rem; color: white; text-decoration: none; display: inline-block; margin-bottom: 15px; }
.footer-logo-surname { font-weight: 900; color: var(--accent-primary); margin-left: 6px; }
.footer-bio { color: #a0a0a0; font-size: 0.95rem; margin-bottom: 25px; max-width: 320px; }

.social-links { display: flex; gap: 15px; }
.social-icon-btn { display: flex; align-items: center; justify-content: center; width: 45px; height: 45px; border-radius: 4px; border: 1px solid var(--border-color); color: white; text-decoration: none; }
.social-icon-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

.footer-links h3 { font-family: var(--font-heading); color: white; font-size: 1.1rem; text-transform: uppercase; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-links h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--accent-primary); }
.footer-links ul { list-style: none; }
.footer-links a { color: #a0a0a0; text-decoration: none; }
.footer-links a:hover { color: white; }

.footer-bottom { border-top: 1px solid var(--border-color); padding: 25px 0; background: #000; }
.footer-bottom-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.footer-bottom p { color: #777; font-size: 0.85rem; font-family: var(--font-heading); }
.footer-bottom a { color: var(--accent-secondary); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-primary); }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bio { margin: 0 auto 25px auto; }
    .social-links { justify-content: center; }
    .footer-links h3::after { left: 50%; transform: translateX(-50%); }
    .footer-bottom-flex { flex-direction: column; text-align: center; gap: 10px; }
}

/* ============================================================
   FICHAS DE SAGAS / SERIES Y ANÉCDOTA (COMPLETO)
   ============================================================ */

/* 1. Contenedor principal de la grilla */
.series-books-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
}

/* 2. Tarjeta individual del libro */
.series-book-card {
    display: flex;
    flex-direction: row;
    background: rgba(13, 17, 23, 0.7);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    position: relative;
    overflow: hidden; /* Evita desbordes de elementos hijos */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.series-book-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 255, 204, 0.1);
}

/* 3. Número de serie (01, 02...) */
.series-book-number {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--accent-primary);
    color: #050505;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    padding: 5px 12px;
    font-size: 1.1rem;
    z-index: 10;
}

/* 4. Contenedor de la portada */
.series-book-img {
    flex: 0 0 280px;
    position: relative;
    background-color: #0d1117;
    display: block; /* Forzamos block para evitar estiramientos de flexbox */
}

.series-book-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-right: 1px solid var(--border-color);
    transition: opacity 0.3s ease;
}

.series-book-card:hover .series-book-img img {
    opacity: 0.8;
}

/* 5. Insignia sobre la portada (Blindada contra herencias) */
.series-book-img .catalog-badge {
    position: absolute;
    top: 15px; 
    right: 15px;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    margin: 0;
    background: rgba(13, 17, 23, 0.95);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0,0,0,0.9);
    z-index: 20;
    border-radius: 3px;
    display: inline-block;
    backdrop-filter: none; /* Mata cualquier desenfoque heredado */
}

.series-book-img .catalog-badge.highlight {
    background: var(--accent-primary);
    color: #050505;
}

/* 6. Información del libro */
.series-book-info {
    padding: 40px 40px 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.series-book-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 5px;
    margin-top: 0;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.series-book-date {
    font-family: 'Courier New', Courier, monospace;
    color: var(--accent-primary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.series-book-desc {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1.05rem;
}

/* 7. SECCIÓN DE ANÉCDOTA (Origen de la historia) */
.origin-story {
    background: rgba(13, 17, 23, 0.6);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    padding: 40px;
    margin-bottom: 60px;
    border-radius: 4px;
}

.origin-story h2, 
.origin-story h3 {
    color: var(--accent-primary);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    margin-top: 30px;
    line-height: 1.3;
}

.origin-story h2:first-child,
.origin-story h3:first-child {
    margin-top: 0;
}

.origin-story p {
    color: #e6edf3;
    line-height: 1.8; /* Excelente legibilidad */
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.origin-story p:last-child {
    margin-bottom: 0;
}

.origin-story strong {
    color: #ffffff;
    font-weight: 600;
    background: rgba(0, 255, 204, 0.1); /* Resaltado sutil tipo neón */
    padding: 0 4px;
    border-radius: 2px;
}

/* ============================================================
   8. RESPONSIVE PARA SAGAS (Móvil)
   ============================================================ */
@media (max-width: 768px) {
    .series-book-card {
        flex-direction: column; 
        border-left: 1px solid var(--border-color);
        border-top: 3px solid var(--accent-primary);
    }
    
    .series-book-card:hover {
        transform: translateY(-5px); 
    }

    .series-book-img {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 3;
        display: block;
    }

    .series-book-img img {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .series-book-info {
        padding: 30px 20px;
    }
    
    .series-book-info h3 {
        font-size: 1.5rem;
    }
    
    .origin-story {
        padding: 25px 20px;
    }
    
    .origin-story p {
        font-size: 1rem;
    }
}