/* =========================================
   1. VARIABLES Y RESET
========================================= */
:root {
    --bg-dark: #080808; 
    --text-light: #fdfcf5; 
    --text-muted: #a0a0a0;
    --accent-color: #b71c1c; 
    --gold-accent: #d4af37; 
    --wood-light: #e6c28f;
    --wood-dark: #8b5a2b;
    
    --font-traditional: 'Zhizhu', serif; 
    --font-heading: 'Poiret One', cursive; 
    --font-main: 'Montserrat', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    /* Optimización de legibilidad de fuentes */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--accent-color); cursor: auto; }

/* loader */
/* =========================================
   PRELOADER / PANTALLA DE CARGA
========================================= */
/* No Scroll para el body mientras carga */
body.loading-preloader {
    overflow: hidden !important;
}

#preloader {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background-color: #030303; /* Un negro aún más profundo */
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; /* Máxima prioridad sobre todo */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out; /* Optimizado */
    will-change: opacity, visibility;
}

.preloader-content {
    position: relative;
    display: flex; justify-content: center; align-items: center;
    text-align: center;
}

.preloader-logo {
    font-family: var(--font-heading);
    font-size: 3rem;
    letter-spacing: -2px;
    color: var(--text-light);
    animation: preloaderLogoFade 1.5s infinite; /* Pulsado infinito del logo */
    will-change: opacity;
}
.preloader-logo span { color: var(--accent-color); }

/* Efecto outline pulsante dorado */
.preloader-outline {
    position: absolute;
    inset: -15px; /* Un poco más grande que el texto */
    border: 2px solid var(--gold-accent);
    border-radius: 5px; /* Sutil redondeado */
    opacity: 0;
    animation: preloaderPulse 1.5s infinite; /* Pulsado infinito */
    will-change: opacity, transform;
}

/* Animación de pulsado del logo */
@keyframes preloaderLogoFade {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Animación de pulsado del outline dorado */
@keyframes preloaderPulse {
    0% { opacity: 0; transform: scale(0.95); }
    50% { opacity: 0.6; transform: scale(1.02); }
    100% { opacity: 0; transform: scale(1.05); }
}

/* OCULTAR PRELOADER suavemente */
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}


/* =========================================
   2. NAVBAR
========================================= */
.navbar {
    position: fixed; top: 0; width: 100%;
    padding: 30px 60px;
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0));
    z-index: 1000;
}
.logo { font-family: var(--font-heading); font-size: 2.8rem; letter-spacing: -2px; }
.logo span { color: var(--accent-color); }

.nav-links { display: flex; list-style: none; gap: 45px; align-items: center; }
.nav-links a { 
    color: var(--text-light); 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: 400; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    transition: color 0.3s ease; /* Optimizado */
}
.nav-links a:hover { color: var(--gold-accent); }

/* BOTÓN RESERVAR - OPTIMIZADO PARA GPU */
.btn-nav-contact { 
    display: inline-flex; 
    align-items: center;
    border: 1px solid var(--gold-accent); 
    padding: 10px 25px; 
    color: var(--gold-accent) !important; 
    position: relative;
    overflow: hidden; 
    transition: color 0.4s ease, box-shadow 0.4s ease; /* Optimizado */
    z-index: 1;
}

.btn-nav-contact::before {
    content: '';
    position: absolute;
    top: 0; left: 0; /* Cambiado para usar transform */
    width: 100%; height: 100%;
    background: var(--gold-accent);
    transform: translateX(-101%); /* Magia GPU */
    transition: transform 0.4s ease; /* Optimizado */
    z-index: -1;
}

.btn-nav-contact:hover::before {
    transform: translateX(0); /* Magia GPU */
}

