/* ================================================================
   ESTILOS PRINCIPALES - DÍA DE LA MADRE
   ================================================================
   🎨 CAMBIAR COLORES: Modifica las variables CSS en :root
   para cambiar toda la paleta de colores de la página.
   ================================================================ */

/* ── Variables de color y tipografía ── */
:root {
  /* 🎨 PALETA PRINCIPAL - Cambia estos valores para ajustar colores */
  --color-primary:    #f9a8c9;   /* Rosa suave */
  --color-secondary:  #f3d5e0;   /* Rosa muy claro */
  --color-accent:     #d4a853;   /* Dorado suave */
  --color-accent-lt:  #f5e6c8;   /* Dorado claro */
  --color-white:      #ffffff;
  --color-bg:         #fff8f9;   /* Fondo general */
  --color-bg-dark:    #f7e8ef;   /* Fondo secciones alternas */
  --color-text:       #5a3a4a;   /* Texto principal */
  --color-text-light: #9b7080;   /* Texto secundario */
  --color-quotes-bg:  #6b3a5a;   /* Fondo sección frases */

  /* 🔤 TIPOGRAFÍAS - Cambia aquí las fuentes */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Lato', Arial, sans-serif;

  /* Sombras y radios */
  --shadow-soft:   0 8px 32px rgba(180, 80, 120, 0.12);
  --shadow-card:   0 4px 20px rgba(180, 80, 120, 0.15);
  --shadow-hover:  0 12px 40px rgba(180, 80, 120, 0.25);
  --radius-card:   20px;
  --radius-btn:    50px;

  /* Transiciones */
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset y base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Contenedor centrado ── */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Títulos de sección ── */
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--color-text);
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-title--light {
  color: var(--color-white);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-light);
  text-align: center;
  margin-bottom: 3rem;
  font-style: italic;
}

/* ── Separador decorativo ── */
.divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 10px;
  margin: 1.5rem auto;
}

.divider--gold {
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-lt), var(--color-accent));
}

/* ── Botón principal ── */
.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border-radius: var(--radius-btn);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: var(--color-white);
  box-shadow: 0 6px 24px rgba(212, 168, 83, 0.35);
}

.btn--primary:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 32px rgba(212, 168, 83, 0.45);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background: linear-gradient(
    160deg,
    #fff0f5 0%,
    #fde8f0 40%,
    #fdf3e3 100%
  );
  overflow: hidden;
}

/* Fondo de corazones flotantes */
.hearts-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 1.2rem;
  animation: fadeInDown 1s ease both;
}

.heart-icon {
  display: inline-block;
  animation: heartbeat 1.4s ease-in-out infinite;
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--color-text-light);
  font-style: italic;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero .btn {
  animation: fadeInUp 1s ease 0.6s both;
}

/* Imagen principal del hero */
.hero__image-wrapper {
  position: relative;
  z-index: 1;
  margin-top: 3rem;
  animation: fadeInUp 1.2s ease 0.8s both;
}

.hero__image {
  width: clamp(220px, 50vw, 380px);
  height: clamp(220px, 50vw, 380px);
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--color-white);
  box-shadow: var(--shadow-hover),
              0 0 0 12px rgba(249, 168, 201, 0.2),
              0 0 0 24px rgba(249, 168, 201, 0.08);
  transition: var(--transition);
}

.hero__image:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-hover),
              0 0 0 16px rgba(249, 168, 201, 0.25),
              0 0 0 32px rgba(249, 168, 201, 0.1);
}

/* ================================================================
   GRATITUD
   ================================================================ */
.gratitude {
  padding: 6rem 1.5rem;
  background-color: var(--color-white);
}

.gratitude__card {
  background: linear-gradient(135deg, #fff5f8, #fffaf0);
  border-radius: var(--radius-card);
  padding: 3.5rem 3rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(249, 168, 201, 0.3);
  max-width: 750px;
  margin: 0 auto;
}

.gratitude__icon {
  font-size: 3rem;
  margin-bottom: 1.2rem;
  animation: float 3s ease-in-out infinite;
}

.gratitude__text {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--color-text);
  font-style: italic;
  line-height: 1.9;
}

/* ================================================================
   GALERÍA
   ================================================================ */
.gallery {
  padding: 6rem 1.5rem;
  background-color: var(--color-bg-dark);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.gallery__card {
  background: var(--color-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  cursor: pointer;
}

.gallery__card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.gallery__img-wrapper {
  overflow: hidden;
  height: 220px;
}

.gallery__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery__card:hover .gallery__img {
  transform: scale(1.08);
}

.gallery__caption {
  padding: 1.2rem 1.4rem;
  font-size: 0.95rem;
  color: var(--color-text-light);
  font-style: italic;
  text-align: center;
  line-height: 1.6;
}

/* ================================================================
   FRASES DESTACADAS
   ================================================================ */
.quotes {
  padding: 6rem 1.5rem;
  background: linear-gradient(
    135deg,
    var(--color-quotes-bg) 0%,
    #4a2540 100%
  );
  position: relative;
  overflow: hidden;
}

/* Decoración de fondo en la sección de frases */
.quotes::before {
  content: '❤';
  position: absolute;
  font-size: 30rem;
  color: rgba(255, 255, 255, 0.03);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.quotes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.quote__card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  padding: 2rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.quote__card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-6px);
  border-color: rgba(212, 168, 83, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.quote__icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.quote__card:nth-child(2) .quote__icon { animation-delay: 0.4s; }
.quote__card:nth-child(3) .quote__icon { animation-delay: 0.8s; }
.quote__card:nth-child(4) .quote__icon { animation-delay: 1.2s; }
.quote__card:nth-child(5) .quote__icon { animation-delay: 1.6s; }

.quote__text {
  font-family: var(--font-heading);
  font-size: clamp(0.9rem, 1.8vw, 1.05rem);
  color: var(--color-white);
  font-style: italic;
  line-height: 1.7;
}

/* ================================================================
   CARTA FINAL
   ================================================================ */
.letter {
  padding: 6rem 1.5rem;
  background: var(--color-white);
}

.letter__envelope {
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(160deg, #fffdf5, #fff8f0);
  border-radius: var(--radius-card);
  padding: 4rem 3.5rem;
  text-align: center;
  box-shadow: var(--shadow-soft),
              inset 0 0 0 1px rgba(212, 168, 83, 0.25);
  position: relative;
  overflow: hidden;
}

/* Esquinas decorativas de la carta */
.letter__envelope::before,
.letter__envelope::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(212, 168, 83, 0.2);
  border-radius: 4px;
}

.letter__envelope::before {
  top: 16px;
  left: 16px;
  border-right: none;
  border-bottom: none;
}

.letter__envelope::after {
  bottom: 16px;
  right: 16px;
  border-left: none;
  border-top: none;
}

.letter__seal {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  animation: heartbeat 1.6s ease-in-out infinite;
}

.letter__title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.letter__body {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: var(--color-text);
  line-height: 2;
  margin-top: 1.5rem;
  font-style: italic;
}

.letter__signature {
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-accent);
  font-style: italic;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: linear-gradient(135deg, #3d1f30, #5a2d45);
  color: var(--color-white);
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  position: relative;
  overflow: hidden;
}

.footer__hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.footer__message {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-style: italic;
  position: relative;
  z-index: 1;
  margin-bottom: 0.8rem;
}

.footer__year {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 1;
  letter-spacing: 0.1em;
}

/* Botón de música (opcional) */
.music-btn {
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-white);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.music-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ================================================================
   ANIMACIONES DE APARICIÓN (Reveal on scroll)
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Retrasos escalonados para la galería */
.gallery__card:nth-child(1) { transition-delay: 0s; }
.gallery__card:nth-child(2) { transition-delay: 0.1s; }
.gallery__card:nth-child(3) { transition-delay: 0.2s; }
.gallery__card:nth-child(4) { transition-delay: 0.3s; }

/* Retrasos para frases */
.quote__card:nth-child(1) { transition-delay: 0s; }
.quote__card:nth-child(2) { transition-delay: 0.1s; }
.quote__card:nth-child(3) { transition-delay: 0.2s; }
.quote__card:nth-child(4) { transition-delay: 0.3s; }
.quote__card:nth-child(5) { transition-delay: 0.4s; }

/* ================================================================
   KEYFRAMES
   ================================================================ */

/* Latido del corazón */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14%       { transform: scale(1.2); }
  28%       { transform: scale(1); }
  42%       { transform: scale(1.15); }
  56%       { transform: scale(1); }
}

/* Flotación suave */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* Entrada desde arriba */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Entrada desde abajo */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Corazón flotante (generado por JS) */
@keyframes floatHeart {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 0.8; }
  100% { transform: translateY(-100vh) rotate(20deg); opacity: 0; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet */
@media (max-width: 768px) {
  .hero {
    padding: 5rem 1.2rem 3rem;
  }

  .gratitude__card {
    padding: 2.5rem 1.8rem;
  }

  .letter__envelope {
    padding: 3rem 2rem;
  }

  .quotes__grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.2rem;
  }
}

/* Móvil */
@media (max-width: 480px) {
  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .quotes__grid {
    grid-template-columns: 1fr 1fr;
  }

  .letter__envelope::before,
  .letter__envelope::after {
    display: none;
  }

  .hero__image {
    width: 200px;
    height: 200px;
  }
}