/* ============================================
   FUENTES PERSONALIZADAS
   ============================================ */
@font-face {
    font-family: 'Nomad';
    src: url('fnt/Nomad.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noche';
    src: url('fnt/Noche-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noche';
    src: url('fnt/Noche-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    /* Colores principales */
    --color-rojo: #8e0c25;
    /* --color-amarillo: #ffbf00; */
    --color-amarillo: #faf2b0;
    --color-hueso: #faf2b0;
    --color-negro: #000000;
    --color-blanco: #ffffff;
    
    /* Fuentes */
    --font-titulo: 'Nomad', serif;
    --font-texto: 'Noche', serif;
    
    /* Sombras */
    --sombra-texto-titulo: 4px 4px 0 var(--color-rojo);
    --sombra-caja: 0 8px 30px rgba(142, 12, 37, 0.5);
    --sombra-caja-fuerte: 0 12px 40px rgba(142, 12, 37, 0.8);
    
    /* Transiciones */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-texto);
    font-weight: 400;
    color: var(--color-hueso);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    background-color: var(--color-negro);
}

::selection {
    background-color: var(--color-rojo);
    color: var(--color-amarillo);
}

/* ============================================
   FRANJAS BLUR SUPERIORES E INFERIORES
   ============================================ */
.blur-strip-top,
.blur-strip-bottom {
    position: fixed;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(180deg, var(--color-rojo) 0%, transparent 100%);
    z-index: 9999;
    pointer-events: none;
    filter: blur(3px);
}

.blur-strip-top {
    top: 0;
}

.blur-strip-bottom {
    bottom: 0;
    background: linear-gradient(0deg, var(--color-rojo) 0%, transparent 100%);
}

/* ============================================
   MENÚ FLOTANTE - BOTÓN LIBRO
   ============================================ */
.menu-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    background-color: var(--color-negro);
    border: 3px solid var(--color-rojo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 6px 25px rgba(142, 12, 37, 0.6);
    transition: var(--transition-smooth);
}

.menu-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 10px 35px rgba(142, 12, 37, 0.9);
}

.menu-toggle img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

/* ============================================
   MENÚ DESPLEGABLE - HORIZONTAL
   ============================================ */
.menu-nav {
    position: fixed;
    top: 10px;
    right: -100%;
    height: auto;
    /* background-color: rgba(255, 191, 0, 0.6); */
    background-color: var(--color-hueso);
    border-radius: 1rem 0 0 1rem;
    border: .2rem solid var(--color-negro);
    border-right-color: var(--color-hueso);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    padding: 0px 100px 0px 40px;
    transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.menu-nav.active {
    right: 0;
}

.menu-items {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0 0px 0;
    text-decoration: none;
    color: var(--color-rojo);
    font-family: var(--font-titulo);
    font-size: 1.4rem;
    border-bottom: 5px solid transparent;
    border-right: 5px solid transparent;
    transition: var(--transition-smooth);
}

.menu-item:hover {
    transform: translateY(-3px);
    border-bottom-color: var(--color-negro);
}

.menu-item.active {
    border-bottom-color: var(--color-negro);
    border-right-color: var(--color-negro);
    color: var(--color-negro);
    font-weight: bold;
    /* background-color: rgba(216, 203, 165, 0.6); */
}

.menu-text {
    order: 1;
    max-width: 50px;
    line-height: 1;
}

.menu-icon {
    order: 2;
    width: 50px;
    height: 80px;
    object-fit: contain;
}

/* ============================================
   SECCIONES BASE
   ============================================ */
.section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url(img/index-bg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.section-border {
    max-width: 1400px;
    width: calc(100% - 80px);
    min-height: calc(100vh - 80px);
    margin: 0 auto;
    border: 4px solid var(--color-rojo);
    border-radius: 30px;
    padding: 60px 40px;
    position: relative;
    background-color: transparent;
}

.section-content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* ============================================
   SECCIÓN 1: HOME
   ============================================ */
.section-home {
    background-image: url('img/home-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}


.home-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    margin-top: 8%;
}

/* Tarjeta giratoria */
.flip-card {
    perspective: 1000px;
    width: 400px;
    height: 550px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card-inner.flipped {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 5px solid var(--color-amarillo);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--sombra-caja-fuerte);
}

.flip-card-front {
    background-color: var(--color-negro);
    transform: rotate(-5deg);
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flip-card-back {
    background-color: var(--color-rojo);
    transform: rotateY(180deg) rotate(5deg);
    padding: 40px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-text {
    color: var(--color-hueso);
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

/* Texto nombre y título */
.home-title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.home-name {
    font-family: var(--font-titulo);
    font-size: 5rem;
    color: var(--color-amarillo);
    text-shadow: var(--sombra-texto-titulo);
    line-height: 1.1;
}

.home-subtitle {
    font-family: var(--font-titulo);
    font-size: 2.5rem;
    color: var(--color-amarillo);
    text-shadow: var(--sombra-texto-titulo);
}

/* Eslogan - FIJO en la esquina inferior derecha */
.home-tagline {
    font-family: var(--font-texto);
    font-style: italic;
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--color-hueso);
    margin-top: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Máquina que huye del cursor */
.fleeing-machine {
    position: absolute;
    width: 80px;
    height: 80px;
    transition: all 0.15s ease-out;
    pointer-events: all;
    z-index: 5;
    cursor: not-allowed;
}

.fleeing-machine img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

/* ============================================
   SECCIÓN 2: AMISTAD NIGROMANTE
   ============================================ */
.section-amistad {
    background-color: var(--color-hueso);
    background-image: none;
}

.amistad-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.amistad-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
}

.amistad-logo {
    width: 100%;
    max-width: 800px;
}

.amistad-text {
    color: var(--color-negro);
    font-size: 1.2rem;
    line-height: 1.7;
    text-align: justify;
}

.amistad-lebri {
    width: 200px;
    align-self: center;
}

.amistad-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.amistad-book {
    width: 100%;
    max-width: 650px;
    animation: bounce 3s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================================
   MICRO-SECCIONES: FRASES CON EFECTO PINCELADA
   ============================================ */
.phrase-section {
    margin: 0px 0 0 0;
    padding: 0;
    background-color: var(--color-rojo);
    min-height: 100px;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    /* Efecto de pincelada más quebrado y agresivo */
    /* clip-path: polygon(
        0% 8%, 1% 2%, 3% 12%, 5% 0%, 7% 10%, 9% 3%, 12% 15%, 15% 1%, 
        18% 11%, 21% 4%, 24% 14%, 27% 2%, 30% 9%, 33% 5%, 36% 13%, 39% 1%,
        42% 10%, 45% 3%, 48% 12%, 51% 0%, 54% 11%, 57% 4%, 60% 14%, 63% 2%,
        66% 9%, 69% 5%, 72% 13%, 75% 1%, 78% 10%, 81% 4%, 84% 12%, 87% 2%,
        90% 11%, 93% 3%, 96% 13%, 98% 1%, 99% 8%, 100% 5%,
        
        100% 92%, 99% 98%, 97% 88%, 95% 100%, 93% 90%, 91% 97%, 88% 85%, 85% 99%,
        82% 89%, 79% 96%, 76% 86%, 73% 98%, 70% 91%, 67% 95%, 64% 87%, 61% 99%,
        58% 90%, 55% 97%, 52% 88%, 49% 100%, 46% 89%, 43% 96%, 40% 86%, 37% 98%,
        34% 91%, 31% 95%, 28% 87%, 25% 99%, 22% 90%, 19% 96%, 16% 88%, 13% 98%,
        10% 89%, 7% 97%, 4% 87%, 2% 99%, 1% 92%, 0% 95%
    ); */
}

.phrase-content {
    padding: 2rem 0;
    display: grid;
    grid-template-columns: 80% auto 20%;
    gap: 20px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.phrase-text {
    font-family: var(--font-texto);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--color-amarillo);
    text-align: left;
    line-height: 1.7;
}

/* Divisor con línea de puntos */
.phrase-divider {
    width: 2px;
    height: 100%;
    min-height: 80px;
    background-image: repeating-linear-gradient(
        to bottom,
        var(--color-negro),
        var(--color-negro) 4px,
        transparent 4px,
        transparent 8px
    );
}

.phrase-source {
    text-align: right;
    font-family: var(--font-texto);
    font-size: 1rem;
    color: var(--color-amarillo);
}

.phrase-story {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.phrase-publication {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ============================================
   SECCIÓN 3: CEMENTERIO NIGROMANTE
   ============================================ */
.section-cemetery {
    background-color: var(--color-negro);
}

.cemetery-title {
    font-family: var(--font-titulo);
    font-size: 8rem;
    color: var(--color-amarillo);
    text-shadow: var(--sombra-texto-titulo);
    text-align: center;
    margin-bottom: 40px;
}

.cemetery-description {
    color: var(--color-hueso);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.cemetery-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.cemetery-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 0;
    background-color: transparent;
    border: none;
    text-decoration: none;
    transition: var(--transition-bounce);
    cursor: pointer;
}

.cemetery-button:hover {
    transform: translateY(-15px) scale(1.1);
}

.cemetery-button img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(142, 12, 37, 0.6));
    transition: var(--transition-smooth);
}

.cemetery-button:hover img {
    filter: drop-shadow(0 8px 30px rgba(142, 12, 37, 0.9));
}

.cemetery-button-line {
    width: 100%;
    height: 2px;
    background-color: var(--color-hueso);
}

.cemetery-button-year {
    font-family: var(--font-titulo);
    font-size: 2rem;
    color: var(--color-hueso);
}

/* ============================================
   SECCIÓN 4: LECTOR INEFABLE
   ============================================ */
.section-lector {
    background-color: var(--color-negro);
}

.lector-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.lector-left {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.lector-title {
    font-family: var(--font-titulo);
    font-size: 6rem;
    color: var(--color-amarillo);
    text-shadow: var(--sombra-texto-titulo);
}

.lector-text {
    color: var(--color-hueso);
    font-size: 1.2rem;
    line-height: 1.7;
}

.lector-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0px;
    background-color: var(--color-amarillo);
    border: 3px solid var(--color-rojo);
    border-radius: 10px;
    color: var(--color-rojo);
    font-family: var(--font-titulo);
    font-size: 3rem;
    text-decoration: none;
    transition: var(--transition-bounce);
    cursor: pointer;
    width: 100%;
}

.lector-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--sombra-caja-fuerte);
}

/* Rompecabezas */
.puzzle-container {
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1;
    position: relative;
    border-top: 5px solid var(--color-amarillo);
    border-bottom: 5px solid var(--color-amarillo);
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: var(--sombra-caja);
    margin: 0 auto;
}

.puzzle-piece {
    position: absolute;
    cursor: move;
    transition: transform 0.3s ease;
}

.puzzle-piece:hover {
    transform: scale(1.05);
    z-index: 100;
}

.puzzle-piece.correct {
    cursor: default;
    animation: piecePlaced 0.5s ease;
}

/* Botón de reinicio del puzzle */
.puzzle-reset-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-color: var(--color-amarillo);
    border: 3px solid var(--color-rojo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3000;
    transition: var(--transition-bounce);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.puzzle-reset-button:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 6px 25px rgba(142, 12, 37, 0.6);
}

.puzzle-reset-button svg {
    color: var(--color-rojo);
}

@keyframes piecePlaced {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.5) drop-shadow(0 0 15px var(--color-amarillo)); }
    100% { filter: brightness(1); }
}

/* ============================================
   SECCIÓN 5: GALERÍA DE HORRORES
   ============================================ */
.section-galeria {
    background-color: var(--color-negro);
}

.galeria-title {
    font-family: var(--font-titulo);
    font-size: 8rem;
    color: var(--color-amarillo);
    text-shadow: var(--sombra-texto-titulo);
    text-align: center;
    margin-bottom: 20px;
}

.galeria-subtitle {
    color: var(--color-hueso);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.slider-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 80px;
}

.slider-wrapper {
    overflow: hidden;
    border-radius: 15px;
}

.slider-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.slide {
    min-width: 100%;
    background-color: var(--color-hueso);
    border: 5px solid var(--color-amarillo);
    border-radius: 15px;
    padding: 50px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
}

.slide-left h3 {
    font-family: var(--font-titulo);
    font-size: 2rem;
    color: var(--color-rojo);
    margin-bottom: 10px;
}

.slide-left .slide-author {
    font-size: 1.1rem;
    color: var(--color-negro);
    font-style: italic;
    margin-bottom: 20px;
}

.slide-left .slide-opinion {
    color: var(--color-negro);
    font-size: 1.1rem;
    line-height: 1.6;
}

.slide-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide-image {
    max-width: 300px;
    animation: bounce 3s ease-in-out infinite;
}

.slider-icon {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    height: 150px;
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: var(--color-rojo);
    border: 3px solid var(--color-amarillo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 10;
}

.slider-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--sombra-caja);
}

.slider-prev {
    left: 0;
}

.slider-next {
    right: 0;
}

.slider-button svg {
    width: 24px;
    height: 24px;
    fill: var(--color-amarillo);
}

/* ============================================
   SECCIÓN 6: FOOTER / CONTACTO
   ============================================ */
.section-footer {
    background-color: var(--color-negro);
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0px 20px 0;
    min-height: auto;
    position: relative;
}

/* .section-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--color-rojo);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 95% 80%, 90% 100%, 85% 70%, 80% 100%, 75% 85%, 70% 100%, 65% 75%, 60% 100%, 55% 80%, 50% 100%, 45% 75%, 40% 100%, 35% 85%, 30% 100%, 25% 70%, 20% 100%, 15% 80%, 10% 100%, 5% 85%, 0 100%);
} */

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
}

.footer-title {
    font-family: var(--font-titulo);
    font-size: 5rem;
    color: var(--color-rojo);
    margin-bottom: 30px;
}

/* Formulario */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group input,
.form-group textarea {
    padding: 15px;
    border: 1px solid var(--color-hueso);
    border-radius: 8px;
    font-family: var(--font-texto);
    font-size: 1rem;
    background-color: var(--color-negro);
    color: var(--color-amarillo);
    transition: var(--transition-smooth);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 191, 0, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-rojo);
    box-shadow: 0 0 15px rgba(142, 12, 37, 0.5);
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 30px;
    background-color: var(--color-rojo);
    border: none;
    border-radius: 12px;
    color: var(--color-hueso);
    font-family: var(--font-titulo);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    align-self: flex-start;
}