.btn-nav-contact:hover {
    color: var(--bg-dark) !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* =========================================
   PALILLOS HAMBURGER (CORREGIDOS Y SELLADOS)
========================================= */
.sushi-burger { display: none; width: 40px; height: 24px; position: relative; z-index: 1001; cursor: pointer;}
.chopstick { 
    position: absolute; 
    width: 100%; 
    height: 3px; 
    background: linear-gradient(to right, var(--wood-dark), var(--wood-light)); 
    border-radius: 4px; 
    /* Se mantienen estas transiciones porque top/bottom son necesarios aquí para el efecto X */
    transition: top 0.3s ease 0.3s, bottom 0.3s ease 0.3s, transform 0.3s ease 0s; 
}
.chopstick.top { top: 0; } 
.chopstick.bottom { bottom: 0; }

.sushi-burger.active .chopstick { 
    transition: top 0.3s ease 0s, bottom 0.3s ease 0s, transform 0.3s ease 0.3s; 
}
.sushi-burger.active .chopstick.top { 
    top: 50%; 
    transform: translateY(-50%) rotate(45deg); 
}
.sushi-burger.active .chopstick.bottom { 
    bottom: 50%; 
    transform: translateY(50%) rotate(-45deg); 
}

/* NAVMENU MOBILE BÁSICO */
@media (max-width: 992px) {
    .navbar { padding: 20px 30px; }
    .sushi-burger { display: block; }
    .nav-menu-container {
        position: fixed; top: 0; right: 0; width: 100vw; height: 100vh;
        background-color: #050505;
        display: flex; justify-content: center; align-items: center;
        z-index: 999; opacity: 0; visibility: hidden;
        clip-path: circle(20px at calc(100% - 50px) 30px);
        transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out, clip-path 0.5s ease-in-out; /* Optimizado */
        will-change: clip-path, opacity; /* Aviso a la GPU para el menú de móvil */
    }
    .nav-menu-container.active { opacity: 1; visibility: visible; clip-path: circle(150% at calc(100% - 50px) 30px); }
    .nav-links { flex-direction: column; gap: 30px; text-align: center; }
    .nav-links a { font-size: 1.8rem; font-family: var(--font-heading); }
}

/* =========================================
   3. HERO SECTION (ACTUALIZADO & OPTIMIZADO)
========================================= */
#main-header {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-image: url('img/hero-1.jpg');
    background-size: cover;
    background-position: center right; 
    background-attachment: fixed; 
    display: flex;
    align-items: flex-start; 
    overflow: hidden;
    /* Optimización de scroll para fondos fixed */
    will-change: transform; 
}

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(8, 8, 8, 0.9) 0%, rgba(8, 8, 8, 0.4) 30%, transparent 60%);
    z-index: 1;
    pointer-events: none; /* Evita que bloquee clics accidentales */
}

.hero-content {
    position: relative;
    z-index: 2; 
    max-width: 1125px; 
    padding-left: 60px; 
    padding-right: 5%;
    margin-top: 12vh; 
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold-accent);
    letter-spacing: 5px; 
    text-transform: uppercase;
    margin-top: 25px; 
    margin-bottom: 10px;
    display: block;
    width: 100%; 
    font-weight: 600;
}

/* El Hanko con ajustes exactos */
.hanko-seal {
    font-family: var(--font-traditional);
    font-size: 2rem; 
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    width: 45px; height: 45px; 
    display: inline-flex; 
    align-items: center; justify-content: center;
    border-radius: 50%;
    opacity: 0.9;
    transform: rotate(-15deg);
    vertical-align: text-bottom; 
    margin-left: -15px; 
    will-change: transform; /* Antilag */
}

.hero { width: 100%;}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 5.5rem;
    font-weight: 300;
    line-height: 1.1; 
    margin-bottom: 25px; 
    letter-spacing: -2px;
}

.hero h1 .sushi-word {
    font-family: var(--font-traditional);
    color: var(--accent-color);
    font-size: 7rem;
    display: inline-block;
    margin-left: 15px;
    letter-spacing: 0;
    vertical-align: middle;
}

/* BOTÓN PREMIUM - OPTIMIZADO PARA GPU */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    border: 1px solid var(--gold-accent);
    padding: 18px 40px;
    position: relative;
    overflow: hidden;
    transition: color 0.4s ease, border-color 0.4s ease; /* Quitamos el 'all' */
    background: transparent;
    z-index: 1;
}

.btn-premium::before { 
    content: ''; 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; 
    height: 100%; 
    background: var(--gold-accent); 
    /* Cambiamos el width:0 a scaleX para usar la Tarjeta Gráfica */
    transform: scaleX(0); 
    transform-origin: left; /* Hace que el efecto venga de izquierda a derecha */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    z-index: -1; 
}

