/* ==========================================
   TERMS OF SERVICE PAGE - CUSTOM CSS
   ==========================================
   
   This CSS file contains all styling for the 
   Terms of Service page.
   
   File Structure:
   1. Global & Reset Styles
   2. Main Container Styles
   3. Corner Triangle Styles
   4. Terms Card Styles
   5. Content Styles
   6. Agreement Section Styles
   7. Responsive Design Styles
   
========================================== */

/* ==========================================
   1. GLOBAL & RESET STYLES
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

/* ==========================================
   2. MAIN CONTAINER STYLES
========================================== */

/* Terms Container */
.terms-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ==========================================
   3. CORNER TRIANGLE STYLES
========================================== */

/* Corner Triangle Base */
.corner-triangle {
    position: fixed;
    width: 0;
    height: 0;
    z-index: 1;
}

/* Top Left Triangle */
.top-left {
    top: 0;
    left: 0;
    border-style: solid;
    border-width: 200px 200px 0 0;
    border-color: #dc3545 transparent transparent transparent;
}

/* Bottom Right Triangle */
.bottom-right {
    bottom: 0;
    right: 0;
    border-style: solid;
    border-width: 0 0 200px 200px;
    border-color: transparent transparent #2c3e50 transparent;
}

/* Logo Section in Top Left Triangle */
.logo-section {
    position: absolute;
    top: -160px;
    left: 25px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.matarix-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    max-width: 100%;
}

.matarix-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* ==========================================
   4. TERMS CARD STYLES
========================================== */

/* Terms Card Container */
.terms-card {
    background-color: #e8e8e8;
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    padding: 0;
    position: relative;
    z-index: 10;
    margin: 40px 20px;
}

/* Terms Header */
.terms-header {
    background-color: transparent;
    padding: 30px 40px 20px 40px;
    text-align: center;
}

.terms-title {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin: 0;
    letter-spacing: 2px;
}

/* ==========================================
   5. CONTENT STYLES
========================================== */

/* Terms Content Container */
.terms-content {
    padding: 0 40px 20px 40px;
}

/* Terms Section */
.terms-section {
    margin-bottom: 20px;
}

/* Introduction Text */
.terms-intro {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Section Number Headers */
.section-number {
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    text-decoration: underline;
}

/* Section Text */
.section-text {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Last Updated Text */
.terms-last-updated {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    text-align: right;
    font-style: italic;
}

/* Section Lists */
.section-list {
    margin-left: 20px;
    margin-bottom: 10px;
    padding-left: 20px;
}

.section-list li {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Contact Email Link */
.contact-email {
    color: #dc3545;
    text-decoration: none;
    font-weight: 500;
}

.contact-email:hover {
    color: #c82333;
    text-decoration: underline;
}

/* ==========================================
   6. AGREEMENT SECTION STYLES
========================================== */

/* Agreement Section Container */
.agreement-section {
    padding: 30px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* Agreement Checkbox Container */
.agreement-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Terms Checkbox */
.terms-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #dc3545;
}

/* Checkbox Label */
.checkbox-label {
    font-size: 15px;
    color: #2c3e50;
    cursor: pointer;
    margin: 0;
    font-weight: 500;
}

/* Terms Link */
.terms-link {
    color: #dc3545;
    text-decoration: underline;
    font-weight: 600;
}

.terms-link:hover {
    color: #c82333;
}

/* Hide any Complete Registration button completely */
.complete-registration-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Back Button - Always visible */
.back-button,
#backToRegistration {
    background-color: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 12px 30px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: center !important;
    position: relative !important;
}

.back-button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    color: white;
}

.back-button i {
    margin-right: 8px;
}

/* Terms Checkbox Label (for pages) */
.terms-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: #2c3e50;
    font-weight: 500;
    user-select: none;
}

.terms-checkbox-label .terms-checkbox {
    display: none;
}

.terms-checkbox-label .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #dc3545;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
    background-color: white;
    flex-shrink: 0;
}

.terms-checkbox-label .terms-checkbox:checked + .checkbox-custom {
    background-color: #dc3545;
    border-color: #dc3545;
}

.terms-checkbox-label .terms-checkbox:checked + .checkbox-custom::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.terms-checkbox-label .checkbox-text {
    flex: 1;
}

.terms-link-text {
    color: #dc3545;
    text-decoration: underline;
    font-weight: 600;
}

.terms-link-text:hover {
    color: #c82333;
}

/* ==========================================
   7. RESPONSIVE DESIGN STYLES
========================================== */

/* Tablet Styles */
@media (max-width: 992px) {
    .terms-card {
        max-width: 90%;
        margin: 20px 10px;
    }
    
    .terms-header {
        padding: 25px 30px 15px 30px;
    }
    
    .terms-title {
        font-size: 28px;
    }
    
    .terms-content {
        padding: 0 30px 15px 30px;
    }
    
    .agreement-section {
        padding: 25px 30px 35px 30px;
    }
    
    /* Adjust triangle size for tablets */
    .top-left {
        border-width: 150px 150px 0 0;
    }
    
    .top-left::after {
        top: -146px;
        width: 210px;
        height: 4px;
    }
    
    .bottom-right {
        border-width: 0 0 150px 150px;
    }
    
    .logo-section {
        top: -125px;
        left: 20px;
    }
    
    .matarix-logo {
        width: 80px;
        height: 80px;
    }
    
    .matarix-text {
        font-size: 16px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .terms-container {
        padding: 10px;
    }
    
    .terms-card {
        max-width: 95%;
        margin: 10px 5px;
    }
    
    .terms-header {
        padding: 20px 25px 10px 25px;
    }
    
    .terms-title {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .terms-content {
        padding: 0 25px 10px 25px;
    }
    
    .agreement-section {
        padding: 20px 25px 30px 25px;
        gap: 20px;
    }
    
    .agreement-checkbox {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .checkbox-label {
        font-size: 14px;
    }
    
    
    /* Smaller triangles for mobile */
    .top-left {
        border-width: 100px 100px 0 0;
    }
    
    .top-left::after {
        top: -97px;
        width: 140px;
        height: 3px;
    }
    
    .bottom-right {
        border-width: 0 0 100px 100px;
    }
    
    .logo-section {
        top: -85px;
        left: 15px;
    }
    
    .matarix-logo {
        width: 80px;
        height: 80px;
    }
    
    .matarix-text {
        font-size: 14px;
    }
}

/* Small Mobile Styles */
@media (max-width: 576px) {
    .terms-header {
        padding: 15px 20px 10px 20px;
    }
    
    .terms-title {
        font-size: 20px;
    }
    
    .terms-content {
        padding: 0 20px 10px 20px;
    }
    
    .agreement-section {
        padding: 15px 20px 25px 20px;
    }
    
    .terms-intro,
    .section-number,
    .section-text {
        font-size: 13px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    /* Even smaller triangles for small mobile */
    .top-left {
        border-width: 80px 80px 0 0;
    }
    
    .top-left::after {
        top: -77px;
        width: 110px;
        height: 2px;
    }
    
    .bottom-right {
        border-width: 0 0 80px 80px;
    }
    
    .logo-section {
        top: -68px;
        left: 12px;
    }
    
    .matarix-logo {
        width: 80px;
        height: 80px;
    }
    
    .matarix-text {
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .corner-triangle {
        display: none;
    }
    
    .terms-container {
        padding: 0;
    }
    
    .terms-card {
        box-shadow: none;
        max-width: 100%;
        margin: 0;
    }
    
    body {
        background-color: white;
    }
}