/* ===== Viajes On Tour · One Page (CSS) ===== */
:root{
  --brand: #0d6efd;
  --brand-700: #0b5ed7;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
}

* { box-sizing: border-box; }
html, body { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-top: 70px; /* navbar fija */
}

/* Utilidades / botones */
.container { width: min(1100px, 92%); margin: 0 auto; }
.btn {
  display: inline-block;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  padding: .7rem 1.1rem;
  font-weight: 600;
  border-radius: .75rem;
  text-decoration: none;
}
.btn:hover { background: var(--brand-700); }
.btn.outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn.outline:hover { background: var(--brand); color: #fff; }

/* Navbar fijo */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #ffffffcc; backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
nav { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; }

/* Marca textual (sin logo) */
.brand {
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

nav ul { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
nav a { color: #334155; text-decoration: none; font-weight: 600; }
nav a:hover, nav a.active { color: var(--brand); border-bottom: 2px solid var(--brand); padding-bottom: 2px; }

/* Secciones */
section { scroll-margin-top: 88px; padding: 3rem 0; }

/* HERO */
.hero {
  background: linear-gradient(135deg, #e8f0ff 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding: 4.5rem 0 3rem;
  text-align: center;
}
.hero h1 { margin: 0 0 .6rem; font-size: clamp(1.8rem, 3vw, 2.6rem); }
.hero p.lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.2rem; }

/* Títulos */
.section-title { margin: 0 0 1.5rem; font-size: 1.6rem; font-weight: 700; text-align: center; }

/* Grid y cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 1rem;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.03);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.card img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  aspect-ratio: 16/9;
}
.card .body { padding: 1rem 1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.card .cta { margin-top: auto; }

/* Nosotros */
.list { display: grid; gap: .75rem; padding-left: 1rem; }
.list li { color: #475569; }

/* Formulario */
form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
label { font-weight: 700; }
input, textarea {
  width: 100%; padding: .75rem .9rem; border-radius: .75rem;
  border: 1px solid var(--line); background: #fff; font: inherit;
}
small.help { color: var(--muted); }

/* ==== Popups de error (tooltip) — estilo claro ==== */
.field.input-error { position: relative; }
.field.input-error input,
.field.input-error textarea { border: 1px solid #fca5a5; background: #fff5f5; }

.field.input-error::after {
  content: attr(data-error);
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fee2e2;            /* fondo rosado claro */
  color: #b91c1c;                 /* texto rojo oscuro */
  font-size: .8rem;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  border: 1px solid #fecaca;
  z-index: 2;
}

.field.input-error::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 10px;
  border: 6px solid transparent;
  border-bottom-color: #fee2e2;   /* triangulito igual al fondo */
  z-index: 2;
}

/* Aviso de éxito (inline) */
.aviso-exito {
  display: none;
  margin-top: .75rem;
  padding: .75rem .9rem;
  border-radius: .75rem;
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
}
.aviso-exito.mostrar { display: block; }

/* Footer */
footer { background: #fff; border-top: 1px solid var(--line); color: var(--muted); padding: 1rem 0; text-align: center; }

/* Accesibilidad foco (opcional, no cambia diseño) */
a:focus-visible, .btn:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 60%, white);
  outline-offset: 2px;
  border-radius: .5rem;
}

/* Responsive */
@media (max-width: 560px) {
  nav ul { gap: .6rem; }
  .hero { padding: 3rem 0 2rem; }
  .card img { height: 180px; }
}

/* --- Popup (modal) personalizado Viajes On Tour --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);   /* velo más suave y translúcido */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.popup-overlay.mostrar { display: flex; }

.popup-content {
  background: #fff;               /* fondo blanco */
  color: var(--ink);              /* texto oscuro */
  padding: 2rem 2.5rem;
  border-radius: 20px;            /* bordes más redondeados */
  max-width: 480px;
  width: 92%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(13,110,253,.25); /* sombra azulada */
  border: 2px solid var(--brand); /* marco azul */
  animation: aparecer .25s ease-out;
}

/* Estados */
.popup-content.error {
  border-color: #ef4444;          /* rojo suave */
  box-shadow: 0 10px 40px rgba(239,68,68,.25);
}
.popup-content.success {
  border-color: #22c55e;          /* verde */
  box-shadow: 0 10px 40px rgba(34,197,94,.25);
}

/* Títulos y texto */
.popup-content h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);            /* azul de marca */
}
.popup-content.error h2 { color: #b91c1c; }  /* rojo */
.popup-content.success h2 { color: #15803d; }/* verde */

.popup-content p {
  margin: 0 0 1.5rem;
  color: #475569;
  font-size: 1rem;
  line-height: 1.6;
}

/* Botón */
.popup-close {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: .8rem 1.5rem;
  border-radius: .75rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.popup-close:hover {
  background: var(--brand-700);
  transform: translateY(-2px);
}

@keyframes aparecer {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}