.btn-premium:hover::before { 
    transform: scaleX(1); 
}

.btn-premium i { 
    font-size: 1.5rem; 
    color: var(--gold-accent); 
    transition: color 0.4s ease; 
}

.btn-premium .btn-text { 
    color: var(--gold-accent); 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    font-weight: 600; 
    transition: color 0.4s ease; 
}

.btn-premium:hover i, .btn-premium:hover .btn-text { 
    color: var(--bg-dark); 
}

.hero-fade-out {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 120px;
    background: linear-gradient(to top, var(--bg-dark), rgba(0,0,0,0));
    z-index: 1;
    pointer-events: none; /* Deja pasar clics a lo que haya debajo */
}

/* =========================================
   3.0.5 RESPONSIVE PARA LAPTOPS (13", 14", 15")
========================================= */
@media (max-width: 1440px) {
    .hero-content {
        margin-top: 15vh; 
        padding-left: 60px; 
    }
    .hanko-seal {
        width: 36px; height: 35px;
        font-size: 25px !important;
        margin-left: -10px;
    }
    .hero-subtitle {
        font-size: 0.9rem;
        letter-spacing: 3px;
    }
    .hero h1 {
        font-size: 3.8rem; 
        margin-bottom: 25px; 
    }
    .hero h1 .sushi-word {
        font-size: 5rem; 
    }
    .btn-premium {
        padding: 14px 28px; 
    }
    .btn-premium i {
        font-size: 1.2rem;
    }
    .btn-premium .btn-text {
        font-size: 0.8rem;
    }
}

/* =========================================
   3.1 RESPONSIVE MOBILE & TABLET (UX & PERFORMANCE FIX)
========================================= */
@media (max-width: 992px) {
    #main-header {
        align-items: flex-start; 
        background-image: url('img/hero-mobile.png'); 
        background-position: top center; 
        /* OPTIMIZACIÓN CRÍTICA ANTILAG: Apagamos el Parallax en dispositivos táctiles */
        background-attachment: scroll; 
    }
    
    .hero-overlay {
        background: linear-gradient(to bottom, rgba(8, 8, 8, 1) 0%, rgba(8, 8, 8, 0.8) 40%, transparent 70%);
    }
    
    .hero-content { 
        padding: 0 8%; 
        margin-top: 18vh; 
        max-width: 100%; 
        align-items: flex-start; 
        text-align: left; 
    }

    .hero-subtitle {
        margin-top: 0;
        margin-bottom: 25px; 
        font-size: 0.95rem;
        letter-spacing: 3px;
        line-height: 1.5; 
        max-width: 90%; 
    }

    .hero h1 { 
        font-size: 3.2rem; 
        margin-bottom: 35px; 
        line-height: 1.25; 
    }
    
    .hero h1 .sushi-word { 
        font-size: 4.2rem; 
        display: inline-block; 
        margin-top: 8px; 
    }

    .hanko-seal { 
        width: 35px; height: 35px; 
        font-size: 1.5rem !important;
        display: inline-flex;
        margin-left: 12px; 
        vertical-align: text-bottom;
        margin-bottom: 5px; 
    }
    
    .btn-premium { 
        padding: 15px 30px; 
    }
}

@media (max-width: 576px) {
    .hero-content {
        padding: 0 6%; 
        align-items: center;
    }

    .hero-content .hero-subtitle{
        text-align: center;
    }

    .hero h1 { 
        font-size: 2.8rem; 
        line-height: 1.2; 
        margin-bottom: 30px;
        text-align: center;
    }

    .hero h1 .sushi-word { 
        font-size: 3.6rem; 
    }
    
    /* El scroll fix fue movido arriba para proteger también a las tablets */
    
    .hanko-seal {
        width: 30px; height: 30px; 
        font-size: 1.2rem !important;
        border-width: 1px;
        margin-left: 8px;
    }
    
    .btn-premium { padding: 12px 24px; }
    .btn-premium .btn-text { font-size: 0.8rem; }
}

