@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #ffffff;
    --secondary-color: #2c3e50; /* Dark blue for text */
    --accent-color: #007BFF; /* A professional blue */
    --light-gray: #f4f4f9;
    --border-color: #e1e1e6;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--primary-color);
    color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    position: fixed;
    top: 20px; /* Position it a bit down from the top */
    left: 50%;
    transform: translateX(-50%);
    width: auto; /* Let the content define the width */
    max-width: 90%; /* Ensure it doesn't get too wide */
    padding: 0.5rem 1rem; /* Adjust padding for the new look */
    z-index: 100;
    background: rgba(255, 255, 255, 0.7); /* Slightly more transparent */
    backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 50px; /* Rounded corners for the pill shape */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

header nav {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensure items are spaced out */
    width: 100%;
}

.logo-link {
    text-decoration: none;
}

.logo {
    font-size: 1.2rem; /* Slightly smaller logo */
    font-weight: 700;
    color: var(--accent-color); /* Make logo blue by default */
    padding: 0.5rem 1rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem; /* Space between nav items */
}

nav ul li a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 400;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
    background-color: var(--accent-color);
}

.hamburger-menu {
    display: none; /* Hidden by default */
    cursor: pointer;
}

.hamburger-menu .line {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    background: url('hero-bg.jpg') no-repeat center center/cover;
    padding: 0 5%;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5); /* Lighter overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 1.5s ease-in-out;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #1a1a1a;
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #333;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, background 0.3s ease;
}

.cta-button:hover {
    transform: scale(1.05);
    background: #0056b3; /* Darker shade of blue */
}

section {
    padding: 6rem 5%;
    border-bottom: 1px solid var(--border-color);
}

#services {
    background-color: var(--light-gray);
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--accent-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--primary-color);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.15);
}

.service-card h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.quote-calculator {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.item-selection {
    flex: 2;
    min-width: 300px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 10px;
}

.item {
    padding: 1rem;
    background: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: grab;
    transition: background-color 0.3s;
}

.item:active {
    cursor: grabbing;
    background-color: #e9ecef;
}

.truck-area {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

#truck-dropzone {
    border: 2px dashed var(--accent-color);
    border-radius: 15px;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

#truck-dropzone.hover {
    background-color: #e6f2ff;
}

#truck-icon {
    width: 80px;
    opacity: 0.7;
}

.price-summary {
    margin-top: 1.5rem;
    background: var(--light-gray);
    padding: 1rem;
    border-radius: 10px;
}

.price-summary h4 {
    color: var(--accent-color);
}

#item-list {
    list-style: none;
    padding: 0;
    margin-top: 0.5rem;
    text-align: left;
}

#item-list li {
    background: #fff;
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.item-dimension-input {
    width: 50px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

#calculate-total {
    margin-top: 1rem;
}

.hidden {
    display: none;
}

#booking-section, #payment-section {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 10px;
    text-align: center;
}

#calendar-container {
    max-width: 400px;
    margin: 0 auto 1rem auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.month {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.month button {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.weekdays, .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 0.5rem;
}

.weekdays div {
    font-weight: 600;
}

.days div {
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 5px;
}

.days div:hover:not(.selected) {
    background-color: #e6f2ff;
}

.days div.prev-date,
.days div.next-date {
    color: #ccc;
}

.days div.today {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.days div.selected {
    background-color: #0056b3;
    color: var(--primary-color);
}

#payment-section .payment-form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#payment-section .payment-form input {
    padding: 0.8rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

#payment-section .payment-form-row {
    display: flex;
    gap: 1rem;
}

#payment-section .payment-form-row input {
    flex: 1;
}

#payment-section .payment-form-row input[placeholder="CVC"] {
    max-width: 100px;
}

#testimonials, #moving-tips {
    background-color: var(--light-gray);
}

.testimonial-grid, .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card, .tip-card {
    background: var(--primary-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-card h4 {
    margin-top: 1rem;
    color: var(--accent-color);
    text-align: right;
}

.tip-card h4 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--primary-color);
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 300px; /* Adjust as needed */
}

#success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* display: flex; is moved to the active state */
    align-items: center;
    justify-content: center;
    z-index: 200;
}

#success-overlay:not(.hidden) {
    display: flex;
}

.success-message {
    background: var(--primary-color);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 400px;
}

.success-message h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.success-message p {
    margin-bottom: 2rem;
}

.contact-info {
    text-align: center;
    font-size: 1.1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

footer {
    text-align: center;
    padding: 2rem 5%;
    background: var(--light-gray);
    border-top: 1px solid var(--border-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Media Queries for Responsiveness --- */
@media (max-width: 850px) {
    header nav {
        gap: 0;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        width: 100%;
        flex-direction: column;
        align-items: center;
        /* padding: 1rem 0; */ /* Removed padding from here */
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out;
    }

    .nav-links.active {
        max-height: 500px; /* Or a value large enough */
        padding: 1rem 0; /* Added padding here */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

    .hamburger-menu {
        display: block;
    }

    .hamburger-menu.active .line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger-menu.active .line:nth-child(2) {
        opacity: 0;
    }
    .hamburger-menu.active .line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* No longer needed as logo is blue by default */
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .quote-calculator {
        flex-direction: column;
    }
}
