/* --- General and Font Styling --- */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #0d1218; /* Dark background as a fallback */
    color: #ffffff;
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 700px;
    background-image: url('/img/circuitboard-background.avif');
    background-size: cover;
    background-position: center;
    display: flex; /* Helps in vertical alignment of content */
    flex-direction: column;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(13, 18, 24, 0.95) 0%, rgba(13, 18, 24, 0.7) 100%);
    z-index: 1;
}

/* Make sure all content is on top of the overlay */
.hero-section .container {
    position: relative;
    z-index: 2;
}

/* --- Navigation --- */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-icon {
    display: inline-block;
    background-color: #e63946; /* Accent red color */
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    margin-right: 0.5rem;
    font-weight: 400;
}

.nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #ffffff !important;
}

/* --- Hero Content --- */
.hero-text-column h1 {
    line-height: 1.2;
}

.text-highlight {
    color: #c80036;
}

.lead {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* --- Decorative Lines --- */
.decorative-lines {
    list-style: none;
    padding-left: 0;
    margin-top: -30px; /* Adjust alignment */
}

.decorative-lines li {
    width: 25px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    margin-bottom: 15px;
}

.decorative-lines li:first-child {
    background-color: #e63946; /* First line is red */
}


/* --- Buttons --- */
.btn {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-custom-red {
    background-color: #c80036;
    color: #fff;
}

.btn-custom-red:focus,
.btn-custom-red:hover {
    background-color: #d62828;
    color: #fff;
    transform: translateY(-2px);
}

.btn-custom-outline {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.btn-custom-outline:focus,
.btn-custom-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

/* --- Hero Image --- */
.hero-image {
    max-height: 450px; /* Control image size */
    border-radius: 15px;
    /* subtle glow effect to match the design */
    box-shadow: 0 0 30px rgba(100, 180, 255, 0.1);
}

/* --- Scroll Down Indicator --- */
.scroll-down-indicator {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}


/* --- Responsive Adjustments for Mobile --- */
@media (max-width: 991.98px) {
    .hero-text-column {
        text-align: center;
    }

    .decorative-lines {
        display: none; /* Hide lines on smaller screens for cleaner look */
    }

    .hero-text-column .d-flex {
        justify-content: center; /* Center the inner container */
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding-bottom: 2rem;
    }
    .display-3 {
        font-size: 2.8rem; /* Make heading smaller on mobile */
    }
    .hero-image {
        max-height: 300px;
    }
    .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    .btn.me-3 {
        margin-right: 0 !important;
    }
}

/* --- Side Scroll Indicator (Enhanced) --- */
.scroll-indicator {
    position: fixed;
    top: 50%;
    left: 2vw; /* Position from the left edge of the viewport */
    transform: translateY(-50%);
    z-index: 1000;
}

.scroll-indicator ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Add position:relative so the span can be positioned next to it */
.scroll-indicator li {
    margin-bottom: 35px; /* Increased spacing */
    position: relative;
}

/* The visible line itself */
.scroll-indicator li a {
    display: block;
    width: 35px;  /* Increased width */
    height: 7px;  /* Increased height */
    background-color: rgba(255, 255, 255, 0.3); /* Default gray color */
    transition: background-color 0.3s ease;
}

/* The hidden text for the section name */
.scroll-indicator li span {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(10px); /* Position it slightly away */
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap; /* Prevent text from wrapping */
    opacity: 0; /* Hidden by default */
    visibility: hidden;
    transition: all 0.3s ease;
}

/* --- States and Hover Effects --- */

/* 1. Make the line red if it's the active section */
.scroll-indicator li.active a {
    background-color: #e63946;
}

/* 2. On hover over ANY list item, make the line red */
.scroll-indicator li:hover a {
    background-color: #e63946;
}

/* 3. On hover over ANY list item, show the text span */
.scroll-indicator li:hover span {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(20px); /* Move it slightly further on hover */
}

/* 4. If hovering over the ACTIVE item, make the text red too */
.scroll-indicator li.active:hover span {
    color: #e63946;
}

/* --- Featured Projects Section --- */
.featured-projects {
    background-color: #121820;
    padding: 100px 0;
    position: relative;
}

.view-all-link {
    color: #e63946;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: #fff;
}


/* --- Project Card Styling (for Grid) --- */
.project-card {
    background-color: #1a222c;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensures all cards in a row are the same height */
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card .card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-card h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-card p {
    color: rgba(255, 255, 255, 0.6);
}

.project-card .card-bio {
    flex-grow: 1; /* This will now be the only element that expands */
}

.project-card .details-link {
    color: #e63946;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
}

/* --- Animate On Scroll Setup --- */
.animate-on-scroll {
  opacity: 0; /* Hide element by default */
  transition: opacity 0.3s ease; /* Smooth fade-in if animation fails */
}

/* --- Services Section --- */
.services-section {
    background-color: #121820; /* Same dark background */
    padding: 100px 0;
}

.service-card {
    background-color: #1a222c; /* Slightly lighter card background */
    padding: 40px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%; /* Ensures cards in a row are the same height */
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: #e63946; /* Accent color on hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.service-icon {
    font-size: 2.5rem; /* Large icon size */
    color: #e63946;   /* Accent red color */
    margin-bottom: 20px;
}

/* --- Industries Section --- */
.industries-section {
    background-color: #1a222c; /* The slightly lighter dark background */
    padding: 100px 0;
}

.industry-item {
    text-align: center;
}

.industry-logo {
    width: 180px;
    height: 180px;
    border-radius: 50%; /* This makes the image circular */
    object-fit: cover; /* Ensures the image fills the circle without distortion */
    border: 3px solid rgba(255, 255, 255, 0.1);
    background-color: #121820; /* Dark background for the circle itself */
    padding: 5px; /* Creates a small inner border effect */
    transition: all 0.3s ease;
}

.industry-item:hover .industry-logo {
    border-color: #e63946; /* Highlight border on hover */
    transform: scale(1.05); /* Slightly enlarge the logo on hover */
}

/* --- Contact Section --- */
.contact-hero-section {
    position: relative;
    padding: 100px 0;
    background-color: #121820; /* Fallback color */
    background-image: url('/img/contact-hero.jpeg');
    background-size: cover;
    background-position: center;
}

/* This creates the dark gradient overlay */
.contact-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* The fade will extend 60% down the section */

    background:
        /* Top-down fade for navbar readability */
        linear-gradient(
            to bottom,
            rgba(13, 18, 24, 1) 0%,  /* Starts dark at the top */
            rgba(13, 18, 24, 0) 70%   /* Fades to transparent by the middle */
        ),
        /* Bottom-up fade for soft transition to content */
        linear-gradient(
            to top,
            rgba(13, 18, 24, 1) 0%,   /* Solid background color at the bottom */
            rgba(13, 18, 24, 0) 70%   /* Fades to transparent by the middle */
        );


    z-index: 2; /* Places the fade layer ON TOP of the background image */
}

/* This ensures the text and other content is on top of the new fade layer */
.contact-hero-section .container {
    position: relative;
    z-index: 3;
}

/* --- Add Drop Shadow to Jobs Hero Subtitle --- */
.contact-hero-section .lead {
    text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.7);
}

.contact-section {
    background-color: #0d1218; /* The darkest background color */
    padding: 100px 0;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-top: 40px;
}

.contact-info-item .contact-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(230, 57, 70, 0.1); /* Faded red background */
    color: #e63946; /* Red icon color */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-right: 20px;
}

.social-icons .social-icon-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: #1a222c;
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    margin-right: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-icons .social-icon-link:hover {
    background-color: #e63946;
    transform: translateY(-3px);
}

/* --- Contact Form Styling --- */
.contact-form-wrapper {
    background-color: #1a222c;
    padding: 40px;
    border-radius: 15px;
}

.contact-form-wrapper .form-label {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.5rem;
}

.contact-form-wrapper .form-control {
    background-color: #121820;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form-wrapper .form-control::placeholder {
    color: transparent;
}

.contact-form-wrapper .form-control:focus {
    background-color: #121820;
    color: #fff;
    border-color: #e63946;
    box-shadow: 0 0 0 0.25rem rgba(230, 57, 70, 0.25);
}

.form-privacy-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.form-privacy-text a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

.invalid-form-response{
  color: #ffda6a;
}

.invalid-form-response-input {
  border: 1px solid #ffda6a !important;
}

.form-privacy-text a:hover {
    color: #fff;
}

/* --- ABOUT US PAGE STYLES --- */

/* --- About Hero Section --- */
.about-hero-section {
    position: relative;
    padding: 100px 0;
    background-color: #121820;
    background-image: url('/img/cool-lighting-laptop.png'); /* Replace with your desired hero background */
    background-size: cover;
    background-position: center;
}

.laptop-frame {
    position: relative;
    max-width: 800px;
    margin: auto;
    background-color: #0d1218;
    padding: 60px 40px;
    border: 10px solid #2b3a4a;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Top Fade for Navbar Readability --- */

/*
  The .container within the hero needs a higher z-index to ensure
  its content (the laptop frame) sits on top of our new fade layer.
*/
.about-hero-section .container {
    position: relative;
    z-index: 3;
}

/*
  This creates the dark fade overlay using a pseudo-element.
  It sits on top of the background image but behind the container content.
*/
.about-hero-section::before {
    content: ''; /* This is required for pseudo-elements to render */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%; /* Controls how far down the page the fade extends */

    /* The gradient starts with a semi-dark color and fades to nothing */
    background: linear-gradient(
        to bottom,
        rgba(13, 18, 24, 1) 0%, /* Starts semi-opaque dark at the very top */
        rgba(13, 18, 24, 0) 100%    /* Fades to fully transparent at the 40% height mark */
    );

    z-index: 2; /* Places this fade layer above the background image */
}

/* --- Stats Section --- */
.stat-card {
    background-color: #1a222c;
    padding: 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card .display-3 {
    color: #e63946; /* Your highlight color */
}

/* --- Mission/Vision Tabs Section --- */
.mission-vision-section {
    background-color: #0d1218;
}

.mission-tabs .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 10px 20px;
    margin: 0 15px;
    transition: all 0.3s ease;
}

.mission-tabs .nav-link:hover {
    color: #fff;
}

.mission-tabs .nav-link.active {
    background-color: transparent;
    color: #fff;
    border-bottom-color: #e63946; /* Highlight color */
}

/* --- Team Section --- */
.team-section {
    background-color: #121820;
}

.team-social-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.team-social-links a:hover {
    color: #e63946;
}

/* --- Who We Are Section --- */
.who-we-are-section {
    background-color: #1a222c;
}

/* -- Footer --> */
.footer-bottom {
    color: #ffffff;
}
.footer-bottom a {
    color: #ffffff;
    text-decoration: none;
}

/* This targets ALL links within the footer section */
.footer-section .footer-list a,
.footer-section .footer-bottom a {
    color: #c80036; !important /* Your brand's red color */
    text-decoration: none; /* Remove the default underline */
    position: relative; /* Required for the pseudo-element underline */
    padding-bottom: 3px; /* Adds a little space between text and underline */
    transition: color 0.3s ease;
}

/* Create the underline using a pseudo-element, hidden by default */
.footer-section a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0; /* Start with zero width */
    height: 2px; /* Thickness of the underline */
    background-color: #c80036;
    transition: width 0.3s ease-out; /* Animate the width for a smooth effect */
}

/* On hover, make the underline grow to 100% width */
.footer-section a:hover::after {
    width: 100%;
}

/* --- Global Navbar Overlay --- */

/* This lifts the navbar out of the document flow and places it on top */
nav.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030; /* A high z-index to ensure it's on top of all other content */
}

