/* ========================================================================
   SECCIÓN: HERO (INICIO)
   ======================================================================== */
.eredita-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.hero-media-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1;
}

.hero-bg-video, .hero-bg-image {
    width: 100%; height: 100%;
    object-fit: cover; /* Esto es lo que hace que el video llene la pantalla */
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(10,32,55,0.7) 0%, rgba(10,32,55,0.4) 100%);
    z-index: 2;
}

.hero-content {
    position: relative; z-index: 3;
    max-width: 800px; padding: 0 20px;
    display: flex; flex-direction: column; align-items: center;
}

.hero-emblema {
    width: 320px; height: auto; margin-bottom: 30px;
}

.hero-titulo {
    color: #E3C16B; font-family: 'Castoro', serif; font-size: 3.5rem;
    font-weight: 400; letter-spacing: 4px; margin-bottom: 20px;
}

.hero-subtitulo {
    color: #FFFFFF; font-family: 'Montserrat', sans-serif; font-size: 1.1rem;
    font-weight: 300; line-height: 1.5;
}

/* ─── SCROLL INDICATOR ─── */
.eredita-scroll-indicator {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
}
.eredita-scroll-indicator span {
    color: rgba(227, 193, 107, 0.85);
    font-family: 'Montserrat', sans-serif;
    font-size: .62rem;
    font-weight: 500;
    letter-spacing: .35em;
    text-transform: uppercase;
    animation: erScroll__text 2.4s ease-in-out infinite;
}
.eredita-scroll-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: erScroll__arrow 2.4s ease-in-out infinite;
}
.eredita-scroll-arrow svg path {
    transition: stroke .3s;
}
.eredita-scroll-indicator:hover .eredita-scroll-arrow svg path {
    stroke: #fff;
}
@keyframes erScroll__text {
    0%, 100% { opacity: .6; transform: translateY(0); }
    50%       { opacity: 1;  transform: translateY(-3px); }
}
@keyframes erScroll__arrow {
    0%, 100% { opacity: .5; transform: translateY(0); }
    50%       { opacity: 1;  transform: translateY(6px); }
}

/* ========================================================================
   SECCIÓN 2: LEGADO DE PASIÓN
   ======================================================================== */
.seccion-legado {
    background-color: #0A2037;
    padding: 100px 0;
    position: relative;
}

.legado-header {
    max-width: 780px;
    margin: 0 auto 60px;
}

