body.terms-page #main-content.container {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.terms-wrap {
    width: 100%;
    margin: 0 auto;
    padding: 32px 0 80px;
    box-sizing: border-box;
}

.terms-hero {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    padding: 36px 24px 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    width: 100%;
}

.terms-hero::before {
    content: "";
    position: absolute;
    inset: -20%;
    z-index: -1;
    background: radial-gradient(480px circle at 50% 20%, var(--primary-light), transparent 65%);
    opacity: 0.85;
    pointer-events: none;
}

.terms-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(22, 163, 74, 0.25);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.terms-hero h1 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.terms-subtitle {
    color: var(--muted);
    font-size: 15px;
    max-width: 600px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

.terms-meta-strip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 22px;
}

.terms-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.terms-meta-item svg {
    color: var(--primary);
}

.terms-meta-divider {
    color: var(--border);
}

.terms-search-box {
    max-width: 540px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.terms-search-box svg {
    position: absolute;
    left: 16px;
    color: var(--muted);
    pointer-events: none;
}

.terms-search-box input {
    width: 100%;
    padding: 13px 42px 13px 46px;
    font-size: 14.5px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.terms-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
    background: var(--card);
}

.search-clear-btn {
    position: absolute;
    right: 16px;
    font-size: 20px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    user-select: none;
}

.search-clear-btn:hover {
    color: var(--text);
}

.terms-main-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
}

