/* Hero Background Container and Animation Styles */
.hero-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Set each GIF's position offset via nth-child */
.hero-background-container img:nth-child(1) { 
    object-position: center 40%; /* First GIF  */
}

.hero-background-container img:nth-child(2) { 
    object-position: center 25%; /* Second GIF  */
}

.hero-background-container img:nth-child(3) { 
    object-position: center 30%; /* Third GIF  */
}

/* Renewables Animation/Illustration Sections - Individual Controls */
.renewables-animation-section {
    padding: 6rem 0;
    background-color: #ffffff !important;
}

.renewables-animation-section .illustration-container {
    text-align: center;
}

/* Individual sizing for each animation section */
.renewables-animation-section .illustration-image {
    width: 100%;
    height: auto;
    background-color: transparent;
    border: none;
    box-shadow: none;
}

/* Renewables Animation Section 0 - Overview */
.renewables-animation-section .renewables-animation-image[alt="Renewables Overview"] {
    max-width: 500px;
}

/* Renewables Animation Section 1 - Projects */
.renewables-animation-section .renewables-animation-image[alt="Renewable Energy Projects"] {
    max-width: 500px;
}

/* Renewables Animation Section 2 - Land and Construction */
.renewables-animation-section .renewables-animation-image[alt="Land and Construction Services"] {
    max-width: 500px;
}

/* Services Sections */
.services-section {
    padding: 4rem 0;
}

.services-blue {
    background-color: #194164;
    color: white;
}

.service-category {
    padding: 2rem;
    position: relative;
}

/* Stacked layout styling for images */
.images-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 5.5rem;
    padding: 2rem 6rem 2rem 4rem;
}

.image-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stacked layout styling for icons */
.icons-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12rem;
    padding: 2rem 6rem 2rem 4rem;
}

.icon-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon-stacked {
    font-size: 8rem;
    color: white;
    opacity: 0.9;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.service-icon-stacked:hover {
    color: #f39c12;
    opacity: 1;
}

.service-image-stacked {
    width: 380px;
    height: 380px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Specific positioning for technology-driven collaboration image */
.service-image-stacked[src*="renewables-service-5.png"] {
    object-position: center 70%; /* Move image down to show more of the top */
}

.service-image-stacked:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.content-stack {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 2rem 2rem 2rem 8rem;
}

.content-stack .service-category {
    padding: 0;
}

.service-number {
    color: #f39c12;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.service-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.service-list li {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.service-list li::before {
    content: "●";
    color: #f39c12;
    position: absolute;
    left: 0;
    top: 0;
}

/* Nested list styling */
.service-list ul {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.service-list ul li::before {
    content: "◦";
    color: #f39c12;
}

/* Intro and conclusion text styling */
.sector-intro {
    font-size: 1.3rem;
    line-height: 1.6;
    color: white;
    margin-bottom: 1.5rem;
}

.sector-conclusion {
    font-size: 1.3rem;
    line-height: 1.6;
    color: white;
    margin-bottom: 0;
    font-style: italic;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .renewables-animation-section {
        padding: 4rem 0;
    }
    
    /* Adjust all renewables animation sections equally on tablets */
    .renewables-animation-section .renewables-animation-image[alt="Renewables Overview"],
    .renewables-animation-section .renewables-animation-image[alt="Renewable Energy Projects"],
    .renewables-animation-section .renewables-animation-image[alt="Land and Construction Services"] {
        max-width: 450px;
    }
    
    .service-category {
        padding: 1.5rem;
    }
    
    .images-stack {
        flex-direction: row;
        gap: 4.5rem;
        padding: 1.5rem 4rem 1.5rem 3rem;
        justify-content: center;
    }
    
    .icons-stack {
        flex-direction: row;
        gap: 4.5rem;
        padding: 1.5rem 4rem 1.5rem 3rem;
        justify-content: center;
    }
    
    .service-icon-stacked {
        font-size: 6.5rem;
    }
    
    .service-image-stacked {
        width: 150px;
        height: 150px;
    }
    
    .content-stack {
        gap: 2.5rem;
        padding: 1.5rem 1rem 1.5rem 6rem;
    }
    
    .service-number {
        font-size: 1.6rem;
    }
    
    .service-list li {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .sector-intro,
    .sector-conclusion {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .renewables-animation-section {
        padding: 3rem 0;
    }
    
    /* Adjust all renewables animation sections equally on mobile */
    .renewables-animation-section .renewables-animation-image[alt="Renewables Overview"],
    .renewables-animation-section .renewables-animation-image[alt="Renewable Energy Projects"],
    .renewables-animation-section .renewables-animation-image[alt="Land and Construction Services"] {
        max-width: 400px;
    }
    
    .sector-hero {
        height: 45vh;
    }
    
    .sector-hero-overlay h1 {
        font-size: 2.2rem;
        max-width: 90%;
    }
    
    .sector-heading {
        font-size: 2rem;
    }
    
    .services-section {
        padding: 3rem 0;
    }
    
    .service-category {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    /* Adjust stacked layout for mobile */
    .images-stack {
        flex-direction: row;
        gap: 3.5rem;
        padding: 1rem 3rem 1rem 2rem;
        justify-content: center;
    }
    
    .icons-stack {
        flex-direction: row;
        gap: 3.5rem;
        padding: 1rem 3rem 1rem 2rem;
        justify-content: center;
    }
    
    .service-icon-stacked {
        font-size: 5.5rem;
    }
    
    .service-image-stacked {
        width: 120px;
        height: 120px;
    }
    
    .content-stack {
        gap: 2rem;
        padding: 1rem 1rem 1rem 5rem;
    }
    
    .service-number {
        font-size: 1.4rem;
    }
    
    .service-list li {
        margin-bottom: 1.8rem;
    }
    
    .sector-intro,
    .sector-conclusion {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .renewables-animation-section {
        padding: 2rem 0;
    }
    
    /* Adjust all renewables animation sections equally on very small screens */
    .renewables-animation-section .renewables-animation-image[alt="Renewables Overview"],
    .renewables-animation-section .renewables-animation-image[alt="Renewable Energy Projects"],
    .renewables-animation-section .renewables-animation-image[alt="Land and Construction Services"] {
        max-width: 350px;
    }
    
    .service-category {
        padding: 1rem;
    }
    
    /* Further adjust stacked layout for very small screens */
    .images-stack {
        flex-direction: row;
        gap: 3rem;
        padding: 1rem 1rem;
        justify-content: center;
    }
    
    .icons-stack {
        flex-direction: row;
        gap: 3rem;
        padding: 1rem 1rem;
        justify-content: center;
    }
    
    .service-icon-stacked {
        font-size: 4rem;
    }
    
    .service-image-stacked {
        width: 100px;
        height: 100px;
    }
    
    .content-stack {
        gap: 1.5rem;
        padding: 1rem 1rem 1rem 3rem;
    }
    
    .service-number {
        font-size: 1.2rem;
    }
    
    .service-list li {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .sector-intro,
    .sector-conclusion {
        font-size: 1rem;
    }
}
