/* Variables y Configuración Global */
:root {
    --color-bg-main: #0a0a0a;
    /* Fondo principal oscuro */
    --color-bg-alt: #131313;
    /* Fondo alternativo oscuro para contraste */
    --color-text-primary: #e0e0e0;
    /* Texto claro principal */
    --color-text-secondary: #a0a0a0;
    /* Texto secundario gris */
    --color-accent-gold: #c6a25b;
    /* Acento dorado/bronce premium (color cálido agave) */

    --font-heading: 'Playfair Display', serif;
    /* Tipo clásica elegante */
    --font-body: 'Inter', sans-serif;
    /* Tipo limpia moderna */
}

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

body {
    background-color: var(--color-bg-main);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   Navegación (Header)
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.header.scrolled {
    background-color: rgba(10, 10, 10, 0.95);
    /* Menú semi-translúcido oscuro */
    padding: 15px 0;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    max-height: 45px;
    /* Altura ajustada para la cabecera */
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
    /* Ligero zoom al logo */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-accent-gold);
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-color: #222;
    /* Placeholder cover */
    /* Efecto cinematográfico */
    filter: brightness(0.4) contrast(1.1);
    transform: scale(1);
    transition: transform 15s ease-out;
    /* Animación sutil Ken Burns */
    z-index: 1;
}

.hero.loaded .hero-bg {
    transform: scale(1.08);
    /* Zoom in progresivo */
}

/* Sombra extra en la parte inferior del hero para mezclar con la primer sección */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15vh;
    background: linear-gradient(to top, var(--color-bg-main), transparent);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: 6px;
    margin-bottom: 25px;
}

.hero-content h1 span {
    color: var(--color-accent-gold);
    /* El "12 HORAS" se destaca en oro/noche */
    display: block;
    margin-top: 15px;
    font-weight: 700;
    font-size: 5.5rem;
}

.hero-logo {
    max-width: 450px;
    width: 90%;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    /* Sombra para resaltar sobre el fondo */
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 50px;
}

.btn-primary {
    display: inline-block;
    padding: 16px 45px;
    background-color: transparent;
    color: var(--color-accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 1px solid var(--color-accent-gold);
    transition: all 0.4s ease;
    cursor: pointer;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--color-accent-gold);
    color: var(--color-bg-main);
}

/* =========================================
   About Sections (Filas intercaladas)
   ========================================= */
.about-section {
    padding: 140px 0;
    background-color: var(--color-bg-main);
    position: relative;
    z-index: 10;
}

.about-section.dark-alt {
    background-color: var(--color-bg-alt);
}

#experiencia {
    padding: 80px 0;
    /* Espaciado más reducido para que quepa en pantalla */
}

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

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.grid-2-cols.reverse {
    direction: rtl;
    /* Para invertir la imagen en modo desktop */
}

.grid-2-cols.reverse>* {
    direction: ltr;
    /* Restaura dirección normal del texto */
}

.text-content {
    max-width: 500px;
}

.text-content h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--color-accent-gold);
    margin-bottom: 15px;
    font-weight: 500;
}

.text-content h3 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 500;
    margin-bottom: 35px;
    color: var(--color-text-primary);
    line-height: 1.2;
}

.text-content p {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 300;
}

.mezcales-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.mezcal-item {
    background-color: var(--color-bg-alt);
    /* Fondo sutil tipo tarjeta */
    padding: 35px 25px;
    border: 1px solid rgba(198, 162, 91, 0.1);
    /* Borde dorado translúcido */
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.mezcal-item:hover {
    transform: translateY(-8px);
    border-color: rgba(198, 162, 91, 0.6);
}

.mezcal-item h4 {
    font-family: var(--font-heading);
    color: var(--color-accent-gold);
    font-size: 1.7rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.mezcal-item p {
    font-size: 1.05rem;
    margin-bottom: 0;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .mezcales-grid {
        grid-template-columns: 1fr;
        /* Colapsar a 1 columna en teléfonos */
        gap: 30px;
    }
}

/* Ajuste específico para formato horizontal en la imagen de Mezcales */
#mezcales .img-content {
    height: auto;
}

#mezcales .img-content img {
    height: auto;
    object-fit: contain;
}

