/* ================= VARIABLES Y RESET ================= */
:root {
    --terra: #ce612c;
    --green: #249567;
    --dark: #12041e;
    --black: #000000; 
    --light: #f4e9f6;
    --white: #ffffff;
    --gray: #857d86;
    --gray-light: #aba1ac;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto Condensed', sans-serif;
}

html { scroll-behavior: smooth; }

section { scroll-margin-top: 80px; }

body { background-color: var(--black); color: var(--white); line-height: 1.5; overflow-x: hidden; }

/* ================= UTILIDADES ================= */
.text-terra { color: var(--terra); }
.text-green { color: var(--green); }
.text-dark { color: var(--dark) !important; }
.text-white { color: var(--white); }
.text-light { color: var(--light); }
.text-gray { color: var(--gray); }
.text-gray-light { color: var(--gray-light); }

.bg-dark { background-color: var(--dark); }
.bg-white { background-color: var(--white); }
.bg-black { background-color: var(--black); }
.bg-light { background-color: var(--light) !important; }
.bg-gray-light { background-color: var(--gray-light); }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-justify { text-align: justify; }

.text-sm { font-size: 0.9rem; }
.text-lg { font-size: 1.15rem; }
.text-proceso { font-size: 1.05rem; }
.text-reel-desc { font-size: 0.95rem; }
.font-bold { font-weight: 700; }
.italic { font-style: italic; }

