/* --- RESET Y VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url(../fonts/Cinzel-VariableFont_wght.ttf);
@import url(../fonts/Roboto-VariableFont_wdth,wght.ttf);

html {
    /* Ajusta este valor según la altura de tu navbar (ej: si tu navbar mide 80px) */
    scroll-padding-top: 100px;

    /* ¡Un truco extra! Esto hace que el deslizamiento sea suave en lugar de un salto brusco */
    scroll-behavior: smooth;
}

:root {
    --bg-light: #F2F2F0;
    /* Color beige de fondo general */
    --text-dark: #3A3A3E;
    --text-grey: #3A3A3E;
    --accent-dark: #9B908A;
    /* Color gris/marrón de los botones */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* --- CONTENEDOR GENERAL --- */
.container {
    width: 1200px;
    max-width: 90%;
    margin: auto;
}

/* --- TIPOGRAFÍA COMÚN --- */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 2.2rem;
}

strong {
    font-family: var(--font-heading);
}

p strong {
    font-family: var(--font-body);
    line-height: 1rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title span {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: 300;
    margin-top: 5px;
}

/* --- BOTONES --- */
.btn {
    padding: 12px 30px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.2rem;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.btn-white {
    background-color: #ffffff;
    color: var(--text-dark);
}

.btn-white:hover {
    background-color: #e0e0e0;
}

.btn-dark {
    background-color: var(--accent-dark);
    color: #ffffff;
}

.btn-dark:hover {
    background-color: #6a645e;
}

/* =====================================
   1. HERO (Arriba)
   ===================================== */
.hero {
    height: 100vh;
    min-height: 600px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('../images/index/image-hero.png');
    background-color: #555;
    /* Fallback */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    justify-content: flex-end;
    /* Alinea el texto a la derecha */
}

.hero-content {
    text-align: right;
    color: #ffffff;
    max-width: 500px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* =====================================
   2. SEGURIDAD JURÍDICA (Nosotros)
   ===================================== */
.about {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-text h2 span {
    font-family: var(--font-body);
    font-size: 1.2rem;
    display: block;
    color: var(--text-grey);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-grey);
    line-height: 1.2rem;
    width: 500px;
}

.about-images {
    flex: 1;
    position: relative;
    /* Clave para superponer imágenes */
    height: 500px;
}

.img-large {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    height: 400px;
    background-image: url('../images/index/contactar_big.png');
    background-color: #ccc;
    background-size: cover;
    background-position: center;
    border: 10px solid var(--bg-light);
    /* Borde que "corta" la foto grande */
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.1);
}

.img-small {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 55%;
    height: 250px;
    background-image: url('../images/index/contactar_mini.png');
    background-color: #aaa;
    background-size: cover;
    background-position: center;
    border: 10px solid var(--bg-light);
    /* Borde blanco/beige para separarla de la foto de atrás */
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.1);
}

/* =====================================
   3. MISIÓN Y VISIÓN
   ===================================== */
.mission-vision {
    padding: 60px 0 100px;
}

.cards-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
}

/* Limpiamos la tarjeta general por las dudas */
.card {
    width: 350px;
    height: 450px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 0;
    /* Quitamos bordes redondeados si querés que sea recto */
    background-color: transparent;
    /* Aseguramos que no haya fondos por defecto */
    border: none;
}

/* Borramos los colores #444 y #333 y los dejamos transparentes */
.mission-card {

    background-color: transparent;
}

.vision-card {

    background-color: transparent;
}

/* Capa oscura sobre las fotos */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

}


.card-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.card-icon {
    width: 50px;
    margin-bottom: 15px;
    filter: invert(1);
    /* Pone el ícono en blanco */
}

.card-content h3 {
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 2px;
}

/* =====================================
   4. BARRA OSCURA (Áreas de práctica)
   ===================================== */
