/* ==========================================================================
   STYLES.CSS — DR. MARLON SAAVEDRA WEB
   Estilo: Dark Cyber-Medical con tarjetas "glass" (cristal translúcido)
   ==========================================================================

   ÍNDICE (busca el número, por ejemplo "[05]", con Ctrl+F)
   --------------------------------------------------------------------------
   [00] VARIABLES            → colores, radios, sombras (cambia el look global aquí)
   [01] BASE                 → reset, tipografía, fondo de la página
   [02] UTILIDADES           → .text-cyan, .text-emerald
   [03] TARJETA GLASS        → estilo compartido de TODAS las tarjetas (.glass-card)
   [04] ENCABEZADO / NAV     → barra superior (nombre, escudo, menú)
   [05] HERO / PORTADA       → insignia, título, descripción, panel de métricas
   [06] SECCIONES (genérico) → subtítulo, título y bajada de cada sección
   [07] GOBERNANZA           → las 4 tarjetas (bento-grid)
   [08] PERFIL PROFESIONAL   → las 2 tarjetas académicas
   [09] AVISO LEGAL          → ficha "Estatus Sanitario Auditado"
   [10] PIE DE PÁGINA        → footer
   [11] RESPONSIVE           → ajustes para tablet y celular

   NOTA: cada bloque indica qué parte del index.html controla
   (con la clase HTML entre comillas) para que lo encuentres rápido.
   ========================================================================== */


/* ==========================================================================
   [00] VARIABLES — Cambia aquí colores y medidas globales
   ========================================================================== */
:root {
  /* Fondos */
  --bg-dark: #0b1120;                       /* color base de la página */
  --bg-card: rgba(15, 23, 42, 0.62);        /* relleno de las tarjetas glass */
  --bg-card-light: rgba(30, 41, 59, 0.50);  /* segundo tono del degradado de tarjetas */

  /* Bordes */
  --border-glass: rgba(125, 211, 252, 0.18);        /* borde normal */
  --border-glass-hover: rgba(56, 189, 248, 0.55);   /* borde al pasar el mouse */

  /* Textos */
  --text-main: #f8fafc;     /* blanco suave */
  --text-muted: #94a3b8;    /* gris azulado para párrafos */

  /* Acentos */
  --accent-cyan: #38bdf8;
  --accent-cyan-soft: #7dd3fc;
  --accent-green: #10b981;
  --accent-glow: rgba(56, 189, 248, 0.35);

  /* Medidas */
  --radius-lg: 20px;        /* esquinas de tarjetas */
  --nav-height: 76px;       /* alto de la barra superior */
  --content-width: 1200px;  /* ancho máximo del contenido */

  /* Tipografías (cargadas en el <head> del index.html) */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}


/* ==========================================================================
   [01] BASE — Reset, tipografía y FONDO de la página
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Evita que la barra fija tape el título al saltar a una sección */
  scroll-padding-top: calc(var(--nav-height) + 10px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  /* FONDO (sin cambios): resplandores + imagen neuronal fija.
     Para cambiar la imagen, edita el nombre 'bg_neural.png'. */
  background-image: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.12), transparent 45%),
                    radial-gradient(circle at 20% 70%, rgba(16, 185, 129, 0.08), transparent 50%),
                    url('bg_neural.png');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}


/* ==========================================================================
   [02] UTILIDADES — colores de texto reutilizables
   ========================================================================== */
.text-cyan    { color: var(--accent-cyan); }
.text-emerald { color: var(--accent-green); }


/* ==========================================================================
   [03] TARJETA GLASS — Estilo compartido por todas las tarjetas
   HTML: class="glass-card"  (gobernanza + perfil académico)
   Para cambiar el "look cristal" de TODAS las tarjetas, edita este bloque.
   ========================================================================== */
.glass-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--bg-card-light), var(--bg-card));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  /* El movimiento 3D lo controla script.js (efecto tilt) */
  transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Línea de luz superior (el brillo cian del mockup) */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0.55;
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: 0 14px 44px rgba(56, 189, 248, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.14);
}


