/* =========================================
   1. Global Styles & Variables
========================================= */
:root {
    --primary-color: #ff6b6b; /* Main restaurant color (light red) */
    --text-color: #333333;    /* Default text color */
    --bg-color: #f8f9fa;      /* Main background color */
    --card-bg: #ffffff;       /* Background color for cards and containers */
    --border-radius: 8px;     /* Standard border radius for rounded corners */
}

/* Reset default browser margins and paddings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    /* Flexbox setup to keep the footer at the bottom of the page */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Standard container to center content and set a maximum width */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.text-center {
    text-align: center;
}

/* =========================================
   2. Navigation Bar (Header)
========================================= */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky; /* Keeps the header fixed at the top while scrolling */
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between; /* Spaces out logo, links, and buttons */
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    transition: color 0.3s ease; /* Smooth color transition on hover */
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* General Button Styles (Login, View Menu) */
#auth-btn, .btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.3s ease;
}

#auth-btn:hover, .btn:hover {
    background-color: #e55a5a;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* =========================================
   3. Hero Section (Home Page)
========================================= */
.hero {
    background-color: #2c3e50; /* Dark fallback background color */
    /* Uncomment the line below to add a background image */
    /* background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero.jpg') center/cover; */
    color: white;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

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

.welcome-section {
    padding: 4rem 2rem;
    background-color: var(--card-bg);
}

/* =========================================
   4. Menu Section & Grid
========================================= */
.filters {
    margin-bottom: 2rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--text-color);
    padding: 0.5rem 1.5rem;
    margin: 0.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.menu-grid {
    display: grid;
    /* Responsive grid: Automatically adjusts columns based on screen width */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.menu-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Lift up effect when hovering over a menu card */
.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.menu-card h3 {
    margin-bottom: 0.5rem;
}

.price {
    display: block;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3rem;
    margin-top: 1rem;
}

/* =========================================
   5. Forms (Login & Contact)
========================================= */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2.5rem 2rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Make the contact form slightly wider than the login form */
.contact-section .form-container {
    max-width: 600px; 
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

button[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background 0.3s;
}

button[type="submit"]:hover {
    background-color: #e55a5a;
}

/* =========================================
   6. Footer
========================================= */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto; /* Pushes the footer to the bottom of the viewport */
}

/* =========================================
   7. Responsive Design (Mobile / Tablet)
========================================= */
/* Applies these styles only on screens 768px wide or smaller */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .filters {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}