/* ================= CONTENEDOR ================= */

.pub-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* ================= HERO ================= */

.pub-hero {
  padding: 70px 0 40px;
  text-align: center;
  background: radial-gradient(circle at top, rgba(212,175,55,0.08), transparent 60%);
}

.pub-title {
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: 0.5px;
}

.pub-subtitle {
  color: rgba(255,255,255,0.6);
  margin-top: 10px;
}

.pub-divider {
  width: 60px;
  height: 3px;
  background: #d4af37;
  margin: 20px auto 0;
  border-radius: 5px;
}

/* ================= FILTROS ================= */

.pub-filter-wrapper {
  text-align: center;
  margin-bottom: 40px;
}

.pub-filter {
  display: inline-flex;
  gap: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(212,175,55,0.2);
  padding: 8px 14px;
  border-radius: 40px;
  flex-wrap: wrap;
}

.pub-filter .btn {
  border-radius: 30px;
  font-size: 0.9rem;
}

/* ================= GRID ================= */

.pub-grid {
  display: grid;
  gap: 25px;
}

@media (min-width: 768px) {
  .pub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ================= CARD ================= */

.pub-card {
  background: #17171c;
  border-radius: 18px;
  border: 1px solid rgba(212,175,55,0.25);
  padding: 22px;
  transition: 0.3s ease;
}

.pub-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212,175,55,0.6);
}

.pub-badge {
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(212,175,55,0.15);
  color: #d4af37;
  display: inline-block;
  margin-bottom: 15px;
}

.pub-image {
  border-radius: 14px;
  margin-bottom: 18px;
  max-height: 280px;
  object-fit: cover;
}

.pub-card h5 {
  font-weight: 700;
  margin-bottom: 8px;
}

.pub-meta {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

.pub-text {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}

.pub-actions {
  margin-top: 20px;
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}

.pub-actions span {
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  transition: 0.2s ease;
}

.pub-actions span:hover {
  color: #d4af37;
}

/* ===== FORZAR FONDO OSCURO GLOBAL ===== */

html, body {
  background-color: #0f0f12 !important;
}

/* Si el layout envuelve con main o section */
main, .container, .container-fluid {
  background-color: transparent !important;
}

/* HERO CORREGIDO */
.pub-hero {
  background: radial-gradient(circle at top, rgba(212,175,55,0.08), transparent 70%);
  /*background-color: #0f0f12;*/
}

/* Elimina cualquier fondo blanco accidental */
.pub-container {
  background-color: transparent !important;
}

/* Mejora botón btn-6 sombra elegante */
.btn-6 {
  box-shadow: 0 8px 20px rgba(212,175,55,0.25);
  transition: 0.3s ease;
}

.btn-6:hover {
  box-shadow: 0 12px 25px rgba(212,175,55,0.4);
  transform: translateY(-2px);
}

/* Filtros mejor contraste */
.pub-filter {
  background: rgba(255,255,255,0.03);
}

/* Evitar que se vean “blancos” en móvil */
@media (max-width: 768px) {
  .pub-hero {
    padding: 60px 0 30px;
  }
}

html,
body {
  overflow-x: clip;
}

/* OVERLAY */
#contentDrawerOverlay {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);

  opacity: 0;
  visibility: hidden;

  transition: opacity 0.3s ease, visibility 0.3s ease;

  z-index: 1040;
}

#contentDrawerOverlay.active {
  opacity: 1;
  visibility: visible;
}

/* PANEL */
#contentDrawer {
  position: fixed;
  top: 0;
  right: 0;

  width: 420px;
  max-width: 100%;
  height: 100dvh;

  background: #16161c;
  border-left: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);

  transform: translateX(100%);
  transition: transform 0.35s ease;

  z-index: 1050;

  display: flex;
  flex-direction: column;

  will-change: transform;
  backface-visibility: hidden;
}

/* ACTIVO */
#contentDrawer.active {
  transform: translateX(0);
}

/* HEADER */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 5px;

  border-bottom: 1px solid rgba(212, 175, 55, 0.2);

  flex-shrink: 0;
}

.drawer-header h5 {
  margin: 0;
  font-weight: 600;
}

.closeDrawer {
  background: none;
  border: none;

  color: #fff;
  font-size: 28px;
}

/* BODY */
.drawer-body {
  flex: 1;

  overflow-y: auto;

  scrollbar-width: thin;
}

