/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    color: black;
    overflow-x: hidden;
    position: relative;
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Accessibility - Visually hidden elements (for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Background styling */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Use vh instead of % */
    z-index: -1;
    overflow: hidden; /* Prevent any potential overflow */
}

.background-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../static/background_new.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9; /* Slightly reduce opacity to darken the image */
}

/* Content container */
.content {
    position: relative;
    z-index: 1;
    width: 100%;
    flex: 1 0 auto; /* Grow to fill available space, don't shrink, use auto as basis */
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0); /* Add safe area for mobile browsers */
}

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    margin: 10px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #000;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 40px;
}

nav ul li a {
    color: black;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    transition: opacity 0.3s;
    padding: 5px 10px;
}

nav ul li a:hover {
    opacity: 0.8;
}

.phone-btn {
    border: #000;
}

.phone-btn:hover {
    color: #f5a742;
}

.phone-btn i {
    color: #f5a742;
    margin-right: 8px;
}

.get-quote-nav {
    background-color: #f5a742;
    color: black;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.get-quote-nav:hover {
    background-color: #e09735;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* Tagline styles */
.tagline {
    text-align: center;
    margin: 10px;
    padding: 10px;
}

.tagline h1 {
    font-size: 36px;
    line-height: 1.2;
    color: #000;
    font-weight: 800;
}

/* Main content styles with single background box */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 0; /* Changed from 50px to 0 */
    width: 100%;
}

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

h1 {
    font-size: 42px;
    margin-bottom: 10px;
    line-height: 1.2;
    font-weight: 800;
}

.hero p {
    font-size: 18px;
    margin-bottom: 5px;
    font-weight: 600;
    color: #000;
}

.quote-btn {
    background-color: #f5a742;
    color: black;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}

.quote-btn:hover {
    background-color: #e09735;
}

/* Footer styles */
footer {
    padding: 15px;
    margin-top: auto; /* Push to bottom */
    position: relative;
    z-index: 2;
    width: 100%;
}

.site-footer {
    padding: 10px 30px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-info {
    margin-bottom: 5px;
}

.contact-info p {
    margin: 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    line-height: 1.2;
}

.contact-info a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: #f5a742;
    text-decoration: underline;
}

.contact-info i {
    margin-right: 10px;
    color: #f5a742;
}

.copyright {
    font-size: 12px;
    color: #333;
    line-height: 1.2;
    margin-bottom: 5px;
}

/* Social links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 5px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f5a742;
    color: white;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #e09735;
    transform: scale(1.1);
}

.social-links i {
    font-size: 18px;
}

/* About page styles with single background box */
.about-content {
    padding: 30px 50px;
    max-width: 900px;
    margin: 20px auto;
    background-color: rgba(255, 255, 255, .7); /* Single background box for all content */
    border-radius: 8px;
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

/* Popup Form Styles */
.popup-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.popup-container.active {
    display: flex;
}

.popup-content {
    background-color: #fff;
    color: #333;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #777;
}

.close-popup:hover {
    color: #333;
}

.popup-content h2 {
    margin-bottom: 20px;
    color: #4a5b7b;
    text-align: center;
    font-weight: 700;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Button group for form buttons */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.submit-btn {
    background-color: #f5a742;
    color: black;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #e09735;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    flex: 1;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

.whatsapp-btn i {
    font-size: 18px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .tagline h1 {
        font-size: 32px;
    }
    
    h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 15px;
        margin: 5px;
    }
    
    nav {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .tagline h1 {
        font-size: 24px;
        margin-bottom: 5px;
    }
    
    h1 {
        font-size: 28px;
        margin-bottom: 5px;
    }
    
    /* For mobile, adjust background to focus on the truck */
    .background-container::before {
        background-position: 70% center; /* Adjust this value to focus on the truck */
    }
    
    .popup-content {
        padding: 20px;
        width: 95%;
    }
    
    .about-content {
        padding: 15px;
        margin: 5px auto; /* Reduce margin to help fit content */
    }
    
    .site-footer {
        padding: 10px 30px;
    }
    
    /* Optimize main content for mobile */
    main {
        padding: 0 10px;
        justify-content: flex-start; /* Align content to top on mobile */
    }
    
    /* Keep the flex layout for mobile too */
    body {
        min-height: 100%;
        height: 100%;
        overflow-x: hidden;
    }
    
    .content {
        flex: 1 0 auto; /* Maintain flex grow behavior on mobile */
    }
    
    /* Adjust tagline section for mobile */
    .tagline {
        margin: 5px;
        padding: 5px;
    }
    
    /* Adjust hero section for mobile */
    .hero p {
        margin-bottom: 3px;
        font-size: 16px;
    }
    
    /* Reduce button size on mobile */
    .quote-btn {
        padding: 8px 20px;
        margin-top: 10px;
    }
    
    /* Ensure footer stays at bottom without causing scroll */
    footer {
        margin-top: auto;
        padding: 5px;
    }
    
    /* Reduce contact info size */
    .contact-info p {
        margin: 2px 0;
        font-size: 12px;
    }
    
    .copyright p {
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    /* Make social links more compact on mobile */
    .social-links {
        gap: 8px;
        margin-top: 2px;
    }
    
    .social-links a {
        width: 32px;
        height: 32px;
    }
}

/* Mobile menu when active */
.mobile-menu-active nav {
    display: block;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.mobile-menu-active nav ul {
    flex-direction: column;
    padding: 20px;
    background-color: rgba(255, 255, 255, 2); /* Background for the mobile menu container */
    border-radius: 8px;
}

.mobile-menu-active nav ul li {
    margin: 15px 0;
}

.mobile-menu-active nav ul li a {
    font-size: 20px;
    display: block;
    color: #000;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Fix for mobile menu persistence issue */
@media (min-width: 769px) {
    body.mobile-menu-active nav {
        display: flex;
        position: static;
    }
    
    body.mobile-menu-active nav ul {
        flex-direction: row;
        background-color: transparent;
        padding: 0;
    }
    
    body.mobile-menu-active nav ul li {
        margin-left: 40px;
        margin: 0 0 0 40px;
    }
    
    body.mobile-menu-active nav ul li a {
        font-size: 18px;
        display: inline;
    }
}
