/* Desktop - pantallas medianas */
@media (min-width: 769px) and (max-width: 1023px) {
  .anniversary-popup {
    max-height: min(520px, 95vh);
    overflow: hidden;
  }
  
  .anniversary-popup-content {
    padding: 18px 22px 14px;
  }
  
  .anniversary-seal {
    width: 68px;
    height: 68px;
  }
}

/* Desktop - pantallas grandes */
@media (min-width: 1024px) {
  .anniversary-popup {
    max-height: min(540px, 95vh);
    overflow: hidden;
  }
  
  .anniversary-popup-content {
    padding: 18px 22px 14px;
  }
  
  .anniversary-seal {
    width: 65px;
    height: 65px;
    margin-bottom: 8px;
  }
  
  .anniversary-popup h2 {
    font-size: 22px;
    margin-bottom: 4px;
  }
  
  .anniversary-popup-subtitle {
    font-size: 15px;
    margin-bottom: 12px;
  }
  
  .anniversary-benefits {
    padding: 10px;
    margin-bottom: 12px;
  }
  
  .anniversary-form {
    gap: 8px;
  }
  
  .anniversary-form-group input {
    padding: 9px 11px 9px 36px;
  }
  
  .anniversary-submit-btn {
    padding: 11px 22px;
    font-size: 13px;
  }
  
  .anniversary-popup-footer {
    margin-top: 10px;
    padding-top: 10px;
  }
}

/* Desktop - pantallas extra grandes */
@media (min-width: 1440px) {
  .anniversary-popup {
    max-height: min(580px, 95vh);
    overflow: hidden;
  }
}/* ========================================
   POPUP ANIVERSARIO 5 AÑOS - AVIL PROFESSIONAL
   Septiembre 2024
   ======================================== */

:root {
  /* Paleta basada en la línea gráfica */
  --anniversary-gold: #B8860B;
  --anniversary-rose: #E8B4B8;
  --anniversary-coral: #FF6B5A;
  --anniversary-cream: #F5E6D3;
  --anniversary-beige: #E6D5C3;
  --anniversary-brown: #3D2314;
  --anniversary-white: #FFFFFF;
  
  /* Gradientes premium */
  --anniversary-gradient-gold: linear-gradient(135deg, #B8860B, #D4A574);
  --anniversary-gradient-soft: linear-gradient(135deg, #F5E6D3, #FFFFFF);
}

/* Overlay de fondo */
.anniversary-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.anniversary-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Container del popup */
.anniversary-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: var(--anniversary-gradient-soft);
  border-radius: 18px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 120px rgba(184, 134, 11, 0.1);
  z-index: 99999;
  width: 90%;
  max-width: 460px;
  height: auto;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Solo permitir scroll en móviles si es necesario */
@media (max-width: 480px) {
  .anniversary-popup {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 134, 11, 0.2) transparent;
  }
  
  /* Webkit scrollbar personalizada */
  .anniversary-popup::-webkit-scrollbar {
    width: 6px;
  }
  
  .anniversary-popup::-webkit-scrollbar-track {
    background: transparent;
  }
  
  .anniversary-popup::-webkit-scrollbar-thumb {
    background: rgba(184, 134, 11, 0.2);
    border-radius: 3px;
  }
  
  .anniversary-popup::-webkit-scrollbar-thumb:hover {
    background: rgba(184, 134, 11, 0.3);
  }
}

.anniversary-popup.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

/* Botón cerrar */
.anniversary-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.anniversary-popup-close:hover {
  background: var(--anniversary-white);
  transform: rotate(90deg);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.anniversary-popup-close svg {
  width: 14px;
  height: 14px;
  stroke: var(--anniversary-brown);
  stroke-width: 2;
}

/* Contenido del popup */
.anniversary-popup-content {
  padding: 20px 25px 15px;
  text-align: center;
  position: relative;
  height: auto;
  display: flex;
  flex-direction: column;
}

/* Sello 5 años */
.anniversary-seal {
  width: 75px;
  height: 75px;
  margin: 0 auto 10px;
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.anniversary-seal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 15px rgba(184, 134, 11, 0.3));
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Títulos */
.anniversary-popup h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--anniversary-brown);
  margin: 0 0 5px 0;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.anniversary-popup-subtitle {
  font-size: 16px;
  color: var(--anniversary-gold);
  font-weight: 600;
  margin: 0 0 15px 0;
  line-height: 1.2;
}

/* Lista de beneficios - GRID */
.anniversary-benefits {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 10px;
  padding: 12px;
  margin: 0 0 15px 0;
  border: 1px solid rgba(184, 134, 11, 0.1);
}

.anniversary-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.anniversary-benefits li {
  padding: 3px;
  color: var(--anniversary-brown);
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  line-height: 1.3;
}

.anniversary-benefits li::before {
  content: "✨";
  font-size: 14px;
  flex-shrink: 0;
  margin-top: -1px;
}

/* Formulario */
.anniversary-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.anniversary-form-group {
  position: relative;
}

.anniversary-form-group input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 2px solid rgba(184, 134, 11, 0.2);
  border-radius: 8px;
  font-size: 13px;
  color: var(--anniversary-brown);
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: inherit;
}