.text-plus-5pt { font-size: 1.5rem !important; }
.text-plus-2pt { font-size: 1.3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-double { margin-top: 4rem; }
.mb-double { margin-bottom: 4rem; }
.w-100 { width: 100%; }

.mb-2-spaces { margin-bottom: 1.2rem !important; }
.mb-4-spaces { margin-bottom: 2rem !important; }

.relative { position: relative; }

.container { max-width: 1000px; margin: 0 auto; width: 100%; padding: 0 1.5rem; }
.container-narrow { max-width: 700px; }
.container-packs { max-width: 1100px; margin: 0 auto; width: 100%; padding: 0 1.5rem; }
.container-testimonios { max-width: 1400px; margin: 0 auto; width: 100%; padding: 0 1.5rem; }

h1, h2, h3, h4 { margin-bottom: 1rem; font-weight: 700; }
p { margin-bottom: 1rem; }

/* ESTRUCTURAS DE PANTALLA Y BARRAS */
.hero-screen { 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    position: relative;
    padding: 80px 0 60px; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.calc-screen { 
    min-height: calc(100vh - 80px); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    position: relative;
    padding: 40px 0 60px; 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section-centered-adjusted {
    padding-top: 10px !important; 
    padding-bottom: 50px !important; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-packs-adjusted {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auto-screen { 
    min-height: auto; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 80px 0;
}

.align-top {
    justify-content: flex-start;
    padding-top: 60px;
}
.align-center {
    justify-content: center;
}
.section-title-spacing {
    margin-bottom: 4rem;
}

.border-terra-bottom { border-bottom: 15px solid var(--terra); }

/* ================= BOTONES ================= */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.3s ease, background-color 0.3s ease, filter 0.3s ease;
    text-align: center;
    font-size: 1.1rem;
}

.btn:hover { transform: scale(1.05) !important; }

.btn-primary { background-color: var(--terra); color: var(--white); border-color: var(--terra); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline-green { background-color: transparent; border: 2px solid var(--green); color: var(--terra); }
.btn-outline-green:hover { background-color: rgba(36, 149, 103, 0.1); }
.btn-outline { background-color: transparent; color: var(--white); border-color: var(--terra); }
.btn-green { background-color: var(--green); color: var(--white); border-radius: 4px; }
.text-btn { background: none; border: none; cursor: pointer; text-decoration: underline; font-size: 1rem; padding: 0; }

.btn-link-no-underline { text-decoration: none !important; }

.btn-scale-scroll {
    transform: scale(0.9);
}
.btn-scale-scroll.visible {
    transform: scale(1);
}
.btn-scale-scroll.visible:hover {
    transform: scale(1.05);
}

/* ================= HEADER Y MENÚ ================= */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: all 0.3s ease; padding: 1rem 1.5rem; background-color: var(--black); }
header.scrolled { background-color: var(--black); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }

.header-container { max-width: 1000px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo-area { display: flex; align-items: center; gap: 15px; }
.avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.avatar-border { border: 2px solid var(--light); }
.logo-name { font-weight: 700; letter-spacing: 1px; color: var(--green); font-size: 1.2rem; }

#menu-toggle { background: none; border: none; color: var(--gray-light); cursor: pointer; display: flex; align-items: center; }

#mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 300px; height: 100vh;
    background-color: var(--black);
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    z-index: 200;
    transition: right 0.4s ease;
    display: flex; flex-direction: column;
}
#mobile-menu.open { right: 0; }
.menu-content { padding: 2rem; position: relative; }

#close-menu { 
    position: absolute; top: 1.5rem; right: 1.5rem; 
    background: none; border: none; color: var(--white); 
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: color 0.3s ease;
}
#close-menu:hover { color: var(--terra); }

.menu-links { list-style: none; margin-top: 3rem; }
.menu-links li { margin-bottom: 1.5rem; }
.nav-link, .menu-links .text-btn { color: var(--white); text-decoration: none; font-size: 1.2rem; font-weight: 700; }
.nav-link:hover, .menu-links .text-btn:hover { color: var(--terra); }
.menu-divider { border-bottom: 1px solid var(--gray); margin: 2rem 0; }

/* ================= HERO ================= */
.hero-section {
    position: relative;
    padding-top: 80px; 
    box-sizing: border-box; 
}

.hero-container {
    width: 100%;
    max-width: 1350px; 
    padding: 0 1.5rem; 
    margin: 0 auto;
}

.hero-grid { 
    display: grid; 
    grid-template-columns: 1.3fr 0.7fr; 
    gap: 0;
    align-items: center; 
}

.hero-content { 
    text-align: center; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
    gap: 2.5rem; 
    padding: 0.5rem 0; 
}

.hero-text-group {
    display: flex;
    flex-direction: column;
    gap: 1.8rem; 
}

.hero-content h1 { font-size: 3.1rem; line-height: 1.1; margin: 0; }
.hero-subtitle { font-size: 2.1rem; line-height: 1.4; margin: 0; color: var(--light); }

.hero-buttons { 
    display: flex; 
    justify-content: center; 
    gap: 1.9rem; 
    margin: 0;
}

.hero-buttons .btn {
    font-size: 1.3rem; 
    padding: 1rem 2.3rem;
}

.hero-image {
    display: flex;
    align-items: center;
    margin-left: -3rem; 
}

.hero-image img { 
    width: 100%; 
    max-width: 268px; 
    border-radius: 20px; 
    border: 2px solid var(--light);
    display: block; 
    margin: 0 auto; 
}

/* ================= FLECHAS DE SCROLL ================= */
.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    transition: transform 0.3s ease;
}
.scroll-down-arrow:hover {
    transform: translateX(-50%) translateY(5px);
}
.scroll-down-arrow svg { width: 45px; height: 45px; }
.arrow-light svg { fill: var(--light); }
.arrow-dark svg { fill: var(--dark); }

/* ================= WIDGET COOKIES FLOTANTE ================= */
#cookie-widget { position: fixed; bottom: 30px; right: 30px; z-index: 999; }
#cookie-float-btn {
    background-color: var(--white); color: var(--dark); font-weight: 700;
    border: none; border-radius: 30px; 
    padding: 12px 24px; font-size: 1rem; cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}
#cookie-float-btn:hover { transform: scale(1.1) !important; }

#cookie-panel {
    background-color: var(--white); color: var(--dark);
    border: 1px solid var(--gray-light); border-radius: 12px;
    padding: 1.5rem; width: 320px; position: fixed; bottom: 30px; right: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
#cookie-panel.hidden { display: none; }
.cookie-panel-header h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.cookie-text { font-size: 0.95rem; line-height: 1.4; margin-bottom: 1rem; }
.link-cookies-legal { font-size: 0.85rem !important; }

/* ================= MODALES FLOTANTES ================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1.5rem;
}
.modal-overlay.active { display: flex; }

.modal-content {
    width: 100%;
    max-width: 650px;
    max-height: 85vh;
    padding: 2.5rem;
    border-radius: 15px;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1rem;
    background: none; border: none;
    cursor: pointer;
    display: flex; justify-content: center; align-items: center;
}

.responsable-box {
    background-color: #f0f0f0;
    color: var(--dark);
    border-radius: 12px;
    padding: 1.5rem;
    border: none;
}
.responsable-box p { margin-bottom: 0; }

/* ================= SECCIÓN: CUELLO BOTELLA ================= */
.cuello-botella-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.cuello-botella-container {
    max-width: 650px;
    width: 100%;
    font-size: 1.15rem;
}

.cuello-linea-terra {
    border-left: 1px solid var(--terra);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.cuello-botella-bottom {
    padding-left: calc(1.5rem + 1px);
    margin-top: 3rem; 
}

/* ================= PACKS (Modelos de colaboración) ================= */
.packs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem; 
    align-items: center; 
}
.pack-wrapper {
    display: flex;
    flex-direction: column;
}
.pack-card {
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    border: 1px solid var(--gray-light); 
    position: relative;
}
.pack-card-side {
    padding: 0.8rem 1.2rem; 
}
.pack-card-center {
    padding: 1.5rem 1.2rem;
}

.highlight-wrapper {
    transform: scale(1.05);
    z-index: 2;
}
.pack-card.highlight {
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.pack-card h3 { margin-bottom: 0.5rem; font-size: 1.5rem; }
.pack-desc { margin-bottom: 1rem; min-height: 30px; color: var(--black); font-size: 1rem; }
.pack-features {
    list-style: none;
    margin-bottom: 1rem; 
    flex-grow: 1;
    text-align: left;
}
.pack-features li {
    margin-bottom: 0.5rem; 
    padding-left: 1.5rem;
    position: relative;
    font-size: 1.1rem; 
    color: var(--black);
}
.pack-features li::before {
    content: "●"; 
    color: var(--green);
    position: absolute;
    left: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.pack-price { font-size: 0.75rem; color: var(--dark); margin-bottom: 1rem; }
.pack-price-box { margin-bottom: 1rem; color: var(--dark); font-size: 0.75rem; }

.badge {
    position: absolute;
    top: -15px;
    right: 20px;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--white);
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10;
}
.badge-terra { background-color: var(--terra); }
.badge-green { background-color: var(--green); }

.pack-note {
    color: var(--light);
    font-size: 0.75rem;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 0;
}

/* ================= VIDEOS FACADE ================= */
.video-container { 
    position: relative; 
    width: 100%; 
    padding-bottom: 56.25%; 
    height: 0; 
    overflow: hidden; 
    border-radius: 0; 
    border: 2px solid var(--terra); 
    background-color: #000; 
    display: block;
    z-index: 1; 
}
.vimeo-facade {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    cursor: pointer;
}
.vimeo-facade img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.play-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 65px; height: 65px;
    background-color: var(--green); 
    border-radius: 8px; 
    display: flex; justify-content: center; align-items: center; 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}
.play-btn svg { width: 35px; height: 35px; fill: var(--white); margin: 0; }
.vimeo-facade:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.05); 
}
.video-container iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; border: none; z-index: 3;
    border-radius: 0;
}