/* ==========================================================================
   [04] ENCABEZADO / NAVEGACIÓN
   HTML: <header class="navbar-glass">
   Distribución (igual al mockup):  [ nombre ]   [ escudo ]   [ menú ]
   ========================================================================== */
.navbar-glass {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(11, 17, 32, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}

/* Cuadrícula de 3 columnas: nombre | escudo | menú */
.nav-container {
  max-width: var(--content-width);
  height: var(--nav-height);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

/* "display: contents" permite separar escudo y texto en columnas distintas
   sin tocar el HTML */
.brand-identity { display: contents; }

/* --- Columna 1: nombre del doctor --- */
.brand-text {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
}

.doctor-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.doctor-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* --- Columna 2: escudo circular central --- */
.brand-emblem {
  grid-column: 2;
  grid-row: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 18px var(--accent-glow);
}

/* --- Columna 3: menú de secciones --- */
.nav-menu {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  height: 100%;
  display: flex;
  gap: 32px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-cyan);
}

/* Línea luminosa bajo la sección activa */
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
  border-radius: 2px;
}


/* ==========================================================================
   [05] HERO / PORTADA
   HTML: <section id="inicio" class="hero-section">
   Orden vertical: insignia → título → descripción → panel de métricas
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-height) + 70px) 24px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Capa de imagen propia del hero.
   OCULTA a propósito: el fondo neuronal ya se muestra en el <body> [01].
   Si quieres una capa extra, borra la línea "display: none". */
.neural-bg-layer {
  display: none;
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: right center;
  opacity: 0.35;
}

/* Degradado suave que funde el hero con la siguiente sección */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 17, 32, 0) 60%, rgba(11, 17, 32, 0.45));
  pointer-events: none;
  z-index: 1;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --- Insignia: "SHA-256 Ledger: Íntegro • NOM-004 ..." --- */
.status-badge-glass {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  margin-bottom: 36px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(15, 23, 42, 0.55));
  border: 1px solid rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Puntito verde pulsante */
.status-pulse-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e2e8f0;
  letter-spacing: 0.3px;
}

/* --- Título principal (serif, centrado) --- */
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  font-weight: 600;
  line-height: 1.18;
  color: #ffffff;
  margin-bottom: 24px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Segunda línea del título: blanco con un leve tinte cian */
.text-gradient-cyan {
  background: linear-gradient(90deg, #ffffff 0%, #e0f2fe 55%, var(--accent-cyan-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* --- Descripción bajo el título --- */
.hero-description {
  max-width: 760px;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-muted);
}

/* --- Panel de 3 métricas (Criptografía / Custodia / Auditoría) --- */
.metrics-panel-glass {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 52px;
  padding: 20px 10px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--bg-card-light), var(--bg-card));
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.40),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 30px;
  text-align: center;
}

.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

.metric-divider {
  width: 1px;
  background: rgba(56, 189, 248, 0.2);
}


/* ==========================================================================
   [06] SECCIONES (ESTILO GENÉRICO)
   HTML: <section class="section-container"> + <div class="section-header">
   Aplica a "Gobernanza" y a "Perfil Profesional".
   Para alinear los encabezados a la IZQUIERDA: cambia text-align a left
   y quita "margin: 0 auto" de .section-lead.
   ========================================================================== */
.section-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 90px 24px;
}

.section-header {
  margin-bottom: 52px;
  text-align: center;
}

/* Etiqueta pequeña en mayúsculas (ej. "PROTECCIÓN DE LA INFORMACIÓN CLÍNICA") */
.section-subtitle {
  display: block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

/* Título grande de sección */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
}

/* Párrafo introductorio */
.section-lead {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--text-muted);
}


