/* Estilos compartidos para páginas internas – directorio y fichas de facilitadoras */

:root {
  --coral: #e07040;
  --coral-soft: #e89570;
  --azul: #90b0d0;
  --azul-deep: #5a7a98;
  --beige: #e0d0c0;
  --gris: #707070;
  --crema: #f5efe7;
  --crema-warm: #efe5d6;
  --tinta: #2a2520;
  --tinta-soft: #4a413a;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
  --mono: 'DM Mono', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ===== HEADER ===== */
header {
  background: var(--crema);
  border-bottom: 1px solid rgba(112, 112, 112, 0.15);
  padding: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--tinta);
  text-decoration: none;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

.back-link {
  font-size: 0.95rem;
  color: var(--azul-deep);
  text-decoration: none;
  font-family: var(--mono);
  letter-spacing: 0.03em;
}
.back-link:hover { color: var(--coral); }

/* ===== TIPOGRAFÍA ===== */
h1 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ===== BADGES DE ESTADO ===== */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-family: var(--mono);
  border-radius: 4px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.badge-vigente     { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.badge-practica    { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }
.badge-actualizacion { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.badge-no-vigente  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ===== FOOTER ===== */
footer {
  background: var(--tinta);
  color: var(--crema);
  padding: 2.5rem 0;
  margin-top: clamp(4rem, 8vw, 6rem);
  text-align: center;
}

footer a { color: var(--crema); text-decoration: none; }
footer a:hover { color: var(--coral); }

/* ===== NOTA DE RESGUARDO (compartida) ===== */
.nota-resguardo {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1.5rem;
  margin: 3rem 0;
  border-radius: 4px;
}
.nota-resguardo strong {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--tinta);
}

/* ============================================================
   DIRECTORIO DE FACILITADORAS
   ============================================================ */

.hero-directorio {
  background: linear-gradient(135deg, var(--azul-deep) 0%, var(--azul) 100%);
  color: var(--crema);
  padding: clamp(4rem, 8vw, 6rem) 0;
  text-align: center;
}

.hero-directorio .eyebrow { color: var(--crema); opacity: 0.8; }

.hero-directorio h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-top: 1rem;
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 760px;
  margin: 1.5rem auto 0;
  opacity: 0.95;
}

.directorio-main {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.directorio-main section + section {
  margin-top: clamp(4rem, 8vw, 6rem);
}

/* Búsqueda */
.search-box {
  background: white;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  max-width: 700px;
  margin: 3rem auto;
}

.search-box label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--tinta-soft);
  margin-bottom: 0.8rem;
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-family: var(--sans);
  font-size: 1rem;
  border: 1.5px solid var(--beige);
  border-radius: 4px;
  transition: border 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--azul-deep);
}

/* Código de ejemplo */
.codigo-ejemplo {
  background: var(--crema-warm);
  padding: 1.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--coral);
  margin: 2rem 0;
}

.codigo-ejemplo h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--tinta);
}

.codigo {
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--coral);
  letter-spacing: 0.05em;
  display: block;
  margin: 0.5rem 0;
}

/* Tabla */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

thead { background: var(--azul-deep); color: var(--crema); }

th {
  text-align: left;
  padding: 1rem 1.2rem;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: var(--mono);
}

td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--beige);
}

tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--crema-warm); }

@media (max-width: 768px) {
  table { font-size: 0.85rem; }
  th, td { padding: 0.8rem; }
}

/* Estados */
.estados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.estado-card {
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  border-left: 4px solid var(--azul-deep);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.estado-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; color: var(--azul-deep); }
.estado-card p  { font-size: 0.95rem; color: var(--tinta-soft); line-height: 1.5; }

/* ============================================================
   FICHA INDIVIDUAL DE FACILITADORA
   ============================================================ */

.ficha-main {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 2rem;
}

.ficha-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--beige);
}

.facilitadora-foto {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid var(--beige);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  margin-bottom: 1.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.ficha-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--azul-deep);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.codigo-certificacion {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--coral);
  background: var(--crema-warm);
  padding: 0.5rem 1.5rem;
  border-radius: 4px;
  border-left: 4px solid var(--coral);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.info-item {
  background: white;
  padding: 1.5rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.info-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gris);
  margin-bottom: 0.5rem;
  display: block;
}

.info-value {
  font-size: 1rem;
  color: var(--tinta);
  font-weight: 500;
}

.ficha-section { margin: 3rem 0; }

.ficha-section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--azul-deep);
  font-family: var(--serif);
}

.areas-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.tag {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--crema-warm);
  color: var(--tinta-soft);
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid var(--beige);
}

.btn-volver {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.8rem 2rem;
  background: var(--azul-deep);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-volver:hover {
  background: var(--coral);
  transform: translateY(-1px);
}

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