/* Estilos generales */
body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  background-color: #1a1a1a;
  color: #f0f0f0;
  text-align: center;
}

/* Encabezado */
header {
  padding: 20px;
  background-color: #315D78;
  border-bottom: 2px solid #ffcc00;
}

.logo {
  max-width: 100px;
  margin-bottom: 10px;
}

h1 {
  font-size: 28px;
  margin: 0;
  color: #ffcc00;
}

.subtitulo {
  color: #ccc;
  margin-top: 5px;
  font-style: italic;
}

/* Menú de navegación */
nav {
  background-color: rgba(0, 0, 0, 0.4);
  padding: 12px 0;
  border-bottom: 2px solid #ffcc00;
  backdrop-filter: blur(4px);
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

nav ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  padding: 8px 14px;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: transparent;
}

nav ul li a:hover {
  border-color: #ffcc00;
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffcc00;
}

/* Contenido principal */
main {
  padding: 40px 20px;
}

.contenido {
  max-width: 70%;
  margin: auto;
  background-color: #2a2a2a;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  text-align: left; /* evita heredar el centrado global */
}

/* Pie de página */
footer {
  background-color: #111;
  padding: 15px;
  margin-top: 40px;
  color: #777;
  font-size: 14px;
}

/* Sección de jerarquías */
.jerarquias {
  margin-top: 50px;
  padding: 30px;
  background-color: #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.jerarquias h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #ffcc00;
}

.rango-columnas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 60px;
  justify-content: center;
  align-items: start;
  margin: 0 auto;
  max-width: 900px;
}

.columna {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}

