/* =========================================
   OnLoop Energy - Visual Animations
   ========================================= */

/* ---- Wind Turbine Animation ---- */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.turbine-visual {
    position: absolute;
    bottom: -60px;
    left: 45%;
    transform: translateX(-50%);
    width: 300px;
    height: 400px;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
    opacity: 0.9;
}

/* ... (Rest of turbine structure remains similar, maybe adjusted) ... */
.turbine-pole {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 280px;
    background: linear-gradient(90deg, #cbd5e1 0%, #94a3b8 50%, #64748b 100%);
    clip-path: polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%);
}

.turbine-rotor {
    position: absolute;
    bottom: 270px;
    left: 50%;
    width: 0;
    height: 0;
    animation: spin 3s infinite linear;
    z-index: 2;
}

.turbine-blade {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 16px;
    height: 120px;
    background: linear-gradient(to top,
            #f8fafc 0%,
            #e2e8f0 85%,
            #43B047 85%, #43B047 90%,
            /* Single Ring */
            #e2e8f0 90%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 50% 50% 100% 0;
    transform-origin: 50% 100%;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
    margin-left: -8px;
}

/* 3 Blades exactly 120 degrees apart */
.turbine-blade:nth-child(1) {
    transform: rotate(0deg);
}

.turbine-blade:nth-child(2) {
    transform: rotate(120deg);
}

.turbine-blade:nth-child(3) {
    transform: rotate(240deg);
}

/* Center Hub cap */
.turbine-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: #64748b;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.3);
}

/* Secondary Turbines */
.turbine-visual--small-1 {
    transform: scale(0.6);
    left: 40%;
    margin-left: -120px;
    bottom: -80px;
    opacity: 0.8;
    z-index: -1;
}

.turbine-visual--small-1 .turbine-rotor {
    animation-duration: 4s;
    animation-direction: reverse;
}

.turbine-visual--small-2 {
    transform: scale(0.4);
    left: 48%;
    margin-left: 80px;
    bottom: -70px;
    opacity: 0.6;
    z-index: -2;
}

.turbine-visual--small-2 .turbine-rotor {
    animation-duration: 3.5s;
}

/* ---- Landscape/Terrain ---- */
.landscape-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 250px;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.hill {
    position: absolute;
    bottom: -40%;
    width: 140%;
    height: 100%;
    border-radius: 100% 100% 0 0;
    opacity: 0.6;
}

.hill:nth-child(1) {
    left: -20%;
    bottom: -60%;
    background: linear-gradient(180deg, #dcdfce 0%, #b2cea9 100%);
    /* Softer green/beige */
    z-index: 1;
}

.hill:nth-child(2) {
    right: -40%;
    bottom: -50%;
    width: 150%;
    background: linear-gradient(180deg, #c7d2de 0%, #aabdd1 100%);
    /* Soft blue/grey */
    z-index: 0;
}

/* ---- Solar Animation ---- */
.solar-visual {
    position: absolute;
    bottom: -20px;
    right: 180px;
    /* Moved away from the turbine */
    width: 180px;
    height: 90px;
    z-index: 0;
    pointer-events: none;
}

.footer .solar-visual {
    left: 42%;
    transform: translateX(-50%) scale(1);
    bottom: 20px;
    width: 450px;
    height: 120px;
    display: flex;
    gap: 30px;
    justify-content: center;
}

.solar-panel-unit {
    position: relative;
    width: 120px;
    height: 70px;
    flex-shrink: 0;
}

.solar-panel {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
    border: 3px solid #cbd5e1;
    border-radius: 4px;
    transform: perspective(800px) rotateX(35deg) rotateY(-5deg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.solar-structure {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    justify-content: space-around;
    z-index: 1;
    transform: perspective(800px) rotateX(35deg) rotateY(-5deg);
}

.solar-pole {
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #94a3b8, #475569);
    border-radius: 2px;
}

.solar-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 25px 30px;
}

.solar-glint {
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transform: skewX(-25deg);
    animation: glint 6s infinite ease-in-out;
}

@keyframes glint {

    0%,
    80% {
        left: -150%;
    }

    100% {
        left: 250%;
    }
}

/* ---- Footer Integration Override ---- */
.footer {
    position: relative;
    overflow: hidden;
    /* To clip the visuals */
    z-index: 1;
}

.footer__grid {
    position: relative;
    z-index: 2;
    /* Content above visuals */
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .turbine-visual {
        transform: scale(0.6);
        right: -80px;
        bottom: -40px;
        opacity: 0.5;
        /* Fade out on smaller screens to avoid distraction */
    }

    .solar-visual {
        transform: scale(0.6);
        right: 40px;
        bottom: -20px;
        opacity: 0.5;
    }

    .landscape-bg {
        height: 150px;
    }
}