/* 
 * Ristorante Emili - Main Stylesheet
 * Elegant and modern design for a traditional Lunigiana restaurant
 */

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --primary-color: #8B4513;      /* Marrone caldo, richiama la terra e la tradizione */
    --secondary-color: #DEB887;    /* Beige, colore caldo e accogliente */
    --accent-color: #A0522D;       /* Marrone più intenso per accenti */
    --text-color: #333333;         /* Quasi nero, per il testo principale */
    --light-text: #F5F5F5;         /* Bianco sporco per testo su sfondo scuro */
    --bg-light: #F9F6F0;           /* Beige chiaro per sfondi */
    --bg-dark: #2C1A0A;            /* Marrone scuro per sfondi */
    --gold: #D4AF37;               /* Oro per dettagli eleganti */
    
    /* Typography */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Poppins', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 15px;
}

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

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-light);
}

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

p {
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul, ol {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.section-padding {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--light-text);
}

/* ===== SECTION GENERAL STYLES ===== */
section {
    position: relative;
    overflow: visible;
    clear: both;
    z-index: auto;
}

/* Stili rimossi - duplicati trovati più avanti */

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: 2px solid var(--primary-color);
}

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

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* ===== PRELOADER ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--secondary-color);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== HEADER ===== */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(249, 246, 240, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#header.scrolled {
    padding: 15px 0;
    background-color: rgba(249, 246, 240, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;  /* Aumentato il padding per allungare la navbar */
    max-width: 1400px;   /* Aumentata la larghezza massima */
}

.logo a {
    display: flex;
    align-items: center;
    gap: 15px; /* Spazio tra logo e testo */
}

.logo-img {
    height: 60px; /* Altezza del logo */
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-text span {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-family: var(--body-font);
    font-style: italic;
    margin-top: -5px; /* Riduce lo spazio tra titolo e sottotitolo */
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 35px; /* Aumentato lo spazio tra gli elementi del menu */
}

.main-nav ul li a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding-bottom: 5px;
}

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

.main-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    position: relative;
    margin-left: 20px;
}

.language-btn {
    background: none;
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 70px;
    justify-content: center;
}

.language-btn:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
    transform: translateY(-2px);
}

.language-btn i {
    font-size: 1rem;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 5px;
    border: 1px solid #e0e0e0;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 4px;
}

.language-option:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.language-option.active {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.language-option .flag {
    font-size: 1.2rem;
}

.language-option span:last-child {
    font-weight: 500;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    background: url('../img/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    padding-top: 80px;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--light-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.hero-logo-e {
    height: 1em;
    width: auto;
    display: inline-block;
    vertical-align: baseline;
    margin-left: 15px;
    margin-right: 3px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
    flex-shrink: 0;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* ===== SECTION SPACING ===== */
#cerimonie {
    margin-bottom: 150px !important;
}

#piazza {
    margin-top: 200px !important;
    position: relative;
    z-index: 10;
    clear: both;
    padding-top: 100px !important;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--accent-color);
    max-width: 700px;
    margin: 0 auto;
}

.divider {
    width: 80px;
    margin: 0 auto 20px;
    position: relative;
    height: 2px;
    background-color: var(--secondary-color);
}

.divider span {
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    left: 50%;
    transform: translateX(-50%);
}

/* ===== STORIA SECTION ===== */
.storia-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.storia-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.storia-text {
    flex: 1;
}

.storia-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* Logo centrale fine sezione storia */
.story-logo-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    padding: 40px 0;
    position: relative;
}

/* Righe decorative che partono dal logo */
.story-logo-center::before,
.story-logo-center::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 2px;
    background-color: var(--primary-color);
    width: 120px;
    transform: translateY(-50%);
    opacity: 0.6;
}

.story-logo-center::before {
    right: calc(50% + 80px); /* Riga a sinistra del logo */
}

.story-logo-center::after {
    left: calc(50% + 80px); /* Riga a destra del logo */
}

.story-logo-img {
    height: 120px;
    width: auto;
    object-fit: contain;
    opacity: 0.8;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.story-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* ===== MENU SECTION ===== */
.menu-info-center {
    text-align: center;
    margin: 40px auto 0;
    max-width: 900px;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-color);
}

.allergeni-info, .celiaci-info, .vegetariani-info {
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.celiaci-info, .vegetariani-info {
    font-weight: 500;
}

.print-menu-btn {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.print-menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.print-menu-btn i {
    margin-right: 8px;
}

.menu-tabs {
    max-width: 900px;
    margin: 0 auto;
}

.menu-tab-header {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--secondary-color);
}

.menu-tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-family: var(--heading-font);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 5px 10px;
}

