/* ============================================================
   DIEGO EN ESENCIA — Comunidad, cuenta y sesión
   Complementa camino-propio.css / los estilos de index.html.
   Usa las mismas variables de marca (:root ya definido).
   ============================================================ */

/* ── BARRA SUPERIOR: bloque de sesión ─────────────────── */
.nav-derecha {
  display: flex;
  align-items: center;
  gap: 14px;
}

#auth-slot { display: flex; align-items: center; min-height: 38px; }

.auth-entrar {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 9px 20px;
  border-radius: 100px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.auth-entrar:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); }
nav.scrolled .auth-entrar { color: var(--teal); border-color: var(--teal-pale); }
nav.scrolled .auth-entrar:hover { background: var(--teal-ghost); border-color: var(--teal); }

.auth-menu { position: relative; }

.auth-trigger {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  padding: 5px 16px 5px 5px;
  cursor: pointer;
  font-family: 'Sora', sans-serif;
  transition: background 0.2s, border-color 0.2s;
}
.auth-trigger:hover { background: rgba(255, 255, 255, 0.2); }
nav.scrolled .auth-trigger { background: var(--teal-ghost); border-color: var(--teal-pale); }
nav.scrolled .auth-trigger:hover { background: var(--teal-pale); }

.auth-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.8rem; font-weight: 700;
  flex-shrink: 0;
}
.auth-nombre {
  font-size: 0.82rem; font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
nav.scrolled .auth-nombre { color: var(--teal-deep); }

.auth-dropdown {
  position: absolute;
  top: calc(100% + 12px); right: 0;
  min-width: 232px;
  background: var(--white);
  border: 1px solid var(--teal-pale);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(10, 95, 122, 0.18);
  padding: 8px;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 200;
}
.auth-menu.abierto .auth-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.auth-dropdown-head {
  padding: 12px 14px 14px;
  border-bottom: 1px solid var(--warm-gray);
  margin-bottom: 6px;
  display: flex; flex-direction: column; gap: 3px;
}
.auth-dropdown-head strong { font-size: 0.88rem; color: var(--teal-deep); font-weight: 700; }
.auth-dropdown-head span { font-size: 0.75rem; color: var(--muted); word-break: break-all; }

.auth-dropdown a,
.auth-salir {
  display: block; width: 100%; text-align: left;
  padding: 10px 14px;
  border: none; background: none; cursor: pointer;
  font-family: 'Sora', sans-serif; font-size: 0.85rem; font-weight: 500;
  color: var(--text); text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
}
.auth-dropdown a:hover { background: var(--teal-ghost); color: var(--teal-deep); }
.auth-salir { color: #b0413e; margin-top: 4px; border-top: 1px solid var(--warm-gray); border-radius: 0 0 10px 10px; }
.auth-salir:hover { background: #fdeceb; }

/* ── BARRA SUPERIOR: desplegable de "Videos" ──────────── */
.nav-links .nav-drop { position: relative; }
.nav-links .nav-drop > a {
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-drop-flecha {
  width: 9px; height: 9px; flex-shrink: 0;
  stroke: currentColor; stroke-width: 2.4; fill: none;
  transition: transform 0.22s;
}
.nav-drop:hover .nav-drop-flecha,
.nav-drop:focus-within .nav-drop-flecha { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 190px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--teal-pale);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(10, 95, 122, 0.18);
  padding: 7px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 200;
}
/* Puente invisible para que el mouse pueda bajar sin que se cierre */
.nav-drop-menu::before {
  content: ''; position: absolute;
  top: -18px; left: 0; right: 0; height: 18px;
}
.nav-drop:hover .nav-drop-menu,
.nav-drop:focus-within .nav-drop-menu {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-drop-menu li { list-style: none; }
nav .nav-links .nav-drop-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 9px;
  font-size: 0.83rem; font-weight: 600;
  color: var(--teal-deep); text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
nav .nav-links .nav-drop-menu a:hover { background: var(--teal-ghost); color: var(--teal); }
.nav-drop-menu a span { color: var(--muted); font-weight: 400; font-size: 0.9em; }

/* ── SECCIÓN "INGRESÁ A LA COMUNIDAD" ─────────────────── */
.comunidad-cta {
  padding: 110px 48px;
  background: var(--off-white);
  position: relative;
  overflow: hidden;
}
.comunidad-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 85% 15%, rgba(111, 204, 230, 0.16) 0%, transparent 65%);
  pointer-events: none;
}
.comunidad-cta-inner {
  max-width: 1000px; margin: 0 auto;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 56px; align-items: center;
}
.comunidad-cta h2 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 800; letter-spacing: -0.025em;
  color: var(--teal-deep); line-height: 1.1;
  margin-bottom: 20px; margin-top: 12px;
}
.comunidad-cta h2 em { font-style: italic; font-family: 'Lora', serif; color: var(--teal); }
.comunidad-cta p {
  font-size: 1rem; font-weight: 300;
  color: var(--muted); line-height: 1.8; max-width: 500px;
  margin-bottom: 32px;
}
.comunidad-cta p strong { color: var(--text); font-weight: 600; }
.comunidad-cta-btns { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.comunidad-cta-nota { font-size: 0.8rem; color: var(--muted); font-weight: 300; }
.comunidad-cta-nota a { color: var(--teal); font-weight: 500; text-decoration: none; }

.comunidad-panel {
  background: linear-gradient(150deg, var(--teal-deep) 0%, var(--teal) 60%, var(--green-mid) 100%);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(10, 95, 122, 0.22);
  position: relative; overflow: hidden;
}
.comunidad-panel::before {
  content: ''; position: absolute;
  width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  top: -70px; right: -60px;
}
.comunidad-panel-eyebrow {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal-light); margin-bottom: 20px;
}
.comunidad-panel ul { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.comunidad-panel li {
  display: flex; align-items: center; gap: 13px;
  font-size: 0.9rem; font-weight: 400; color: rgba(255, 255, 255, 0.9);
  position: relative; z-index: 1;
}
.comunidad-panel li span {
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; flex-shrink: 0;
}

/* ── PÁGINAS INTERNAS: encabezado ─────────────────────── */
.page-head {
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal) 55%, var(--green-mid) 100%);
  padding: 150px 48px 70px;
  position: relative; overflow: hidden;
}
.page-head::after {
  content: ''; position: absolute;
  width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
  top: -160px; right: -120px;
}
.page-head-inner { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }
.page-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800;
  color: var(--white); letter-spacing: -0.03em; line-height: 1.08;
  margin-top: 10px;
}
.page-head h1 span { color: var(--teal-light); }
.page-head p {
  font-family: 'Lora', serif; font-style: italic;
  font-size: 1.05rem; color: rgba(255, 255, 255, 0.65);
  margin-top: 14px; max-width: 560px; line-height: 1.7;
}

