/* ==========================================================================
   HOJA DE ESTILOS - BODA LAURA Y SAÚL 2027
   Paleta: Azul claro, Verde claro, Aguamarina, Azul cielo y Textos en Azul Marino/Negro
   Diseño: Mobile-First, Responsive, Accesible y Elegante
   ========================================================================== */

:root {
  /* Paleta cromática oficial */
  --bg-sky-light: #F0F9FF;      /* Azul cielo muy suave (fondo principal) */
  --bg-sky-soft: #E0F2FE;       /* Azul cielo pastel */
  --bg-aquamarine-light: #E6FFFA;/* Aguamarina claro */
  --bg-aquamarine: #99F6E4;      /* Aguamarina suave */
  --bg-green-light: #ECFDF5;     /* Verde claro suave */
  --bg-green-soft: #D1FAE5;      /* Verde menta suave */
  
  /* Textos y contrastes (Cumplimiento WCAG AAA) */
  --text-dark: #0F172A;          /* Negro pizarra profundo */
  --text-navy: #1E3A8A;          /* Azul marino elegante */
  --text-muted: #334155;         /* Gris azulado oscuro */
  --text-light: #FFFFFF;         /* Blanco puro */

  /* Colores de acento e interactivos */
  --accent-teal: #0D9488;        /* Verde azulado marino */
  --accent-teal-hover: #0F766E;
  --accent-blue: #0284C7;        /* Azul cielo intenso */
  --accent-gold: #D97706;        /* Toque dorado elegante */
  --accent-danger: #DC2626;      /* Rojo para acciones críticas */
  --accent-danger-hover: #B91C1C;
  --accent-success: #059669;

  /* Bordes, sombras y radios */
  --border-light: #CBD5E1;
  --border-focus: #0284C7;
  --card-bg: rgba(255, 255, 255, 0.95);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Tipografías */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset y caja */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-dark);
  background: linear-gradient(135deg, var(--bg-sky-light) 0%, var(--bg-aquamarine-light) 50%, var(--bg-green-light) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Contenedores globales */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

/* Tipografía */
h1, h2, h3, h4, .title-serif {
  font-family: var(--font-serif);
  color: var(--text-navy);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* ==========================================================================
   PANTALLA DE ACCESO (LOGIN)
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.login-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.login-card .wedding-rings {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.login-card h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-navy);
}

.login-card .subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* ==========================================================================
   HERO & CABECERA PRINCIPAL (HOME)
   ========================================================================== */
.hero-section {
  text-align: center;
  padding: 3.5rem 1rem 2.5rem;
  background: radial-gradient(circle at top, rgba(186, 230, 253, 0.45) 0%, rgba(209, 250, 229, 0.3) 70%, transparent 100%);
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  position: relative;
}

.hero-logo-box {
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--bg-sky-soft), var(--bg-aquamarine));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 3px solid #FFFFFF;
}

.hero-title {
  font-size: 2.25rem;
  color: var(--text-navy);
  margin-bottom: 0.5rem;
}

.hero-date {
  font-size: 1.25rem;
  color: var(--accent-teal);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
}

/* Cuenta regresiva */
.countdown-box {
  background: var(--card-bg);
  border: 2px solid var(--bg-aquamarine);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: inline-block;
  margin: 0 auto 2rem;
  box-shadow: var(--shadow-sm);
}

.countdown-box .label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-navy);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.countdown-box .counter-value {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--text-navy);
  font-weight: bold;
}

/* Reproductor de audio */
.music-player-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
}

.music-btn {
  background: var(--text-navy);
  color: var(--text-light);
  border: none;
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.2s ease;
}

.music-btn:hover {
  background: var(--accent-blue);
  transform: translateY(-2px);
}

/* ==========================================================================
   NAVEGACIÓN POR SECCIONES
   ========================================================================== */
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.nav-pill {
  background: var(--card-bg);
  color: var(--text-navy);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.nav-pill:hover, .nav-pill:focus {
  background: var(--bg-sky-soft);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

/* ==========================================================================
   SECCIONES DE CONTENIDO
   ========================================================================== */
.section-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: 2.25rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

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

.back-to-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-sky-soft);
  color: var(--text-navy);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.back-to-home-btn:hover {
  background: var(--bg-aquamarine);
  color: var(--text-dark);
}

.section-title {
  font-size: 1.75rem;
  color: var(--text-navy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   FORMULARIO DINÁMICO RSVP
   ========================================================================== */
.attendee-card {
  background: var(--bg-sky-light);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--accent-teal);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.attendee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: bold;
  color: var(--text-navy);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .form-row {
    flex-direction: row;
  }
  .form-row > .form-group {
    flex: 1;
  }
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}

input[type="text"],
input[type="tel"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-dark);
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

/* Radio groups accesibles */
.radio-options-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.35rem;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-teal);
  cursor: pointer;
}

/* Contenedor condicional de alergias */
.conditional-field {
  margin-top: 0.75rem;
  animation: fadeIn 0.2s ease-in-out;
}

.conditional-field.hidden {
  display: none;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-teal);
  color: var(--text-light);
}

.btn-primary:hover {
  background: var(--accent-teal-hover);
}

.btn-secondary {
  background: var(--bg-sky-soft);
  color: var(--text-navy);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-aquamarine);
}

.btn-danger {
  background: var(--accent-danger);
  color: var(--text-light);
}

.btn-danger:hover {
  background: var(--accent-danger-hover);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   PANEL DE ADMINISTRACIÓN
   ========================================================================== */
.admin-header {
  background: var(--card-bg);
  border-bottom: 2px solid var(--bg-aquamarine);
  padding: 1.25rem 0;
  margin-bottom: 2rem;
}

.admin-header-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .admin-header-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

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

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-card .stat-number {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  font-weight: bold;
  color: var(--text-navy);
  margin-bottom: 0.25rem;
}

.stat-card .stat-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* Barra de herramientas / Búsqueda y Filtros */
.admin-toolbar {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-bar-container {
  flex: 1;
}

.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Tabla interactiva responsive */
.table-responsive-wrapper {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

table.admin-table th {
  background: var(--text-navy);
  color: var(--text-light);
  padding: 1rem 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

table.admin-table td {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

table.admin-table tr:nth-child(even) td {
  background: var(--bg-sky-light);
}

table.admin-table tr:hover td {
  background: var(--bg-aquamarine-light);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.badge-yes {
  background: var(--bg-green-soft);
  color: var(--accent-success);
  border: 1px solid var(--accent-success);
}

.badge-no {
  background: #F1F5F9;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

/* Paginación */
.pagination-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

@media (min-width: 640px) {
  .pagination-controls {
    flex-direction: row;
  }
}

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

/* Mensajes de Alerta */
.alert {
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-danger {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #F87171;
}

.alert-success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pie de página */
footer {
  margin-top: auto;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.6);
}
