/**
 * Fijate Tools - Guía de Supervivencia por País para Viajeros
 * Estilos canónicos, tema claro/oscuro y componentes responsivos
 */

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

  /* Paleta base en modo oscuro (predeterminado) */
  --bg-body: #0b0f17;
  --bg-card: #131b26;
  --bg-card-sub: #182332;
  --bg-input: #1a2636;
  --border-color: #233348;
  --border-subtle: #1e2c3d;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #64748b;
  
  --accent-blue: #38bdf8;
  --accent-blue-hover: #0ea5e9;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;

  --badge-bg: #1e293b;
  --shadow-card: 0 8px 24px -4px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition-fast: 0.2s ease;
}

[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-sub: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-sub: #64748b;

  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --badge-bg: #e2e8f0;
  --shadow-card: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
}

/* Reseteo y contención canónica */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.country-display-name,
.module-title,
.faq-main-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
}

/* Layout canónico */
.main-wrapper.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}

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

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Tarjeta contenedora principal */
.card-main.travel-guide-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 1. Panel de Búsqueda y Filtros */
.search-hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.25rem 0.75rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input-wrapper:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.search-icon {
  display: flex;
  align-items: center;
  color: var(--text-sub);
  margin-right: 0.75rem;
}

.country-search-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-main);
  font-size: 1.05rem;
  color: var(--text-main);
  min-height: 44px;
}

.country-search-input::placeholder {
  color: var(--text-sub);
  opacity: 0.8;
}

.btn-clear-search {
  background: none;
  border: none;
  color: var(--text-sub);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
  transition: color var(--transition-fast);
}

.btn-clear-search:hover {
  color: var(--text-main);
}

.search-kbd {
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  user-select: none;
}

/* Desplegable predictivo */
.search-dropdown-list {
  position: absolute;
  top: calc(100% - 0.5rem);
  left: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
}

.search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
  background: var(--bg-card-sub);
}

.dropdown-item-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
}

.dropdown-flag {
  font-size: 1.4rem;
}

.dropdown-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Pestañas de continentes */
.continent-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 1rem 0 0.5rem;
  scrollbar-width: thin;
}

.continent-pill {
  background: var(--bg-card-sub);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  min-height: 36px;
}

.continent-pill:hover {
  color: var(--text-main);
  border-color: var(--accent-blue);
}

.continent-pill.active {
  background: var(--accent-blue);
  color: #0b0f17;
  border-color: var(--accent-blue);
  font-weight: 600;
}

/* Accesos rápidos */
.quick-destinations-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

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

