html {
    /* 1. Determines scrolling behavior */
    scroll-behavior: smooth; 
    
    /* 2. The offset: effectively the height of your sticky header */
    /* Your header is approx 80px tall (60px logo + 20px padding) */
    scroll-padding-top: 75px; 
}

:root {
    --primary-green: #1a4a1d;
    --accent-brown: #8B4513;
    --text-dark: #333;
    --light-bg: #f4f4f4;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-dark);
}

/* Header */
header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

/* Logo Styles */
.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
}

.logo-img {
    height: 60px;
    margin-right: 15px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    line-height: 1.2; /* Helps if text needs to wrap */
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
}

.btn-quote {
    background: var(--accent-brown);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-quote:hover {
    background: #6d360e;
}

/* Mobile Menu Icon */
.mobile-menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-green);
}

/* Hero Section */
.hero {
    /* 0.35 opacity overlay for lighter background */
    background: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('images/truck1.jpg');
    background-size: cover;
    background-position: center;
    height: 400px; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px; /* Add padding so text doesn't touch edges on mobile */
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.btn-primary {
    display: inline-block;
    background: var(--primary-green);
    color: var(--white);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    margin-top: 15px;
}

/* Sections */
.info-bar {
    background: var(--primary-green);
    color: var(--white);
    text-align: center;
    padding: 15px 0;
}

.section {
    padding: 50px 0;
}

.bg-light {
    background: var(--light-bg);
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-green);
    font-size: 2rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.service-card i {
    font-size: 40px;
    color: var(--accent-brown);
    margin-bottom: 15px;
}

/* Gallery - FIX FOR TRUCK IMAGES */
.gallery-grid {
    display: grid;
    /* CHANGED: reduced minmax from 400px to 280px to fit mobile screens */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-grid img {
    width: 100%;
    height: auto; /* Ensures aspect ratio is maintained */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Contact Form Layout */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info, .contact-form {
    flex: 1;
    min-width: 300px;
}

/* Fix for contact info on very small screens */
@media (max-width: 350px) {
    .contact-info, .contact-form {
        min-width: 100%;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 20px;
    color: var(--primary-green);
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.contact-item a {
    color: var(--text-dark);
    text-decoration: none;
}

.fb-link {
    display: inline-block;
    color: #3b5998;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Form Styles */
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-submit {
    background: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
}

.btn-submit:hover {
    background: #143d16;
}

footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* Responsive - MOBILE FIXES */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        align-items: flex-start;
        position: relative; /* Needed for absolute positioning of icon */
    }

    /* Fix for Logo Text touching Menu Icon */
    .logo-container {
        max-width: 85%; /* Ensures text doesn't run full width into the icon */
    }

    .mobile-menu-icon {
        display: block;
        position: absolute;
        top: 25px; /* Aligned vertically with logo */
        right: 20px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 10px 0;
        width: 100%;
    }
    
    /* Adjust logo size on mobile */
    .logo-text {
        font-size: 1.2rem;
    }
    
    .hero {
        height: 300px;
    }
    
    .hero h1 {
        font-size: 1.8rem; /* Smaller font for mobile hero */
    }
}