html {
    scroll-behavior: smooth;
}

/* VARIABLES */
:root {
    --primary: #0056b3; /* Castle Blue */
    --primary-dark: #003d80; 
    --dark: #1a1a1a;    
    --light: #f4f4f4;
    --white: #ffffff;
    --text-grey: #555;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark);
}

h1, h2, h3 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* UTILITIES */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-space-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.highlight { color: var(--primary); }

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    display: inline-block;
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 10px;
    transition: 0.3s;
}

.btn-secondary:hover { background: var(--white); color: var(--dark); }

/* TOP BAR */
.top-bar {
    background: var(--dark);
    color: var(--light);
    padding: 10px 0;
    font-size: 0.9rem;
}
.contact-info span { margin-right: 20px; }
.login-link { color: #4facfe; font-weight: bold; }
.client-area {
    display: none;
}

/* NAVBAR */
.navbar {
    background: var(--white);
    padding: 10px 0; /* Reduced padding slightly for image logo */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* UPDATED LOGO STYLES */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 65px; /* Ensures logo fits nicely in navbar */
    width: auto;
}

.nav-links { display: flex; align-items: center; }
.nav-links li { margin-left: 30px; font-weight: 500; }

/* HERO SECTION */
.hero {
    height: 85vh; 
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('castlefleet.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 20px; }
.hero h1 { font-size: 3.5rem; margin-bottom: 20px; text-shadow: 2px 2px 4px rgba(0,0,0,0.7); }
.hero p { font-size: 1.2rem; margin-bottom: 30px; text-shadow: 1px 1px 2px rgba(0,0,0,0.7); }

/* STATS */
.stats { background: var(--primary); padding: 30px 0; color: var(--white); text-align: center; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

/* SERVICES */
.section-padding { padding: 60px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 40px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card {
    background: var(--white);
    padding: 30px;
    border: 1px solid #eee;
    text-align: center;
    transition: 0.3s;
    border-bottom: 4px solid transparent;
}
.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--primary); 
}
.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary);
    background-color: #e6f0ff;
    width: 80px;
    height: 80px;
    line-height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

/* PROJECTS GALLERY */
.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s;
}

.project-item:hover img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 86, 179, 0.9), rgba(0, 86, 179, 0));
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s;
}

.project-item:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h4 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
}

/* FLEET SECTION */
.fleet-section { background: var(--dark); color: var(--white); padding: 60px 0; }
.flex-row { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.fleet-text { flex: 1; min-width: 300px; }

.fleet-image { 
    flex: 1; 
    min-width: 300px; 
    height: 400px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
    border-radius: 4px;
    border: 2px solid #333;
}

.fleet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.specs-list li { margin-bottom: 10px; border-bottom: 1px solid #444; padding-bottom: 5px; }
.text-left { text-align: left; }

/* FORM */
.bg-light { background: var(--light); }
.form-wrapper { max-width: 600px; margin: 0 auto; background: var(--white); padding: 40px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }

/* LIVE PRICE DISPLAY IN FORM */
.form-quote-result {
    background-color: #e6f0ff;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.form-quote-result label {
    font-size: 0.9rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.form-quote-result p {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 0;
}

.full-width { width: 100%; }

/* FOOTER */
footer { background: #111; color: #888; text-align: center; padding: 20px 0; margin-top: auto; }

/* RESPONSIVE (Mobile Phone Tweaks) */
@media (max-width: 768px) {
    /* Stack the logo and menu vertically */
    .navbar .container {
        flex-direction: column;
        padding-bottom: 10px;
    }

    /* Make the logo smaller on mobile */
    .logo img {
        max-height: 50px;
        margin-bottom: 10px;
    }

    /* Show the links and stack them */
    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        text-align: center;
    }

    /* Add space between mobile links */
    .nav-links li {
        margin: 5px 0;
        width: 100%;
    }

    /* Make the buttons big and easy to tap */
    .nav-links li a {
        display: block;
        padding: 10px;
        background: #f4f4f4; /* Light grey background for easy tapping */
        border-radius: 4px;
    }

    /* Make the "Get Quote" button blue */
    .nav-links li .btn-primary {
        background: var(--primary);
        color: white;
    }
    
    /* --- Collapsing Mobile Menu --- */
    .navbar.nav-collapsed .nav-links {
        max-height: 0;
        overflow: hidden;
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
        opacity: 0;
    }

    .navbar.nav-collapsed .logo img {
        max-height: 45px; /* Slightly smaller logo when collapsed */
    }

    .navbar .nav-links {
        transition: max-height 0.4s ease-out, opacity 0.3s ease-in-out;
        max-height: 500px; /* Adjust if your menu is taller */
        opacity: 1;
    }
    /* --- End Collapsing --- */

    /* Adjust Hero text size */
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    /* Stack the fleet section */
    .flex-row { flex-direction: column; }
    .fleet-image { height: 250px; width: 100%; }
}

/* FORM UTILITIES */
.hidden {
    display: none;
}
/* Make the date picker look consistent */
input[type="date"] {
    font-family: 'Roboto', sans-serif;
    color: #555;
}

/* TEXTAREA STYLING */
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    resize: vertical; /* Allows user to drag it bigger */
}

/* WHATSAPP FLOAT */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    /* (Keep your existing mobile menu code here...) */

    /* SWAP BACKGROUND FOR MOBILE */
    .hero {
        background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('castlefleet-mobile.jpg');
        background-position: center center;
        background-size: cover;
    }
}

/* ELITE FORM POLISH */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.2); /* Soft blue glow */
    transition: all 0.3s ease;
}

/* Improve button click feel */
.btn-primary:active {
    transform: scale(0.98); /* Slight press effect */
}