/* Base Styles - Dark Theme */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2C3E50; /* Dark Blue/Grey */
    color: #ECF0F1; /* Light Text */
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: #F1C40F; /* Yellow Accent */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #f39c12; /* Darker Yellow on hover */
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents bottom space */
}

/* Header */
.header {
    background-color: #1a252f; /* Very Dark Blue/Grey */
    color: white;
    padding: 25px 0; /* Adjusted padding */
    text-align: center;
    border-bottom: 4px solid #F1C40F; /* Yellow Accent Border */
}

.header h1 {
    margin: 0 0 10px 0;
    font-size: 2.2em; /* Slightly smaller */
}

.header .subtitle {
    margin: 5px 0 0 0;
    font-size: 1.1em;
    opacity: 0.9;
    color: #bdc3c7;
}

/* Main Navigation */
.main-nav {
    background-color: #34495E; /* Mid-dark background */
    text-align: center;
    padding: 0;
    margin: 0;
    list-style: none;
    border-bottom: 3px solid #F1C40F; /* Yellow bottom border */
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.main-nav li {
    display: inline-block; /* Keep items inline */
}

.main-nav a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    color: #ECF0F1; /* Light text */
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-right: 1px solid #4e5d6c; /* Separator */
}

.main-nav li:first-child a {
    border-left: 1px solid #4e5d6c; /* Add left border to first item */
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #F1C40F; /* Yellow background on hover/active */
    color: #2C3E50; /* Dark text */
    text-decoration: none;
}

/* Main Content Area */
.main-content {
    padding: 40px 0;
}

.content-section {
    background-color: #34495E; /* Mid-dark background */
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #4e5d6c; /* Subtle border */
}

h2 {
    color: #F1C40F; /* Yellow headings */
    border-bottom: 2px solid #4e5d6c;
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.8em;
}

