﻿:root {
    --marron-tierra: #1A1817;
    --dourado-azeite: #B5985A;
    --rojo-principal: #E30613;
    --rojo-carrousel: #6B0F1A;
    --beige-lino: #FDFCF8;
}

/* TEXTURA Y CENTRADO ABSOLUTO */
.parallax-wrapper {
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: var(--beige-lino);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='2.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 -12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' fill='black'/%3E%3C/svg%3E"), linear-gradient(rgba(253, 252, 248, 0.7), rgba(253, 252, 248, 0.7)), url('/images/trama-aceitunas.png');
    background-attachment: fixed, fixed, fixed;
    background-position: center, center, center;
    background-size: auto, auto, cover;
    background-blend-mode: multiply, normal, normal;
}

/* ==========================================================================
   CAROUSEL / HERO
   ========================================================================== */
.hero-sticky {
    --hero-height: 44vh;
    position: sticky;
    top: 12vh;
    height: var(--hero-height);
    min-height: 30vh;
    width: 100vw;
    overflow: visible !important;
    z-index: 2;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    z-index: 1;
}

.carousel-img {
    height: 100%;
    width: 100%;
    background-position: center;
    background-size: cover;
}

/* ==========================================================================
   SISTEMA DE CAPAS (TÍTULO + LOGOS + BOTONES)
   ========================================================================== */
.hero-overlay-system {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Título centrado */
.hero-title-fixed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    font-family: 'Playfair Display', serif;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    line-height: 0.85;
    z-index: 20;
    transition: color 0.4s ease;
    clip-path: polygon(0 50%, 100% 50%, 100% 50%, 0 50%);
    animation: revealFromCenter 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    animation-delay: 0.2s;
}

.title-main {
    font-size: clamp(2.88rem, 7.2vw, 6.48rem);
    color: white !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -2px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
    transition: color 0.4s ease;
}

.title-sub {
    font-size: clamp(1.92rem, 4.8vw, 4.32rem);
    color: white !important;
    font-weight: 400;
    font-style: italic;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: color 0.4s ease;
}

.text-scrolled .title-main,
.page-scrolled .title-main {
    color: var(--marron-tierra) !important;
    text-shadow: none !important;
}

.text-scrolled .title-sub,
.page-scrolled .title-sub {
    color: var(--dourado-azeite) !important;
    text-shadow: none !important;
}

/* Bloque de logos y botones */
.brands-interaction-block {
    position: absolute;
    top: calc(100% + 2vh);
    left: 50%;
    transform: translate(-50%, 0);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    clip-path: polygon(0 50%, 100% 50%, 100% 50%, 0 50%);
    animation: revealFromCenter 1.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    animation-delay: 0.5s;
}

.logo-float-system {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 3vw, 94px);
    width: 100%;
    flex-wrap: wrap;
}

.brand-logo-item,
.logo-mid {
    height: clamp(10vh, 18vh, 25vh); /* Altura relativa al viewport */
    width: auto;
    max-width: 40vw;
    display: block;
}

.btn-hero {
    padding: 1.5vh 3vw; /* Padding proporcional */
    font-size: 2vh; /* Fuente proporcional */
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.4s ease;
    letter-spacing: 2px;
    white-space: nowrap;
}

.btn-float-system {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 2vh;
    flex-wrap: wrap;
    gap: 1.5vw;
}

.btn-hero-outline {
    border: 1px solid var(--marron-tierra);
    color: var(--marron-tierra) !important;
}

.btn-hero-solid {
    background: var(--marron-tierra);
    color: #fff !important;
    border: 1px solid var(--marron-tierra);
}

@keyframes revealFromCenter {
    0% {
        clip-path: polygon(0 50%, 100% 50%, 100% 50%, 0 50%);
        opacity: 0;
    }

    100% {
        clip-path: polygon(-20% -20%, 120% -20%, 120% 120%, -20% 120%);
        opacity: 1;
    }
}

/* ==========================================================================
   SECCIÓN PRODUCTOS, INSTAGRAM Y FOOTER
   ========================================================================== */
