/* ===== HERO ===== */
.hero-corporacion {
  position: relative;
  height: 70vh;
  background: url("../images/hero/corporacionlocal.jpg") center / cover no-repeat;
}

.hero-corporacion .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.6), rgba(24,76,54,0.9));
}

/* ===== ALCALDESA DESTACADA ===== */
.alcaldesa-section {
  background: linear-gradient(135deg, #184c36, #0d2f1f);
  border-top: 4px solid #ffc107;
}
.alcaldesa-img {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border: 5px solid #ffc107;
  transition: transform 0.4s ease;
}
.alcaldesa-img:hover {
  transform: scale(1.05);
}

/* ===== EQUIPO MUNICIPAL ===== */
.equipo-section {
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
}
.miembro-card {
  background: #fff;
  border-left: 5px solid #ffc107;
  transition: all 0.4s ease;
  overflow: hidden;
}
.miembro-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}
.miembro-fondo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(180deg, rgba(255,193,7,0.2), rgba(255,255,255,0));
  z-index: 0;
}
.miembro-img {
  position: relative;
  z-index: 1;
  width: 130px;
  height: 130px;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* ===== PARTIDOS ===== */
.badge.partido-upg {
  background: #2e7d32;
}
.badge.partido-pp {
  background: #0d6efd;
}
.badge.partido-psoe {
  background: #c62828;
}
.badge.partido-iu {
  background: #2e7d32;
}

/* ===== ANIMACIONES COORDINADAS POR FILA ===== */
.miembro-card {
  opacity: 0;
  transition: all 1s ease-out;
  transform: scale(0.95);
  will-change: transform, opacity;
}

.fade-left {
  transform: translateX(-80px);
}
.fade-right {
  transform: translateX(80px);
}
.fade-center {
  transform: scale(0.9);
  opacity: 0;
}

.in-view {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

.miembro-card.in-view {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Animación especial para la alcaldesa */
.alcaldesa-img {
  transition: all 1s ease-out;
}
.alcaldesa-img.in-view {
  opacity: 1;
  transform: translateY(0) scale(1.05);
}

/* ===== FICHAS HORIZONTALES (2 por fila) ===== */
.miembro-horizontal {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 245, 245, 1));
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: all 1s ease-out;
}

.miembro-img-horizontal {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border: 4px solid #ffc107;
  transition: transform 0.4s ease;
}
.miembro-img-horizontal:hover {
  transform: scale(1.05);
}

/* Animaciones laterales */
.miembro-horizontal.izquierda {
  transform: translateX(-80px);
}
.miembro-horizontal.derecha {
  transform: translateX(80px);
}
.miembro-horizontal.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* Partidos */
.badge.partido-upg { background: #2e7d32; }
.badge.partido-pp { background: #0d6efd; }
.badge.partido-psoe { background: #c62828; }
.badge.partido-iu { background: #4caf50; }

/* Responsivo */
@media (max-width: 768px) {
  
  .miembro-horizontal {
    text-align: center;
    flex-direction: column !important;
  }
  .miembro-horizontal.izquierda,
  .miembro-horizontal.derecha {
    transform: translateY(40px);
  }
  
}


.miembro-horizontal .fst-italic {
  font-size: 0.95rem;
  color: #444;
  background: rgba(255, 193, 7, 0.08);
  border-left: 4px solid #ffc107;
  padding: 0.6rem 1rem;
  border-radius: 0 10px 10px 0;
  margin-top: 10px;
  transition: background 0.3s ease;
}
.miembro-horizontal:hover .fst-italic {
  background: rgba(255, 193, 7, 0.15);
}

/* Bloquea cualquier desbordamiento en móvil */
@media (max-width: 768px) {
  .miembro-horizontal {
    max-width: 100%;
    width: 100%;
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  .miembro-horizontal.izquierda,
  .miembro-horizontal.derecha {
    transform: translateY(20px) !important; /* antes desplazaba demasiado */
  }
}


