/* Hero Background Container and Animation Styles */
.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 =================== */

/* Survey Page Videos - Individual positioning by name */
.sector-hero-video.video-oil-field-aerial,
.sector-hero-image.image-oil-field-aerial {
  object-position: center 40%; /* Oil field aerial - survey team */
}

.sector-hero-video.video-oil-facility-turn2,
.sector-hero-image.image-oil-facility-turn2 {
  object-position: center 25%; /* Oil facility turn 2 - survey blueprint */
}

.sector-hero-video.video-oil-facility,
.sector-hero-image.image-oil-facility {
  object-position: center 30%; /* Oil facility - survey road */
}

/* =================== RESPONSIVE ADJUSTMENTS FOR SURVEY 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 (oil-field-aerial/survey team) */
}

.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 (oil-facility-turn2/survey blueprint) */
}

.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: center 30%; /* Fourth/Fifth media (oil-facility/survey-road) */
}

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

/* Navigation Buttons */
.env-nav-buttons {
    padding: 5rem 0; /* Increased vertical padding */
    background-color: #f8f9fa; /* Light background for contrast */
}

.env-nav-btn {
    width: 100%;
    max-width: 280px; /* Increased max-width */
    padding: 1.2rem 2.5rem; /* Increased padding */
    font-size: 1.3rem; /* Increased font size */
    font-weight: 700; /* Bolder text */
    border-radius: 50px;
    background-color: #175381; /* Primary button blue */
    color: white;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-decoration: none; /* Ensure <a> tags look like buttons */
    display: inline-block; /* Proper button behavior */
    text-align: center;
    line-height: 1.5; /* Adjust line height for larger font */
}

.env-nav-btn:hover {
    background-color: #0f3c5d; /* Darker blue on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Specific spacing for navigation button containers */
.env-nav-buttons .row > .env-nav-item-first {
    margin-right: 5.5rem; /* Adjust this value as needed for space after first button */
}

.env-nav-buttons .row > .env-nav-item-last {
    margin-left: 5.5rem; /* Adjust this value as needed for space before last button */
}

/* 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;
}

.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 compliance & safety field crews image */
.service-image-stacked[src*="compliance-safety-animated.png"] {
    object-position: 37% center; /* Move image to the left to show more of the left side */
}

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

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

/* Specific spacing for hard hat and ruler section */
.icons-stack:has(.fa-hard-hat) {
    gap: 15rem;
}

/* Move ruler icon lower */
.icons-stack:has(.fa-hard-hat) .icon-item:last-child {
    margin-top: 6rem;
}

/* Raise hard hat icon slightly */
.icons-stack:has(.fa-hard-hat) .icon-item:first-child {
    margin-top: -4rem;
}

/* Extra spacing for bottom section icons (users + shield) */
.icons-stack:has(.fa-users) {
    gap: 12rem;
}

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

.service-icon-stacked {
    font-size: 120px;
    color: white;
    opacity: 0.9;
    transition: transform 0.3s ease, color 0.3s ease;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.service-icon-stacked:hover {
    transform: scale(1.1);
    color: #f39c12;
    text-shadow: 0 6px 12px 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: 0.8rem;
    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;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .service-category {
        padding: 1.5rem;
    }
    
    .images-stack {
        flex-direction: row;
        gap: 4.5rem;
        padding: 1.5rem 4rem 1.5rem 3rem;
        justify-content: center;
    }
    
    .service-image-stacked {
        width: 200px;
        height: 200px;
    }
    
    .icons-stack {
        flex-direction: row;
        gap: 4.5rem;
        padding: 1.5rem 4rem 1.5rem 3rem;
        justify-content: center;
    }
    
    .service-icon-stacked {
        font-size: 100px;
        color: white;
    }
    
    .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;
    }

    /* Ensure hard hat and ruler align on the same baseline up to 992px */
    .icons-stack:has(.fa-hard-hat) { gap: 4.5rem !important; }
    .icons-stack:has(.fa-hard-hat) .icon-item:first-child,
    .icons-stack:has(.fa-hard-hat) .icon-item:last-child { margin-top: 0 !important; }
}

@media (max-width: 768px) {
    .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;
    }
    
    .service-image-stacked {
        width: 160px;
        height: 160px;
    }
    
    .icons-stack {
        flex-direction: row;
        gap: 3.5rem;
        padding: 1rem 3rem 1rem 2rem;
        justify-content: center;
    }
    
    .service-icon-stacked {
        font-size: 80px;
        color: white;
    }
    
    .content-stack {
        gap: 2rem;
        padding: 1rem 1rem 1rem 5rem;
    }
    
    .service-number {
        font-size: 1.4rem;
    }

    /* Ensure hard hat and ruler align on the same baseline up to 768px */
    .icons-stack:has(.fa-hard-hat) { gap: 3.5rem !important; }
    .icons-stack:has(.fa-hard-hat) .icon-item:first-child,
    .icons-stack:has(.fa-hard-hat) .icon-item:last-child { margin-top: 0 !important; }
}

@media (max-width: 576px) {
    .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;
    }
    
    .service-image-stacked {
        width: 140px;
        height: 140px;
    }
    
    .icons-stack {
        flex-direction: row;
        gap: 3rem;
        padding: 1rem 1rem;
        justify-content: center;
    }

    /* Ensure hard hat and ruler align on the same baseline on smallest screens */
    .icons-stack:has(.fa-hard-hat) .icon-item:first-child,
    .icons-stack:has(.fa-hard-hat) .icon-item:last-child {
        margin-top: 0 !important;
    }
}

/* =================== ILLUSTRATION SECTIONS =================== */

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

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

.illustration-container .illustration-image {
    max-width: 500px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

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

/* Survey Management Section - Individual Classes for Size Control */
.survey-management-section {
    background-color: #FFFFFF !important;
    padding: 2rem 0;
}

.survey-management-container {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Responsive adjustments for illustration sections */
@media (max-width: 992px) {
    .illustration-container .illustration-image {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .illustration-section {
        padding: 3rem 0;
    }
    
    .illustration-container .illustration-image {
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .illustration-container .illustration-image {
        max-width: 300px;
    }
}

/* Responsive adjustments for survey management section */
@media (max-width: 992px) {
    .survey-management-image {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .survey-management-section {
        padding: 3rem 0;
    }
    
    .survey-management-image {
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .survey-management-image {
        max-width: 300px;
    }
}