/* --- Variables y Estilos Globales --- */
:root {
    --color-primario: #bd3d3d; /* Un dorado/amarillo para acentos */
    --color-fondo: #121212;
    --color-superficie: #1E1E1E;
    --color-texto-principal: #E0E0E0;
    --color-texto-secundario: #A0A0A0;
    --fuente-principal: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    height: 100%;
}

body {
    font-family: var(--fuente-principal);
    background-color: var(--color-fondo);
    color: var(--color-texto-principal);
    line-height: 1.6;
    min-height: 100%;
}

.contenedor {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.seccion {
    padding: 6rem 0;
}

h1, h2, h3 {
    font-weight: 700;
    color: #fff;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 1rem;
}

.subtitulo {
    font-size: 1.2rem;
    color: var(--color-texto-secundario);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

a {
    color: var(--color-primario);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

/* --- Header y Navegación --- */
header {
    background-color: rgba(18, 18, 18, 0.8);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

header .contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 70px;
}

nav a {
    color: var(--color-texto-principal);
    margin-left: 2rem;
    font-weight: 700;
    font-size: 1rem;
}

nav a:hover {
    color: var(--color-primario);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: #fff;
    padding: 0 1rem; /* Añadido para dar espacio en los costados */
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-foreground,
.video-foreground iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 Aspect Ratio */
    transform: translate(-50%, -50%);
}

#hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

#hero h1 {
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.cta {
    display: inline-block;
    background-color: var(--color-primario);
    color: var(--color-fondo);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 2rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.cta:hover {
    transform: scale(1.05);
    background-color: #fff;
    color: #000;
}

/* --- Alertas de Formulario --- */
.alerta {
    padding: 1rem;
    margin: 2rem auto 0 auto;
    width: 90%;
    max-width: 600px;
    text-align: center;
    border-radius: 5px;
    font-weight: 700;
}

.alerta.exito {
    background-color: #28a745;
    color: #fff;
}

.alerta.error {
    background-color: #dc3545;
    color: #fff;
}

/* --- Formulario de Reserva --- */
.formulario {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-superficie);
    padding: 3rem;
    border-radius: 10px;
}

.campo {
    margin-bottom: 1.5rem;
}

.campo label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-texto-secundario);
}

.campo input, .campo textarea {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-fondo);
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--color-texto-principal);
    font-family: var(--fuente-principal);
    font-size: 1rem;
}

.campo input:focus, .campo textarea:focus {
    outline: none;
    border-color: var(--color-primario);
}

.cta-form {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-primario);
    color: var(--color-fondo);
    border: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cta-form:hover {
    background-color: #fff;
    color: #000;
}

/* --- Sección Estudio --- */
#estudio {
    background-color: var(--color-superficie);
}

.equipo {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.equipo h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-primario);
}

.equipo ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
}

.equipo li {
    font-size: 1.1rem;
}

/* --- Galería Estética --- */
#fotos {
    padding-bottom: 6rem; /* Añadido para dar espacio */
}

.galeria-estetica {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense; /* Esto hace que la magia suceda */
    gap: 1rem;
}

.item-galeria {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    cursor: pointer;
}

.item-galeria:hover {
    transform: scale(1.03);
    opacity: 0.8;
}

/* Tamaños de los items para el efecto asimétrico */
.item-galeria:nth-child(5n+1) {
    grid-column: span 2;
    grid-row: span 2;
}

.item-galeria:nth-child(7n+2) {
    grid-row: span 2;
}

.item-galeria:nth-child(8n+3) {
    grid-column: span 2;
}


/* --- Contacto --- */
.info-contacto {
    text-align: center;
    font-size: 1.2rem;
}

.info-contacto p {
    margin-bottom: 1rem;
}

.redes-sociales {
    margin-top: 2rem;
}

.redes-sociales p {
    margin-bottom: 1rem;
}

.redes-sociales a {
    font-size: 2rem;
    margin: 0 1rem;
    color: var(--color-texto-secundario);
    transition: color 0.3s ease;
}

.redes-sociales a:hover {
    color: var(--color-primario);
}

/* --- Footer --- */
footer {
    background-color: var(--color-superficie);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    color: var(--color-texto-secundario);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    header .contenedor {
        flex-direction: column;
    }

    nav {
        margin-top: 1rem;
    }

    nav a {
        margin: 0 0.7rem;
    }

    #hero {
        height: 70vh;
        padding-top: 150px; /* Evita que el contenido se solape con el header en móvil */
    }
}

@media (max-width: 480px) {
    .formulario {
        padding: 2rem;
    }

    nav a {
        display: block;
        text-align: center;
        margin: 0.5rem 0;
    }
}

/* --- Animación de Like --- */
.like-gif {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    z-index: 9999;
    animation: fadeAndFloat 1s ease-out forwards;
}

@keyframes fadeAndFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -150%) scale(0.5);
    }
}

/* --- Animación de Fuego (Easter Egg) --- */
.easter-egg-fire {
    position: absolute; /* Se posiciona en la página */
    width: 150px; 
    height: auto;
    z-index: 10000; 
    pointer-events: none; 
    animation: fadeInFire 0.5s ease-in forwards; /* 'forwards' mantiene el estado final */
    /* El transform se aplica en la animación para evitar el salto inicial */
}

@keyframes fadeInFire {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* --- Menú de Hamburguesa --- */
.hamburger-menu {
    display: none; /* Oculto por defecto en escritorio */
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 101; /* Por encima del header */
    padding: 15px;
    cursor: pointer;
    background-color: transparent;
    border: none;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 100%;
    height: 3px;
    background-color: var(--color-texto-principal);
    position: absolute;
    border-radius: 4px;
    transition: transform 0.25s ease-in-out;
}

.hamburger-inner {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    display: block;
}

.hamburger-inner::before {
    top: -10px;
}

.hamburger-inner::after {
    bottom: -10px;
}

/* Estilos del menú cuando está activo (abierto) */
.hamburger-menu.is-active .hamburger-inner {
    transform: rotate(45deg);
}

.hamburger-menu.is-active .hamburger-inner::before {
    top: 0;
    transform: rotate(-90deg);
}

.hamburger-menu.is-active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
    opacity: 0; /* Ocultamos la línea de abajo para formar la X */
}


/* --- Responsive para el Menú --- */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block; /* Mostramos el botón en móvil */
    }

    nav#main-nav {
        display: none; /* Ocultamos la navegación por defecto */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-fondo);
        padding-top: 6rem;
        text-align: center;
    }

    nav#main-nav.is-active {
        display: flex; /* Mostramos el menú cuando está activo */
    }

    nav#main-nav a {
        font-size: 1.5rem;
        margin: 1.5rem 0;
        color: var(--color-texto-principal);
    }

    /* Eliminamos la modificación del header que hicimos antes, ya no es necesaria */
    header .contenedor {
        flex-direction: row; /* Lo devolvemos a su estado original */
    }
}