/* General Styles */
:root {
    --primary-brand-color: #005dab; /* User's main blue */
    --accent-color: #37b554; /* User's green for accents */
    --neutral-grey: #a7a9ac; /* User's grey for neutral elements/borders */
    --white: #ffffff; /* User's white */
    --dark-text: #222; /* Original dark text color */

    /* Dark Mode Colors */
    --dark-mode-bg: #1a1a1a; /* Dark background for the body */
    --dark-mode-surface: #2c2c2c; /* Slightly lighter dark for cards/sections */
    --dark-mode-text: #e0e0e0; /* Light text for dark background */
    --dark-mode-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* Darker shadow for contrast */

    /* Existing colors, re-mapped or kept for specific purposes */
    --text-color: var(--dark-mode-text); /* Use dark mode text by default */
    --light-text-color: var(--white);
    --bg-light: var(--dark-mode-surface); /* Use dark mode surface for light backgrounds */
    --bg-dark: #111; /* Even darker for footer */
    --shadow: var(--dark-mode-shadow);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-mode-bg); /* Main dark background */
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: var(--primary-brand-color);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    text-align: center;
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: var(--primary-brand-color);
}

h2 {
    font-size: 2.5em;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 40px;
    color: var(--dark-mode-text); /* Ensure headings are visible */
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    background-color: var(--primary-brand-color);
    color: var(--light-text-color);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

/* Header & Navigation */
header {
    background-color: var(--dark-mode-surface); /* Darker header */
    color: var(--dark-mode-text); /* Light text for header */
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--dark-mode-text); /* Light text for nav links */
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown > a i {
    margin-left: 6px;
    font-size: 0.7em;
}

.dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--dark-mode-surface);
    box-shadow: var(--shadow);
    border-radius: 6px;
    min-width: 220px;
    z-index: 3000;
    padding: 10px 0;
    text-align: left;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

.dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 8px;         
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--dark-mode-text);
    font-weight: 400;
    transition: background-color 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.dropdown-menu a:hover {
    background-color: var(--accent-color);
    color: var(--white);
    padding-left: 25px;
}

.dropdown-menu hr {
    margin: 8px 15px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.dropdown-menu .sub-label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--accent-color);
    padding: 6px 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Smooth stagger animation for dropdown links */
.dropdown-menu li { opacity: 0; transform: translateY(-5px); transition: opacity .25s, transform .25s; }
.dropdown:hover .dropdown-menu li,
.dropdown:focus-within .dropdown-menu li { opacity: 1; transform: translateY(0); }

.dropdown:hover .dropdown-menu li:nth-child(1) { transition-delay: 0.05s; }
.dropdown:hover .dropdown-menu li:nth-child(2) { transition-delay: 0.1s; }
.dropdown:hover .dropdown-menu li:nth-child(3) { transition-delay: 0.15s; }
.dropdown:hover .dropdown-menu li:nth-child(4) { transition-delay: 0.2s; }
.dropdown:hover .dropdown-menu li:nth-child(5) { transition-delay: 0.25s; }

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.burger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
}

.burger div {
    width: 30px;
    height: 3px;
    background-color: var(--dark-mode-text); /* Light burger lines */
    transition: all 0.3s ease;
}

.hero-slider-section {
    position: relative;
    width: 100%;
    height: 20vh;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
    isolation: isolate;
}

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

/* Each slide */
.slide {
    position: absolute;
    inset: 0;
    padding: 0; /* remove any default vertical spacing */
    min-height: unset;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 1s ease-in-out, transform 1.8s ease;
    z-index: 0;
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
    animation: heroZoom 8s ease-in-out forwards;
}

/* Overlay (with slight parallax drift) */
.slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6));
    z-index: 0;
    background-position: center center;
    transition: background-position 6s ease-in-out;
}
.slide.active::before {
    background-position: center top;
}

/* Slide content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 5px 10px; /* reduce internal padding around text */
    margin: 0; 
    color: var(--light-text-color);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.slide.active .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.hero-content h1 {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 5px;
    color: var(--light-text-color);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInText 1.2s ease both;
}

.hero-content p {
    font-size: clamp(0.9rem, 1.6vw, 1.1rem);
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
    animation: fadeInText 1.4s ease both;
}

