/* ==========================================================================
   Calculadora de sombra y horas de sol por orientación de fachada
   Diseño canónico Fijate Tools • Midnight Slate • Responsive & Touch-first
   ========================================================================== */

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

  /* Paleta Solar Midnight Slate */
  --bg-app: #0b0f17;
  --bg-card: #111827;
  --bg-card-subtle: #162032;
  --bg-input: #1e293b;
  --bg-hover: #26354a;
  
  --border-color: #273549;
  --border-focus: #f59e0b;

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

  --primary-color: #f59e0b;
  --primary-hover: #d97706;
  --primary-light: rgba(245, 158, 11, 0.15);
  --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);

  --solar-blue: #0ea5e9;
  --solar-emerald: #10b981;
  --solar-rose: #f43f5e;
  --solar-indigo: #6366f1;

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

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(245, 158, 11, 0.25);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="light"],
body.light-theme {
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --bg-hover: #e2e8f0;

  --border-color: #cbd5e1;
  --border-focus: #d97706;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --primary-color: #d97706;
  --primary-hover: #b45309;
  --primary-light: rgba(217, 119, 6, 0.12);
  --primary-gradient: linear-gradient(135deg, #d97706 0%, #c2410c 100%);

  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 25px rgba(217, 119, 6, 0.15);
}

/* ==========================================================================
   Reset y contención global
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.brand-title,
.section-title,
.card-header-title {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.mono,
.stat-val,
.code-val,
.badge-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Layout Principal de Herramienta (Canonical Tool Layout)
   ========================================================================== */
.tool-layout {
  max-width: 1240px;
  margin: 1.25rem auto 3rem;
  padding: 0 1rem;
  width: 100%;
}

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

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

.card-main {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Hero informativo introductorio */
.solar-hero-banner {
  padding: 1.75rem 1.75rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.12), transparent 45%);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 850px;
  line-height: 1.55;
}

/* ==========================================================================
   Workspace en 2 Columnas (Desktop) y 1 Columna (Móvil)
   ========================================================================== */
.solar-workspace {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 0;
}

@media (max-width: 1024px) {
  .solar-workspace {
    grid-template-columns: 1fr;
  }
}

.control-panel {
  padding: 1.5rem;
  border-right: 1px solid var(--border-color);
  background-color: var(--bg-card-subtle);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 1024px) {
  .control-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

.display-panel {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

/* ==========================================================================
   Grupos de Campos y Formularios Responsivos
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-label-hint {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
}

/* Inputs de texto y Selects protegidos */
.form-input,
.form-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 0 0.85rem;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-select {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

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

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Buscador de municipios con autocompletado */
.city-search-wrapper {
  position: relative;
  width: 100%;
}

.city-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.city-search-results.active {
  display: block;
}

.city-item {
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

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

.city-item:hover,
.city-item.selected {
  background-color: var(--bg-hover);
  color: var(--primary-color);
}

.city-province {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Dúo o Trío de Inputs Numéricos en Grid compacto */
.input-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

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

/* Wrappers con sufijo/unidad */
.input-with-suffix {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 42px;
}

.input-with-suffix input {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0 0.75rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.input-with-suffix input:focus {
  outline: none;
}

.input-suffix {
  padding: 0 0.65rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  background-color: rgba(255, 255, 255, 0.03);
  border-left: 1px solid var(--border-color);
  user-select: none;
  white-space: nowrap;
}

/* ==========================================================================
   Selector de Orientación con Brújula Táctil Interactiva
   ========================================================================== */
.compass-selector-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.compass-dial-wrap {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.compass-dial-wrap:active {
  cursor: grabbing;
}

.compass-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px dashed var(--border-color);
  position: relative;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.04) 0%, transparent 70%);
}

.compass-needle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 65px;
  background: linear-gradient(to top, var(--primary-color) 0%, #ef4444 100%);
  transform-origin: 50% 100%;
  margin-top: -65px;
  margin-left: -2px;
  border-radius: 4px;
  transition: transform 0.05s ease-out;
  pointer-events: none;
}

.compass-needle::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -4px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid #ef4444;
}

.compass-center-hub {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--text-main);
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Etiquetas cardinales en el dial */
.compass-card-label {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
  user-select: none;
}

.compass-n { top: 4px; left: 50%; transform: translateX(-50%); color: #ef4444; }
.compass-e { right: 6px; top: 50%; transform: translateY(-50%); }
.compass-s { bottom: 4px; left: 50%; transform: translateX(-50%); color: var(--primary-color); }
.compass-w { left: 6px; top: 50%; transform: translateY(-50%); }

/* Presets rápidos de orientación */
.orientation-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  width: 100%;
}

.btn-preset {
  height: 34px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-preset.active {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
  font-weight: 700;
}

.orientation-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.45rem 0.75rem;
  background-color: var(--bg-input);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.orientation-readout-deg {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--primary-color);
}

/* ==========================================================================
   Panel de Resultados y Telemetría Solar (KPI Cards)
   ========================================================================== */
.solar-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .solar-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--primary-color));
}