.anniversary-form-group input:focus {
  outline: none;
  border-color: var(--anniversary-gold);
  background: var(--anniversary-white);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.anniversary-form-group input::placeholder {
  color: rgba(61, 35, 20, 0.5);
}

/* Iconos de los campos */
.anniversary-form-group::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.5;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.anniversary-form-group.name-field::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233D2314' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'%3E%3C/path%3E%3Ccircle cx='12' cy='7' r='4'%3E%3C/circle%3E%3C/svg%3E");
}

.anniversary-form-group.phone-field::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233D2314' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'%3E%3C/path%3E%3C/svg%3E");
}

.anniversary-form-group.email-field::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233D2314' stroke-width='2'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'%3E%3C/rect%3E%3Cpath d='m22 7-10 5L2 7'%3E%3C/path%3E%3C/svg%3E");
}

/* Botón submit */
.anniversary-submit-btn {
  background: var(--anniversary-gradient-gold);
  color: var(--anniversary-white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 12px rgba(184, 134, 11, 0.3);
  position: relative;
  overflow: hidden;
}

.anniversary-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 18px rgba(184, 134, 11, 0.4);
}

.anniversary-submit-btn:active {
  transform: translateY(0);
}

.anniversary-submit-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.anniversary-submit-btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50%;
  left: 50%;
  margin-left: -9px;
  margin-top: -9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Footer del popup */
.anniversary-popup-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(184, 134, 11, 0.1);
  font-size: 11px;
  color: rgba(61, 35, 20, 0.6);
  line-height: 1.2;
}

.anniversary-popup-footer strong {
  color: var(--anniversary-gold);
  font-weight: 600;
}

/* Decoración de estrellas */
.anniversary-stars {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 18px;
}

.anniversary-star {
  position: absolute;
  width: 15px;
  height: 15px;
  background: var(--anniversary-rose);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  opacity: 0.06;
  animation: twinkle 3s ease-in-out infinite;
}

.anniversary-star:nth-child(1) {
  top: 5%;
  left: 5%;
  animation-delay: 0s;
}

.anniversary-star:nth-child(2) {
  top: 8%;
  right: 8%;
  animation-delay: 1s;
  width: 12px;
  height: 12px;
}

.anniversary-star:nth-child(3) {
  bottom: 5%;
  left: 8%;
  animation-delay: 2s;
  width: 14px;
  height: 14px;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.06; transform: scale(1); }
  50% { opacity: 0.15; transform: scale(1.05); }
}

/* Tablet specific */
@media (min-width: 481px) and (max-width: 768px) {
  .anniversary-popup {
    max-width: 420px;
    max-height: min(520px, 95vh);
    overflow: hidden;
  }
  
  .anniversary-popup-content {
    padding: 16px 20px 13px;
  }
  
  .anniversary-seal {
    width: 65px;
    height: 65px;
    margin-bottom: 8px;
  }
  
  .anniversary-popup h2 {
    font-size: 20px;
    margin-bottom: 4px;
  }
  
  .anniversary-popup-subtitle {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .anniversary-benefits {
    padding: 9px;
    margin-bottom: 12px;
  }
  
  .anniversary-benefits li {
    font-size: 11px;
  }
  
  .anniversary-form {
    gap: 8px;
  }
  
  .anniversary-form-group input {
    padding: 9px 11px 9px 36px;
    font-size: 13px;
  }
  
  .anniversary-submit-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .anniversary-popup-footer {
    margin-top: 10px;
    padding-top: 10px;
    font-size: 10px;
  }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
  .anniversary-popup {
    width: 95%;
    max-height: 95vh;
    border-radius: 15px;
  }
  
  .anniversary-popup-content {
    padding: 20px 15px 15px;
  }
  
  .anniversary-seal {
    width: 80px;
    height: 80px;
    margin-bottom: 12px;
  }
  
  .anniversary-popup h2 {
    font-size: 22px;
  }
  
  .anniversary-popup-subtitle {
    font-size: 15px;
    margin-bottom: 15px;
  }
  
  .anniversary-benefits {
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .anniversary-benefits ul {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .anniversary-benefits li {
    font-size: 13px;
  }
  
  .anniversary-form {
    gap: 10px;
  }
  
  .anniversary-form-group input {
    padding: 11px 12px 11px 40px;
    font-size: 14px;
  }
  
  .anniversary-submit-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .anniversary-popup-footer {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 11px;
  }
}

/* Desktop - pantallas grandes */
@media (min-width: 1024px) {
  .anniversary-popup {
    max-height: 580px;
  }
}

/* Desktop - pantallas extra grandes */
@media (min-width: 1440px) {
  .anniversary-popup {
    max-height: 620px;
  }
}