/* =============================================================
   modulo2.css - Estilos exclusivos del Modulo 2
   =============================================================
   Coherente con la paleta del proyecto:
   --verde-bosque : #1a6b3c
   --verde-claro  : #2ecc71
   --verde-oscuro : #0f3d22
   --texto        : #2c3e50
   --gris-fondo   : #f0f4f0
   ============================================================= */

/* ── HERO ─────────────────────────────────────────────────── */
.m2-hero {
  background: linear-gradient(135deg, #0f3d22 0%, #1a6b3c 60%, #2ecc71 100%);
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}
.m2-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M20 20.5V18H0v5h20v20.5h2V23h20v-5H22V.5h-2v20z'/%3E%3C/g%3E%3C/svg%3E");
}
.m2-hero-titulo {
  font-family: 'Merriweather', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
}
.m2-hero-acento  { color: #a5f3c8; }
.m2-hero-sub     { color: rgba(255,255,255,0.82); font-size: 15px; font-weight: 300; max-width: 560px; }

/* Hero card derecha */
.m2-hero-card {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 16px;
  padding: 28px 32px;
  text-align: center;
  backdrop-filter: blur(8px);
}
.m2-hero-card-icono  { font-size: 36px; margin-bottom: 6px; }
.m2-hero-card-titulo { color: #fff; font-weight: 700; font-size: 15px; }
.m2-hero-card-sep    { border-color: rgba(255,255,255,0.18); margin: 10px 0; }
.m2-hero-stat-num    { font-size: 1.8rem; font-weight: 700; color: #a5f3c8; font-family: 'Merriweather',serif; line-height: 1; }
.m2-hero-stat-lbl    { font-size: 10px; color: rgba(255,255,255,0.65); margin-top: 2px; }

/* Botones hero */
.btn-m2-principal {
  background: #fff; color: #1a6b3c; font-weight: 700;
  border-radius: 8px; padding: 11px 24px; font-size: 14px;
  border: 2px solid transparent; transition: all .2s; text-decoration: none;
}
.btn-m2-principal:hover {
  background: #2ecc71; color: #fff;
  transform: translateY(-2px); box-shadow: 0 6px 18px rgba(46,204,113,.35);
}
.btn-m2-secundario {
  background: transparent; color: rgba(255,255,255,.88);
  border-radius: 8px; padding: 11px 24px; font-size: 14px;
  border: 1px solid rgba(255,255,255,.38); transition: all .2s; text-decoration: none;
}
.btn-m2-secundario:hover { background: rgba(255,255,255,.12); color: #fff; }


/* ── SECCIONES ────────────────────────────────────────────── */
.m2-seccion      { padding: 64px 0; }
.m2-seccion-gris { background: #f4f6f4; }

.m2-seccion-header { margin-bottom: 40px; }

.m2-tag {
  display: inline-block; background: #e8f5e9; color: #1a6b3c;
  border-radius: 20px; padding: 4px 14px; font-size: 11px;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
}
.m2-seccion-titulo {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: #1a6b3c; margin-bottom: 8px;
}
.m2-seccion-sub { font-size: 14px; color: #7f8c8d; max-width: 580px; margin: 0 auto; }
.m2-subtitulo-verde { color: #1a6b3c; font-family: 'Merriweather', serif; font-size: 16px; }


/* ── TARJETA DE TEXTO ─────────────────────────────────────── */
.m2-texto-card {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  border: 1px solid #e0e7e0;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.m2-texto-card p { font-size: 14px; color: #444; line-height: 1.75; text-align: justify; }
.m2-texto-card strong { color: #1a6b3c; }
.m2-texto-card code {
  background: #e8f5e9; color: #1a6b3c; padding: 1px 6px;
  border-radius: 4px; font-size: 12px;
}

/* Tarjetas de ventajas */
.m2-ventaja-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border-radius: 10px; padding: 16px 18px;
  border: 1px solid #e0e7e0; box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform .2s;
}
.m2-ventaja-card:hover { transform: translateY(-3px); }
.m2-ventaja-icono {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.m2-ventaja-titulo { font-weight: 700; font-size: 13px; color: #2c3e50; margin-bottom: 3px; }
.m2-ventaja-desc   { font-size: 12px; color: #666; line-height: 1.55; }


/* ── FILTROS ──────────────────────────────────────────────── */
.m2-filtros-card {
  background: #fff; border-radius: 12px;
  border: 1px solid #e0e7e0; box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
}
.m2-filtros-header {
  background: linear-gradient(135deg, #0f3d22, #1a6b3c);
  color: #fff; padding: 12px 20px; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.m2-filtros-fuente {
  font-size: 10px; font-weight: 400;
  color: rgba(255,255,255,.6); margin-left: auto;
}
.m2-filtros-body  { padding: 20px; }
.m2-filtro-label  {
  font-size: 11px; font-weight: 700; color: #555;
  text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 4px; display: block;
}
.m2-select {
  font-size: 13px !important; border-radius: 8px !important;
  border-color: #d0dbd0 !important;
}
.m2-select:focus { border-color: #1a6b3c !important; box-shadow: 0 0 0 3px rgba(26,107,60,.12) !important; }

/* Botones de filtros */
.btn-m2-consultar {
  background: linear-gradient(135deg, #1a6b3c, #2ecc71);
  color: #fff; border: none; border-radius: 8px;
  padding: 9px 22px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.btn-m2-consultar:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(26,107,60,.3); }
.btn-m2-limpiar {
  background: #f4f6f4; color: #666; border: 1px solid #ddd;
  border-radius: 8px; padding: 9px 18px; font-size: 13px;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.btn-m2-limpiar:hover { background: #e8f5e9; color: #1a6b3c; }


/* ── KPIs ─────────────────────────────────────────────────── */
.m2-kpi-card {
  border-radius: 10px; padding: 16px 18px;
  border: none; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.m2-kpi-valor  { font-size: 20px; font-weight: 700; line-height: 1.1; }
.m2-kpi-etiq   { font-size: 11px; font-weight: 600; color: #2c3e50; margin-top: 2px; }
.m2-kpi-sub    { font-size: 10px; color: #999; }


/* ── GRAFICAS ─────────────────────────────────────────────── */
.m2-grafica-card {
  background: #fff; border-radius: 12px; padding: 16px;
  border: 1px solid #e0e7e0; box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.m2-grafica-titulo {
  font-size: 12px; font-weight: 700; color: #1a6b3c;
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px;
}


/* ── TABLA DE RESULTADOS ──────────────────────────────────── */
.m2-tabla-card {
  background: #fff; border-radius: 12px;
  border: 1px solid #e0e7e0; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  overflow: hidden;
}
.m2-tabla-header {
  background: #f8faf8; padding: 12px 18px;
  border-bottom: 1px solid #e0e7e0; font-size: 13px; font-weight: 700;
  color: #1a6b3c; display: flex; align-items: center;
  justify-content: space-between;
}
.m2-tabla-count {
  font-size: 11px; background: #e8f5e9; color: #1a6b3c;
  padding: 3px 10px; border-radius: 20px; font-weight: 600;
}
.m2-table thead th {
  background: #1a6b3c; color: #fff; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .4px;
  padding: 10px 12px; white-space: nowrap; border: none;
}
.m2-table tbody tr { font-size: 12px; }
.m2-table tbody tr:nth-child(even) { background: #f8fff8; }
.m2-table tbody tr:hover { background: #e8f5e9; }
.m2-table tbody td { padding: 8px 12px; vertical-align: middle; border-color: #e8f0e8; }

.m2-region-badge {
  background: #e8f5e9; color: #1a6b3c; font-size: 10px;
  font-weight: 700; padding: 2px 8px; border-radius: 20px;
}
.fw-600 { font-weight: 600; }

/* Sin resultados */
.m2-sin-resultados {
  text-align: center; color: #aaa; padding: 48px;
  background: #fff; border-radius: 12px;
  border: 1px dashed #ddd; font-size: 14px;
}


/* ── DIAGRAMA SVG ─────────────────────────────────────────── */
.m2-diagrama-wrapper {
  background: #fff; border-radius: 16px; padding: 24px;
  border: 1px solid #e0e7e0; box-shadow: 0 4px 20px rgba(0,0,0,.08);
  overflow-x: auto;
}
.m2-diagrama-svg { width: 100%; max-width: 900px; display: block; margin: 0 auto; }


/* ── ETL ──────────────────────────────────────────────────── */
.m2-etl-imagen-wrapper {
  border-radius: 12px; overflow: hidden;
  border: 1px solid #ddd; box-shadow: 0 4px 18px rgba(0,0,0,.1);
}
.m2-etl-imagen-titulo {
  background: #1a1a2e; color: rgba(255,255,255,.85);
  padding: 10px 16px; font-size: 12px; font-weight: 600;
}
.m2-etl-imagen {
  width: 100%; display: block; max-height: 420px;
  object-fit: contain; background: #1e1e2e;
}
.m2-etl-imagen-footer {
  background: #1a1a2e; color: rgba(255,255,255,.5);
  padding: 8px 16px; font-size: 10px;
}

/* Pasos ETL */
.m2-etl-paso {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border-radius: 10px; padding: 16px;
  border: 1px solid #e0e7e0; box-shadow: 0 2px 8px rgba(0,0,0,.04);
  margin-bottom: 12px;
}
.m2-etl-letra {
  width: 36px; height: 36px; border-radius: 50%;
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.m2-etl-titulo { font-weight: 700; font-size: 13px; color: #2c3e50; margin-bottom: 5px; }
.m2-etl-desc   { font-size: 12px; color: #555; line-height: 1.6; }
.m2-etl-desc code {
  background: #e8f5e9; color: #1a6b3c; padding: 1px 5px;
  border-radius: 4px; font-size: 11px;
}
.m2-etl-desc strong { color: #1a6b3c; }

/* Estado del ETL */
.m2-etl-estado {
  background: #fff8e1; border-radius: 10px; padding: 14px 16px;
  border-left: 4px solid #e67e22;
}
.m2-etl-estado-titulo { font-size: 12px; font-weight: 700; color: #e65100; margin-bottom: 6px; }
.m2-etl-estado-desc   { font-size: 12px; color: #555; line-height: 1.6; }
.m2-etl-estado-desc strong { color: #e65100; }


/* ── CONCLUSIONES ─────────────────────────────────────────── */
.m2-conclusion-card {
  background: #fff; border-radius: 12px; padding: 24px 26px;
  border: 1px solid #e0e7e0; box-shadow: 0 2px 10px rgba(0,0,0,.06);
  height: 100%; transition: transform .2s;
}
.m2-conclusion-card:hover { transform: translateY(-4px); }
.m2-conclusion-num {
  font-size: 36px; font-weight: 900; color: #e8f5e9;
  font-family: 'Merriweather', serif; line-height: 1;
  margin-bottom: 8px;
}
.m2-conclusion-card h5 { font-size: 15px; color: #1a6b3c; margin-bottom: 10px; }
.m2-conclusion-card p  { font-size: 13px; color: #555; line-height: 1.7; }


/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .m2-hero       { padding: 48px 0 36px; }
  .m2-seccion    { padding: 40px 0; }
  .m2-hero-titulo{ font-size: 1.8rem; }
}