/* =========================================
   X. CURSOR TINTA JAPONESA (SUMI-E)
   (Solo Desktop para performance y UX)
========================================= */
@media (min-width: 993px) {
    /* Ocultamos el cursor nativo en todo el sitio */
    body { cursor: none; }
    
    /* Evita que los enlaces muestren la manita nativa */
    a, button, .sushi-burger { cursor: none; }

    /* La punta del pincel principal */
    .ink-cursor {
        position: fixed;
        top: 0; left: 0;
        width: 12px; height: 12px;
        background-color: rgba(253, 252, 245, 0.9); 
        border-radius: 50%;
        pointer-events: none; 
        z-index: 10000; 
        transform: translate(-50%, -50%);
        transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
        box-shadow: 0 0 4px 1px rgba(253, 252, 245, 0.4);
        /* --- MAGIA ANTILAG EXTREMA --- */
        will-change: left, top, width, height, transform;
    }

    /* Estilo de la punta al pasar sobre botones */
    .ink-cursor.hovering {
        width: 20px; height: 20px;
        background-color: var(--gold-accent);
        box-shadow: 0 0 10px 2px rgba(212, 175, 55, 0.4);
    }

    /* Las partículas de tinta de la estela */
    .ink-particle {
        position: fixed;
        background-color: rgba(253, 252, 245, 0.5); 
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        /* El transform inicial es procesado por la animación */
        animation: inkFade 0.6s forwards ease-out;
        will-change: transform, opacity; /* GPU render */
    }
}

/* Animación de la tinta desvaneciéndose (100% GPU) */
@keyframes inkFade {
    0% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.1) translateY(5px);
    }
}

/* Ocultar en móvil explícitamente */
@media (max-width: 992px) {
    .ink-cursor { display: none !important; }
}

/* =========================================
   4. SECCIÓN: TÉCNICA / FILOSOFÍA
========================================= */
.tecnica-section {
    padding: 120px 60px;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.tecnica-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    position: relative;
    z-index: 1;
}

.tecnica-text {
    flex: 1;
    max-width: 500px;
}

.section-subtitle {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--gold-accent);
    letter-spacing: 4px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 15px;
}

.tecnica-text h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--text-light);
}

.tecnica-text h2 span {
    font-family: var(--font-traditional);
    color: var(--accent-color);
    font-size: 4.5rem;
    font-style: italic;
    letter-spacing: 2px;
}

.tecnica-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted); 
    margin-bottom: 25px;
}

.tecnica-signature {
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 25px;
}

.kanji-vertical {
    font-family: var(--font-traditional);
    color: var(--accent-color);
    font-size: 1.2rem;
    line-height: 1.1;
    letter-spacing: 5px;
    writing-mode: vertical-rl; 
    opacity: 0.8;
}

.signature-text {
    font-family: var(--font-heading);
    color: var(--gold-accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.tecnica-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.img-frame-gold {
    position: absolute;
    top: -20px;
    right: 20px;
    width: 85%;
    height: 100%;
    border: 2px solid var(--gold-accent);
    z-index: 1;
}

.tecnica-img {
    width: 85%;
    aspect-ratio: 4/5; 
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 2;
    box-shadow: -15px 15px 30px rgba(0,0,0,0.8);
    transition: transform 0.5s ease;
    /* --- FIX DE RENDIMIENTO (Fuerza GPU) --- */
    transform: translateZ(0); 
    will-change: transform;
    -webkit-backface-visibility: hidden;
}

.tecnica-visual:hover .tecnica-img {
    /* El translateZ(0) se mantiene para que no pierda la aceleración de hardware durante el hover */
    transform: translate(-10px, -10px) translateZ(0); 
}

/* --- MEDIA QUERIES ESPECÍFICOS DE LA SECCIÓN TÉCNICA --- */
@media (max-width: 992px) {
    .tecnica-section { padding: 80px 5%; }
    .tecnica-container { 
        flex-direction: column; 
        gap: 50px; 
    }
    .tecnica-text { max-width: 100%; text-align: center; } 
    
    .tecnica-signature {
        justify-content: center; 
    }

    .tecnica-visual { 
        width: 100%; 
        justify-content: center; 
        margin-top: 20px;
    }
    .img-frame-gold {
        top: -15px;
        right: auto;
        left: 5%; 
        width: 90%;
    }
    .tecnica-img { width: 90%; }
}

@media (max-width: 576px) {
    .tecnica-text h2 { font-size: 2.5rem; }
    .tecnica-text h2 span { font-size: 3.2rem; }
}

/* =========================================
   5. SECCIÓN: GALERÍA EDITORIAL Y MENÚ
========================================= */
.galeria-section {
    padding: 120px 5%;
    background-color: #050505; 
}

.galeria-header {
    margin-bottom: 70px;
}

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

.galeria-header h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 300;
    color: var(--text-light);
}

.galeria-header h2 span {
    font-family: var(--font-traditional);
    color: var(--accent-color);
    font-size: 4.5rem;
    font-style: italic;
    letter-spacing: 2px;
}

/* --- GRID ASIMÉTRICO MASIVO (PRO) --- */
.galeria-grid-pro {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    grid-auto-rows: 280px; 
    gap: 15px; 
    max-width: 1400px; 
    margin: 0 auto 60px auto;
}

.galeria-item {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* --- FIX DE SCROLL: Fuerza cada imagen a la GPU --- */
    transform: translateZ(0);
    will-change: transform;
    -webkit-backface-visibility: hidden;
}

/* LA MAGIA DE LOS TAMAÑOS */
.item-hero { grid-column: span 2; grid-row: span 2; } 
.item-tall { grid-column: span 1; grid-row: span 2; } 
.item-standard { grid-column: span 1; grid-row: span 1; } 

/* Contenedor extra para poder hacer zoom a la imagen sin que se salga de la caja */
.galeria-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
    z-index: 1;
    /* --- MAGIA ANTILAG --- */
    will-change: transform; 
    -webkit-backface-visibility: hidden;
}