/* ── AVISOS ───────────────────────────────────────────── */
.aviso {
  display: none;
  font-size: 0.85rem; font-weight: 500; line-height: 1.6;
  padding: 13px 16px; border-radius: 12px; margin-bottom: 18px;
}
.aviso.visible { display: block; }
.aviso-error { background: #fdeceb; color: #a8322f; border: 1px solid #f6cfcd; }
.aviso-ok    { background: var(--accent-soft); color: var(--green-deep); border: 1px solid var(--green-pale); }
.aviso-info  { background: var(--teal-ghost); color: var(--teal-deep); border: 1px solid var(--teal-pale); }

/* ── FORMULARIOS ──────────────────────────────────────── */
.campo { margin-bottom: 18px; }
.campo label {
  display: block; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.02em; color: var(--teal-deep); margin-bottom: 7px;
}
.campo input,
.campo select,
.campo textarea {
  width: 100%;
  font-family: 'Sora', sans-serif; font-size: 0.92rem; color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--warm-gray);
  border-radius: 12px;
  padding: 13px 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.campo textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(18, 144, 182, 0.12);
}
.campo .ayuda { font-size: 0.74rem; color: var(--muted); margin-top: 6px; font-weight: 300; }
.campo-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn-bloque {
  width: 100%;
  background: var(--teal); color: var(--white);
  font-family: 'Sora', sans-serif; font-size: 0.92rem; font-weight: 700;
  border: none; border-radius: 100px; padding: 15px 24px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-bloque:hover:not(:disabled) {
  background: var(--teal-deep); transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(18, 144, 182, 0.28);
}
.btn-bloque:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── PÁGINA CUENTA (registro / login) ─────────────────── */
.cuenta-wrap {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--white);
}
.cuenta-lateral {
  background: linear-gradient(150deg, var(--teal-deep) 0%, var(--teal) 55%, var(--green-mid) 100%);
  padding: 80px 56px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.cuenta-lateral::after {
  content: ''; position: absolute;
  width: 460px; height: 460px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  bottom: -180px; left: -130px;
}
.cuenta-lateral-logo {
  font-size: 1rem; font-weight: 700; color: var(--white);
  text-decoration: none; margin-bottom: 48px; position: relative; z-index: 1;
}
.cuenta-lateral-logo span { color: var(--teal-light); }
.cuenta-lateral h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800;
  color: var(--white); line-height: 1.12; letter-spacing: -0.025em;
  margin-bottom: 18px; position: relative; z-index: 1;
}
.cuenta-lateral h2 em { font-family: 'Lora', serif; font-style: italic; color: var(--teal-light); }
.cuenta-lateral > p {
  font-size: 0.97rem; font-weight: 300; color: rgba(255, 255, 255, 0.72);
  line-height: 1.8; max-width: 400px; position: relative; z-index: 1;
}
.cuenta-lateral blockquote {
  font-family: 'Lora', serif; font-style: italic;
  font-size: 0.95rem; color: rgba(255, 255, 255, 0.55);
  line-height: 1.75; margin-top: 40px; padding-left: 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.2);
  position: relative; z-index: 1;
}

