* {
  box-sizing: border-box;
}

:root {
  --sidebar-width: 300px;

  /* paleta de marca — el marrón pasó a gris oscuro cálido; el resto queda igual */
  --cream: #fff8dd;
  --paper: #fffdf6;
  --ink: #2a1608;
  --brown: #3a3630;
  --brown-deep: #211f1b;
  --ember: #db491d;
  --amber: #f8a20f;

  --glass: rgba(255, 253, 246, 0.93);
  --shadow-warm: 0 14px 34px rgba(76, 32, 10, 0.20);
  --shadow-soft: 0 9px 20px rgba(51, 37, 23, 0.12);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Montserrat', Arial, sans-serif;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: #ece5d4;
}

body {
  min-height: 100vh;
}

a {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* ─────────────── SIDEBAR ─────────────── */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 248, 221, .97), rgba(255, 248, 221, .97)),
    url("assets/sidebar-texture.jpg") center/cover no-repeat;
  box-shadow: 4px 0 18px rgba(0, 0, 0, .10);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

.brand {
  padding: 30px 28px 22px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
  color: var(--brown);
  letter-spacing: -.3px;
}

.menu {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
}

.menu-item {
  min-height: 52px;
  padding: 0 12px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--brown);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: .15s ease;
}

.menu-item:hover,
.menu-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--ember), #e76d19);
}

.menu-item .icon {
  width: 22px;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

/* ── Mi Campus: punto de entrada al login, tratado como botón, no como item de menú ── */

.mi-campus-btn {
  margin: 14px 0 6px;
  padding: 14px 16px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--brown), var(--brown-deep));
  color: #fff8dd;
  box-shadow: 0 10px 22px rgba(58, 54, 48, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}

.mi-campus-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(58, 54, 48, .42);
}

.mi-campus-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mi-campus-icon svg {
  width: 18px;
  height: 18px;
}

.mi-campus-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.mi-campus-text strong {
  font-size: 15px;
  font-weight: 700;
}

.mi-campus-text small {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 248, 221, .78);
  letter-spacing: .01em;
}

.menu-divider {
  height: 1px;
  margin: 6px 12px 10px;
  background: rgba(58, 54, 48, .14);
}

.sidebar-footer {
  margin-top: auto;
  padding: 24px 20px 26px;
  text-align: center;
  color: var(--ink);
}

.church-logo {
  width: 112px;
  height: 128px;
  object-fit: contain;
  margin-bottom: 10px;
}

.sidebar-footer h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--brown);
}

.sidebar-footer p {
  margin: 0 0 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #5a4632;
  font-style: italic;
}

.sidebar-footer span {
  font-size: 11.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
}

/* ─────────────── SLIDER ─────────────── */

.main-content {
  grid-column: 2;
  min-width: 0;
}

.slider {
  position: relative;
  height: 62vh;
  min-height: 380px;
  overflow: hidden;
  background: var(--ink);
}

.slider .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .9s ease;
}

.slider .slide.active {
  opacity: 1;
}

.slide-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    190deg,
    rgba(42, 22, 8, .05) 0%,
    rgba(42, 22, 8, .06) 45%,
    rgba(42, 22, 8, .62) 100%
  );
  z-index: 1;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 253, 246, .88);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
  transition: background .15s ease, transform .15s ease;
}

.slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.06);
}

.slider-prev { left: 22px; }
.slider-next { right: 22px; }

.slider-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding-top: 20px;
  padding-bottom: 46px;
  padding-right: 90px;
  padding-left: max(28px, calc((100% - 1240px) / 2 + 4px));
}

.slider-caption-text {
  margin: 0;
  max-width: 640px;
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  color: #fff8dd;
  letter-spacing: -.2px;
}

.slider-dots {
  position: absolute;
  right: 28px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 248, 221, .45);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

.dot.active {
  background: var(--amber);
  transform: scale(1.3);
}