.hero-content .btn {
    padding: 10px 22px;
    border-radius: 30px;
    font-size: 0.9rem;
    animation: fadeInText 1.6s ease both;
}

/* Arrows */
.slider-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 3;
    padding: 0 25px;
    pointer-events: none;
}

.slider-arrow {
    pointer-events: auto;
    background-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3em;
    transition: background-color 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(4px);
}
.slider-arrow:hover {
    background-color: rgba(255,255,255,0.6);
    transform: scale(1.15);
}

/* Dots */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.slider-dots button {
    width: 10px;
    height: 10px;
    background-color: rgba(255,255,255,0.4);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}
.slider-dots button.active {
    background-color: var(--accent-color);
    transform: scale(1.3);
}

/* Animations */
@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}
@keyframes fadeInText {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Pause animation and autoplay on hover */
.hero-slider-section:hover .slide.active {
    animation-play-state: paused;
}

/* Features Section */
.features {
    background-color: var(--dark-mode-bg); /* Use main dark background */
    margin-top: 0;
    padding-top: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-item {
    background-color: var(--dark-mode-surface); /* Dark surface for feature cards */
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: block;
    color: var(--dark-mode-text); /* Light text for feature items */
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.feature-item i {
    font-size: 3em;
    color: var(--primary-brand-color); /* Changed from accent-color to primary-brand-color */
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--primary-brand-color);
}

.feature-item p {
    color: var(--dark-mode-text); /* Light text for feature descriptions */
}

/* Partners Section (Carousel) */
.partners {
    background-color: var(--dark-mode-bg); /* Use main dark background */
    padding: 0px 0;
    position: relative;
}

.partners-carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.partners-carousel-track {
    display: flex;
    will-change: transform;
    white-space: nowrap;
}

.partner-item {
    width: 200px; /* consistent box width */
    height: 130px; /* consistent box height */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    overflow: hidden; /* ensures image never leaks out */
    flex-shrink: 0;
}

.partner-logo {
    width: 180px;                /* Uniform width */
    height: 120px;               /* Uniform height */
    max-width: 100%;             /* Prevents overflow */
    max-height: 100%;            /* Keeps logo contained */
    object-fit: contain;         /* Keeps logos proportional without distortion */
    background-color: transparent;
    filter: grayscale(100%) invert(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;              /* Centres inside flex parent */
}

.partner-logo:hover {
    filter: grayscale(0%) invert(0%); /* Colour on hover, revert inversion */
    opacity: 1;
    transform: scale(1.05);
}

/* Testimonials Section */
.testimonials {
    background-color: var(--dark-mode-bg); /* Use main dark background */
    position: relative;
    overflow: hidden;
}

.carousel-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding: 0 50px;
}

.testimonial-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.testimonial-item {
    min-width: 100%;
    padding: 40px;
    background-color: var(--dark-mode-surface); /* Dark surface for testimonial cards */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.testimonial-item.active {
    display: flex;
}

.testimonial-item p {
    font-size: 1.2em;
    font-style: italic;
    margin-bottom: 20px;
    color: var(--dark-mode-text); /* Light text for testimonials */
}

.testimonial-item h4 {
    font-size: 1.1em;
    color: var(--primary-brand-color);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2); /* Lighter background for buttons */
    color: var(--light-text-color);
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 1.5em;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

/* Contact Section */
.contact {
    background-color: var(--dark-mode-bg); /* Use main dark background */
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--dark-mode-surface); /* Dark surface for form */
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: left;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-mode-text); /* Light text for labels */
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #555; /* Darker border for inputs */
    background-color: #3a3a3a; /* Darker input background */
    color: var(--dark-mode-text); /* Light text in inputs */
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    width: auto;
    padding: 12px 30px;
    margin-top: 10px;
}

.error-message {
    color: #ff6b6b; /* Brighter error message for dark mode */
    font-size: 0.9em;
    margin-top: 5px;
    text-align: left;
}

.form-status {
    margin-top: 20px;
    font-weight: 600;
    text-align: center;
    color: var(--dark-mode-text); /* Ensure status message is visible */
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background-color: var(--dark-mode-surface); /* Kept dark-mode-surface */
    color: var(--light-text-color); /* Changed to light-text-color (white) */
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: left;
}

.contact-info .logo {
    margin-top: 50px;
    text-align: center;
}

.contact-info .logo-img {
    filter: invert(1);
    opacity: 1;
    display: block;
    margin-top: 30px;
    margin: 50px auto 0;
}

.contact-info h3 {
    color: var(--light-text-color); /* Changed to light-text-color (white) */
    margin-bottom: 25px;
    font-size: 1.8em;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.1em;
    color: var(--light-text-color); /* Changed to light-text-color (white) */
}

.contact-info p i {
    margin-right: 15px;
    font-size: 1.3em;
    color: var(--light-text-color); /* Changed to light-text-color (white) */
}

.contact-info a {
    color: var(--light-text-color); /* Changed to light-text-color (white) */
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--accent-color);
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--light-text-color); /* Changed to light-text-color (white) */
    font-size: 1.8em;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-brand-color); /* Kept primary-brand-color on hover */
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: var(--light-text-color);
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9em;
}

