/* ==========================================================================
   Radar de Vuelos Baratos, Escapadas y Medidas de Equipaje - fijate.com
   Estándar canónico: Inter, Outfit, JetBrains Mono.
   Modo oscuro y claro con soporte responsivo y accesibilidad táctil.
   ========================================================================== */

:root {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Paleta cromática modo oscuro (por defecto) */
  --bg-page: #0b0f17;
  --bg-card: #111827;
  --bg-card-subtle: #162032;
  --bg-input: #1a2436;
  --border-color: #243247;
  --border-focus: #3b82f6;

  --text-main: #f3f4f6;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 20px 30px -10px rgba(56, 189, 248, 0.15);
}

[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --accent-blue: #0284c7;
  --accent-emerald: #059669;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-indigo: #4f46e5;

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 30px -10px rgba(2, 132, 199, 0.12);
}

/* --------------------------------------------------------------------------
   Layout base y contención
   -------------------------------------------------------------------------- */
body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.hero-headline,
.box-title,
.faq-section-title,
.dest-city-title {
  font-family: var(--font-heading);
}

.mono,
.price-val,
.dates-strip-val,
.measure-val,
code {
  font-family: var(--font-mono);
}

.tool-layout {
  max-width: 1240px;
  margin: 1.25rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
  box-sizing: border-box;
}

.tool-with-sidebar {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   Tarjeta principal
   -------------------------------------------------------------------------- */
.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (max-width: 640px) {
  .card-main {
    padding: 1.15rem;
    gap: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   Hero introductorio
   -------------------------------------------------------------------------- */
.tool-hero-box {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-blue);
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-headline {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

@media (min-width: 768px) {
  .hero-headline {
    font-size: 2rem;
  }
}

.hero-subtext {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Panel de filtros y controles
   -------------------------------------------------------------------------- */
.search-filter-panel {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 640px) {
  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 880px) {
  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-label svg {
  color: var(--accent-blue);
  flex-shrink: 0;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 6px;
  background-color: var(--text-dim);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  pointer-events: none;
}

.form-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 38px 0 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  box-sizing: border-box;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

select.form-control option {
  background-color: var(--bg-card);
  color: var(--text-main);
  padding: 8px;
}

/* Tira resumen de fechas calculadas */
.dates-banner-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px dashed var(--accent-blue);
  border-radius: var(--radius-sm);
}

.dates-strip-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.dates-strip-label {
  color: var(--text-muted);
}

.dates-strip-val {
  color: var(--accent-blue);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.dates-strip-meta {
  font-size: 0.78rem;
  font-weight: 600;
  background-color: var(--bg-card);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

/* --------------------------------------------------------------------------
   Pestañas de navegación de la herramienta
   -------------------------------------------------------------------------- */
.tool-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tool-nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 42px;
  padding: 0 1.15rem;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: var(--bg-card-subtle);
}

.tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
  background-color: var(--bg-card-subtle);
}

.tab-content-panel {
  display: none;
}

.tab-content-panel.active {
  display: block;
}

/* --------------------------------------------------------------------------
   Destinos y Tarjetas de Vuelo (TAB 1)
   -------------------------------------------------------------------------- */
.destinations-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .destinations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .destinations-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.destination-card {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.destination-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-hover);
}

.dest-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.dest-identity {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dest-flag-code {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-blue);
}

.dest-city-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.dest-country {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dest-badge-vibe {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background-color: rgba(56, 189, 248, 0.12);
  color: var(--accent-blue);
  white-space: nowrap;
}

.dest-badge-vibe.beach {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.dest-badge-vibe.lowcost {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
}

.dest-badge-vibe.gourmet {
  background-color: rgba(99, 102, 241, 0.12);
  color: var(--accent-indigo);
}

.dest-metrics-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.metric-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.metric-lbl {
  color: var(--text-muted);
}

.metric-val {
  font-weight: 600;
  color: var(--text-main);
}

.price-range-est {
  color: var(--accent-emerald);
  font-weight: 700;
  font-size: 1rem;
}

.dest-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-flight-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-flight-google:hover {
  opacity: 0.95;
  transform: scale(0.99);
}

.action-secondary-row {
  display: flex;
  gap: 0.4rem;
  width: 100%;
}

.action-secondary-row > * {
  flex: 1 1 0%;
  min-width: 0;
}

.btn-flight-sky,
.btn-booking-hotel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 38px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  transition: background-color 0.2s, border-color 0.2s;
  box-sizing: border-box;
}

.btn-flight-sky:hover {
  background-color: #00a698;
  color: #ffffff;
  border-color: #00a698;
}

.btn-booking-hotel:hover {
  background-color: #003580;
  color: #ffffff;
  border-color: #003580;
}

.btn-share-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 34px;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.78rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.btn-share-card:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

/* --------------------------------------------------------------------------
   Comprobador de equipaje (TAB 2)
   -------------------------------------------------------------------------- */
.baggage-tester-box {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tester-intro .box-title {
  margin: 0 0 0.4rem 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.tester-intro .box-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.baggage-calc-row {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .baggage-calc-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: flex-end;
  }
}

.input-measure-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.measure-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-check-baggage {
  height: 44px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent-blue);
  color: #0b0f17;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-check-baggage:hover {
  opacity: 0.9;
}

.airlines-compliance-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.airline-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.airline-main-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.airline-logo-pill {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
}

.airline-name-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.airline-allowed-specs {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.airline-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-ok {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-danger {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.airline-fine-alert {
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.4rem;
  margin-top: 0.2rem;
}

/* --------------------------------------------------------------------------
   Consejos de Ahorro (TAB 3)
   -------------------------------------------------------------------------- */
.tips-article-card {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .tips-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tip-item {
  display: flex;
  gap: 1rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.15rem;
}

.tip-number {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1;
}

.tip-text h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.tip-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   FAQ SEO Accordion
   -------------------------------------------------------------------------- */
.tool-faq-section {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.faq-section-title {
  margin: 0 0 1.25rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
}

.faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  transition: transform 0.2s ease;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.faq-answer p {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Modal de Detalles / Compartir
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-dialog {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  max-width: 500px;
  width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  animation: modal-appear 0.2s ease-out;
}

@keyframes modal-appear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.share-snippet-box {
  background-color: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-actions-row {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .modal-actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.btn-action-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  background-color: var(--accent-blue);
  color: #0b0f17;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-action-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 42px;
  background-color: #25d366;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
