body {
            font-family: 'Inter', sans-serif;
        }

        h1, h2, h3, .font-serif {
            font-family: 'Playfair Display', serif;
        }

        .bg-black-mlegal { background-color: #000; }
        .text-gold-mlegal { color: #C5A059; }
        .border-gold-mlegal { border-color: #C5A059; }

        .mlegal-masthead {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            padding-top: 45px;
            padding-bottom: 45px;
        }

        .mlegal-masthead a {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
        }

        .mlegal-masthead img {
            display: block;
            width: 100%;
            max-width: 1050px;
            height: auto;
            object-fit: contain;
            margin: 0 auto;
        }

        @media (max-width: 768px) {
            .mlegal-masthead {
                padding-top: 30px;
                padding-bottom: 30px;
            }

            .mlegal-masthead img {
                max-width: 100%;
            }
        }

        #mobile-menu:not(.hidden) {
            display: flex;
        }

        /* ========================================
        LOADER INSTITUCIONAL MLEGAL
        ======================================== */

        #mlegal-loader {
            position: fixed;
            inset: 0;
            z-index: 99999;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 1;
            visibility: visible;
            transition: opacity .55s ease, visibility .55s ease;
        }

        #mlegal-loader.loader-hidden {
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
        }

        .mlegal-loader-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 26px;
        }

        .mlegal-loader-logo {
            width: 125px;
            height: auto;
            animation: mlegal-logo-appear 1.2s ease-in-out both;
        }

        .mlegal-loader-progress {
            width: 145px;
            height: 2px;
            background: #e5e5e5;
            overflow: hidden;
            border-radius: 10px;
        }

        .mlegal-loader-progress::after {
            content: "";
            display: block;
            width: 40%;
            height: 100%;
            background: #111111;
            animation: mlegal-loading 1.4s ease-in-out infinite;
        }

        @keyframes mlegal-logo-appear {
            from {
                opacity: 0;
                transform: scale(.94);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes mlegal-loading {
            from { transform: translateX(-110%); }
            to { transform: translateX(370%); }
        }

        @media (prefers-reduced-motion: reduce) {
            .mlegal-loader-logo,
            .mlegal-loader-progress::after {
                animation: none;
            }
        }

/* ========================================
   MLEGAL - EFECTOS DEL ENCABEZADO
======================================== */

/* Aparición suave del encabezado */
@keyframes mlegal-header-appear {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación del encabezado institucional */
.mlegal-masthead {
    animation: mlegal-header-appear 0.8s ease-out both;
}

/* Transición elegante del banner */
.mlegal-masthead img {
    transition: transform 0.45s ease,
                opacity 0.45s ease;
}

.mlegal-masthead img:hover {
    transform: scale(1.015);
    opacity: 0.92;
}

/* Línea animada en los enlaces de navegación */
.mlegal-nav a {
    position: relative;
    transition: color 0.25s ease;
}

.mlegal-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.mlegal-nav a:hover::after,
.mlegal-nav a:focus-visible::after {
    transform: scaleX(1);
}

/* Accesibilidad: reducir animaciones */
@media (prefers-reduced-motion: reduce) {

    .mlegal-masthead {
        animation: none;
    }

    .mlegal-masthead img,
    .mlegal-nav a,
    .mlegal-nav a::after {
        transition: none;
    }
}

/* ========================================
   MLEGAL - NUESTRO FUNDADOR
======================================== */

.mlegal-fundador {
    background: #fff;
    padding: 90px 24px;
    border-top: 1px solid #e5e7eb;
}

.mlegal-fundador-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 80px;
}

.mlegal-fundador-imagen {
    overflow: hidden;
    background: #f3f3f3;
}

.mlegal-fundador-imagen img {
    display: block;
    width: 100%;
    height: 560px;
    object-fit: cover;
    object-position: center 30%;
    transition: transform .7s ease;
}

.mlegal-fundador-imagen:hover img {
    transform: scale(1.025);
}

.mlegal-fundador-cargo {
    font-size: 12px !important;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 30px !important;
}

.mlegal-fundador-etiqueta {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #777;
}

.mlegal-fundador-contenido h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.1;
    color: #111;
    margin: 22px 0;
}

.mlegal-fundador-contenido h1 em {
    font-weight: 400;
    color: #777;
}

.mlegal-fundador-linea {
    width: 65px;
    height: 2px;
    background: #111;
    margin: 30px 0;
}

.mlegal-fundador-contenido h2 {
    font-size: 22px;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 25px;
}

.mlegal-fundador-contenido p {
    color: #666;
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 18px;
}

/* VERSIÓN MÓVIL */
@media (max-width: 767px) {
    .mlegal-fundador {
        padding: 45px 20px;
    }

    .mlegal-fundador-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .mlegal-fundador-imagen img {
        height: 380px;
    }

    .mlegal-fundador-contenido h1 {
        font-size: 42px;
    }

    .mlegal-fundador-contenido h2 {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mlegal-fundador-imagen img {
        transition: none;
    }
}


/* Encabezado del fundador */
.mlegal-fundador-encabezado {
    display: flex;
    flex-direction: column;
}

/* Escritorio: conservar el orden original */
@media (min-width: 768px) {
    .mlegal-fundador-encabezado .mlegal-fundador-etiqueta {
        order: 1;
    }

    .mlegal-fundador-encabezado h1 {
        order: 2;
    }
}

/* Móvil: título, etiqueta y fotografía */
@media (max-width: 767px) {
    .mlegal-fundador-container {
        display: flex;
        flex-direction: column;
    }

    .mlegal-fundador-contenido {
        display: contents;
    }

    .mlegal-fundador-encabezado {
        order: 1;
        text-align: center;
        align-items: center;
        gap: 12px;
    }

    .mlegal-fundador-encabezado h1 {
        order: 1;
        margin: 0;
        font-size: clamp(34px, 9vw, 42px);
    }

    .mlegal-fundador-encabezado .mlegal-fundador-etiqueta {
        order: 2;
        font-size: 10px;
        letter-spacing: .12em;
    }

    .mlegal-fundador-imagen {
        order: 2;
        width: 100%;
    }

    .mlegal-fundador-linea {
        order: 3;
        margin: 0;
    }

    .mlegal-fundador-contenido h2 {
        order: 4;
        margin-bottom: 0;
    }

    .mlegal-fundador-cargo {
        order: 5;
        margin-bottom: 0 !important;
    }

    .mlegal-fundador-contenido p:not(.mlegal-fundador-cargo) {
        order: 6;
    }
}

/* FILOSOFÍA DEL FUNDADOR */

.mlegal-fundador-cita {
    margin-top: 30px;
    padding: 20px 0 20px 24px;
    border-left: 2px solid #111;
}

.mlegal-fundador-cita p {
    font-family: 'Playfair Display', serif;
    font-size: clamp(17px, 2vw, 22px);
    font-style: italic;
    line-height: 1.6;
    color: #222;
    margin: 0;
}

@media (max-width: 767px) {
    .mlegal-fundador-cita {
        margin-top: 12px;
        padding-left: 18px;
    }
}

/* ========================================
   MLEGAL - TEXTO JUSTIFICADO
======================================== */

.mlegal-fundador-contenido > p:not(.mlegal-fundador-cargo) {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

/* ========================================
   MLEGAL - ENLACE IDENTIDAD
======================================== */

.mlegal-identidad-enlace {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: #111;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #999;
    text-underline-offset: 4px;
    cursor: pointer;
    transition: text-decoration-color .25s ease;
}

.mlegal-identidad-enlace:hover,
.mlegal-identidad-enlace:focus-visible {
    text-decoration-color: #111;
}

/* ========================================
   MLEGAL - VENTANA EMERGENTE
======================================== */

.mlegal-identidad-modal {
    position: fixed;
    inset: 0;
    width: calc(100% - 32px);
    max-width: 650px;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #111;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0,0,0,.18);
}

.mlegal-identidad-modal:not([open]) {
    display: none;
}

.mlegal-identidad-modal::backdrop {
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(4px);
}

.mlegal-identidad-interior {
    position: relative;
    padding: 45px;
}

.mlegal-identidad-cerrar {
    position: absolute;
    top: 15px;
    right: 20px;
    border: 0;
    background: transparent;
    color: #111;
    font-size: 32px;
    cursor: pointer;
}

.mlegal-identidad-interior h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 5vw, 48px);
    margin: 18px 0 25px;
}

.mlegal-identidad-logo {
    display: block;
    width: 110px;
    height: auto;
    margin: 0 auto 30px;
}

.mlegal-identidad-interior p {
    color: #555;
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 18px;
    text-align: justify;
    hyphens: auto;
}

@media (max-width: 767px) {
    .mlegal-identidad-interior {
        padding: 45px 24px 25px;
    }
}

/* ========================================
   MLEGAL - ANIMACIÓN MODAL IDENTIDAD
======================================== */

.mlegal-identidad-modal {
    opacity: 0;
    transform: translateY(24px) scale(.97);

    transition:
        opacity .4s ease,
        transform .4s cubic-bezier(.22, 1, .36, 1);
}

/* Estado visible */
.mlegal-identidad-modal[open].modal-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animación del fondo */
.mlegal-identidad-modal::backdrop {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);

    transition:
        background .8s ease,
        backdrop-filter .8s ease;
}

