/* ========================================
   The King Pizzeria — Stylesheet
   Mobile-first responsive design
   ======================================== */

:root {
    --color-primary: #c0392b;
    --color-primary-dark: #a93226;
    --color-secondary: #f39c12;
    --color-dark: #2c3e50;
    --color-light: #ecf0f1;
    --color-white: #ffffff;
    --color-text: #444444;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --radius: 8px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-white);
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

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

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--color-white);
    flex-direction: column;
    align-items: center;
    gap: 0;
    list-style: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    display: flex;
}

.nav-menu.open {
    max-height: 400px;
}

.nav-menu li {
    width: 100%;
    text-align: center;
}

.nav-menu a {
    display: block;
    padding: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 1px;
    color: var(--color-dark);
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--color-primary);
    background: var(--color-light);
}

.btn-prenota-nav {
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary);
    margin: 0.5rem 1rem;
    border-radius: var(--radius);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background: url('../img/hero.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 1.5rem;
    max-width: 800px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.875rem 2rem;
    border-radius: var(--radius);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    display: inline-block;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    font-size: 0.875rem;
}

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

.btn-full {
    width: 100%;
    text-align: center;
}

/* ===== SECTIONS ===== */
.section {
    padding: 4rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.section-subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

/* ===== GRID 2 ===== */
.grid-2 {
    display: grid;
    gap: 2rem;
}

.text-block h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.text-block p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.img-block img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    object-fit: cover;
    height: 300px;
}

/* ===== MENU ===== */
.menu {
    background: var(--color-light);
}

.menu-grid {
    display: grid;
    gap: 1.5rem;
}

.menu-card {
    background: var(--color-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.menu-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.menu-card-body {
    padding: 1.25rem;
}

.menu-card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.menu-card-body p {
    font-size: 0.9375rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.price {
    display: inline-block;
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.125rem;
}

/* ===== GALLERY ===== */
.galleria {
    background: var(--color-white);
}

.gallery-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

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

/* ===== BOOKING FORM ===== */
.prenota {
    background: var(--color-light);
}

.booking-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.375rem;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}

.form-disclaimer {
    text-align: center;
    font-size: 0.8125rem;
    color: #888;
    margin-top: 1rem;
}

/* ===== CONTACTS ===== */
.contatti {
    background: var(--color-white);
}

.contact-grid {
    gap: 2.5rem;
}

.info-item {
    margin-bottom: 1.75rem;
}

.info-item h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.info-item p,
.info-item a {
    color: var(--color-text);
    font-size: 0.9375rem;
}

.info-item a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.orari-list {
    list-style: none;
}

.orari-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9375rem;
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 350px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-dark);
    color: var(--color-light);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-white);
}

.footer-brand p {
    font-weight: 300;
    color: #bdc3c7;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    color: var(--color-white);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.footer-social p {
    color: #bdc3c7;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.875rem;
    color: #95a5a6;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-dark);
    color: var(--color-white);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2000;
    font-weight: 700;
    text-align: center;
    min-width: 280px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   MEDIA QUERIES — TABLET & DESKTOP
   ======================================== */

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        max-height: none;
        box-shadow: none;
        background: transparent;
        width: auto;
        gap: 0.5rem;
    }

    .nav-menu li {
        width: auto;
    }

    .nav-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .nav-menu a:hover {
        background: transparent;
    }

    .btn-prenota-nav {
        margin: 0;
        padding: 0.5rem 1.25rem !important;
    }

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

    .hero-subtitle {
        font-size: 1.375rem;
    }

    .grid-2 {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.large {
        grid-column: span 2;
    }

    .gallery-item.wide {
        grid-column: span 2;
    }

    .gallery-item img {
        height: 300px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-item.large {
        grid-column: span 2;
        grid-row: span 2;
    }

    .gallery-item.wide {
        grid-column: span 2;
    }

    .gallery-item img {
        height: 100%;
    }

    .gallery-item.large img,
    .gallery-item.wide img {
        height: 100%;
    }

    .map-container {
        height: 450px;
    }

    .section {
        padding: 5rem 0;
    }

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