/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    /* Colors */
    --bg-color: #faf8f5; /* Crema suave */
    --text-color: #1a1a1a;
    --accent-color: #a04940; /* Terracota / Granate */
    --footer-bg: #0c111f;
    
    /* "Watercolor" backdrop colors */
    --art-blue: #9eb8ce;
    --art-green: #a8bfa1;
    --art-yellow: #dbb35e;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --section-spacing: 120px;
    --gap-large: 60px;
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
}

h1, h2, h3, h4, .logo {
    font-family: var(--font-heading);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Clases utilitarias para animaciones futuras */
.fade-in {
    /* Listo para usar con IntersectionObserver en JS */
    opacity: 1; 
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* =========================================
   PLACEHOLDERS DE IMÁGENES
   ========================================= */
.image-placeholder {
    background-color: #e2dfd8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
    position: relative;
    z-index: 2;
    border: 1px dashed #ccc; /* Para distinguirlos mientras se maqueta */
}

.hero-picture { width: 100%; display: block; }
.hero-img { width: 100%; height: auto; display: block; object-fit: cover; }
.feature-img { object-fit: cover; display: block; position: relative; z-index: 2; }
.portrait { aspect-ratio: 4 / 5; width: 100%; max-width: 450px; }
.tall { aspect-ratio: 2 / 3; width: 100%; max-width: 400px; }
.square { aspect-ratio: 1 / 1; width: 100%; }
.landscape { aspect-ratio: 16 / 9; width: 100%; }
.book-cover { aspect-ratio: 2 / 3; width: 100%; max-width: 300px; }

/* Formas artísticas de fondo (Acuarelas simuladas) */
.art-backdrop {
    position: absolute;
    z-index: 1;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(10px);
    opacity: 0.7;
}
.bg-blue { background-color: var(--art-blue); width: 250px; height: 250px; top: 10%; left: -10%; }
.bg-green { background-color: var(--art-green); width: 300px; height: 200px; }
.bg-yellow { background-color: var(--art-yellow); width: 200px; height: 250px; top: 20%; right: -5%; }
.bg-blue-light { background-color: var(--art-blue); width: 200px; height: 200px; bottom: -10%; left: -5%; }

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
    display: inline-block;
    border: 1px solid var(--text-color);
    padding: 10px 30px;
    margin-top: 20px;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    background: transparent;
}
.btn-primary:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

.btn-white {
    color: #ffffff !important;
    border-color: #ffffff !important;
}
.btn-white:hover {
    background: #ffffff !important;
    color: #1a2530 !important;
}

/* =========================================
   HEADER
   ========================================= */
.site-header {
    position: sticky;
    top: 0;
    background-color: rgba(250, 248, 245, 0.95);
    z-index: 100;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px;
    transition: all 0.3s ease;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
}

.hamburger-menu span {
    width: 100%;
    height: 2px;
    background: var(--text-color);
    transition: all 0.3s ease;
    transform-origin: left;
}

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

.nav-links a {
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.logo {
    font-size: 2rem;
    letter-spacing: 2px;
}

/* =========================================
   SECCIONES SPLIT (Texto + Imagen)
   ========================================= */
.split-section {
    max-width: var(--container-width);
    margin: var(--section-spacing) auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: var(--gap-large);
}

.split-section.reverse {
    flex-direction: row-reverse;
}

.split-content {
    flex: 1;
    position: relative;
}

.left-image-wrapper, .right-image-wrapper {
    display: flex;
    justify-content: center;
}

.text-content h2 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.text-content-subtitle {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-top: 15px;
    margin-bottom: 0;
}

.text-content p {
    font-size: 1rem;
    color: #444;
    max-width: 400px;
}

/* =========================================
   COLLAGE SECTION
   ========================================= */
.collage-section {
    max-width: 800px;
    margin: var(--section-spacing) auto;
    position: relative;
    padding: 0 20px;
}

.collage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    position: relative;
    z-index: 2;
}

.item-1 { max-width: 300px; margin-left: auto; }
.item-2 { max-width: 200px; margin-top: 50px; }
.item-3 { grid-column: 1 / -1; max-width: 250px; margin: 20px auto 0; }

.collage-backdrop {
    top: 20%;
    left: 40%;
}

/* =========================================
   TRAILER SECTION
   ========================================= */
.trailer-section {
    max-width: 1000px;
    margin: var(--section-spacing) auto;
    padding: 0 20px;
}

.trailer-section h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.video-player {
    position: relative;
}

.play-btn-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   BOOKS GRID
   ========================================= */
.books-section {
    max-width: 800px;
    margin: var(--section-spacing) auto;
    padding: 0 20px;
    text-align: center;
}

.books-section h2 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.books-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    text-align: left;
}

