/* Import base styles from index.css */
@import url('index.css');

/* Terms Page Specific Styles */
.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    text-align: center;
}

.page-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Section */
.content-section {
    padding: 80px 0;
    background: #f8fafc;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Main Content */
.main-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.terms-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

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

.terms-section h2 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    padding-top: 1rem;
}

.terms-section p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.terms-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.terms-section li {
    color: #475569;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.terms-section strong {
    color: #1e293b;
    font-weight: 600;
}

.contact-info {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.toc-content h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.toc-list {
    list-style: none;
    margin-bottom: 2rem;
}

.toc-list li {
    margin-bottom: 0.75rem;
}

.toc-list a {
    color: #475569;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toc-list a:hover {
    background: #f1f5f9;
    color: #ff6b6b;
    transform: translateX(5px);
}

.toc-list a.active {
    background: #ff6b6b;
    color: white;
}

/* TOC Actions */
.toc-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toc-actions .btn {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
}

.search-container {
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-container i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

/* Responsive Design for Terms Page */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .toc-sidebar {
        position: static;
        order: -1;
    }
    
    .toc-content {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }
    
    .content-section {
        padding: 60px 0;
    }
    
    .main-content {
        padding: 2rem;
    }
    
    .terms-section {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .terms-section h2 {
        font-size: 1.3rem;
    }
    
    .toc-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .terms-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }
    
    .terms-section h2 {
        font-size: 1.2rem;
    }
    
    .toc-content {
        padding: 1rem;
    }
    
    .toc-list a {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .toc-sidebar,
    .footer {
        display: none;
    }
    
    .page-header {
        background: white !important;
        color: black !important;
        padding: 20px 0;
    }
    
    .page-header h1 {
        color: black !important;
    }
    
    .page-header p {
        color: black !important;
    }
    
    .content-section {
        background: white;
        padding: 0;
    }
    
    .main-content {
        box-shadow: none;
        padding: 0;
    }
    
    .terms-section {
        page-break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .terms-section h2 {
        color: black;
        border-bottom: 2px solid #ccc;
        padding-bottom: 0.5rem;
    }
    
    .terms-section p,
    .terms-section li {
        color: black;
    }
    
    .contact-info {
        background: #f0f0f0;
        border: 1px solid #ccc;
    }
}

/* Accessibility Improvements */
.toc-list a:focus {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}

.search-container input:focus + i {
    color: #ff6b6b;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #ff6b6b;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1001;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .terms-section h2 {
        border-bottom: 3px solid #000;
    }
    
    .toc-list a.active {
        background: #000;
        color: #fff;
    }
    
    .search-container input:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .toc-list a {
        transition: none;
    }
    
    .toc-list a:hover {
        transform: none;
    }
    
    .search-container input {
        transition: none;
    }
}