.terms-sidebar {
    position: sticky;
    top: 80px;
    z-index: 90;
    align-self: start;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 12px;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.sidebar-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    padding: 4px 8px 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.sidebar-head svg {
    color: var(--primary);
}

.terms-toc {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toc-pill {
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: all 0.18s ease;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.pill-num {
    font-size: 11px;
    font-weight: 800;
    opacity: 0.75;
    flex-shrink: 0;
}

.toc-pill:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: rgba(22, 163, 74, 0.15);
}

.toc-pill.active {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.32);
}

[data-theme="dark"] .toc-pill.active {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #090d16 !important;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

.toc-pill-alert {
    color: #dc2626;
}

.toc-pill-alert:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .toc-pill-alert {
    color: #f87171;
}

[data-theme="dark"] .toc-pill-alert:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.toc-pill-highlight {
    color: var(--primary);
}

.terms-content-column {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.terms-section {
    margin-bottom: 24px;
    scroll-margin-top: 84px;
    width: 100%;
    box-sizing: border-box;
}

.terms-section-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.section-badge-num {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.section-badge-num.alert-badge-num {
    background: #fee2e2;
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.25);
}

[data-theme="dark"] .section-badge-num.alert-badge-num {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

.terms-section h2 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 2px;
    color: var(--text);
}

.terms-section-sub {
    color: var(--muted);
    font-size: 13.5px;
    margin: 0;
}

.terms-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 24px 26px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.terms-card:hover {
    border-color: rgba(22, 163, 74, 0.3);
}

.terms-card p {
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.7;
    margin: 0 0 14px;
}

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

.terms-highlight-box {
    background: var(--primary-light);
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    color: var(--text);
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.terms-highlight-box svg {
    color: var(--primary);
    flex-shrink: 0;
}

.terms-card.alert-card {
    border-left: 4px solid #ef4444;
    background: color-mix(in srgb, #ef4444 4%, var(--card));
}

.terms-card.alert-card:hover {
    border-color: #ef4444;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 15px;
    color: #dc2626;
    margin-bottom: 14px;
}

[data-theme="dark"] .alert-header {
    color: #f87171;
}

.terms-custom-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terms-custom-list li {
    font-size: 14px;
    color: var(--text);
    line-height: 1.65;
    padding-left: 20px;
    position: relative;
    word-break: break-word;
}

.terms-custom-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: 800;
    font-size: 18px;
    position: absolute;
    left: 4px;
    top: -2px;
}

.alert-card .terms-custom-list li::before {
    color: #ef4444;
}

.terms-contact-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 24px;
    padding: 36px 28px;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    margin-top: 32px;
}

.contact-card-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-block;
    margin-bottom: 12px;
    border: 1px solid rgba(34, 197, 94, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.terms-contact-card h2 {
    margin: 0 0 8px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
}

.terms-contact-card p {
    color: #cbd5e1;
    font-size: 14.5px;
    max-width: 520px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.contact-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 22px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.contact-btn:hover {
    transform: translateY(-2px);
}

.contact-btn-primary {
    background: #22c55e;
    color: #0f172a !important;
    font-weight: 800;
}

.contact-btn-primary:hover {
    background: #4ade80;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.35);
}

.contact-btn-whatsapp {
    background: #25d366;
    color: #ffffff !important;
    font-weight: 700;
}

.contact-btn-whatsapp:hover {
    background: #20ba5a;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.contact-email-note {
    margin-top: 20px;
    font-size: 13px;
    color: #94a3b8;
}

.contact-email-note strong {
    color: #e2e8f0;
}

@media (max-width: 999px) {
    body.terms-page #main-content.container {
        padding: 0 12px;
    }

    .terms-wrap {
        padding: 16px 0 80px;
    }

    .terms-main-layout {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .terms-sidebar {
        position: sticky;
        top: var(--nav-h, 60px);
        z-index: 95;
        padding: 8px;
        border-radius: 14px;
        margin: 0 0 8px 0;
        width: 100%;
        background: var(--bg);
        border: 1px solid var(--border);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }

    [data-theme="dark"] .terms-sidebar {
        background: var(--bg);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .sidebar-head {
        display: none;
    }

    .terms-toc {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 2px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    .terms-toc::-webkit-scrollbar {
        display: none;
    }

    .toc-pill {
        width: auto;
        flex-shrink: 0;
        border-radius: 999px;
        background: var(--card);
        border: 1px solid var(--border);
        color: var(--muted);
        padding: 7px 14px;
        font-size: 13px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
        white-space: nowrap;
    }

    .toc-pill.active {
        background: #16a34a !important;
        border-color: #16a34a !important;
        color: #ffffff !important;
        font-weight: 700;
        box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
    }

    [data-theme="dark"] .toc-pill.active {
        background: #22c55e !important;
        border-color: #22c55e !important;
        color: #090d16 !important;
        font-weight: 800;
        box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    }

    .terms-section {
        scroll-margin-top: 125px;
    }

    .terms-card {
        padding: 20px 18px;
    }
}

@media (max-width: 600px) {
    body.terms-page #main-content.container {
        padding: 0 8px;
    }

    .terms-wrap {
        padding: 10px 0 72px;
    }

    .terms-hero {
        padding: 20px 14px;
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .terms-hero h1 {
        font-size: 21px;
        line-height: 1.25;
        word-break: break-word;
    }

    .terms-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
    }

    .terms-meta-strip {
        font-size: 11.5px;
        padding: 5px 12px;
        margin-bottom: 16px;
    }

    .terms-search-box input {
        padding: 11px 36px 11px 38px;
        font-size: 13px;
    }

    .terms-search-box svg {
        left: 12px;
        width: 16px;
        height: 16px;
    }

    .terms-sidebar {
        margin: 0 0 10px 0;
        padding: 6px 8px;
    }

    .terms-section {
        margin-bottom: 14px;
    }

    .section-badge-num {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 13px;
    }

    .terms-section h2 {
        font-size: 17.5px;
    }

    .terms-section-sub {
        font-size: 12.5px;
    }

    .terms-card {
        padding: 16px 14px;
        border-radius: 16px;
    }

    .terms-card p {
        font-size: 13.5px;
    }

    .terms-custom-list li {
        font-size: 13px;
    }

    .terms-contact-card {
        padding: 22px 14px;
        border-radius: 16px;
    }

    .terms-contact-card h2 {
        font-size: 20px;
    }

    .terms-contact-card p {
        font-size: 13px;
    }

    .contact-actions {
        flex-direction: column;
        gap: 10px;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
        padding: 11px 14px;
        font-size: 13px;
    }
}
