/* =====================================================
   TÉRMINOS Y CONDICIONES SPNEXT
   Extiende los estilos globales de base.css, navbar.css
   footer.css y whatsapp.css.
===================================================== */

/* =====================================================
   ACCESIBILIDAD
===================================================== */

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;

    padding: 10px 16px;

    border-radius: 10px;

    background: var(--white);
    color: var(--primary-dark);

    font-size: 0.78rem;
    font-weight: 700;

    box-shadow: var(--shadow-md);

    transform: translateY(-160%);

    transition: transform var(--transition-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

/* =====================================================
   HERO LEGAL
===================================================== */

.terms-hero {
    position: relative;
    isolation: isolate;

    min-height: 590px;
    display: flex;
    align-items: center;

    padding: 145px 0 110px;

    overflow: hidden;

    background:
        radial-gradient(circle at 10% 20%,
            rgba(37, 99, 235, 0.30),
            transparent 30%),
        radial-gradient(circle at 90% 76%,
            rgba(139, 92, 246, 0.24),
            transparent 30%),
        linear-gradient(135deg,
            #020617 0%,
            #0f172a 56%,
            #172033 100%);

    color: var(--white);
}

.terms-hero::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -2;

    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px,
            transparent 1px),
        linear-gradient(90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px);

    background-size: 50px 50px;

    mask-image: linear-gradient(to bottom, #000, transparent 94%);
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 94%);

    pointer-events: none;
}

.terms-hero::after {
    content: "";

    position: absolute;
    right: -80px;
    bottom: -180px;
    z-index: -1;

    width: 410px;
    height: 410px;

    border-radius: 50%;

    background: rgba(6, 182, 212, 0.14);

    filter: blur(95px);

    pointer-events: none;
}

.terms-hero-glow {
    position: absolute;
    top: -180px;
    left: -160px;
    z-index: -1;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    background: rgba(37, 99, 235, 0.16);

    filter: blur(115px);

    pointer-events: none;
}

.terms-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;

    margin: 0 0 25px;

    color: #94a3b8;

    font-size: 0.72rem;
}

.terms-breadcrumb a {
    color: #cbd5e1;

    transition: color var(--transition-fast);
}

.terms-breadcrumb a:hover,
.terms-breadcrumb a:focus-visible {
    color: var(--secondary);
}

.terms-breadcrumb i {
    font-size: 0.58rem;
}

.terms-hero .badge-custom {
    margin-bottom: 23px;

    border-color: rgba(6, 182, 212, 0.28);

    background: rgba(6, 182, 212, 0.08);
    color: #a5f3fc;
}

.terms-title {
    max-width: 920px;

    margin: 0 auto 20px;

    color: var(--white);

    font-size: clamp(2.6rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.07;
    letter-spacing: -0.04em;

    text-align: center;
}

.terms-title .text-gradient {
    background: linear-gradient(90deg,
        #60a5fa,
        #22d3ee,
        #a78bfa);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.terms-hero-description {
    max-width: 790px;

    margin: 0 auto;

    color: #cbd5e1;

    font-size: clamp(0.96rem, 2vw, 1.08rem);
    line-height: 1.85;

    text-align: center;
}

.terms-update {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-top: 27px;

    color: #94a3b8;

    font-size: 0.7rem;
}

.terms-update i {
    color: var(--secondary);
}

/* =====================================================
   RESUMEN DE TÉRMINOS
===================================================== */

.terms-summary-section {
    z-index: 4;

    margin-top: -54px;
    padding: 0;
}

.terms-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;

    padding: 20px;

    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.97);

    box-shadow: var(--shadow-lg);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.terms-summary-item {
    display: flex;
    align-items: center;
    gap: 13px;

    min-height: 82px;
    padding: 15px;

    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 17px;

    background: linear-gradient(145deg,
        var(--white),
        var(--light));
}

.terms-summary-icon {
    width: 43px;
    height: 43px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border-radius: 13px;

    background: var(--primary-soft);
    color: var(--primary);
}

.terms-summary-icon i {
    font-size: 0.95rem;
}

.terms-summary-item strong,
.terms-summary-item small {
    display: block;
}

.terms-summary-item strong {
    margin-bottom: 3px;

    color: var(--dark-2);

    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.4;
}

.terms-summary-item small {
    color: var(--text-light);

    font-size: 0.59rem;
    line-height: 1.5;
}

/* =====================================================
   DOCUMENTO LEGAL
===================================================== */

.terms-content-section {
    padding: 78px 0 105px;
}

.terms-layout {
    display: grid;
    grid-template-columns: minmax(235px, 282px) minmax(0, 1fr);
    align-items: start;
    gap: 38px;
}

.terms-sidebar {
    position: sticky;
    top: 94px;
}

.terms-toc {
    padding: 23px;

    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-md);

    background: var(--white);

    box-shadow: var(--shadow-sm);
}