/* firma visual: línea de horizonte con resplandor cálido — referencia directa
   a "nacerá el Sol de justicia" (Malaquías 4:2), el hilo conductor de la página.
   Se ubica entre el slider y el contenido, como puente entre las dos secciones. */
.horizon-divider {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber) 50%, transparent);
  box-shadow: 0 0 40px 12px rgba(248, 162, 15, .35);
  opacity: .85;
}

.content-wrap {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 56px 0 60px;
}

.welcome {
  max-width: 760px;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 20px;
  box-shadow: var(--shadow-warm);
  padding: 34px 36px 30px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember);
}

.welcome h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -.5px;
  font-weight: 600;
  color: var(--ink);
}

.welcome h1 span {
  display: block;
  color: var(--brown);
}

.welcome-lede {
  margin: 0;
  max-width: 560px;
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.55;
  font-weight: 500;
  color: #3a2413;
}

.welcome-actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 13px 24px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--ember), #c53d16);
  color: #fff8dd;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 10px 22px rgba(219, 73, 29, .32);
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(219, 73, 29, .4);
}

.btn-ghost {
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  color: var(--brown);
  border-bottom: 1.5px solid rgba(58, 54, 48, .35);
  padding-bottom: 2px;
}

.btn-ghost:hover {
  border-color: var(--brown);
}

/* ─────────────── QUICK ACTIONS ─────────────── */

.quick-actions {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.action-card {
  border-radius: 18px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
}

/* la tarjeta "en vivo" es la única que sube el volumen — es lo urgente */
.action-live {
  background: linear-gradient(150deg, #f57c00, var(--ember));
  color: #fff8dd;
  box-shadow: 0 14px 30px rgba(219, 73, 29, .3);
  gap: 14px;
}

.action-live-top {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.live-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .28);
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

.action-live h3 {
  margin: 2px 0 4px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
}

.action-live .action-kicker {
  color: rgba(255, 248, 221, .85);
}

.action-live .action-copy {
  color: rgba(255, 248, 221, .92);
  margin: 0;
  font-size: 13.5px;
}

.waveform {
  height: 40px;
  margin: 2px 2px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
}

.waveform span {
  display: block;
  width: 3px;
  min-height: 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
}

.waveform span:nth-child(3n) { height: 30px; }
.waveform span:nth-child(4n) { height: 40px; }
.waveform span:nth-child(5n) { height: 20px; }
.waveform span:nth-child(7n) { height: 34px; }
.waveform span:nth-child(2n) { min-height: 14px; }

/* tarjetas "quietas" — papel + acento de color, no gradiente completo */
.action-quiet {
  background: var(--paper);
  border-top: 3px solid transparent;
  box-shadow: var(--shadow-soft);
  gap: 8px;
}

.action-quiet.accent-brown { border-top-color: var(--brown); }
.action-quiet.accent-amber { border-top-color: var(--amber); }

.action-quiet h3 {
  margin: 2px 0 2px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
}

.action-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ember);
}

.action-quiet .action-kicker {
  color: #a6693f;
}

.action-copy {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #5a4632;
}

.action-link {
  margin-top: auto;
  padding-top: 8px;
  align-self: flex-start;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  opacity: .92;
}

.action-live .action-link {
  color: #fff8dd;
}

.action-quiet .action-link {
  color: var(--brown);
}

.action-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ─────────────── DASHBOARD ─────────────── */

.dashboard-grid {
  margin-top: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .9fr);
  gap: 20px;
  align-items: start;
}

.news-panel,
.progress-panel {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 18px;
  box-shadow: var(--shadow-warm);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px 24px 26px;
}

.news-panel > h2,
.progress-panel > h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.6vw, 25px);
  font-weight: 600;
  letter-spacing: -.2px;
  color: var(--brown);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.news-item img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 12px;
}

.news-rule {
  display: block;
  width: 34px;
  height: 3px;
  margin: 14px 0 10px;
  background: var(--amber);
  border-radius: 4px;
}

.news-item h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.25;
  font-weight: 600;
  color: var(--ink);
}