.mlegal-identidad-modal.modal-visible::backdrop {
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(4px);
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .mlegal-identidad-modal,
    .mlegal-identidad-modal::backdrop {
        transition: none;
    }
}

/* ========================================
   MLEGAL - FUNDADOR EN MÓVIL
======================================== */

@media (max-width: 767px) {

    /* Nombre del fundador */
    .mlegal-fundador-contenido h2 {
        order: 4;
        text-align: center;
        margin: 8px 0 0;
        font-size: 22px;
        line-height: 1.35;
        width: 100%;
    }

    /* Cargo debajo del nombre */
    .mlegal-fundador-cargo {
        order: 5;
        text-align: center;
        margin: -20px 0 12px !important;
        font-size: 11px !important;
        line-height: 1.7;
        letter-spacing: .06em;
        width: 100%;
    }

}

/* ========================================
   MLEGAL - ÁREAS DE ESPECIALIDAD
======================================== */

.mlegal-especialidades {
    background: #fff;
    padding: 90px 24px;
    border-top: 1px solid #e5e7eb;
}

.mlegal-especialidades-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* ENCABEZADO */

.mlegal-especialidades-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 55px;
}

.mlegal-especialidades-etiqueta {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .2em;
    color: #777;
    margin-bottom: 18px;
}