.galeria-item:hover::after {
    transform: scale(1.08); /* Zoom in ultra suave */
}

/* OVERLAY OSCURO Y TEXTOS */
.galeria-overlay {
    position: absolute;
    inset: 0; 
    background-color: rgba(5, 5, 5, 0.7); 
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2; 
    will-change: opacity; /* Optimización */
}

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

.galeria-overlay span {
    font-family: var(--font-heading);
    color: var(--gold-accent);
    font-size: 1.3rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--gold-accent);
    padding-bottom: 8px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
    will-change: transform; /* Optimización */
}

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

/* --- BOTÓN DESCARGA PDF (OPTIMIZADO PARA GPU) --- */
.menu-cta-container {
    text-align: center;
    margin-top: 40px;
}

.menu-cta-container p {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.btn-pdf-download {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    border: 1px solid rgba(253, 252, 245, 0.3);
    padding: 16px 40px;
    color: var(--text-light);
    transition: color 0.4s ease, border-color 0.4s ease; /* Optimizado */
    background: transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-pdf-download::before {
    content: '';
    position: absolute; top: 0; left: 0; 
    width: 100%; height: 100%; /* 100% fijo */
    background: var(--gold-accent);
    transform: scaleX(0); /* Usamos scaleX en vez de width */
    transform-origin: left;
    transition: transform 0.4s ease; /* Optimizado */
    z-index: -1;
}

.btn-pdf-download:hover::before { 
    transform: scaleX(1); 
}

.btn-pdf-download i { 
    font-size: 1.3rem; 
    color: var(--accent-color); 
    transition: color 0.4s ease; 
}

.btn-pdf-download .btn-text { 
    font-size: 0.9rem; 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    font-weight: 600; 
    transition: color 0.4s ease; 
}

.btn-pdf-download:hover i, .btn-pdf-download:hover .btn-text { 
    color: var(--bg-dark); 
}

/* --- MEDIA QUERIES ESPECÍFICOS DE GALERÍA MASIVA --- */
@media (max-width: 1200px) {
    .galeria-grid-pro { grid-auto-rows: 240px; } 
}

@media (max-width: 992px) {
    .galeria-section { padding: 80px 5%; }
    
    .galeria-grid-pro {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 250px;
    }
    
    .item-hero { grid-column: span 2; grid-row: span 2; }
    .item-tall { grid-column: span 1; grid-row: span 2; }
    .item-standard { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 576px) {
    .galeria-header h2 { font-size: 2.8rem; }
    .galeria-header h2 span { font-size: 3.5rem; }
    
    .galeria-grid-pro {
        grid-template-columns: 1fr;
        grid-auto-rows: auto; 
    }
    
    .item-hero { grid-column: span 1; grid-row: span 1; height: 350px; }
    .item-tall { grid-column: span 1; grid-row: span 1; height: 400px; }
    .item-standard { grid-column: span 1; grid-row: span 1; height: 250px; }
    
    .btn-pdf-download { padding: 14px 25px; width: 100%; justify-content: center; }
}

/* =========================================
   6. SECCIÓN: RESERVA Y FOOTER (OPTIMIZADO)
========================================= */
.reserva-section {
    padding: 120px 5%;
    background-color: var(--bg-dark);
    border-top: 1px solid rgba(253, 252, 245, 0.05);
}

.reserva-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.reserva-content {
    flex: 1;
    max-width: 550px;
}

.reserva-content h2 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--text-light);
}

.reserva-content h2 span {
    font-family: var(--font-traditional);
    color: var(--accent-color);
    font-size: 4.5rem;
    font-style: italic;
    letter-spacing: 2px;
}

.reserva-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* --- GRID DE INFORMACIÓN --- */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

.info-item i {
    font-size: 1.8rem;
    color: var(--gold-accent);
    margin-bottom: 15px;
}

.info-item h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.info-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.link-gold {
    color: var(--gold-accent);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease; /* Optimizado: Solo animar borde */
}

.link-gold:hover {
    border-bottom: 1px solid var(--gold-accent);
}

/* --- MAPA GIGANTE DARK MODE --- */
.reserva-visual {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reserva-map-wrapper {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 3/4; 
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(212, 175, 55, 0.15); 
    position: relative;
    z-index: 2;
    background-color: #111; 
    /* --- FIX GPU PARA EL IFRAME --- */
    transform: translateZ(0);
    will-change: transform;
}

.reserva-map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
    filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(85%);
    transition: filter 0.5s ease;
    will-change: filter; /* Optimización: Avisar que cambiará el filtro */
}

.reserva-map-wrapper:hover iframe {
    filter: invert(90%) hue-rotate(180deg) brightness(100%) contrast(95%);
}

.hanko-seal-large {
    position: absolute;
    bottom: -30px;
    right: 10%;
    font-family: var(--font-traditional);
    font-size: 5rem;
    color: var(--accent-color);
    border: 3px solid var(--accent-color);
    width: 120px; height: 120px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    opacity: 0.3;
    transform: rotate(15deg);
    pointer-events: none;
}

/* --- FOOTER MINIMALISTA --- */
.main-footer {
    padding: 60px 5% 30px;
    background-color: #030303;
    border-top: 1px solid rgba(253, 252, 245, 0.05);
}

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

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

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    letter-spacing: -1px;
}
.footer-logo span { color: var(--accent-color); }

