/* ============================================
   ENDING SECTION INTERACTIVITY
   Beautiful gradient mesh + floating particles
   ============================================ */

/* Animated Gradient Mesh Background */
.gradient-mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientMesh 15s ease infinite;
    opacity: 0;
    transition: opacity 1s ease;
}

.gradient-mesh-bg.active {
    opacity: 0.12;
}

body.dark-theme .gradient-mesh-bg.active {
    opacity: 0.08;
}

@keyframes gradientMesh {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

.particles-container.active {
    opacity: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
    animation: float 20s infinite ease-in-out;
    filter: blur(40px);
}

body.dark-theme .particle {
    background: linear-gradient(135deg, rgba(72, 145, 86, 0.2), rgba(125, 216, 127, 0.2));
}

.particle:nth-child(1) {
    width: 300px;
    height: 300px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.particle:nth-child(2) {
    width: 200px;
    height: 200px;
    right: 15%;
    top: 40%;
    animation-delay: 5s;
    animation-duration: 20s;
}

.particle:nth-child(3) {
    width: 250px;
    height: 250px;
    left: 20%;
    bottom: 20%;
    animation-delay: 10s;
    animation-duration: 30s;
}

.particle:nth-child(4) {
    width: 180px;
    height: 180px;
    right: 25%;
    bottom: 30%;
    animation-delay: 2s;
    animation-duration: 22s;
}

.particle:nth-child(5) {
    width: 220px;
    height: 220px;
    left: 50%;
    top: 50%;
    animation-delay: 8s;
    animation-duration: 28s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translate(30px, 50px) scale(1.05);
        opacity: 0.45;
    }
}

/* Enhanced FAQ Items with Glow Effect */
.faq-item {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.faq-item::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    filter: blur(8px);
}

body.dark-theme .faq-item::before {
    background: linear-gradient(135deg, rgba(72, 145, 86, 0.4), rgba(125, 216, 127, 0.4));
}

.faq-item:hover::before {
    opacity: 1;
}

.faq-item[open] {
    transform: scale(1.02);
}

/* Scroll Fade-in Animations - NO HIDING, just smooth transitions */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animations for FAQ items */
.faq-item:nth-child(1) { transition-delay: 0.1s; }
.faq-item:nth-child(2) { transition-delay: 0.2s; }
.faq-item:nth-child(3) { transition-delay: 0.3s; }
.faq-item:nth-child(4) { transition-delay: 0.4s; }
.faq-item:nth-child(5) { transition-delay: 0.5s; }
.faq-item:nth-child(6) { transition-delay: 0.6s; }

/* ===================================
   CTA SECTION ENHANCEMENTS
   =================================== */

/* Emergency visibility - ensure CTA content is always visible */
.cta-section {
    opacity: 1 !important;
    visibility: visible !important;
}

.cta-title,
.cta-subtitle,
.cta-button {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Glowing Orbs Background */
.cta-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.15), transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: orbPulse 8s ease-in-out infinite;
    pointer-events: none;
    filter: blur(40px);
}

body.dark-theme .cta-section::before {
    background: radial-gradient(circle, rgba(72, 145, 86, 0.15), transparent 70%);
}

@keyframes orbPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

/* Floating Light Particles */
.cta-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(244, 114, 182, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(96, 165, 250, 0.1) 0%, transparent 50%);
    animation: floatingLights 15s ease-in-out infinite;
    pointer-events: none;
}

body.dark-theme .cta-section::after {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(72, 145, 86, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(125, 216, 127, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(72, 145, 86, 0.08) 0%, transparent 50%);
}

@keyframes floatingLights {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Enhanced CTA Text - Always visible, no animations that hide */
.cta-title {
    opacity: 1;
}

.cta-subtitle {
    opacity: 1;
}

/* Enhanced CTA Button with Magnetic Effect */
.cta-button {
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shimmer effect inside button */
.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Glowing shadow pulse */
.cta-button::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: 50px;
    z-index: -1;
    opacity: 0;
    filter: blur(20px);
    animation: buttonGlow 2.5s ease-in-out infinite;
}

body.dark-theme .cta-button::after {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
}

@keyframes buttonGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(0.95);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Sparkle effect on hover */
.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.1);
}

