:root {
    --reg-azul: #003149;
    --reg-azul-2: #064c6d;
    --reg-rojo: #aa0d2e;
    --reg-azul-lt: #e6eff6;
    --reg-texto: #2d3748;
    --reg-suave: #667085;
    --reg-blanco: #ffffff;

    --reg-borde: rgba(0, 49, 73, 0.10);

    --reg-sombra:
        0 10px 30px rgba(0, 49, 73, 0.08);

    --reg-sombra-hover:
        0 20px 55px rgba(0, 49, 73, 0.15);

    --reg-radio: 20px;
    --reg-radio-sm: 12px;
}


/* ============================================================
   CONTENEDOR GENERAL
============================================================ */

.regulatoria-page {
    width: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 10% 20%,
            rgba(230, 239, 246, 0.45),
            transparent 28%),
        linear-gradient(180deg,
            #ffffff 0%,
            #f8fafc 100%);
}


/* ============================================================
   CONTENIDO PRINCIPAL
============================================================ */

.main-regulatorio {
    width: min(1100px, calc(100% - 48px));

    margin: 0 auto;
    padding: 70px 0 90px;
}


/* ============================================================
   ENCABEZADO
============================================================ */

.reg-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;

    margin-bottom: 55px;
}

.reg-heading-line {
    flex: 1;
    max-width: 180px;
    height: 2px;

    background:
        linear-gradient(90deg,
            transparent,
            rgba(0, 49, 73, 0.25));
}

.reg-heading-line:last-child {
    background:
        linear-gradient(90deg,
            rgba(0, 49, 73, 0.25),
            transparent);
}

.reg-heading-content {
    text-align: center;
    min-width: 260px;
}

.reg-heading-kicker {
    display: inline-block;

    margin-bottom: 10px;

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;

    color: var(--reg-rojo);
}

.reg-heading h1 {
    margin: 0;

    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.1;

    color: var(--reg-azul);
}

.reg-heading p {
    margin: 12px 0 0;

    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 4px;

    color: var(--reg-suave);
}


/* ============================================================
   TARJETAS
============================================================ */

.reg-card {
    position: relative;

    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: center;

    gap: 45px;

    margin-bottom: 35px;
    padding: 42px;

    background: rgba(255, 255, 255, 0.96);

    border: 1px solid var(--reg-borde);
    border-radius: var(--reg-radio);

    box-shadow: var(--reg-sombra);

    overflow: hidden;

    transition:
        transform 0.4s cubic-bezier(.22, .61, .36, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
}


/* Línea lateral */

.reg-card::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 5px;

    background:
        linear-gradient(180deg,
            var(--reg-azul),
            var(--reg-rojo));

    transform: scaleY(0.35);
    transform-origin: center;

    transition:
        transform 0.4s ease;
}

.reg-card:hover {
    transform: translateY(-7px);

    box-shadow: var(--reg-sombra-hover);

    border-color: rgba(0, 49, 73, 0.16);
}

.reg-card:hover::before {
    transform: scaleY(1);
}


/* ============================================================
   TARJETA INVERTIDA
============================================================ */

.reg-card-reverse {
    grid-template-columns: minmax(0, 1fr) 230px;
}

.reg-card-reverse .reg-img {
    order: 2;
}

.reg-card-reverse .reg-body {
    order: 1;
}


/* ============================================================
   IMÁGENES
============================================================ */

.reg-img {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    min-height: 180px;
}

.reg-img img {
    display: block;

    width: 100%;
    max-width: 230px;
    height: auto;

    border-radius: var(--reg-radio-sm);

    box-shadow:
        0 10px 25px rgba(0, 49, 73, 0.12);

    transition:
        transform 0.5s cubic-bezier(.22, .61, .36, 1),
        box-shadow 0.5s ease;
}

.reg-card:hover .reg-img img {
    transform: scale(1.045) rotate(-1deg);

    box-shadow:
        0 18px 35px rgba(0, 49, 73, 0.18);
}


/* Número */

.reg-img-number {
    position: absolute;

    right: -5px;
    bottom: -8px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: var(--reg-azul);
    color: #fff;

    font-size: 0.82rem;
    font-weight: 800;

    box-shadow:
        0 8px 20px rgba(0, 49, 73, 0.22);

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.reg-card:hover .reg-img-number {
    background: var(--reg-rojo);
    transform: scale(1.08);
}


/* ============================================================
   CUERPO DE LA TARJETA
============================================================ */

.reg-body {
    min-width: 0;
}


/* Etiqueta */

.reg-tag {
    display: inline-flex;
    align-items: center;

    margin-bottom: 13px;
    padding: 6px 14px;

    border-radius: 50px;

    background: var(--reg-azul-lt);
    color: var(--reg-azul);

    font-size: 0.72rem;
    font-weight: 800;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}


/* Título */

.reg-body h2 {
    position: relative;

    margin: 0 0 17px;

    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.45rem);
    font-weight: 400;
    line-height: 1.1;

    color: var(--reg-azul);

    cursor: default;
}

