.hero-background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Video and Image Styling for Hero Background */
.sector-hero-image,
.sector-hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
}

.sector-hero-image.active,
.sector-hero-video.active {
    opacity: 1;
    z-index: 0;
}

/* Ensure text overlay stays above videos */
.sector-hero-overlay {
    z-index: 2 !important;
}

/* =================== NAMED VIDEO POSITIONING CLASSES =================== */

/* Land Page Videos - Individual positioning by name */

/* =================== RESPONSIVE ADJUSTMENTS FOR LAND PAGE =================== */

/* Tablet adjustments */
@media (max-width: 768px) {
  .sector-hero-video[class*="video-"],
  .sector-hero-image[class*="image-"] {
    object-position: center 45% !important;
  }
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .sector-hero-video[class*="video-"],
  .sector-hero-image[class*="image-"] {
    object-position: center 50% !important;
  }
}

/* Legacy nth-child positioning - kept for fallback */
.hero-background-container img:nth-child(1),
.hero-background-container video:nth-child(1) { 
    object-position: center 40%; /* First media (real-estate-aerial/desert land) - shows more top content */
}

.hero-background-container img:nth-child(2),
.hero-background-container video:nth-child(2),
.hero-background-container img:nth-child(3),
.hero-background-container video:nth-child(3) { 
    object-position: center 25%; /* Second/Third media (drone-truck-shot/land man) - slight vertical offset */
}

.hero-background-container img:nth-child(4),
.hero-background-container video:nth-child(4),
.hero-background-container img:nth-child(5),
.hero-background-container video:nth-child(5) { 
    object-position: 45% center; /* Fourth/Fifth media (oil-field-drone-shot/oil-well-drone-shot) - slight horizontal offset */
}

.hero-background-container img:nth-child(6),
.hero-background-container video:nth-child(6) { 
    object-position: 45% center; /* Sixth media - slight horizontal offset */
}

/* Land Overview Section */

.land-content {
    padding-right: 2rem;
}

.illustration-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

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

/* Ensure equal height columns */
.services-section .row {
    align-items: stretch;  /* Make columns equal height */
}

.services-section .col-lg-5,
.services-section .col-lg-7 {
    display: flex;  /* Make columns flexbox containers */
    flex-direction: column;
}

.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;
}

.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 Environmental Services image */
.service-image-stacked[alt="Environmental Services"] {
    object-position: 3% center;
}

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

