/* Terms & Conditions — premium layout (terms&conditions.php) */
.terms-page {
    background: #f4f5f7;
    overflow-x: hidden;
}

.terms-hero {
    position: relative;
    padding: 3.5rem 1.25rem 5rem;
    background:
        linear-gradient(120deg, rgba(26, 26, 26, 0.94) 0%, rgba(45, 45, 45, 0.88) 50%, rgba(163, 0, 47, 0.5) 100%),
        url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&q=80&w=1600') center/cover no-repeat;
    color: #fff;
}

.terms-hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 100px;
    background: linear-gradient(to top, #f4f5f7, transparent);
    pointer-events: none;
}

.terms-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.terms-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    margin-bottom: 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.terms-hero__badge i,
.terms-hero__badge svg {
    width: 1rem;
    height: 1rem;
}

.terms-hero__title {
    font-size: clamp(1.85rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.65rem;
}

.terms-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    opacity: 0.9;
    line-height: 1.6;
}

.terms-hero__shield {
    width: 7rem;
    height: 7rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.terms-hero__shield i,
.terms-hero__shield svg {
    width: 3.25rem;
    height: 3.25rem;
    color: #ff8fa3;
}

.terms-wrap {
    max-width: 1280px;
    margin: -2.5rem auto 3rem;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

.terms-toc {
    position: sticky;
    top: 5.5rem;
    background: #fff;
    border-radius: 1rem;
    padding: 1.35rem 1.15rem;
    border: 1px solid var(--border-color, #e2e2e2);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.06);
}

.terms-toc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color, #e2e2e2);
}

.terms-toc__head h2 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
}

.terms-toc__count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary, #c3002f);
    background: rgba(195, 0, 47, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
}

.terms-toc nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.terms-toc a {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary, #666);
    line-height: 1.45;
    transition: background 0.2s, color 0.2s;
}

.terms-toc a:hover,
.terms-toc a:focus-visible {
    background: rgba(195, 0, 47, 0.06);
    color: var(--primary, #c3002f);
    outline: none;
}

.terms-toc__num {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 0.35rem;
    background: var(--bg-light, #f8f8f8);
    color: var(--primary, #c3002f);
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terms-main {
    min-width: 0;
}

.terms-intro {
    background: linear-gradient(135deg, rgba(195, 0, 47, 0.06), rgba(195, 0, 47, 0.02));
    border: 1px solid rgba(195, 0, 47, 0.15);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.terms-intro__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.65rem;
    background: var(--primary, #c3002f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.terms-intro__icon i,
.terms-intro__icon svg {
    width: 1.2rem;
    height: 1.2rem;
}

.terms-intro p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary, #666);
}

.terms-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.terms-section {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--border-color, #e2e2e2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    scroll-margin-top: 6rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.terms-section:hover {
    border-color: rgba(195, 0, 47, 0.2);
    box-shadow: 0 12px 32px rgba(195, 0, 47, 0.08);
}

.terms-section__head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to left, rgba(195, 0, 47, 0.04), transparent);
    border-bottom: 1px solid var(--border-color, #e2e2e2);
}

html[dir="ltr"] .terms-section__head {
    background: linear-gradient(to right, rgba(195, 0, 47, 0.04), transparent);
}

.terms-section__icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--primary, #c3002f), var(--primary-dark, #a10026));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.terms-section__icon i,
.terms-section__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.terms-section__title-wrap {
    flex: 1;
    min-width: 0;
}

.terms-section__index {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary, #c3002f);
    margin-bottom: 0.2rem;
}

.terms-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    line-height: 1.4;
    margin: 0;
}

.terms-section__body {
    padding: 1.25rem 1.5rem 1.35rem;
}

.terms-section__body p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--text-secondary, #666);
}

.terms-cta {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-top: 0.5rem;
    padding: 2rem 2.25rem;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #3d0a14 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(195, 0, 47, 0.18);
}

.terms-cta h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.terms-cta p {
    opacity: 0.88;
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
    max-width: 36rem;
}

.terms-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    flex-shrink: 0;
}

.terms-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.terms-btn i,
.terms-btn svg {
    width: 1rem;
    height: 1rem;
}

.terms-btn--primary {
    background: #fff;
    color: var(--primary, #c3002f);
}

.terms-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.terms-btn--ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.terms-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .terms-hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .terms-hero__shield {
        margin: 0 auto;
    }

    .terms-wrap {
        grid-template-columns: 1fr;
        margin-top: -2rem;
    }

    .terms-toc {
        position: static;
    }

    .terms-toc nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .terms-cta {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .terms-cta__actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .terms-hero {
        padding: 2.5rem 1rem 4rem;
    }

    .terms-toc nav {
        grid-template-columns: 1fr;
    }

    .terms-section__head {
        padding: 1rem;
    }

    .terms-section__body {
        padding: 1rem;
    }

    .terms-cta {
        padding: 1.5rem;
    }

    .terms-cta__actions {
        flex-direction: column;
        width: 100%;
    }

    .terms-btn {
        width: 100%;
        justify-content: center;
    }
}