.quick-chips-wrapper {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.quick-chip {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0.3rem 0.75rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-chip:hover {
  background: var(--bg-card-sub);
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

/* 2. Tarjeta Principal del País Seleccionado */
.country-profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.country-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.country-flag-title {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.country-flag-icon {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.country-names-box {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.country-badge-row {
  display: flex;
  gap: 0.5rem;
}

.tag-pill {
  background: var(--badge-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.country-display-name {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.15;
  color: var(--text-main);
}

.country-meta-subline {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.country-hero-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-action-hero {
  background: var(--accent-blue);
  color: #0b0f17;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  min-height: 42px;
}

.btn-action-hero:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
}

.btn-hero-secondary {
  background: var(--bg-card-sub);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-hero-secondary:hover {
  background: var(--bg-input);
  border-color: var(--accent-blue);
  color: var(--text-main);
}

/* Tira de contraste rápido frente a España */
.spain-comparison-strip {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.strip-header {
  margin-bottom: 0.75rem;
}

.strip-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

.cmp-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cmp-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.cmp-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* 3. Rejilla de Módulos de Supervivencia */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.guide-module-card {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  transition: border-color var(--transition-fast);
}

.guide-module-card:hover {
  border-color: var(--border-subtle);
}

.module-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.module-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.electricity-badge { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); }
.tipping-badge { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.water-badge { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.driving-badge { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.visa-badge { background: rgba(16, 185, 129, 0.15); color: var(--accent-green); }
.emergency-badge { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.module-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--text-main);
}

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

.module-body-text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Galería gráfica vectorial de clavijas de enchufe */
.plugs-visual-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

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

.plug-svg-gallery {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.plug-diagram-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  min-width: 72px;
  transition: transform var(--transition-fast);
}

.plug-diagram-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}

.plug-diagram-card svg {
  width: 44px;
  height: 44px;
}

.plug-type-tag {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--accent-blue);
}

/* Métricas eléctricas */
.electric-metrics-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-key {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.metric-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Alertas de compatibilidad eléctrica */
.alert-box-status {
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.alert-icon-area {
  flex-shrink: 0;
  padding-top: 2px;
}

.alert-headline {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.alert-desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Píldoras de estado (Propinas, Agua, Conducción) */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-prohibited { background: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.status-optional { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); border: 1px solid rgba(56, 189, 248, 0.3); }
.status-expected { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-mandatory { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); border: 1px solid rgba(239, 68, 68, 0.3); }

.status-safe { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-caution { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-bottled { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.status-right { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.status-left { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.3); }

.tipping-status-block,
.water-status-block,
.driving-status-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tipping-percentage-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Módulo de Visados */
.visa-items-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.visa-meta-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.visa-meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.visa-meta-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Teléfonos de emergencia */
.emergency-phones-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.phone-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: center;
}

.phone-type {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.phone-number {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-red);
  text-decoration: none;
}

.phone-prefix-card .phone-number {
  color: var(--accent-blue);
}

.time-diff-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.time-diff-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.time-diff-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

/* Módulo 3: Divisa y Tipo de Cambio en Vivo vs Euro */
.fx-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.fx-header-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 0%;
}

.fx-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fx-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-green);
  background: rgba(16, 185, 129, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fx-pulse-dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: fxPulse 1.8s infinite;
}

@keyframes fxPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.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); }
}

.fx-eurozone-notice {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.fx-eurozone-flag {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
}

.fx-eurozone-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 0.25rem;
}

.fx-eurozone-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.fx-foreign-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fx-rate-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.fx-rate-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fx-rate-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.fx-rate-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1.2;
}

.fx-converter-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fx-converter-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.fx-calc-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fx-updated-stamp {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.fx-converter-inputs {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

.fx-input-col {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fx-calc-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.fx-input-field-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  height: 42px;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.fx-input-field-wrap:focus-within {
  border-color: var(--accent-green);
}

.fx-currency-addon {
  padding: 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card-sub);
  border-right: 1px solid var(--border-color);
  height: 100%;
  display: flex;
  align-items: center;
  user-select: none;
}

.fx-calc-input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  padding: 0 0.65rem;
  height: 100%;
  outline: none;
}

.fx-swap-col {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  color: var(--text-muted);
}

.fx-swap-sym {
  font-size: 1.25rem;
  font-weight: bold;
}

.fx-quick-amounts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.fx-quick-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.fx-chip-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-fx-chip {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-main);
  cursor: pointer;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  transition: all var(--transition-fast);
}

.btn-fx-chip:hover {
  background: var(--accent-green);
  color: #0b0f17;
  border-color: var(--accent-green);
  font-weight: 600;
}

.fx-travel-tip {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.fx-tip-icon {
  flex-shrink: 0;
  color: var(--accent-amber);
  margin-top: 2px;
}

/* Módulo 6: Cosas a tener en cuenta y Normas Locales */
.rules-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.rules-alerts-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rule-alert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.rule-alert-card:hover {
  transform: translateY(-1px);
}

.rule-alert-card.rule-multa {
  border-left: 3px solid var(--accent-red);
}

.rule-alert-card.rule-etiqueta {
  border-left: 3px solid var(--accent-amber);
}

.rule-top-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rule-type-pill {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.rule-type-pill.pill-multa {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
}

.rule-type-pill.pill-etiqueta {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
}

.rule-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.rule-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

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

.health-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.health-key {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.health-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

.health-sublabel {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.health-status-desc-box,
.health-insurance-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}

/* Módulo 8: Frases Esenciales de Supervivencia con Audio */
.phrases-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-blue);
}

.phrases-intro-note {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

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

.phrase-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.phrase-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-1px);
}

.phrase-text-col {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 0%;
}

.phrase-es {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phrase-orig {
  font-size: 0.95rem;
  color: var(--accent-blue);
  font-weight: 500;
  line-height: 1.3;
}

.phrase-phonetic {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.btn-phrase-audio {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-phrase-audio:hover {
  background: var(--accent-blue);
  color: #ffffff;
  border-color: var(--accent-blue);
  transform: scale(1.08);
}

.btn-phrase-audio.is-speaking {
  background: var(--accent-blue);
  color: #ffffff;
  animation: pulseSpeaking 0.8s infinite alternate;
}

@keyframes pulseSpeaking {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  100% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
}

/* 4. Acordeón FAQ SEO */
.seo-faq-accordion {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.faq-main-title {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  color: var(--text-main);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item[open] {
  border-color: var(--accent-blue);
}

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

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

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-sub);
  transition: transform var(--transition-fast);
}

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

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

.faq-answer p {
  margin: 0.5rem 0;
}

/* 5. Modal Accesible para Copiar Resumen */
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.app-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.app-modal-dialog {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}

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

.app-modal-title {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-main);
}

.app-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-sub);
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

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

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

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

.app-modal-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.75rem;
  resize: none;
  outline: none;
  line-height: 1.5;
}

.app-modal-footer {
  padding: 1rem 1.5rem;
  background: var(--bg-card-sub);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* 6. Adaptación Móvil y Responsiva Estricta */
@media (max-width: 900px) {
  .modules-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  
  .comparison-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .search-hero-panel {
    padding: 1rem;
  }

  .country-profile-card {
    padding: 1.25rem;
  }

  .country-hero-header {
    flex-direction: column;
    align-items: stretch;
  }

  .country-hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .country-hero-actions .btn-action-hero {
    width: 100%;
    justify-content: center;
  }

  .country-display-name {
    font-size: 1.75rem;
  }

  .comparison-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .emergency-phones-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .visa-items-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .electric-metrics-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .fx-rate-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fx-converter-inputs {
    flex-direction: column;
    align-items: stretch;
  }

  .fx-swap-col {
    height: 24px;
    transform: rotate(90deg);
  }

  .health-meta-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .phrases-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