h3 {
    color: #F1C40F;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

p, li {
    color: #ECF0F1; /* Ensure text is light */
    margin-bottom: 1em;
}

/* Lists (Services, Capabilities, etc.) */
.styled-list ul {
    list-style: none;
    padding-left: 0;
}

.styled-list li {
    margin-bottom: 12px;
    padding-left: 25px;
    position: relative;
}

.styled-list li::before {
    content: '►'; /* Arrow icon */
    color: #F1C40F; /* Yellow icon */
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* Project Showcase / Image Grids */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 20px; /* Space between images */
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    height: auto;
    border: 3px solid #4e5d6c;
    border-radius: 4px;
    object-fit: cover;
}

.image-grid figcaption {
    font-style: italic;
    color: #bdc3c7;
    font-size: 0.9em;
    text-align: center;
    margin-top: 5px;
}

/* Call to Action (CTA) Button */
.cta-button {
    display: inline-block;
    background-color: #F1C40F; /* Yellow button */
    color: #2C3E50; /* Dark text */
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    margin-right: 10px; /* Spacing between buttons */
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cta-button:hover {
    background-color: #d4ac0d; /* Darker yellow */
    color: #1a252f;
    text-decoration: none;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #bdc3c7;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #4e5d6c;
    background-color: #2C3E50;
    color: #ECF0F1;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F1C40F;
    box-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

/* Footer */
.footer {
    background-color: #1a252f; /* Very Dark */
    color: #bdc3c7;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    font-size: 0.9em;
    border-top: 4px solid #F1C40F; /* Yellow border top */
}

.footer p {
    margin: 5px 0;
    opacity: 0.9;
    color: #bdc3c7; /* Ensure footer text is light */
}

.footer a {
    color: #F1C40F; /* Yellow links */
}

.footer a:hover {
    color: #ffffff;
}

/* Responsive Adjustments (Example) */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    .main-nav a {
        padding: 12px 15px;
        font-size: 1em;
    }
    .content-section {
        padding: 20px;
    }
    h2 {
        font-size: 1.6em;
    }
    h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .main-nav {
        justify-content: space-around; /* Better spacing on small screens */
    }
    .main-nav li:first-child a {
        border-left: none;
    }
     .main-nav a {
        border-right: none;
        padding: 10px;
    }
    .cta-button {
        display: block; /* Stack buttons */
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
        box-sizing: border-box;
    }
    .cta-button:last-child {
        margin-bottom: 0;
    }
}

/* Image Carousel Styles (Hero Section) */
.image-carousel-container {
    width: 100%;
    /* Increased max-width */
    max-width: 900px;
    height: 400px; /* Or adjust height as needed */
    overflow: hidden; /* Hide the parts of images outside the container */
    margin: 20px auto; /* Center the container */
    position: relative;
    border-radius: 8px;
    border: 2px solid #4e5d6c; /* Match existing image border */
    background-color: #1a252f; /* Match hero background */
}

.image-carousel-track {
    display: flex; /* Arrange images in a row */
    width: calc(200% * 11); /* Calculate width: 200% * number_of_images */
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    /* Apply the right-to-left animation */
    animation: scrollImagesRightToLeft 60s linear infinite; /* Renamed animation */
}

.image-carousel-track img {
    width: calc(100% / 22); /* Calculate width: 100% / (number_of_images * 2) */
    height: 100%;
    object-fit: cover; /* Ensure images cover the area without distortion */
    flex-shrink: 0; /* Prevent images from shrinking */
}

/* Pause animation on hover (optional) */
.image-carousel-container:hover .image-carousel-track {
    animation-play-state: paused;
}

/* Keyframes for the HERO scrolling animation (Right-to-Left) */
@keyframes scrollImagesRightToLeft {
    0% {
        /* Start shifted to the left (showing the second set of images) */
        transform: translateX(-50%);
    }
    100% {
        /* End at the original position (showing the first set) */
        transform: translateX(0);
    }
}

/* Service Image Carousel Styles */
.service-carousel-container {
    width: 100%;
    max-width: 700px; /* Adjust width as desired */
    height: 400px; /* Adjust height as desired */
    overflow: hidden;
    margin: 25px auto; /* Center it */
    position: relative;
    border-radius: 8px;
    border: 2px solid #4e5d6c;
    background-color: #2C3E50; /* Match product carousel background */
}

.service-carousel-track {
    display: flex;
    /* Width = 200% * number_of_unique_images (3) */
    width: calc(200% * 3);
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    /* Use the same left-to-right animation as products */
    /* Adjust duration (e.g., 30s) if needed */
    animation: scrollServiceImages 30s linear infinite;
}

.service-carousel-track img {
    /* Width = 100% / (number_of_images * 2) = 100% / 6 */
    width: calc(100% / 6);
    height: 100%;
    object-fit: cover; /* Use 'cover' for service images */
    flex-shrink: 0;
    /* padding: 5px; */ /* Optional padding */
    box-sizing: border-box;
}

/* Pause animation on hover (optional) */
.service-carousel-container:hover .service-carousel-track {
    animation-play-state: paused;
}

/* Keyframes for the service scrolling animation (Left-to-Right) */
/* Can reuse scrollProductImages if speed is the same */
@keyframes scrollServiceImages {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move left by the width of the first set of images */
        transform: translateX(-50%);
    }
}

/* Product Image Carousel Styles */
.product-carousel-container {
    width: 100%;
    max-width: 500px; /* Adjust width as desired */
    height: 350px; /* Adjust height as desired */
    overflow: hidden;
    margin: 25px auto; /* Center it */
    position: relative;
    border-radius: 8px;
    border: 2px solid #4e5d6c;
    background-color: #2C3E50; /* Slightly lighter background */
}

.product-carousel-track {
    display: flex;
    /* Width = 200% * number_of_unique_images (5) */
    width: calc(200% * 5);
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    /* Re-use the same animation or create a new one if different speed is needed */
    /* Using a slightly faster duration here: 40s */
    animation: scrollProductImages 40s linear infinite;
}

.product-carousel-track img {
    /* Width = 100% / (number_of_images * 2) = 100% / 10 */
    width: calc(100% / 10);
    height: 100%;
    object-fit: contain; /* Use 'contain' to see the whole product image */
    flex-shrink: 0;
    padding: 5px; /* Add some padding around images */
    box-sizing: border-box;
}

/* Pause animation on hover (optional) */
.product-carousel-container:hover .product-carousel-track {
    animation-play-state: paused;
}

/* Keyframes for the product scrolling animation */
/* If using the same speed as hero, you don't need this */
/* If different speed needed, rename this and the animation name above */
@keyframes scrollProductImages {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Move left by the width of the first set of images */
        transform: translateX(-50%);
    }
}

/* Adjust Hero section padding if needed */
#hero {
    /* padding-bottom: 60px; Add more bottom padding if buttons overlap */
}

/* Center the buttons div within the hero section */
#hero > div:last-of-type { /* Targets the last div directly inside #hero */
    text-align: center;
    margin-top: 30px; /* Add some space above the buttons */
}

/* Ensure hero image styling doesn't conflict */
#hero img {
    /* Remove specific styles applied only to the single hero image if they exist */
    /* max-width: 100%; */ /* Keep this if needed */
    /* border-radius: 8px; */ /* Handled by container now */
    /* border: 2px solid #4e5d6c; */ /* Handled by container now */
    /* margin: 20px auto; */ /* Handled by container now */
}