/* ==========================================================================
   Gestión Energía Consultores — Estilos Corporativos (Cloudflare Pages Ready)
   Paleta: Verde Corporativo (#0b6636), Verde Lima (#84bd3a), Pizarra (#0f172a)
   ========================================================================== */

:root {
  --brand-primary: #0b6636;
  --brand-primary-dark: #074724;
  --brand-primary-light: #128247;
  --brand-accent: #84bd3a;
  --brand-accent-light: #a3d95b;
  --brand-accent-soft: rgba(132, 189, 58, 0.14);
  --bg-dark: #091510;
  --bg-slate: #0f1f17;
  --bg-light: #f6f9f7;
  --bg-white: #ffffff;
  --text-main: #1e293b;
  --text-muted: #526358;
  --text-light: #e2ece6;
  --border-color: #dce6df;
  --shadow-sm: 0 2px 8px rgba(9, 21, 16, 0.05);
  --shadow-md: 0 10px 30px rgba(9, 21, 16, 0.08);
  --shadow-lg: 0 20px 45px rgba(9, 21, 16, 0.14);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  --container-max: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-white);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Barra Superior (Topbar)
   ========================================================================== */
.topbar {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.84rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.topbar-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #cbd5e1;
}

.topbar-item svg {
  color: var(--brand-accent);
  flex-shrink: 0;
}

.topbar-item:hover {
  color: #ffffff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-xm {
  background: rgba(132, 189, 58, 0.18);
  color: var(--brand-accent-light);
  border: 1px solid rgba(132, 189, 58, 0.35);
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.portal-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.7rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-link:hover {
  background: var(--brand-primary);
  border-color: var(--brand-accent);
}

/* ==========================================================================
   Header & Navegación Principal
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-logo img {
  height: 48px;
  width: auto;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--brand-primary-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-tagline {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-primary);
  background: var(--brand-accent-soft);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.93rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(11, 102, 54, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(11, 102, 54, 0.38);
  background: linear-gradient(135deg, var(--brand-primary-light) 0%, var(--brand-primary) 100%);
}

.btn-accent {
  background: var(--brand-accent);
  color: var(--bg-dark);
  box-shadow: 0 4px 14px rgba(132, 189, 58, 0.3);
}

.btn-accent:hover {
  background: var(--brand-accent-light);
  transform: translateY(-2px);
}

.btn-outline-light {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  cursor: pointer;
}

/* ==========================================================================
   Hero Principal
   ========================================================================== */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  background-color: var(--bg-dark);
  color: #ffffff;
  overflow: hidden;
  padding: 5rem 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg img,
.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.42) contrast(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    105deg,
    rgba(7, 24, 15, 0.94) 0%,
    rgba(11, 68, 37, 0.82) 52%,
    rgba(9, 21, 16, 0.58) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(132, 189, 58, 0.2);
  border: 1px solid rgba(132, 189, 58, 0.45);
  color: #d9f99d;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.hero-title span {
  color: var(--brand-accent-light);
}

.hero-description {
  font-size: 1.12rem;
  color: #d1fae5;
  max-width: 640px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-card {
  background: rgba(15, 31, 23, 0.78);
  border: 1px solid rgba(132, 189, 58, 0.3);
  backdrop-filter: blur(16px);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

.hero-card-sub {
  font-size: 0.8rem;
  color: var(--brand-accent-light);
}

.hero-stat-list {
  display: grid;
  gap: 1rem;
}

.hero-stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand-accent);
}

.hero-stat-label {
  font-size: 0.88rem;
  color: #cbd5e1;
}

