/* ============================================================
   FORO · Estilo CUBIA CARTA
   ============================================================ */

/* Wrapper general */
.foro-wrapper {
  min-height: calc(100svh - var(--nav-h) - 90px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem;
}
@media (max-width: 991.98px) {
  .foro-wrapper {
    min-height: calc(100svh - var(--nav-h-sm) - 90px);
    padding: 2rem 1rem;
  }
}

/* Panel principal con fondo tipo carta */
.foro-panel {
  background: linear-gradient(to bottom, #ffffff, var(--bg));
  padding: 3rem 2rem;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  width: min(1200px, 100%);
}

/* Título con líneas estilo carta */
.foro-titulo {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--cobrizo);
  text-transform: uppercase;
  letter-spacing: .12em;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin-bottom: .8rem;
}
.foro-titulo::before,
.foro-titulo::after {
  content: "";
  flex: 1;
  max-width: 80px;
  height: 2px;
  background: var(--cobrizo);
  border-radius: 2px;
  opacity: .85;
}

/* Subtítulo */
.foro-sub {
  text-align: center;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gris);
  margin-bottom: 2.2rem;
}

/* Grid principal (sidebar + contenido) */
.foro-grid {
  margin-top: .5rem;
}

/* Tarjetas internas */
.foro-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.08);
  height: 100%;
}

/* ==========================
   SIDEBAR · FILTROS
   ========================== */
.foro-sidebar-box {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.foro-sidebar-header {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: .4rem;
}

.foro-count {
  font-size: .9rem;
  color: var(--gris);
}

/* Scroll interno del sidebar (si hay muchos filtros) */
.foro-sidebar-scroll {
  margin-top: .9rem;
  max-height: 430px;
  overflow-y: auto;
}
@media (max-width: 991.98px) {
  .foro-sidebar-scroll {
    max-height: none;
  }
}

/* Filtros */
.form-label-compact {
  font-size: .85rem;
  color: var(--gris);
  margin-bottom: .25rem;
}

#foroFilters .form-select,
#foroFilters .form-control,
#foroFilters .input-group,
#foroFilters .btn {
  width: 100%;
}

/* Botón compacto */
.btn-compact {
  padding: 4px 10px;
  font-size: .85rem;
  line-height: 1.1;
}

/* ==========================
   PANEL DERECHO · CONTENIDO
   ========================== */
.foro-main-box {
  display: flex;
  flex-direction: column;
}

.foro-main-scroll {
  max-height: none;
  overflow: visible;
}

/* Cards de foro (lista de items) */
.foro-card {
  background: transparent;
  border-radius: 12px;
  border: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.foro-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Link envolvente */
.foro-link {
  display: block;
  color: inherit;
}

/* Layout horizontal noticia/plato */
.noticia-horizontal,
.plato-horizontal {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: .75rem;
  background: #faf7f2;
  border-radius: 12px;
  height: 100%;
}

/* Miniaturas */
.news-thumb,
.news-thumb-placeholder,
.plato-thumb,
.plato-thumb.placeholder {
  width: 120px !important;
  height: 90px !important;
  object-fit: cover !important;
  flex: 0 0 auto;
}

.news-thumb-placeholder,
.plato-thumb.placeholder {
  background: rgba(0,0,0,.04);
  color: rgba(0,0,0,.35);
}
.news-thumb-placeholder .bi,
.plato-thumb.placeholder .bi {
  font-size: 1.25rem;
}

/* Textos */
.noticia-horizontal .flex-grow-1,
.plato-horizontal .flex-grow-1 {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.foro-meta {
  color: var(--gris);
}

.foro-text {
  margin: 0;
  color: var(--gris);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge de categoría */
.foro-badge {
  background: rgba(196,106,43,0.1);
  color: var(--cobrizo);
  border-radius: 999px;
  font-weight: 600;
}

/* Asegurar que columna ocupa alto de card */
#foroGrid .foro-item {
  display: flex;
}
#foroGrid .foro-item > .foro-card {
  width: 100%;
}

/* ==========================
   Skeleton
   ========================== */
.skeleton-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.05);
  height: 150px;
}
.skeleton-img {
  background: #f1e8dd;
  height: 100%;
}
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* Respeto a reduce motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .shimmer::after { display: none; }
}

/* ==========================
   Vista LISTA (body.foro-list)
   ========================== */
.foro-list #foroGrid .foro-item {
  flex: 0 0 100%;
  max-width: 100%;
}
.foro-list .foro-card {
  height: 150px;
}
.foro-list .noticia-horizontal,
.foro-list .plato-horizontal {
  height: 100%;
}

/* ==========================
   Paginación
   ========================== */
.pagination .page-link {
  background: #fff;
  border-color: rgba(0,0,0,.1);
  color: var(--titular);
}
.pagination .page-item.active .page-link {
  background: var(--cobrizo);
  border-color: var(--cobrizo);
  color: #fff;
}

/* ==========================
   Offcanvas (filtros móvil)
   ========================== */
.foro-offcanvas {
  background: #ffffff;
}
.foro-offcanvas .offcanvas-header {
  background: #faf7f2;
}
.foro-offcanvas .offcanvas-title {
  color: var(--titular);
}
.foro-offcanvas .offcanvas-body {
  padding: 0;
  overflow-y: auto;
  max-height: 100dvh;
  -webkit-overflow-scrolling: touch;
}
.foro-offcanvas .form-select,
.foro-offcanvas .form-control {
  background-color: #faf7f2;
  color: var(--titular);
  border-color: rgba(0,0,0,.1);
}
.foro-offcanvas .btn {
  width: 100%;
}

/* Full-width en móviles pequeños */
@media (max-width: 576px) {
  .foro-offcanvas.offcanvas-start {
    width: 100%;
  }
}

/* ==========================
   Responsive extra
   ========================== */
@media (max-width: 991.98px) {
  .noticia-horizontal img,
  .plato-horizontal img,
  .news-thumb,
  .plato-thumb,
  .news-thumb-placeholder,
  .plato-thumb.placeholder {
    width: 128px !important;
    height: 96px !important;
  }
}

/* ==========================
   Animación entrada
   ========================== */
.fade-up {
  opacity: 0;
  transform: translateY(10px);
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: all .5s ease;
}
