/* ====================== FUENTE ====================== */
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap");

/* ====================== VARIABLES & RESET ====================== */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --sky: #0ea5e9;
  --ink: #1e293b;
  --slate: #475569;
  --muted: #64748b;
  --pale: #f1f5f9;
  --pale-blue: #dbeafe;
  --border: #e2e8f0;
  --shadow-sm: 0 8px 32px rgba(30, 41, 59, 0.055);
  --shadow-md: 0 16px 36px rgba(30, 41, 59, 0.1);
  --shadow-btn: 0 12px 24px rgba(37, 99, 235, 0.16);
  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 1120px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
section { scroll-margin-top: var(--nav-height); }

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

/* ====================== NAVBAR ====================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
}

.logo-text {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.nav-menu {
  display: flex;
  gap: 1.75rem;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s ease;
}

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

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width 0.25s ease;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 3px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ====================== HERO ====================== */
.hero {
  background: radial-gradient(circle at 75% 30%, rgba(14, 165, 233, 0.13), transparent 42%),
    linear-gradient(160deg, #eff6ff 0%, #ffffff 55%);
  padding: 4rem 0 5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-logo {
  display: block;
  width: auto;
  height: 150px;
  margin-bottom: 1.75rem;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--slate);
  max-width: 36rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-media { position: relative; }

.hero-media::before {
  content: "";
  position: absolute;
  inset: -1rem;
  border-radius: 2rem;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  opacity: 0.6;
}

.hero-image {
  position: relative;
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(30, 41, 59, 0.15);
}

/* ====================== BOTONES ====================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn);
}

.btn-ghost {
  background: #fff;
  color: var(--blue);
  border: 2px solid var(--blue);
}

.btn-ghost:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-2px);
}

.btn-block { width: 100%; text-align: center; }

/* ====================== EQUIPO ====================== */
.team { margin-top: 5rem; }

.team-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.team-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.team-divider {
  height: 1px;
  flex: 1;
  background: var(--border);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.team-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.team-photo {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid var(--pale-blue);
  background: var(--pale-blue);
}

.team-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.team-id {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--blue);
  margin-top: 0.4rem;
}

.team-career {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.25rem;
}

.team-nrc {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.team-desc {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* ====================== SECCIONES ====================== */
.section { padding: 5rem 0; }
.section-alt { background: var(--pale); }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 0.75rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: var(--pale-blue);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.section-intro {
  color: var(--slate);
  max-width: 40rem;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* ====================== DOCUMENTACIÓN ====================== */
.doc-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: center;
}

.doc-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.doc-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--pale-blue);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.doc-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.doc-card p {
  color: var(--slate);
  margin-bottom: 1.75rem;
}

.doc-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 1rem;
  margin-bottom: 0 !important;
}

/* ====================== MENÚ DE ENTRADAS ====================== */
.page-menu {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.page-menu-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}

.page-menu-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

/* ====================== ACTIVIDADES ====================== */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.activity-card {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.activity-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.activity-card p { color: var(--slate); font-size: 0.98rem; }

.section-alt .activity-card { background: #fff; }

/* ====================== FOOTER ====================== */
.footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p { font-size: 0.95rem; font-weight: 600; color: #fff; }
.footer-muted { color: #94a3b8 !important; font-weight: 400 !important; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 4px;
  border-radius: 5px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .team-card, .activity-card { transition: none; }
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-image { height: 320px; }
  .doc-grid { grid-template-columns: 1fr; gap: 2rem; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .page-menu-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-menu {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu.open { max-height: 360px; }

  .nav-link {
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-link::after { display: none; }

  .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
  .team-grid { grid-template-columns: 1fr; }
  .page-menu-grid { grid-template-columns: 1fr; }
}

/* ====================== PÁGINA DE ENTRADA ====================== */
.community-title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.community-lead {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 1rem;
}

/* Tarjetas de perfil de la comunidad */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.profile-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.profile-photo {
  display: block;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 3px solid var(--pale-blue);
}

.profile-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  margin-bottom: 1rem;
}

.profile-list {
  list-style: none;
  color: var(--slate);
  font-size: 0.95rem;
}

.profile-list li { margin-bottom: 0.3rem; }

/* Mapa de las capacitaciones */
.map-figure {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.map-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.map-caption {
  padding: 0.85rem 0.5rem 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Navegación entre entradas */
.entry-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3rem;
}

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

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

/* ====================== METODOLOGÍA ====================== */
.method-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.method-highlight {
  background: var(--pale-blue);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.method-highlight-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue);
}

.method-highlight-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.method-step {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

@media (max-width: 700px) {
  .method-highlights { grid-template-columns: 1fr; }
}

/* ====================== SUBTÍTULOS DE SECCIÓN ====================== */
.subsection-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.subsection-title:first-of-type { margin-top: 1rem; }