.submit-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--sombra-caja);
}

.submit-button svg {
    width: 30px;
    height: 30px;
    fill: var(--color-hueso);
}

/* Redes sociales */
.footer-socials {
    display: flex;
    flex-direction: row;
    gap: 30px;
    align-items: center;
    justify-content: center;
    margin-top: 150px;
}

.social-link {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-rojo);
    border-radius: 50%;
    transition: var(--transition-bounce);
}

.social-link:hover {
    transform: scale(1.2) rotate(10deg);
    box-shadow: var(--sombra-caja);
}

.social-link svg {
    width: 30px;
    height: 30px;
    fill: var(--color-amarillo);
}

/* Contador de visitantes */
.visitor-counter {
    margin-top: 40px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.visitor-label {
    font-family: var(--font-texto);
    font-size: 1.2rem;
    color: var(--color-hueso);
}

.visitor-count {
    font-family: var(--font-titulo);
    font-size: 2.5rem;
    color: var(--color-rojo);
    font-weight: bold;
}

/* Copyright */
.footer-bottom {
    background-color: var(--color-hueso);
    padding: .5rem 2rem;
    text-align: center;
    color: var(--color-rojo);
    font-size: 1rem;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 0;
}

/* ============================================
   BOTÓN FLOTANTE: SUBIR AL INICIO
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--color-rojo);
    border: 3px solid var(--color-amarillo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 9998;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--sombra-caja-fuerte);
}

.scroll-to-top svg {
    width: 30px;
    height: 30px;
    fill: var(--color-amarillo);
}

/* ============================================
   RESPONSIVE: TABLETS
   ============================================ */
@media (max-width: 1024px) {
    .section-border {
        width: calc(100% - 40px);
        min-height: calc(100vh - 40px);
        padding: 40px 30px;
    }
    
    .home-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .flip-card {
        width: 350px;
        height: 480px;
    }
    
    .home-name {
        font-size: 4rem;
    }
    
    .home-subtitle {
        font-size: 2rem;
    }
    
    .home-tagline {
        position: static;
        text-align: center;
        margin-top: 30px;
        font-size: 1.4rem;
    }
    
    .amistad-content,
    .lector-content,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .cemetery-buttons {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .puzzle-container {
        width: 100%;
        max-width: 400px;
        height: 400px;
        margin: 0 auto;
    }
    
    .phrase-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 40px 30px;
        text-align: center;
    }
    
    .phrase-divider {
        display: none;
    }
    
    .phrase-text {
        text-align: center;
    }
    
    .phrase-source {
        text-align: center;
    }
}

/* ============================================
   RESPONSIVE: MÓVILES
   ============================================ */
@media (max-width: 820px) {
    .menu-nav {
        width: 100vw;
        height: 100vh;
        top: 0;
        right: -100vw;
        padding: 120px 40px 40px;
        border-radius: 0;
        border: none;
    }
    
    .menu-items {
        flex-direction: column;
        gap: 30px;
    }
    
    .menu-item {
        font-size: 2.5rem;
    }
    
    .menu-item img {
        display: none;
    }

    .menu-text {
        max-width: 100%;
    }
    
    .menu-icon {
        width: 50px;
        height: 50px;
    }
    
    .menu-toggle {
        width: 60px;
        height: 60px;
    }
    
    .menu-toggle img {
        width: 35px;
        height: 35px;
    }
    
    .section-border {
        width: calc(100% - 30px);
        min-height: calc(100vh - 30px);
        padding: 5rem 1rem;
        border-radius: 20px;
        margin: 3rem 0;
    }
    
    .flip-card {
        width: 300px;
        height: 420px;
    }
    
    .home-name {
        font-size: 3rem;
    }

    .home-content {
        transform: none !important;
    }

    .home-title-container {
        gap: 0;
    }

    .home-subtitle {
        font-size: 1.5rem;
    }
    
    .home-tagline {
        font-size: 1.2rem;
        max-width: 100%;
    }
    
    .cemetery-title,
    .lector-title,
    .galeria-title {
        font-size: 4.5rem;
    }
    
    .cemetery-buttons {
        flex-direction: column;
        gap: 25px;
    }
    
    .cemetery-button {
        display: none;
    }

    .cemetery-mobile {
        display: flex;
    }
    
    .slider-container {
        padding: 0 0px;
    }
    
    .slide {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 2rem;
    }

    .slide-left { width: 85%;}
    .slide-right {width: 85%;}

    .slider-wrapper {
        width: 19rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .phrase-content {
        padding: 30px 25px;
    }
    
    .phrase-text {
        font-size: 1.1rem;
    }
    
    .fleeing-machine {
        display: none;
    }
    
    .puzzle-container {
        max-width: 280px;
        height: 270px;
    }

    .footer-socials {
        margin-top: 80px;
    }
}

@media (max-width: 480px) {
    .home-name {
        font-size: 2.5rem;
    }
    
    .cemetery-title,
    .lector-title,
    .galeria-title {
        font-size: 2rem;
    }
    
    .flip-card {
        width: 280px;
        height: 380px;
    }
    
    /* .slider-container {
        padding: 0 50px;
    } */
    
    .phrase-text {
        font-size: 1rem;
    }
}

/* ============================================
   CEMETERY PAGE - ESTILOS ADICIONALES
   ============================================ */

/* Página del cementerio */
.cemetery-page {
    background-color: var(--color-negro);
}

/* Botón volver al inicio (flotante superior derecha) */
.back-home-button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    background-color: var(--color-negro);
    border: 3px solid var(--color-rojo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 6px 25px rgba(142, 12, 37, 0.6);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.back-home-button svg {
    fill: var(--color-amarillo);
}

.back-home-button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 35px rgba(142, 12, 37, 0.9);
}

.back-home-tooltip {
    position: absolute;
    right: 80px;
    background-color: var(--color-amarillo);
    color: var(--color-rojo);
    padding: 8px 15px;
    border-radius: 8px;
    font-family: var(--font-texto);
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    pointer-events: none;
}

.back-home-button:hover .back-home-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Ocultar botón cuando modal está activo */
.story-modal.active ~ .back-home-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Contenedor principal del cementerio */
.cemetery-container {
    min-height: 100vh;
    padding: 40px 20px;
}

.cemetery-border {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    border: 4px solid var(--color-rojo);
    border-radius: 30px;
    padding: 60px 40px;
    background-color: transparent;
}

/* Header del cementerio */
.cemetery-header {
    text-align: center;
    margin-bottom: 80px;
}

.cemetery-main-title {
    font-family: var(--font-titulo);
    font-size: 8rem;
    color: var(--color-amarillo);
    text-shadow: var(--sombra-texto-titulo);
    margin-bottom: 20px;
}

.cemetery-subtitle {
    font-family: var(--font-texto);
    font-size: 1.5rem;
    color: var(--color-hueso);
    margin-bottom: 40px;
}

.cemetery-description {
    color: var(--color-hueso);
    font-size: 1.2rem;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto 60px;
}

/* Navegación de años */
.cemetery-year-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.year-nav-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 0;
    background-color: transparent;
    border: none;
    text-decoration: none;
    transition: var(--transition-bounce);
    cursor: pointer;
}

.year-nav-button:hover {
    transform: translateY(-15px) scale(1.1);
}

.year-nav-button img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 15px rgba(142, 12, 37, 0.6));
    transition: var(--transition-smooth);
}