.news-item a {
  display: inline-block;
  text-decoration: none;
  color: var(--ember);
  font-weight: 700;
  font-size: 13.5px;
}

.progress-card {
  padding: 18px 18px 15px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .6);
  box-shadow: 0 6px 16px rgba(51, 37, 23, .08);
}

.progress-card + .progress-card {
  margin-top: 14px;
}

.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--ink);
}

.progress-heading span {
  font-weight: 700;
  color: var(--ember);
}

.progress-track {
  height: 9px;
  background: #e9e2d0;
  border-radius: 30px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--ember));
}

.progress-card p {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: #6b573e;
}

.progress-cta {
  display: block;
  margin-top: 18px;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--brown);
  border-top: 1px solid rgba(58, 54, 48, .14);
  padding-top: 14px;
}

.progress-cta:hover {
  color: var(--ember);
}

/* ─────────────── FOOTER ─────────────── */

.site-footer {
  position: relative;
  z-index: 2;
  background: var(--brown-deep);
  color: #e8dcc6;
  padding: 46px 0 30px;
}

.footer-wrap {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.4fr;
  gap: 32px;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--amber);
}

.footer-col p {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.5;
  color: #cdbfa2;
}

.footer-col a {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  text-decoration: none;
  color: #e8dcc6;
}

.footer-col a:hover {
  color: var(--amber);
}

.footer-verse p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: #e8dcc6;
  line-height: 1.5;
}

.footer-verse span {
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 600;
}

/* ─────────────── RESPONSIVE ─────────────── */