.reg-body h2::after {
    content: "";

    display: block;

    width: 45px;
    height: 3px;

    margin-top: 12px;

    border-radius: 10px;

    background: var(--reg-rojo);

    transition:
        width 0.35s ease;
}

.reg-card:hover .reg-body h2::after {
    width: 80px;
}


/* Texto */

.reg-text {
    margin: 0 0 25px;

    color: var(--reg-suave);

    font-size: 1rem;
    line-height: 1.85;

    text-align: justify;
}


/* ============================================================
   BOTONES / DOCUMENTOS
============================================================ */

.btn-doc {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    min-height: 46px;

    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: 50px;

    background: var(--reg-azul);
    color: #fff;

    text-decoration: none;

    font-size: 0.92rem;
    font-weight: 700;

    overflow: hidden;

    box-shadow:
        0 8px 20px rgba(0, 49, 73, 0.16);

    transition:
        background 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.btn-doc::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(110deg,
            transparent 20%,
            rgba(255, 255, 255, 0.18) 45%,
            transparent 70%);

    transform: translateX(-120%);

    transition:
        transform 0.6s ease;
}

.btn-doc:hover {
    background: var(--reg-rojo);
    color: #fff;

    transform: translateY(-3px);

    box-shadow:
        0 12px 28px rgba(170, 13, 46, 0.22);
}

.btn-doc:hover::before {
    transform: translateX(120%);
}

.btn-doc-icon,
.btn-doc-arrow {
    position: relative;
    z-index: 1;
}

.btn-doc-arrow {
    font-size: 1rem;

    transition:
        transform 0.3s ease;
}

.btn-doc:hover .btn-doc-arrow {
    transform: translate(3px, -3px);
}


/* ============================================================
   BANNER DE CIERRE
============================================================ */

.banner-cierre {
    width: 100%;

    margin: 0;

    overflow: hidden;
}

.banner-cierre img {
    display: block;

    width: 100%;
    height: auto;

    transition:
        transform 0.8s ease;
}

.banner-cierre:hover img {
    transform: scale(1.01);
}


/* ============================================================
   ANIMACIONES AL HACER SCROLL
============================================================ */

.fade-up {
    opacity: 0;

    transform:
        translateY(35px);

    transition:
        opacity 0.75s ease,
        transform 0.75s cubic-bezier(.22, .61, .36, 1);
}

.fade-up.visible {
    opacity: 1;

    transform:
        translateY(0);
}


/* ============================================================
   ACCESIBILIDAD
============================================================ */

@media (prefers-reduced-motion: reduce) {

    .fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .reg-card,
    .reg-card:hover,
    .reg-card img,
    .reg-card:hover .reg-img img,
    .banner-cierre img {
        transform: none;
        transition: none;
    }
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 900px) {

    .main-regulatorio {
        width: min(100% - 36px, 760px);
        padding-top: 55px;
    }

    .reg-card {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 30px;
        padding: 30px;
    }

    .reg-card-reverse {
        grid-template-columns: minmax(0, 1fr) 180px;
    }

    .reg-img img {
        max-width: 180px;
    }

    .reg-img {
        min-height: 150px;
    }

    .reg-text {
        font-size: 0.96rem;
    }
}


/* ============================================================
   MÓVIL
============================================================ */

@media (max-width: 700px) {

    .main-regulatorio {
        width: min(100% - 28px, 560px);
        padding: 42px 0 60px;
    }

    .reg-heading {
        gap: 12px;
        margin-bottom: 38px;
    }

    .reg-heading-line {
        max-width: 55px;
    }

    .reg-heading-content {
        min-width: 0;
    }

    .reg-heading-kicker {
        font-size: 0.68rem;
        letter-spacing: 1.8px;
    }

    .reg-heading h1 {
        font-size: 2rem;
    }

    .reg-heading p {
        font-size: 0.72rem;
        letter-spacing: 2.5px;
    }

    .reg-card,
    .reg-card-reverse {
        grid-template-columns: 1fr;

        gap: 28px;

        padding: 26px 22px;

        margin-bottom: 25px;
    }

    .reg-card-reverse .reg-img,
    .reg-card-reverse .reg-body {
        order: unset;
    }

    .reg-img {
        min-height: auto;
    }

    .reg-img img {
        width: auto;
        max-width: min(220px, 80%);
    }

    .reg-img-number {
        right: calc(50% - 115px);
        bottom: -8px;
    }

    .reg-body h2 {
        font-size: 1.9rem;
    }

    .reg-text {
        font-size: 0.94rem;
        line-height: 1.75;
        text-align: left;
    }

    .btn-doc {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================================
   MÓVIL PEQUEÑO
============================================================ */

@media (max-width: 420px) {

    .main-regulatorio {
        width: calc(100% - 20px);
    }

    .reg-heading-line {
        display: none;
    }

    .reg-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .reg-tag {
        font-size: 0.65rem;
    }

    .reg-body h2 {
        font-size: 1.7rem;
    }

    .reg-text {
        font-size: 0.9rem;
    }
}