.legado-logo {
    max-height: 90px;
    width: auto;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.legado-titulo {
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 28px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.legado-parrafo {
    color: rgba(255,255,255,0.75);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: center;
}

.legado-subtitulo-intro {
    color: rgba(255,255,255,0.55);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 0;
    text-align: center;
}

/* --- PILARES --- */
.legado-pilares {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.legado-pilar {
    border: 1px solid rgba(227, 193, 107, 0.25);
    padding: 40px 32px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.legado-pilar:hover {
    border-color: rgba(227, 193, 107, 0.6);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.legado-pilar-icono {
    margin-bottom: 28px;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.legado-pilar-icono img {
    max-height: 64px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.legado-pilar-titulo {
    color: #E3C16B;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.legado-pilar-texto {
    color: rgba(255,255,255,0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    line-height: 1.75;
    margin-bottom: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .seccion-legado { padding: 70px 0; }
    .legado-titulo { font-size: 1.7rem; }
    .legado-pilares { grid-template-columns: 1fr; gap: 16px; }
    .legado-pilar { padding: 30px 24px; }
    .legado-pilar-icono { min-height: auto; margin-bottom: 20px; }
}

@media (min-width: 576px) and (max-width: 991px) {
    .legado-pilares { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================================================
   🍷 SECCIÓN: NUESTRAS MARCAS / VINOS – PREMIUM 2x2
   ======================================================================== */

.seccion-vinos {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
    color: #FFFFFF;
    background-color: #05131F;
}

/* Contenido siempre por encima */
.seccion-vinos .container {
    position: relative;
    z-index: 10;
}

/* ========================================================================
   1. FONDO GLOBAL + OVERLAY PROFUNDO
   ======================================================================== */

.vinos-bg-global {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    z-index: 0;
    transition: background-image 0.8s ease;
}

.vinos-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5, 19, 32, 0.92),
        rgba(5, 19, 32, 0.88)
    );
    z-index: 1;
}

/* ========================================================================
   2. TIPOGRAFÍA EDITORIAL
   ======================================================================== */

.vinos-section-title {
    font-family: 'Castoro', serif;
    color: #E3C16B;
    font-size: 3.2rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.vinos-section-subtitle {
    font-family: 'Montserrat', sans-serif;
    color: rgba(227, 193, 107, 0.85);
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 80px auto;
    line-height: 1.6;
}

/* ========================================================================
   3. GRID 2x2 MATEMÁTICO (ULTRA LIMPIO)
   ======================================================================== */

.seccion-vinos .row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Bootstrap override para que no interfiera */
.seccion-vinos .col-lg-4,
.seccion-vinos .col-md-6 {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* ========================================================================
   4. TARJETA PREMIUM (CON PROFUNDIDAD REAL)
   ======================================================================== */

.vino-card {
    position: relative;
    height: 420px;
    border: 1px solid rgba(227, 193, 107, 0.7);
    background-color: rgba(5,19,32,0.95);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.vino-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
}

/* Línea interior elegante */
.vino-card::before {
    content: "";
    position: absolute;
    inset: 15px;
    border: 1px solid rgba(227, 193, 107, 0.2);
    pointer-events: none;
}

/* ========================================================================
   5. FRENTE
   ======================================================================== */

.vino-front,
.vino-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Frente */
.vino-front {
    opacity: 1;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(10,32,55,1) 0%,
        rgba(5,19,32,1) 100%
    );
}

.vino-botella {
    max-height: 180px;
    margin-bottom: 18px;
    transition: transform 0.6s ease;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6));
}

.vino-card:hover .vino-botella {
    transform: scale(1.06);
}

.vino-nombre {
    font-family: 'Castoro', serif;
    color: #E3C16B;
    font-size: 1.5rem;
    margin-bottom: 10px;
    position: relative;
}

.vino-nombre::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: #E3C16B;
    margin: 10px auto 0;
    opacity: 0.6;
}

.vino-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    color: #f1f1f1;
    max-width: 90%;
    line-height: 1.5;
}

/* ========================================================================
   6. DORSO (UNIVERSO VISUAL)
   ======================================================================== */

.vino-back {
    opacity: 0;
    transform: scale(1.1);
    background-size: cover;
    background-position: center;
}

.vino-card:hover .vino-front {
    opacity: 0;
    transform: scale(0.95);
}

.vino-card:hover .vino-back {
    opacity: 1;
    transform: scale(1);
}

.vino-back-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.vino-logo-marca {
    position: relative;
    z-index: 2;
    max-width: 70%;
    max-height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

/* ========================================================================
   7. BOTÓN EDITORIAL PREMIUM
   ======================================================================== */

.vino-action {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #051320;
    border-top: 1px solid rgba(227, 193, 107, 0.25);
}

.btn-vino-descubre {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    color: #E3C16B;
    border: 1px solid #E3C16B;
    padding: 12px 50px;
    border-radius: 40px;
    text-decoration: none;
    transition: all 0.4s ease;
    text-transform: uppercase;
}

.btn-vino-descubre:hover {
    background-color: #E3C16B;
    color: #051320;
    box-shadow: 0 0 25px rgba(227,193,107,0.4);
}

/* Glow dorado elegante al revelar */

.vino-card.is-revealed {
    box-shadow:
        0 0 0 1px rgba(227,193,107,0.6),
        0 25px 60px rgba(0,0,0,0.6),
        0 0 40px rgba(227,193,107,0.15);
}

/* Botón animado al revelar */

.vino-action {
    overflow: hidden;
}

.btn-vino-descubre {
    position: relative;
    transform: translateY(10px);
    opacity: 0;
    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}

.vino-card.is-revealed .btn-vino-descubre {
    transform: translateY(0);
    opacity: 1;
}

@media (min-width: 992px) {
    .vino-card:hover .btn-vino-descubre {
        transform: translateY(0);
        opacity: 1;
    }
}

.btn-vino-descubre::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s ease, left 0.4s ease;
}

.btn-vino-descubre:hover::after {
    width: 60%;
    left: 20%;
}

.vino-front::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    background: radial-gradient(
        circle,
        rgba(227,193,107,0.18) 0%,
        rgba(227,193,107,0.08) 35%,
        transparent 70%
    );
    z-index: 0;
    filter: blur(40px);
    opacity: 0.6;
    transition: opacity 0.6s ease;
}

.vino-card:hover .vino-front::before,
.vino-card.is-revealed .vino-front::before {
    opacity: 1;
}

.vino-botella {
    position: relative;
    z-index: 2;
}

.vino-front a {
    display: block;
    position: relative;
    z-index: 3;
    line-height: 0;
}



/* ========================================================================
   8. RESPONSIVE
   ======================================================================== */

@media (max-width: 1200px) {
    .seccion-vinos .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .seccion-vinos .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .seccion-vinos .col-lg-3,
    .seccion-vinos .col-md-6 {
        margin-bottom: 0 !important;
    }

    .vinos-section-title { font-size: 1.8rem; }
    .vinos-section-subtitle { font-size: 0.9rem; margin-bottom: 28px; }

    .vino-card {
        height: 340px;
    }

    /* Frente ocupa toda la card */
    .vino-front {
        bottom: 0;
        background: linear-gradient(180deg, rgba(5,19,32,0.85) 0%, rgba(5,19,32,0.95) 100%);
    }

    /* Dorso visible en mobile como fondo, cubre toda la card */
    .vino-back {
        bottom: 0;
        opacity: 1;
        transform: none;
        z-index: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    /* Botella vuelve a su tamaño original */
    .vino-botella {
        max-height: 160px;
    }

    .vino-nombre {
        font-size: 1.1rem;
    }

    /* Ocultar el recuadro del botón */
    .vino-action {
        display: none;
    }
}
/* ==========================================================
   INTERACCIÓN FRENTE / DORSO
   ========================================================== */

/* 🖥 DESKTOP – Hover real */
@media (min-width: 992px) {

    .vino-card:hover .vino-front {
        opacity: 0;
        transform: scale(0.94);
        z-index: 1;
    }

    .vino-card:hover .vino-back {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }
}

/* 📱 MÓVIL – Activado por JS (.is-revealed) */
.vino-card.is-revealed .vino-front {
    opacity: 0;
    transform: scale(0.94);
    z-index: 1;
}

.vino-card.is-revealed .vino-back {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* ========================================================================
   SECCIÓN: CONTACTO (FORMULARIO CENTRADO PREMIUM)
   ======================================================================== */

main.site-main > section.seccion-contacto {
    padding: 32px 0 !important;
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
}

/* Contenido por encima del overlay */
.seccion-contacto .container {
    position: relative;
    z-index: 10;
}

/* Título */
.seccion-contacto .vinos-section-title {
    position: relative;
    z-index: 10;
    margin-bottom: 30px;
}

/* ========================================================================
   1. FONDO Y OVERLAY (AHORA CENTRADO)
   ======================================================================== */

.contacto-bg-global {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: 0;
}

/* Overlay ahora uniforme (no lateral) */
.contacto-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5,19,32,0.92),
        rgba(5,19,32,0.75)
    );
    backdrop-filter: blur(2px);
    z-index: 1;
}

/* ========================================================================
   2. CAJA FORMULARIO ULTRA PREMIUM
   ======================================================================== */

.contacto-form-wrapper {
    background: rgba(5, 19, 32, 0.75);
    padding: 32px 36px;
    border: 1px solid rgba(227, 193, 107, 0.4);
    backdrop-filter: blur(14px);
    box-shadow:
        0 24px 50px rgba(0,0,0,0.5),
        0 0 30px rgba(227,193,107,0.06);
    position: relative;
    transition: transform 0.4s ease;
}

/* Marco interior elegante */
.contacto-form-wrapper::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(227,193,107,0.15);
    pointer-events: none;
}

/* Hover sutil */
.contacto-form-wrapper:hover {
    transform: translateY(-6px);
}

/* ========================================================================
   3. RESPONSIVE
   ======================================================================== */

@media (max-width: 992px) {
    .contacto-form-wrapper {
        padding: 28px 24px;
    }
}

@media (max-width: 768px) {
    .contacto-form-wrapper {
        padding: 22px 18px;
    }
}

/* ========================================================================
   4. INPUTS PREMIUM
   ======================================================================== */

.eredita-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    color: #E3C16B;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}

.eredita-input {
    background-color: transparent !important;
    border: none;
    border-bottom: 1px solid rgba(227, 193, 107, 0.4);
    border-radius: 0;
    color: #FFFFFF !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    padding: 7px 0;
    box-shadow: none !important;
    transition: 
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

/* Focus elegante */
.eredita-input:focus {
    border-bottom: 1px solid #E3C16B;
    outline: none;
    box-shadow: 0 4px 15px rgba(227,193,107,0.1);
}

/* Autofill fix */
.eredita-input:-webkit-autofill,
.eredita-input:-webkit-autofill:hover, 
.eredita-input:-webkit-autofill:focus, 
.eredita-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0A2037 inset !important;
    -webkit-text-fill-color: #FFFFFF !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Botón del legado y del contacto: siempre visible (no están dentro de .vino-card) */
.seccion-legado .btn-vino-descubre {
    opacity: 1;
    transform: none;
}
.seccion-legado .btn-vino-descubre:hover {
    background-color: #E3C16B;
    color: #051320;
}

.contacto-form-wrapper .btn-vino-descubre {
    opacity: 1;
    transform: none;
    background: transparent;
    background-color: transparent;
    color: #E3C16B;
    border: 1px solid #E3C16B;
    cursor: pointer;
    display: inline-block;
}
.contacto-form-wrapper .btn-vino-descubre:hover {
    background-color: #E3C16B;
    color: #051320;
}

/* ========================================================================
   5. TRANSICIÓN SUAVE DEL FONDO VINOS
   ======================================================================== */

#js-section-vinos {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.6s ease-in-out;
}