.mlegal-especialidades-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.15;
    color: #111;
    margin-bottom: 18px;
}

.mlegal-especialidades-header h2 em {
    font-weight: 400;
    color: #777;
}

.mlegal-especialidades-header p {
    font-size: 15px;
    line-height: 1.8;
    color: #666;
}

/* DISTRIBUCIÓN DE TARJETAS */

.mlegal-especialidades-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

/* TARJETAS */

.mlegal-especialidad-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 45px 35px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
    transition:
        border-color .3s ease,
        box-shadow .3s ease,
        transform .3s ease;
}

.mlegal-especialidad-card:hover {
    border-color: #aaa;
    box-shadow: 0 15px 40px rgba(0,0,0,.06);
    transform: translateY(-4px);
}

/* LOGOTIPO GIRATORIO */

.mlegal-especialidad-logo {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.mlegal-especialidad-logo > div {
    height: 100%;
}

.mlegal-especialidad-logo img {
    display: block;
    height: 100%;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(1) brightness(0);
}

/* TEXTOS */

.mlegal-especialidad-card h3 {
    font-size: 19px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
    margin-bottom: 16px;
}

.mlegal-especialidad-card p {
    font-size: 14px;
    line-height: 1.85;
    color: #666;
    max-width: 450px;
}

/* RESPONSIVE */

@media (max-width: 767px) {

    .mlegal-especialidades {
        padding: 60px 20px;
    }

    .mlegal-especialidades-header {
        margin-bottom: 35px;
    }

    .mlegal-especialidades-header h2 {
        font-size: 38px;
    }

    .mlegal-especialidades-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .mlegal-especialidad-card {
        padding: 35px 25px;
    }

    .mlegal-especialidad-logo {
        height: 80px;
        margin-bottom: 20px;
    }

    .mlegal-especialidad-card h3 {
        font-size: 18px;
    }

}

/* ========================================
   MLEGAL - ENTRADA ALTERNADA DE TARJETAS
   SOLO MÓVIL
======================================== */

@media (max-width: 767px) {

    .mlegal-especialidades-grid {
        overflow: hidden;
    }

    .mlegal-especialidad-card {
        opacity: 1;
        translate: 0;
    }

    /* Estado inicial de las tarjetas */
    .mlegal-especialidades.animaciones-activas
    .mlegal-especialidad-card:not(.tarjeta-visible) {
        opacity: 0;
    }

    /* Tarjetas impares: desde la derecha */
    .mlegal-especialidades.animaciones-activas
    .mlegal-especialidad-card:nth-child(odd):not(.tarjeta-visible) {
        translate: 65px 0;
    }

    /* Tarjetas pares: desde la izquierda */
    .mlegal-especialidades.animaciones-activas
    .mlegal-especialidad-card:nth-child(even):not(.tarjeta-visible) {
        translate: -65px 0;
    }

    .mlegal-especialidades.animaciones-activas
    .mlegal-especialidad-card {
        transition:
            opacity .7s ease,
            translate .7s cubic-bezier(.22, 1, .36, 1),
            border-color .3s ease,
            box-shadow .3s ease,
            transform .3s ease;
    }

}

/* Respetar preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {

    .mlegal-especialidades .mlegal-especialidad-card {
        opacity: 1 !important;
        translate: 0 !important;
        transition: none !important;
    }

}

/* ========================================
   MLEGAL - NUESTRAS OFICINAS
======================================== */

.mlegal-oficinas {
    padding: 85px 0 65px;
    background: #080808;
    color: #fff;
    overflow: hidden;
}

/* ENCABEZADO */

.mlegal-oficinas-encabezado {
    text-align: center;
    padding: 0 24px;
    margin: 0 auto 55px;
    max-width: 850px;
}

.mlegal-oficinas-etiqueta {
    display: block;
    font-size: 11px;
    letter-spacing: .22em;
    color: #aaa;
    margin-bottom: 20px;
}

.mlegal-oficinas-encabezado h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.15;
    margin-bottom: 20px;
    color: #fff;
}

