/* --- Foundational Styles & Variables --- */
:root {
    --primary-color: #004080;
    --primary-dark: #002a52;
    --secondary-color: #0066cc;
    --accent-color: #99ccff;
    --text-dark: #333;
    --text-light: #555;
    --background-light: #f8f9fa;
    --background-white: #fff;
    --border-color: #e5e5e5;
    --font-family: 'Roboto', sans-serif;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--background-white);
}

h1 {
  text-align: center;
  color: var(--primary-color);
  font-size: clamp(3rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  font-weight: 800;
}

h2 {
    text-align: center;
    color: var(--primary-color);
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.date {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

/* --- Page Specific Overrides --- */
/* Example: H1 color override for a specific page */
.methodology-page h1 {
    color: var(--primary-color); /* Blue */
}

/* --- Header & Navigation --- */
.header {
    background: var(--primary-color);
    color: var(--background-white);
    padding: 0 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    height: var(--header-height);
}
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.logo {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 700;
}
.logo a {
    display: flex;
    align-items: center;
    color: var(--background-white);
    text-decoration: none;
}
.header-logo-img {
    height: 45px;
    width: auto;
    margin-right: 12px;
}
.main-nav {
    display: flex;
    position: static;
    background: none;
    width: auto;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
}
.main-nav a {
    color: var(--background-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}
.main-nav a:hover, .main-nav a.active {
    color: var(--accent-color);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--background-white);
    font-size: 2rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(rgba(0, 40, 80, 0.7), rgba(0, 40, 80, 0.7)), url('hero-banner-new.jpg') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    /* This makes all paragraphs and other non-heading text white by default */
    color: var(--background-white); 
}
.hero-content {
    max-width: 900px;
}
/* Override the global h1 style ONLY inside the hero */
.hero h1 {
    font-size: clamp(4.5rem, 6vw, 3.8rem);
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--background-white);
}
/* Override the global h2 style ONLY inside the hero */
.hero h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--background-white);
}
.hero .subheading {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-bottom: 2rem;
    font-weight: 400;
    opacity: 0.95;
}
.crisis-stats {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem auto;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 1.1rem;
    font-weight: 500;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.btn {
    background: var(--secondary-color);
    color: var(--background-white);
    padding: 0.9rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn:hover {
    background: #0052a3;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-white {
    background: var(--background-white);
    color: var(--primary-color);
}
.btn-white:hover {
    background: var(--accent-color);
    color: var(--primary-dark);
}

/* --- General Section Styling --- */
section {
    padding: 5rem 1.5rem;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    margin-top 150px;
 /* Adjust margin-top if needed, or place content inside sections with padding */
}
.content-container {
    /* This calculates the header's height (70px) and adds 
      40px of extra space. Adjust the 40px as needed.
    */
    padding-top: calc(var(--header-height) + 40px);
}
.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

/* --- Trust Section --- */
.trust-section {
    background: var(--primary-dark);
    color: var(--background-white);
}
.trust-section h2 {
    color: var(--background-white);
}
.trust-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.trust-stat {
    text-align: center;
}
.trust-stat .number {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--accent-color);
}
.trust-stat .label {
    font-size: 1.1rem;
}

/* --- Services & Insights Grid --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,64,128,0.15);
}
.card h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.card p {
    color: var(--text-light);
}
.card .price {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.card .duration {
    color: #777;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.card ul {
    list-style: none;
    margin: 1rem 0 0;
}
.card ul li {
    padding: 0.4rem 0 0.4rem 1.5rem;
    position: relative;
}
.card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: 700;
}
.insight-card a {
    text-decoration: none;
    color: inherit;
}
.insight-card:hover h3 {
    color: var(--secondary-color);
}

/* --- Data Sections --- */
.tmc-section {
    background: var(--background-light);
    text-align: center;
}

.data-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--background-white);
    padding: 60px 0; /* Standardized padding */
}
.data-section h2 {
    color: var(--background-white);
}
.data-section .section-subtitle {
    color: rgba(255,255,255,0.9);
}

/* New: Wrapper for the two-column layout in the data section */
.data-section .data-content-wrapper {
    display: flex;
    align-items: center; /* Vertically centers the content */
    gap: 50px;
    flex-wrap: wrap; /* Allows stacking on mobile */
    margin-top: 3rem;
}