.rango {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rango img {
  width: 40px;
  height: 40px;
}

.rango span {
  font-weight: bold;
  font-size: 16px;
  text-align: left;
}

/* Colores personalizados */
.seguridad { color: white; }
.tecnico { color: #d4a55c; }
.logistica { color: #d182ff; }
.supervisor { color: #89cfff; }
.director { color: #ff4040; }
.presidente { color: #4080ff; }
.operativo { color: #42e0d9; }
.junta { color: #40ff85; }
.administrador { color: #ff8030; }
.manager { color: #c57fff; }
.ceo { color: gold; }

.aclaracion {
  margin-top: 30px;
  font-size: 16px;
  color: #ccc;
}

/* Responsive para móvil (jerarquías) */
@media (max-width: 768px) {
  .rango-columnas {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .columna {
    align-items: center;
  }
}

/* === Validaciones === */
.grid-validaciones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.validacion-box {
  background-color: #333;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.validacion-box span {
  display: block;
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
}

.validacion-box img {
  width: 150px;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.validacion-box img:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
  cursor: pointer;
}

/* Contacto */
.contacto-box {
  background-color: #2e2e2e;
  color: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 700px;
  margin: 20px auto;
}
.contacto-box .logo-contacto { width: 70px; margin-bottom: 15px; }
.contacto-box p { font-size: 17px; margin-bottom: 20px; line-height: 1.6; }
.redes-contacto a {
  display: inline-block;
  margin: 8px 15px;
  background-color: #1da1f2;
  padding: 10px 20px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
}
.redes-contacto a:hover { background-color: #1484c4; }

/* Usuario GSF */
.usuario-gsf-box {
  background-color: #2e2e2e;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  margin: 20px auto;
  max-width: 700px;
}
.usuario-gsf-contenido {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.logo-gsf { height: 80px; transition: transform 0.3s ease; }
.logo-gsf:hover { transform: scale(1.05); }
.btn-usuario {
  background-color: #222;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
.btn-usuario:hover { background-color: #ffc107; color: #000; transform: scale(1.05); }

/* Iframe container */
.iframe-container {
  margin-top: 20px;
  width: 100%;
  border: 2px solid #444;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
  background-color: #1e1e1e;
}
iframe { width: 100%; }

/* === Equipo GSF (responsive + estilos de cargos) === */
.equipo-gsf { margin-top: 25px; text-align: left; }
.equipo-titulo { color:#ffcc00; margin: 10px 0 12px; }

.titulo-bloque{
  margin: 6px 0 10px;
  color:#ccc;
  font-weight: 700;
  border-left: 4px solid #ffcc00;
  padding-left: 10px;
}

/* Grids responsive */
.grid-cargos,
.grid-miembros { display: grid; gap: 12px; }

/* Dirección centrada (máx 600px) */
.grid-cargos {
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  justify-content: center;
  max-width: 600px;
  margin: 0 auto;
}
@media (max-width: 640px){
  .grid-cargos { grid-template-columns: 1fr; }
}

/* Miembros: hasta 5 columnas en escritorio */
.grid-miembros { grid-template-columns: repeat(5, 1fr); gap: 15px; }
@media (max-width: 1280px){
  .grid-miembros { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1024px){
  .grid-miembros { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px){
  .grid-miembros { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px){
  .grid-miembros { grid-template-columns: 1fr; }
}

/* Tarjeta base */
.habbo-card{
  background:#333;
  border:1px solid #444;
  border-radius:10px;
  padding:10px;
  display:flex;
  align-items:center;
  gap:10px;
  box-shadow:0 0 10px rgba(0,0,0,0.4);
  transition:transform .15s ease, box-shadow .15s ease;
}
.habbo-card:hover{
  transform: translateY(-2px);
  box-shadow:0 0 14px rgba(255, 204, 0, 0.15);
}

/* Avatar más grande */
.habbo-avatar-wrap{ position: relative; }
.habbo-card img{
  height: 160px;
  border-radius:6px;
  background:#1e1e1e;
}

.habbo-meta{ display:flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:0; }
.habbo-name{
  color:#ffcc00; font-weight:700; font-size:14px; line-height:1.2;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

/* Distintivo de rol sobre el avatar */
.habbo-badge{
  position:absolute; bottom:-8px; left:50%; transform:translateX(-50%);
  background:#ffcc00; color:#1a1a1a; font-weight:800; font-size:10px;
  padding:2px 6px; border-radius:999px; border:2px solid #315D78;
  white-space:nowrap; pointer-events:none;
}

/* Efecto diferenciador */
.habbo-card--cargo { position: relative; }
.habbo-card--director{
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.25);
  border-color: #ffd700;
}
.habbo-card--coordinador{
  box-shadow: 0 0 16px rgba(64, 128, 255, 0.25);
  border-color: #4080ff;
}

/* Halo sutil */
.habbo-card--director .habbo-avatar-wrap::after,
.habbo-card--coordinador .habbo-avatar-wrap::after{
  content: "";
  position: absolute;
  top: -6px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,204,0,.9), rgba(255,255,255,.4), rgba(255,204,0,.9));
  filter: blur(0.5px);
  opacity: .85;
}

/* Skeleton */
.habbo-skeleton .habbo-meta .habbo-skel-line{
  display:block; height:12px; background:#2a2a2a; border-radius:4px; margin:4px 0;
}
.habbo-skel-avatar{ width:64px;height:90px;background:#2a2a2a;border-radius:6px; }

/* Loader genérico para parciales */
.loader-wrap {
  display:flex; flex-direction:column; align-items:center; gap:10px;
  padding: 30px; color:#ccc;
}
.loader {
  width: 36px; height: 36px; border: 4px solid #444; border-top-color: #ffcc00;
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-size: 14px; }

.error-box {
  background:#3a2a2a; border:1px solid #aa5; border-radius:10px;
  padding:20px; color:#f9e; max-width: 800px; margin: 0 auto;
}
.error-box h3 { margin:0 0 8px; color:#ffcc00; }
.error-msg {
  background:#221; color:#ddd; padding:10px; border-radius:6px; overflow:auto;
  max-height: 160px; font-size:12px;
}
.btn-reintentar {
  background:#ffcc00; color:#1a1a1a; font-weight:700;
  border:0; border-radius:8px; padding:8px 14px; cursor:pointer; margin-top:10px;
}
.btn-reintentar:hover { filter: brightness(1.05); }

/* Estado activo del nav (accesible) */
nav a[aria-current="page"] {
  border-color: #ffcc00;
  background-color: rgba(255,255,255,0.06);
  color: #ffcc00;
}

/* ======== FORO (guía visual) ======== */
.foro-doc {
  display: block;
  margin: 0 auto;
  max-width: 1100px;
  width: min(1100px, 92vw);
  text-align: left; /* asegura alineación en la vista foro */
}

.foro-encabezado { margin-bottom: 18px; }
.foro-encabezado h2 { color: #ffcc00; margin: 0 0 6px; }
.foro-intro { color: #ccc; line-height: 1.6; }

/* Layout: aside + contenido */
.foro-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 960px){ .foro-layout { grid-template-columns: 1fr; } }

/* Contenido principal del foro en grid */
.foro-contenido { display: grid; gap: 16px; }

/* Tarjetas del aside */
.foro-aside { position: sticky; top: 72px; }
.foro-card {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 0 10px rgba(0,0,0,.35);
}
.foro-card h3 { margin: 0 0 10px; color: #ffcc00; }

/* Botones (Foro) */
.btn-primario, .btn-secundario {
  display: inline-block;
  text-decoration: none;
  font-weight: 800;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 6px 0;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  will-change: transform;
}
.btn-primario { background: #ffcc00; color: #1a1a1a; }
.btn-primario:hover { transform: translateY(-1px); filter: brightness(1.03); }
.btn-secundario { background: #315D78; color: #fff; }
.btn-secundario:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primario.grande { padding: 14px 22px; border-radius: 999px; }
.btn-primario.grande:hover { box-shadow: 0 0 24px 4px rgba(255,204,0,.25); }

/* Índice de contenidos */
.foro-indice { margin: 0; padding-left: 16px; }
.foro-indice li { margin: 6px 0; }
.foro-indice a { color: #89cfff; text-decoration: none; }
.foro-indice a:hover { text-decoration: underline; }

/* Secciones (details/summary) */
.foro-seccion {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0,0,0,.35);
}
.foro-seccion summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 800;
  color: #f0f0f0;
  background: #272727;
  display: flex; align-items: center; gap: 10px;
}
.foro-seccion summary::-webkit-details-marker { display: none; }
.foro-seccion[open] summary { background: #313131; }
.foro-seccion summary span { flex: 1; }
.foro-seccion summary::after{
  content:"▾";
  margin-left: 8px;
  transition: transform .2s ease;
  opacity:.8;
}
.foro-seccion[open] summary::after{ transform: rotate(180deg); }
.foro-seccion-cuerpo { padding: 14px 16px 16px; color: #ddd; line-height: 1.6; animation: foroFadeIn .18s ease; }
@keyframes foroFadeIn { from{opacity:0; transform: translateY(-2px);} to{opacity:1; transform:none;} }

/* Figuras e imágenes (con placeholders) */
.foro-fig{
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #202020;
  border: 1px solid #3a3a3a;
  margin: 14px 0;
}
.foro-fig::before{
  content: "";
  display: block;
  aspect-ratio: var(--ar, 16/9);
}
/* Imagen como capa si existe */
.foro-fig > img{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
/* Shimmer mientras carga */
.foro-fig.is-loading::after{
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.06), rgba(255,255,255,0));
  animation: foroShimmer 1.2s infinite;
}
@keyframes foroShimmer { from{ transform: translateX(-100%);} to{ transform: translateX(100%);} }
/* Placeholder cuando no hay imagen */
.foro-fig.is-broken{
  background:
    radial-gradient(85px 85px at 60% 40%, rgba(255,204,0,.12), transparent 60%),
    radial-gradient(120px 120px at 30% 65%, rgba(64,128,255,.10), transparent 60%),
    #202020;
}
.foro-fig.is-broken::after{
  content: "Imagen no disponible";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color:#bbb; font-size: 14px;
}
.foro-fig.is-broken > img{ opacity: 0; }
.foro-fig figcaption { font-size: 13px; color: #bbb; margin-top: 6px; position: relative; padding: 8px 10px; }

/* Grillas internas (auto-fit dinámico) */
.foro-grid-2{ display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap:16px; }
.foro-grid-3{ display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:14px; }

/* Tarjetas internas */
.foro-mini-card{
  background: #333;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,.25);
  display:flex; flex-direction:column; gap:8px;
  min-height: 220px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.foro-mini-card h4 { margin: 0 0 6px; color: #ffcc00; }
.foro-mini-card:hover{ transform: translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,.25); }

/* CTA final */
.foro-cta-final {
  text-align: center; margin-top: 18px;
  background: #292929; border: 1px solid #3a3a3a; border-radius: 12px;
  padding: 18px;
}
.foro-legal { color: #bbb; margin: 10px 0 0; }

/* Consejos y notas */
.foro-tip, .foro-nota {
  background: #242424;
  border-left: 4px solid #ffcc00;
  padding: 10px 12px;
  border-radius: 6px;
  color: #ddd;
  margin-top: 10px;
}

/* Lista utilizada en "Estructura principal" */
.foro-lista { margin:0; padding-left: 18px; color:#ddd; line-height:1.6; }
.foro-lista li { margin: 6px 0; }

/* Suaviza las anclas internas (cuando el nav es sticky) */
html { scroll-behavior: smooth; }

/* ===== Imágenes responsivas (foro) ===== */

/* Figuras grandes (en secciones) ya usan .foro-fig con ratio 16:9.
   Solo marcamos cursor y refinamos caption. */
.foro-fig img{ cursor: zoom-in; }
.foro-fig figcaption{ text-align:left; }

/* Imágenes dentro de tarjetas .foro-mini-card */
.foro-mini-card img{
  width: 100%;
  display: block;
  border-radius: 8px;
  aspect-ratio: 4 / 3;   /* mantiene la forma aunque falte la imagen */
  object-fit: cover;     /* recorte elegante */
  background: #1e1e1e;   /* fondo si tarda en cargar */
  border: 1px solid #3a3a3a;
  cursor: zoom-in;
}

/* Contenedor de columnas internas ya preparado con auto-fit en tu CSS:
   .foro-grid-2 / .foro-grid-3 */

/* ===== Lightbox (visor a pantalla) ===== */
.foro-lightbox{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.foro-lightbox.is-open{ display: flex; }

.foro-lightbox__img{
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  background:#111;
  cursor: zoom-out;
}

.foro-lightbox__caption{
  margin-top: 10px;
  color: #ddd;
  text-align: center;
  max-width: 92vw;
  line-height: 1.4;
  font-size: 14px;
}

.foro-lightbox__close{
  position: absolute;
  top: 14px; right: 16px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: .9;
}
.foro-lightbox__close:hover{ opacity: 1; }