/*
  Since the navbar no longer takes up space, we must add padding
  to the top of our hero sections to push their content down.
*/
.hero-section, .about-hero-section {
    padding-top: 90px; /* Adjust this value to match your navbar's height */
}

/*
  The hero sections were set to 100vh. The padding makes them too tall.
  We use box-sizing to include the padding within the 100vh height.
*/
.hero-section, .about-hero-section {
    box-sizing: border-box;
}

/* ======================================= */
/* ---   JOBS / WORK WITH US PAGE      --- */
/* ======================================= */

/* --- Jobs Page Hero Section with Top Fade --- */

/* This is the base style for the section */
.jobs-hero-section {
    position: relative; /* This is crucial for the overlay to work */
    padding: 100px 0;
    background-color: #121820; /* Fallback color */
    background-image: url('/img/laptop-with-red-keys.jpeg');
    background-size: cover;
    background-position: center;
}

/* This creates the dark gradient overlay */
.jobs-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* The fade will extend 60% down the section */

    background:
        /* Top-down fade for navbar readability */
        linear-gradient(
            to bottom,
            rgba(13, 18, 24, 1) 0%,  /* Starts dark at the top */
            rgba(13, 18, 24, 0) 70%   /* Fades to transparent by the middle */
        ),
        /* Bottom-up fade for soft transition to content */
        linear-gradient(
            to top,
            rgba(13, 18, 24, 1) 0%,   /* Solid background color at the bottom */
            rgba(13, 18, 24, 0) 70%   /* Fades to transparent by the middle */
        );


    z-index: 2; /* Places the fade layer ON TOP of the background image */
}

