:root {
  --primary: #556B2F;
  --primary-dark: #3b4d1f;
  --primary-light: #f4f6f0;
  --accent: #c29b38;
  --bg-main: #fcfbf9;
  --bg-card: #ffffff;
  --text-main: #2d312e;
  --text-muted: #6e736e;
  --border: #e6e4df;
  --radius: 12px;
  --transition: all 0.3s ease;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; color: var(--text-main); }
p { color: var(--text-muted); font-size: 1.05rem; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

.container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 5rem 0; text-align: center; }
.bg-light { background-color: var(--primary-light); }
.text-center-limited { max-width: 680px; margin: 0 auto; }
.w-100 { width: 100%; }

.section-header { margin-bottom: 3.5rem; }
.section-subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 600;
}
.section-title {
  font-size: 2.4rem;
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}
.section-title::after {
  content: "✦";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--accent);
  font-size: 1rem;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(252, 251, 249, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(230, 228, 223, 0.6);
  z-index: 1000;
  padding: 1rem 0;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700; color: var(--text-main); }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { font-weight: 500; color: var(--text-main); }
.nav-links a:hover { color: var(--primary); }

/* MENU MÓVIL (Escritorio oculto) */
.menu-toggle { display: none; }

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1rem 4rem;
  background: linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)), 
              url('../imagenes/flores.jpg') center/cover no-repeat;
}
.hero-overlay { max-width: 800px; }
.hero-sub { text-transform: uppercase; letter-spacing: 4px; font-size: 0.9rem; color: var(--primary); font-weight: 600; margin-bottom: 1rem; }
.hero-names { font-size: 3.5rem; line-height: 1.15; margin-bottom: 1rem; }
.hero-names span { font-style: italic; font-weight: 400; color: var(--accent); }
.hero-date { font-size: 1.25rem; letter-spacing: 2px; margin-bottom: 2.5rem; }

/* COUNTDOWN */
.countdown { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 2.5rem; }
.count-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  min-width: 90px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.count-box .num { font-family: var(--font-serif); font-size: 2.2rem; font-weight: 700; color: var(--primary); line-height: 1; display: block; }
.count-box .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); margin-top: 0.4rem; }