.practice-areas {
    background-color: #4a4541;
    /* Marrón oscuro del diseño */
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* =====================================
   5. VIDEO Y NOTAS
   ===================================== */
.video-section {
    padding: 100px 0;
}

.video-container {
    display: flex;
    align-items: stretch;
}

.video-box {
    flex: 6;
}

.video-box iframe {
    width: 100%;
    height: 400px;
    display: block;
}

.video-text-box {
    flex: 4;
    background-color: #e8e6e1;
    /* Gris claro de la caja de texto */
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.video-text-box h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.video-text-box p {
    font-size: 1.2rem;
    line-height: 1.2rem;
    color: var(--text-grey);
    margin-bottom: 2rem;
}

/* =====================================
   6. TESTIMONIOS / LOGOS (Actualizado)
   ===================================== */
.testimonials {
    padding: 190px 0;
    background-color: var(--bg-light);
}

.slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    /* Franja sutil detrás de los logos, parecida a la foto */

    padding: 40px 20px;
    border-radius: 4px;
}

.slider-arrow {
    background: none;
    border: none;
    font-size: 3rem;
    color: var(--accent-dark);
    /* Usa tu color marrón/gris */
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.3s ease;
    z-index: 2;
}

.slider-arrow:hover {
    color: var(--text-dark);
    /* Color oscuro en el hover */
}

/* Contenedor que recorta los logos sobrantes */
.logo-track-container {
    width: 920px;
    /* Ancho matemático exacto para 4 logos + 3 gaps */
    overflow: hidden;
    margin: 0 auto;
    /* Para que quede bien centrado */
}

/* Pista que contiene las imágenes y se desliza */
.logo-track {
    display: flex;
    align-items: center;
    gap: 40px;
    /* Separación entre cada logo */
    transition: transform 0.4s ease-in-out;
}

/* Estandarización de los logos (más grandes y definidos) */
.client-logo {
    flex: 0 0 200px;
    /* Obliga a que cada logo mida exactamente 200px de ancho */
    height: 65px;
    /* Le subí un poco la altura para que destaquen más */
    object-fit: contain;
    /* Evita que se deformen */
}

/* =====================================
   7. BOTTOM HERO (Trabajemos Juntos)
   ===================================== */
.bottom-hero {
    height: 400px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('../images/index/image-hero.png');
    background-color: #333;
    /* Fallback */
    background-size: cover;
    background-position: center bottom;
    display: flex;
    align-items: center;
}

.bottom-hero-container {
    display: flex;
    justify-content: flex-end;
}

.bottom-hero .hero-content h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}




/* =====================================
   MISIÓN Y VISIÓN (Fondo cortado y Tarjetas)
   ===================================== */

/* 1. EL CORTE DE COLOR DE FONDO */
.mission-vision {
    padding: 60px 0 100px;
    /* Usamos linear-gradient para el corte perfecto. 
       El 65% indica la altura donde se hace el corte. Podés jugar con este número. */
    background: linear-gradient(to bottom, var(--bg-light) 65%, #e6e4e0 35%);
}

.cards-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.card {
    width: 350px;
    height: 450px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    /* Fondo oscuro para asegurar contraste durante la transición */

}

/* --- ELEMENTOS INTERNOS (Estado Reposo) --- */
.card-image-default,
.card-image-hover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Asegura que la imagen cubra todo el espacio sin deformarse */
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.4s ease;
    /* Transición fluida del hover */
}

/* Imagen de hover inicialmente oculta */
.card-image-hover {
    opacity: 0;
}


/* =====================================
   LAS REGLAS DE LA ANIMACIÓN (HOVER)
   ===================================== */

/* Ocultamos la imagen predeterminada */
.card:hover .card-image-default {
    opacity: 0;
}

/* Mostramos la imagen de hover */
.card:hover .card-image-hover {
    opacity: 1;
}

/* =====================================
   BARRA OSCURA (Áreas de práctica animada)
   ===================================== */
.practice-areas {
    background-color: #4a4541;
    /* Marrón oscuro del diseño */
    color: #ffffff;
    padding: 20px 0;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 1px;
    overflow: hidden;
    /* Oculta el texto que se sale de la pantalla */
    white-space: nowrap;
    /* Evita que el texto se rompa en varias líneas */
    display: flex;
}

.marquee-track {
    display: flex;
    width: max-content;
    /* El contenedor se estira según el texto */
    /* La animación dura 25 segundos, es lineal (misma velocidad siempre) e infinita */
    animation: scroll-marquee 25s linear infinite;
    font-family: Roboto;
    font-weight: 500;
    font-size: 18px;
    line-height: 120%;
    letter-spacing: 0%;
    text-align: center;
    vertical-align: middle;
    text-transform: capitalize;
}

/* Opcional: Si el usuario pasa el mouse por encima, la animación se pausa para que pueda leer */
.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-track p {
    margin: 0;
    padding-right: 15px;
    font-size: 1.2rem;
    line-height: 1.2rem;
    /* Pequeño espacio extra al final de la frase */
}

/* =====================================
   ANIMACIÓN KEYFRAMES
   ===================================== */
@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
        /* Empieza en la posición original */
    }

    100% {
        transform: translateX(-50%);
        /* Se mueve exactamente la mitad (un párrafo entero) y se reinicia */
    }
}




/* =====================================
   SECCIÓN CONTACTO (Formulario Transparente)
   ===================================== */
