/* ===================== Global ===================== */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  position: relative;
}

/* ===================== Fondo animado ===================== */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, #a3d5ff, #cce7ff, #d4f0ff, #b0e0ff);
  background-size: 400% 400%;
  animation: gradientMove 20s ease infinite;
  z-index: -2;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* ===================== Preloader ===================== */
#preloader {
  position: fixed;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.preloader-img {
  width: 120px;
}

.loader-content p {
  font-size: 20px;
  font-weight: bold;
  margin-top: 10px;
}

/* ===================== Snoopy central ===================== */
.snoopy-center {
  text-align: center;
  margin: 20px 0;
  position: relative;
}

.message-bubble {
  display: inline-block;
  background: white;
  padding: 14px 20px;
  border-radius: 25px;
  font-size: 18px;
  opacity: 0;
  transition: opacity 0.6s;
}

/* ===================== Tarjetas calendario ===================== */
.calendar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  padding: 20px;
  z-index: 1;
}

/* Filas separadas para dias (arriba/abajo) */
.days-row {
  display: flex;
  gap: 30px;
  width: 100%;
  justify-content: center;
  margin: 10px 0;
}

.days-row .card {
  width: 150px;
}

.card {
  background: #fff;
  border-radius: 20px;
  width: 200px;
  /* tamaño reducido para diseño más compacto */
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.5s, font-size 0.5s, background 0.3s;
  animation: idleMove 4s ease-in-out infinite alternate;
  position: relative;
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}

.card h2 {
  margin: 10px;
  font-size: 22px;
  transition: font-size 0.5s;
}

/* Movimiento suave de tarjetas en reposo */
@keyframes idleMove {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-5px) rotate(-1deg);
  }

  100% {
    transform: translateY(0) rotate(1deg);
  }
}

/* Hover: cambio de color y movimiento extra */
.card:hover {
  transform: scale(1.05) translateY(-8px) rotate(-2deg);
  background: #f0f8ff;
}

/* Animación de rebote al hacer click */
@keyframes clickBounce {
  0% {
    transform: scale(1) translateY(0);
  }

  30% {
    transform: scale(1.15) translateY(-20px);
  }

  60% {
    transform: scale(1.1) translateY(-10px);
  }

  100% {
    transform: scale(1) translateY(0);
  }
}

/* ===================== Modal nube ===================== */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.cloud-modal {
  background: radial-gradient(circle at 20% 20%, #fff, #f0f8ff 70%);
  border-radius: 50px;
  padding: 30px;
  width: 450px;
  text-align: center;
  position: relative;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
  animation: cloudIn 0.8s ease forwards;
}

.modal-img {
  width: 220px;
  height: auto;
  border-radius: 12px;
  display: block;
  margin: 0 auto 10px auto;
}

/* Animación entrada */
@keyframes cloudIn {
  0% {
    transform: scale(0.5) translateY(100px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Animación cierre */
@keyframes cloudOut {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }

  100% {
    transform: scale(0.5) translateY(100px);
    opacity: 0;
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 28px;
  cursor: pointer;
}

#modal-comments {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}

#modal-comments li {
  opacity: 0;
  animation: fadeIn 1s forwards;
  margin: 10px 0;
  font-size: 18px;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ===================== Botón WhatsApp ===================== */
.whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  padding: 10px 16px 10px 12px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.3s;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

.whatsapp-icon {
  width: 24px;
  height: 24px;
}

/* ===================== Snoopys flotante ===================== */
#floating-snoopys img {
  position: fixed;
  width: 80px;
  animation: floatSnoopy linear infinite;
  pointer-events: none;
}

@keyframes floatSnoopy {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-600px) translateX(200px) rotate(360deg);
    opacity: 0;
  }
}

/* ===================== Mensajes flotantes ===================== */
.floating-messages {
  position: fixed;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.floating-message {
  position: fixed;
  background: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  white-space: nowrap;
  animation: floatMessage linear forwards;
}

@keyframes floatMessage {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-600px) translateX(50px) rotate(20deg);
    opacity: 0;
  }
}

/* ===================== Responsive ===================== */
@media screen and (max-width: 768px) {
  .calendar-container {
    flex-direction: column;
    gap: 12px;
    padding: 8px;
    width: 100%;
  }

  .card {
    width: 48%;
  }

  .card img {
    height: 120px;
  }

  .card h2 {
    font-size: 20px;
  }

  .cloud-modal {
    width: 90%;
    padding: 20px;
  }

  #modal-comments li {
    font-size: 16px;
  }

  .message-bubble {
    font-size: 16px;
    padding: 10px 14px;
  }

  .whatsapp-btn {
    padding: 10px 12px 10px 8px;
    font-size: 14px;
  }

  .whatsapp-icon {
    width: 20px;
    height: 20px;
  }
}

@media screen and (max-width: 480px) {
  .card {
    width: 90%;
  }

  .card img {
    height: 110px;
  }

  .card h2 {
    font-size: 18px;
  }

  .cloud-modal {
    width: 95%;
    padding: 15px;
  }

  #modal-comments li {
    font-size: 14px;
  }

  .message-bubble {
    font-size: 14px;
    padding: 8px 12px;
  }

  .whatsapp-btn {
    font-size: 12px;
    padding: 8px 10px 8px 6px;
  }

  .whatsapp-icon {
    width: 18px;
    height: 18px;
  }
}

/* Responsive tweaks for days rows to avoid cramped layout on phones */
@media screen and (max-width: 768px) {
  .days-row {
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    justify-content: center;
  }

  .days-row .card {
    width: calc(50% - 12px);
  }
}

@media screen and (max-width: 420px) {
  .days-row .card {
    width: 90%;
    margin: 6px auto;
  }
  .days-row {
    gap: 10px;
  }
}