/* =============================================
   Da Fabio Trattoria - Site Stylesheet v1.4
   Bordeaux (#800020) + Gold (#D4AF37)
   ============================================= */

:root {
    --primary-color: #800020;
    /* Bordeaux */
    --secondary-color: #D4AF37;
    /* Metallic Gold */
    --dark-color: #2C2C2C;
    --light-color: #FAFAFA;
    --white: #FFFFFF;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

/* ---- Base ---- */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--light-color);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

a {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

/* ---- Navbar ---- */
.navbar {
    background-color: var(--primary-color);
    padding: 0.6rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s, transform 0.2s;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline-dark {
    color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    font-size: 0.85rem;
    white-space: nowrap;
}

.btn-outline-dark:hover {
    background-color: var(--secondary-color) !important;
    color: var(--primary-color) !important;
}

/* ---- Hamburger Menu (Mobile) ---- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 0.25rem;
}

/* ---- Hero Section ---- */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/images/sicily-bg.jpg');
    background-size: cover;
    background-position: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 2rem 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    font-weight: 700;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    max-width: 600px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    font-weight: 300;
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: var(--primary-color) !important;
    color: var(--secondary-color) !important;
    padding: 0.75rem 2rem;
    border: 2px solid var(--secondary-color) !important;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(128, 0, 32, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--secondary-color) !important;
    color: var(--primary-color) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

/* ---- Sections ---- */
.menu-section {
    padding: 4rem 1.5rem;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '❦';
    display: block;
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin: 0.8rem auto;
}

/* ---- Menu Grid ---- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.menu-item {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.menu-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-item:hover img {
    transform: scale(1.05);
}

.menu-content {
    padding: 1.5rem;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 0.4rem;
    gap: 0.5rem;
}

.menu-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.menu-price {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 1.15rem;
    white-space: nowrap;
}

.menu-description {
    color: #555;
    font-size: 0.95rem;
    font-style: italic;
}

/* ---- Footer ---- */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 3rem 1.5rem;
    text-align: center;
    border-top: 4px solid var(--secondary-color);
}

footer p,
footer small {
    color: #ccc;
}

/* ---- Loading ---- */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40vh;
}

.spinner {
    border: 4px solid rgba(212, 175, 55, 0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border-left-color: var(--secondary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ---- Container override ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ---- Alert (Contact success) ---- */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* ---- Admin Messages ---- */
.list-group-item h5 {
    color: var(--primary-color);
}

.list-group-item small {
    color: #777;
}

/* =============================================
   RESPONSIVE - MOBILE & TABLET
   ============================================= */

/* Tablets & smaller laptops */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .menu-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile phones */
@media (max-width: 768px) {

    /* Hamburger toggle */
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.5rem;
    }

    .nav-links.open {
        display: flex;
    }

    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-brand img {
        height: 40px;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.4rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    /* Hero */
    .hero {
        min-height: 50vh;
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Sections */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .menu-section {
        padding: 2rem 0.75rem;
    }

    /* Menu Cards */
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 0 0.5rem;
    }

    .menu-item img {
        height: 180px;
    }

    .menu-content {
        padding: 1rem;
    }

    .menu-name {
        font-size: 1.1rem;
    }

    .menu-price {
        font-size: 1rem;
    }

    .menu-header {
        flex-wrap: wrap;
    }

    /* Buttons */
    .btn-primary {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem;
    }

    /* Form */
    .form-control {
        font-size: 16px;
        /* Prevents iOS zoom */
    }

    /* Tables (Admin) */
    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
    }

    /* Gallery row */
    .row .col-md-4,
    .row .col-md-3,
    .row .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* General padding */
    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn-primary {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .navbar-brand img {
        height: 35px;
    }
}