.year-nav-button:hover img {
    filter: drop-shadow(0 8px 30px rgba(142, 12, 37, 0.9));
}

.year-nav-line {
    width: 100%;
    height: 2px;
    background-color: var(--color-hueso);
}

.year-nav-year {
    font-family: var(--font-titulo);
    font-size: 2rem;
    color: var(--color-hueso);
}

/* Sección de año */
.year-section {
    margin: 80px 0;
}

.year-section-title {
    font-family: var(--font-titulo);
    font-size: 3.5rem;
    color: var(--color-hueso);
    text-align: center;
    padding: 30px 0;
    margin: 0 0 60px 0;
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    border-top: 4px solid var(--color-rojo);
    border-bottom: 4px solid var(--color-rojo);
}

/* Grid de cuentos */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 40px 30px;
    margin-bottom: 60px;
}

/* Botón de cuento individual */
.story-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 10px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition-bounce);
    text-decoration: none;
}

.story-button:hover {
    transform: translateY(-10px) scale(1.05);
}

.story-button img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(142, 12, 37, 0.5));
    transition: var(--transition-smooth);
}

.story-button:hover img {
    filter: drop-shadow(0 6px 20px rgba(142, 12, 37, 0.8));
}

.story-title {
    font-family: var(--font-texto);
    font-size: 1rem;
    color: var(--color-hueso);
    text-align: center;
    line-height: 1.3;
    min-height: 40px;
    display: flex;
    align-items: center;
}