.menu-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.menu-tab-btn:hover,
.menu-tab-btn.active {
    color: var(--primary-color);
}

.menu-tab-btn:hover::after,
.menu-tab-btn.active::after {
    width: 100%;
}

.menu-category {
    display: none;
}

.menu-category.active {
    display: block;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--secondary-color);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item-info {
    flex: 1;
}

.menu-item-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.menu-item-info p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.menu-item-price {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-left: 20px;
}

/* ===== SPECIALITÀ SECTION ===== */
.specialita-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.specialita-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.specialita-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.specialita-img {
    height: 250px;
    overflow: hidden;
}

.specialita-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.specialita-item:hover .specialita-img img {
    transform: scale(1.1);
}

.specialita-content {
    padding: 25px;
}

.specialita-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.specialita-content p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ===== SALA GIOCHI SECTION ===== */
.sala-giochi-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.sala-giochi-text {
    flex: 1;
}

.sala-giochi-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    margin-top: 30px;
}

.sala-giochi-text h3:first-child {
    margin-top: 0;
}

.sala-giochi-text p {
    margin-bottom: 20px;
}

.feature-list {
    margin-bottom: 30px;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.feature-list li i {
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 1.2rem;
}

.sala-giochi-gallery {
    flex: 1;
}

.sala-giochi-main-img {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.sala-giochi-main-img img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sala-giochi-main-img:hover img {
    transform: scale(1.05);
}

.sala-giochi-small-imgs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.sala-giochi-small-imgs img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.sala-giochi-small-imgs img:hover {
    transform: translateY(-5px);
}

/* ===== CERIMONIE SECTION ===== */
.cerimonie-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.cerimonie-gallery {
    flex: 1;
}

.cerimonie-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    height: 500px;
}

.cerimonie-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

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

.cerimonie-text {
    flex: 1;
}

.cerimonie-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.cerimonie-text p {
    margin-bottom: 30px;
}

.cerimonie-list {
    margin-bottom: 30px;
}

.cerimonie-list li {
    display: flex;
    margin-bottom: 25px;
}

.cerimonie-list li i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 20px;
    margin-top: 5px;
}

.cerimonie-list li div {
    flex: 1;
}

.cerimonie-list li h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.cerimonie-list li p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ===== PIAZZA SECTION ===== */
.piazza-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.piazza-text {
    flex: 1;
}

.piazza-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    margin-top: 30px;
}

.piazza-text h3:first-child {
    margin-top: 0;
}

.piazza-text p {
    margin-bottom: 20px;
}

.piazza-gallery {
    flex: 1;
}

.piazza-main-img {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.piazza-main-img img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.piazza-main-img:hover img {
    transform: scale(1.05);
}

.piazza-small-imgs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.piazza-small-imgs img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.piazza-small-imgs img:hover {
    transform: translateY(-5px);
}

/* ===== GALLERIA SECTION ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
    cursor: pointer;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(139, 69, 19, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-info {
    text-align: center;
    color: var(--light-text);
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

.gallery-info p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover .gallery-info {
    transform: translateY(0);
}

/* ===== CERIMONIE SECTION ===== */
.cerimonie {
    padding-bottom: 120px;
    position: relative;
    z-index: 1;
}

.cerimonie-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}

.cerimonie-gallery {
    flex: 1;
    min-width: 300px;
}

.cerimonie-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    height: 500px;
    padding: 10px;
    background-color: transparent;
}

.cerimonie-gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.cerimonie-text {
    flex: 1;
    min-width: 300px;
}

.cerimonie-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.cerimonie-list {
    margin: 30px 0;
}

.cerimonie-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 15px;
    background-color: rgba(139, 69, 19, 0.05);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.cerimonie-list li:hover {
    transform: translateX(10px);
}

.cerimonie-list li i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
    min-width: 30px;
}

.cerimonie-list li h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.cerimonie-list li p {
    margin-bottom: 0;
    color: var(--text-color);
}

/* ===== PIAZZA SECTION ===== */
.piazza {
    padding-top: 120px;
    position: relative;
    z-index: 1;
    clear: both;
}

.piazza-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}

.piazza-text {
    flex: 1;
    min-width: 300px;
}

.piazza-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-list {
    margin: 25px 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
}

.feature-list li i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 15px;
    min-width: 25px;
}

.piazza-gallery {
    flex: 1;
    min-width: 300px;
}