@media (max-width: 1180px) {
  :root { --sidebar-width: 250px; }

  .brand { font-size: 22px; padding: 24px 22px 18px; }

  .menu { padding: 0 12px; }

  .quick-actions { grid-template-columns: 1fr 1fr; }
  .action-live { grid-column: 1 / -1; }

  .dashboard-grid { grid-template-columns: 1fr; }

  .footer-wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }

  .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
  }

  .brand { justify-content: center; text-align: center; }

  .menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .mi-campus-btn { grid-column: 1 / -1; }
  .menu-divider { grid-column: 1 / -1; }

  .sidebar-footer { display: none; }

  .main-content { grid-column: auto; }

  .slider { height: 46vh; min-height: 280px; }
  .slider-arrow { width: 36px; height: 36px; font-size: 20px; }
  .slider-prev { left: 12px; }
  .slider-next { right: 12px; }
  .slider-caption { padding-left: 20px; padding-right: 20px; }

  .content-wrap {
    width: min(100% - 28px, 720px);
    padding-top: 30px;
  }

  .quick-actions { grid-template-columns: 1fr; }
  .action-live { grid-column: auto; }

  .dashboard-grid { margin-top: 34px; }

  .news-grid { grid-template-columns: 1fr; gap: 24px; }

  .footer-wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .menu { grid-template-columns: 1fr; }

  .welcome { padding: 24px 20px; }

  .welcome h1 { font-size: 34px; }

  .footer-wrap { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   COMUNIDAD — "Conversemos sobre la Palabra"
   Reutiliza las variables de marca existentes (--cream, --paper,
   --ink, --ember, --amber, --font-display, --font-body). No se
   agregan colores ni tipografías nuevas.
   ═══════════════════════════════════════════════════════════ */

.comunidad-wrap {
  width: min(900px, calc(100% - 64px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.comunidad-eyebrow {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ember);
}

.comunidad-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.comunidad-subtitle {
  margin: 0 0 30px;
  font-size: 15.5px;
  color: #5a4632;
  line-height: 1.5;
}

.comunidad-subheading {
  margin: 40px 0 18px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--brown);
}

.comunidad-normas {
  margin: 22px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #8a7a52;
  background: rgba(255, 255, 255, .5);
  border-radius: 12px;
  padding: 14px 16px;
}

.comunidad-cargando {
  color: #8a7a52;
  font-size: 14px;
  padding: 20px 0;
}

/* ── Tarjetas genéricas de Comunidad ── */

.comunidad-card {
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, .6);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 24px 26px;
}

.comunidad-card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.comunidad-card-visitante p {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: #4a3a22;
}

.comunidad-composer-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.comunidad-composer-footer select {
  font-family: var(--font-body);
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(58, 54, 48, .2);
  background: #fff;
  color: var(--ink);
}

.btn-comunidad-primary,
.btn-comunidad-secundario {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-comunidad-primary {
  background: linear-gradient(135deg, var(--ember), #c53d16);
  color: #fff8dd;
  box-shadow: 0 10px 22px rgba(219, 73, 29, .28);
}

.btn-comunidad-primary:hover { transform: translateY(-1px); }

.btn-comunidad-secundario {
  background: var(--paper);
  color: var(--brown);
  border: 1.5px solid rgba(58, 54, 48, .3);
}

.btn-comunidad-secundario:hover { border-color: var(--brown); }

.btn-comunidad-small { padding: 9px 16px; font-size: 12.5px; }

.comunidad-form-nota {
  margin: 10px 0 0;
  font-size: 12px;
  color: #8a7a52;
}

.comunidad-form-error {
  margin: 8px 0 0;
  font-size: 13px;
  color: #b3261e;
  min-height: 16px;
}

/* ── Textarea con botón de emoji ── */

.comunidad-textarea-wrap {
  position: relative;
}

.comunidad-textarea-wrap textarea {
  width: 100%;
  min-height: 90px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  border: 1px solid rgba(58, 54, 48, .2);
  border-radius: 12px;
  padding: 14px 46px 14px 16px;
  resize: vertical;
  background: #fff;
}

.comunidad-emoji-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.comunidad-emoji-btn:hover { background: rgba(58, 54, 48, .08); }

.comunidad-emoji-panel {
  position: absolute;
  right: 0;
  bottom: 46px;
  z-index: 5;
  background: #fff;
  border: 1px solid rgba(58, 54, 48, .18);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 220px;
}

.comunidad-emoji-panel button {
  border: none;
  background: transparent;
  font-size: 18px;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
}

.comunidad-emoji-panel button:hover { background: rgba(58, 54, 48, .08); }

.comunidad-respuesta-wrap { margin-top: 10px; }

/* ── Feed de publicaciones ── */

.comunidad-feed { display: flex; flex-direction: column; gap: 18px; }

.comunidad-post,
.comunidad-comentario {
  background: var(--paper);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}

.comunidad-comentario {
  background: rgba(255, 255, 255, .55);
  box-shadow: none;
  border: 1px solid rgba(58, 54, 48, .1);
  margin-top: 12px;
  padding: 14px 16px;
}

.comunidad-comentarios { margin-top: 16px; }
.comunidad-comentarios-anidados { margin-left: 26px; }

.comunidad-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  position: relative;
}

.comunidad-post-header strong {
  font-size: 14.5px;
  color: var(--ink);
}

.comunidad-fecha {
  font-size: 12px;
  color: #8a7a52;
}

.comunidad-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 40px;
}

.comunidad-avatar-iniciales {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--ember));
  color: #fff8dd;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}

.comunidad-avatar-grande { width: 64px; height: 64px; flex: 0 0 64px; font-size: 20px; }

.comunidad-post-texto {
  margin: 0 0 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #3a2413;
  white-space: pre-wrap;
  word-break: break-word;
}

.comunidad-post-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.comunidad-reacciones { display: flex; gap: 6px; flex-wrap: wrap; }