.contacto-full {
    /* Cambiá el nombre de la imagen por el que vayas a usar de fondo */
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('../images/index/background_contacto.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Le da un toque muy sutil de Parallax */
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.contacto-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    width: 1200px;
    max-width: 90%;
    margin: auto;
}

/* --- CAJA DEL FORMULARIO (Glassmorphism) --- */
.contacto-form-box {
    flex: 1;
    max-width: 480px;
    /* Color blanco super transparente */
    background: rgba(255, 255, 255, 0.15);
    /* El truco del vidrio esmerilado */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 4px;
    /* Un borde blanquecino super sutil */
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.contacto-form-box h2 {
    color: #ffffff;
    font-family: var(--font-heading);
    /* Serif */
    font-size: 1.3rem;
    margin-bottom: 25px;
    line-height: 1.4;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contacto-form-box form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Inputs y Textarea */
.contacto-form-box input,
.contacto-form-box textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background-color: #ffffff;
    color: #333;
    font-family: var(--font-body);
    font-size: 1.2rem;
    border-radius: 2px;
    outline: none;
}

.contacto-form-box textarea {
    resize: vertical;
    min-height: 100px;
}

.contacto-form-box input::placeholder,
.contacto-form-box textarea::placeholder {
    color: #888;
}

/* Botón Enviar alineado a la derecha */
.btn-enviar {
    align-self: flex-end;
    background-color: #9B908A;
    /* Color beige/marrón de tu paleta */
    color: #ffffff;
    border: none;
    padding: 10px 35px;
    font-size: 1.2rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 2px;
}

.btn-enviar:hover {
    background-color: #7a716c;
}

/* --- CAJA DE TEXTO DERECHA --- */
.contacto-texto-box {
    flex: 1;
    max-width: 450px;
    text-align: center;
    /* Le puse el mismo efecto vidrio pero mucho más oscuro para que resalte el texto */
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 30px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contacto-texto-box h2 {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.3;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .contacto-container {
        flex-direction: column-reverse;
        /* Pone el título arriba en celulares */
        justify-content: center;
    }

    .contacto-form-box,
    .contacto-texto-box {
        width: 100%;
        max-width: 100%;
    }
}

/* =====================================
   8. RESPONSIVE / MOBILE
   ===================================== */
@media (max-width: 900px) {

    /* Cortar de raíz cualquier desbordamiento horizontal */
    html,
    body {
        overflow-x: hidden;
    }

    /* --- 1. ABOUT: Texto arriba, imágenes abajo --- */
    .about-container {
        flex-direction: column;
        display: block;
    }

    .about-text,
    .about-images {
        width: 80%;
        top: 50px;
        justify-self: center;
    }

    /* Único cambio interno: quitar el ancho fijo de 500px para que no rompa la pantalla */
    .about-text p {
        width: 100%;
        font-size: 1.2rem;
        line-height: 1.2rem;
    }

    /* --- 2. MISIÓN Y VISIÓN: Uno al lado del otro, tamaño miniatura --- */
    .cards-grid {
        gap: 10px;
        /* Reducimos el espacio para que entren ambas */
        flex-direction: row;
    }

    .card {
        width: 48%;
        /* Ocupan un poco menos de la mitad de la pantalla cada una */
        /* Altura reducida para mantener la proporción de la miniatura */
    }

    /* --- 3. LOGOS: Corrección de scroll horizontal --- */
    /* Tu css base tiene 920px fijos, esto permite que se adapte al celular */
    .logo-track-container {
        max-width: 100%;
    }




    /* --- 5. VIDEO Y NOTAS --- */
    .video-container {
        flex-direction: column;
        /* Apila el video arriba y la nota abajo */
    }

    .video-box,
    .video-text-box {
        width: 100%;
        flex: none;
        /* Anula el flex: 6 y flex: 4 de escritorio */
    }

    .video-box iframe {
        height: auto;
        aspect-ratio: 16 / 9;
        /* Mantiene la proporción perfecta del video en celulares */
    }

    /* --- AJUSTES EXTRA PREVENTIVOS PARA SCROLL HORIZONTAL --- */

    /* Misión y Visión: Apilar las tarjetas */
    .cards-grid {
        align-items: center;
    }

    .card {
        width: 100%;
        max-width: 350px;
    }

    /* Testimonios / Logos: Quitar ancho fijo */
    .logo-track-container {
        width: 100%;
        /* Elimina el width de 920px que rompía la pantalla en mobile */
    }

    .slider-arrow {
        font-size: 2rem;
        /* Achicar un poco las flechas en mobile */
    }
}