:root{
  --accent:#a41519;
  --white:#ffffff;
  --dark:#111827;
  --muted:#6b7280;
  --radius:18px;
}

body{ background:var(--white); color:var(--dark); }

.navbar-brand{ color:var(--accent) !important; }
.nav-link{ color:var(--dark) !important; }
.nav-link:hover{ color:var(--accent) !important; }

.section-title{ font-weight:900; letter-spacing:.2px; }

.card-soft{
  border:1px solid rgba(17,24,39,.10);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 12px 34px rgba(17,24,39,.06);
  background:var(--white);
}

.btn-accent{
  background: var(--accent) !important;
  color: var(--white) !important;
  border:none !important;
}
.btn-accent:hover{ filter:brightness(.96); }

.post-meta{
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .12em;
  color: var(--muted);
}

.feature-title{
  font-size: clamp(1.6rem, 2.4vw, 2.8rem);
  line-height: 1.05;
  font-weight: 900;
}

.trending-item{
  padding: 14px 12px;
  border-bottom: 1px solid rgba(17,24,39,.08);
}
.trending-item:last-child{ border-bottom: none; }

.media-tile{
  border:1px solid rgba(17,24,39,.10);
  border-radius:18px;
  padding: 14px;
  background:#fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.media-tile:hover{
  transform: translateY(-4px);
  box-shadow:0 18px 34px rgba(17,24,39,.10);
}

.thumb{
  height:160px;
  background:#f3f4f6;
  border-radius:14px;
  overflow:hidden;
}
.thumb img{ width:100%; height:100%; object-fit:cover; display:block; }

/* === YouTube-like media cards Nw === */
.media-tile.yt {
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 16px;
  background: #fff;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: left;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.media-tile.yt:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17, 24, 39, .10);
  border-color: rgba(17, 24, 39, .16);
}

.media-tile.yt:active { transform: translateY(0); }

.media-tile.yt:focus-visible {
  outline: 3px solid rgba(164, 21, 25, .25);
  outline-offset: 2px;
}

/* Thumb 16:9 real tipo YouTube */
.yt-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f3f4f6;
  overflow: hidden;
  position: relative;
}

.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* llena 16:9 sin deformar */
  display: block;
}

/* Placeholder si no hay thumbnail */
.yt-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,0));
  pointer-events: none;
}

/* Cuerpo */
.yt-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 86px; /* ayuda a simetría */
}

.yt-title {
  font-weight: 700;
  color: #111827;
  line-height: 1.25;
  font-size: .98rem;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;  /* 2 líneas como YouTube */
  overflow: hidden;
}

.yt-meta {
  color: #6b7280;
  font-size: .85rem;
  line-height: 1.2;
}

/* Para que TODAS las cards del grid se estiren igual en la fila */
.row.g-3 > [class*="col-"] { display: flex; }
.row.g-3 > [class*="col-"] > .media-tile { width: 100%; }

/* Toast */

/* Toast rojo ISEF */
.toast-new-content {
  background: #a41519 !important;
  color: #ffffff !important;
  border: 0 !important;
}

/* Header del toast */
.toast-new-content .toast-header {
  background: #a41519 !important;
  color: #ffffff !important;
  border-bottom: 1px solid rgba(255,255,255,.18) !important;
}

/* Texto muted dentro del toast */
.toast-new-content .text-muted,
.toast-new-content small {
  color: rgba(255,255,255,.85) !important;
}

/* Botón cerrar (la X) en blanco */
.toast-new-content .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 1;
}

/* Botones dentro del toast (si quieres que se integren) */
.toast-new-content .btn-danger {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #a41519 !important;
}
.toast-new-content .btn-outline-secondary {
  border-color: rgba(255,255,255,.7) !important;
  color: #ffffff !important;
}
.toast-new-content .btn-outline-secondary:hover {
  background: rgba(255,255,255,.12) !important;
}