/* Styles for the column containing the stats */
.data-section .data-stats-column {
    flex: 1.5; /* Makes this column slightly wider for the stats grid */
    min-width: 300px;
    display: grid; /* Retain grid for stats within this column */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

/* Styles for the image column */
.data-section .data-image-column {
    flex: 1; /* Makes the image column take up less space */
    min-width: 300px;
}

.data-section .data-image-column img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2); /* Adds a subtle shadow */
}

.data-point {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    height: 100%; /* Ensures all data points are same height in grid */
    display: flex; /* Helps vertically center content in data points */
    flex-direction: column;
    justify-content: center;
}
.data-point .stat {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
    .data-section .data-content-wrapper {
        flex-direction: column-reverse; /* Stacks image above stats on mobile */
    }
    .data-section .data-stats-column {
        grid-template-columns: 1fr; /* Stacks stats vertically on mobile */
    }
}



/* --- About Section (Definitive Version) --- */
#about {
    padding: 60px 0;
    background-color: var(--background-white);
}

/* This is the main flex container that holds the two columns. */
#about .about-section-container {
    display: flex;          /* Activates the side-by-side layout */
    align-items: center;    /* Vertically centers the content in each column */
    gap: 50px;              /* Creates space between the text and image */
    flex-wrap: wrap;        /* Allows columns to stack on small screens */
}

/* This styles the text column. */
#about .about-text-column {
    flex: 2;                /* KEY: Makes this column twice as wide as the image column */
    min-width: 300px;       /* Prevents the column from becoming too small */
    text-align: left;
}

/* This styles the image column. */
#about .about-image-column {
    flex: 1;                /* KEY: Makes this column half the size of the text column */
    min-width: 300px;
}

/* This ensures the image fits perfectly inside its column. */
#about .about-image-column img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* --- Responsive Stacking for Mobile --- */
@media (max-width: 768px) {
    #about .about-section-container {
        flex-direction: column; /* Stacks the columns vertically */
    }
    #about .about-text-column {
        text-align: center;     /* Centers the text when stacked */
    }
}

/* --- Clients / Who We Serve Section --- */
.clients-section {
    padding: 60px 0;
    background-color: var(--background-light); /* Use light background to alternate */
}

.clients-section .clients-container {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.clients-section .clients-text-column,
.clients-section .clients-image-column {
    flex: 1;
    min-width: 300px;
}

.clients-section .clients-text-column h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    text-align: left;
}

.clients-section .clients-text-column p {
    text-align: left;
}

.clients-section .clients-image-column img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,64,128,0.15);
}

/* Styling for the bullet point list */
.clients-section .clients-text-column ul {
    list-style: none;
    margin-top: 1.5rem;
    padding-left: 0;
    text-align: left;
}

.clients-section .clients-text-column ul li {
    padding: 0.5rem 0 0.5rem 1.8rem;
    position: relative;
    font-size: 1.1rem;
    font-weight: 500;
}

.clients-section .clients-text-column ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0.6rem;
    color: var(--secondary-color);
    font-weight: 900;
    font-size: 1.2rem;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
    .clients-section .clients-container {
        flex-direction: column-reverse; /* Places the impactful image first on mobile */
    }
    .clients-section .clients-text-column h3,
    .clients-section .clients-text-column p {
        text-align: center; /* Center-align text when stacked */
    }
    .clients-section .clients-text-column ul {
        display: inline-block; /* Helps with centering the list block */
        margin: 1.5rem auto 0;
        padding-left: 1rem; /* Adjust padding for mobile */
    }
}

/* --- Drive with Confidence Section --- */
.confidence-section {
    /* Uses your new image as a full-width background */
    background: linear-gradient(rgba(0, 40, 80, 0.7), rgba(0, 40, 80, 0.7)), url('/images/Truck-dash-no-red-warnings.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; /* This creates the parallax scrolling effect */
    padding: 6rem 2rem;
    text-align: center;
    color: var(--background-white);
}

.confidence-section .confidence-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Overrides the default blue h2 color to be white */
.confidence-section h2 {
    color: var(--background-white);
    margin-bottom: 1.5rem;
}

.confidence-section p {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

/* This section re-uses the .btn and .btn-white classes you already have! */


/* --- Contact Form --- */
form {
    display: grid;
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}
input, textarea, select {
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,64,128,0.1);
}
button[type="submit"] {
    cursor: pointer;
    border: none;
    font-family: var(--font-family);
    justify-self: center;
    width: 100%;
    max-width: 300px;
}
.contact-info {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--background-white);
    border-radius: 8px;
}

