/* style.css for Rusty Bull Taco Co. */
/* Version 3.0: Responsive & Mobile Friendly */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

/* --- Custom CSS Variables (Our Color Palette) --- */
:root {
    --taco-red: #d9534f;
    --vibrant-teal: #20c997;
    --dusty-brown: #8d6e63;
    --charcoal: #343a40;
    --warm-off-white: #f8f9fa;
    --success-green: #5cb85c;
}

/* --- Basic Reset & Body --- */
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--warm-off-white);
    color: var(--charcoal);
    line-height: 1.6;
}

/* --- Header & Navigation --- */
header {
    background-color: #fff;
    padding: 1rem 2rem;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--taco-red);
    text-decoration: none;
    z-index: 1001; /* Ensure logo is above mobile menu */
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--charcoal);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:hover {
    color: var(--taco-red);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--vibrant-teal);
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a.cta-nav-link {
    background-color: var(--taco-red);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
nav ul li a.cta-nav-link:hover {
    background-color: #c9302c;
    color: #fff;
}
nav ul li a.cart-link {
    font-weight: bold;
}
nav ul li a.cart-link:hover::after,
nav ul li a.cta-nav-link:hover::after {
    width: 0;
}

/* Initially hide hamburger button on desktop */
.mobile-menu-toggle {
    display: none;
}


/* --- Main Content & Shared Styles --- */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.menu-intro, .about-page h1, .contact-page h1, .order-page h1, .truck-catering-page h1, .cart-page h1 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 1rem;
}
.contact-page .menu-intro, .order-page .menu-intro, .truck-catering-page .menu-intro {
    margin-bottom: 3rem;
    color: #666;
    font-size: 1.2rem;
}

/* --- Hero Section (Homepage) --- */
.hero {
    text-align: center;
    padding: 5rem 1rem;
    background-color: var(--charcoal);
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/street_tacos.webp');
    background-size: cover;
    background-position: center center;
    color: #fff;
    border-radius: 8px;
}

.hero h1 {
    margin-bottom: 0.5rem;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2; /* Better line spacing */
}

.hero p {
    margin-bottom: 2rem;
    font-size: 1.25rem;
}

.cta-button {
    background-color: var(--taco-red);
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 83, 79, 0.4);
    display: inline-block;
}

.cta-button:hover {
    background-color: #c9302c;
    transform: translateY(-3px);
}

/* --- Menu & Featured Items Section --- */
.menu-category, .featured-items {
    margin-top: 4rem;
    text-align: center;
}

.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.item-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: left;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.item-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 0;
}

.item-card .card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.item-card h3 {
    margin: 0.5rem 0;
    color: var(--charcoal);
}

.item-card p {
    font-size: 0.9rem;
    color: #666;
    flex-grow: 1;
}

.item-card .price {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--success-green);
}

.order-card .price-and-add {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-card .add-to-cart-btn {
    background-color: var(--vibrant-teal);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.order-card .add-to-cart-btn:hover {
    background-color: #1ba882;
}

/* --- Truck Schedule Section --- */
.schedule-section ul {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 2rem auto;
}

.schedule-section li {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid var(--taco-red);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-radius: 0 8px 8px 0;
    transition: box-shadow 0.3s ease;
}

.schedule-section li:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}


.schedule-section .date-box {
    font-weight: bold;
    color: var(--taco-red);
    margin-right: 2rem;
    text-align: center;
    min-width: 150px;
}

.schedule-section .event-details h3,
.schedule-section .event-details p {
    margin: 0.25rem 0;
}

/* --- Catering & Contact Form Section --- */
.catering-section, .contact-form-section {
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.catering-section {
    max-width: 800px;
    margin: 4rem auto;
}

.catering-form .form-group, .contact-page-form .form-group {
    margin-bottom: 1.5rem;
}

.catering-form label, .contact-page-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.catering-form input,
.catering-form textarea,
.contact-page-form input,
.contact-page-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; 
    transition: border-color 0.3s ease;
}

.catering-form input:focus,
.catering-form textarea:focus,
.contact-page-form input:focus,
.contact-page-form textarea:focus {
    outline: none;
    border-color: var(--vibrant-teal);
}

/* --- About Page Styles --- */
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
    background: #fff;
    padding: 3rem;
    border-radius: 8px;
}

.about-image {
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.about-text h2 {
    color: var(--taco-red);
    margin-top: 0;
}

/* --- Contact Page Grid Layout --- */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    align-items: flex-start;
}

.contact-details-section h3, .contact-form-section h3 {
    color: var(--taco-red);
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 0.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info p {
    margin: 1rem 0;
}

.contact-map iframe {
    border-radius: 8px;
    margin-top: 1rem;
}

/* --- Cart Page Styles --- */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.cart-table thead {
    background-color: var(--charcoal);
    color: #fff;
}

.cart-table th {
    padding: 1rem;
    text-align: left;
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-table img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.remove-btn {
    background: none;
    border: 1px solid var(--taco-red);
    color: var(--taco-red);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: var(--taco-red);
    color: #fff;
}

.cart-summary {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 120px;
}

.cart-summary h3 {
    margin-top: 0;
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.2rem;
}

.checkout-btn {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

.cart-empty {
    text-align: center;
    padding: 4rem;
    background: #fff;
    border-radius: 8px;
}


/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 3rem;
    background-color: var(--dusty-brown);
    color: var(--warm-off-white);
}

footer .credits {
    font-size: 0.8rem;
    color: #ccc;
}

/*
========================================
    RESPONSIVE & MOBILE STYLES
========================================
*/

@media screen and (max-width: 768px) {

    /* --- Mobile Navigation --- */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
    }

    .mobile-menu-toggle .icon-bar {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--charcoal);
        margin: 5px 0;
        transition: all 0.3s ease-in-out;
    }

    nav ul {
        display: none; /* Hide desktop nav by default */
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    nav ul.nav-active {
        display: flex; /* Show the nav when active */
    }

    nav ul li {
        margin: 1.5rem 0;
    }

    /* --- General Mobile Layout --- */
    main {
        padding: 1rem;
    }

    .about-content,
    .contact-grid,
    .cart-layout {
        grid-template-columns: 1fr; /* Stack columns on top of each other */
        display: flex;
        flex-direction: column;
    }
    
    .about-image {
        max-width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem; /* Better font size for hero */
    }

}
