/* Legal Pages CSS - Enhanced styling for all legal documentation pages */

/* Hero Section for Legal Pages */
.legal-hero {
    position: relative;
    height: 100vh;
    min-height: clamp(450px, 60vh, 500px);
    background: linear-gradient(135deg, #ff4500 0%, #ff6b00 25%, #ff9500 50%, #ffb800 75%, #ffd700 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.legal-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 25% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 70%, rgba(255, 255, 255, 0.12) 0%, transparent 65%),
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 70%),
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    animation: floatPattern 25s ease-in-out infinite alternate;
}

.legal-hero::after {
    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="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: gridMove 30s linear infinite;
}

@keyframes floatPattern {
    0% { 
        transform: translateY(0px) scale(1) rotate(0deg); 
        opacity: 0.4;
    }
    25% { 
        transform: translateY(-15px) scale(1.05) rotate(1deg); 
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-25px) scale(1.1) rotate(0deg); 
        opacity: 0.5;
    }
    75% { 
        transform: translateY(-10px) scale(1.08) rotate(-1deg); 
        opacity: 0.7;
    }
    100% { 
        transform: translateY(-5px) scale(1.03) rotate(0deg); 
        opacity: 0.5;
    }
}

@keyframes gridMove {
    0% { 
        transform: translateX(0) translateY(0);
    }
    100% { 
        transform: translateX(-10px) translateY(-10px);
    }
}

.legal-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(0, 0, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.legal-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.legal-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.8s ease-out;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.legal-subtitle {
    font-size: 1.4rem;
    font-weight: 300;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
    animation: slideInUp 0.8s ease-out 0.2s both;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.01em;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Wave Separator */
.wave-separator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-separator svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 120px;
}

.wave-separator .shape-fill {
    fill: #FFFFFF;
}

/* Legal Content */
.legal-content {
    background: 
        linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    padding: 5rem 0;
    min-height: 60vh;
    position: relative;
}

.legal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 149, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.legal-text {
    background: 
        linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    padding: 4rem;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 25px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(255, 107, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.legal-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff4500, #ff6b00, #ff9500, #ffb800);
    border-radius: 20px 20px 0 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.legal-text h2 {
    color: #ff4500;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    position: relative;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.legal-text h2::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.2) 0%, rgba(255, 107, 0, 0.5) 50%, rgba(255, 107, 0, 0.2) 100%);
}

.legal-text h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #ff4500, #ff6b00, #ff9500);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
}

.legal-text h3 {
    color: #2c3e50;
    font-size: 1.7rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    position: relative;
    padding-left: 1rem;
}

.legal-text h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    width: 4px;
    height: 1.3rem;
    background: linear-gradient(180deg, #ff6b00, #ff9500);
    border-radius: 2px;
}

.legal-text p {
    color: #4a5568;
    line-height: 1.9;
    margin-bottom: 1.8rem;
    font-size: 1.15rem;
    font-weight: 400;
    text-align: justify;
    text-justify: inter-word;
}

.legal-text ul, .legal-text ol {
    color: #4a5568;
    line-height: 1.9;
    margin: 2rem 0;
    padding-left: 0;
    list-style: none;
}

.legal-text ul li, .legal-text ol li {
    margin-bottom: 1rem;
    font-size: 1.15rem;
    position: relative;
    padding-left: 2rem;
    transition: all 0.3s ease;
}

.legal-text ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #ff6b00;
    font-weight: bold;
    font-size: 1.2rem;
}

.legal-text ol {
    counter-reset: legal-counter;
}

.legal-text ol li {
    counter-increment: legal-counter;
}

.legal-text ol li::before {
    content: counter(legal-counter) '.';
    position: absolute;
    left: 0;
    color: #ff6b00;
    font-weight: 600;
    font-size: 1.1rem;
}

.legal-text li:hover {
    color: #2d3748;
    transform: translateX(5px);
}

.legal-text strong {
    color: #2c3e50;
    font-weight: 700;
    background: linear-gradient(120deg, rgba(255, 107, 0, 0.1) 0%, rgba(255, 149, 0, 0.05) 100%);
    padding: 0.1em 0.3em;
    border-radius: 3px;
}

.legal-text a {
    color: #ff6b00;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.2em 0;
}

.legal-text a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b00, #ff9500);
    transition: width 0.3s ease;
}

.legal-text a:hover {
    color: #ff4500;
    transform: translateY(-1px);
}

.legal-text a:hover::after {
    width: 100%;
}

/* FAQ Specific Styles */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.faq-question {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ff6b00 0%, #ff9500 100%);
    color: white;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: linear-gradient(135deg, #ff5500 0%, #ff8500 100%);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
    padding-right: 1rem;
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 1.5rem 2rem;
}

.faq-answer p {
    margin: 0;
    color: #666;
    line-height: 1.7;
    font-size: 1.1rem;
}

.faq-answer a {
    color: #ff6b00;
    text-decoration: none;
    font-weight: 500;
}

.faq-answer a:hover {
    color: #ff9500;
    text-decoration: underline;
}

/* Contact CTA */
.contact-cta {
    background: linear-gradient(135deg, #ff6b00 0%, #ff9500 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 15px;
    margin-top: 3rem;
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.3);
}

.contact-cta h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-btn {
    display: inline-block;
    background: white;
    color: #ff6b00;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

/* Enhanced Legal Document Styles */
.legal-section {
    margin: 3rem 0;
    padding: 2.5rem;
    background: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.8) 100%);
    border-radius: 15px;
    border-left: 5px solid #ff6b00;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.legal-section:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.legal-highlight {
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.1) 0%, rgba(255, 184, 0, 0.05) 100%);
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.legal-highlight::before {
    content: '⚖️';
    position: absolute;
    top: -10px;
    left: 20px;
    background: white;
    padding: 0 10px;
    font-size: 1.2rem;
}