/* This ensures the text and other content is on top of the new fade layer */
.jobs-hero-section .container {
    position: relative;
    z-index: 3;
}

/* --- Add Drop Shadow to Jobs Hero Subtitle --- */
.jobs-hero-section .lead {
    text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.7);
}

/* --- Job Listings Table --- */
.job-listings-section .table {
    border-radius: 15px;
    overflow: hidden; /* Ensures border-radius is applied to table corners */
    border-collapse: separate; /* Required for border-radius to work in some browsers */
    border-spacing: 0;
}

.job-listings-section thead {
    background-color: #c80036; /* Your brand's red color for the header */
}

.job-listings-section .job-link {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}

.job-listings-section .job-link:hover {
    color: #c80036;
    text-decoration-color: #c80036;
}


/* ======================================= */
/* ---   ADMINISTRATION                --- */
/* ======================================= */

/* --- Jobs Page Hero Section with Top Fade --- */

/* This is the base style for the section */
.admin-hero-section {
    position: relative; /* This is crucial for the overlay to work */
    padding: 100px 0;
    background-color: #121820; /* Fallback color */
    background-image: url('/img/admin-hero.jpeg');
    background-size: cover;
    background-position: center;
}

/* This creates the dark gradient overlay */
.admin-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* The gradients */
    background:
        /* Top-down fade for navbar readability */
        linear-gradient(
            to bottom,
            rgba(13, 18, 24, 1) 0%,  /* Starts dark at the top */
            rgba(13, 18, 24, 0) 80%   /* Fades to transparent by the middle */
        ),
        /* Bottom-up fade for soft transition to content */
        linear-gradient(
            to top,
            rgba(13, 18, 24, 1) 0%,   /* Solid background color at the bottom */
            rgba(13, 18, 24, 0) 80%   /* Fades to transparent by the middle */
        );


    z-index: 2; /* Places the fade layer ON TOP of the background image */
}