.offset-card {
    margin-top: 80px;
}

.book-desc {
    margin-top: 20px;
    font-size: 0.9rem;
    max-width: 250px;
}

/* =========================================
   MY STORY SECTION
   ========================================= */
.story-section {
    max-width: var(--container-width);
    margin: var(--section-spacing) auto;
    padding: 0 20px;
    display: flex;
    gap: var(--gap-large);
    align-items: flex-end;
}

.story-header h2 {
    font-size: 3.5rem;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.story-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-end;
}

.story-images {
    position: relative;
    display: flex;
    align-items: flex-end;
}

.story-main { width: 400px; height: 500px; }
.story-small { width: 150px; height: 200px; margin-left: -50px; margin-bottom: 50px; }
.story-backdrop { top: -20px; right: -20px; }

.story-text {
    max-width: 300px;
    margin-bottom: 50px;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    font-family: var(--font-heading);
    font-style: italic;
    border-bottom: 1px solid var(--text-color);
}

/* =========================================
   NEWSLETTER & FOOTER
   ========================================= */
.newsletter-section {
    max-width: 600px;
    margin: var(--section-spacing) auto;
    padding: 0 20px;
}

.newsletter-container {
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

.newsletter-logo { flex: 1; }

.newsletter-form {
    flex: 2;
    display: flex;
    border-bottom: 1px solid var(--text-color);
}

.newsletter-form input {
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 0;
    width: 100%;
    font-family: var(--font-body);
}

.newsletter-form button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.site-footer {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 60px 20px 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas distribuidas uniformemente */
    gap: 40px;
    margin-bottom: 60px;
}

.footer-column h3, .footer-column h4 {
    margin-bottom: 20px;
}

.footer-column a {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-column a:hover { opacity: 1; }
.social-links { 
    display: flex; 
    gap: 25px; 
    margin-top: 15px;
}
.social-links a { 
    font-size: 2.5rem; 
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.social-links a:hover { 
    transform: scale(1.1); 
}
.footer-bottom {
    max-width: var(--container-width);
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    display: flex;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* =========================================
   MEDIA QUERIES (Mobile Responsiveness)
   ========================================= */
@media (max-width: 900px) {
    .site-header {
        background-color: var(--bg-color);
        height: 68px; /* Evita que el contenido salte cuando el menú se vuelve fixed */
    }

    .main-nav {
        position: relative;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hamburger-menu {
        display: flex;
        position: absolute;
        left: 20px;
        top: 25px;
    }

    /* Fondo deslizante del menú */
    .main-nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: var(--bg-color);
        z-index: 9998;
        transform: translateY(-100%);
        transition: transform 0.5s ease-in-out;
    }

    .main-nav.menu-open::before {
        transform: translateY(0);
    }

    /* Asegurar que el botón de hamburguesa quede por encima del fondo */
    .hamburger-menu {
        z-index: 10000;
    }

    /* Enlaces del menú animándose junto con el fondo */
    .nav-links {
        display: flex;
        position: fixed;
        left: 0;
        width: 100vw;
        z-index: 9999;
        flex-direction: column;
        align-items: center;
        gap: 40px; /* Separación perfectamente cuadrada */
        padding: 0;
        transition: transform 0.5s ease-in-out;
    }

    .nav-links.left-links {
        top: 50%;
        /* Empieza arriba fuera de pantalla */
        transform: translateY(calc(-100% - 20px - 100vh));
    }

    .nav-links.right-links {
        top: 50%;
        /* Empieza arriba fuera de pantalla */
        transform: translateY(calc(20px - 100vh));
    }

    .nav-links a {
        font-size: 2.2rem; /* Ligeramente más grande */
        font-weight: 700; /* Letra con mayor grosor */
        text-transform: uppercase;
        letter-spacing: 2px;
        line-height: 1; /* Altura perfecta para el cálculo visual */
    }

    .main-nav.menu-open .nav-links.left-links {
        /* Centrado exacto, terminando a 20px del centro de la pantalla */
        transform: translateY(calc(-100% - 20px));
    }

    .main-nav.menu-open .nav-links.right-links {
        /* Centrado exacto, empezando a 20px del centro de la pantalla */
        transform: translateY(20px);
    }

    /* Ocultar el logo suavemente cuando el menú baja */
    .main-nav .logo {
        transition: opacity 0.3s ease;
        position: relative;
        z-index: 9999;
    }
    
    .main-nav.menu-open .logo {
        opacity: 0;
        pointer-events: none;
    }

    /* Animación del ícono hamburguesa */
    .menu-open .hamburger-menu span:first-child {
        transform: rotate(45deg);
    }
    .menu-open .hamburger-menu span:nth-child(2) {
        opacity: 0;
    }
    .menu-open .hamburger-menu span:last-child {
        transform: rotate(-45deg);
    }
    
    .split-section, .split-section.reverse {
        flex-direction: column;
        text-align: center;
    }
    
    .text-content p {
        margin: 0 auto;
    }
    
    .story-section {
        flex-direction: column;
        align-items: center;
    }
    
    .story-header h2 {
        writing-mode: horizontal-tb;
        transform: none;
    }
    
    .story-content {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
    .offset-card { margin-top: 0; }
    
    .newsletter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .social-links { justify-content: center; }
}

/* =========================================
   ABOUT ME PAGE SPECIFIC
   ========================================= */
.page-sobre-mi {
    margin-top: 0;
    background-color: var(--bg-color);
}

.about-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: var(--section-spacing) 0;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('assets/images/portadas-03.png');
}

.about-hero-spacer {
    flex: 1 1 50%;
    min-width: 300px;
}

.about-hero-text {
    flex: 1 1 50%;
    min-width: 300px;
    padding: 0 40px;
    transform: translateY(-15vh);
}

.about-hero-text h1 {
    font-size: 1.4rem;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
}

.highlight-script {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--accent-color);
    text-transform: none;
    font-size: 7rem;
}

.about-intro-section {
    position: relative;
    text-align: center;
}

.about-intro-overlap-box {
    background-color: #fff;
    border: 1px solid #d8c8b8;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2;
    transform: translateY(-50%);
}

.about-intro-overlap-box h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.about-intro-overlap-box p {
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.about-intro-dark {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 120px 20px 60px; /* Extra padding top for overlap */
    text-align: center;
}

.about-intro-dark p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.toc-list li {
    margin-bottom: 25px;
    font-size: 1.6rem;
    line-height: 1.5;
}

.about-details-section {
    padding: var(--section-spacing) 20px;
    background-color: #fff;
}

.about-details-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-details-image {
    flex: 0 0 300px;
    position: relative;
}

.about-details-image .framed-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 15px solid #eaeaea;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.about-details-text {
    flex: 1;
}

.about-details-text h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.about-details-text p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.section-divider {
    text-align: center;
    margin: 60px 0 40px;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background-color: #d8c8b8;
    z-index: 1;
}

.section-divider span {
    background-color: var(--bg-color);
    padding: 0 20px;
    position: relative;
    z-index: 2;
    font-size: 1.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.script-font-divider span {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    text-transform: none;
    font-size: 2.5rem;
    letter-spacing: normal;
}

.blog-grid-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.blog-card {
    text-align: center;
}

.blog-card h4 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.blog-card-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.blog-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-overlay {
    position: absolute;
    bottom: 20px;
    left: 10%;
    right: 10%;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.about-books-section {
    padding-bottom: 40px;
}

.about-books-container {
    max-width: 900px;
    margin: 0 auto var(--section-spacing);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 20px;
}

.book-card {
    display: flex;
    gap: 20px;
    align-items: center;
}

.book-card img {
    width: 120px;
    height: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.book-card-info p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.featured-logos-section {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.featured-logos-section h4 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.logos-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    align-items: center;
}

.logo-placeholder {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    opacity: 0.7;
}

.newsletter-dark-section {
    background-color: var(--footer-bg);
    color: #fff;
    padding: 60px 20px;
    text-align: center;
}

.newsletter-dark-section h4 {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.newsletter-dark-section p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.newsletter-dark-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.newsletter-dark-form input {
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    min-width: 250px;
}

.newsletter-dark-form button {
    padding: 15px 30px;
    background-color: #e6c8ce;
    color: var(--footer-bg);
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

.newsletter-dark-form button:hover {
    background-color: #d4b2b8;
}

/* Responsive Overrides for About Page */
@media (max-width: 900px) {
    .about-details-container {
        flex-direction: column;
        align-items: center;
    }
    .about-details-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        order: -1;
    }
    .about-details-text {
        text-align: center;
    }
    .blog-grid-container {
        grid-template-columns: 1fr 1fr;
    }
    .about-books-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .about-hero {
        background-image: url('assets/images/portadas-04.png');
    }
    .about-hero-text h1 {
        font-size: 1.2rem;
    }
    .highlight-script {
        font-size: 5rem;
    }
    .about-intro-overlap-box {
        transform: translateY(-50%);
        padding: 20px;
        width: 90%;
    }
    .about-intro-overlap-box h2 {
        font-size: 2.5rem;
    }
    .blog-grid-container {
        grid-template-columns: 1fr;
    }
    .newsletter-dark-form input {
        width: 100%;
        min-width: 100%;
    }
}

/* =========================================
   BOOK PAGE STYLES
   ========================================= */
.page-book {
    padding-top: 0; /* Header is transparent by default so let hero take full space */
    background-color: var(--bg-color);
}

.book-hero-section {
    background-color: #1a2530; /* Dark slate blue/grey like reference */
    background-image: url('assets/images/portadas-05.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text-light);
    padding: 140px 5% 80px; /* Extra top padding to account for fixed header */
    display: flex;
    justify-content: center;
    min-height: 700px;
}

.book-hero-container {
    max-width: 1200px;
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.book-hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.book-hero-image img {
    max-width: 100%;
    width: 400px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.book-hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.book-hero-text h1 {
    font-size: 4rem;
    font-family: var(--font-heading);
    margin-bottom: 20px;
    line-height: 1.1;
    color: #ffffff;
}

.book-subtitle {
    font-size: 1.4rem;
    font-family: var(--font-heading);
    margin-bottom: 40px;
    color: #ffffff;
    max-width: 500px;
    line-height: 1.4;
}

.btn-book-buy {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--text-light);
    border-radius: 30px;
    padding: 12px 30px;
    font-weight: 400;
    font-family: var(--font-body);
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0;
}

.btn-book-buy:hover {
    background: var(--text-light);
    color: #1a2530;
}

/* Synopsis Section */
.book-synopsis-section {
    background-color: #f7f6f2; /* Light cream */
    padding: 80px 5% 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-synopsis-content {
    max-width: 800px;
    text-align: center;
}

.book-synopsis-content p {
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.book-divider {
    width: 80%;
    max-width: 800px;
    height: 1px;
    background-color: #e0e0e0;
    margin: 40px auto;
}

/* TOC Section */
.book-toc-section {
    background-color: #f7f6f2;
    padding: 40px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-toc-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    color: var(--text-dark);
}

.book-toc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
    width: 100%;
}

.toc-column ol {
    list-style-position: outside;
    margin-left: 20px;
}

.toc-column li {
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.5;
    color: var(--text-dark);
    font-family: var(--font-body);
}

/* Share Section */
.book-share-section {
    background-color: #f7f6f2;
    padding: 40px 5%;
    text-align: center;
}

.book-share-section h3 {
    font-family: var(--font-body);
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.book-share-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 2.2rem;
}

.share-icon:hover {
    background-color: var(--primary-color);
}

/* Related Content Section */
.book-related-section {
    background-color: #f7f6f2;
    padding: 40px 5% 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-related-section h3 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.book-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
    width: 100%;
    margin-bottom: 50px;
}

.related-card {
    background: #fff;
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.related-card-content {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.related-tag {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    color: #555;
}

.related-card h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    line-height: 1.3;
    margin: 0;
}

.btn-explore {
    border-radius: 30px;
    padding: 12px 30px;
    border: 1px solid var(--text-dark);
    background: transparent;
    color: var(--text-dark);
    text-transform: none;
    letter-spacing: 0;
}
.btn-explore:hover {
    background: var(--text-dark);
    color: #fff;
}

/* RESPONSIVE BOOK PAGE */
@media (max-width: 992px) {
    .book-hero-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    
    .book-hero-image {
        justify-content: center;
    }
    
    .book-hero-text {
        align-items: center;
    }
    
    .book-toc-grid, .book-related-grid {
        grid-template-columns: 1fr;
    }
    
    .toc-column {
        text-align: center;
    }
    
    .toc-list {
        list-style: none;
        padding-left: 0;
    }
    
    .book-hero-text h1 {
        font-size: 3rem;
    }
    
    /* Mobile hero specific layout */
    .book-hero-section {
        background-image: url('assets/images/portadas-07.png');
        background-position: center top;
        background-size: 100% auto;
        min-height: auto;
        padding: 50vw 0 0 0; 
        display: block;
    }
    
    .book-hero-container {
        background-color: #1a2530;
        padding: 30px 5%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .book-hero-text h1, 
    .book-hero-text .book-subtitle {
        color: #ffffff;
    }
}

/* =========================================
   CONTACTO PAGE
   ========================================= */
.page-contacto {
    margin-top: 0;
    background-color: var(--bg-color);
}

.contacto-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--section-spacing) 5%;
    min-height: 40vh;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    margin-top: 100px;
}

.contacto-hero-text h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 20px;
}

.contacto-hero-text p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.contacto-form-section {
    padding: var(--section-spacing) 5%;
    background-color: var(--bg-color);
}

.contacto-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contacto-info h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.contacto-info p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 40px;
    line-height: 1.6;
}

.contacto-details {
    margin-bottom: 40px;
}

.contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contacto-item i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.contacto-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-dark);
}

.contacto-item a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.contacto-item a:hover {
    color: var(--accent-color);
}

.contacto-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

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

.social-links-large a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-light);
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.social-links-large a:hover {
    transform: translateY(-5px);
    background-color: var(--accent-color);
}

.contacto-form-wrapper {
    background-color: #ffffff;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.contacto-form .form-group {
    margin-bottom: 25px;
}

.contacto-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.contacto-form input,
.contacto-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.contacto-form input:focus,
.contacto-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contacto-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--text-light);
    transition: background-color 0.3s ease;
}

.contacto-form .btn-primary:hover {
    background-color: var(--accent-color);
}

@media (max-width: 900px) {
    .contacto-container {
        grid-template-columns: 1fr;
    }
    
    .contacto-hero-text h1 {
        font-size: 3rem;
    }
    
    .contacto-form-wrapper {
        padding: 30px;
    }
}

/* =========================================
   MEDIA PAGE
   ========================================= */
.page-media {
    margin-top: 0;
    background-color: var(--bg-color);
}

.media-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--section-spacing) 5%;
    min-height: 40vh;
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    margin-top: 100px;
}

.media-hero-text h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    margin-bottom: 20px;
}

.media-hero-text p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.media-gallery-section {
    padding: var(--section-spacing) 5%;
    background-color: var(--bg-color);
}

.media-gallery-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.media-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
    cursor: pointer;
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 37, 48, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-overlay span {
    color: var(--text-light);
    font-size: 1.2rem;
    font-family: var(--font-heading);
    border: 1px solid var(--text-light);
    padding: 10px 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.media-item:hover img {
    transform: scale(1.05);
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-item:hover .media-overlay span {
    transform: translateY(0);
}

/* Videos Section */
.media-videos-section {
    padding: var(--section-spacing) 5%;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.videos-header {
    text-align: center;
    margin-bottom: 40px;
}

.videos-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.videos-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.videos-grid {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.video-item {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

@media (max-width: 900px) {
    .media-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .media-hero-text h1 {
        font-size: 3rem;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .media-gallery-grid {
        grid-template-columns: 1fr;
    }
}
