/**
 * SIGMIX Terms and Conditions Page Styles
 * /css/terms.css
 */

/* ========================================
   HEADER SPACER
   ======================================== */
.header-spacer {
    height: 70px;
}

/* ========================================
   TERMS HERO
   ======================================== */
.terms-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.terms-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    border-radius: 50%;
}

.terms-hero .container {
    position: relative;
    z-index: 1;
}

.terms-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
}

.terms-hero .last-updated {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
}

.terms-hero .last-updated time {
    font-weight: 600;
}

/* ========================================
   TERMS CONTENT
   ======================================== */
.terms-content {
    padding: 4rem 0;
    background: var(--white);
}

.terms-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Company Info Box */
.company-info {
    background: var(--off-white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 3rem;
}

.company-info p {
    margin: 0;
    color: var(--dark);
    font-size: 1rem;
    line-height: 1.8;
}

.company-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.company-info a:hover,
.company-info a:focus {
    text-decoration: underline;
}

/* Section Styling */
.terms-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.terms-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.terms-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.terms-section p {
    font-size: 1rem;
    color: var(--dark);
    line-height: 1.8;
    margin-bottom: 1rem;
}

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

/* Subsection Headings */
.terms-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 1.5rem 0 0.75rem;
}

/* Lists */
.terms-section ul,
.terms-section ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.terms-section li {
    font-size: 1rem;
    color: var(--dark);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Appendix */
.appendix-section {
    background: var(--off-white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 3rem;
}

.appendix-section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    border-bottom: none;
    padding-bottom: 0;
}

.appendix-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.appendix-section li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.appendix-section li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.appendix-section li strong {
    color: var(--primary);
    min-width: 120px;
    flex-shrink: 0;
}

/* Acknowledgment Box */
.acknowledgment-box {
    background: linear-gradient(135deg, rgba(7, 0, 120, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.acknowledgment-box p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    line-height: 1.6;
}

/* Contact Section in Terms */
.contact-box {
    background: var(--off-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
}

.contact-box p {
    margin: 0.5rem 0;
}

.contact-box a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-box a:hover,
.contact-box a:focus {
    text-decoration: underline;
}

/* Quick Nav (Table of Contents) */
.terms-toc {
    background: var(--off-white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 3rem;
}

.terms-toc h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--dark);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.toc-list a:hover,
.toc-list a:focus {
    background: var(--primary-glass);
    color: var(--primary);
}

.toc-list .toc-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */
@media (max-width: 768px) {
    .terms-hero {
        padding: 3rem 0;
    }

    .terms-content {
        padding: 3rem 0;
    }

    .terms-section h2 {
        font-size: 1.3rem;
    }

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

    .company-info,
    .terms-toc,
    .appendix-section,
    .acknowledgment-box {
        padding: 1.5rem;
    }

    .appendix-section li {
        flex-direction: column;
        gap: 0.25rem;
    }

    .appendix-section li strong {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .terms-hero h1 {
        font-size: 1.75rem;
    }

    .section-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .terms-section h2 {
        font-size: 1.15rem;
    }

    .terms-section p,
    .terms-section li {
        font-size: 0.95rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .terms-hero::before {
        display: none;
    }

    .terms-hero {
        background: var(--primary);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .terms-toc {
        page-break-after: always;
    }

    .terms-section {
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--gray);
    }
}