* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #000;
  color: #fff;
  overflow-x: hidden;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  padding: 20px 50px;
  border-bottom: 1px solid #222;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 35px;
}

nav ul {
  display: flex;
  gap: 25px;
  list-style: none;
}

nav a {
  color: #aaa;
  text-decoration: none;
  transition: 0.3s;
}

nav a:hover {
  color: white;
}

/* HERO */
.hero {
  display: flex;
  height: 100vh;
  position: relative;
}

/* SOLDADO (FIX RENDER) */
.soldado-container {
  width: 60%;
  position: relative;
  overflow: hidden;

  /* 🔥 evita recalculos raros */
  contain: layout paint;
}

.soldado {
  position: absolute;
  left: 0;
  bottom: 0;

  width: 100%;
  height: 100%;
  object-fit: contain;

  /* 🔥 FIX PARPADEO */
  transform: translateZ(0);
  will-change: transform;

  /* 🔥 DIFUMINADO REAL */
  -webkit-mask-image: linear-gradient(to right, black 65%, transparent);
  mask-image: linear-gradient(to right, black 65%, transparent);
}

/* TEXTO */
.contenido-texto {
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.contenido-texto h2 {
  font-size: 36px;
  margin-bottom: 15px;
}

.eventos-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 60px 50px;
  background: #050505;
}

.eventos-contenido {
  width: 55%;
}

.eventos-contenido h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.eventos-contenido p {
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 15px;
}

.eventos-imagen {
  width: 40%;
}

.eventos-imagen img,
.desarrollo-imagen img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.35);
}

.eventos-section,
.desarrollo-section {
  margin-bottom: 40px;
}

.desarrollo-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 60px 50px;
  background: #050505;
}

.desarrollo-imagen {
  width: 40%;
}

.desarrollo-imagen img {
  width: 100%;
  border-radius: 18px;
}

.desarrollo-contenido {
  width: 55%;
}

.desarrollo-contenido h2 {
  font-size: 32px;
  margin-bottom: 20px;
}

.desarrollo-contenido p {
  color: #ccc;
  line-height: 1.7;
  margin-bottom: 15px;
}

.contenido-texto p {
  color: #aaa;
  line-height: 1.5;
}

/* BOTÓN */
.btn {
  padding: 12px 25px;
  border: 1px solid white;
  color: white;
  text-decoration: none;
  margin-top: 20px;
  transition: 0.3s;
}

.btn:hover {
  background: white;
  color: black;
}

/* MODAL */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.modal.show {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #0a0a0a;
  padding: 40px;
  width: 600px;
  max-width: 90%;
  border: 1px solid #222;
  position: relative;
  animation: aparecer 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 25px;
  cursor: pointer;
}

/* MIEMBRO */
.miembro {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.miembro img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

/* ROLES */
.roles {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.roles div {
  width: 45%;
  border-top: 1px solid #222;
  padding-top: 10px;
}

/* ANIMACIÓN */
.anim {
  opacity: 0;
  transform: translateY(40px);
  transition: 0.8s;
}

.anim.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* RESPONSIVE */
@media (max-width: 900px) {

  .hero {
    flex-direction: column;
    height: auto;
  }

  .soldado-container {
    width: 100%;
    height: 300px;
  }

  .soldado {
    height: 100%;
    left: 50%;
    transform: translateX(-50%) translateZ(0);
  }

  .contenido-texto {
    width: 100%;
    text-align: center;
    padding: 30px;
  }

  .btn {
    margin: 20px auto;
  }

  .header {
    flex-direction: column;
    gap: 10px;
  }

  .modal-content {
    width: 100%;
    padding: 25px;
    max-width: 95%;
  }

  .eventos-section {
    flex-direction: column;
    padding: 30px 25px;
  }

  .eventos-contenido,
  .eventos-imagen,
  .desarrollo-contenido,
  .desarrollo-imagen {
    width: 100%;
  }

  .eventos-imagen,
  .desarrollo-imagen {
    margin-top: 20px;
  }

  .desarrollo-section {
    flex-direction: column;
    padding: 30px 25px;
  }

  .miembro {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .miembro img {
    margin-bottom: 20px;
  }

  .grupo-miembros {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .toggle-expand {
    display: inline-block;
  }

  .card-miembro {
    width: 100%;
    max-width: 100%;
  }
}
/* MEJORAS MODAL */
.modal-content h2 {
  text-align: center;
  margin-bottom: 15px;
}

.intro {
  text-align: center;
  color: #aaa;
  margin-bottom: 30px;
}

/* EMPERADOR DESTACADO */
.principal {
  align-items: center;
  gap: 20px;
  border: 2px solid #d4af37;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 20px;
  background: rgba(212, 175, 55, 0.1);
  transition: max-height 0.35s ease;
}

.card-miembro {
  cursor: pointer;
}

.card-miembro.collapsed p,
.principal-body.collapsed p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.card-miembro.expanded p,
.principal-body.expanded p {
  display: block;
}

.principal-body {
  overflow: hidden;
}

.principal img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 2px solid #d4af37;
  object-fit: cover;
}

.principal h3 {
  color: #f7d56f;
}

.toggle-expand {
  display: none;
  margin-top: 15px;
  padding: 10px 16px;
  border: 1px solid #d4af37;
  border-radius: 999px;
  background: transparent;
  color: #f7d56f;
  cursor: pointer;
  font-size: 14px;
  transition: 0.2s;
}

.toggle-expand:hover {
  background: rgba(255, 255, 255, 0.08);
}

.toggle-expand:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

.social-section {
  margin: 20px 0 30px;
  padding: 20px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.social-section h3 {
  margin-bottom: 10px;
  color: #f7d56f;
}

.social-section p {
  margin-bottom: 10px;
  color: #ccc;
  font-size: 14px;
  word-break: break-all;
}

.social-section a {
  color: #f9dc78;
  text-decoration: none;
}

.social-section a:hover {
  text-decoration: underline;
}

/* SUBTÍTULO */
.subtitulo {
  margin: 30px 0 15px;
}

/* GRUPO */
.grupo-miembros {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: stretch;
}

/* CARDS MEJORADAS */
.card-miembro {
  background: #0f0f0f;
  padding: 20px;
  width: calc(50% - 10px);
  min-width: 240px;
  border: 1px solid #222;
  transition: 0.3s;
}


.card-miembro:hover {
  border-color: white;
  transform: translateY(-5px);
}

.card-miembro img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  margin-bottom: 10px;
  cursor: pointer;
}

.card-miembro h4 {
  margin-bottom: 5px;
}

.card-miembro p {
  font-size: 13px;
  color: #aaa;
}
