header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}

header .navbar {
    background-color: transparent !important;
    transition: background-color 0.3s ease;
}

header .navbar.scrolled {
    background-color: rgba(255,255,255, 0.95) !important;
}

/* Home page navigation styling */
.template-homepage header .navbar .nav-link {
    color: #ffffff !important;
}

.template-homepage header .navbar .nav-link:hover,
.template-homepage header .navbar .nav-link:focus {
    color: rgba(255, 255, 255, 0.8) !important;
}

.template-homepage header .navbar.scrolled .nav-link {
    color: #333 !important;
}

.template-homepage header .navbar.scrolled .nav-link:hover,
.template-homepage header .navbar.scrolled .nav-link:focus {
    color: #3f4f48 !important;
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    z-index: 1; /* Behind header */
}

.carousel-image-container {
    position: relative;
    height: 100vh;
    background-size: cover;
    background-position: center center;
}

.carousel-image-container img {
    display: none;
}

.carousel-no-image {
    height: 100vh;
    position: relative;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.carousel-indicators {
    bottom: 20px;
    z-index: 3;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 3;
}

/* Ensure content after carousel appears correctly */
.hero-carousel + section,
.hero-carousel ~ section:first-of-type {
    margin-top: 100vh;
}

/* Industry Challenges Section */
.challenges {
    background-color: #3f4f48 !important;
    color: white;
}

.challenges h2,
.challenges h3,
.challenges p {
    color: white !important;
}

.challenges .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

.challenge-border {
    background-color: #fff;
    height: 2px;
    width: 50px;
}

.ico-primary {
    color: #3f4f48 !important;
}

/* Features Section Styling */
.features .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.features .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.features .card-body {
    padding: 2rem;
}

.features .card-title {
    color: #3f4f48;
    font-weight: 600;
    margin-bottom: 1rem;
}

.features .card-text {
    color: #6c757d;
    line-height: 1.6;
}

.feature-icon {
    margin-bottom: 1.5rem !important;
}

.feature-icon i {
    height: 90px;
    width: 90px;
    border: 5px solid #ffffff;
    box-shadow: 3px 3px 3px 3px #f5f5f5;
    background-color: #f5f5f5;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.features .card:hover .feature-icon i,
.features .card.feature-raised .feature-icon i {
    transform: scale(1.05);
    box-shadow: 3px 3px 8px 3px #e9ecef;
}

/* Feature card raised animation */
.features .card.feature-raised {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Primary Button Styling */
.btn-primary {
    background-color: #3f4f48;
    border-color: #3f4f48;
    border-radius: 0.375rem;
}

.btn-primary:hover {
    background-color: #2f3f38;
    border-color: #2f3f38;
}

.btn-primary:focus, .btn-primary.focus {
    background-color: #2f3f38;
    border-color: #2f3f38;
    box-shadow: 0 0 0 0.2rem rgba(63, 79, 72, 0.5);
}

.btn-primary:active, .btn-primary.active {
    background-color: #2f3f38;
    border-color: #2f3f38;
}

.bg-primary, .bs-primary {
    background-color: #3f4f48 !important;
}


/* Sticky Footer Styles */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    padding-top: 70px; /* Account for fixed header height */
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

/* Generic Page Styling */
.generic-page {
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.generic-page .container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 3rem 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.generic-page h1 {
    color: #3f4f48;
    font-weight: 700;
    border-bottom: 3px solid #3f4f48;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.generic-page .rich-text {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
}

.generic-page .rich-text h2,
.generic-page .rich-text h3,
.generic-page .rich-text h4 {
    color: #3f4f48;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.generic-page .rich-text p {
    margin-bottom: 1.5rem;
}

.generic-page .rich-text blockquote {
    border-left: 4px solid #3f4f48;
    background-color: #f8f9fa;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.generic-page .rich-text ul,
.generic-page .rich-text ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.generic-page .rich-text li {
    margin-bottom: 0.5rem;
}

/* Form Page Styling */
.form-page {
    background-color: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.form-page .container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 3rem 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.form-page h1 {
    color: #3f4f48;
    font-weight: 700;
    border-bottom: 3px solid #3f4f48;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.form-page .form-intro,
.form-page .thank-you-text {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 2rem;
}

.form-page .form-intro h2,
.form-page .form-intro h3,
.form-page .thank-you-text h2,
.form-page .thank-you-text h3 {
    color: #3f4f48;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.form-page form {
    margin-top: 2rem;
}

.form-page .font-label {
    font-weight: 600;
    color: #3f4f48;
    margin-bottom: 0.5rem;
}

.form-page .form-control {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-page .form-control:focus {
    border-color: #3f4f48;
    box-shadow: 0 0 0 0.2rem rgba(63, 79, 72, 0.25);
}

.form-page .form-control.is-invalid {
    border-color: #dc3545;
}

.form-page .form-control.is-valid {
    border-color: #28a745;
}

.form-page .form-check-input {
    margin-top: 0.25rem;
}

.form-page .btn-primary {
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.form-page .alert {
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.form-page .text-danger {
    font-weight: 500;
}

.form-page .thank-you-text {
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3f4f48;
}

/* Services Section Styling */
.service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.service-card:hover,
.service-card.service-raised {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.service-card .card-body {
    padding: 2rem;
    min-height: 200px;
}

.service-header {
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 1rem;
}

.service-title {
    color: #3f4f48;
    font-weight: 600;
    margin-bottom: 0;
    font-size: 1.25rem;
    line-height: 1.3;
}

.service-content {
    display: flex;
    align-items: flex-start;
    padding-top: 1rem;
}

.service-description {
    color: #6c757d;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 0;
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .carousel-image-container,
    .carousel-no-image {
        height: 100vh;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption .lead {
        font-size: 1rem;
    }
    
    .generic-page .container {
        margin-top: 1rem;
        margin-bottom: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .generic-page h1 {
        font-size: 2rem;
    }
    
    .form-page .container {
        margin-top: 1rem;
        margin-bottom: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .form-page h1 {
        font-size: 2rem;
    }
    
    .form-page .thank-you-text {
        padding: 1.5rem;
    }
    
    .service-card .card-body {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .service-title {
        font-size: 1.1rem;
    }
    
    .service-description {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .features .card-body {
        padding: 1.5rem;
    }
    
    .features .card-title {
        font-size: 1.1rem;
    }
    
    .features .card-text {
        font-size: 0.9rem;
    }
}
