.pagina-areas {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
  color: #203246;
}

.encabezado-areas {
  max-width: 760px;
  margin: 0 auto 2.8rem;
  text-align: center;
}

.encabezado-areas h1 {
  margin: 0 0 0.8rem;
  color: #123d5d;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.1;
}

.encabezado-areas p {
  margin: 0;
  color: #5c6c7c;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

.grid-areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.area-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #dfe7ee;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(18, 61, 93, 0.08);
  padding: 1.5rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.area-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(18, 61, 93, 0.14);
}

.area-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: #1f6d6b;
}

.area-card-content {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.area-card-kicker {
  margin-bottom: 0.8rem;
  color: #6a7b8b;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.area-card h2 {
  margin: 0 0 0.8rem;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 400;
  line-height: 1.15;
}

.area-card h2 a {
  color: #123d5d;
  text-decoration: none;
}

.area-card h2 a:hover {
  color: #c80000;
}

.area-card-description {
  flex: 1;
  margin: 0 0 1.3rem;
  color: #5c6c7c;
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  line-height: 1.65;
}

.area-card-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: auto;
}

.conteo-proyectos {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: #617385;
  font-family: 'Manrope', sans-serif;
  line-height: 1;
}

.conteo-proyectos strong {
  color: #123d5d;
  font-size: 1.45rem;
}

.conteo-proyectos span {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.btn-area {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #123d5d;
  color: #fff;
  padding: 0.7rem 0.9rem;
  border-radius: 9px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-area:hover {
  background: #c80000;
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.area-card-azul::before { background: #3182ce; }
.area-card-rojo::before { background: #c80000; }
.area-card-verde::before { background: #4d9b54; }
.area-card-amarillo::before { background: #e0ad25; }
.area-card-naranja::before { background: #e0782f; }
.area-card-morado::before { background: #8055b8; }
.area-card-turquesa::before { background: #1f8d8a; }

@media (max-width: 600px) {
  .pagina-areas {
    padding: 2.5rem 1rem 3.5rem;
  }

  .grid-areas {
    grid-template-columns: 1fr;
  }
}

/* Institutional visual system */
.pagina-areas {
  max-width: 1180px;
  color: #172b3a;
}

.encabezado-areas {
  max-width: 820px;
  margin-bottom: 3.5rem;
  text-align: left;
}

.encabezado-areas::before {
  display: block;
  width: 64px;
  height: 5px;
  margin-bottom: 1.25rem;
  background: #d7192f;
  content: "";
}

.encabezado-areas h1 {
  color: #123b68;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: .98;
}

.grid-areas {
  gap: 1rem;
}

.area-card {
  min-height: 270px;
  border: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px #dce5ee;
  transition: transform .22s ease, box-shadow .22s ease;
}

.area-card:hover {
  transform: translateY(-7px);
  box-shadow: 8px 8px 0 #d7192f, 0 0 0 1px #dce5ee;
}

.area-card h2 a:focus-visible,
.btn-area:focus-visible {
  outline: 3px solid #d7192f;
  outline-offset: 4px;
}

.btn-area {
  border-radius: 2px;
  background: #123b68;
}

.btn-area:hover {
  background: #d7192f;
}
