body {
    font-family: 'Playfair Display', serif;
}

/* Fade animation per testo slide */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease-out forwards;
    animation-delay: 0.2s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SWIPER CUCINA - Stili base === */
.swiper-cucina {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.swiper-cucina .swiper-wrapper {
    align-items: center;
}

.swiper-cucina .swiper-slide {
    width: 220px;
    height: 160px;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1);
}

.swiper-cucina .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
}

/* === SWIPER CUCINA - Mobile fix (max-width: 767px) === */
@media (max-width: 767px) {
    .swiper-cucina {
        height: auto;
    }

    .swiper-cucina .swiper-slide {
        width: 100%;
        height: auto;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0.75rem;
        overflow: hidden;
    }

    .swiper-cucina .swiper-slide img {
        width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 0.75rem;
        background-color: white;
    }
}

/* === SWIPER CUCINA - Effetto zoom solo da desktop (min-width: 768px) === */
@media (min-width: 768px) {
    .swiper-cucina .swiper-slide-active {
        transform: scale(1.3);
        z-index: 10;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    }
}


/* Link animazione */
#mobile-menu .menu-link {
    transform: translateY(20px);
    transition: all 0.4s ease;
}

#mobile-menu .menu-link.opacity-100 {
    transform: translateY(0);
}

/* Altezza più bassa su mobile */
@media (max-width: 768px) {
    #instagram .rounded-xl {
        height: 400px;
    }
}

/* =============================== NEWS SLIDER ================================= */
#news-container {
  width: 100%;
  overflow: hidden;
    height: 500px;

}

#news-container .slider-inner {
  display: flex;
  gap: 2.3em;
  transition: transform 0.5s ease;
  
  /* centratura */
  justify-content: flex-start; /* default */
}

/*Mobile spostamento a destra*/
@media (max-width: 767px) {
  #news-container .slider-inner {
    padding-left: 2rem; /* sposta la prima card a destra */
  }
}

#news-container .slider-inner > div {
  flex-shrink: 0;
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background-color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#news-container .slider-inner > div img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

#news-container .slider-inner > div .mt-4 {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

/* =============================== FRECCE ================================= */
.arrow {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  z-index: 20;
  font-size: 2.5rem;
  background-color: rgba(255,255,255,0.95);
  color: #8b0000;
  border: none;
  padding: 0.3rem 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
@media (max-width: 767px) {
  .arrow {
    font-size: 1.5rem; /* diminuisce la dimensione delle frecce */
    padding: 0.3rem 0.5rem; /* riduce un po’ il padding per adattarsi */
  }

  .arrow-left { left: 0.3rem; }  /* eventualmente regola la posizione */
  .arrow-right { right: 0.3rem; }
}

.arrow:hover {
  background-color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.arrow-left { left: -2rem; }
.arrow-right { right: -2rem; }

/* =============================== LARGHEZZE CARDS ============================ */
@media (min-width: 1024px) {
  #news-container .slider-inner > div { width: 31%; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  #news-container .slider-inner > div { width: 45%; }
}
@media (max-width: 767px) {
  #news-container .slider-inner > div { width: 90%; margin: 0 auto; }
  .arrow-left { left: 0.5rem; }
  .arrow-right { right: 0.5rem; }
}

/* =============================== POPUP BASE ============================ */
/* Overlay popup */
.popup-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(0,0,0,0.6);
  z-index: 1000;
  overflow: auto; /* permette di scrollare solo se necessario */
}

/* Contenuto popup */
.popup-content {
  width: 90%;
  max-width: 600px; /* dimensione fissa su desktop */
  max-height: 90vh; /* altezza massima del viewport */
  background: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  overflow: hidden; /* evita scrollbar interna */
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Immagine */
.popup-content img {
  width: 100%;
  height: 250px;        /* Altezza fissa */
  object-fit: cover;    /* L’immagine si adatta senza deformarsi */
  border-radius: 10px;
  margin-bottom: 20px;
}

/* Titolo e testo */
.popup-content h2 {
  margin-top: 10px;
  font-size: 1.8rem;
}

.popup-content p {
  margin-top: 10px;
  font-size: 1.1rem;
  line-height: 1.6;
}


.close-btn {
  position: absolute;
  top: -10px;   /* prima era 10px → ora più su */
  right: -10px; /* la portiamo un po’ più a destra */
  font-size: 2rem;
  color: #333;
  cursor: pointer;
  background: white;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: background 0.3s;
}
.close-btn:hover {
  background: #f0f0f0;
}

/* MINI OSTERIA SLIDER */
.mini-osteria-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

#miniOsteriaTrack {
  display: flex;
  transition: transform 0.8s ease-in-out;
}

#miniOsteriaTrack img {
  border-radius: 1rem;
  object-fit: cover;
  flex-shrink: 0;
}

/* DESKTOP */
@media (min-width: 768px) {
  #miniOsteriaTrack {
    flex-direction: row;
    justify-content: flex-start;
  }
  #miniOsteriaTrack img {
    width: calc(33.333% - 0.67rem);
    height: 250px;
    margin-right: 1rem;
  }
  #miniOsteriaTrack img:last-child {
    margin-right: 0;
  }
}

/* MOBILE */
@media (max-width: 767px) {
  .mini-osteria-container {
    height: 420px;
  }
  #miniOsteriaTrack {
    flex-direction: column;
    align-items: center;
  }
  #miniOsteriaTrack img {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
  }
  #miniOsteriaTrack img:last-child {
    margin-bottom: 0;
  }
}