/* ==========================================================================
   [07] GOBERNANZA DE DATOS — 4 tarjetas
   HTML: <section id="gobernanza"> → <div class="bento-grid"> → .glass-card
   Para cambiar a 3 o 4 columnas: edita grid-template-columns.
   ========================================================================== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.bento-grid .glass-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Cuadro del icono (arriba de cada tarjeta) */
.card-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.30);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.18);
}

.bento-grid .glass-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
}

.bento-grid .glass-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}


/* ==========================================================================
   [08] PERFIL PROFESIONAL — 2 tarjetas académicas
   HTML: <section id="perfil"> → <div class="academic-grid"> → .academic-card
   .border-highlight = la tarjeta destacada (UNAM) con borde cian más fuerte
   ========================================================================== */
.academic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.academic-card {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Tarjeta destacada */
.academic-card.border-highlight {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 10px 40px rgba(56, 189, 248, 0.18),
              inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

/* Etiqueta tipo píldora ("GRADO MÉDICO" / "ESPECIALIDAD CLÍNICA") */
.academic-badge {
  align-self: flex-start;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Variante cian de la etiqueta */
.academic-badge.badge-cyan {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.academic-title {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
}

.institution-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.institution-location {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.academic-desc {
  margin-top: 8px;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text-muted);
}


/* ==========================================================================
   [09] AVISO LEGAL — "Estatus Sanitario Auditado & Verificado"
   HTML: <div class="legal-notice-card"> (icono + título + texto)
   ========================================================================== */
.legal-notice-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.08), var(--bg-card));
  border: 1px solid rgba(16, 185, 129, 0.30);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Círculo del icono de escudo con palomita */
.legal-notice-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.2);
}

.legal-notice-content h4 {
  margin-bottom: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
}

.legal-notice-content p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}


/* ==========================================================================
   [10] PIE DE PÁGINA
   HTML: <footer class="footer-glass">
   Izquierda: datos del doctor  |  Derecha: cumplimiento normativo + copyright
   ========================================================================== */
.footer-glass {
  margin-top: 40px;
  padding: 44px 24px;
  background: rgba(11, 17, 32, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(56, 189, 248, 0.15);
}

.footer-container {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-doctor {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #ffffff;
}

.footer-spec {
  margin-top: 2px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-location {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.85;
}

.footer-compliance {
  max-width: 520px;
  text-align: right;
}

.footer-compliance p {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.footer-compliance .copyright {
  margin-top: 6px;
  opacity: 0.7;
}


/* ==========================================================================
   [11] RESPONSIVE
   Tablet / celular (hasta 900px): una sola columna, menú compacto
   ========================================================================== */
@media (max-width: 900px) {

  /* Encabezado: escudo + nombre en una fila, menú debajo */
  .navbar-glass { padding: 10px 0; }

  .nav-container {
    height: auto;
    padding: 0 16px;
    grid-template-columns: auto 1fr;
    row-gap: 8px;
  }

  .brand-emblem { grid-column: 1; grid-row: 1; width: 40px; height: 40px; margin-right: 12px; }
  .brand-text   { grid-column: 2; grid-row: 1; }

  .nav-menu {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    height: auto;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .nav-link { height: auto; padding: 6px 0; white-space: nowrap; font-size: 0.85rem; }

  /* Como el menú es más alto, damos más espacio al contenido */
  html { scroll-padding-top: 130px; }
  .hero-section { padding-top: 150px; }

  /* Tarjetas en una columna */
  .bento-grid,
  .academic-grid { grid-template-columns: 1fr; }

  /* Panel de métricas en vertical */
  .metrics-panel-glass { flex-direction: column; width: 100%; }
  .metric-item { padding: 12px 20px; }
  .metric-divider { width: 100%; height: 1px; }

  /* Insignia más compacta */
  .status-badge-glass { padding: 12px 18px; }
  .status-text { font-size: 0.75rem; }

  /* Aviso legal y footer centrados */
  .legal-notice-card { flex-direction: column; text-align: center; padding: 28px 22px; }
  .footer-container { flex-direction: column; text-align: center; }
  .footer-compliance { text-align: center; }
}