.cuenta-form-col {
  display: flex; align-items: center; justify-content: center;
  padding: 70px 48px;
}
.cuenta-form { width: 100%; max-width: 400px; }
.cuenta-form h1 {
  font-size: 1.8rem; font-weight: 800; color: var(--teal-deep);
  letter-spacing: -0.025em; margin-bottom: 8px;
}
.cuenta-form > p.intro {
  font-size: 0.9rem; font-weight: 300; color: var(--muted);
  line-height: 1.7; margin-bottom: 30px;
}
.cuenta-tabs {
  display: flex; gap: 4px; background: var(--warm-gray);
  border-radius: 100px; padding: 4px; margin-bottom: 28px;
}
.cuenta-tab {
  flex: 1; border: none; background: none; cursor: pointer;
  font-family: 'Sora', sans-serif; font-size: 0.84rem; font-weight: 600;
  color: var(--muted); padding: 10px 16px; border-radius: 100px;
  transition: background 0.2s, color 0.2s;
}
.cuenta-tab.activa { background: var(--white); color: var(--teal-deep); box-shadow: 0 2px 8px rgba(10, 95, 122, 0.1); }
.cuenta-panel { display: none; }
.cuenta-panel.activa { display: block; animation: fadeUp 0.35s ease both; }
.cuenta-pie {
  font-size: 0.8rem; color: var(--muted); text-align: center;
  margin-top: 22px; font-weight: 300; line-height: 1.7;
}
.cuenta-pie a { color: var(--teal); font-weight: 500; text-decoration: none; }
.cuenta-volver {
  display: inline-block; font-size: 0.8rem; color: var(--muted);
  text-decoration: none; margin-bottom: 24px; font-weight: 500;
}
.cuenta-volver:hover { color: var(--teal); }

