/* Professional Legal Pages Enhanced Styles */

/* Floating particles background animation */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 212, 0, 0.1);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.particle:nth-child(1) { width: 4px; height: 4px; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { width: 6px; height: 6px; left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { width: 3px; height: 3px; left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { width: 5px; height: 5px; left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { width: 4px; height: 4px; left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { width: 7px; height: 7px; left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { width: 3px; height: 3px; left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { width: 5px; height: 5px; left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { width: 4px; height: 4px; left: 90%; animation-delay: 16s; }
.particle:nth-child(10) { width: 6px; height: 6px; left: 95%; animation-delay: 18s; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced hero section with gradient overlay */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 212, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 212, 0, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Animated section dividers */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-yellow), transparent);
    margin: var(--space-64) 0;
    position: relative;
    overflow: hidden;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced content sections with subtle animations */
.terms-section, .policy-section {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.terms-section::before, .policy-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.03), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.terms-section:hover::before, .policy-section:hover::before {
    left: 100%;
}

.terms-section > *, .policy-section > * {
    position: relative;
    z-index: 1;
}

/* Floating action button for scroll to top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-yellow), #FFE55C);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--black);
    box-shadow: 0 4px 20px rgba(255, 212, 0, 0.3);
    transition: all var(--transition-base);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 212, 0, 0.4);
}

/* Enhanced navigation with progress indicator */
.content-nav {
    position: relative;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-yellow), #FFE55C);
    z-index: 1001;
    transition: width 0.3s ease;
}

/* Improved highlight and warning boxes */
.highlight-box, .warning-box {
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-yellow), #FFE55C);
}

.warning-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #EF4444, #F87171);
}

/* Animated icons for sections */
.section-icon {
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Enhanced contact links with hover effects */
.contact-link {
    position: relative;
    overflow: hidden;
}

.contact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 212, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

.contact-link:hover::before {
    left: 100%;
}

/* Smooth reveal animations for content */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced typography with better spacing */
.terms-section h2, .policy-section h2 {
    position: relative;
    padding-left: 20px;
}

.terms-section h2::before, .policy-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--primary-yellow), #FFE55C);
    border-radius: 2px;
}

/* Interactive table of contents */
.content-nav ul li a {
    position: relative;
    overflow: hidden;
}

.content-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-yellow);
    transition: width 0.3s ease;
}

.content-nav ul li a:hover::after {
    width: 100%;
}

/* Subtle background pattern */
.content-section {
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255, 212, 0, 0.05) 1px, transparent 0);
    background-size: 20px 20px;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .floating-particles {
        display: none;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .particle {
        display: none;
    }
}

/* Print styles for professional documents */
@media print {
    .header, .footer, .scroll-to-top, .floating-particles {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .terms-section, .policy-section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .floating-particles,
    .particle,
    .section-icon {
        animation: none;
    }
    
    .scroll-to-top,
    .terms-section,
    .policy-section,
    .contact-link {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .highlight-box {
        border: 2px solid var(--primary-yellow);
    }
    
    .warning-box {
        border: 2px solid #EF4444;
    }
    
    .terms-section, .policy-section {
        border: 1px solid var(--gray-400);
    }
}

/* Focus styles for keyboard navigation */
.content-nav ul li a:focus,
.contact-link:focus,
.scroll-to-top:focus {
    outline: 2px solid var(--primary-yellow);
    outline-offset: 2px;
}

/* Loading animation for page transitions */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.page-loader.loading {
    opacity: 1;
    visibility: visible;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 212, 0, 0.3);
    border-top: 3px solid var(--primary-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}