.legal-date {
    color: #718096;
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 2rem;
    text-align: right;
    border-bottom: 1px solid rgba(255, 107, 0, 0.1);
    padding-bottom: 1rem;
}

.legal-contact-box {
    background: linear-gradient(135deg, #ff6b00 0%, #ff9500 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 3rem 0;
    box-shadow: 0 15px 40px rgba(255, 107, 0, 0.2);
    text-align: center;
}

.legal-contact-box h3 {
    color: white !important;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.legal-contact-box a {
    color: white !important;
    text-decoration: underline;
    font-weight: 600;
}

.legal-contact-box a:hover {
    color: #fff3e6 !important;
}

/* Table of Contents */
.legal-toc {
    background: #f7fafc;
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.legal-toc h3 {
    color: #ff6b00 !important;
    margin-bottom: 1rem;
    padding-left: 0 !important;
}

.legal-toc ul {
    list-style: none;
    padding-left: 0;
}

.legal-toc li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 107, 0, 0.1);
}

.legal-toc li:last-child {
    border-bottom: none;
}

.legal-toc a {
    color: #4a5568 !important;
    font-weight: 500;
}

.legal-toc a:hover {
    color: #ff6b00 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .legal-hero {
        height: 75vh;
        min-height: 400px;
    }
    
    .legal-title {
        font-size: 3rem;
    }
    
    .legal-subtitle {
        font-size: 1.2rem;
    }
    
    .legal-text {
        padding: 2.5rem 2rem;
        margin-bottom: 2rem;
        border-radius: 15px;
    }
    
    .legal-text h2 {
        font-size: 2rem;
    }
    
    .legal-text h3 {
        font-size: 1.5rem;
    }
    
    .legal-text p, .legal-text li {
        font-size: 1.1rem;
    }
    
    .legal-section {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }
    
    .faq-question {
        padding: 1.2rem 1.5rem;
    }
    
    .faq-question h3 {
        font-size: 1.1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1.2rem 1.5rem;
    }
    
    .contact-cta {
        padding: 2rem 1.5rem;
    }
    
    .contact-cta h3 {
        font-size: 1.7rem;
    }
    
    .contact-cta p {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .legal-hero {
        height: 65vh;
        min-height: 350px;
    }
    
    .legal-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .legal-subtitle {
        font-size: 1.1rem;
    }
    
    .legal-content {
        padding: 3rem 0;
    }
    
    .legal-text {
        padding: 2rem 1.2rem;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    
    .legal-text h2 {
        font-size: 1.8rem;
    }
    
    .legal-text h3 {
        font-size: 1.4rem;
        margin: 2rem 0 1rem 0;
    }
    
    .legal-section {
        padding: 1.5rem 1rem;
        margin: 1.5rem 0;
    }
    
    .legal-highlight {
        padding: 1.2rem;
        margin: 1.5rem 0;
    }
    
    .legal-contact-box {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .legal-toc {
        padding: 1.5rem;
    }
    
    .faq-question {
        padding: 1rem;
    }
    
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1rem;
    }
    
    .contact-cta {
        padding: 2rem 1rem;
        border-radius: 10px;
    }
    
    .contact-cta h3 {
        font-size: 1.5rem;
    }
    
    .contact-cta p {
        font-size: 1rem;
    }
    
    .cta-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Enhanced Animations and Effects */
.legal-text, .faq-item, .legal-section {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.legal-text:nth-child(odd) {
    animation-delay: 0.1s;
}

.legal-text:nth-child(even) {
    animation-delay: 0.2s;
}

.faq-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.faq-item:nth-child(even) {
    animation-delay: 0.15s;
}

/* Scroll-triggered animations */
.legal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.legal-text.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Reading progress indicator */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #ff4500, #ff6b00, #ff9500);
    z-index: 9999;
    transition: width 0.2s ease;
}

/* Floating back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b00, #ff9500);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 107, 0, 0.4);
}

/* Text selection styling */
.legal-text ::selection {
    background: rgba(255, 107, 0, 0.2);
    color: #2c3e50;
}

.legal-text ::-moz-selection {
    background: rgba(255, 107, 0, 0.2);
    color: #2c3e50;
}

/* Focus styles for accessibility */
.legal-text a:focus,
.faq-question:focus {
    outline: 2px solid #ff6b00;
    outline-offset: 2px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced hover effects */
.legal-text {
    transition: all 0.3s ease;
}

.legal-text:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Scrollbar Styling */
.faq-answer::-webkit-scrollbar {
    width: 4px;
}

.faq-answer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.faq-answer::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 2px;
}

.faq-answer::-webkit-scrollbar-thumb:hover {
    background: #ff9500;
}

/* Print Styles */
@media print {
    .legal-hero {
        height: auto;
        min-height: auto;
        padding: 2rem 0;
        background: #ff6b00 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .wave-separator {
        display: none;
    }
    
    .legal-content {
        background: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .faq-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .faq-answer {
        max-height: none !important;
        padding: 1rem 2rem !important;
        display: block !important;
    }
    
    .faq-icon {
        display: none;
    }
    
    .contact-cta {
        display: none;
    }
}