.comunidad-reaccion {
  font-family: var(--font-body);
  font-size: 12.5px;
  border: 1px solid rgba(58, 54, 48, .18);
  background: #fff;
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

.comunidad-reaccion:hover:not(:disabled) { border-color: var(--ember); }

.comunidad-reaccion.activa {
  background: rgba(219, 73, 29, .12);
  border-color: var(--ember);
  color: var(--ember);
  font-weight: 700;
}

.comunidad-reaccion:disabled { cursor: not-allowed; opacity: .6; }

.comunidad-link-btn {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
  cursor: pointer;
  padding: 0;
}

.comunidad-link-btn:hover { color: var(--ember); }

.comunidad-menu-3p { margin-left: auto; position: relative; }

.comunidad-menu-3p > button {
  border: none;
  background: transparent;
  font-size: 18px;
  color: #8a7a52;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.comunidad-menu-3p > button:hover { background: rgba(58, 54, 48, .08); }

.comunidad-menu-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 5;
  background: #fff;
  border: 1px solid rgba(58, 54, 48, .18);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  min-width: 130px;
  overflow: hidden;
}

.comunidad-menu-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--ink);
  cursor: pointer;
}

.comunidad-menu-dropdown button:hover { background: rgba(58, 54, 48, .08); }

/* ── Modal login / registro ── */

.comunidad-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 22, 8, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.comunidad-modal {
  position: relative;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-warm);
  padding: 32px 30px 28px;
  width: min(420px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}

.comunidad-modal-cerrar {
  position: absolute;
  right: 16px;
  top: 14px;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #8a7a52;
  cursor: pointer;
}

.comunidad-modal-title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.comunidad-modal label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brown);
}

.comunidad-modal input[type="text"],
.comunidad-modal input[type="email"],
.comunidad-modal input[type="password"] {
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  border: 1px solid rgba(58, 54, 48, .2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.comunidad-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.5;
  color: #4a3a22;
}

.comunidad-checkbox-label input { margin-top: 3px; }

.comunidad-modal .btn-comunidad-primary { width: 100%; margin-top: 6px; }

.comunidad-modal-switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: #5a4632;
}

.comunidad-modal-switch a { color: var(--ember); font-weight: 700; text-decoration: none; }

/* ── Perfil de Comunidad ── */

.comunidad-perfil-card { max-width: 560px; }

.comunidad-perfil-header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.comunidad-perfil-header h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}

.comunidad-perfil-stats {
  display: flex;
  gap: 28px;
  padding: 16px 0;
  margin-bottom: 20px;
  border-top: 1px solid rgba(58, 54, 48, .12);
  border-bottom: 1px solid rgba(58, 54, 48, .12);
}

.comunidad-perfil-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ember);
}

.comunidad-perfil-stats span {
  font-size: 12px;
  color: #8a7a52;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.comunidad-perfil-form { margin-bottom: 18px; }

.comunidad-perfil-detalle {
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid rgba(58, 54, 48, .12);
}

.comunidad-perfil-detalle summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--brown);
  margin-bottom: 12px;
}

.comunidad-perfil-detalle form { max-width: 320px; }

@media (max-width: 700px) {
  .comunidad-wrap { padding: 28px 0 60px; }
  .comunidad-card { padding: 20px; }
  .comunidad-comentarios-anidados { margin-left: 14px; }
  .comunidad-modal { padding: 26px 20px 22px; }
}

/* Fix: [hidden] debe ganarle siempre a los display:flex fijos de arriba
   (modal de login/registro y panel de emojis), o quedan visibles aunque
   JS les ponga el atributo "hidden". */
.comunidad-modal-overlay[hidden],
.comunidad-emoji-panel[hidden] {
  display: none !important;
}

/* Reacciones para visitantes: siguen siendo clickeables (para poder
   mostrar el aviso de "ingresá con tu perfil"), pero visualmente se ven
   apagadas para dar a entender que no van a sumar el conteo todavía. */
.comunidad-reaccion-visitante {
  opacity: .55;
}

/* ═══════════════════════════════════════════════════════════
   NAVEGACIÓN Y PORTADA MÓVIL
   Estas reglas quedan al final para unificar los cortes responsive
   anteriores y conservar intacta la presentación de escritorio.
   ═══════════════════════════════════════════════════════════ */

.mobile-header,
.mobile-menu-backdrop {
  display: none;
}

