/* ============================================================
   DETALLE DE ESPECIALIDAD
   Estilos específicos de esta página. Depende de css/styles.css
   (variables --cemic-* y tipografía DM Sans).
   ============================================================ */

/* ---------- Títulos de sección ---------- */
.esp-section-title {
  font-size: 1.65rem;
  font-weight: 500;
  color: #4a514c;
}

/* ---------- Hero especialidad ---------- */
.especialidad-hero {
  position: relative;
  background: #fbfcfc;
  overflow: hidden;
  border-bottom: 1px solid var(--cemic-border);
}

.especialidad-hero .cells-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.especialidad-hero .container {
  position: relative;
  z-index: 1;
}

/* Bloque superior: caja con fondo sólido, redondeada y con aire arriba */
.esp-top {
  position: relative;
  z-index: 1;
}

.esp-top-box {
  background: #FAFAFA;
  border-radius: 1rem;
  padding: 3rem;
  margin-top: 3.5rem;
}

/* La banda de datos queda transparente para ver las burbujas */
.especialidad-hero .esp-datos .container {
  z-index: 1;
}

.esp-eyebrow {
  font-size: 0.85rem;
  color: var(--cemic-gray);
  margin-bottom: 0.4rem;
}

.esp-title {
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
}

.esp-lead {
  font-size: 1.1rem;
  color: #000;
  line-height: 1.5;
}

.esp-dif-tag {
  color: var(--cemic-green);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.esp-dif-cols {
  font-size: 0.9rem;
  color: #000;
  line-height: 1.55;
}

/* ---------- Banda CEMIC EN DATOS ---------- */
.esp-datos {
  background: transparent;
  position: relative;
  z-index: 1;
}

/* Mismo padding horizontal que .esp-top-box para que la columna
   derecha quede alineada con "Se dedica..." y "Diferencial..." */
.esp-datos-box {
  padding: 1.5rem 3rem 3rem;
}

.esp-datos-label {
  text-align: right;
  color: #aeb4b0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 0.9rem;
}

.esp-stat {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  border-bottom: 1px solid var(--cemic-border);
  padding-bottom: 1rem;
  position: relative;
}

.esp-stat .num {
  font-size: 1.9rem;
  font-weight: 300;
  color: #4a514c;
  line-height: 1;
  min-width: 84px;
}

.esp-stat .txt {
  font-size: 0.8rem;
  color: #000;
  line-height: 1.4;
  padding-top: 0.2rem;
  padding-right: 2rem;
}

.esp-stat .chk {
  position: absolute;
  right: 0;
  top: 2px;
  color: var(--cemic-green);
  font-size: 1rem;
}

/* ---------- Subespecialidades ---------- */
/* Doble de aire a la derecha entre la caja y la grilla (solo desktop) */
@media (min-width: 992px) {
  .where-col {
    padding-right: 2.5rem;
  }
  /* Top de la cajita alineado con el top de la 2da fila de tarjetas.
     2da fila = 84px (1ra fila) + 16px (gap g-3) = 100px desde el tope.
     El h2 mide ~32px y su margin colapsa, así que margin-top ≈ 68px. */
  .where-box {
    margin-top: 4.25rem;
  }
}

.sub-item {
  background: #f4f6f5;
  border-radius: 6px;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  color: #54605a;
  min-height: 84px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.15s;
  height: 100%;
}

.sub-item:hover {
  background: #eef1ef;
}

.sub-item.active {
  background: var(--cemic-green);
  color: #fff;
  justify-content: space-between;
}

.sub-item .arrow {
  display: none;
}

.sub-item.active .arrow {
  display: inline-flex;
}

.where-box {
  background: #f4f6f5;
  border: none;
  border-top: 1px solid var(--cemic-border);
  border-bottom: 1px solid var(--cemic-border);
  border-radius: 0;
}

.where-box .wb-head {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--cemic-border);
}

.where-box .wb-sub {
  color: #000;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.3;
}

.where-box .wb-body {
  padding: 1rem 1.1rem;
}

.where-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #000;
  margin: 0 0 0.9rem;
}

.where-box a {
  display: block;
  color: var(--cemic-green);
  text-decoration: underline;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
}

/* ---------- Nuestros profesionales ---------- */
.prof-card {
  background: #fff;
  border: 1px solid var(--cemic-border);
  border-radius: 12px;
  padding: 0.85rem;
  height: 100%;
}

.prof-photo {
  position: relative;
  background: #e3e6e4;
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b9c0bc;
  font-size: 2.6rem;
}

.prof-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prof-photo .corner {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cemic-green);
  font-size: 0.95rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.prof-photo .corner i {
  -webkit-text-stroke: 0.9px currentColor;
}

.prof-role {
  color: var(--cemic-green);
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 0.85rem;
}

.prof-name {
  font-size: 22px;
  font-weight: 500;
  margin-top: 0.15rem;
  line-height: 1.25;
}

/* ---------- En Educación ---------- */
.edu-box {
  border-radius: 1rem;
  overflow: hidden;
}

.edu-box-content {
  background: #f4f6f5;
  padding: 3rem;
}

.edu-intro {
  font-size: 16px;
  color: #000;
  line-height: 1.6;
}

.edu-col-title {
  color: var(--cemic-green);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.edu-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.edu-item span {
  font-size: 20px;
  color: #000;
  line-height: 1.4;
}

.edu-item .bi {
  color: var(--cemic-green);
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.edu-strip img {
  width: 100%;
  aspect-ratio: 16 / 4;
  object-fit: cover;
  display: block;
}

/* ---------- En Investigación ---------- */
.inv-text {
  font-size: 0.9rem;
  color: var(--cemic-gray);
  line-height: 1.6;
}

.inv-img {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  aspect-ratio: 16 / 8;
}

.inv-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inv-img .inv-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(55, 55, 55, 0.72);
  color: #fff;
  padding: 0.7rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
}

@media (max-width: 991px) {
  .esp-title { font-size: 2rem; }
}
