/* ============================================================
   JDServer.es — HOME / LANDING
   Hero + secciones de proyectos, red y tecnología
   con soporte Claro / Oscuro / Auto
   ============================================================ */

/* -------- Fondo general -------- */

.jd-body {
  background-color: #020617;
  color: #e5e7eb;
}

/* Modo claro: override sobre el body */
:root[data-theme="light"] .jd-body {
  background-color: #f1f5f9;
  color: #020617;
}

.jd-main {
  padding: 26px 22px 56px;
}

/* HERO */

.jd-hero {
  margin-top: 16px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.jd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: #e5e7eb;
}

.jd-hero-title {
  margin-top: 10px;
  font-size: 2.3rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #a5f3fc;
}

.jd-hero-subtitle {
  margin-top: 10px;
  font-size: 0.98rem;
  color: rgba(226, 232, 240, 0.92);
  max-width: 40rem;
}

.jd-hero-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Botones */

.jd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(148, 163, 184, 0.6);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.08s ease;
}

.jd-btn-primary {
  background: linear-gradient(135deg, #22d3ee, #38bdf8);
  color: #02131c;
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(8, 47, 73, 0.6);
}

.jd-btn-primary:hover {
  transform: translateY(-1px);
}

.jd-btn-ghost {
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

.jd-btn-ghost:hover {
  background: rgba(30, 64, 175, 0.9);
}

/* Hero visual */

.jd-hero-visual {
  display: flex;
  justify-content: flex-end;
}

.jd-hero-card {
  width: 100%;
  max-width: 320px;
  border-radius: 26px;
  padding: 16px 16px 18px;
  background:
    radial-gradient(140% 140% at 0% 0%, rgba(56, 189, 248, 0.4), transparent),
    radial-gradient(160% 160% at 100% 100%, rgba(56, 189, 248, 0.26), #020617);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(148, 163, 184, 0.35);
}

.jd-hero-mini {
  font-size: 0.84rem;
  color: rgba(226, 232, 240, 0.9);
  margin-bottom: 12px;
}

.jd-hero-kpis {
  list-style: none;
  margin: 0;
  padding: 10px 10px 4px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.kpi-label {
  display: block;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.9);
}

.kpi-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: #e0f2fe;
}

/* SECCIONES GENERALES */

.jd-section {
  margin-top: 32px;
  margin-bottom: 16px;
}

.jd-section-soft {
  background: radial-gradient(
      900px 300px at 0% 0%,
      rgba(30, 64, 175, 0.16),
      transparent
    );
  padding: 18px 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(30, 64, 175, 0.5);
}

.jd-section-header {
  margin-bottom: 16px;
}

.jd-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #e0f2fe;
}

.jd-section-subtitle {
  margin-top: 4px;
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.95);
}

/* PROYECTOS GRID */

.jd-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.jd-project-card {
  border-radius: 18px;
  padding: 14px 14px 16px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.85);
}

.jd-project-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #bae6fd;
}

.jd-project-card p {
  font-size: 0.88rem;
  color: rgba(209, 213, 219, 0.96);
  margin-bottom: 8px;
}

.jd-project-link {
  font-size: 0.83rem;
  color: #22d3ee;
  text-decoration: none;
}

.jd-project-link:hover {
  text-decoration: underline;
}

/* RED DE ESTACIONES */

.jd-network-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.jd-network-card {
  border-radius: 16px;
  padding: 12px 12px 13px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(55, 65, 81, 0.9);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.jd-network-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.jd-network-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #e0f2fe;
}

.jd-network-location {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.96);
}

.jd-network-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.96);
}

.jd-network-live {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.jd-network-live-label {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.95);
  color: rgba(148, 163, 184, 0.98);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.jd-network-live-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.78rem;
}