.kpi-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

.kpi-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Sección de Visualizadores (Tabs y Canvas 2D / 2.5D)
   ========================================================================== */
.visualizers-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.vis-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vis-tabs {
  display: flex;
  gap: 0.5rem;
}

.vis-tab-btn {
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.vis-tab-btn.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-color: rgba(245, 158, 11, 0.3);
}

.vis-body {
  padding: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
  background-color: var(--bg-card);
}

.vis-container {
  display: none;
  width: 100%;
  max-width: 540px;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.vis-container.active {
  display: flex;
}

/* Controles de reproducción de la animación diurna */
.time-scrubber-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem 1.25rem;
  background-color: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
}

.btn-play-pause {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-color);
  color: #0b0f17;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.btn-play-pause:hover {
  background-color: var(--primary-hover);
}

.time-slider-wrap {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.time-slider {
  width: 100%;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.time-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.current-time-badge {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 65px;
  text-align: right;
}

/* ==========================================================================
   Tabla y Gráfica del Estudio Anual (12 Meses)
   ========================================================================== */
.annual-study-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.annual-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

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

.annual-table th {
  background-color: var(--bg-card-subtle);
  padding: 0.65rem 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.annual-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  white-space: nowrap;
}

.annual-table tr:last-child td {
  border-bottom: none;
}

.annual-table tr.highlight-solstice {
  background-color: rgba(245, 158, 11, 0.08);
  font-weight: 600;
}

.month-bar-cell {
  width: 140px;
}

.mini-bar-track {
  height: 8px;
  width: 100%;
  background-color: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Tarjetas de Asesoría Bioclimática
   ========================================================================== */
.advisor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 768px) {
  .advisor-grid {
    grid-template-columns: 1fr;
  }
}

.advisor-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.advisor-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.advisor-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.advisor-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.advisor-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.advisor-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.advisor-badge {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

/* Lista botánica en grid */
.botany-species-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.botany-item {
  padding: 0.5rem 0.75rem;
  background-color: var(--bg-card-subtle);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--solar-emerald);
}

.botany-item-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-main);
}

.botany-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Botones Principales de Acción
   ========================================================================== */
.btn-primary {
  width: 100%;
  height: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--primary-gradient);
  color: #0b0f17;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-secondary {
  width: 100%;
  height: 42px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-dim);
}

/* ==========================================================================
   Sección FAQ y Contenido Educativo SEO
   ========================================================================== */
.faq-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

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

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

.faq-item {
  padding: 1rem;
  background-color: var(--bg-card-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.faq-q {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.faq-a {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Modales Canónicos (Confirmación y Ayuda Matemática)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-modal-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-body {
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ==========================================================================
   Hoja de Impresión A4 (.print-sheet)
   ========================================================================== */
.print-sheet {
  display: none;
}

@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }

  .app-header,
  .tools-ad-banner-section,
  .tool-ad-sidebar,
  .card-main,
  .faq-section,
  .fijate-footer,
  .modal-overlay {
    display: none !important;
  }

  .print-sheet {
    display: block !important;
    width: 210mm;
    margin: 0 auto;
    padding: 15mm;
    font-size: 11pt;
    line-height: 1.4;
    color: #000000;
  }

  .print-header {
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }

  .print-title {
    font-size: 18pt;
    font-weight: 800;
    margin-bottom: 4px;
  }

  .print-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
  }

  .print-box {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 4px;
  }

  .print-box-title {
    font-weight: bold;
    font-size: 10pt;
    text-transform: uppercase;
    margin-bottom: 6px;
    border-bottom: 1px solid #eee;
    padding-bottom: 4px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #ddd;
    padding: 6px 8px;
    font-size: 9.5pt;
  }

  .print-table th {
    background-color: #f2f2f2;
    font-weight: bold;
  }
}
