:root {
  /* Paleta Negro y Dorado */
  --black-rich: #111215;
  --black-card: #191b1f;
  --black-soft: #23262b;
  --gold-dark: #a9822a;
  --gold: #d4af37;
  --gold-light: #f5e4b5;
  --gold-pale: #faf6eb;
  
  --paper: #f1f0e2;
  --bg: #0b0c0e;
  --text-dark: #1f2226;
  --text-muted: #6b7280;
  --border-dash: #d6ccb8;
  
  /* Variables para el contador */
  --fondo-contenedor-contador: transparent;
  --color-texto-contenedor-contador: var(--gold-light);
  --fondo-tarjeta-contador: rgba(25, 27, 31, 0.85);
  --fondo-tarjeta-contador-hover: #191b1f;
  --color-texto-tarjeta-contador: var(--gold);
  
  /* Variables de mapas */
  --degradado-ubicacion-inicio: rgba(17, 18, 21, 0.7);
  --degradado-ubicacion-final: rgba(17, 18, 21, 0.9);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(rgba(212, 175, 55, 0.12) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px, 14px 14px;
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 15px;
}

.ticket-container {
  width: 100%;
  max-width: 980px;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.35);
  position: relative;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* Muescas / Notches de corte de boleto */
.ticket-container::before,
.ticket-container::after {
  content: "";
  position: absolute;
  width: 32px;
  height: 32px;
  background-color: var(--bg);
  border-radius: 50%;
  z-index: 10;
}

.ticket-container::before {
  top: -16px;
  right: 280px;
  box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.4);
}

.ticket-container::after {
  bottom: -16px;
  right: 280px;
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.4);
}

/* ========================================================
   CUERPO PRINCIPAL (IZQUIERDA)
   ======================================================== */
.ticket-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 2px dashed var(--border-dash);
  position: relative;
}

/* Cabecera */
.ticket-header {
  background: linear-gradient(135deg, var(--black-rich) 0%, var(--black-soft) 100%);
  color: #ffffff;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  border-bottom: 3px solid var(--gold);
}

.airline-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.airplane-icon {
  width: 36px;
  height: 36px;
  fill: var(--gold);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.brand-text h1 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
}

.brand-text span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold-light);
  display: block;
  margin-top: 2px;
}

.flight-badge {
  text-align: right;
  background: rgba(212, 175, 55, 0.08);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.flight-badge .label {
  font-size: 9px;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.flight-badge .code {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
}

.ticket-body {
  padding: 30px 34px 28px 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Sección de Bienvenida */
.welcome-section {
  background: var(--gold-pale);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 18px 22px;
  position: relative;
}

.welcome-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  display: block;
  margin-bottom: 4px;
}

.welcome-lead {
  font-family: 'Great Vibes', cursive;
  font-size: 32px;
  color: var(--black-rich);
  line-height: 1.1;
  margin-bottom: 8px;
}

.welcome-section p {
  font-size: 12.5px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 8px;
}

.welcome-section p:last-child {
  margin-bottom: 0;
}

/* Nombres de los Novios */
.passenger-row {
  margin-top: 4px;
}

.label-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-dark);
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.passenger-names {
  font-family: 'Great Vibes', cursive;
  font-size: 40px;
  font-weight: 400;
  color: var(--black-rich);
  line-height: 1.15;
}

.passenger-names .amp {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  color: var(--gold);
  margin: 0 8px;
  vertical-align: middle;
}

/* Versículos */
.verses-box {
  background: #f7f7f5;
  border-left: 3px solid var(--gold);
  padding: 12px 18px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4b5563;
  font-size: 11.5px;
  line-height: 1.55;
}

.verse-item {
  margin-bottom: 6px;
}

.verse-item:last-child {
  margin-bottom: 0;
}

.verse-ref {
  font-style: normal;
  font-weight: 700;
  color: var(--black-rich);
  font-size: 11px;
  margin-left: 4px;
}

/* Ruta / Destino */
.route-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 16px 0;
  border-bottom: 1px solid #eef0f2;
}

.city-block {
  display: flex;
  flex-direction: column;
}

.city-block.right {
  text-align: right;
}

.city-code {
  font-family: 'Cinzel', serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--black-rich);
  line-height: 1;
  letter-spacing: 1px;
}

.city-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-top: 4px;
}

.city-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.flight-path {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  position: relative;
}

.plane-track {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0, var(--gold) 6px, transparent 6px, transparent 12px);
  position: relative;
  margin-top: 14px;
}

.plane-in-flight {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(90deg);
  fill: var(--black-rich);
  width: 24px;
  height: 24px;
}

.flight-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* Cuadrícula de Información */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #fbfbfa;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #efece4;
}

.info-item {
  display: flex;
  flex-direction: column;
}

.info-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--black-rich);
  margin-top: 2px;
  line-height: 1.35;
}

.info-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 400;
}

/* Cuadro de Aviso Solo Adultos */
.notice-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fdfaf3;
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 14px 18px;
}

.notice-icon {
  font-size: 18px;
  line-height: 1;
}