.terms-toc-title {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 16px;
    padding-bottom: 13px;

    border-bottom: 1px solid rgba(148, 163, 184, 0.18);

    color: var(--dark-2);

    font-size: 0.79rem;
    font-weight: 800;
}

.terms-toc-title i {
    color: var(--primary);
}

.terms-toc-nav {
    display: grid;
    gap: 4px;
}

.terms-toc-link {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    padding: 8px 9px;

    border-radius: 9px;

    color: var(--text-light);

    font-size: 0.66rem;
    font-weight: 500;
    line-height: 1.45;

    transition:
        color var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast);
}

.terms-toc-link::before {
    content: "";

    width: 5px;
    height: 5px;

    flex: 0 0 auto;

    margin-top: 5px;

    border-radius: 50%;

    background: #cbd5e1;

    transition:
        background-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.terms-toc-link:hover,
.terms-toc-link:focus-visible,
.terms-toc-link.active {
    background: var(--primary-soft);
    color: var(--primary-dark);

    transform: translateX(3px);
}

.terms-toc-link:hover::before,
.terms-toc-link:focus-visible::before,
.terms-toc-link.active::before {
    background: var(--secondary);

    box-shadow: 0 0 0 4px var(--secondary-soft);
}

.terms-help {
    margin-top: 17px;
    padding: 19px;

    border: 1px solid rgba(6, 182, 212, 0.18);
    border-radius: 18px;

    background: linear-gradient(145deg,
        rgba(6, 182, 212, 0.07),
        rgba(37, 99, 235, 0.05));
}

.terms-help > i {
    margin-bottom: 11px;

    color: var(--secondary);

    font-size: 1.05rem;
}

.terms-help strong,
.terms-help span {
    display: block;
}

.terms-help strong {
    margin-bottom: 6px;

    color: var(--dark-2);

    font-size: 0.73rem;
}

.terms-help span {
    margin-bottom: 11px;

    color: var(--text-light);

    font-size: 0.61rem;
    line-height: 1.55;
}

.terms-help a {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--primary-dark);

    font-size: 0.64rem;
    font-weight: 700;
}

.terms-document {
    min-width: 0;
}

.terms-introduction {
    margin-bottom: 21px;
    padding: 26px 28px;

    border: 1px solid rgba(37, 99, 235, 0.17);
    border-radius: 20px;

    background: linear-gradient(145deg,
        rgba(37, 99, 235, 0.07),
        rgba(139, 92, 246, 0.045));

    color: var(--text);

    font-size: 0.82rem;
    line-height: 1.8;
}

.terms-introduction strong {
    color: var(--dark-2);
}

.terms-card {
    margin-bottom: 20px;
    padding: 31px;

    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;

    background: var(--white);

    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.055);

    scroll-margin-top: 96px;
}

.terms-card:last-child {
    margin-bottom: 0;
}

.terms-card-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    margin-bottom: 19px;
}

.terms-card-number {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border-radius: 13px;

    background: linear-gradient(135deg,
        var(--primary),
        var(--accent));
    color: var(--white);

    font-size: 0.7rem;
    font-weight: 800;

    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20);
}

.terms-card h2 {
    margin: 0;

    color: var(--dark-2);

    font-size: clamp(1.14rem, 2.5vw, 1.43rem);
    font-weight: 800;
    line-height: 1.35;
}

.terms-card-subtitle {
    display: block;

    margin-top: 4px;

    color: var(--text-light);

    font-size: 0.64rem;
    line-height: 1.45;
}

.terms-card p {
    margin: 0 0 14px;

    color: var(--text);

    font-size: 0.78rem;
    line-height: 1.82;
}

.terms-card p:last-child {
    margin-bottom: 0;
}

.terms-card strong {
    color: var(--dark-2);
}

.terms-list {
    display: grid;
    gap: 10px;

    margin-top: 16px;
}

.terms-list li {
    position: relative;

    padding-left: 27px;

    color: var(--text);

    font-size: 0.76rem;
    line-height: 1.75;
}

.terms-list li::before {
    content: "\f00c";

    position: absolute;
    top: 2px;
    left: 0;

    color: var(--secondary);

    font-family: "Font Awesome 6 Free";
    font-size: 0.66rem;
    font-weight: 900;
}

.terms-note {
    display: flex;
    align-items: flex-start;
    gap: 13px;

    margin-top: 18px;
    padding: 16px 18px;

    border-left: 3px solid var(--secondary);
    border-radius: 0 13px 13px 0;

    background: rgba(6, 182, 212, 0.065);
}

.terms-note > i {
    flex: 0 0 auto;

    margin-top: 4px;

    color: var(--secondary);
}