.img-content {
    position: relative;
    overflow: hidden;
    height: 550px;
    /* Efecto de borde lujoso opcional */
    border: 1px solid rgba(198, 162, 91, 0.1);
}

.img-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Un ligero ajuste de color para que las imágenes combinen con el tema */
    filter: sepia(0.1) brightness(0.9) contrast(1.1);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-content:hover img {
    transform: scale(1.05);
    /* Efecto en hover */
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: #050505;
    padding: 100px 0 50px;
    text-align: center;
    border-top: 1px solid rgba(198, 162, 91, 0.1);
}

.footer-logo {
    max-height: 80px;
    width: auto;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer p {
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.social-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--color-accent-gold);
}

/* =========================================
   Sección Contacto
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.contact-card {
    background-color: var(--color-bg-main);
    padding: 35px 20px;
    border: 1px solid rgba(198, 162, 91, 0.2);
    border-radius: 4px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border-color: rgba(198, 162, 91, 0.5);
}

.contact-card h4 {
    color: var(--color-accent-gold);
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.contact-card p,
.contact-card a {
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:focus,
.contact-card a:hover {
    color: var(--color-accent-gold);
}

/* =========================================
   Carrusel de Fotos (Sección Experiencia)
   ========================================= */
.carousel-wrapper {
    position: relative;
    width: 100%;
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0;
    scrollbar-width: none;
    /* Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.carousel-item {
    scroll-snap-align: center;
    flex: 0 0 100%;
    height: 450px;
    /* Reducción de altura */
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
}

@media (min-width: 992px) {
    .carousel-item {
        height: 500px;
        /* Reducción de altura p/ escritorio */
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(198, 162, 91, 0.3);
    color: var(--color-accent-gold);
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
    background: rgba(198, 162, 91, 0.2);
    border-color: var(--color-accent-gold);
    color: #fff;
}

.carousel-btn.prev {
    left: -25px;
}

.carousel-btn.next {
    right: -25px;
}

@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    .carousel-item {
        height: 350px;
    }
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--color-bg-alt);
    padding: 60px 0;
    border-top: 1px solid rgba(198, 162, 91, 0.2);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-left {
    flex: 1;
    min-width: 250px;
}

.footer-logo {
    max-width: 150px;
    margin-bottom: 20px;
}

.footer-left p {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.footer-right {
    flex: 1;
    min-width: 250px;
    text-align: right;
}

.footer-right h4 {
    color: var(--color-accent-gold);
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 25px;
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-accent-gold);
}

.footer-contact-info p {
    color: var(--color-text-secondary);
    margin-bottom: 8px;
    line-height: 1.6;
}

.footer-contact-info a {
    display: block;
    color: var(--color-text-secondary);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-contact-info a:hover {
    color: var(--color-accent-gold);
}

/* =========================================
   Animaciones & Media Queries
   ========================================= */
.fade-in {
    opacity: 0;
    transition: opacity 1.2s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

.slide-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Elementos de imagen tienen una carga ligeramente mapeada al scroll en el JS, 
   pero usamos slide-up general para la caja de la imagen tambíén */

/* Responsive Tablets / Mobile */
@media (max-width: 992px) {
    .grid-2-cols {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }

    .grid-2-cols.reverse {
        direction: ltr;
        /* Restablecer para móvil */
    }

    .text-content {
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content h1 span {
        font-size: 4rem;
    }

    .nav-links {
        display: none;
        /* En un futuro se podría añadir un menú hamburger */
    }

    .text-content h3 {
        font-size: 2.5rem;
    }

    .contact-grid,
    .locations-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

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

    .footer-links {
        justify-content: center;
    }
}