.related-services {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.related-services h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.related-services .section-subtitle {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #666;
}

.related-services .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.related-services .card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.related-services .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.related-services .card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

.related-services .card h3 a {
    color: #2563eb;
    text-decoration: none;
}

.related-services .card h3 a:hover {
    text-decoration: underline;
}

.related-services .card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* --- Services Styling --- */

/* ==========================================================================
   Service Page Banner - Risk Assessment
   ========================================================================== */

/* 1. Generic banner structure for service pages */
.page-banner {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #fff;
    padding: 80px 20px; /* Reduced from 100px */
    position: relative;
    text-align: center;
    min-height: 350px; /* Reduced from 400px */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark overlay for text readability on top of images */
.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.5); /* A slightly blue-dark overlay */
    z-index: 1;
}

/* Content wrapper (text and buttons) within the banner */
.page-banner .page-banner-content {
    position: relative;
    z-index: 2; /* Ensures content is above the overlay */
    max-width: 800px;
}

.page-banner h1 {
    font-size: 3.2em;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4); /* Adds subtle depth to text */
}

.page-banner .intro {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-banner .page-banner-buttons {
    margin-top: 30px;
}

/* 2. Specific background image for the Risk Assessment page */
.risk-assessment-banner {
    background-image: url('../images/Riskassessementheroimage.jpg');
    /* NOTE: Adjust this path if your CSS file is not in a 'css' subfolder */
}

/* --- Banner Image Art Direction --- */
@media (max-width: 768px) {
    /* Replace '.your-banner-class' with the actual class of the banner 
      you want to change. For example: .sms-banner or .risk-assessment-banner 
    */
    .risk-assessment-banner {
        background-image: url('/images/Riskassessementheroimage-mobile.jpg');
        background-position: center center; /* Re-centers the new mobile image */
    }
}

/* ==========================================================================
   SMS Development Service Page Banner
   ========================================================================== */

.sms-dev-banner {
    background-image: url('/images/SMSdevelopment.jpg');
    background-position: center center; 
}

@media (max-width: 768px) {
    .sms-dev-banner {
        background-image: url('/images/SMSdevelopment-mobile.jpg');
        background-position: center 10%; 
    }
}


/* --- Responsive Adjustments for the Banner --- */
@media (max-width: 768px) {
    .page-banner {
        padding: 60px 20px; /* Reduced from 80px */
        min-height: 280px; /* Reduced from 300px */
    }

    .page-banner h1 {
        font-size: 2.5em;
    }

    .page-banner .intro {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .page-banner h1 {
        font-size: 2em;
    }

    .page-banner .intro {
        font-size: 1.1em;
    }
}

/* --- Footer --- */
footer {
    background: var(--primary-dark);
    color: var(--background-white);
    text-align: center;
    padding: 3rem 1.5rem;
}
footer p {
    margin: 0.5rem 0;
    opacity: 0.8;
}
footer a {
    color: var(--accent-color);
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background: var(--primary-color);
    }
    .main-nav.show {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    .main-nav li {
        text-align: center;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .main-nav a {
        display: block;
        padding: 1rem;
        font-size: 1rem;
    }
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 0.25rem !important!;
    }
    section {
        padding: 1rem 1rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }
    .hero {
        min-height: 95vh;
    }
    .hero h1 {
        font-size: 2.2rem; /* Adjusted for better fit on small screens */
        line-height: 1.3;
        margin-bottom: 0.5rem; /* Reduced margin to pull text up */
    }
    .hero .subheading {
        font-size: 1.1rem;
        line-height: 1.4;
        margin-bottom: 1rem; /* Reduced margin for tighter spacing */
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
        text-align: center;
        padding: 0.9rem;
        font-size: 1rem;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    /* Homepage Mobile Padding Fix - Simpler approach: Reduce global body padding */
    body {
        padding-top: calc(var(--header-height) - 1.5rem); /* Reduced by 1.5rem to pull content up */
    }
    /* Target hero-content specifically for homepage to fine-tune */
    #home .hero-content {
        padding-top: 0;
    /*    margin-top: -0.5rem; /* Slight negative margin to pull up further */
    }
}
