/* Legal Pages Styling - Privacy Policy and Terms of Use */

/* Legal Header */
.legal-header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1e3c72 100%);
    color: white;
    padding: 120px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.legal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="legal-pattern" width="15" height="15" patternUnits="userSpaceOnUse"><circle cx="7.5" cy="7.5" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23legal-pattern)"/></svg>');
}

.legal-header .header-content {
    position: relative;
    z-index: 2;
}

.legal-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    animation: slideInDown 0.8s ease;
}

.legal-header p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
    animation: slideInUp 0.8s ease 0.2s both;
}

.breadcrumb {
    animation: slideInUp 0.8s ease 0.4s both;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #ffd700;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 10px;
    opacity: 0.7;
}

.last-updated {
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    animation: slideInUp 0.8s ease 0.6s both;
}

/* Legal Main Content */
.legal-main {
    padding: 60px 0;
    background: #f8f9fa;
}

.legal-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.legal-document {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Table of Contents */
.table-of-contents {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 30px;
    border-bottom: 2px solid #dee2e6;
}

.table-of-contents h2 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: #495057;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.table-of-contents a:hover {
    background: #e3f2fd;
    color: #2c5aa0;
    border-left-color: #2c5aa0;
    transform: translateX(5px);
}

/* Legal Sections */
.legal-section {
    padding: 40px;
    border-bottom: 1px solid #e9ecef;
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    color: #2c5aa0;
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e3f2fd;
    position: relative;
}

.legal-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: #2c5aa0;
}

.legal-section h3 {
    color: #495057;
    font-size: 1.3rem;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.legal-section h4 {
    color: #2c5aa0;
    font-size: 1.1rem;
    margin: 20px 0 10px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-section p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #495057;
    text-align: justify;
}

.legal-section ul {
    margin-bottom: 20px;
    padding-left: 0;
}

.legal-section li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    line-height: 1.7;
    color: #495057;
}

.legal-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

.legal-section strong {
    color: #2c5aa0;
    font-weight: 600;
}

/* Contact Details in Legal Pages */
.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
    align-items: start;
    justify-items: stretch;
}

.contact-method {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #2c5aa0;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-method:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.15);
}

.contact-method h4 {
    color: #2c5aa0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-method p {
    margin: 0;
    color: #495057;
    line-height: 1.6;
}

/* Legal Sidebar */
.legal-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-5px);
}

.sidebar-widget h3 {
    color: #2c5aa0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

.quick-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-info li {
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
    position: relative;
    padding-left: 25px;
}

.quick-info li:last-child {
    border-bottom: none;
}

.quick-info li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2c5aa0;
    font-weight: bold;
    font-size: 1.2rem;
}

.rights-list,
.legal-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rights-list li,
.legal-links li {
    margin-bottom: 10px;
}

.rights-list a,
.legal-links a {
    color: #495057;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
    border-left: 3px solid transparent;
}

.rights-list a:hover,
.legal-links a:hover {
    background: #e3f2fd;
    color: #2c5aa0;
    border-left-color: #2c5aa0;
    transform: translateX(5px);
}

/* Print Styles for Legal Pages */
@media print {
    .legal-header,
    .legal-sidebar,
    .table-of-contents {
        display: none;
    }
    
    .legal-content {
        grid-template-columns: 1fr;
    }
    
    .legal-document {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .legal-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .legal-section h2 {
        page-break-after: avoid;
    }
}

/* Responsive Design for Legal Pages */
@media (max-width: 1024px) {
    .legal-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .legal-sidebar {
        order: -1;
    }
    
    .table-of-contents ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .legal-header {
        padding: 100px 0 40px;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-section {
        padding: 25px;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .contact-details {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 25px 0;
    }
    
    .contact-method {
        padding: 20px;
        text-align: left;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .legal-header {
        padding: 90px 0 30px;
    }
    
    .legal-header h1 {
        font-size: 1.5rem;
    }
    
    .table-of-contents {
        padding: 20px;
    }
    
    .legal-section {
        padding: 20px;
    }
    
    .legal-section h2 {
        font-size: 1.3rem;
    }
    
    .legal-section p {
        text-align: left;
    }
}

/* Smooth Scroll Behavior for Legal Page Navigation */
html {
    scroll-behavior: smooth;
}

/* Highlight target section when navigating via table of contents */
.legal-section:target {
    background: linear-gradient(90deg, #e3f2fd 0%, transparent 100%);
    animation: highlight-section 2s ease-out;
}

@keyframes highlight-section {
    0% {
        background: linear-gradient(90deg, #e3f2fd 0%, transparent 100%);
    }
    100% {
        background: transparent;
    }
}

/* Accessibility Improvements */
.legal-section a {
    color: #2c5aa0;
    text-decoration: underline;
}

.legal-section a:hover {
    color: #1e3c72;
    text-decoration: none;
}

.legal-section a:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Enhanced Typography for Better Readability */
.legal-section {
    font-size: 1rem;
    line-height: 1.8;
}

.legal-section h2 {
    line-height: 1.3;
}

.legal-section h3 {
    line-height: 1.4;
}

.legal-section h4 {
    line-height: 1.4;
}

/* Loading Animation for Legal Pages */
.legal-document {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
