/* Terms Pages Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Only apply light background to terms pages */
body.terms-page {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
}

.terms-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.terms-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #1866b6;
}

.terms-header h1 {
    font-size: 2.5rem;
    color: #2B2B2B;
    margin-bottom: 10px;
    font-weight: 700;
}

.last-updated {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.terms-content {
    margin-bottom: 40px;
}

.terms-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 6px;
    border-left: 4px solid #1866b6;
}

.terms-section h2 {
    font-size: 1.5rem;
    color: #2B2B2B;
    margin-bottom: 15px;
    font-weight: 600;
}

.terms-section h3 {
    font-size: 1.25rem;
    color: #1866b6;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.terms-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #555;
}

.terms-section ul,
.terms-section ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.terms-section li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #555;
}

.terms-section li strong {
    color: #2B2B2B;
    font-weight: 600;
}

.contact-info {
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
}

.contact-info p {
    margin-bottom: 8px;
    color: #495057;
}

.contact-info strong {
    color: #2B2B2B;
}

.terms-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
    color: #666;
    font-size: 0.9rem;
}

.footer-policies {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
}

.footer-policies a {
    display: block;
    margin-bottom: 8px;
    color: #a8a8a8;
    text-decoration: none;
}

.footer-policies a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.compliance-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease-out;
}

.compliance-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    margin: 20px;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(135deg, #1866b6, #2B2B2B);
    color: white;
    padding: 20px 25px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
}

.modal-header .last-updated {
    margin-top: 8px;
    opacity: 0.9;
    font-size: 0.9rem;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.modal-body .terms-section {
    margin-bottom: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1866b6;
}

.modal-body h3 {
    font-size: 1.2rem;
    color: #1866b6;
    margin-top: 15px;
    margin-bottom: 8px;
    font-weight: 600;
}

.modal-body h4 {
    font-size: 1.1rem;
    color: #2B2B2B;
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 600;
}

.modal-footer {
    padding: 20px 25px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #1866b6;
    color: white;
}

.btn-primary:hover {
    background-color: #145a9e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(24, 102, 182, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

/* Custom Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .terms-container {
        margin: 10px;
        padding: 15px;
        border-radius: 6px;
    }
    
    .terms-header h1 {
        font-size: 2rem;
    }
    
    .terms-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .terms-section h2 {
        font-size: 1.3rem;
    }
    
    .terms-section h3 {
        font-size: 1.15rem;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 95vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
        padding-right: 40px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 160px);
    }
    
    .modal-body .terms-section {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .contact-info {
        padding: 15px;
    }
    
    .terms-section ul,
    .terms-section ol {
        margin-left: 15px;
    }
}

@media screen and (max-width: 480px) {
    .terms-header h1 {
        font-size: 1.8rem;
    }
    
    .terms-section h2 {
        font-size: 1.2rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .terms-section {
        padding: 12px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-body .terms-section {
        padding: 10px;
    }
}

/* Large Desktop */
@media screen and (min-width: 1200px) {
    .terms-container {
        max-width: 900px;
        padding: 30px;
    }
    
    .modal-content {
        max-width: 1000px;
    }
    
    .terms-header h1 {
        font-size: 2.8rem;
    }
    
    .terms-section h2 {
        font-size: 1.6rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .terms-section {
        border-left-width: 6px;
        background-color: #ffffff;
    }
    
    .contact-info {
        border: 2px solid #333;
    }
    
    .modal-content {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .compliance-modal {
        animation: none;
    }
    
    .modal-content {
        animation: none;
    }
    
    .btn {
        transition: none;
    }
    
    .modal-close {
        transition: none;
    }
}

/* Print styles */
@media print {
    .modal-header,
    .modal-footer {
        display: none;
    }
    
    .modal-body {
        max-height: none;
        overflow: visible;
    }
    
    .terms-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
