/* Páginas informativas y legales */
.page.bg-light {
    position: relative;
    isolation: isolate;
    overflow: visible;
    padding: 3rem 0 4rem;
    background:
        radial-gradient(circle at 8% 4%, rgba(var(--secundary-color-rgb), 0.08), transparent 25rem),
        radial-gradient(circle at 92% 14%, rgba(var(--primary-color-rgb), 0.07), transparent 24rem),
        #f7f9fb !important;
}

.page.bg-light::before,
.page.bg-light::after {
    position: absolute;
    z-index: -1;
    width: 18rem;
    height: 18rem;
    border: 1px solid rgba(var(--secundary-color-rgb), 0.08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.page.bg-light::before {
    top: 8rem;
    left: -12rem;
}

.page.bg-light::after {
    right: -10rem;
    bottom: 6rem;
}

.page.bg-light > .container {
    max-width: 1180px;
}

.page.bg-light .row.g-5 {
    --bs-gutter-x: 2rem;
    --bs-gutter-y: 2rem;
}

/* Navegación lateral */
.page.bg-light .col-lg-4 {
    flex: 0 0 auto;
    width: 29%;
}

.page.bg-light .col-lg-8 {
    flex: 0 0 auto;
    width: 71%;
}

.page.bg-light .sticky-top {
    top: 130px !important;
}

.page.bg-light .col-lg-4 .card {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.045) !important;
    border-radius: 1.25rem !important;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1rem 2.5rem rgba(21, 34, 50, 0.09) !important;
}

.page.bg-light .col-lg-4 .card::before {
    display: block;
    height: 0.3rem;
    background: linear-gradient(90deg, var(--secundary-color), var(--primary-color));
    content: "";
}

.page.bg-light .col-lg-4 .card-body {
    padding: 1.35rem;
}

.page.bg-light .col-lg-4 h5 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem !important;
    color: #27313b;
    font-size: 1rem;
    font-weight: 800 !important;
}

.page.bg-light .col-lg-4 h5 > i {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.85rem;
    color: #fff;
    background: linear-gradient(145deg, var(--secundary-color), #0056b3);
    box-shadow: 0 0.55rem 1rem rgba(var(--secundary-color-rgb), 0.2);
    font-size: 1rem;
}

#legal-nav {
    gap: 0.25rem;
}

.legal-link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 2.55rem;
    padding: 0.55rem 0.75rem 0.55rem 1rem !important;
    border-radius: 0.7rem;
    color: #6c757d !important;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.legal-link::before {
    position: absolute;
    top: 50%;
    left: 0.35rem;
    width: 0.22rem;
    height: 0;
    border-radius: 999px;
    background: var(--secundary-color);
    content: "";
    transform: translateY(-50%);
    transition: height 0.2s ease;
}

.legal-link:hover,
.legal-link.active-legal {
    color: var(--secundary-color) !important;
    background: rgba(var(--secundary-color-rgb), 0.075);
    transform: translateX(0.2rem);
}

.legal-link:hover::before,
.legal-link.active-legal::before {
    height: 1.2rem;
}

/* Tarjeta principal */
.page.bg-light .col-lg-8 > .card {
    border: 1px solid rgba(0, 0, 0, 0.045) !important;
    border-radius: 1.35rem !important;
    background: #fff;
    box-shadow: 0 1rem 2.75rem rgba(21, 34, 50, 0.09) !important;
}

.page.bg-light .col-lg-8 > .card::before {
    display: block;
    height: 0.35rem;
    background: linear-gradient(90deg, var(--secundary-color), var(--primary-color));
    content: "";
}

.page.bg-light .col-lg-8 > .card > .card-body {
    padding: clamp(1.5rem, 4vw, 3rem) !important;
}

.page.bg-light h1 {
    position: relative;
    margin-bottom: 2.5rem !important;
    padding: 0 0 1.4rem 4.7rem;
    color: #212529 !important;
    font-size: clamp(1.65rem, 3.5vw, 2.25rem);
    font-weight: 850 !important;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.page.bg-light h1 > i {
    position: absolute;
    top: -0.45rem;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.65rem;
    height: 3.65rem;
    border-radius: 1.1rem;
    color: #fff;
    background: linear-gradient(145deg, var(--secundary-color), #0056b3);
    box-shadow: 0 0.75rem 1.5rem rgba(var(--secundary-color-rgb), 0.22);
    font-size: 1.35rem;
}

.page.bg-light h1::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 4.7rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--secundary-color-rgb), 0.28), rgba(0, 0, 0, 0.04));
    content: "";
}

.legal-section {
    scroll-margin-top: 175px;
}

.legal-section:not(:first-child) {
    position: relative;
    padding-top: 0.25rem;
}

.legal-section h3 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-bottom: 0.75rem !important;
    border-color: #edf0f2 !important;
    color: #27313b;
    font-size: 1.08rem !important;
    font-weight: 800 !important;
}

.legal-section h3::before {
    width: 0.35rem;
    height: 1.5rem;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--secundary-color), var(--primary-color));
    content: "";
}

.legal-section p,
.legal-section li,
.page.bg-light .col-lg-8 > .card p,
.page.bg-light .col-lg-8 > .card li {
    color: #68737e !important;
    line-height: 1.75;
}

.legal-section strong,
.page.bg-light .col-lg-8 > .card strong {
    color: #37414b;
}

.legal-section a {
    color: var(--secundary-color);
    font-weight: 650;
    text-decoration-color: rgba(var(--secundary-color-rgb), 0.3);
    text-underline-offset: 0.18rem;
}