.mlegal-oficinas-encabezado h2 em {
    color: #aaa;
    font-weight: 400;
}

.mlegal-oficinas-encabezado p {
    font-size: 15px;
    line-height: 1.8;
    color: #bbb;
}

/* CARRUSEL */

.mlegal-oficinas-carrusel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 35px 24px;
    min-height: 570px;
}

/* TARJETAS */

.mlegal-oficina {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 440px;
    border: 1px solid rgba(255,255,255,.5);
    overflow: hidden;
    cursor: pointer;

    transition:
        flex .65s cubic-bezier(.22,1,.36,1),
        height .65s cubic-bezier(.22,1,.36,1),
        opacity .4s ease,
        border-color .4s ease;
}

/* FOTOGRAFÍAS */

.mlegal-oficina-fondo {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: transform .8s ease;
}

.mlegal-oficina:hover .mlegal-oficina-fondo {
    transform: scale(1.04);
}

/* OSCURECIMIENTO DE TARJETAS LATERALES */

.mlegal-oficina::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0,0,0,.68);
    transition: background .5s ease;
}

.mlegal-oficina.activa::before {
    background: rgba(0,0,0,.08);
}

/* TARJETA SELECCIONADA */

.mlegal-oficina.activa {
    flex: 1.35 1 0;
    height: 520px;
    border-color: #fff;
    cursor: default;
}

/* CONTENIDO */

.mlegal-oficina-contenido {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    text-align: center;
}

.mlegal-oficina-contenido h3 {
    width: 100%;
    padding: 24px 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .18em;
    color: #fff;
    transition:
        background .4s ease,
        color .4s ease;
}

.mlegal-oficina.activa h3 {
    background: #fff;
    color: #111;
}

/* DETALLE DE LA OFICINA */

.mlegal-oficina-detalle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-top: auto;
    padding: 28px 22px;
    background: #fff;
    color: #111;

    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);

    transition:
        opacity .4s ease,
        transform .4s ease,
        visibility .4s ease;
}

.mlegal-oficina.activa .mlegal-oficina-detalle {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mlegal-oficina-detalle span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .15em;
}

.mlegal-oficina-detalle p {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    line-height: 1.6;
    color: #444;
}

/* BOTÓN */

.mlegal-oficina-boton {
    display: inline-block;
    padding: 13px 24px;
    margin-top: 8px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .16em;
    cursor: pointer;
    transition:
        background .3s ease,
        color .3s ease;
}

.mlegal-oficina-boton:hover {
    background: #fff;
    color: #111;
}

/* NAVEGACIÓN */

.mlegal-oficinas-navegacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.mlegal-oficinas-navegacion button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    padding: 8px;
    transition: opacity .3s ease;
}

.mlegal-oficinas-navegacion button:hover {
    opacity: .5;
}

.mlegal-oficinas-navegacion span {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2em;
    color: #ddd;
}

/* ========================================
   VERSIÓN MÓVIL
======================================== */

@media (max-width: 767px) {

    .mlegal-oficinas {
        padding: 65px 0 45px;
    }

    .mlegal-oficinas-encabezado {
        margin-bottom: 25px;
    }

    .mlegal-oficinas-encabezado h2 {
        font-size: 38px;
    }

    .mlegal-oficinas-carrusel {
        display: block;
        min-height: 0;
        padding: 15px 20px;
    }

    .mlegal-oficina {
        display: none;
        width: 100%;
        height: 500px;
    }

    .mlegal-oficina.activa {
        display: block;
        width: 100%;
        height: 500px;
    }

    .mlegal-oficina-contenido h3 {
        font-size: 12px;
    }

    .mlegal-oficina-detalle {
        padding: 25px 18px;
    }

    .mlegal-oficinas-navegacion {
        margin-top: 15px;
    }
}

/* ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {

    .mlegal-oficina,
    .mlegal-oficina-fondo,
    .mlegal-oficina::before,
    .mlegal-oficina-detalle {
        transition: none;
    }
}

/* ========================================
   MLEGAL - OFICINA CENTRAL DESTACADA
======================================== */

@media (min-width: 768px) {

    .mlegal-oficinas-carrusel {
        align-items: center;
    }

    .mlegal-oficina {
        flex: 1 1 0;
    }

    .mlegal-oficina.activa {
        flex: 1.35 1 0;
        height: 520px;
        z-index: 3;
    }

}

/* ========================================
   MLEGAL - OFICINAS / FONDO DINÁMICO
======================================== */
.mlegal-oficinas {
    position: relative;
    isolation: isolate;
    background: #080808;
}
.mlegal-oficinas-fondo {
    position: absolute;
    inset: 0;
    z-index: -2;

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;

    opacity: 0;
    pointer-events: none;

    transform: scale(1.04);

    transition:
        opacity 1.2s ease-in-out,
        transform 5s ease-out;
}

.mlegal-oficinas-fondo[style*="opacity: 1"] {
    transform: scale(1);
}

.mlegal-oficinas-fondo-a {
    background-image: url('../img/oficina-cdmx.jpg');
    opacity: 1;
}
.mlegal-oficinas::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, .76);
    pointer-events: none;
}
.mlegal-oficinas-encabezado,
.mlegal-oficinas-carrusel,
.mlegal-oficinas-navegacion {
    position: relative;
    z-index: 2;
}
.mlegal-oficina:not(.activa) {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .7);
}
.mlegal-oficina:not(.activa) .mlegal-oficina-fondo {
    opacity: 0;
}
.mlegal-oficina:not(.activa)::before {
    background: transparent;
}
.mlegal-oficina:not(.activa) .mlegal-oficina-contenido {
    justify-content: center;
}
.mlegal-oficina:not(.activa) h3 {
    padding: 25px 12px;
    background: transparent;
    color: #fff;
    font-family: 'Playfair Display', serif;
    font-size: clamp(17px, 2vw, 26px);
    font-weight: 400;
    letter-spacing: .08em;
}
.mlegal-oficina.activa {
    background: #fff;
    border-color: #fff;
}
.mlegal-oficina.activa .mlegal-oficina-fondo {
    opacity: 1;
}
@media (max-width: 767px) {
    .mlegal-oficinas::before {
        background: rgba(0, 0, 0, .82);
    }
}
@media (prefers-reduced-motion: reduce) {
    .mlegal-oficinas-fondo {
        transition: none;
    }
}

/* ========================================
   MLEGAL - ANIMACIÓN TARJETA CENTRAL
======================================== */

/* Movimiento elegante de las tarjetas */
.mlegal-oficina {
    transition:
        flex .8s cubic-bezier(.22, 1, .36, 1),
        height .8s cubic-bezier(.22, 1, .36, 1),
        border-color .5s ease;
}

/* Fotografía de la oficina */
.mlegal-oficina .mlegal-oficina-fondo {
    transform: scale(1.08);

    transition:
        transform 1.4s cubic-bezier(.22, 1, .36, 1),
        opacity .6s ease;
}

/* Acercamiento inverso al seleccionar */
.mlegal-oficina.activa .mlegal-oficina-fondo {
    transform: scale(1);
}

/* Panel blanco de información */
.mlegal-oficina-detalle {
    opacity: 0;
    visibility: hidden;
    transform: translateY(35px);

    transition:
        opacity .7s ease,
        transform .9s cubic-bezier(.22, 1, .36, 1),
        visibility .7s ease;
}

/* Entrada suave del panel */
.mlegal-oficina.activa .mlegal-oficina-detalle {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);

    transition-delay: .15s;
}

/* Animación del título de la oficina */
.mlegal-oficina-contenido h3 {
    transition:
        background .5s ease,
        color .5s ease,
        padding .5s ease;
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .mlegal-oficina,
    .mlegal-oficina-fondo,
    .mlegal-oficina-detalle,
    .mlegal-oficina-contenido h3 {
        transition: none;
    }
}

