/* Legal Pages Specific Styles */

/* Legal Header */
.legal-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: var(--white);
    padding: 120px 0 60px;
    text-align: center;
}

.legal-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-header .breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.legal-header .breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.legal-header .breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.legal-header .breadcrumb span {
    color: var(--accent-yellow);
    font-weight: 600;
}

.legal-header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--white), var(--bright-yellow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.last-updated {
    font-size: 1.1rem;
    opacity: 0.8;
    font-style: italic;
}

/* Legal Content */
.legal-content {
    padding: 80px 0;
    background: var(--white);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

/* Table of Contents */
.table-of-contents {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.table-of-contents h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-yellow);
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 8px;
    display: block;
    transition: all 0.3s ease;
}

.table-of-contents a:hover {
    background: var(--white);
    color: var(--primary-green);
    box-shadow: 0 2px 8px var(--shadow);
    transform: translateX(5px);
}

/* Legal Text Content */
.legal-text {
    line-height: 1.8;
    color: var(--text-dark);
}

.legal-text section {
    margin-bottom: 50px;
    scroll-margin-top: 100px;
}

.legal-text h2 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary-green);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-yellow);
}

.legal-text h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 30px 0 15px;
}

.legal-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-green);
    margin: 20px 0 10px;
}

.legal-text p {
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.8;
}

.legal-text ul,
.legal-text ol {
    margin: 20px 0;
    padding-left: 30px;
}

.legal-text li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-text strong {
    color: var(--primary-green);
    font-weight: 700;
}

.legal-text em {
    color: var(--primary-green);
    font-style: italic;
}

/* Contact Details in Legal Pages */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
    padding: 30px;
    background: var(--light-gray);
    border-radius: 15px;
}

.contact-method {
    text-align: center;
    padding: 20px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow);
    transition: all 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-hover);
}

.contact-method h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.contact-method h4 i {
    color: var(--accent-yellow);
    font-size: 1.2rem;
}

.contact-method p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Special Styling for Important Sections */
.legal-text section#acceptance,
.legal-text section#contact {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--accent-yellow);
}

/* Highlighting for Legal Disclaimers */
.legal-text section#disclaimers,
.legal-text section#limitation-liability {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 25px;
    border-radius: 10px;
    border-left: 5px solid #f39c12;
}

.legal-text section#disclaimers h2,
.legal-text section#limitation-liability h2 {
    color: #d68910;
    border-bottom-color: #f39c12;
}

/* Special formatting for capitalized legal text */
.legal-text p:has-text("TO THE MAXIMUM EXTENT") {
    font-weight: 600;
    color: var(--primary-green);
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin: 25px 0;
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .table-of-contents {
        position: static;
        max-height: none;
        order: 2;
        margin-top: 40px;
    }
    
    .legal-text {
        order: 1;
    }
}

@media (max-width: 768px) {
    .legal-header {
        padding: 100px 0 40px;
    }
    
    .legal-header h1 {
        font-size: 2.5rem;
    }
    
    .legal-content {
        padding: 60px 0;
    }
    
    .content-wrapper {
        gap: 30px;
    }
    
    .table-of-contents {
        padding: 20px;
    }
    
    .legal-text h2 {
        font-size: 1.8rem;
    }
    
    .legal-text h3 {
        font-size: 1.3rem;
    }
    
    .contact-details {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .table-of-contents a {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-content {
        padding: 40px 0;
    }
    
    .table-of-contents {
        padding: 15px;
    }
    
    .legal-text section {
        margin-bottom: 30px;
    }
    
    .legal-text h2 {
        font-size: 1.6rem;
    }
    
    .legal-text p,
    .legal-text li {
        font-size: 0.95rem;
    }
    
    .contact-method {
        padding: 15px;
    }
    
    .legal-text section#acceptance,
    .legal-text section#contact,
    .legal-text section#disclaimers,
    .legal-text section#limitation-liability {
        padding: 20px;
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .table-of-contents,
    .footer {
        display: none;
    }
    
    .legal-header {
        background: none;
        color: black;
        padding: 20px 0;
    }
    
    .legal-header h1 {
        color: black;
        background: none;
        -webkit-text-fill-color: initial;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .legal-text {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .legal-text h2 {
        color: black;
        border-bottom: 2px solid black;
        page-break-after: avoid;
    }
    
    .legal-text h3 {
        color: black;
        page-break-after: avoid;
    }
    
    .legal-text section {
        page-break-inside: avoid;
        margin-bottom: 30px;
    }
}

/* Accessibility Improvements */
.table-of-contents a:focus,
.legal-text a:focus {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Selection styling */
::selection {
    background: var(--accent-yellow);
    color: var(--primary-green);
}

::-moz-selection {
    background: var(--accent-yellow);
    color: var(--primary-green);
}

/* Enhanced link styling within legal text */
.legal-text a {
    color: var(--primary-green);
    text-decoration: underline;
    transition: all 0.3s ease;
}

.legal-text a:hover {
    color: var(--light-green);
    text-decoration-color: var(--accent-yellow);
}

/* Custom scrollbar for table of contents */
.table-of-contents::-webkit-scrollbar {
    width: 6px;
}

.table-of-contents::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.table-of-contents::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.table-of-contents::-webkit-scrollbar-thumb:hover {
    background: var(--light-green);
}
