/* =====================================================
   LAVALLE LEGAL — Premium v4
   Navy #0A192F · Gold #B38E5D · White #FFFFFF
   ===================================================== */

/* ── RESET ─────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #1a2536;
    background: #ffffff;
    line-height: 1.7;
    overflow-x: hidden;
    width: 100%;
}

/* ── SCROLL-REVEAL ──────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.12s;
}

.reveal-delay-2 {
    transition-delay: 0.24s;
}

.reveal-delay-3 {
    transition-delay: 0.36s;
}

/* ── HEADER ─────────────────────────────────────────── */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(10, 25, 47, 0.07);
    box-shadow: 0 2px 24px rgba(10, 25, 47, 0.05);
    transition: padding .35s ease, box-shadow .35s ease;
}

.header.scrolled {
    padding: 10px 40px;
    box-shadow: 0 4px 30px rgba(10, 25, 47, 0.09);
}

.logo-box {
    display: flex;
    align-items: center;
}

.logo-box img {
    width: 280px;
    height: auto;
    transition: width .35s ease;
}

.header.scrolled .logo-box img {
    width: 210px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: #0A192F;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    position: relative;
    padding-bottom: 4px;
    transition: color .3s;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #B38E5D, #d4b483);
    transition: width .35s cubic-bezier(0.22, 1, 0.36, 1),
        left .35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav a:hover {
    color: #B38E5D;
}

.nav a:hover::after {
    width: 100%;
    left: 0;
}

/* ── HAMBURGER BTN ─────────────────────────────────────────── */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: #0A192F;
    cursor: pointer;
    z-index: 2001; /* por encima del nav lateral */
}

/* ── HERO ───────────────────────────────────────────── */
.inicio-section {
    text-align: center;
    padding-top: 54px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

.eslogan {
    font-family: 'Cinzel', serif;
    font-size: 2.4rem;
    color: #0A192F;
    margin-bottom: 28px;
    letter-spacing: 3px;
    line-height: 1.3;
    padding: 0 20px;
}

.eslogan::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #B38E5D, #d4b483);
    margin: 18px auto 0;
    border-radius: 2px;
}

.foto-degrade-contenedor {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
}

.foto-degrade-contenedor img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    transition: transform 9s ease-out;
}

.foto-degrade-contenedor:hover img {
    transform: scale(1.04);
}

.foto-degrade-contenedor::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, .72) 55%,
            rgba(255, 255, 255, 1) 100%);
    pointer-events: none;
}

/* ── SECTION TITLES ─────────────────────────────────── */
.titulo-seccion {
    font-family: 'Cinzel', serif;
    text-align: center;
    font-size: 1.65rem;
    color: #0A192F;
    letter-spacing: 3px;
    position: relative;
    display: block;
    padding-bottom: 12px;
    margin-bottom: 50px;
}

.titulo-seccion::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 2.5px;
    background: linear-gradient(90deg, #B38E5D, #d4b483);
    border-radius: 2px;
    transition: width .45s cubic-bezier(0.22, 1, 0.36, 1);
}

.titulo-seccion:hover::after {
    width: 90px;
}

/* ── GENERIC SECTION ────────────────────────────────── */
.section {
    padding: 72px 24px;
    max-width: 950px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════════════════
   SERVICIOS CAROUSEL SECTION
   ════════════════════════════════════════════════════════ */
.carrusel-section {
    max-width: 100% !important;
    padding: 70px 0 90px;
    background: #f7f8fa;
    position: relative;
}

/* Thin gold top border */
.carrusel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #B38E5D, transparent);
}

.carrusel-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #B38E5D, transparent);
}

.carrusel-section>.titulo-seccion {
    margin-bottom: 55px;
}

/* ════════════════════════════════════════════════════════
   CUSTOM 3D CARD CAROUSEL
   ════════════════════════════════════════════════════════ */
.cards-3d-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* The 3D perspective lives here */
    perspective: 1400px;
    perspective-origin: center center;
    padding: 30px 0 50px;
}

.cards-3d-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 560px;
    /* 3D rendering context */
    transform-style: preserve-3d;
}

/* ── Individual Service Card ── */
.service-card {
    position: absolute;
    width: 360px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(10, 25, 47, 0.07);
    cursor: pointer;
    /* Smooth transitions on all 3D properties */
    transition:
        transform 0.72s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.72s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.72s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.72s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    user-select: none;
    /* Default: fully hidden */
    opacity: 0;
    pointer-events: none;
}

/* ── POSITION STATES ──
   JS applies these data-pos values: -2 -1 0 1 2
   0  = active center
   ±1 = immediate neighbours
   ±2 = far sides (hidden)
*/

.service-card[data-pos="0"] {
    transform: translateX(0) translateZ(0) rotateY(0deg);
    opacity: 1;
    pointer-events: auto;
    z-index: 10;
    box-shadow:
        0 24px 64px rgba(10, 25, 47, 0.13),
        0 6px 20px rgba(10, 25, 47, 0.07),
        0 0 0 1px rgba(179, 142, 93, 0.18);
    filter: none;
}