/* This ensures the text and other content is on top of the new fade layer */
.admin-hero-section .container {
    position: relative;
    z-index: 3;
}

/* --- Add Drop Shadow to Jobs Hero Subtitle --- */
.admin-hero-section .lead {
    text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.7);
}

/* --- Job Listings Table --- */
.admin-section .table {
    border-radius: 15px;
    overflow: hidden; /* Ensures border-radius is applied to table corners */
    border-collapse: separate; /* Required for border-radius to work in some browsers */
    border-spacing: 0;
}

.admin-section thead {
    background-color: #c80036; /* Your brand's red color for the header */
}

.admin-section .job-link {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
    transition: all 0.3s ease;
}

.admin-section .job-link:hover {
    color: #c80036;
    text-decoration-color: #c80036;
}

/* --- Benefits Section --- */
.benefits-section {
    background-color: #121820; /* Dark background */
    overflow: hidden; /* Prevents decorative elements from spilling out */
}

/* Decorative blue and orange swoosh at the top */
.benefits-section::before {
    content: '';
    position: absolute;
    top: -150px;
    right: -200px;
    width: 800px;
    height: 400px;
    background-image:
        radial-gradient(circle at top right, #f77f00 0%, transparent 40%),
        radial-gradient(circle at top right, #005f73 0%, transparent 50%);
    opacity: 0.3;
    z-index: 1;
}

/* Decorative dots at the bottom left */
.benefits-section::after {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: 100px;
    height: 60px;
    background-image: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 15px 15px;
    opacity: 0.5;
    z-index: 1;
}

.benefits-section .container {
    position: relative;
    z-index: 2; /* Ensures content is on top of decorative elements */
}

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

.benefits-list li {
    font-size: 1.2rem;
    padding-left: 35px;
    position: relative;
    margin-bottom: 1rem;
}

/* Custom bullet points */
.benefits-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: #c80036; /* Red bullet points */
    font-size: 2rem;
    line-height: 1.2rem;
}

/* --- Benefits Image Collage --- */
.image-collage {
    position: relative;
    height: 450px; /* Container for the absolutely positioned images */
}

.image-collage img {
    position: absolute;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 3px solid #fff;
}

.benefit-img-1 {
    top: 0;
    right: 0;
    z-index: 3;
    width: 45%;
}

.benefit-img-2 {
    top: 38%;
    left: 0;
    transform: translateY(-50%);
    z-index: 2;
    width: 52%;
}

.benefit-img-3 {
    bottom: 0;
    right: 10%;
    z-index: 1;
    width: 50%;
}

/* Case Studies */
/* static/css/style.css */

/* ... keep all existing styles before this section ... */

/* Case Studies */
.case-study-hero-section {
    position: relative; /* This is crucial for the overlay to work */
    height: 30vh; /* Set a specific height for the hero section */
    min-height: 200px;
    padding-top: 100px; /* Keep top padding for nav, but remove bottom */
    background-color: #121820; /* Fallback color */
    background-image: url('/img/case-studies.jpeg');
    background-size: cover;
    background-position: center;
    display: flex; /* Added for better vertical alignment of content */
    align-items: center; /* Vertically center the text */
}

/* This creates the dark gradient overlay FOR BOTH TOP AND BOTTOM */
.case-study-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* The pseudo-element now covers the entire section */

    /* We apply two gradients, separated by a comma.
       One for the top fade, one for the bottom fade. */
    background:
        /* Top-down fade for navbar readability */
        linear-gradient(
            to bottom,
            rgba(13, 18, 24, 1) 0%,  /* Starts dark at the top */
            rgba(13, 18, 24, 0) 100%   /* Fades to transparent by the middle */
        ),
        /* Bottom-up fade for soft transition to content */
        linear-gradient(
            to top,
            rgba(13, 18, 24, 1) 0%,   /* Solid background color at the bottom */
            rgba(13, 18, 24, 0) 100%   /* Fades to transparent by the middle */
        );

    z-index: 2; /* Places the fade layer ON TOP of the background image */
}