/* ================= SECCIÓN: SELECCIÓN DE TRABAJOS ================= */
.main-reel {
    max-width: 1050px; 
    margin: 0 auto;
}

/* ================= SECCIÓN: PROYECTOS DESTACADOS ================= */
.max-w-proyectos {
    max-width: 1250px; 
}

.proyectos-list {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    width: 100%;
    margin: 0 auto 5rem; 
}

.proyecto-row {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr; 
    gap: 0;
    align-items: center;
}

.proyecto-row.row-reverse {
    grid-template-columns: 0.85fr 1.15fr; 
}
.proyecto-row.row-reverse .video-wrapper { order: 2; }
.proyecto-row.row-reverse .text-wrapper { order: 1; text-align: left; }

.proyecto-title { font-size: 1.2rem; margin-bottom: 0.5rem; text-transform: uppercase; }
.proyecto-meta { font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; }
.proyecto-desc { font-size: 1rem; line-height: 1.6; text-align: justify; }

.max-w-video {
    max-width: 550px;
    width: 100%;
}
.proyecto-row.row-reverse .max-w-video {
    margin-left: auto; 
}

/* ================= SECCIÓN: CÓMO VAMOS A TRABAJAR ================= */
.proceso-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
}

.proceso-step-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}
.proceso-step-col .step-num {
    font-size: 2rem; 
    line-height: 1;
    margin-bottom: 0.2rem;
}
.proceso-step-col h4 { margin-bottom: 0.2rem; font-size: 1.2rem; }