.piazza-main-img {
    margin-bottom: 20px;
}

.piazza-main-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.piazza-small-imgs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.piazza-small-imgs img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.piazza-small-imgs img:hover {
    transform: scale(1.05);
}

/* Responsive adjustments for Cerimonie and Piazza sections */
@media (max-width: 768px) {
    .cerimonie {
        padding-bottom: 80px;
    }
    
    .piazza {
        padding-top: 80px;
    }
    
    .cerimonie-content,
    .piazza-content {
        flex-direction: column;
        gap: 30px;
    }
    
    .cerimonie-gallery-grid {
        height: auto;
    }
    
    .piazza-main-img img {
        height: 250px;
    }
    
    .piazza-small-imgs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .piazza-small-imgs img {
        height: 100px;
    }
}

/* ===== CONTATTI SECTION ===== */
.contatti-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    margin-bottom: 50px;
}

.contatti-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 5px;
}

.info-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.info-item p {
    margin-bottom: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-text);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.contatti-form {
    flex: 1;
    min-width: 300px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group.half {
    flex: 1;
}

input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

textarea {
    height: 120px;
    resize: vertical;
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--bg-dark);
    color: var(--light-text);
    padding: 80px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
}

.footer-logo-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.footer-logo-img:hover {
    opacity: 1;
    transform: scale(1.05);
}

.footer-logo h2 {
    color: var(--light-text);
    font-size: 1.8rem;
    margin-bottom: 0;
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links h3, .footer-newsletter h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--light-text);
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-newsletter {
    flex: 1;
    min-width: 250px;
}

.newsletter-form {
    display: flex;
    margin-top: 20px;
}

.newsletter-form input {
    flex: 1;
    border-radius: 5px 0 0 5px;
    border: none;
}

.newsletter-form button {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal {
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.footer-legal a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.footer-legal a:hover,
.footer-legal a:focus {
    color: var(--gold);
    background: rgba(255, 255, 255, 0.1);
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

.footer-legal .separator {
    color: var(--secondary-color);
    margin: 0 10px;
    opacity: 0.7;
}

.footer-bottom p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-bottom i {
    color: #e25555;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

/* ===== RESPONSIVE STYLES ===== */
@media screen and (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .storia-content, .sala-giochi-content, .cerimonie-content, .piazza-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .storia-image, .storia-text, .sala-giochi-text, .sala-giochi-gallery,
    .cerimonie-text, .cerimonie-gallery, .piazza-text, .piazza-gallery {
        width: 100%;
    }
    
    .cerimonie-gallery-grid {
        height: 400px;
    }
}

@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    /* Riduzione dimensioni logo per mobile */
    .logo-text h1 {
        font-size: 1.4rem;
    }
    
    .logo-text span {
        font-size: 0.8rem;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .language-switcher {
        position: absolute;
        top: 50%;
        right: 80px;
        transform: translateY(-50%);
        margin-left: 0;
    }
    
    .language-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 60px;
    }
    
    .language-dropdown {
        right: 0;
        min-width: 130px;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-light);
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 40px 0;
    }
    
    .main-nav ul li {
        margin: 15px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .menu-tab-header {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
    }
    
    .menu-tab-btn {
        white-space: nowrap;
    }
}

@media screen and (max-width: 576px) {
    /* Ulteriore riduzione per schermi molto piccoli */
    .logo-text h1 {
        font-size: 1.2rem;
    }
    
    .logo-text span {
        font-size: 0.75rem;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .language-switcher {
        right: 70px;
    }
    
    .language-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
        min-width: 55px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-padding {
        padding: 70px 0;
    }
    
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .sala-giochi-small-imgs, .piazza-small-imgs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cerimonie-gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        height: auto;
        gap: 15px;
    }
    
    .cerimonie-gallery-grid img {
        height: auto;
        object-position: center;
    }
    
    .cerimonie-list li {
        flex-direction: column;
    }
    
    .cerimonie-list li i {
        margin-bottom: 10px;
    }
}

/* Responsive adjustments for hero logo */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
        min-height: 100vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        flex-wrap: wrap;
        white-space: normal;
    }
    
    .hero-logo-e {
        margin-left: 12px;
        margin-right: 3px;
    }
}

@media (max-width: 480px) {
    /* Ottimizzazione per schermi molto piccoli */
    .logo-text h1 {
        font-size: 1.1rem;
    }
    
    .logo-text span {
        font-size: 0.7rem;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .language-switcher {
        right: 65px;
    }
    
    .language-btn {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: 50px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}