.notice-content h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 3px;
}

.notice-content p {
  font-size: 11.5px;
  color: #4b5563;
  line-height: 1.45;
}

/* Sección Padres */
.parents-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-top: 8px;
  border-top: 1px solid #efece4;
}

.parents-box h4 {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 5px;
  font-weight: 700;
}

.parents-box p {
  font-size: 12px;
  color: #374151;
  line-height: 1.45;
  font-weight: 500;
}

/* ========================================================
   TALÓN DERECHO (STUB)
   ======================================================== */
.ticket-stub {
  width: 280px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.stub-header {
  background: var(--black-rich);
  color: white;
  padding: 24px 20px 20px 20px;
  text-align: center;
  border-bottom: 3px solid var(--gold);
}

.stub-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.stub-header span {
  font-size: 9px;
  color: var(--gold-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

.stub-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.stub-item {
  display: flex;
  flex-direction: column;
}

.stub-item .title {
  font-size: 9px;
  color: var(--gold-dark);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 3px;
}

.stub-item .val {
  font-size: 13px;
  font-weight: 600;
  color: var(--black-rich);
}

.stub-names {
  font-family: 'Great Vibes', cursive !important;
  font-size: 22px !important;
  line-height: 1.1;
  font-weight: 400 !important;
}

.stub-item .val-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dress-code-badge {
  background: var(--gold-pale);
  border-left: 3px solid var(--gold);
  padding: 6px 10px;
  border-radius: 0 6px 6px 0;
}

.dress-code-badge p {
  font-size: 10.5px;
  color: #4b5563;
  font-weight: 500;
  line-height: 1.35;
}

.stub-adults-badge {
  display: inline-block;
  background: var(--black-rich);
  color: var(--gold-light);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* Botón WhatsApp */
.action-confirm {
  margin-top: 4px;
}

.btn-whatsapp {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #25d366 0%, #1ea952 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.btn-whatsapp:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
  transform: translateY(-1px);
}

/* Código de Barras */
.stub-footer {
  padding: 16px 20px 24px 20px;
  text-align: center;
  background: #fbfbfa;
  border-top: 1px dashed var(--border-dash);
}

.barcode {
  font-family: 'Libre Barcode 39 Text', cursive;
  font-size: 38px;
  color: var(--black-rich);
  line-height: 1;
  letter-spacing: 2px;
  display: block;
}

.barcode-caption {
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ========================================================
   CONTADOR
   ======================================================== */
.contenedor__contador {
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  padding: 0;
}

#contador {
  display: flex;
  gap: 10px;
}

.simply-section {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-width: 65px;
  border-radius: 8px;
  background-color: var(--black-rich);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: var(--gold-light);
  transition: all 0.3s ease;
}

.simply-section:hover {
  background-color: var(--black-soft);
  border-color: var(--gold);
}

.simply-amount {
  display: block;
  line-height: 1;
  font-family: 'Cinzel', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--gold);
}

/* ========================================================
   MAPAS Y BOTONES
   ======================================================== */
.spawn__display {
  display: none;
}

.map__container {
  display: flex;
  overflow: hidden;
  justify-content: center;
  margin: 15px 0 0 0;
  border-radius: 8px;
}

.map1 {
  width: 100%;
  height: 250px;
}

.ubicacion {
  padding: 8px 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.button,
.button__nobg {
  text-align: center;
  padding: 8px 18px;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  text-transform: uppercase;
  display: inline-block;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
}

.button {
  background: var(--black-rich);
  color: var(--gold-light) !important;
  border: 1px solid var(--gold);
}

.button:hover {
  background: var(--black-soft);
  color: #ffffff !important;
}

.button__nobg {
  background: transparent;
  color: #6b7280 !important;
  border: 1px solid #d1d5db;
}

.button__nobg:hover {
  background: #f3f4f6;
  color: var(--black-rich) !important;
}

/* ========================================================
   FOOTER (FIRMA)
   ======================================================== */
.firma {
  width: 100%;
  max-width: 980px;
  margin-top: 30px;
  text-align: center;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  border-radius: 12px;
  background: rgba(25, 27, 31, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.firma img {
  max-width: 160px;
  margin: 0 auto;
}

.firma p {
  color: #9ca3af;
  margin-top: 10px;
}

.firma a {
  text-decoration: none;
  color: inherit;
}

/* ========================================================
   RESPONSIVO
   ======================================================== */
@media (max-width: 850px) {
  .ticket-container {
    flex-direction: column;
    max-width: 520px;
  }
  .ticket-main {
    border-right: none;
    border-bottom: 2px dashed var(--border-dash);
  }
  .ticket-stub {
    width: 100%;
  }
  .ticket-container::before {
    top: auto;
    bottom: 375px;
    right: -16px;
  }
  .ticket-container::after {
    top: auto;
    bottom: 375px;
    left: -16px;
  }
  .info-grid {
    grid-template-columns: 1fr;
  }
  .parents-section {
    grid-template-columns: 1fr;
  }
  .passenger-names {
    font-size: 32px;
  }
}