.service-card[data-pos="-1"] {
    transform: translateX(-310px) translateZ(-160px) rotateY(22deg);
    opacity: 0.82;
    pointer-events: auto;
    z-index: 5;
    box-shadow:
        0 12px 36px rgba(10, 25, 47, 0.10),
        0 3px 10px rgba(10, 25, 47, 0.05);
    filter: brightness(0.88) saturate(0.8);
}

.service-card[data-pos="1"] {
    transform: translateX(310px) translateZ(-160px) rotateY(-22deg);
    opacity: 0.82;
    pointer-events: auto;
    z-index: 5;
    box-shadow:
        0 12px 36px rgba(10, 25, 47, 0.10),
        0 3px 10px rgba(10, 25, 47, 0.05);
    filter: brightness(0.88) saturate(0.8);
}

.service-card[data-pos="-2"] {
    transform: translateX(-580px) translateZ(-380px) rotateY(36deg);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    filter: brightness(0.6) saturate(0.4);
}

.service-card[data-pos="2"] {
    transform: translateX(580px) translateZ(-380px) rotateY(-36deg);
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    filter: brightness(0.6) saturate(0.4);
}

/* All other positions: off-screen */
.service-card[data-pos="-3"],
.service-card[data-pos="3"],
.service-card[data-pos="-4"],
.service-card[data-pos="4"] {
    transform: translateX(0) translateZ(-600px);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── Gold top-accent on active card ── */
.service-card[data-pos="0"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #B38E5D, #e8c97a, #B38E5D, transparent);
    z-index: 2;
}

/* ── Card Image ── */
.card-img {
    width: 100%;
    height: 210px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card[data-pos="0"] .card-img img {
    transform: scale(1.03);
}

/* Soft gradient overlay on photo bottom */
.card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.08), transparent);
    pointer-events: none;
}

/* ── Card Content ── */
.card-content {
    padding: 28px 26px 32px;
}

.card-content h3 {
    font-family: 'Montserrat', sans-serif;
    color: #0A192F;
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-content h3::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, #B38E5D, #d4b483);
    flex-shrink: 0;
    border-radius: 1px;
}

.card-content p {
    font-size: 0.86rem;
    color: #4a5568;
    line-height: 1.72;
}

/* ── Carousel Controls ── */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 40px;
}

/* ── Side Carousel Controls ── */
.carousel-btn-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #0A192F;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(10, 25, 47, 0.08);
    z-index: 100;
}

.carousel-btn-side.prev {
    left: 12vw;
}

.carousel-btn-side.next {
    right: 12vw;
}

.carousel-btn-side svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .3s;
}

.carousel-btn-side:hover {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 8px 24px rgba(10, 25, 47, 0.12);
    transform: translateY(-50%) scale(1.08);
}

/* Dot indicators */
.carousel-dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 4px;
    background: rgba(10, 25, 47, 0.18);
    border: none;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 0;
}

.carousel-dot.active {
    background: #B38E5D;
    width: 28px;
    box-shadow: 0 0 8px rgba(179, 142, 93, 0.4);
}

/* ════════════════════════════════════════════════════════
   QUIENES SOMOS
   ════════════════════════════════════════════════════════ */
.seccion-gris {
    background: linear-gradient(135deg, #f8f9fb 0%, #eef1f5 100%);
    max-width: 100% !important;
    width: 100%;
    position: relative;
}

.seccion-gris::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(179, 142, 93, .3), transparent);
}

.texto-quienes-somos {
    max-width: 780px;
    margin: 0 auto;
}

.texto-quienes-somos p {
    margin-bottom: 20px;
    font-size: 0.97rem;
    text-align: center;
    color: #2d3748;
    line-height: 1.85;
}

.texto-quienes-somos p strong {
    color: #0A192F;
    font-weight: 700;
}

.resaltado-final {
    font-weight: 700;
    text-align: center !important;
    color: #0A192F;
    margin-top: 36px;
    font-size: 1.08rem;
    letter-spacing: .5px;
    position: relative;
    padding-top: 26px;
}

.resaltado-final::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 2px;
    background: linear-gradient(90deg, #B38E5D, #d4b483);
}

/* ════════════════════════════════════════════════════════
   AGENDA
   ════════════════════════════════════════════════════════ */
.subtitulo-agenda {
    text-align: center;
    margin-bottom: 36px;
    font-size: 0.96rem;
    color: #4a5568;
    line-height: 1.65;
}

.formulario-agenda {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #ffffff;
    padding: 42px 38px;
    border-radius: 18px;
    border: 1px solid rgba(10, 25, 47, .07);
    box-shadow:
        0 12px 44px rgba(10, 25, 47, .07),
        0 2px 8px rgba(10, 25, 47, .04);
}

