/* Terms & Conditions Page Styles */

/* Terms & Conditions Header */
.terms-header {
    width: 100%;
    padding: var(--spacing-3xl) var(--spacing-lg) var(--spacing-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.terms-title {
    color: #FFF;
    text-align: center;
    font-family: Poppins, sans-serif;
    font-size: 36px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin: 0;
}

/* Terms & Conditions Section */
.terms-section {
    width: 100%;
    padding: 0 var(--spacing-lg) var(--spacing-3xl);
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.7) 15%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    min-height: 100vh;
}

.terms-content {
    max-width: 900px;
    width: 100%;
    color: #FFF;
    font-family: Poppins, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.8;
    text-align: left;
    padding: 15px;
}

.terms-content h2 {
    color: #FFF;
    font-family: Poppins, sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-top: 48px;
    margin-bottom: 20px;
    margin-left: 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Indent definition items (a, b, c, etc.) under sections like "3. DEFINITIONS" */
/* Target paragraphs that contain definition patterns (em strong starting with letter) */
.terms-content p em strong:first-child {
    display: inline;
}

/* Indent definition paragraphs - paragraphs following h2 that contain em strong pattern */
/* This indents paragraphs like "a) "Collective Action"" under section 3 */
.terms-content h2 + p,
.terms-content h2 + p + p,
.terms-content h2 + p + p + p,
.terms-content h2 + p + p + p + p,
.terms-content h2 + p + p + p + p + p,
.terms-content h2 + p + p + p + p + p + p,
.terms-content h2 + p + p + p + p + p + p + p,
.terms-content h2 + p + p + p + p + p + p + p + p {
    margin-left: 24px;
}

/* Reset indentation for paragraphs that don't contain definition pattern (no em strong) */
.terms-content h2 + p:not(:has(em strong)),
.terms-content h2 + p + p:not(:has(em strong)),
.terms-content h2 + p + p + p:not(:has(em strong)),
.terms-content h2 + p + p + p + p:not(:has(em strong)) {
    margin-left: 0;
}

/* Add spacing before next h2 section - ensure content has bottom margin */
.terms-content > p:last-child,
.terms-content > ol:last-child,
.terms-content > ul:last-child,
.terms-content > h3:last-child {
    margin-bottom: 32px;
}

/* Ensure spacing between content blocks and next h2 */
.terms-content p + h2,
.terms-content ol + h2,
.terms-content ul + h2,
.terms-content h3 + h2 {
    margin-top: 48px;
}

.terms-content h3 {
    color: #FFF;
    font-family: Poppins, sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    margin-left: 0;
}

.terms-content p {
    margin-bottom: 16px;
    margin-left: 0;
    color: #E1E5EA;
    text-align: left;
}

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

.terms-content > p {
    margin-left: 0;
}

.terms-content h3 + p {
    margin-left: 0;
}

.terms-content ul,
.terms-content ol {
    margin-bottom: 20px;
    margin-left: 24px;
    padding-left: 24px;
    color: #E1E5EA;
}

.terms-content ol[type="a"] {
    list-style-type: lower-alpha;
    margin-left: 32px;
}

.terms-content ol[type="i"] {
    list-style-type: lower-roman;
    margin-left: 32px;
}

.terms-content li {
    margin-bottom: 12px;
    color: #E1E5EA;
    line-height: 1.8;
    padding-left: 8px;
}

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

.terms-content ol ol,
.terms-content ul ul,
.terms-content ol ul,
.terms-content ul ol {
    margin-top: 8px;
    margin-bottom: 8px;
    margin-left: 40px;
    padding-left: 20px;
}

/* Better spacing for subsections */
.terms-content h3 + ol,
.terms-content h3 + ul {
    margin-top: 8px;
}

/* Indentation for content under subsections */
.terms-content h3 + p {
    margin-left: 0;
}

/* Better spacing between list items and paragraphs */
.terms-content p + ol,
.terms-content p + ul {
    margin-top: 8px;
}

.terms-content ol + p,
.terms-content ul + p {
    margin-top: 16px;
}

.terms-content a {
    color: #47FFFF;
    text-decoration: underline;
}

.terms-content a:hover {
    color: #1F59F9;
}

.terms-content strong {
    font-weight: 600;
    color: #FFF;
}

.terms-content em {
    font-style: italic;
}

.terms-placeholder {
    text-align: center;
    color: #989CAF;
    font-style: italic;
}

/* Responsive Design for Terms */
@media (max-width: 768px) {
    .terms-header {
        padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-lg);
    }
    
    .terms-section {
        padding: 0 var(--spacing-md) var(--spacing-2xl);
    }
    
    .terms-title {
        font-size: var(--font-size-2xl);
        margin: 0;
        width: 30%;
        left: 20%;
    }
    
    .terms-content {
        max-width: 100%;
        font-size: 14px;
        line-height: 1.7;
        padding: 15px;
    }
    
    .terms-content h2 {
        font-size: 20px;
        margin-top: 36px;
        margin-bottom: 16px;
        padding-top: 20px;
    }
    
    .terms-content h3 {
        font-size: 16px;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    
    .terms-content p {
        margin-bottom: 14px;
    }
    
    /* Indent definition paragraphs on mobile */
    .terms-content h2 + p,
    .terms-content h2 + p + p,
    .terms-content h2 + p + p + p,
    .terms-content h2 + p + p + p + p,
    .terms-content h2 + p + p + p + p + p,
    .terms-content h2 + p + p + p + p + p + p,
    .terms-content h2 + p + p + p + p + p + p + p,
    .terms-content h2 + p + p + p + p + p + p + p + p {
        margin-left: 20px;
    }
    
    .terms-content ul,
    .terms-content ol {
        margin-left: 20px;
        padding-left: 20px;
        margin-bottom: 16px;
    }
    
    .terms-content ol[type="a"],
    .terms-content ol[type="i"] {
        margin-left: 24px;
    }
    
    .terms-content li {
        margin-bottom: 10px;
        padding-left: 6px;
    }
}