.footer-socials { display: flex; gap: 20px; }

.footer-socials a {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease; /* Optimizado */
    display: inline-block; /* Necesario para que transform funcione */
}

.footer-socials a:hover {
    color: var(--gold-accent);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(253, 252, 245, 0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.agencia-link {
    color: var(--gold-accent);
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.agencia-link:hover {
    color: var(--text-light);
}

/* --- MEDIA QUERIES RESERVA Y FOOTER --- */
@media (max-width: 992px) {
    .reserva-container { flex-direction: column; gap: 60px; text-align: center; }
    .reserva-content { max-width: 100%; display: flex; flex-direction: column; align-items: center; }
    .info-grid { text-align: left; width: 100%; max-width: 500px; } 
    .reserva-map-wrapper { aspect-ratio: 16/9; max-width: 100%; } 
}

@media (max-width: 768px) {
    .footer-top { flex-direction: column; gap: 20px; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; align-items: center; }
}

@media (max-width: 576px) {
    .reserva-content h2 { font-size: 2.8rem; }
    .reserva-content h2 span { font-size: 3.5rem; }
    .info-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
}


/* =========================================
   7. ANIMACIONES DE SCROLL (REVEAL)
========================================= */
/* Estado inicial: Invisible y ligeramente desplazado hacia abajo */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform; /* GPU alert */
}

/* Estado final: Visible y en su posición original */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Clases extra para crear efecto "dominó" (retrasos) en la galería */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }