/* ========================================
   INVITACIÓN DIGITAL - SUPER MARIO 64
   ======================================== */

/* ========================================
   VARIABLES Y RESET
   ======================================== */
:root {
  --color-primary: #ef4444;
  --color-secondary: #ffd700;
  --color-accent: #ffffff;
  --color-bg-light: #fffbf5;
  --color-bg-alt: #fef3f2;
  --color-text-primary: #1f2937;
  --color-text-secondary: #4b5563;
  --color-text-muted: #9ca3af;
  --color-red-500: #ef4444;
  --color-red-600: #dc2626;
  --color-red-100: #fee2e2;
  --color-blue-500: #3b82f6;
  --color-blue-100: #dbeafe;
  --color-amber-500: #f59e0b;
  --color-amber-100: #fef3c7;
  --color-green-500: #22c55e;
  --color-green-100: #dcfce7;

  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);

  --transition-base: all 0.2s ease;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  height: 100%;
  position: relative;
}

/* ========================================
   BORDE ANIMADO MULTICOLOR
   ======================================== */
.animated-border {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
}

.border-line {
  position: absolute;
  background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444);
  background-size: 300% 100%;
  animation: border-flow 6s linear infinite;
  opacity: 0.9;
}

.border-line.top,
.border-line.bottom {
  height: 5px;
  left: 0;
  right: 0;
}

.border-line.top {
  top: 0;
}

.border-line.bottom {
  bottom: 0;
  animation-direction: reverse;
}

.border-line.left,
.border-line.right {
  width: 5px;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, #ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444);
  background-size: 100% 300%;
  animation-name: border-flow-vertical;
}

.border-line.left {
  left: 0;
}

.border-line.right {
  right: 0;
  animation-direction: reverse;
}

@keyframes border-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes border-flow-vertical {
  0% { background-position: 50% 0%; }
  100% { background-position: 50% 100%; }
}

/* ========================================
   BARRA DE PROGRESO
   ======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 12px;
  z-index: 10002;
  pointer-events: none;
}

.scroll-progress-bar {
  position: fixed;
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
  transition: width 0.12s ease-out, height 0.12s ease-out;
}

.scroll-progress-bar.top {
  top: 0;
  left: 0;
  height: 12px;
  width: 0%;
}

.scroll-progress-star {
  position: fixed;
  top: 6px;
  left: 0;
  font-size: 18px;
  transform: translate(-50%, 0);
  filter: drop-shadow(0 2px 6px rgba(245, 158, 11, 0.6));
  pointer-events: none;
  z-index: 10002;
}

/* Video de fondo */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}

/* ========================================
   TIPOGRAFÍA
   ======================================== */
h1, h2, h3 {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2rem);
}

h3 {
  font-size: 1.5rem;
}

p {
  font-size: 1rem;
  color: var(--color-text-secondary);
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9);
  }
}

@keyframes coinSpin {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.5rem);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

.float-animation-delayed {
  animation: float 3s ease-in-out infinite 1.5s;
}

.twinkle {
  animation: twinkle 2s ease-in-out infinite;
}

.coin-spin {
  animation: coinSpin 2s linear infinite;
  transform-style: preserve-3d;
}

.animate-bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* ========================================
   UTILIDADES DE ESTILO
   ======================================== */
.gradient-hero {
  background: transparent;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-shadow {
  box-shadow: var(--shadow-lg);
}

.card-shadow-hover {
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.card-shadow-hover:hover {
  box-shadow: var(--shadow-xl);
}

.star-glow {
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

.star-shadow {
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.4));
}

/* ========================================
   LAYOUT PRINCIPAL
   ======================================== */
#app-wrapper {
  width: 100%;
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: visible;
}

main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

section {
  width: 100%;
  padding: 2rem 1.5rem;
}

.container {
  max-width: 28rem; /* 448px */
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   REVEAL EN SCROLL
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   SPLASH SCREEN
   ======================================== */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
  opacity: 1;
  visibility: visible;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  animation: fadeInScale 1s ease-out;
}

.splash-image {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
  animation: pulse 2s ease-in-out infinite;
}

.splash-text {
  font-size: clamp(1.25rem, 5vw, 2rem);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: #ffd700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeInUp 1s ease-out 0.3s both;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
  }
}

/* ========================================
   INDICADOR DE SCROLL
   ======================================== */
.scroll-indicator {
  position: fixed;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.2), rgba(0, 0, 0, 0.6));
  border: 2px solid #ffd700;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  z-index: 100;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 1;
  visibility: visible;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.scroll-indicator-up {
  top: 44%;
}

.scroll-indicator-down {
  top: 56%;
}

.scroll-indicator:hover {
  transform: scale(1.1);
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4), rgba(0, 0, 0, 0.7));
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

.scroll-text {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: #ffd700;
  text-transform: uppercase;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin: 0;
  line-height: 1;
}

.scroll-arrow {
  width: 1.25rem;
  height: 1.25rem;
  color: #ffd700;
  animation: bounce 1.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.scroll-indicator.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ========================================
   VIDEOS DE CONTENIDO
   ======================================== */
.video-section {
  width: 100%;
  padding: 0;
  background: transparent;
}

.video-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  background: rgba(0, 0, 0, 0.1);
}

.content-video {
  width: 100%;
  height: auto;
  display: block;
  outline: none;
  pointer-events: none;
  cursor: default;
}

.content-video::-webkit-media-controls {
  display: none !important;
}

.content-video::-webkit-media-controls-enclosure {
  display: none !important;
}

.content-video::-webkit-media-controls-panel {
  display: none !important;
}

/* ========================================
   SECCIÓN GALERÍA
   ======================================== */
.gallery-section {
  background: transparent;
  padding: 5rem 1.5rem;
}

.gallery-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(254, 243, 199, 0.85);
  backdrop-filter: blur(6px);
  color: #b45309;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  auto-rows: 180px;
}

.gallery-item {
  background: rgba(224, 242, 254, 0.3);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: var(--transition-smooth);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

/* ========================================
   LIGHTBOX GALERÍA
   ======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 15, 25, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-image {
  max-width: min(92vw, 960px);
  max-height: 82vh;
  border-radius: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.05);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.lightbox-image.is-transitioning {
  opacity: 0;
  transform: scale(0.98);
}

.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  color: #fef3c7;
  font-size: 0.95rem;
  text-align: center;
  padding: 0.35rem 1rem;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 68px;
  height: 68px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.95), rgba(245, 158, 11, 0.95));
  color: #1f2937;
  font-size: 2.5rem;
  font-weight: 900;
  border: 3px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.08);
  background: radial-gradient(circle, rgba(255, 215, 0, 1), rgba(245, 158, 11, 1));
}

.lightbox-prev {
  left: 1.25rem;
}

.lightbox-next {
  right: 1.25rem;
}

@media (max-width: 640px) {
  .lightbox-nav {
    width: 58px;
    height: 58px;
    font-size: 2rem;
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
  }

  .lightbox-caption {
    bottom: 1rem;
    font-size: 0.85rem;
  }
}

.gallery-item.large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-item.small {
  grid-column: span 1;
  grid-row: span 1;
}

/* ========================================
   SECCIÓN CTA / CIERRE
   ======================================== */
.cta-section {
  background: transparent;
  padding: 5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.cta-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(30, 64, 175, 0.85) 55%, rgba(30, 58, 138, 0.85) 100%);
  backdrop-filter: blur(10px);
  border-radius: 2.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.25);
  border: 4px solid #fbbf24;
  position: relative;
  overflow: hidden;
  text-align: center;
  max-width: 32rem;
  margin: 0 auto;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}

.cta-card > .btn {
  margin-top: 0.75rem;
}

.cta-card > .btn:first-of-type {
  margin-top: 2rem;
}

.cta-corner-star {
  position: absolute;
  opacity: 0.3;
  animation: twinkle 3s ease-in-out infinite;
}

.cta-corner-star.top-right {
  top: 1rem;
  right: 1rem;
  animation-delay: 0s;
}

.cta-corner-star.bottom-left {
  bottom: 1rem;
  left: 1rem;
  animation-delay: 1.5s;
}

.cta-title {
  font-size: 2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: pulse 2s ease-in-out infinite;
}

.cta-gratitude-image {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.cta-gratitude-img {
  width: 100%;
  max-width: 320px;
  height: auto;
  display: block;
}

.cta-message {
  color: white;
  margin-bottom: 2rem;
  line-height: 1.7;
  font-size: 1.125rem;
  font-weight: 600;
}

.btn {
  display: inline-block;
  width: 100%;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-xl);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  text-align: center;
  margin-bottom: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-red-500) 0%, var(--color-red-600) 100%);
  color: var(--color-accent);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  cursor: not-allowed;
  opacity: 0.9;
}

.btn-secondary {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e3a8a;
  border: 3px solid #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  font-weight: 700;
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
  border-color: #2563eb;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  color: #1e40af;
}

.btn-secondary:active {
  transform: translateY(-1px) scale(1);
  box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

.btn-hint {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 1rem;
  margin-bottom: 0;
  font-style: italic;
  font-weight: 600;
}

.cta-footer {
  text-align: center;
  margin-top: 3rem;
}

.footer-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-icons svg {
  width: 1.5rem;
  height: 1.5rem;
  opacity: 0.2;
}

.footer-text {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ========================================
   FOOTER COMERCIAL
   ======================================== */
.site-footer {
  background: #ffffff;
  padding: 1rem 1.5rem;
  text-align: center;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.footer-link {
  color: #111827;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-block;
}

.footer-link:hover {
  text-decoration: underline;
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   CONTRASTE Y LEGIBILIDAD
   ======================================== */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   RESPONSIVE DESIGN (Mobile First)
   ======================================== */
/* Mobile Gallery - 2 columnas */
.gallery-grid {
  grid-template-columns: repeat(2, 1fr);
  auto-rows: 120px;
}

@media (min-width: 640px) {
  section {
    padding: 4rem 2rem;
  }

  h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    auto-rows: 140px;
  }

  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (min-width: 768px) {
  section {
    padding: 5rem 3rem;
  }

  .container {
    max-width: 42rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    auto-rows: 150px;
  }

  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 56rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    auto-rows: 180px;
  }

  .gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.portada-section {
  padding: 0;
  background: transparent;
}

.portada-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.portada-image {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.portada-section.reveal.is-visible .portada-image {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: portada-in 0.8s ease-out both;
}

@keyframes portada-in {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   SECCIÓN FECHA
   ======================================== */
.date-section {
  padding: 2rem 0;
  background: transparent;
}

.date-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 100%;
}

.date-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.date-image:hover {
  transform: scale(1.02);
}

@media (max-width: 640px) {
  .date-image {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
}

/* ========================================
   CONTADOR REGRESIVO
   ======================================== */
.countdown-section {
  padding: 2.5rem 0 3rem;
  background: transparent;
}

.countdown-card {
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid rgba(251, 191, 36, 0.6);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.2);
  backdrop-filter: blur(8px);
}

.countdown-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.countdown-item {
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
  border: 2px solid rgba(59, 130, 246, 0.25);
  border-radius: 1rem;
  padding: 1rem 0.75rem;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.15);
}

.countdown-value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: #1e3a8a;
}

.countdown-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.countdown-note {
  font-size: 0.9rem;
  color: #1f2937;
  font-weight: 600;
}

@media (min-width: 640px) {
  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .countdown-value {
    font-size: 2.25rem;
  }
}

/* ========================================
   CÓDIGO DE VESTIMENTA
   ======================================== */
.dress-code-section {
  padding: 3rem 0;
  background: transparent;
}

.dress-code-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 215, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.dress-code-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.dress-code-icon {
  margin: 0 auto 1.5rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
  position: relative;
  z-index: 1;
}

.dress-code-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.dress-code-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin: 0.5rem 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.dress-code-subtitle {
  font-size: 1rem;
  color: var(--color-text-secondary);
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .dress-code-card {
    padding: 2rem 1.5rem;
  }

  .dress-code-icon {
    width: 64px;
    height: 64px;
  }

  .dress-code-icon svg {
    width: 40px;
    height: 40px;
  }

  .dress-code-title {
    font-size: 1.5rem;
  }

  .dress-code-text {
    font-size: 1.5rem;
  }
}

/* ========================================
   FORMULARIO RSVP - ESTILO INFANTIL
   ======================================== */
.rsvp-form-container {
  margin: 2.5rem 0;
  position: relative;
  z-index: 1;
}

.rsvp-toggle-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.75rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3);
}

.rsvp-toggle-btn {
  flex: 1;
  min-width: 160px;
  background: white;
  border: 3px solid #fbbf24;
  color: #1f2937;
  padding: 1.125rem 2rem;
  border-radius: 1.5rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  font-family: 'Space Grotesk', sans-serif;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rsvp-toggle-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.6s ease;
}

.rsvp-toggle-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.5);
  border-color: #f59e0b;
}

.rsvp-toggle-btn:hover::before {
  transform: scale(1);
}

/* Botón Confirmo Asistencia - Verde */
#btn-confirm-attendance.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
  color: white;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.6), 0 0 0 4px rgba(16, 185, 129, 0.2);
  transform: translateY(-2px) scale(1.05);
  animation: wiggle 0.5s ease;
}

#btn-confirm-attendance.active:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.7), 0 0 0 4px rgba(16, 185, 129, 0.3);
}

/* Botón No Podré Asistir - Rojo */
#btn-decline-attendance.active {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
  color: white;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.6), 0 0 0 4px rgba(239, 68, 68, 0.2);
  transform: translateY(-2px) scale(1.05);
  animation: wiggle 0.5s ease;
}

#btn-decline-attendance.active:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.7), 0 0 0 4px rgba(239, 68, 68, 0.3);
}

@keyframes wiggle {
  0%, 100% { transform: translateY(-2px) scale(1.05) rotate(0deg); }
  25% { transform: translateY(-2px) scale(1.05) rotate(-3deg); }
  75% { transform: translateY(-2px) scale(1.05) rotate(3deg); }
}

.rsvp-form {
  display: none;
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
  backdrop-filter: blur(12px);
  border-radius: 2rem;
  padding: 2.5rem;
  box-shadow: 0 12px 40px rgba(245, 158, 11, 0.25), inset 0 0 0 3px #fbbf24;
  border: 4px solid #fbbf24;
  position: relative;
  overflow: hidden;
}

.rsvp-form.is-visible {
  display: block;
}

.rsvp-form::before {
  content: '⭐';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 3rem;
  opacity: 0.15;
  animation: spin 10s linear infinite;
}

.rsvp-form::after {
  content: '🎮';
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  font-size: 2.5rem;
  opacity: 0.15;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.form-group {
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.form-group:last-of-type {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  color: #1e3a8a;
  margin-bottom: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-left: 0.5rem;
}

.form-label::before {
  content: '🌟';
  position: absolute;
  left: -1.5rem;
  font-size: 1rem;
  animation: twinkle-mini 2s ease-in-out infinite;
}

@keyframes twinkle-mini {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.form-label::after {
  content: ' *';
  color: #ef4444;
  font-weight: 900;
  font-size: 1.25rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 1.125rem 1.5rem;
  border: 4px solid #3b82f6;
  border-radius: 1.25rem;
  font-size: 1.05rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  background: white;
  color: #1f2937;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2), inset 0 2px 4px rgba(59, 130, 246, 0.1);
  appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.5rem;
  background-color: white;
  padding-right: 3.5rem;
  cursor: pointer;
}

.form-input:hover,
.form-select:hover {
  border-color: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3), inset 0 2px 4px rgba(59, 130, 246, 0.1);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2), 0 8px 20px rgba(239, 68, 68, 0.3);
  transform: translateY(-3px) scale(1.02);
  background: #fffbeb;
}

.form-input::placeholder {
  color: #9ca3af;
  font-style: italic;
  font-weight: 500;
}

.form-input:valid:not(:placeholder-shown),
.form-select:valid {
  border-color: #10b981;
  background: linear-gradient(to right, white 0%, #d1fae5 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3), inset 0 2px 4px rgba(16, 185, 129, 0.1);
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.btn-submit-rsvp {
  width: 100%;
  margin-top: 0.5rem;
  padding: 1.25rem 2rem;
  font-size: 1.125rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5), inset 0 -4px 8px rgba(0, 0, 0, 0.2);
  border: 4px solid #fbbf24;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

.btn-submit-rsvp::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s;
}

.btn-submit-rsvp:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.6), inset 0 -4px 8px rgba(0, 0, 0, 0.2);
  border-color: #f59e0b;
}

.btn-submit-rsvp:hover::before {
  left: 100%;
}

.btn-submit-rsvp:active {
  transform: translateY(-1px) scale(1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

.decline-message {
  display: none;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  backdrop-filter: blur(12px);
  border-radius: 2rem;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 12px 40px rgba(239, 68, 68, 0.25), inset 0 0 0 3px #fca5a5;
  border: 4px solid #f87171;
  animation: fadeInUp 0.5s ease-out;
}

.decline-message.is-visible {
  display: block;
}

.decline-text {
  font-size: 1.125rem;
  color: #7f1d1d;
  margin-bottom: 2rem;
  line-height: 1.7;
  font-weight: 600;
}

/* Animaciones de transición para formulario */
.rsvp-form,
.decline-message {
  animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
  0% { 
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% { 
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Estados manejados por clase */

@media (max-width: 640px) {
  .rsvp-toggle-buttons {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .rsvp-toggle-btn {
    min-width: 100%;
    font-size: 0.95rem;
    padding: 1rem 1.5rem;
  }

  .rsvp-form,
  .decline-message {
    padding: 1.75rem 1.5rem;
  }

  .form-label {
    font-size: 1rem;
  }

  .form-label::before {
    left: -1.25rem;
  }

  .form-input,
  .form-select {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border-width: 3px;
  }

  .btn-submit-rsvp {
    padding: 1.125rem 1.5rem;
    font-size: 1rem;
  }
}



/* ========================================
   DARK MODE (Opcional)
   ======================================== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-text-primary: #f3f4f6;
    --color-text-secondary: #d1d5db;
    --color-bg-light: #111827;
    --color-bg-alt: #1f2937;
  }

  body {
    background-image: url('../assets/fondo.gif');
  }

  .gallery-section {
    background: transparent;
  }

  .cta-card {
    background: rgba(31, 41, 55, 0.9);
    backdrop-filter: blur(10px);
    border-color: #374151;
  }
}