.credit-line {
    margin-top: 10px;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
}

.credit-line a {
    color: var(--accent-color);
    font-weight: 600;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.credit-line a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Service Page Specific Styles */
.hero-small {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/images/hero-small-bg.webp') no-repeat center center/cover; /* Darker overlay */
    color: var(--light-text-color);
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-small .hero-content h1 {
    font-size: 3em;
}

.hero-small .hero-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.service-details {
    padding: 60px 0;
    text-align: left;
    background-color: var(--dark-mode-bg); /* Use main dark background */
}

.service-details h3 {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--primary-brand-color);
    text-align: center;
}

.service-details p {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.8;
    color: var(--dark-mode-text); /* Light text for service details */
}

.service-details ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.service-details ul li {
    background-color: var(--dark-mode-surface);
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: flex-start;
    gap: 12px; /* space between icon and text */
    font-size: 1.05em;
    color: var(--dark-mode-text);
    line-height: 1.6;
}

.service-details ul li i {
    color: var(--accent-color);
    font-size: 1.3em;
    margin-top: 4px; /* aligns checkmark vertically with first line */
    flex-shrink: 0;
}

/* The text block next to the icon */
.service-details ul li div {
    display: flex;
    flex-direction: column;
}

/* Bold titles (Safety First, etc.) */
.service-details ul li strong {
    color: var(--primary-brand-color);
    font-weight: 700;
    display: inline-block;
    margin-bottom: 4px;
}


.service-details .btn {
    margin-top: 40px;
    text-align: center;
    width: fit-content;
    display: block;
    margin-left: auto;
    margin-right: auto;
}


/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3em;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .contact-container {
        flex-direction: column;
        align-items: center;
        max-width: 100%;
    }

    .contact-form, .contact-info {
        width: 100%;
        max-width: 500px;
    }

    .hero-small .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-slider-section {
        padding: 0;
        height: 25vh; /* slightly smaller on tablets */
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 20px;
    }

    .nav-links {
        position: fixed;
        right: 0;
        top: 70px;
        height: calc(100vh - 70px);
        background-color: var(--dark-mode-surface); /* Dark surface for mobile nav */
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        padding-top: 50px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5); /* Darker shadow for mobile nav */
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links li {
        opacity: 0;
        margin: 25px 0;
    }

    .nav-links li a {
        font-size: 1.5em;
        color: var(--dark-mode-text); /* Light text on mobile nav */
    }

    .burger {
        display: flex;
    }

    .hero-slider-section {
        padding: 0;
        height: 18vh; /* compact view for mobile */
        min-height: 160px;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .hero-content p {
        font-size: clamp(0.9rem, 2vw, 1rem);
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: none;
        padding-left: 20px;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    }
}

@media (max-width: 480px) {
  .logo-img { max-height: 45px; }
  .hero-slider-section { padding: 0; height: 30vh; }
  .hero-content h1 { font-size: 2em; }
  .hero-content p { font-size: 1em; }
  .btn { padding: 10px 20px; font-size: 0.9em; }
  h2 { font-size: 1.8em; }
  .feature-item { padding: 25px; }
  .testimonial-item p { font-size: 1em; }
  .contact-form, .contact-info { padding: 30px; }
  .hero-small { height: 30vh; }
  .hero-small .hero-content h1 { font-size: 1.8em; }
  .service-details p { font-size: 1em; }
  .service-details ul { grid-template-columns: 1fr; }
}