/* Ecology Section */
.ecology-section {
    background-color: #202020; /* Dark gray background */
    color: #fff;
    padding-top: 160px; /* Increased padding for crest visibility */
    padding-bottom: 0; /* Image goes to edge */
    position: relative;
    overflow: hidden; /* Clips the slider at screen edge */
}

.ecology-section::before {
    content: none;
}

/* Background Crest Element (Moved to separate div) */
.ecology-bg-crest {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px; /* Limit width on very large screens */
    height: 100%;
    background-image: url('../assets/images/bg-eco-crest.png');
    background-size: 80%; /* Increased size as requested */
    background-repeat: no-repeat;
    background-position: center 50px; /* Center top with some offset */
    opacity: 0.15; /* Reduced opacity to not interfere with text */
    pointer-events: none;
    z-index: 1;
}

.ecology-section--row .ecology-bg-crest {
    left: auto;
    right: 0;
    transform: none;
    background-position: right 50px;
}

.ecology-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.ecology-section--row .ecology-content-wrapper {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

/* Text Side */
.ecology-text {
    width: 100%;
    max-width: 760px;
    padding-right: 0;
    text-align: center;
    margin: 0 auto 40px;
}

.ecology-section--row .ecology-text {
    max-width: 560px;
    margin: 0;
    text-align: left;
}

.ecology-tag {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #FFFD00; /* Yellow border */
    border-radius: 50px;
    color: #FFFD00;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 30px;
    letter-spacing: 0.05em;
}

.ecology-title {
    font-size: 48px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 30px;
    color: #fff;
}

.ecology-desc {
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    max-width: 640px;
}

/* Certificates Side */
.ecology-certificates {
    width: 100%;
    position: relative;
    z-index: 5;
    margin-right: 0;
}

.ecology-section--row .ecology-certificates {
    flex: 1;
}

/* Swiper Styles */
.ecology-slider {
    width: 100%;
    padding-bottom: 20px;
}

.cert-slide {
    height: auto;
    transition: transform 0.3s ease;
}

.cert-image-wrapper {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cert-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Bottom Image */
.ecology-bottom-image {
    width: 100%;
    height: 600px;
    position: relative;
}

.ecology-bottom-image img,
.ecology-bottom-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .ecology-section {
        padding-top: 100px;
    }

    .ecology-section--row .ecology-bg-crest {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        background-position: center 50px;
    }

    .ecology-section--row .ecology-content-wrapper {
        gap: 40px;
    }

    .ecology-certificates {
        width: 100%;
        margin-right: 0;
        clip-path: none; /* Reset clip-path on mobile */
    }
    
    .ecology-slider {
        padding: 0 0 20px 20px;
        overflow: hidden !important;
    }
    
    .ecology-title {
        font-size: 36px;
    }

    .ecology-bottom-image {
        height: 420px;
    }
}

@media (max-width: 768px) {
    .ecology-section {
        padding-top: 60px;
        padding-bottom: 40px;
    }

    .ecology-bg-crest {
        background-size: 120%; /* Even larger on mobile to fill width */
        background-position: center 20px;
        opacity: 0.1; /* Slightly more subtle on mobile */
    }

    .ecology-title {
        font-size: 32px; /* Smaller title for mobile */
        margin-bottom: 20px;
        padding: 0 16px; /* Prevent text touching edges */
    }

    .ecology-desc {
        font-size: 15px;
        padding: 0 16px;
    }

    .ecology-content-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        margin-bottom: 40px; /* Reduced margin */
        gap: 28px;
    }

    .ecology-section--row .ecology-content-wrapper {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .ecology-text {
        margin: 0;
    }

    .ecology-section--row .ecology-text {
        max-width: 760px;
        margin: 0 auto;
        text-align: center;
    }

    .ecology-bottom-image {
        height: 250px; /* Slightly shorter */
    }
    
    .cert-image-wrapper {
        height: 260px; /* Taller to fit content better */
        padding: 15px;
    }

    .ecology-slider {
        padding: 0 0 20px 16px;
    }
}

@media (max-width: 480px) {
    .ecology-tag {
        font-size: 12px;
        padding: 7px 16px;
        margin-bottom: 20px;
    }

    .ecology-title {
        font-size: 26px;
    }

    .ecology-desc {
        font-size: 14px;
    }

    .cert-image-wrapper {
        height: 220px;
        padding: 12px;
        border-radius: 10px;
    }

    .ecology-bottom-image {
        height: 220px;
    }
}