@media (max-width: 900px) {
  html { scroll-behavior: smooth; }
  body { overflow-x: hidden; }
  body.menu-open { overflow: hidden; }

  .app-shell {
    display: block;
    min-width: 0;
  }

  .main-content {
    width: 100%;
    min-width: 0;
    margin: 0;
    grid-column: auto;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 8px 16px;
    background: var(--cream);
    border-bottom: 1px solid rgba(58, 54, 48, .16);
    box-shadow: 0 3px 14px rgba(35, 24, 16, .08);
  }

  .mobile-brand {
    color: var(--brown);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -.2px;
  }

  .mobile-menu-toggle {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    color: var(--brown);
    background: transparent;
    border: 1px solid rgba(58, 54, 48, .25);
    border-radius: 50%;
    cursor: pointer;
  }

  .mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    width: min(86vw, 340px);
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: 16px 0 22px;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 12px 0 35px rgba(0, 0, 0, .2);
  }

  body.menu-open .sidebar { transform: translateX(0); }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1150;
    background: rgba(20, 13, 9, .55);
    border: 0;
    cursor: pointer;
  }

  body.menu-open .mobile-menu-backdrop { display: block; }

  .sidebar .brand {
    padding: 14px 24px 18px;
    text-align: left;
  }

  .sidebar .menu {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
  }

  .sidebar .menu-item,
  .sidebar .mi-campus-btn {
    min-height: 50px;
  }

  .sidebar .mi-campus-btn,
  .sidebar .menu-divider {
    grid-column: auto;
  }

  .sidebar-footer {
    display: block;
    margin-top: auto;
    padding-bottom: 6px;
  }

  .church-logo {
    width: 78px;
    height: 88px;
  }

  .slider {
    height: clamp(300px, 62vw, 440px);
    min-height: 0;
  }

  .slider .slide { background-position: center; }

  .slider-caption {
    right: 54px;
    bottom: 0;
    left: 54px;
    padding: 0 0 40px;
  }

  .slider-caption-text {
    font-size: clamp(21px, 6vw, 30px);
    line-height: 1.12;
  }

  .slider-arrow {
    width: 42px;
    height: 48px;
    font-size: 24px;
  }

  .slider-prev { left: 8px; }
  .slider-next { right: 8px; }

  .slider-dots {
    right: 50%;
    bottom: 14px;
    transform: translateX(50%);
  }

  .content-wrap {
    width: auto;
    max-width: none;
    padding: 38px 18px 48px;
  }

  .welcome {
    max-width: none;
    padding: 28px 24px;
  }

  .welcome h1 {
    font-size: clamp(34px, 10vw, 50px);
  }

  .welcome h1 br { display: none; }

  .welcome-lede {
    max-width: none;
    font-size: 16px;
  }

  .welcome-actions {
    display: grid;
    gap: 10px;
  }

  .btn-primary,
  .btn-ghost {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    text-align: center;
  }

  .btn-ghost {
    border: 1px solid rgba(58, 54, 48, .25);
    border-radius: 11px;
    padding: 10px 18px;
  }

  .quick-actions,
  .dashboard-grid,
  .news-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-actions,
  .dashboard-grid { gap: 18px; }

  .action-live { grid-column: auto; }

  .action-card,
  .news-panel,
  .progress-panel {
    min-width: 0;
  }

  .news-panel,
  .progress-panel {
    padding: 22px 18px 24px;
  }

  .news-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .site-footer { padding: 38px 20px; }

  .footer-wrap {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .footer-col a {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin: 0;
  }

  audio { min-height: 46px; }

  a,
  button { -webkit-tap-highlight-color: transparent; }
}

@media (max-width: 420px) {
  .slider { height: 310px; }

  .slider-caption {
    right: 45px;
    left: 45px;
  }

  .content-wrap {
    padding-right: 14px;
    padding-left: 14px;
  }

  .welcome,
  .action-card {
    padding-right: 18px;
    padding-left: 18px;
  }

  .mi-campus-text small { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar { transition: none; }
  .live-dot { animation: none; }
}