/* This ensures the text and other content is on top of the new fade layer */
.case-study-hero-section .container {
    position: relative;
    z-index: 3;
}

/* --- Add Drop Shadow to case studies Hero Subtitle --- */
.case-study-hero-section .lead {
    text-shadow: 0px 2px 3px rgba(0, 0, 0, 0.7);
}
h1.case-study-hero-section  {
    text-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
}

/* --- Case Study Content Images --- */
.case-study-image {
    width: 75%;
    max-height: 40vh; /* Max height is 40% of the viewport height (Adjust as you like) */
    object-fit: cover; /* Ensures image covers the area without distortion */
    border-radius: 5px; /* Matches the site's aesthetic from other elements */
    margin: 2rem 0; /* Adds some vertical spacing above and below the image */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Adds some depth to lift it off the page */
}

/* Responsive adjustments for the benefits collage */
@media (max-width: 991.98px) {
    .image-collage {
        height: auto; /* Let it stack naturally */
    }

    .image-collage img {
        position: static; /* Reset positioning */
        width: 100%; /* Make images full-width */
        margin-bottom: 1rem;
        transform: none; /* Reset transform */
    }
}

/* ======================================= */
/* --- MOBILE-SPECIFIC RESPONSIVE FIXES --- */
/* ======================================= */