/* ========================================
   MLEGAL - OFICINAS RESPONSIVE IPHONE
======================================== */

@media (max-width: 767px) {

    /* Espaciado general */
    .mlegal-oficinas {
        padding: 60px 0 45px;
    }

    /* Encabezado */
    .mlegal-oficinas-encabezado {
        padding: 0 22px;
        margin-bottom: 25px;
    }

    .mlegal-oficinas-encabezado h2 {
        font-size: clamp(34px, 9vw, 44px);
        line-height: 1.15;
        margin-bottom: 14px;
    }

    .mlegal-oficinas-encabezado p {
        font-size: 13px;
        line-height: 1.7;
    }

    /* Carrusel */
    .mlegal-oficinas-carrusel {
        display: block;
        padding: 12px 18px;
        min-height: 0;
    }

    /* Ocultar oficinas no seleccionadas */
    .mlegal-oficina:not(.activa) {
        display: none;
    }

    /* Tarjeta principal */
    .mlegal-oficina.activa {
        display: block;
        width: 100%;
        height: clamp(420px, 62svh, 560px);
        min-height: 420px;
        max-width: 480px;
        margin: 0 auto;
        flex: none;
    }

    /* Fotografía */
    .mlegal-oficina.activa .mlegal-oficina-fondo {
        background-position: center;
    }

    /* Título */
    .mlegal-oficina.activa h3 {
        font-size: 12px;
        letter-spacing: .15em;
        padding: 20px 12px;
    }

    /* Panel informativo */
    .mlegal-oficina-detalle {
        padding: 24px 18px;
        gap: 12px;
    }

    .mlegal-oficina-detalle p {
        font-size: 16px;
        line-height: 1.5;
        margin: 0;
    }

    /* Botón cómodo para tocar */
    .mlegal-oficina-boton {
        min-height: 44px;
        padding: 13px 22px;
        touch-action: manipulation;
    }

    /* Navegación */
    .mlegal-oficinas-navegacion {
        gap: 35px;
        margin-top: 18px;
    }

    .mlegal-oficinas-navegacion button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        border: 1px solid rgba(255,255,255,.55);
        border-radius: 50%;
        font-size: 22px;
        touch-action: manipulation;
    }

    .mlegal-oficinas-navegacion span {
        min-width: 65px;
        text-align: center;
        font-size: 11px;
    }

    /* Evitar desplazamientos horizontales */
    .mlegal-oficinas {
        overflow-x: clip;
    }
}

/* Ajustes para iPhone pequeño */
@media (max-width: 390px) {

    .mlegal-oficinas-carrusel {
        padding-left: 14px;
        padding-right: 14px;
    }

    .mlegal-oficina.activa {
        min-height: 400px;
    }

    .mlegal-oficina-detalle {
        padding: 18px 14px;
    }

    .mlegal-oficinas-navegacion {
        gap: 22px;
    }
}

/* ========================================
   MLEGAL - AJUSTES TÁCTILES
======================================== */

@media (max-width: 767px) {

    .mlegal-oficinas-carrusel {
        touch-action: pan-y;
        -webkit-user-select: none;
        user-select: none;
    }

    .mlegal-oficina {
        -webkit-tap-highlight-color: transparent;
    }

    .mlegal-oficinas-navegacion button {
        -webkit-tap-highlight-color: transparent;
    }
}

/* ========================================
   MLEGAL - MODAL UBICACIÓN DE OFICINAS
======================================== */

.mlegal-modal-ubicacion {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: auto;
}

.mlegal-modal-ubicacion[hidden] {
    display: none !important;
}