.step-connector {
    width: 1px; 
    height: 20px; 
    background-color: var(--green);
    margin: 0.5rem auto;
}

/* ================= SECCIÓN: TESTIMONIOS ================= */
.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.testimonio-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem 1.8rem; 
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.testimonio-card .quote { 
    font-style: italic; 
    margin-bottom: 0.8rem; 
    flex-grow: 1; 
    line-height: 1.5; 
    font-size: 1.3rem; 
    text-wrap: balance;
}

.testimonios-logos-block { margin-top: 4rem; }
.testimonios-logos-block img { max-width: 100%; height: auto; display: inline-block; }

/* ================= CTA FINAL Y FOOTER ================= */
#cta {
    padding-top: 80px;
    padding-bottom: 60px;
}

.cta-profile-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 950px; 
    margin: 0 auto;
    text-align: left;
}

.cta-avatar-round {
    width: 130px; 
    height: 130px;
    border-radius: 50%;
    border: 2px solid var(--light);
    object-fit: cover;
    flex-shrink: 0;
}

.cta-text { 
    font-size: 2.1rem; 
    line-height: 1.3; 
    margin: 0; 
    text-wrap: balance;
}

.cta-button-wrapper { margin-top: 4rem; }

.footer-separator {
    width: 100%;
    height: 2px;
    background-color: var(--light);
}

footer { padding: 3rem 1.5rem; }

.footer-text-container {
    max-width: 800px; 
    margin: 0 auto;
}

.volver-arriba { text-decoration: none; font-size: 1.1rem; }
.volver-arriba:hover { text-decoration: underline; }

.social-icons { display: flex; justify-content: center; gap: 0.8rem; } 
.social-link svg { width: 20px; height: 20px; fill: var(--light); transition: transform 0.3s ease; }
.social-link:hover svg { transform: scale(1.15); }

.footer-hr {
    border: none;
    border-top: 1px solid var(--gray);
    width: 50%;
    margin: 1.5rem auto;
}

/* ================= ANIMACIONES (Scroll) ================= */
.scale-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ================= SEO CONTEXT ================= */
.seo-context {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 850px) {
    .hero-container { max-width: 100%; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; align-items: center; }
    .hero-content { padding: 0; justify-content: center; gap: 2rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    
    .hero-image { display: none; } /* Ocultar avatar en móvil */
    
    #cookie-widget { bottom: 20px; right: 20px; }
    
    /* Título 20% más pequeño en móvil */
    .hero-content h1 { font-size: 2.08rem; } 
    /* Párrafos 30% más pequeños en móvil, y arreglo de líneas huérfanas ocultando los <br> */
    .hero-subtitle { 
        font-size: 1.19rem; 
        text-wrap: balance; 
    }
    .hero-subtitle br { 
        display: none; 
    }
    
    .cta-text { font-size: 1.19rem; }

    .hero-screen, .calc-screen, .auto-screen { padding: 100px 0; min-height: auto; }
    .section-centered-adjusted { padding-top: 70px !important; padding-bottom: 70px !important; }
    .section-packs-adjusted { padding-top: 100px !important; padding-bottom: 100px !important; }
    
    .cuello-botella-container { font-size: 1rem; }
    .cuello-linea-terra { padding-left: 1rem; margin-left: 0.5rem; }
    .cuello-botella-bottom { padding-left: calc(1rem + 1px + 0.5rem); margin-top: 2rem; }
    
    /* Packs y Testimonios separados para ajustar el gap a la mitad (1.5rem) en Testimonios */
    .packs-grid { grid-template-columns: 1fr; gap: 3rem; }
    .testimonios-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    
    .highlight-wrapper { transform: scale(1); }
    .badge { right: 20px; } 
    
    /* FIX DEFINITIVO: Convertimos la fila en Flexbox de columna para forzar el orden natural */
    .proyecto-row { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 1.5rem !important; 
        text-align: left; 
    }
    .proyecto-row .video-wrapper { order: 1 !important; width: 100% !important; }
    .proyecto-row .text-wrapper { order: 2 !important; width: 100% !important; margin-top: 0 !important; }
    .proyecto-row.row-reverse .max-w-video { margin-left: 0 !important; }
    
    .cta-profile-block { flex-direction: column; text-align: center; }
    .cta-avatar-round { width: 110px; height: 110px; }
}