/* Perfil dentro de cuenta.html */
.perfil-card {
  background: var(--off-white); border: 1px solid var(--warm-gray);
  border-radius: 18px; padding: 28px; margin-bottom: 20px;
}
.perfil-card h3 {
  font-size: 1rem; font-weight: 700; color: var(--teal-deep); margin-bottom: 18px;
}
.perfil-cabecera { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.perfil-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem; font-weight: 700; flex-shrink: 0;
}
.perfil-datos strong { display: block; font-size: 1.05rem; color: var(--teal-deep); }
.perfil-datos span { font-size: 0.82rem; color: var(--muted); }

/* ── COMUNIDAD ────────────────────────────────────────── */
.comunidad-body { background: var(--off-white); }
.comunidad-main { max-width: 1100px; margin: 0 auto; padding: 56px 48px 110px; }

.filtros {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: var(--white); border: 1px solid var(--warm-gray);
  border-radius: 18px; padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(10, 95, 122, 0.05);
}
.filtros-grupo { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--warm-gray); background: var(--white);
  font-family: 'Sora', sans-serif; font-size: 0.79rem; font-weight: 600;
  color: var(--muted); padding: 8px 16px; border-radius: 100px;
  cursor: pointer; transition: all 0.18s;
}
.chip:hover { border-color: var(--teal-pale); color: var(--teal); }
.chip.activo { background: var(--teal); border-color: var(--teal); color: var(--white); }
.filtros-buscar { flex: 1; min-width: 200px; position: relative; }
.filtros-buscar input {
  width: 100%; font-family: 'Sora', sans-serif; font-size: 0.85rem;
  border: 1.5px solid var(--warm-gray); border-radius: 100px;
  padding: 10px 16px 10px 38px; color: var(--text);
  transition: border-color 0.2s;
}
.filtros-buscar input:focus { outline: none; border-color: var(--teal); }
.filtros-buscar::before {
  content: '🔍'; position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); font-size: 0.8rem; opacity: 0.5;
}
.filtros-categorias { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 34px; }

.resultado-info {
  font-size: 0.82rem; color: var(--muted); font-weight: 300; margin-bottom: 22px;
}

/* Grilla de contenidos */
.contenidos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.contenido-card {
  background: var(--white); border-radius: 20px; overflow: hidden;
  border: 1px solid var(--warm-gray);
  box-shadow: 0 2px 12px rgba(10, 95, 122, 0.06);
  display: flex; flex-direction: column;
  transition: transform 0.28s, box-shadow 0.28s;
}
.contenido-card:hover { transform: translateY(-5px); box-shadow: 0 22px 48px rgba(10, 95, 122, 0.13); }

.contenido-media { position: relative; aspect-ratio: 16 / 9; background: var(--teal-ghost); }
.contenido-media iframe { width: 100%; height: 100%; border: none; display: block; }
.contenido-media.tipo-archivo,
.contenido-media.tipo-curso,
.contenido-media.bloqueada {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--white);
  background: linear-gradient(140deg, var(--teal-deep), var(--teal));
}
.contenido-media.tipo-curso { background: linear-gradient(140deg, var(--green-deep), var(--green-mid)); }
.contenido-media.bloqueada { background: linear-gradient(140deg, #274c58, #3d6f7d); }
.contenido-media-icono { font-size: 2.4rem; }
.contenido-media-ext {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.contenido-media-candado { font-size: 0.78rem; color: rgba(255, 255, 255, 0.8); font-weight: 500; }

.contenido-cuerpo { padding: 20px 22px 0; flex: 1; }
.contenido-etiquetas { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 11px; }
.etiqueta {
  font-size: 0.63rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px;
}
.etiqueta-tipo   { background: var(--teal-ghost); color: var(--teal-deep); }
.etiqueta-cat    { background: var(--accent-soft); color: var(--green-deep); }
.etiqueta-destacado { background: #fff4d6; color: #8a6316; }
.contenido-card h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--teal-deep);
  line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 8px;
}
.contenido-card .desc {
  font-size: 0.86rem; font-weight: 300; color: var(--muted); line-height: 1.65;
}
.contenido-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 0.74rem; color: var(--muted); margin-top: 12px; font-weight: 400;
}

.contenido-acciones {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 22px; margin-top: 16px;
  border-top: 1px solid var(--warm-gray);
}
.accion {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--warm-gray); background: var(--white);
  font-family: 'Sora', sans-serif; font-size: 0.79rem; font-weight: 600;
  color: var(--muted); padding: 8px 14px; border-radius: 100px;
  cursor: pointer; text-decoration: none;
  transition: all 0.18s;
}
.accion:hover { border-color: var(--teal-pale); color: var(--teal); background: var(--teal-ghost); }
.accion svg { width: 15px; height: 15px; }
.accion-like.activo { background: #fdeef0; border-color: #f6c9cf; color: #c2415a; }
.accion-like.activo svg { fill: #c2415a; stroke: #c2415a; }
.accion-descargar { margin-left: auto; background: var(--teal); border-color: var(--teal); color: var(--white); }
.accion-descargar:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--white); }

