/* Contenedor general de la sección */
.tlacotepec-section {
  margin-top: 3rem;
}

/* Tarjetas base */
.tlacotepec-card,
.tlacotepec-card-horizontal {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.tlacotepec-card:hover,
.tlacotepec-card-horizontal:hover {
  transform: translateY(-5px);
}

/* Línea inferior al hacer hover */
.tlacotepec-card::after,
.tlacotepec-card-horizontal::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 4px;
  background-color: #1b4573;
  transition: width 0.3s ease;
}

.tlacotepec-card:hover::after,
.tlacotepec-card-horizontal:hover::after {
  width: 80%;
}

/* Imagen circular con animación de borde */
.tlacotepec-card img,
.tlacotepec-card-horizontal-img img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 1rem auto 0;
  border: 4px solid transparent;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.tlacotepec-card:hover img,
.tlacotepec-card-horizontal:hover img {
  border-color: #1b4573;
  box-shadow: 0 0 0 4px #C38033a2;
}

/* Cuerpo de la tarjeta */
.tlacotepec-card-body {
  padding: 1rem;
}

.tlacotepec-card-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #C38033;
  text-align: center;
}

.tlacotepec-card-text {
  font-size: 0.95rem;
  color: #000;
  line-height: 1.5;
  text-align: justify;
}

/* Tarjeta horizontal específica */
.tlacotepec-card-horizontal {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.tlacotepec-card-horizontal-img {
  flex: 0 0 180px;
  padding: 1rem;
}

.tlacotepec-card-horizontal .tlacotepec-card-body {
  flex: 1;
  padding: 1rem;
  min-width: 200px;
}

.tlacotepec-toggle-btn {
  background-color: #1b4573;
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  cursor: pointer;
  border-radius: 5px;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.tlacotepec-toggle-btn:hover {
  background-color: #C38033;
}

.tlacotepec-card-horizontal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}
.tlacotepec-card-horizontal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive para horizontal */
@media (max-width: 768px) {
  .tlacotepec-card-horizontal {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tlacotepec-card-horizontal .tlacotepec-card-body {
    padding-top: 0;
  }
}