/* Elementos interiores */
.legal-section .table-responsive {
    border: 1px solid #e9edf1;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 0.45rem 1.2rem rgba(21, 34, 50, 0.05);
}

.legal-section .table {
    margin-bottom: 0;
    border: 0 !important;
}

.legal-section .table > :not(caption) > * > * {
    padding: 0.85rem 1rem;
    border-color: #edf0f2;
}

.legal-section .table thead th {
    color: #46515d;
    background: rgba(var(--secundary-color-rgb), 0.065);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.035em;
}

.legal-section .table tbody th {
    color: #46515d;
    background: #fafbfc;
}

.legal-section .alert,
.legal-section > .p-3,
.legal-section > .p-4 {
    border-radius: 1rem !important;
    box-shadow: 0 0.45rem 1.2rem rgba(21, 34, 50, 0.05);
}

.legal-section .row .h-100,
.legal-section > .card {
    border-color: rgba(var(--secundary-color-rgb), 0.1) !important;
    box-shadow: 0 0.45rem 1.2rem rgba(21, 34, 50, 0.06) !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.legal-section .row .h-100:hover,
.legal-section > .card:hover {
    border-color: rgba(var(--secundary-color-rgb), 0.22) !important;
    box-shadow: 0 0.9rem 2rem rgba(21, 34, 50, 0.09) !important;
    transform: translateY(-2px);
}

.legal-section .badge {
    padding: 0.65rem 0.9rem !important;
    border-color: rgba(var(--secundary-color-rgb), 0.12) !important;
    color: #52606d !important;
    font-weight: 700;
}

.page.bg-light .btn {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1.2;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.page.bg-light .btn i {
    font-size: 1rem;
    line-height: 1;
}

.page.bg-light .btn-primary {
    box-shadow: 0 0.45rem 1rem rgba(var(--primary-color-rgb), 0.2) !important;
}

.page.bg-light .btn-secundary {
    color: #fff !important;
    box-shadow: 0 0.45rem 1rem rgba(var(--secundary-color-rgb), 0.2) !important;
}

.page.bg-light .btn-secundary:hover,
.page.bg-light .btn-secundary:focus,
.page.bg-light .btn-secundary:active {
    color: #fff !important;
}

.page.bg-light .btn-outline-secundary {
    border-width: 2px;
    box-shadow: 0 0.35rem 0.85rem rgba(var(--secundary-color-rgb), 0.1) !important;
}

.page.bg-light .btn:hover {
    box-shadow: 0 0.7rem 1.35rem rgba(21, 34, 50, 0.14) !important;
}

.page.bg-light .btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.22rem rgba(var(--secundary-color-rgb), 0.18) !important;
}

.info-contact-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(var(--secundary-color-rgb), 0.12);
    background:
        radial-gradient(circle at 100% 0, rgba(var(--primary-color-rgb), 0.08), transparent 13rem),
        linear-gradient(145deg, #fff, rgba(var(--secundary-color-rgb), 0.055));
    box-shadow: 0 0.75rem 1.8rem rgba(21, 34, 50, 0.08);
}

.info-contact-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 0.3rem;
    background: linear-gradient(90deg, var(--secundary-color), var(--primary-color));
    content: "";
}

.info-contact-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 1rem;
    border-radius: 1rem;
    color: #fff;
    background: linear-gradient(145deg, var(--secundary-color), #0056b3);
    box-shadow: 0 0.65rem 1.25rem rgba(var(--secundary-color-rgb), 0.2);
}

.info-contact-card__icon i {
    font-size: 1.4rem;
}

.info-contact-card h4 {
    color: #27313b;
}

.info-contact-card p {
    max-width: 34rem;
    margin-right: auto;
    margin-left: auto;
}

.legal-section code {
    padding: 0.25rem 0.45rem;
    border-radius: 0.4rem;
    background: rgba(var(--secundary-color-rgb), 0.07);
}

@media (max-width: 991.98px) {
    .page.bg-light {
        padding: 2.25rem 0 3rem;
    }

    .page.bg-light .col-lg-8 {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .page.bg-light {
        padding: 1.25rem 0 2.25rem;
    }

    .page.bg-light > .container {
        padding-right: 0.85rem;
        padding-left: 0.85rem;
    }

    .page.bg-light .col-lg-8 > .card {
        border-radius: 1.1rem !important;
    }

    .page.bg-light .col-lg-8 > .card > .card-body {
        padding: 1.25rem !important;
    }

    .page.bg-light h1 {
        min-height: 3rem;
        margin-bottom: 1.8rem !important;
        padding: 0.25rem 0 1.15rem 3.75rem;
        font-size: 1.5rem;
    }

    .page.bg-light h1 > i {
        top: -0.15rem;
        width: 3rem;
        height: 3rem;
        border-radius: 0.9rem;
        font-size: 1.1rem;
    }

    .page.bg-light h1::after {
        left: 0;
    }

    .legal-section {
        margin-bottom: 2.25rem !important;
        scroll-margin-top: 110px;
    }

    .legal-section h3 {
        align-items: flex-start;
        font-size: 1rem !important;
        line-height: 1.35;
    }

    .legal-section h3::before {
        flex: 0 0 auto;
        margin-top: 0.05rem;
    }

    .legal-section p,
    .legal-section li,
    .page.bg-light .col-lg-8 > .card p,
    .page.bg-light .col-lg-8 > .card li {
        font-size: 0.88rem;
        line-height: 1.7;
    }

    .legal-section .table > :not(caption) > * > * {
        padding: 0.7rem;
        font-size: 0.75rem;
    }

    .legal-section .d-flex {
        align-items: flex-start !important;
    }

    .info-actions .btn {
        width: 100%;
    }
}