/* Chrome */
.drawer-body::-webkit-scrollbar {
  width: 6px;
}

.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.5);
  border-radius: 10px;
}

/* FOOTER */
.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;

  flex-shrink: 0;
}

/* MOBILE FULL */
@media (max-width: 768px) {
  #contentDrawer {
    width: 100%;
  }
}

/* ================= FORM MODERNO ================= */

.drawer-body label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.4);
  /*margin-bottom: 6px;*/
}

.drawer-body .form-control {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  transition: 0.2s ease;
}

.drawer-body .form-control:focus {
  background: rgba(255,255,255,0.08);
  border-color: rgba(212,175,55,0.6);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
  color: #fff;
}

.drawer-body textarea {
  resize: none;
}

.drawer-body input::placeholder,
.drawer-body textarea::placeholder {
  color: rgba(255,255,255,0.35);
}

.drawer-actions {
  margin-top: 10px;
}

.drawer-actions .btn-6 {
  padding: 8px 22px;
}

.drawer-actions .btn-secondary {
  background: rgba(255,255,255,0.1);
  border: none;
}

/* ===== CONTENT TYPE TOGGLE ===== */

.content-type-toggle {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.type-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  transition: 0.2s ease;
}

.type-btn:hover {
  border-color: rgba(212,175,55,0.6);
  color: #fff;
}

.type-btn.active {
     color: #fff4a3 !important;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
    border: 0;
    background: linear-gradient(180deg, rgba(255, 215, 120, .25), rgba(255, 215, 120, .12)) !important;
}

.drawer-progress{
height:4px;
background:#2a2a2a;
margin-bottom:12px;
border-radius:3px;
overflow:hidden;
}

.drawer-progress-bar{
height:100%;
width:50%;
background:#d4af37;
transition:0.3s;
}

.drawer-step-indicator{
text-align:center;
font-size:12px;
color:#aaa;

}

.drawer-step{
display:none;
}

.drawer-step.active{
display:block;
animation:fadeStep .25s ease;
}

@keyframes fadeStep{
from{
opacity:0;
transform:translateX(10px);
}
to{
opacity:1;
transform:translateX(0);
}
}

.div-imgSchedule-edit{
	max-height: 400px;
}

select option {
  background: #000;
  color: #fff;
}

.pub-card {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 20px;
  background: #0f1116;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.pub-image-container {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.pub-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.pub-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 193, 7, 0.9);
  color: #000;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.pub-content {
  padding: 14px;
}

.pub-title {
  color: #fff;
  font-weight: 600;
  margin-bottom: 6px;
}

.pub-meta {
  font-size: 12px;
  color: #aaa;
  margin-bottom: 10px;
}

.pub-text {
  color: #ddd;
  font-size: 14px;
  margin-bottom: 12px;
}

.pub-actions {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #aaa;
}

.pub-action {
  cursor: pointer;
  transition: 0.2s;
}

.pub-action:hover {
  color: #ffc107;
}