/* Comentarios */
.comentarios-caja {
  display: none;
  padding: 4px 22px 22px;
  border-top: 1px solid var(--warm-gray);
  background: var(--off-white);
}
.comentarios-caja.abierta { display: block; animation: fadeUp 0.3s ease both; }
.comentarios-lista { display: flex; flex-direction: column; gap: 16px; margin: 18px 0; }
.comentario { display: flex; gap: 11px; }
.comentario-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.8rem; font-weight: 700;
}
.comentario-cuerpo { flex: 1; min-width: 0; }
.comentario-cabecera { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.comentario-autor { font-size: 0.83rem; font-weight: 700; color: var(--teal-deep); }
.comentario-badge {
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--teal); color: #fff; padding: 2px 8px; border-radius: 100px;
}
.comentario-fecha { font-size: 0.72rem; color: var(--muted); font-weight: 300; }
.comentario-texto {
  font-size: 0.86rem; color: var(--text); line-height: 1.65; font-weight: 300;
  white-space: pre-wrap; word-wrap: break-word;
}
.comentario-pie { display: flex; gap: 14px; margin-top: 6px; }
.comentario-pie button {
  border: none; background: none; cursor: pointer;
  font-family: 'Sora', sans-serif; font-size: 0.74rem; font-weight: 600;
  color: var(--muted); padding: 0;
}
.comentario-pie button:hover { color: var(--teal); }
.comentario-pie .borrar:hover { color: #b0413e; }
.comentario-respuestas {
  margin-top: 14px; padding-left: 16px;
  border-left: 2px solid var(--teal-pale);
  display: flex; flex-direction: column; gap: 14px;
}

.comentario-form { display: flex; gap: 10px; align-items: flex-start; }
.comentario-form textarea {
  flex: 1; font-family: 'Sora', sans-serif; font-size: 0.86rem;
  border: 1.5px solid var(--warm-gray); border-radius: 14px;
  padding: 11px 14px; min-height: 44px; max-height: 160px; resize: vertical;
  color: var(--text); line-height: 1.5; background: var(--white);
}
.comentario-form textarea:focus { outline: none; border-color: var(--teal); }
.comentario-form button {
  border: none; background: var(--teal); color: #fff;
  font-family: 'Sora', sans-serif; font-size: 0.8rem; font-weight: 700;
  padding: 12px 20px; border-radius: 100px; cursor: pointer;
  transition: background 0.2s; flex-shrink: 0;
}
.comentario-form button:hover:not(:disabled) { background: var(--teal-deep); }
.comentario-form button:disabled { opacity: 0.55; cursor: not-allowed; }

.comentarios-invitacion {
  font-size: 0.83rem; color: var(--muted); font-weight: 300;
  background: var(--white); border: 1px dashed var(--teal-pale);
  border-radius: 12px; padding: 14px 16px; text-align: center;
}
.comentarios-invitacion a { color: var(--teal); font-weight: 600; text-decoration: none; }

/* Estados */
.estado-vacio {
  grid-column: 1 / -1;
  text-align: center; padding: 70px 24px;
  background: var(--white); border: 1px dashed var(--teal-pale); border-radius: 20px;
}
.estado-vacio-icono { font-size: 2.6rem; margin-bottom: 14px; display: block; }
.estado-vacio h3 { font-size: 1.1rem; color: var(--teal-deep); margin-bottom: 8px; font-weight: 700; }
.estado-vacio p { font-size: 0.88rem; color: var(--muted); font-weight: 300; line-height: 1.7; }

.cargando {
  grid-column: 1 / -1; text-align: center; padding: 60px 0;
  font-size: 0.88rem; color: var(--muted); font-weight: 300;
}
.cargando::before {
  content: ''; display: block; width: 26px; height: 26px; margin: 0 auto 14px;
  border: 2.5px solid var(--teal-pale); border-top-color: var(--teal);
  border-radius: 50%; animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ── PANEL DE ADMINISTRACIÓN ──────────────────────────── */
.admin-main { max-width: 1100px; margin: 0 auto; padding: 56px 48px 110px; }
.admin-grid { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; }
.admin-caja {
  background: var(--white); border: 1px solid var(--warm-gray);
  border-radius: 20px; padding: 28px;
  box-shadow: 0 2px 12px rgba(10, 95, 122, 0.06);
}
.admin-caja h2 {
  font-size: 1.1rem; font-weight: 800; color: var(--teal-deep);
  letter-spacing: -0.02em; margin-bottom: 6px;
}
.admin-caja > p.sub {
  font-size: 0.82rem; color: var(--muted); font-weight: 300;
  line-height: 1.6; margin-bottom: 22px;
}
.admin-tabla { width: 100%; border-collapse: collapse; }
.admin-tabla th {
  text-align: left; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  padding: 0 12px 12px; border-bottom: 1px solid var(--warm-gray);
}
.admin-tabla td {
  padding: 14px 12px; border-bottom: 1px solid var(--warm-gray);
  font-size: 0.85rem; color: var(--text); vertical-align: middle;
}
.admin-tabla tr:last-child td { border-bottom: none; }
.admin-tabla .titulo-celda strong { display: block; font-weight: 600; color: var(--teal-deep); }
.admin-tabla .titulo-celda span { font-size: 0.74rem; color: var(--muted); }
.admin-borrar {
  border: 1.5px solid #f6cfcd; background: #fdeceb; color: #a8322f;
  font-family: 'Sora', sans-serif; font-size: 0.74rem; font-weight: 600;
  padding: 6px 13px; border-radius: 100px; cursor: pointer;
}
.admin-borrar:hover { background: #f9d9d7; }
.solo-archivo, .solo-video, .solo-curso { display: none; }

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 960px) {
  .comunidad-cta { padding: 80px 24px; }
  .comunidad-cta-inner { grid-template-columns: 1fr; gap: 40px; }
  .page-head { padding: 120px 24px 56px; }
  .comunidad-main, .admin-main { padding: 40px 20px 80px; }
  .cuenta-wrap { grid-template-columns: 1fr; }
  .cuenta-lateral { padding: 110px 28px 56px; }
  .cuenta-form-col { padding: 48px 24px 72px; }
  .admin-grid { grid-template-columns: 1fr; }
  .contenidos-grid { grid-template-columns: 1fr; }
  .auth-nombre { display: none; }
  .auth-trigger { padding: 5px; }
  .campo-fila { grid-template-columns: 1fr; }
  .admin-tabla thead { display: none; }
  .admin-tabla td { display: block; border: none; padding: 4px 0; }
  .admin-tabla tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--warm-gray); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 2px; }