.jd-network-live-item {
  font-size: 0.76rem;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.jd-network-chip {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

.jd-network-link {
  margin-top: 6px;
  font-size: 0.8rem;
  text-decoration: none;
  color: #38bdf8;
}

.jd-network-link:hover {
  text-decoration: underline;
}

/* TECNOLOGÍA */

.jd-tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.jd-tech-card {
  border-radius: 18px;
  padding: 14px 14px 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(51, 65, 85, 0.9);
}

.jd-tech-card h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: #bfdbfe;
}

.jd-tech-card p {
  font-size: 0.88rem;
  color: rgba(209, 213, 219, 0.96);
}

/* CONTACTO */

.jd-contact-section {
  margin-top: 32px;
}

.jd-contact-content {
  font-size: 0.9rem;
  color: rgba(209, 213, 219, 0.96);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jd-contact-content a {
  color: #22d3ee;
}

.jd-contact-content a:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 960px) {
  .jd-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .jd-hero-visual {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .jd-projects-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .jd-tech-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .jd-network-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .jd-main {
    padding: 20px 16px 40px;
  }
  .jd-hero-title {
    font-size: 1.8rem;
  }
  .jd-network-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================
   Tema CLARO — overrides de tarjetas/secciones
   ============================================================ */

/* Hero + textos */

:root[data-theme="light"] .jd-badge {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(148, 163, 184, 0.7);
  color: #0f172a;
}

:root[data-theme="light"] .jd-hero-title {
  color: #0f172a;
}

:root[data-theme="light"] .jd-hero-subtitle {
  color: #4b5563;
}

/* Botones en claro */

:root[data-theme="light"] .jd-btn {
  border-color: rgba(148, 163, 184, 0.6);
}

:root[data-theme="light"] .jd-btn-ghost {
  background: #0f172a;
  color: #f9fafb;
}

:root[data-theme="light"] .jd-btn-ghost:hover {
  background: #020617;
}

/* Tarjeta hero KPIs */

:root[data-theme="light"] .jd-hero-card {
  background:
    radial-gradient(140% 140% at 0% 0%, rgba(56, 189, 248, 0.5), transparent),
    radial-gradient(160% 160% at 100% 100%, rgba(59, 130, 246, 0.35), #e0f2fe);
  box-shadow:
    0 20px 40px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(148, 163, 184, 0.35);
}

:root[data-theme="light"] .jd-hero-mini {
  color: #0f172a;
}

:root[data-theme="light"] .jd-hero-kpis {
  background: rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .kpi-label {
  color: #6b7280;
}

:root[data-theme="light"] .kpi-value {
  color: #0f172a;
}

/* Secciones y tarjetas */

:root[data-theme="light"] .jd-section-title {
  color: #0f172a;
}

:root[data-theme="light"] .jd-section-subtitle {
  color: #4b5563;
}

:root[data-theme="light"] .jd-section-soft {
  background: radial-gradient(
      900px 280px at 0% 0%,
      rgba(37, 99, 235, 0.06),
      #e5edf7
    );
  border-color: rgba(148, 163, 184, 0.7);
}

/* Proyectos / red / tecnología en claro */

:root[data-theme="light"] .jd-project-card,
:root[data-theme="light"] .jd-network-card,
:root[data-theme="light"] .jd-tech-card {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.7);
}

:root[data-theme="light"] .jd-project-card h3,
:root[data-theme="light"] .jd-network-name,
:root[data-theme="light"] .jd-tech-card h3 {
  color: #0f172a;
}

:root[data-theme="light"] .jd-project-card p,
:root[data-theme="light"] .jd-tech-card p,
:root[data-theme="light"] .jd-network-meta,
:root[data-theme="light"] .jd-network-location {
  color: #4b5563;
}

/* Chips y datos en claro */

:root[data-theme="light"] .jd-network-chip,
:root[data-theme="light"] .jd-network-live-item {
  background: #f9fafb;
  border-color: rgba(148, 163, 184, 0.8);
}

:root[data-theme="light"] .jd-network-live-label {
  background: #0f172a;
  color: #f9fafb;
  border-color: #020617;
}

:root[data-theme="light"] .jd-network-link {
  color: #0369a1;
}

/* Contacto */

:root[data-theme="light"] .jd-contact-content {
  color: #1f2933;
}

:root[data-theme="light"] .jd-contact-content a {
  color: #0369a1;
}