/* Modal del cuento */
.story-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 40px 20px;
}

.story-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-modal-content {
    background-image: url(img/story-bg.jpg);
    background-color: var(--color-hueso);
    border: 5px solid var(--color-rojo);
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    padding: 50px;
    position: relative;
    animation: modalOpen 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes modalOpen {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.story-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--color-rojo);
    border: 3px solid var(--color-negro);
    border-radius: 50%;
    color: var(--color-amarillo);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
    line-height: 1;
    z-index: 10000;
}

.story-modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    background-color: var(--color-negro);
    color: var(--color-rojo);
}

.story-modal-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    align-items: center;
}

/* Columna izquierda del modal */
.story-modal-left {
    position: relative;
}

.story-modal-year {
    position: absolute;
    top: -50px;
    left: -30px;
    color: var(--color-negro);
    font-family: var(--font-titulo);
    font-size: 1.5rem;
}

.story-modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.story-modal-icon {
    flex-shrink: 0;
}

.story-modal-icon img {
    width: 80px;
    height: 80px;
}

.story-modal-title {
    font-family: var(--font-titulo);
    font-size: 2.5rem;
    color: var(--color-rojo);
    line-height: 1.2;
    flex: 1;
}

.story-modal-details {
    background-color: rgba(142, 12, 37, 0.2);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.story-detail {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.story-detail:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-family: var(--font-texto);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-rojo);
    margin-bottom: 5px;
}