/* Contenedor principal */
.mlegal-modal-ubicacion-panel {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    background: #111;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

/* Botón cerrar */
.mlegal-modal-ubicacion-cerrar {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .4);
    background: #111;
    color: #fff;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

/* Encabezado */
.mlegal-modal-ubicacion-encabezado {
    padding: 40px 40px 28px;
}

.mlegal-modal-ubicacion-encabezado span {
    display: block;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: .2em;
    color: #aaa;
}

.mlegal-modal-ubicacion-encabezado h2 {
    margin: 0;
    padding-right: 40px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 400;
    line-height: 1.2;
}

/* Mapa */
.mlegal-modal-ubicacion-mapa {
    width: 100%;
    height: 300px;
    background: #222;
}

.mlegal-modal-ubicacion-mapa iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Información */
.mlegal-modal-ubicacion-informacion {
    padding: 30px 40px 40px;
}

.mlegal-modal-ubicacion-dato {
    margin-bottom: 25px;
}

.mlegal-modal-ubicacion-dato h3 {
    margin: 0 0 10px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.mlegal-modal-ubicacion-dato p {
    margin: 0 0 5px;
    color: #ccc;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.7;
}

/* Cómo llegar */
.mlegal-modal-ubicacion-enlace {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 14px 28px;
    background: #fff;
    border: 1px solid #fff;
    color: #111;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .12em;
    text-decoration: none;
    transition: background .3s ease, color .3s ease;
}

.mlegal-modal-ubicacion-enlace:hover {
    background: transparent;
    color: #fff;
}

/* ========================================
   MLEGAL - MODAL RESPONSIVE IPHONE
======================================== */

@media (max-width: 767px) {

    .mlegal-modal-ubicacion {
        padding: 12px;
    }

    .mlegal-modal-ubicacion-panel {
        max-height: calc(100dvh - 24px);
    }

    .mlegal-modal-ubicacion-encabezado {
        padding: 35px 22px 22px;
    }

    .mlegal-modal-ubicacion-encabezado h2 {
        font-size: 30px;
    }

    .mlegal-modal-ubicacion-mapa {
        height: 240px;
    }

    .mlegal-modal-ubicacion-informacion {
        padding: 25px 22px 30px;
    }

    .mlegal-modal-ubicacion-cerrar {
        top: 12px;
        right: 12px;
    }

    .mlegal-modal-ubicacion-enlace {
        width: 100%;
    }
}

/* ========================================
   MLEGAL - MODAL DE CONTACTO
======================================== */

.mlegal-modal-contacto {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow-y: auto;
}

.mlegal-modal-contacto[hidden] {
    display: none !important;
}

/* Panel principal */
.mlegal-modal-contacto-panel {
    display: grid;
    grid-template-columns: 43% 57%;
    width: 100%;
    max-width: 980px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .5);
}

/* ========================================
   COLUMNA INSTITUCIONAL
======================================== */

.mlegal-modal-contacto-institucional {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 50px;
    padding: 48px 38px;
    background: #101010;
    color: #fff;
}

.mlegal-modal-contacto-marca {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mlegal-modal-contacto-marca span:first-child {
    font-family: 'Playfair Display', serif;
    font-size: 29px;
    letter-spacing: .08em;
}

.mlegal-modal-contacto-marca span:last-child {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    letter-spacing: .15em;
    color: #aaa;
}

.mlegal-modal-contacto-etiqueta {
    display: block;
    margin-bottom: 22px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: .2em;
    color: #aaa;
}

.mlegal-modal-contacto-mensaje h2 {
    margin: 0 0 24px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(34px, 3.5vw, 48px);
    font-weight: 400;
    line-height: 1.16;
}

.mlegal-modal-contacto-mensaje p {
    max-width: 320px;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.9;
    color: #bbb;
}

.mlegal-modal-contacto-pie {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.2);
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    letter-spacing: .15em;
    color: #999;
}

/* ========================================
   COLUMNA DEL FORMULARIO
======================================== */

.mlegal-modal-contacto-formulario {
    position: relative;
    padding: 55px 55px 48px;
    background: #fff;
    color: #111;
}

.mlegal-modal-contacto-cerrar {
    position: absolute;
    top: 18px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: transparent;
    color: #111;
    font-size: 27px;
    cursor: pointer;
    transition: background .25s, color .25s;
}

.mlegal-modal-contacto-cerrar:hover {
    background: #111;
    color: #fff;
}

.mlegal-modal-contacto-formulario-encabezado {
    margin-bottom: 30px;
}

.mlegal-modal-contacto-formulario-encabezado > span {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    letter-spacing: .2em;
    color: #777;
}

.mlegal-modal-contacto-formulario-encabezado h3 {
    margin: 14px 0 12px;
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-weight: 400;
}

.mlegal-modal-contacto-formulario-encabezado p {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.8;
    color: #777;
}

/* Campos minimalistas */
.mlegal-contacto-campo {
    margin-bottom: 24px;
}

.mlegal-contacto-campo label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    color: #555;
}

.mlegal-contacto-campo input,
.mlegal-contacto-campo textarea {
    display: block;
    width: 100%;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #bbb;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: #111;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color .25s;
}

.mlegal-contacto-campo textarea {
    resize: vertical;
    min-height: 85px;
}

.mlegal-contacto-campo input:focus,
.mlegal-contacto-campo textarea:focus {
    border-bottom-color: #111;
    border-bottom-width: 2px;
}