.hero-stat-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.hero-iso-strip {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.hero-iso-strip img {
  height: 46px;
  width: auto;
  border-radius: 6px;
  background: #ffffff;
  padding: 3px;
}

.hero-iso-text {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* ==========================================================================
   Secciones Generales
   ========================================================================== */
.section {
  padding: 5.5rem 0;
}

.section-light {
  background-color: var(--bg-light);
}

.section-dark {
  background-color: var(--bg-slate);
  color: #ffffff;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  background: var(--brand-accent-soft);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.section-dark .section-eyebrow {
  color: var(--brand-accent-light);
  background: rgba(132, 189, 58, 0.18);
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.section-dark .section-title {
  color: #ffffff;
}

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

.section-dark .section-subtitle {
  color: #94a3b8;
}

/* ==========================================================================
   Dashboard de Cifras CGM en Colombia
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.65rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-accent);
  background: rgba(255, 255, 255, 0.07);
}

.metric-card.highlight {
  background: linear-gradient(135deg, rgba(11, 102, 54, 0.55) 0%, rgba(7, 71, 36, 0.8) 100%);
  border-color: var(--brand-accent);
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(132, 189, 58, 0.18);
  color: var(--brand-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-share-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(132, 189, 58, 0.22);
  color: #d9f99d;
}

.metric-number {
  font-size: 2.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.metric-unit {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-accent-light);
  margin-left: 0.2rem;
}

.metric-title {
  font-size: 0.94rem;
  color: #cbd5e1;
  font-weight: 500;
  margin-bottom: 0.9rem;
}

.metric-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-accent) 0%, #4ade80 100%);
  border-radius: 999px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Panel gráfico de matriz energética */
.dashboard-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.matrix-bars {
  display: grid;
  gap: 1.1rem;
}

.matrix-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: #e2e8f0;
}

.matrix-row-header strong {
  color: var(--brand-accent-light);
}

.matrix-summary-box {
  background: rgba(9, 21, 16, 0.65);
  border: 1px solid rgba(132, 189, 58, 0.25);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.matrix-summary-box h4 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.matrix-summary-box p {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin-bottom: 1.1rem;
}

.matrix-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.matrix-tag {
  font-size: 0.78rem;
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #d1fae5;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Sección Nosotros (Tarjetas con Foto + Pilares + Beneficios)
   ========================================================================== */
.about-story-grid {
  display: grid;
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.story-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.story-row.reverse .story-media {
  order: 2;
}

.story-media {
  height: 100%;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.story-row:hover .story-media img {
  transform: scale(1.04);
}

.story-body {
  padding: 2.5rem;
}

.story-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-primary);
  margin-bottom: 0.5rem;
}

.story-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.story-text {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

/* Valores y Beneficios */
.values-benefits-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.values-card,
.benefits-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.values-card {
  background: linear-gradient(145deg, var(--brand-primary-dark) 0%, var(--brand-primary) 100%);
  color: #ffffff;
  border: none;
}

.values-card h3,
.benefits-card h3 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.values-card p {
  color: #e2ece6;
  margin-bottom: 1.5rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pillar-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}

.pillar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-accent-light);
  flex-shrink: 0;
}

.benefit-item {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.benefit-item:first-of-type {
  border-top: none;
  padding-top: 0.5rem;
}

.benefit-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-accent-soft);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.benefit-item h4 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.benefit-item p {
  font-size: 0.94rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Sección Servicios Principales (CGM, BDEE, Telemedida, ISO 50001)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-accent);
}

.service-img {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
  transform: scale(1.06);
}

.service-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(9, 21, 16, 0.85);
  color: var(--brand-accent-light);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.service-content {
  padding: 1.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 1.35rem;
  flex: 1;
}

.service-list {
  display: grid;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.service-list li {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--brand-primary-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-list li::before {
  content: "•";
  color: var(--brand-accent);
  font-size: 1.2rem;
  line-height: 1;
}

/* ==========================================================================
   Sección Análisis Eléctrico e Ingeniería
   ========================================================================== */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.analysis-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  display: flex;
  gap: 1.35rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.analysis-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.analysis-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.analysis-body h3 {
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 0.55rem;
  color: var(--text-main);
}

.analysis-body p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.68;
}

/* ==========================================================================
   Sección Clientes y Directorio de Centrales CGM
   ========================================================================== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.35rem;
  align-items: center;
  margin-bottom: 3.5rem;
}

.client-logo-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  height: 128px;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.client-logo-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-accent);
  box-shadow: var(--shadow-md);
}

.client-logo-card img {
  max-height: 68px;
  max-width: 175px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: var(--transition);
}

.client-logo-card:hover img {
  transform: scale(1.05);
}

.client-logo-caption {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Directorio Interactivo de Agentes y Centrales */
.agents-directory {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}

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

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

.directory-title p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.directory-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.filter-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.directory-search {
  padding: 0.5rem 0.95rem;
  border: 1.5px solid var(--border-color);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.86rem;
  min-width: 220px;
  background: var(--bg-light);
}

.directory-search:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: var(--bg-white);
}

.directory-table-wrap {
  max-height: 460px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

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

.directory-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-dark);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.15rem;
  z-index: 2;
}

.directory-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease;
}

