/* Terms of Service - Official Legal Document Styling */

.terms-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--bg);
    box-sizing: border-box;
}

/* Header Styling */
.terms-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 40px 30px;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.08), rgba(56, 189, 248, 0.05));
    border: 2px solid var(--border);
    border-radius: 16px;
    position: relative;
}

.terms-header::before,
.terms-header::after {
    content: "\2696";
    position: absolute;
    font-size: 24px;
    color: var(--accent);
    opacity: 0.6;
}

.terms-header::before {
    top: 15px;
    left: 20px;
}

.terms-header::after {
    bottom: 15px;
    right: 20px;
}

.terms-header h1 {
    font-family: "Times New Roman", "Garamond", "Georgia", serif;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body[data-theme="light"] .terms-header h1 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.terms-updated {
    color: var(--accent);
    font-size: 15px;
    font-family: "Georgia", "Cambria", serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 24px;
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 8px;
    display: inline-block;
}

/* Content Layout */
.terms-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
}

/* Section Styling - Official Document Style */
.terms-section {
    padding: 32px 36px;
    border-radius: 0;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: rgba(255, 255, 255, 0.015);
    transition: all 300ms ease;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
}

.terms-section::before {
    content: "SECTION";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--accent);
    color: white;
    font-family: "Impact", "Oswald", "Arial Black", sans-serif;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.terms-section:hover {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: #38bdf8;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .terms-section {
    background: rgba(0, 0, 0, 0.015);
    border-color: rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .terms-section:hover {
    background: rgba(0, 0, 0, 0.03);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* Section Headings */
.terms-section h2 {
    font-family: "Georgia", "Cambria", "Times New Roman", serif;
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 8px;
    color: var(--text);
    letter-spacing: 0.5px;
    text-transform: none;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(220, 20, 60, 0.2);
}

/* Paragraph Text */
.terms-section p {
    font-family: "Arial", "Helvetica Neue", Helvetica, sans-serif;
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--muted);
    margin: 0;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* Special styling for Hacker Kit sections (24-30) */
.terms-section:nth-child(n+24):nth-child(-n+30) {
    border-left-color: #38bdf8;
    background: rgba(56, 189, 248, 0.02);
}

.terms-section:nth-child(n+24):nth-child(-n+30)::before {
    background: #38bdf8;
    content: "HACKER KIT";
    font-family: "Courier New", "Consolas", monospace;
    font-size: 10px;
    letter-spacing: 2px;
}

.terms-section:nth-child(n+24):nth-child(-n+30) h2 {
    color: #38bdf8;
    border-bottom-color: rgba(56, 189, 248, 0.3);
}

/* Contact section special */
.terms-section:last-child {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.03);
}

.terms-section:last-child::before {
    background: #10b981;
    content: "CONTACT";
    font-family: "Verdana", "Geneva", sans-serif;
    font-size: 10px;
    letter-spacing: 2px;
}

.terms-section:last-child h2 {
    color: #10b981;
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

/* Scroll-Triggered Professional Animations */
.terms-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out, background 0.3s ease, border-left-color 0.3s ease, box-shadow 0.3s ease;
}

.terms-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for smooth cascade effect */
.terms-section.is-visible:nth-child(1) { transition-delay: 0s; }
.terms-section.is-visible:nth-child(2) { transition-delay: 0.08s; }
.terms-section.is-visible:nth-child(3) { transition-delay: 0.16s; }
.terms-section.is-visible:nth-child(4) { transition-delay: 0.24s; }
.terms-section.is-visible:nth-child(5) { transition-delay: 0.32s; }
.terms-section.is-visible:nth-child(6) { transition-delay: 0.4s; }
.terms-section.is-visible:nth-child(7) { transition-delay: 0.48s; }
.terms-section.is-visible:nth-child(8) { transition-delay: 0.56s; }
.terms-section.is-visible:nth-child(9) { transition-delay: 0.64s; }
.terms-section.is-visible:nth-child(10) { transition-delay: 0.72s; }
.terms-section.is-visible:nth-child(11) { transition-delay: 0.8s; }
.terms-section.is-visible:nth-child(12) { transition-delay: 0.88s; }
.terms-section.is-visible:nth-child(13) { transition-delay: 0.96s; }
.terms-section.is-visible:nth-child(14) { transition-delay: 1.04s; }
.terms-section.is-visible:nth-child(15) { transition-delay: 1.12s; }
.terms-section.is-visible:nth-child(16) { transition-delay: 1.2s; }
.terms-section.is-visible:nth-child(17) { transition-delay: 1.28s; }
.terms-section.is-visible:nth-child(18) { transition-delay: 1.36s; }
.terms-section.is-visible:nth-child(19) { transition-delay: 1.44s; }
.terms-section.is-visible:nth-child(20) { transition-delay: 1.52s; }
.terms-section.is-visible:nth-child(21) { transition-delay: 1.6s; }
.terms-section.is-visible:nth-child(22) { transition-delay: 1.68s; }
.terms-section.is-visible:nth-child(23) { transition-delay: 1.76s; }
.terms-section.is-visible:nth-child(24) { transition-delay: 1.84s; }
.terms-section.is-visible:nth-child(25) { transition-delay: 1.92s; }
.terms-section.is-visible:nth-child(26) { transition-delay: 2s; }
.terms-section.is-visible:nth-child(27) { transition-delay: 2.08s; }
.terms-section.is-visible:nth-child(28) { transition-delay: 2.16s; }
.terms-section.is-visible:nth-child(29) { transition-delay: 2.24s; }
.terms-section.is-visible:nth-child(30) { transition-delay: 2.32s; }
.terms-section.is-visible:nth-child(31) { transition-delay: 2.4s; }

/* Header animation on load */
.terms-header {
    opacity: 0;
    animation: headerFadeIn 0.8s ease-out forwards;
}

@keyframes headerFadeIn {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Professional hover - subtle only */
.terms-section.is-visible:hover {
    border-left-width: 6px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
}

/* Responsive - Mobile Full Width */
@media (max-width: 768px) {
    .terms-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .terms-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .terms-header {
        width: calc(100% - 32px) !important;
        max-width: calc(100% - 32px) !important;
        padding: 30px 16px !important;
        margin: 16px !important;
        border-radius: 12px !important;
        box-sizing: border-box !important;
    }
    
    .terms-header h1 {
        font-size: 26px !important;
        letter-spacing: 2px !important;
    }
    
    .terms-section {
        width: 100% !important;
        max-width: 100% !important;
        padding: 24px 16px !important;
        margin: 0 0 8px 0 !important;
        border-radius: 0 !important;
        border-left-width: 4px !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .terms-section p {
        font-size: 14px !important;
        line-height: 1.7 !important;
        text-align: left !important;
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    .terms-section h2 {
        font-size: 17px !important;
        width: 100% !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .terms-section::before {
        left: 16px !important;
    }
}

@media (max-width: 480px) {
    .terms-container {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .terms-header {
        padding: 24px 12px !important;
        margin: 12px !important;
        width: calc(100% - 24px) !important;
    }
    
    .terms-header::before,
    .terms-header::after {
        display: none !important;
    }
    
    .terms-header h1 {
        font-size: 22px !important;
        letter-spacing: 1px !important;
    }
    
    .terms-section {
        padding: 20px 12px !important;
        border-left-width: 3px !important;
    }
    
    .terms-section::before {
        font-size: 9px !important;
        padding: 3px 8px !important;
        left: 12px !important;
    }
    
    .terms-updated {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }
}