/* Aviso de privacidad */
.mlegal-contacto-privacidad {
    margin: 8px 0 24px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    line-height: 1.7;
    color: #777;
}

.mlegal-contacto-privacidad a {
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Botón enviar */
.mlegal-contacto-enviar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    min-height: 52px;
    padding: 16px 22px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    cursor: pointer;
    transition: background .3s, color .3s;
}

.mlegal-contacto-enviar:hover {
    background: #fff;
    color: #111;
}

.mlegal-contacto-enviar span {
    font-size: 20px;
}

/* Mensajes del formulario */
#mlegal-contacto-resultado {
    margin-top: 14px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.6;
}

/* ========================================
   MODAL CONTACTO - IPHONE
======================================== */

@media (max-width: 767px) {

    .mlegal-modal-contacto {
        padding: 12px;
        align-items: center;
    }

    .mlegal-modal-contacto-panel {
        display: block;
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mlegal-modal-contacto-institucional {
        gap: 18px;
        padding: 28px 24px;
    }

    .mlegal-modal-contacto-marca span:first-child {
        font-size: 23px;
    }

    .mlegal-modal-contacto-marca span:last-child {
        font-size: 8px;
    }

    .mlegal-modal-contacto-etiqueta {
        margin-bottom: 10px;
    }

    .mlegal-modal-contacto-mensaje h2 {
        margin-bottom: 12px;
        font-size: 30px;
    }

    .mlegal-modal-contacto-mensaje p {
        font-size: 12px;
        line-height: 1.7;
    }

    .mlegal-modal-contacto-pie {
        display: none;
    }

    .mlegal-modal-contacto-formulario {
        padding: 55px 24px 30px;
    }

    .mlegal-modal-contacto-cerrar {
        top: 12px;
        right: 12px;
    }

    .mlegal-modal-contacto-formulario-encabezado h3 {
        font-size: 26px;
    }

    .mlegal-contacto-campo {
        margin-bottom: 18px;
    }

    .mlegal-contacto-campo input,
    .mlegal-contacto-campo textarea {
        font-size: 16px;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .mlegal-modal-contacto *,
    .mlegal-modal-contacto *::before,
    .mlegal-modal-contacto *::after {
        transition: none !important;
    }
}

/* ========================================
   MLEGAL - CORRECCIÓN BOTÓN FLOTANTE IPHONE
======================================== */

.mlegal-contacto-flotante {
    display: none;
}

@media screen and (max-width: 767px) {

    #mlegal-contacto-flotante {
        position: fixed;
        right: 18px;
        bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        z-index: 9998;

        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 10px;

        width: auto;
        min-width: 135px;
        min-height: 48px;
        padding: 12px 20px;

        background-color: #ffffff;
        color: #111111;
        border: 1px solid #dddddd;
        border-radius: 50px;

        font-family: 'Inter', sans-serif;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .12em;

        box-shadow: 0 8px 30px rgba(0,0,0,.25);

        cursor: pointer;
        opacity: 1;
        visibility: visible;
    }

    #mlegal-contacto-flotante i,
    #mlegal-contacto-flotante span {
        color: #111111;
    }
}

/* MLEGAL - REFLEJO METÁLICO */

.mlegal-logo-shine {
    position: relative;
    display: inline-block;
    overflow: hidden;
    line-height: 0;
}

.mlegal-logo-base {
    display: block;
    width: 100%;
    height: auto;
}

.mlegal-logo-reflection {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;

    /* Aislar los elementos oscuros del logotipo */
    mix-blend-mode: screen;
    filter: invert(1) grayscale(1);

    /* Reflejo delgado */
    -webkit-mask-image: linear-gradient(
        105deg,
        transparent 43%,
        rgba(0,0,0,.15) 47%,
        rgba(0,0,0,.85) 50%,
        rgba(0,0,0,.15) 53%,
        transparent 57%
    );

    mask-image: linear-gradient(
        105deg,
        transparent 43%,
        rgba(0,0,0,.15) 47%,
        rgba(0,0,0,.85) 50%,
        rgba(0,0,0,.15) 53%,
        transparent 57%
    );

    -webkit-mask-size: 300% 100%;
    mask-size: 300% 100%;

    animation: mlegal-metal-shine 9s ease-in-out infinite;
}

@keyframes mlegal-metal-shine {
    0% {
        -webkit-mask-position: 100% 0;
        mask-position: 100% 0;
    }

    94.5%, 100% {
        -webkit-mask-position: 0% 0;
        mask-position: 0% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mlegal-logo-reflection {
        display: none;
    }
}