.directory-table tbody tr:hover {
  background: var(--brand-accent-soft);
}

.directory-table td {
  padding: 0.72rem 1.15rem;
  color: var(--text-main);
}

.directory-table td.td-name {
  font-weight: 700;
}

.directory-table td.td-mw {
  font-weight: 800;
  color: var(--brand-primary-dark);
  text-align: right;
  white-space: nowrap;
}

.directory-table th.th-right,
.directory-table td.td-center {
  text-align: center;
}

.directory-table th.th-mw {
  text-align: right;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.source-SOLAR {
  background: #fef3c7;
  color: #b45309;
}

.source-TERMICA {
  background: #fee2e2;
  color: #b91c1c;
}

.source-HIDRICA {
  background: #e0f2fe;
  color: #0369a1;
}

.source-BIOMASA,
.source-COGENERA {
  background: #dcfce7;
  color: #15803d;
}

.comercializadores-banner {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, rgba(11, 102, 54, 0.08) 0%, rgba(132, 189, 58, 0.14) 100%);
  border: 1px solid rgba(11, 102, 54, 0.22);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.comercializadores-banner strong {
  color: var(--brand-primary-dark);
}

/* ==========================================================================
   Sección Contacto
   ========================================================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: stretch;
}

.contact-info-panel {
  background: linear-gradient(145deg, var(--bg-dark) 0%, var(--brand-primary-dark) 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info-panel h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.contact-info-panel > div > p {
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.contact-details-list {
  display: grid;
  gap: 1.35rem;
  margin-bottom: 2rem;
}

.contact-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-detail-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(132, 189, 58, 0.2);
  color: var(--brand-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-text strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-accent-light);
  margin-bottom: 0.15rem;
}

.contact-detail-text span,
.contact-detail-text a {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
}

.contact-detail-text a:hover {
  color: var(--brand-accent-light);
  text-decoration: underline;
}

.contact-map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  height: 210px;
}

.contact-map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-form-panel {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  box-shadow: var(--shadow-md);
}

.contact-form-panel h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.contact-form-panel p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

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

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.form-control {
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background: var(--bg-light);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: var(--bg-white);
  box-shadow: 0 0 0 3px rgba(11, 102, 54, 0.12);
}

textarea.form-control {
  min-height: 125px;
  resize: vertical;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  display: none;
}

.form-status.success {
  display: block;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--bg-dark);
  color: #cbd5e1;
  padding: 4rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand img {
  height: 64px;
  width: auto;
  background: #ffffff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.65;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--brand-accent-light);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #64748b;
}

.footer-admin-link {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  transition: var(--transition);
}

.footer-admin-link:hover {
  color: var(--brand-accent-light);
  border-color: rgba(132, 189, 58, 0.45);
  background: rgba(132, 189, 58, 0.08);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-content,
  .dashboard-panel,
  .values-benefits-wrapper,
  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .story-row,
  .story-row.reverse {
    grid-template-columns: 1fr;
  }

  .story-row.reverse .story-media {
    order: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .topbar-info {
    display: none;
  }

  .topbar-inner {
    justify-content: center;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: fixed;
    top: 118px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .nav-menu.open {
    display: flex;
  }

  .analysis-grid,
  .form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
