/* Popup locandina cucciolata — Allevamento Lambro */

.al-popup[hidden] {
  display: none !important;
}

.al-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.al-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 12, 6, 0.72);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.al-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 92vw);
  max-height: min(90vh, 920px);
  animation: al-popup-in 0.35s ease-out;
}

@keyframes al-popup-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.al-popup__close {
  position: absolute;
  top: -0.55rem;
  right: -0.55rem;
  z-index: 2;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  background: #1a120a;
  color: #f5e6c8;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  padding: 0;
}

.al-popup__close:hover,
.al-popup__close:focus-visible {
  background: #3d2a18;
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

.al-popup__link {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  line-height: 0;
  text-decoration: none;
}

.al-popup__link:focus-visible {
  outline: 3px solid #d4af37;
  outline-offset: 3px;
}

.al-popup__img {
  width: 100%;
  height: auto;
  max-height: min(86vh, 880px);
  object-fit: contain;
  display: block;
  background: #2b1d0e;
  vertical-align: middle;
}

@media (max-width: 480px) {
  .al-popup {
    padding: 0.65rem;
    align-items: center;
  }
  .al-popup__dialog {
    width: min(100%, 96vw);
  }
  .al-popup__close {
    top: 0.35rem;
    right: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .al-popup__dialog {
    animation: none;
  }
}