.formulario-agenda label {
    font-weight: 600;
    font-size: 0.8rem;
    color: #0A192F;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.formulario-agenda select,
.formulario-agenda input {
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    color: #1a2536;
    background: #f8f9fb;
    outline: none;
    transition: all .3s ease;
}

.formulario-agenda select:focus,
.formulario-agenda input:focus {
    border-color: #B38E5D;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(179, 142, 93, .13);
}

.btn-whatsapp-form {
    background: linear-gradient(135deg, #0A192F 0%, #1a3a5c 100%);
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .9rem;
    letter-spacing: .5px;
    cursor: pointer;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
    transition: all .35s ease;
}

.btn-whatsapp-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(179, 142, 93, .22), transparent);
    transition: left .6s ease;
}

.btn-whatsapp-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(10, 25, 47, .22);
}

.btn-whatsapp-form:hover::before {
    left: 100%;
}

/* ════════════════════════════════════════════════════════
   CONTACTO
   ════════════════════════════════════════════════════════ */
.contacto-cierre {
    text-align: center;
    padding-bottom: 90px;
    position: relative;
}

.texto-instruccion-wa {
    margin-bottom: 22px;
    font-weight: 600;
    font-size: 0.96rem;
    color: #2d3748;
}

.wsp-flotante-global {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wsp-flotante-global svg {
    width: 38px;
    height: 38px;
}

.wsp-flotante-global:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.redes-lista {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.btn-instagram {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0A192F;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all .3s ease;
}

.btn-instagram:hover {
    color: #E1306C;
    transform: translateY(-3px);
    background: rgba(225, 48, 108, .04);
    border-color: rgba(225, 48, 108, .14);
}

/* Dirección Provincia */
.direccion-provincia {
    margin-top: 22px;
}
.direccion-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.direccion-link svg {
    flex-shrink: 0;
    color: #B38E5D;
    transition: transform 0.3s ease;
}
.direccion-link:hover {
    color: #0A192F;
    background: rgba(10, 25, 47, 0.04);
    border-color: rgba(10, 25, 47, 0.08);
}
.direccion-link:hover svg {
    transform: scale(1.15);
}


/* ════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════ */
.footer-bar {
    text-align: center;
    padding: 26px 20px;
    background: #0A192F;
    color: rgba(255, 255, 255, .45);
    font-size: 0.76rem;
    letter-spacing: 1.2px;
}

.footer-link {
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #B38E5D;
}

/* ════════════════════════════════════════════════════════
   LIGHTBOX MODAL
   ════════════════════════════════════════════════════════ */
.lightbox-modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    padding-top: 60px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(10,25,47,0.92); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lightbox-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s cubic-bezier(0.22,1,0.36,1);
}

@keyframes zoomIn {
    from {transform:scale(0.9); opacity:0;}
    to {transform:scale(1); opacity:1;}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #B38E5D;
    text-decoration: none;
    cursor: pointer;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */
@media (max-width: 950px) {
    .header {
        flex-direction: row;
        padding: 16px 24px;
        justify-content: space-between;
    }
    .header.scrolled {
        padding: 10px 24px;
    }
    .hamburger-btn {
        display: block;
    }
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.90);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        z-index: 2000;
        padding-top: 0;
    }
    .nav.open {
        right: 0;
    }
    .nav a {
        font-size: 1rem;
    }
    .logo-box img {
        margin-bottom: 0;
        width: 200px;
    }
    .header.scrolled .logo-box img {
        margin-bottom: 0;
        width: 160px;
    }
}

@media (max-width: 900px) {
    .service-card[data-pos="-1"] {
        transform: translateX(-240px) translateZ(-130px) rotateY(18deg);
    }

    .service-card[data-pos="1"] {
        transform: translateX(240px) translateZ(-130px) rotateY(-18deg);
    }

    .service-card[data-pos="-2"],
    .service-card[data-pos="2"] {
        opacity: 0;
    }
}

@media (max-width: 640px) {
    .service-card {
        width: 300px;
    }

    .card-img {
        height: 175px;
    }

    .card-content {
        padding: 22px 20px 26px;
    }

    .service-card[data-pos="-1"] {
        transform: translateX(-190px) translateZ(-140px) rotateY(18deg);
        opacity: 0.5;
    }

    .service-card[data-pos="1"] {
        transform: translateX(190px) translateZ(-140px) rotateY(-18deg);
        opacity: 0.5;
    }

    .eslogan {
        font-size: 1.65rem;
        letter-spacing: 1.5px;
    }

    .foto-degrade-contenedor {
        height: 340px;
    }

    .section {
        padding: 52px 18px;
    }

    .titulo-seccion {
        font-size: 1.35rem;
        letter-spacing: 2px;
    }

    .formulario-agenda { padding: 24px 20px; margin: 0; }
    
    .carousel-controls { margin-top: 20px; }
    .carousel-btn-side { display: none; }
    
    .nav          { gap: 10px; padding-top: 4px; }

    .nav a {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .logo-box img {
        width: 175px;
    }

    .header.scrolled .logo-box img {
        width: 130px;
    }
}