/* 
   La Casa dei Cuochi - Global Styles
   Design: Warm, welcoming, informal but curated.
   Colors: Rust/Brick Red, Warm Ochre, Cream/White, Dark Grey.
*/

:root {
    /* Color Palette */
    --color-primary: #A04000;
    /* Rust/Brick Red associated with traditional food/oven */
    --color-primary-dark: #782800;
    --color-secondary: #D68910;
    /* Warm Ochre/Gold for accents/pizza crust */
    --color-bg-light: #FDF2E9;
    /* Very light cream */
    --color-bg-white: #FFFFFF;
    --color-text-main: #333333;
    --color-text-light: #666666;
    --color-text-inverted: #FFFFFF;
    --color-border: #E5E7EB;

    /* Typography */
    --font-heading: 'Lora', serif;
    /* Elegant, adds character */
    --font-body: 'Inter', sans-serif;
    /* Clean, legible */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Components */
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --container-max-width: 1200px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-bg-white);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius);
}

/* Layout Utilities */
.container {
    width: 90%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
}

.text-center {
    text-align: center;
}

.text-warm {
    color: var(--color-primary);
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    transition: all 0.3s ease;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Checkbox Alignment */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 1rem;
    text-align: left;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-content.show {
    transform: translateY(0);
}

.modal-icon {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.modal-title {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.modal-text {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.form-checkbox input {
    margin-top: 0.3rem;
    /* Align with first line of text */
}

.form-checkbox label {
    font-size: 0.85rem;
    line-height: 1.4;
    cursor: pointer;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .btn-whatsapp {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverted);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-text-inverted);
}

.btn-secondary:hover {
    background-color: #B7750B;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-text-inverted);
    color: var(--color-text-inverted);
}

.btn-outline:hover {
    background-color: var(--color-text-inverted);
    color: var(--color-primary);
}

/* Header */
header {
    background-color: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 90px;
    width: auto;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-main);
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-phone {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    text-align: center;
}

.nav-phone span {
    font-size: 0.8em;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-phone strong {
    font-size: 1.1em;
    color: var(--color-primary);
}

/* Mobile Menu Toggle (hidden on desktop) */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    /* remove simplified background */
    background-color: #333;
    color: var(--color-text-inverted);
    padding: var(--spacing-xl) 0;
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideShow 20s infinite;
}

/* Dark overlay on top of images */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* Darken images */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Ensure content is above overlay */
}

/* 4 images -> 25% each. 
   Show for 25% (5s), Fade in/out take small portion 
   Animation delay staggered. 
*/
.hero-slide:nth-child(1) {
    animation-delay: 0s;
    background-image: url('../img/hero_home_01.webp');
}

.hero-slide:nth-child(2) {
    animation-delay: 5s;
    background-image: url('../img/tagliata_piastra.jpg');
}

.hero-slide:nth-child(3) {
    animation-delay: 10s;
    background-image: url('../img/hero_home_03.jpg');
}

.hero-slide:nth-child(4) {
    animation-delay: 15s;
    background-image: url('../img/hero_home_04.jpg');
}

@keyframes slideShow {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    5% {
        opacity: 1;
    }

    25% {
        opacity: 1;
    }

    30% {
        opacity: 0;
        transform: scale(1.05);
    }

    /* Subtle zoom effect */
    100% {
        opacity: 0;
    }
}

.hero-content h1 {
    color: var(--color-text-inverted);
    margin-bottom: var(--spacing-sm);
    font-size: 3rem;
}

.hero-subheadline {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Why Choose Us */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.feature-card {
    background: var(--color-bg-white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-secondary);
}

/* Signature Dishes */
.dishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.dish-card {
    background: var(--color-bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.dish-card:hover {
    transform: translateY(-5px);
}

.dish-img {
    height: 250px;
    background-color: #eee;
    /* Placeholder bg */
    background-position: center;
    background-size: cover;
}

/* Helper classes for specific dish placeholders until real images are added */
.dish-img.tagliata {
    background-image: url('../img/tagliata_su_piastra_sale_dettaglio.jpg');
}

.dish-img.pizza {
    background-image: url('../img/pizza_farcita_cruda_preparazione.jpg');
}

.dish-img.generic {
    background-image: url('../img/pasta_funghi_tartufo_lato.jpg');
}

.dish-content {
    padding: var(--spacing-md);
}

.dish-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

/* Reviews */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.review-card {
    background: var(--color-bg-light);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    font-style: italic;
    position: relative;
}

.review-card::before {
    content: '"';
    font-family: var(--font-heading);
    font-size: 4rem;
    position: absolute;
    top: -10px;
    left: 10px;
    color: rgba(160, 64, 0, 0.1);
}

.review-author {
    margin-top: var(--spacing-sm);
    font-weight: bold;
    text-align: right;
    font-style: normal;
}

/* Location */
.location-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    justify-content: space-between;
}

.location-info {
    flex: 1;
    min-width: 300px;
}

.location-map {
    flex: 1;
    min-width: 300px;
    height: 300px;
    background-color: #eee;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
}

/* Footer */
footer {
    background-color: #2c2c2c;
    color: #fff;
    padding: var(--spacing-lg) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

footer h3 {
    color: var(--color-secondary);
    font-size: 1.2rem;
}

footer a {
    color: #ccc;
    display: block;
    margin-bottom: 0.5rem;
}

footer a:hover {
    color: var(--color-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        /* Hide for now, can implement toggle later/JS */
        place-items: center;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-white);
        box-shadow: var(--shadow-md);
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .reverse-mobile {
        flex-direction: column-reverse;
    }
}

/* Anniversary Popup Styles */
.anniversary-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.anniversary-overlay.active {
    display: flex;
}

.anniversary-popup {
    background: var(--color-bg-white);
    border-radius: 15px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: popupFadeIn 0.5s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anniversary-video-side {
    flex: 0.8;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anniversary-video-side video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anniversary-text-side {
    flex: 1.2;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-bg-light) 0%, #fff 100%);
    position: relative;
}

.anniversary-text-side::before {
    content: "20";
    position: absolute;
    top: 10%;
    right: 10%;
    font-size: 8rem;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.05;
    pointer-events: none;
    font-family: var(--font-heading);
}

.anniversary-text-side h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--color-primary);
}

.anniversary-text-side p {
    font-family: var(--font-heading);
    font-style: italic;
    line-height: 1.6;
    color: var(--color-text-main);
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}

.anniversary-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    transition: color 0.3s;
    z-index: 10;
}

.anniversary-close:hover {
    color: var(--color-primary);
}

/* Responsive Popup */
@media (max-width: 900px) {
    .anniversary-popup {
        flex-direction: column;
        max-height: 95vh;
    }

    .anniversary-video-side {
        flex: none;
        height: 250px;
    }

    .anniversary-text-side {
        padding: 2rem;
        overflow-y: auto;
        justify-content: flex-start;
    }

    .anniversary-text-side h2 {
        font-size: 1.6rem;
    }
}