.terms-note p {
    margin: 0;

    font-size: 0.71rem;
}

.terms-table-wrapper {
    margin-top: 18px;

    overflow-x: auto;

    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 15px;
}

.terms-table {
    width: 100%;
    min-width: 720px;

    border-collapse: collapse;

    background: var(--white);
}

.terms-table th,
.terms-table td {
    padding: 13px 15px;

    border-bottom: 1px solid rgba(148, 163, 184, 0.15);

    text-align: left;
    vertical-align: top;

    font-size: 0.66rem;
    line-height: 1.65;
}

.terms-table th {
    background: var(--light-2);
    color: var(--dark-2);

    font-weight: 800;
}

.terms-table td {
    color: var(--text);
}

.terms-table tr:last-child td {
    border-bottom: 0;
}

.terms-rights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin-top: 17px;
}

.terms-right-card {
    padding: 17px;

    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: 15px;

    background: #fbfdff;
}

.terms-right-card i {
    margin-bottom: 10px;

    color: var(--primary);
}

.terms-right-card strong,
.terms-right-card span {
    display: block;
}

.terms-right-card strong {
    margin-bottom: 4px;

    color: var(--dark-2);

    font-size: 0.69rem;
}

.terms-right-card span {
    color: var(--text-light);

    font-size: 0.61rem;
    line-height: 1.58;
}

.terms-contact-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 15px;

    margin-top: 18px;
    padding: 19px;

    border-radius: 16px;

    background: var(--dark-2);
    color: var(--white);
}

.terms-contact-icon {
    width: 45px;
    height: 45px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.06);
    color: var(--secondary);
}

.terms-contact-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 1em;
    height: 1em;

    font-size: 1.05rem;
    line-height: 1;
}

.terms-contact-box > div > strong,
.terms-contact-box > div > span,
.terms-contact-box > div > a {
    display: block;
}

.terms-contact-box > div > strong {
    margin-bottom: 3px;

    color: var(--white);

    font-size: 0.73rem;
}

.terms-contact-box > div > span {
    margin-bottom: 6px;

    color: #94a3b8;

    font-size: 0.61rem;
    line-height: 1.5;
}

.terms-contact-box > div > a {
    color: #67e8f9;

    font-size: 0.7rem;
    font-weight: 700;

    overflow-wrap: anywhere;
}

/* =====================================================
   CTA FINAL
===================================================== */

.terms-cta-section {
    isolation: isolate;

    padding: 68px 0;

    overflow: hidden;

    background:
        radial-gradient(circle at 12% 30%,
            rgba(37, 99, 235, 0.22),
            transparent 28%),
        radial-gradient(circle at 88% 70%,
            rgba(139, 92, 246, 0.18),
            transparent 30%),
        linear-gradient(135deg,
            #0f172a,
            #020617);

    color: var(--white);
}

.terms-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 34px;
}

.terms-cta-content h2 {
    margin: 0 0 9px;

    color: var(--white);

    font-size: clamp(1.5rem, 4vw, 2.35rem);
    font-weight: 800;
    line-height: 1.25;
}

.terms-cta-content p {
    max-width: 680px;

    margin: 0;

    color: #94a3b8;

    font-size: 0.79rem;
    line-height: 1.75;
}

.terms-cta-content .btn {
    flex: 0 0 auto;
}

/* =====================================================
   AJUSTES DEL FOOTER EN PÁGINA INTERNA
===================================================== */

.footer-legal a.active {
    color: var(--secondary);
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 991.98px) {
    .terms-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .terms-layout {
        grid-template-columns: 1fr;
    }

    .terms-sidebar {
        position: static;
    }

    .terms-toc-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .terms-help {
        display: none;
    }

    .terms-cta-content {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .terms-hero {
        min-height: 540px;
        padding: 125px 0 95px;
    }

    .terms-summary-section {
        margin-top: -46px;
    }

    .terms-content-section {
        padding: 65px 0 82px;
    }

    .terms-summary {
        padding: 15px;
    }

    .terms-toc-nav {
        grid-template-columns: 1fr;
    }

    .terms-card {
        padding: 25px 21px;
    }

    .terms-rights-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .terms-title {
        font-size: clamp(2.25rem, 12vw, 3.3rem);
    }

    .terms-hero-description {
        font-size: 0.91rem;
    }

    .terms-summary {
        grid-template-columns: 1fr;
    }

    .terms-summary-item {
        min-height: 72px;
    }

    .terms-introduction {
        padding: 21px;
    }

    .terms-card-heading {
        gap: 12px;
    }

    .terms-card-number {
        width: 38px;
        height: 38px;
    }

    .terms-contact-box {
        grid-template-columns: 1fr;
    }

    .terms-cta-content .btn {
        width: 100%;
    }
}
