/* ========================================
   SECTION BACKGROUND GRADIENTS
   Subtle flowing gradients for single analysis sections
   ======================================== */

/* Base setup for sections to contain gradients */
.analysis-findings,
.risk-assessment-matrix,
.analysis-fate-section,
.manipulation-techniques-showcase,
.fact-check-analysis-enhanced,
.logical-fallacies,
.constructive-questions,
.analysis-methodology,
.related-analysis-section,
.top-rated-comments {
    position: relative;
    overflow: hidden;
}

/* Section 1: Key Findings - Right side gradient */
.analysis-findings::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -8%;
    width: 44%;
    height: 110%;
    background: radial-gradient(circle, rgba(0, 178, 138, 0.08) 0%, transparent 70%);
    transform: rotate(15deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 2: Risk Assessment - Left side gradient */
.risk-assessment-matrix::after {
    content: '';
    position: absolute;
    bottom: -25%;
    left: -8%;
    width: 39%;
    height: 99%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.06) 0%, transparent 70%);
    transform: rotate(-20deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 3: FATE Analysis - Right side gradient with different color */
.analysis-fate-section::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -7%;
    width: 46%;
    height: 105%;
    background: radial-gradient(circle, rgba(106, 90, 255, 0.08) 0%, transparent 70%);
    transform: rotate(10deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 4: Manipulation Techniques - Left side subtle gradient */
.manipulation-techniques-showcase::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -6%;
    width: 35%;
    height: 94%;
    background: radial-gradient(circle, rgba(255, 170, 0, 0.06) 0%, transparent 70%);
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 5: Fact Check - Right side with teal gradient */
.fact-check-analysis-enhanced::before {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -8%;
    width: 42%;
    height: 110%;
    background: radial-gradient(circle, rgba(0, 168, 255, 0.08) 0%, transparent 70%);
    transform: rotate(18deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 6: Logical Fallacies - Left side purple gradient */
.logical-fallacies::after {
    content: '';
    position: absolute;
    top: -25%;
    left: -7%;
    width: 37%;
    height: 99%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.06) 0%, transparent 70%);
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 7: Constructive Questions - Right side green gradient */
.constructive-questions::before {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 44%;
    height: 121%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.06) 0%, transparent 70%);
    transform: rotate(20deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 8: Methodology - Left side blue gradient */
.analysis-methodology::after {
    content: '';
    position: absolute;
    top: -25%;
    left: -8%;
    width: 42%;
    height: 105%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    transform: rotate(-18deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 9: Related Analysis - Right side mixed gradient */
.related-analysis-section::before {
    content: '';
    position: absolute;
    top: -35%;
    right: -9%;
    width: 46%;
    height: 116%;
    background: radial-gradient(circle, rgba(0, 178, 138, 0.06) 0%, rgba(0, 168, 255, 0.04) 50%, transparent 75%);
    transform: rotate(12deg);
    pointer-events: none;
    z-index: 0;
}

/* Section 10: Top Rated Comments - Left side gradient */
.top-rated-comments::after {
    content: '';
    position: absolute;
    top: -20%;
    left: -8%;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.05) 0%, rgba(255, 140, 0, 0.03) 50%, transparent 70%);
    transform: rotate(-16deg);
    pointer-events: none;
    z-index: 0;
}

/* Ensure content stays above gradients */
.analysis-findings > .container,
.risk-assessment-matrix > .container,
.analysis-fate-section > .container,
.manipulation-techniques-showcase > .container,
.fact-check-analysis-enhanced > .container,
.logical-fallacies > .container,
.constructive-questions > .container,
.analysis-methodology > .container,
.related-analysis-section > .container,
.top-rated-comments > .container {
    position: relative;
    z-index: 1;
}

/* Mobile adjustments - reduce gradient size and opacity */
@media (max-width: 768px) {
    .analysis-findings::before,
    .risk-assessment-matrix::after,
    .analysis-fate-section::before,
    .manipulation-techniques-showcase::after,
    .fact-check-analysis-enhanced::before,
    .logical-fallacies::after,
    .constructive-questions::before,
    .analysis-methodology::after,
    .related-analysis-section::before,
    .top-rated-comments::after {
        opacity: 0.7;
        width: 60%;
    }
}

/* Dark mode adjustments - increase opacity slightly */
@media (prefers-color-scheme: dark) {
    .analysis-findings::before {
        background: radial-gradient(circle at 30% 50%, rgba(0, 178, 138, 0.12) 0%, transparent 65%);
    }
    
    .risk-assessment-matrix::after {
        background: radial-gradient(ellipse at 70% 50%, rgba(255, 107, 107, 0.10) 0%, transparent 60%);
    }
    
    .analysis-fate-section::before {
        background: radial-gradient(circle at 40% 60%, rgba(106, 90, 255, 0.12) 0%, transparent 70%);
    }
    
    .manipulation-techniques-showcase::after {
        background: radial-gradient(ellipse at 80% 40%, rgba(255, 170, 0, 0.10) 0%, transparent 65%);
    }
    
    .fact-check-analysis-enhanced::before {
        background: radial-gradient(circle at 20% 70%, rgba(0, 168, 255, 0.12) 0%, transparent 68%);
    }
    
    .logical-fallacies::after {
        background: radial-gradient(ellipse at 60% 30%, rgba(147, 51, 234, 0.10) 0%, transparent 65%);
    }
    
    .constructive-questions::before {
        background: radial-gradient(circle at 35% 65%, rgba(34, 197, 94, 0.10) 0%, transparent 70%);
    }
    
    .analysis-methodology::after {
        background: radial-gradient(ellipse at 75% 45%, rgba(59, 130, 246, 0.10) 0%, transparent 68%);
    }
    
    .top-rated-comments::after {
        background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, rgba(255, 140, 0, 0.05) 50%, transparent 70%);
    }
}

/* Reduced motion - disable gradients */
@media (prefers-reduced-motion: reduce) {
    .analysis-findings::before,
    .risk-assessment-matrix::after,
    .analysis-fate-section::before,
    .manipulation-techniques-showcase::after,
    .fact-check-analysis-enhanced::before,
    .logical-fallacies::after,
    .constructive-questions::before,
    .analysis-methodology::after,
    .related-analysis-section::before,
    .top-rated-comments::after {
        display: none;
    }
}

/* Additional subtle animation for gradients */
@keyframes gradientPulse {
    0% {
        transform: rotate(var(--rotation)) translateY(0) scale(1);
        opacity: 1;
    }
    25% {
        transform: rotate(var(--rotation)) translateY(-3%) scale(1.05);
        opacity: 0.9;
    }
    50% {
        transform: rotate(var(--rotation)) translateY(-5%) scale(1.08);
        opacity: 0.85;
    }
    75% {
        transform: rotate(var(--rotation)) translateY(-3%) scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: rotate(var(--rotation)) translateY(0) scale(1);
        opacity: 1;
    }
}

/* Apply subtle animation to some gradients */
.analysis-findings::before {
    --rotation: 15deg;
    animation: gradientPulse 30s ease-in-out infinite;
}

.risk-assessment-matrix::after {
    --rotation: -20deg;
    animation: gradientPulse 35s ease-in-out infinite;
    animation-delay: 3s;
}

.analysis-fate-section::before {
    --rotation: 10deg;
    animation: gradientPulse 32s ease-in-out infinite;
    animation-delay: 6s;
}

.manipulation-techniques-showcase::after {
    --rotation: -25deg;
    animation: gradientPulse 28s ease-in-out infinite;
    animation-delay: 9s;
}

.fact-check-analysis-enhanced::before {
    --rotation: 18deg;
    animation: gradientPulse 33s ease-in-out infinite;
    animation-delay: 12s;
}

.logical-fallacies::after {
    --rotation: -15deg;
    animation: gradientPulse 31s ease-in-out infinite;
    animation-delay: 15s;
}

.constructive-questions::before {
    --rotation: 20deg;
    animation: gradientPulse 29s ease-in-out infinite;
    animation-delay: 18s;
}

.analysis-methodology::after {
    --rotation: -18deg;
    animation: gradientPulse 34s ease-in-out infinite;
    animation-delay: 21s;
}

.related-analysis-section::before {
    --rotation: 12deg;
    animation: gradientPulse 36s ease-in-out infinite;
    animation-delay: 24s;
}

.top-rated-comments::after {
    --rotation: -16deg;
    animation: gradientPulse 32s ease-in-out infinite;
    animation-delay: 27s;
}