/* Responsive adjustments for image stacks */
@media (max-width: 992px) {
    .images-stack {
        gap: 3rem;
        padding: 2rem;
    }
    
    .service-image-stacked {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .images-stack {
        flex-direction: row;
        gap: 2rem;
        padding: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .service-image-stacked {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 576px) {
    .service-image-stacked {
        width: 140px;
        height: 140px;
    }
}

/* Legacy icon stack styling - kept for backwards compatibility */

.content-stack {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;  /* Distribute content evenly vertically */
    height: 100%;  /* Take full height to match image stack */
    gap: 2rem;  /* Reduced gap for better distribution */
    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: 0.8rem;
    padding-left: 1.2rem;
    position: relative;
}

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

.service-icon-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.service-icon {
    font-size: 5.5rem;
    color: white;
    opacity: 0.8;
}

/* Illustration Sections */
.illustration-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.illustration-container {
    text-align: center;
}

.illustration-container .illustration-image {
    max-width: 600px;
    width: 100%;
    height: auto;
}

/* Land Animation Section Specific Styles */
.land-animation-section {
    background-color: #FFFFFF !important;
}

.land-animation-image {
    max-width: 800px !important;
}

/* Land First Section - Individual Classes for Size Control */
.land-first-section {
    background-color: #FFFFFF;
    padding: 6rem 0;
}

.land-first-container {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.land-first-image {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .land-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .service-category {
        padding: 1.5rem;
    }
    
    .content-stack {
        gap: 2rem;  /* Consistent reduced spacing */
        padding: 1.5rem 1rem 1.5rem 6rem;
        justify-content: space-evenly;  /* Maintain even distribution */
    }
    
    .service-number {
        font-size: 1.6rem;
    }
    
    .service-list li {
        font-size: 1.1rem;
    }
    
    .illustration-container .illustration-image {
        max-width: 500px;
    }
    
    .land-animation-image {
        max-width: 650px !important;
    }
}

@media (max-width: 768px) {
    .sector-hero {
        height: 50vh; /* Slightly taller for better text accommodation */
    }
    
    .sector-hero-overlay {
        padding-left: 3%; /* Reduce left padding on mobile */
    }
    
    .sector-hero-overlay h1 {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem); /* Very small: 14px-18px */
        max-width: 95%;
        line-height: 1.3; /* Better line spacing for readability */
        padding-left: 5%; /* Reduce left padding */
    }
    
    .sector-heading {
        font-size: 2rem;
    }
    
    .services-section {
        padding: 3rem 0;
    }
    
    .service-category {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    /* Adjust stacked layout for mobile */
    
    .content-stack {
        gap: 1.5rem;  /* Consistent reduced spacing */
        padding: 1rem 1rem 1rem 5rem;
        justify-content: space-evenly;  /* Maintain even distribution */
    }
    
    .service-number {
        font-size: 1.4rem;
    }
    

    
    .service-icon {
        font-size: 4rem;
    }
    
    .illustration-section {
        padding: 3rem 0;
    }
    
    .illustration-container .illustration-image {
        max-width: 400px;
    }
    
    .land-animation-image {
        max-width: 500px !important;
    }
}

@media (max-width: 576px) {
    
    .service-category {
        padding: 1rem;
    }
    
    /* Further adjust stacked layout for very small screens */
    
    .content-stack {
        gap: 1rem;  /* Consistent reduced spacing for mobile */
        padding: 1rem 1rem 1rem 3rem;
        justify-content: space-evenly;  /* Maintain even distribution */
    }
    
    .service-number {
        font-size: 1.2rem;
    }
    
    .service-list li {
        font-size: 1rem;
    }
    
    .service-icon {
        font-size: 3.5rem;
    }
    
    .illustration-container .illustration-image {
        max-width: 300px;
    }
    
    .land-animation-image {
        max-width: 350px !important;
    }
    
    /* Stack the last section's 3 columns vertically on mobile */
    .services-section:last-of-type .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Responsive adjustments for land first section */
@media (max-width: 992px) {
    .land-first-image {
        max-width: 650px;
    }
}

@media (max-width: 768px) {
    .land-first-section {
        padding: 3rem 0;
    }
    
    .land-first-image {
        max-width: 500px;
    }
}

@media (max-width: 576px) {
    /* Hero section mobile improvements */
    .sector-hero {
        height: 45vh;
    }
    
    .sector-hero-overlay {
        padding-left: 2%;
        padding-right: 2%;
    }
    
    .sector-hero-overlay h1 {
        font-size: clamp(0.8rem, 3vw, 1rem); /* Very small for mobile phones: 13px-16px */
        max-width: 98%;
        line-height: 1.4;
        padding-left: 3%;
        text-align: left; /* Ensure proper text alignment */
    }
    
    .land-first-image {
        max-width: 350px;
    }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
    .sector-hero {
        height: 40vh;
    }
    
    .sector-hero-overlay {
        padding-left: 1%;
        padding-right: 1%;
        align-items: flex-start; /* Align text towards top for better visibility */
        padding-top: 15%; /* Add some top spacing */
    }
    
    .sector-hero-overlay h1 {
        font-size: clamp(0.7rem, 3.5vw, 0.9rem); /* Tiny for small screens: 11px-14px */
        max-width: 100%;
        line-height: 1.5; /* More generous line spacing */
        padding-left: 2%;
        word-wrap: break-word; /* Allow word breaking if needed */
        hyphens: auto; /* Enable hyphenation */
    }
}

/* Ultra small screens */
@media (max-width: 360px) {
    .sector-hero-overlay h1 {
        font-size: clamp(0.6rem, 4vw, 0.8rem); /* Ultra tiny for very small screens: 10px-13px */
        line-height: 1.6;
        padding-left: 1%;
    }
}