/*
  These styles apply to all screens with a max-width of 991.98px,
  which is Bootstrap's "lg" breakpoint (the point where the navbar collapses).
*/
@media (max-width: 991.98px) {

    /* 1. Hide the side scroll indicator on mobile */
    .scroll-indicator {
        display: none;
    }

    /* 2. Revert the navbar to normal document flow (no more overlay) */
    nav.navbar {
        position: static; /* This is the most important fix */
    }

    /* 3. Remove the large top padding from hero sections on mobile */
    .hero-section, .about-hero-section {
        padding-top: 2rem; /* Reset from 90px to a smaller, sensible padding */
    }

    /* 4. Style the expanded menu for readability and usability */
    .navbar-collapse {
        /* Give it a solid background so links don't overlap content */
        background-color: rgba(13, 18, 24, 0.98); /* Use your dark background color */

        /* Add spacing and rounded corners to match your site's aesthetic */
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Ensure nav items inside the expanded menu are spaced out nicely */
    .navbar-collapse .navbar-nav .nav-item {
        margin-bottom: 0.5rem;
    }
}

/* ======================================= */
/* ---   CASE STUDY DETAIL PAGE        --- */
/* ======================================= */
.case-study-content-section {
    background-color: #121820;
    padding: 0px 0 0;
}

.case-study-feature-row {
    padding: 50px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.case-study-feature-row:last-of-type {
    border-bottom: none;
}

.case-study-feature-row h3 {
    margin-bottom: 1.5rem;
}

.case-study-feature-row ul {
    list-style: none;
    padding-left: 0;
}

.case-study-feature-row li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.case-study-feature-row li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #c80036; /* Accent red */
    font-weight: bold;
}

.case-study-feature-row img {
    max-width: 100%;
    height: auto;
}

/* Carousel Section */
.carousel-section {
    background-color: #0d1218; /* Darkest background */
}

#trainingPlatformCarousel .carousel-item img {
    max-height: 80vh;
    object-fit: contain; /* Use 'contain' to ensure the full image is visible */
    margin: 0 auto;
}

/* Contact Section on Case Study Page */
.case-study-contact-section {
    background-color: #121820;
    padding: 10px 0 100px;
}

.case-study-contact-section .contact-form-wrapper {
    background-color: transparent; /* Remove the card background */
    padding: 0;
}

/* ... (keep all existing styles) ... */

/* ======================================= */
/* ---   CASE STUDY CTA SECTION        --- */
/* ======================================= */

.cta-section-case-study {
    background-color: #2a313a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 40px;
    overflow: hidden;
}

.cta-section-case-study .cta-image {
    border-radius: 10px;
    max-width: 220px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.btn-cta-sparkle {
    position: relative;
    background-color: #fff;
    color: #c80036; /* Brand red color */
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: bold;
    border: 3px solid #c80036; /* Red border */
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.btn-cta-sparkle:focus,
.btn-cta-sparkle:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(230, 57, 70, 0.25);
    border: 3px solid #c80036;
    color: #c80036;
}

/* Sparkles using inline SVG */
.btn-cta-sparkle::before,
.btn-cta-sparkle::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    background-repeat: no-repeat;
    /* Using an SVG of a 4-point star */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 0l-2.5 9.5-9.5 2.5 9.5 2.5 2.5 9.5 2.5-9.5 9.5-2.5-9.5-2.5z'/%3E%3C/svg%3E");
    animation: sparkle-animation 1.8s ease-in-out infinite;
}

/* Positioning the left sparkle */
.btn-cta-sparkle::before {
    bottom: -15px;
    left: -5px;
}

/* Positioning the right sparkle */
.btn-cta-sparkle::after {
    top: -15px;
    right: -5px;
    animation-delay: -0.9s; /* Stagger the animation */
}

/* Keyframe animation for sparkle effect */
@keyframes sparkle-animation {
  0% { transform: scale(0) rotate(0deg); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1.2) rotate(90deg); opacity: 0; }
}

.contact-form-wrapper-boxed {
    background-color: #1a222c; /* Dark card background from your design */
    padding: 40px;
    border-radius: 15px;
}

/* ======================================= */
/* ---   FREE GUIDE DOWNLOAD PAGE      --- */
/* ======================================= */

.guide-page-section {
    background-color: #121820;
    padding: 100px 0;
}

.guide-features-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.guide-features-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.guide-features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #c80036; /* Accent red */
    font-weight: bold;
    font-size: 1.2rem;
}

/* ======================================= */
/* ---   404 ERROR PAGE SECTION        --- */
/* ======================================= */

.error-hero-section {
    padding: 100px 0;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ======================================= */
/* ---   CHART.JS RESIZE BUG FIX       --- */
/* ======================================= */

.chart-container {
    position: relative;
    width: 100%;
}