.section-productos-familia {
    position: relative;
    z-index: 25;
    background-color: var(--rojo-carrousel);
    margin-top: calc(115vh - 12vh);
    height: auto;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 40px 0;
}

.family-content-centered {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.family-header-box {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 15px;
}

.section-subtitle-light {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--dourado-azeite);
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
}

.family-title-light {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    color: #fff;
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.2;
}

.italic-serif-gold {
    font-style: italic;
    color: var(--dourado-azeite);
}

.family-line-gold {
    width: 50px;
    height: 1px;
    background: var(--dourado-azeite);
    margin: 20px auto 0;
}

.family-ribbon-white {
    width: 100%;
    background: #ffffff;
    padding: 20px 0;
    position: relative;
    overflow: hidden;
}

.family-ticker-move {
    display: flex;
    width: max-content;
    align-items: center;
}

.family-item {
    flex: 0 0 auto;
    margin: 0 !important;
}

.family-img-pure {
    height: clamp(150px, 30vw, 300px) !important;
    width: auto !important;
    display: block;
}

.section-instagram {
    padding: 60px 0;
    min-height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: transparent;
    z-index: 26;
    position: relative;
}

.insta-title {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    color: var(--marron-tierra);
    margin-bottom: 0;
}

.insta-link {
    color: var(--marron-tierra);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: inline-block;
    transition: color 0.3s ease;
    font-weight: 600;
}

    .insta-link:hover {
        color: var(--dourado-azeite);
    }

.behold-container-compact {
    max-width: 750px;
    width: 90%;
    margin: 0 auto;
    max-height: none;
    overflow: visible;
}

.social-actions-box {
    margin-top: 30px;
    margin-bottom: 40px;
}

.btn-social-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    text-decoration: none;
    border: 1px solid var(--marron-tierra);
    background-color: var(--marron-tierra);
    color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 0;
}

    .btn-social-icon:hover {
        border-color: var(--dourado-azeite);
        background-color: var(--dourado-azeite);
        color: #ffffff;
    }

/* Footer relativo, proporciones actualizadas */
.footer {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100%;
    height: 6vh;
    min-height: 6vh;
    max-height: 6vh;
    background: var(--rojo-principal) !important;
    color: white !important;
    text-align: center;
    line-height: 6vh;
    font-size: 1.5vh;
    border: none;
    z-index: 1000;
    overflow: hidden;
}

/* ==========================================================================
   MEDIA QUERIES – MÓVIL
   ========================================================================== */
@media (max-width: 991px) {
    .hero-sticky {
        --hero-height: 50vh;
        min-height: 25vh;
        top: 12vh;
    }

    .brands-interaction-block {
        top: calc(100% + 1.5vh);
    }

    .brand-logo-item,
    .logo-mid {
        height: clamp(8vh, 12vh, 15vh);
        max-width: 35vw;
    }

    .btn-hero {
        padding: 1vh 2vw;
        font-size: 1.5vh;
    }

    .section-productos-familia {
        margin-top: calc(100vh - 10vh - 6vh);
    }
}

@media (max-width: 576px) {
    .hero-sticky {
        --hero-height: 50vh;
        min-height: 20vh;
        top: 10vh;
    }

    .brands-interaction-block {
        top: calc(100% + 1vh);
    }

    .brand-logo-item,
    .logo-mid {
        height: clamp(8vh, 12vh, 15vh);
        max-width: 35vw;
    }

    .btn-float-system {
        flex-direction: column;
        align-items: center;
        gap: 1vh;
    }

    .btn-hero {
        padding: 1.2vh 4vw;
        font-size: 1.6vh;
        width: auto;
    }

    .family-title-light {
        font-size: 1.8rem;
    }

    .family-img-pure {
        height: 160px !important;
    }

    .footer {
        font-size: 1.2vh;
        height: 6vh;
        min-height: 6vh;
        max-height: 6vh;
        line-height: 6vh;
    }

    .section-instagram {
        padding: 30px 0;
    }

    .insta-title {
        font-size: 1.6rem;
    }
}
