/* =======================
   POPUP HOMEPAGE - ICE SKATING PARTY
   ======================= */

/* Overlay a schermo intero */
#homepage-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9999;

  overflow-y: auto;
}

/* Attivato dal JS */
#homepage-popup-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Box popup */
.homepage-popup {
  background-color: #ffffff;
  border-radius: 18px;
  max-width: 430px;
  width: 100%;
  max-height: 90vh;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);

  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Immagine */
.homepage-popup__image {
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 230px;
}

/* Contenuto centrato */
.homepage-popup__content {
  padding: 1.6rem 1.8rem 1.9rem;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.homepage-popup__title {
  margin: 0 0 0.8rem;
  font-size: 1.45rem;
  line-height: 1.25;
}

.homepage-popup__text {
  margin: 0 0 1.4rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Pulsante CTA */
.homepage-popup__cta {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  font-family: inherit;

  background: #0077c8;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 119, 200, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.homepage-popup__cta:hover,
.homepage-popup__cta:focus-visible {
  background: #005c98;
  box-shadow: 0 8px 20px rgba(0, 92, 152, 0.5);
  transform: translateY(-1px);
}

/* Pulsante chiusura */
.homepage-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.homepage-popup__close:hover,
.homepage-popup__close:focus-visible {
  background: #ffffff;
}

/* =======================
   RESPONSIVE
   ======================= */

@media (max-width: 768px) {
  .homepage-popup {
    max-width: 380px;
  }

  .homepage-popup__content {
    padding: 1.4rem 1.4rem 1.7rem;
  }

  .homepage-popup__title {
    font-size: 1.3rem;
  }

  .homepage-popup__text {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .homepage-popup {
    max-width: 340px;
  }

  .homepage-popup__content {
    padding: 1.2rem 1.2rem 1.6rem;
  }

  .homepage-popup__title {
    font-size: 1.2rem;
  }

  .homepage-popup__text {
    font-size: 0.92rem;
  }
}