/* ===================================
   FOOTER ENHANCEMENTS
   =================================== */

/* Emergency visibility - ensure footer content is always visible */
footer {
    opacity: 1 !important;
    visibility: visible !important;
}

.footer-container,
.footer-grid,
.footer-col,
.footer-logo,
.footer-tagline,
.footer-links,
.footer-social,
.footer-bottom {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Animated Wave Divider at Top */
footer::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='50' viewBox='0 0 1200 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,25 Q300,5 600,25 T1200,25 L1200,0 L0,0 Z' fill='%23ffffff' opacity='0.1'/%3E%3C/svg%3E") !important;
    background-repeat: repeat-x !important;
    background-position: 0 0 !important;
    animation: waveSlide 20s linear infinite !important;
}

body.dark-theme footer::before {
    background-image: url("data:image/svg+xml,%3Csvg width='100%25' height='50' viewBox='0 0 1200 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,25 Q300,5 600,25 T1200,25 L1200,0 L0,0 Z' fill='%230a0a0a' opacity='0.1'/%3E%3C/svg%3E") !important;
}

@keyframes waveSlide {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 1200px 0;
    }
}

/* Glassmorphism Enhancement */
footer {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Animated Column Entry - Always visible, smooth transitions */
.footer-col {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-col.visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-col:nth-child(1) { transition-delay: 0.1s; }
.footer-col:nth-child(2) { transition-delay: 0.25s; }
.footer-col:nth-child(3) { transition-delay: 0.4s; }
.footer-col:nth-child(4) { transition-delay: 0.55s; }

/* Enhanced Footer Links with Underline Animation */
.footer-links a {
    position: relative;
    overflow: hidden;
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-theme .footer-links a::before {
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
}

.footer-links a:hover::before {
    width: 100%;
}

/* Social Icons - Simple & Clean (No rotating animations) */
.footer-social a {
    position: relative;
    transition: all 0.3s ease;
}

/* Footer Logo Image - Simple hover effect */
.footer-logo-img {
    transition: all 0.3s ease;
}

/* Animated Bottom Border */
.footer-bottom {
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-blue) 20%,
        var(--primary-green) 50%,
        var(--primary-blue) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: borderFlow 4s linear infinite;
    opacity: 0.3;
}

body.dark-theme .footer-bottom::before {
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-green) 20%,
        var(--light-green) 50%,
        var(--primary-green) 80%,
        transparent 100%
    );
}

@keyframes borderFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Footer CTA Button - Clean & Professional */
.footer-cta-button {
    position: relative;
}

/* Heading Gradient Underline */
.faq-header h2,
.cta-title {
    position: relative;
    display: inline-block;
}

.faq-header h2::after,
.cta-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    border-radius: 2px;
    animation: underlineGrow 1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s backwards;
}

body.dark-theme .faq-header h2::after,
body.dark-theme .cta-title::after {
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
}

@keyframes underlineGrow {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 100px;
        opacity: 1;
    }
}

/* Scroll Progress Indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease-out;
}

body.dark-theme .scroll-progress {
    background: linear-gradient(90deg, var(--primary-green), var(--light-green));
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .particle {
        filter: blur(30px);
    }

    .particle:nth-child(1) {
        width: 200px;
        height: 200px;
    }

    .particle:nth-child(2) {
        width: 150px;
        height: 150px;
    }

    .particle:nth-child(3) {
        width: 180px;
        height: 180px;
    }

    .particle:nth-child(4),
    .particle:nth-child(5) {
        display: none;
    }

    .cta-section::before {
        width: 400px;
        height: 400px;
    }

    .cta-button:hover {
        transform: translateY(-2px) scale(1.01);
    }

    @keyframes orbPulse {
        0%, 100% {
            transform: translate(-50%, -50%) scale(0.8);
        }
        50% {
            transform: translate(-50%, -50%) scale(1);
        }
    }
}