.pub-memory { background: #6f42c1; }
.pub-news { background: #ffc107; color: #000; }
.pub-reflection { background: #17a2b8; }


.hsb-float-pill:hover {
  transform: scale(1.08);
}

.pub-menu {
  position: absolute;
  top: 0;
  right: 48px;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 6px;
  min-width: 140px;
  box-shadow: 0 10px 25px rgba(0,0,0,.3);
  z-index: 10;
}

.pub-menu-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  border-radius: 8px;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: background .15s ease;
}

.pub-menu-item:hover {
  background: rgba(255,255,255,.1);
}

.comments-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 999;
}

.comments-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.comments-sheet {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #111;
  border-radius: 20px 20px 0 0;
  transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.comments-sheet.active {
  bottom: 0;
}

.comments-header {
  padding: 10px;
  text-align: center;
}

.drag-bar {
  width: 40px;
  height: 5px;
  background: #666;
  border-radius: 5px;
  margin: 0 auto 5px;
  cursor: pointer;
}
.comments-body {
  flex: 1;
  overflow-y: auto;

  -webkit-overflow-scrolling: touch; /* suavidad iOS */
  min-height: 0;
  overscroll-behavior-y: contain;
}

.comments-footer {
  display: flex;
  padding: 10px;
  border-top: 1px solid #222;
}

.comments-footer input {
  flex: 1;
  background: #222;
  border: none;
  color: white;
  padding: 8px;
  border-radius: 10px;
}

.fixed-bottom {
  z-index: 1000; /* o menos */
}

.comments-overlay {
  z-index: 2000;
}

.comments-sheet {
  z-index: 2001;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.btn-send-comment {
  background: linear-gradient(135deg, #f5c542, #d4a017);
  border: none;
  color: black;
  border-radius: 10px;
  padding: 0 14px;
  margin-left: 8px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
}

.btn-send-comment i {
  font-size: 14px;
}
.btn-send-comment:hover {
  transform: scale(1.05);
}

.btn-send-comment:active {
  transform: scale(0.9);
}

.comment-avatar {
  width: 36px;
  height: 36px;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;

  border: 1px solid rgba(255, 200, 0, 0.4);
}

.comment-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 600;

  color: #111;
  background: linear-gradient(135deg, #f5c542, #d4a017);

  border: 1px solid rgba(255, 200, 0, 0.6);
}

.comment-item {
  gap: 10px;
  margin-bottom: 14px;
  animation: commentFadeIn 0.3s ease;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-user {
  font-weight: 600;
  font-size: 13px;
  color: #f5c542;
}

.comment-time {
  font-size: 11px;
  color: #888;
}

.comment-text {
  font-size: 13px;
  color: #ddd;
  margin-top: 2px;
  line-height: 1.4;
}
@keyframes commentFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #1a1a1a 25%,
    #2a2a2a 37%,
    #1a1a1a 63%
  );
  background-size: 400% 100%;
  animation: skeletonLoading 1.4s ease infinite;
  border-radius: 6px;
}

@keyframes skeletonLoading {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #1a1a1a 25%,
    rgba(212, 160, 23, 0.25) 40%,
    #1a1a1a 63%
  );
}

.skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.skeleton-name {
  width: 80px;
  height: 10px;
}

.skeleton-time {
  width: 40px;
  height: 8px;
}

.skeleton-text {
  width: 100%;
  height: 10px;
  margin-top: 6px;
}

.skeleton-text.short {
  width: 60%;
}

.comments-empty {
  text-align: center;
  margin-top: 40px;
  color: #888;
}

.empty-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.empty-text {
  font-size: 13px;
  opacity: 0.8;
}

.publication-text-wrapper {
  position: relative;
}

.publication-text {
  margin: 0;
  transition: all 0.25s ease;
}

/* colapsado */
.publication-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* expandido */
.publication-text.expanded {
  display: block;
}

/* boton ver más / menos */
.publication-toggle {
  display: block;
  text-align: right;
  margin-top: 2px;

  color: #aaa;
  cursor: pointer;

  background: transparent;
  border: none;
}

/* fade tipo IG */
.publication-text.collapsed::after {
   content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60%;
  height: 1.2em;

  pointer-events: none; /* 🔥 clave */
  z-index: 1;
}

@media (max-width: 576px) {

  .publication-text {

    font-size: 0.89rem;
    line-height: 1.35;

  }

}

.publication-toggle {
  position: relative;
  z-index: 2; /* 🔥 para que quede arriba del fade */
  background: transparent;
}
.hsb-text-hero h5 {
  font-style: italic;
}
.no-image .hsb-float-pill {
  transform: scale(0.7);
}

#commentInput {
  resize: none;
  overflow-y: auto;
  max-height: 96px; /* 4 líneas aprox */
  line-height: 1.4;
  transition: height 0.1s ease;
}

/* contenedor */
.comments-footer {
  display: flex;
  align-items: flex-end;
  gap: 8px;

  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* textarea */
#commentInput {
  flex: 1;

  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);

  color: #fff;
  border-radius: 18px;

  padding: 10px 14px;
  font-size: 14px;

  resize: none;
  outline: none;

  line-height: 1.4;
  max-height: 96px;

  overflow-y: auto;
}

/* placeholder */
#commentInput::placeholder {
  color: rgba(255,255,255,0.5);
}

/* botón */
.btn-send-comment {
  background: #ffc107;
  border: none;

  width: 38px;
  height: 38px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #000;
  font-size: 14px;

  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-send-comment:active {
  transform: scale(0.92);
}

#btnSendComment.loading {
  opacity: 0.6;
  pointer-events: none;
}

.btn-delete-publication {
  color: #ff6b6b !important;
}

.btn-delete-publication:hover {
  background: rgba(255, 107, 107, 0.15) !important;
}