.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ITINERARIO Y DETALLES */
.itinerary-grid, .details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.event-card, .info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 2.5rem 1.8rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: var(--transition);
}
.event-card:hover { transform: translateY(-5px); }
.card-img-wrapper { height: 160px; overflow: hidden; border-radius: 8px; margin-bottom: 1.2rem; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.event-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.event-time {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.btn-link { font-size: 0.9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

.bank-box {
  background: #fdfaf2;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-weight: bold;
}
.btn-copy {
  background: var(--accent);
  border: none;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* FORMULARIO RSVP */
.form-container {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: left;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.95rem; }
.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background-color: #faf9f6;
}
.form-control:focus { outline: none; border-color: var(--primary); background: #fff; }
.radio-group { display: flex; gap: 2rem; margin-top: 0.4rem; }
.radio-option { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.alert { padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem; text-align: center; }
.alert-success { background: #eaf5ea; color: #2b6e2b; border: 1px solid #c2e2c2; }

footer { background: #252b21; color: #dfdedb; padding: 3.5rem 1rem 2rem; text-align: center; }
.footer-names { font-family: var(--font-serif); font-size: 1.8rem; color: #fff; margin-bottom: 0.5rem; }

/* VÍDEO INTRO & CARÁTULA */
.video-intro-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  z-index: 9999999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
.video-intro-container.fade-out { opacity: 0; visibility: hidden; pointer-events: none;transform: scale(1.05); }
.intro-video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-cover-screen {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at center, rgba(30, 26, 22, 0.75) 0%, rgba(10, 9, 8, 0.95) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.5s ease;
}
.video-cover-screen.hide { opacity: 0; pointer-events: none; }
.cover-subtitle { font-size: 0.75rem; letter-spacing: 4px; text-transform: uppercase; color: var(--accent); font-weight: 600; display: block; margin-bottom: 0.5rem; }
.cover-title { font-family: var(--font-serif); font-size: 2.8rem; color: #fff; margin-bottom: 2rem; }
.cover-title span { font-style: italic; color: var(--accent); }

.video-play-seal {
  position: relative;
  width: 86px;
  height: 86px;
  margin: 0 auto 1.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
.seal-glow-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.7) 0%, transparent 70%);
  animation: pulseGoldRing 2s infinite ease-in-out;
}
.seal-btn-core {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffeaa7 0%, #c29b38 60%, #7a5a15 100%);
  border: 2px solid #fff5cf;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}
.play-icon { font-size: 1.3rem; color: #fff; margin-left: 3px; }
.cover-action-text { font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase; color: #d8cebe; }

@keyframes pulseGoldRing {
  0%, 100% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 0.9; }
}
.video-play-seal.sparkling .seal-glow-ring {
  animation: burst 0.8s forwards ease-out;
}
@keyframes burst {
  50% { transform: scale(2.8); opacity: 1; filter: drop-shadow(0 0 25px #ffd700); }
  100% { transform: scale(4); opacity: 0; }
}

.skip-btn {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.video-intro-container.playing .skip-btn { opacity: 0.85; pointer-events: auto; }

/* AUDIO FLOAT BTN */
.music-float-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 9999;
}
.music-float-btn.playing { animation: pulseMusic 1.5s infinite ease-in-out; }
@keyframes pulseMusic {
  0%, 100% { box-shadow: 0 0 0 0 rgba(85, 107, 47, 0.65); }
  50% { box-shadow: 0 0 0 10px rgba(85, 107, 47, 0); }
}

/* =========================================
   EFECTO SCROLL REVEAL (APARICIÓN)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
.reveal-up, .reveal-zoom {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-up { transform: translateY(35px); }
.reveal-zoom { transform: scale(0.94); }
.reveal-active { opacity: 1 !important; transform: translateY(0) scale(1) !important; }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.45s; }

/* =========================================
   BOTÓN DEL CALENDARIO (Versión fina unificada)
   ========================================= */
.btn-calendario {
    display: inline-block;
    background-color: var(--primary);
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: 25px; 
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(85, 107, 47, 0.25);
    transition: all 0.3s ease;
}

.btn-calendario:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(85, 107, 47, 0.4);
}

/* =========================================
   DISEÑO MÓVIL ELEGANTE Y ANIMADO
   ========================================= */
@media (max-width: 768px) {
  .hero-names { font-size: 2.6rem; }
  .countdown { gap: 0.6rem; }
  .count-box { padding: 0.8rem 0.6rem; min-width: 68px; }
  .count-box .num { font-size: 1.6rem; }
  .form-container { padding: 2rem 1.2rem; }

  .menu-toggle {
      display: block;
      background: none;
      border: none;
      font-size: 2rem;
      cursor: pointer;
      color: #2c3e50;
      transition: transform 0.3s ease;
  }
  .menu-toggle.is-active {
      transform: rotate(90deg);
      color: var(--primary);
  }
  .nav-links {
      position: absolute;
      top: 100%; 
      left: 0;
      width: 100%;
      background-color: #ffffff;
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
      padding: 0;
      margin: 0;
      z-index: 999;
      flex-direction: column;
      text-align: center;
      display: flex;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-15px);
      transition: all 0.4s ease;
  }
  .nav-links.active {
      opacity: 1 !important;
      visibility: visible !important;
      transform: translateY(0) !important;
  }
  .nav-links li {
      margin: 0;
      list-style: none;
      border-bottom: 1px solid #f4f5f2;
  }
  .nav-links li:last-child {
      border-bottom: none;
  }
  .nav-links a {
      display: block;
      padding: 1.2rem 0;
      color: #2c3e50;
      text-decoration: none;
      font-size: 0.95rem;
      letter-spacing: 2px;
      text-transform: uppercase;
      font-weight: 500;
      transition: background-color 0.3s, color 0.3s;
  }
  .nav-links a:hover, .nav-links a:active {
      background-color: #faf9f6;
      color: var(--primary);
  }
}

/* =========================================
   LOGIN Y ADMINISTRACIÓN
   ========================================= */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
}

.login-box {
    background: var(--bg-card);
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    text-align: center;
    width: 100%;
    max-width: 420px;
}

.login-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.btn-login {
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(85, 107, 47, 0.3);
}

.error-msg {
    background-color: #fdf2f2;
    color: #c0392b;
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    border: 1px solid #fadbd8;
}

/* =========================================
   PANEL DE ADMINISTRACIÓN (DASHBOARD)
   ========================================= */
.admin-nav { 
    background: var(--bg-card); 
    padding: 1.2rem 2rem; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand { 
    font-family: var(--font-serif); 
    font-size: 1.5rem; 
    color: var(--primary); 
    font-weight: 700; 
}

.nav-actions { display: flex; gap: 1rem; align-items: center; }

.btn-outline { 
    border: 1px solid var(--border); 
    color: var(--text-main); 
    background: var(--bg-card); 
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-outline:hover { 
    background: var(--primary-light); 
    border-color: var(--primary); 
    color: var(--primary); 
}

.btn-danger-text { 
    color: #e74c3c; 
    font-weight: 600; 
    text-decoration: none; 
    font-size: 0.9rem; 
    margin-left: 1rem; 
}

.btn-danger-text:hover { text-decoration: underline; }

/* Tarjetas de Estadísticas */
.stats-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 1.5rem; 
    margin-bottom: 2.5rem; 
}

.stat-card { 
    background: var(--bg-card); 
    padding: 1.8rem; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.03); 
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
}

.stat-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 15px rgba(0,0,0,0.05); 
}

.stat-info p { 
    color: var(--text-muted); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-weight: 600; 
    margin-bottom: 0.5rem; 
}

.stat-num { 
    font-size: 2.5rem; 
    font-weight: 700; 
    color: var(--text-main); 
    line-height: 1; 
}

.stat-icon { 
    font-size: 1.8rem; 
    opacity: 1; 
    background-color: #f1f5f9; 
    width: 60px; 
    height: 60px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
}

/* Tabla de Datos */
.table-container { 
    background: var(--bg-card); 
    border-radius: 12px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    overflow: hidden; 
}

.table-header-bar {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header-bar h3 { 
    font-size: 1.1rem; 
    color: var(--text-main); 
}

.table-container table { width: 100%; border-collapse: collapse; text-align: left; }
.table-container th { 
    background: #faf9f6; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--text-muted); 
    padding: 1rem 1.5rem; 
    font-weight: 600; 
    border-bottom: 1px solid var(--border); 
}

.table-container td { 
    padding: 1.2rem 1.5rem; 
    border-bottom: 1px solid var(--border); 
    font-size: 0.9rem; 
    vertical-align: middle; 
}

.table-container tbody tr:hover { background-color: #faf9f6; }
.table-container tbody tr:last-child td { border-bottom: none; }

.guest-name { font-weight: 600; color: var(--text-main); display: block; }
.guest-contact { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Etiquetas de estado */
.badge { 
    padding: 0.3rem 0.8rem; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    letter-spacing: 0.5px; 
    display: inline-block; 
    text-align: center; 
}
.badge-si { background: #dcfce7; color: #166534; }
.badge-no { background: #fee2e2; color: #991b1b; }

.acomp-info { font-size: 0.85rem; color: var(--text-muted); }

/* Botón de Borrar */
.btn-delete {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.btn-delete:hover { background: #e74c3c; color: white; border-color: #e74c3c; }

@media (max-width: 768px) {
    .admin-nav { flex-direction: column; gap: 1rem; text-align: center; }
    .table-container { overflow-x: auto; }
    .table-container td, .table-container th { white-space: nowrap; }
}

/* =========================================
   BOTONES UNIFICADOS PARA LA BARRA DEL DASHBOARD
   ========================================= */
.btn-admin-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    height: 38px;
}

.btn-admin-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

.btn-admin-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}