.detail-value {
    font-family: var(--font-texto);
    font-size: 1.1rem;
    color: var(--color-negro);
    line-height: 1.4;
}

/* Botón de descarga en modal */
.story-download-button {
    width: auto;
    min-width: 250px;
    padding: 18px 40px;
    background-color: var(--color-rojo);
    border: 3px solid var(--color-negro);
    border-radius: 12px;
    color: var(--color-amarillo);
    font-family: var(--font-titulo);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: block;
    margin: 0 auto;
}

.story-download-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(142, 12, 37, 0.6);
}

.story-download-button.disabled {
    background-color: #666;
    border-color: #444;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.story-download-button.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Contenedor de botones - dos columnas */
.story-buttons-container {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

/* Botón de enlace */
.story-link-button {
    width: auto;
    min-width: 50px;
    height: auto;
    padding: 18px 15px;
    background-color: var(--color-rojo);
    border: 3px solid var(--color-negro);
    border-radius: 12px;
    color: var(--color-amarillo);
    font-family: var(--font-titulo);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.story-link-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(142, 12, 37, 0.6);
}

.story-link-button svg {
    width: 24px;
    height: 24px;
    fill: var(--color-amarillo);
}

/* Ocultar si no tiene link */
.story-link-button.hidden {
    display: none;
}

/* Columna derecha del modal - Portada */
.story-modal-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-modal-cover {
    width: 100%;
    max-width: 350px;
    border: 5px solid var(--color-rojo);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: bounce 3s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE: CEMETERY PAGE
   ============================================ */

@media (max-width: 1024px) {
    .cemetery-main-title {
        font-size: 5rem;
    }
    
    .stories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px 20px;
    }
    
    .story-modal-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .story-modal-year {
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .cemetery-border {
        padding: 40px 25px;
    }
    
    .cemetery-main-title {
        font-size: 3.5rem;
    }
    
    .cemetery-year-nav {
        gap: 25px;
    }
    
    .year-nav-button img {
        width: 75px;
        height: 90px;
    }

    .story-button {
        padding: 20px 0;
    }   
    
    .stories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem 0;
    }

    .story-button img {
        width: 60px;
    }   
    
    .year-section-title {
        font-size: 2.5rem;
        padding: 20px 10px;
    }
    
    .story-modal-content {
        padding: 30px 20px;
        top: 20rem;
    }
    
    .story-modal-title {
        font-size: 2rem;
    }
    
    .back-home-tooltip {
        display: none;
    }

    .story-modal-year {
        font-size: 1.2rem;
        padding: 0;
    }

    .story-modal-header {
        margin-top: 1.5rem;
    }

    .story-download-button {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .cemetery-main-title {
        font-size: 2.5rem;
    }
    
    .cemetery-subtitle {
        font-size: 1.2rem;
    }
    
    .cemetery-description {
        font-size: 1rem;
    }
    
    .year-section-title {
        font-size: 2rem;
    }
    
    .story-modal-title {
        font-size: 1.8rem;
    }
}
