/* Layout general portada */
.home { padding-top: 14px; padding-bottom: 30px; }

.home-hero-grid{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.hero-main-thumb img,
.hero-bulletin-thumb img{
  width:100%;
  height:auto;
  display:block;
  border-radius: 10px;
}

.hero-main-title{
  margin: 10px 0 0;
  font-size: 22px;
  line-height: 1.2;
  color: #111;
}

.hero-main-link{ text-decoration:none; color:inherit; }

.thumb-placeholder{
  width:100%;
  min-height: 240px;
  border-radius: 10px;
  background: #f1f1f1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#666;
  font-size:14px;
}
.thumb-placeholder.small{ min-height: 120px; }

.home-content{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  margin-top: 16px;
}

.section-title{
  margin: 12px 0 12px;
  font-size: 16px;
  letter-spacing: .5px;

}
.section-title-red{ color: #b3262e; }
.section-title-blue{ color: #1a5a8a; }

.latest-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.post-card-thumb img{
  width:100%;
  height:auto;
  display:block;
  border-radius: 12px;
}

.post-card-title{
  margin: 10px 0 6px;
  font-size: 14px;
}
.post-card-title a{
  text-decoration:none;
  color:#b3262e;
  font-weight:700;
}

.post-card-excerpt{
  font-size: 12.5px;
  color:#444;
}

.home-sidebar .recent-list{
  margin: 0 0 14px;
  padding-left: 18px;
}
.home-sidebar .recent-list a{
  text-decoration:none;
  color:#111;
}

.recent-cards{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
.recent-card img{
  width:100%;
  height:auto;
  display:block;
  border-radius: 14px;
}

/* Móvil: solo destacada (oculta el boletín como pediste) */
@media (max-width: 900px){
  .home-hero-grid{ grid-template-columns: 1fr; }
  .hero-bulletin{ display:none; }

  .home-content{ grid-template-columns: 1fr; }
  .latest-grid{ grid-template-columns: 1fr; }
}
.sidebar-banners{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.sidebar-banner img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}
/* HERO: recorte de imagen destacada */
.hero-main-thumb {
  height: 340px;          /* ajusta este valor a gusto: 260 / 300 / 340 */
  overflow: hidden;
  border-radius: 10px;
}

.hero-main-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* recorta sin deformar */
  display: block;
}
.hero-bulletin-thumb {
  height: 350px;          /* mismo alto que la destacada */
  overflow: hidden;
  border-radius: 10px;
}

.hero-bulletin-thumb img {
  width: 100%;
  height: 90%;
  object-fit: cover;
  display: block;
}

/* HERO overlay con degradado */
.hero-main-thumb {
  position: relative;
  height: 320px;        /* ajusta si quieres: 280 / 320 / 360 */
  overflow: hidden;
  border-radius: 12px;
}

.hero-main-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Degradado oscuro abajo */
.hero-main-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.65) 0%,
    rgba(0,0,0,0.25) 50%,
    rgba(0,0,0,0.0) 100%
  );
}

/* Título */
.hero-main-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  color: #fff;
  font-weight: 800;
  max-width: 90%;
}
@media (max-width: 900px) {
  .hero-main-thumb {
    height: 240px;
  }

  .hero-main-title {
    font-size: 18px;
  }
}

/* FIX: overlay del titulo hero (forzado) */
.hero-main-thumb { position: relative !important; }
.hero-main-overlay{
  position:absolute !important;
  left:0; right:0; bottom:0;
  padding:18px;
  z-index:5;
  background: linear-gradient(to top, rgba(0,0,0,.70), rgba(0,0,0,0));
}

.hero-main-title{
  margin:0 !important;
  color:#fff !important;
  font-weight:800 !important;
  font-size:24px;
  line-height:1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,.45);
}
/* --- Cards "Últimas Noticias" pro --- */
.latest-grid {
  align-items: stretch;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-card-thumb {
  display: block;
  border-radius: 14px;
  overflow: hidden;
}

/* Imagen consistente (recorta sin deformar) */
.post-card-thumb img {
  width: 100%;
  height: 170px;          /* ajusta: 160–190 */
  object-fit: cover;
  display: block;
  transition: transform .22s ease;
}

/* Cuerpo para alinear alturas */
.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Título */
.post-card-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.post-card-title a {
  color: #b3262e;
  text-decoration: none;
  font-weight: 800;
}

/* Extracto: mismas líneas (corte elegante) */
.post-card-excerpt {
  margin: 0;
  font-size: 12.5px;
  color: #444;

  display: -webkit-box;
  -webkit-line-clamp: 3;      /* 2 o 3 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.9em;          /* asegura altura pareja aprox */
}

/* Hover tipo magazine */
.post-card:hover .post-card-thumb img {
  transform: scale(1.03);
}

.post-card:hover .post-card-title a {
  text-decoration: underline;
}

/* Mobile */
@media (max-width: 900px) {
  .post-card-thumb img {
    height: 190px;
  }
}
.post-card-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-videos{
  margin-top: 20px;
  padding-bottom: 10px;
}

.videos-row{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}


.video-card{
  scroll-snap-align: start;
}

.video-thumb{
  display:block;
  border-radius: 14px;
  overflow:hidden;
}

.video-thumb img{
  width:100%;
  height: 120px;
  object-fit: cover;
  display:block;
}

.video-title{
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.video-title a{
  text-decoration:none;
  color:#111;
}
/* Sección Videos con fondo gris */
.home-videos{
  background: #f3f3f3;      /* gris suave editorial */
  padding: 24px 0;
  margin-top: 20px;
}

/* Para que el contenido no se vaya de lado a lado */
.home-videos > *{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}
/* === Últimas Noticias: 2 columnas en móvil === */
@media (max-width: 900px){

  .latest-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Ajustes visuales para cards pequeñas */
  .post-card-thumb img{
    height: 140px;
  }

  .post-card-title{
    font-size: 13px;
    line-height: 1.25;
  }

  .post-card-excerpt{
    font-size: 12px;
    display: none; /* opcional: oculta extracto en móvil */
  }
}
/* === MÓVIL: ocultar solo Entradas Recientes, dejar banners === */
@media (max-width: 900px){

  /* Oculta el título y la lista */
  .home-sidebar .section-title,
  .home-sidebar .recent-list{
    display: none;
  }

  /* Sidebar pasa a ancho completo */
  .home-sidebar{
    display: block;
    margin-top: 20px;
  }

  /* Banners bien presentados */
  .sidebar-banners{
    display: grid;
    gap: 14px;
  }

  .sidebar-banner img{
    width: 100%;
    height: auto;
  }

  /* Layout principal a una columna */
  .home-content{
    grid-template-columns: 1fr;
  }
}
/* === VIDEOS: 1 por pantalla (swipe) SOLO en móvil === */
@media (max-width: 900px){

  .home-videos .videos-row{
    display: flex !important;
    gap: 14px !important;

    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch;

    padding: 6px 16px 12px !important;
    margin: 0 px !important; /* para que llegue a bordes */
  }

  .home-videos .video-card{
    flex: 0 0 100% !important;      /* 100% si lo quieres full */
    scroll-snap-align: start !important;
  }

  .home-videos .video-thumb{
    display: block;
    overflow: hidden;
  }

  .home-videos .video-thumb img{
    width: 100% !important;
    height: 170px !important;
    object-fit: cover !important;
    display: block !important;
  }

  /* Ocultar scroll bar (opcional) */
  .home-videos .videos-row::-webkit-scrollbar{
    display: none;
  }
  .home-videos .videos-row{
    scrollbar-width: none;
  }
}
/* === MÓVIL: YulderyCriss / Empresas → 2x2 (ocultar el 5º) === */
@media (max-width: 900px){

  /* Grid 2 columnas */
  .home-strip .videos-row{
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Ocultar el 5º item */
  .home-strip .video-card:nth-child(5){
    display: none;
  }

  .home-strip .video-thumb img{
    height: 120px;
    object-fit: cover;
  }

  .home-strip .video-title{
    font-size: 13px;
  }
}
/* =========================
   CTA Leer más noticias
   ========================= */

.home-more {
  margin-top: 20px;
  text-align: center;
}

.home-more-link {
  display: inline-block;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  color: #b3262e;
  border: 2px solid #003366;
  border-radius: 999px;
  text-decoration: none;
  transition: all .2s ease;
}

.home-more-link:hover {
  background: #b3262e;
  color: #fff;
}
/* =========================
   DARK MODE: Secciones tipo strip (Videos / Yuldery / Empresas)
   ========================= */
html.dark .home-videos,
html.dark .home-strip{
  background: #111818;         /* fondo oscuro elegante */
  border: 1px solid #1f2a2a;   /* borde sutil */
}

/* Títulos y textos dentro */
html.dark .home-videos .section-title,
html.dark .home-strip .section-title{
  color: #ffffff;
}

html.dark .video-title a{
  color: #e9f0f0;
}

html.dark .video-title a:hover{
  color: #2ecc71;
}

/* Si los títulos están en h4 sin link directo */
html.dark .video-title{
  color: #e9f0f0;
}

/* Placeholder si no hay imagen */
html.dark .thumb-placeholder{
  background: #0f1414;
  border-color: #233030;
  color: #cfe0e0;
}

/* Botón "Ver más" en dark */
html.dark .home-more-link{
  border-color: #2ecc71;
  color: #e9f0f0;
}

html.dark .home-more-link:hover{
  background: #2ecc71;
  color: #0b0f0f;
}

/* =========================
   SECCIONES (SIDEBAR)
   ========================= */

.home-sections {
  margin-top: 20px;
}

.home-sections .section-title {
  margin-bottom: 12px;
}

.sections-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sections-list li {
  margin-bottom: 8px;
}

.sections-list a {
  color: #111;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

/* línea inferior animada */
.sections-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #b3262e; /* rojo RedExpertos */
  transition: width 0.25s ease;
}

.sections-list a:hover::after {
  width: 100%;
}

/* Dark mode */
html.dark .sections-list a {
  color: #eaeaea;
}

html.dark .sections-list a::after {
  background: #2ecc71;
}
/* =========================
   AJUSTE FINO – SECCIONES SIDEBAR
   ========================= */

.home-sections {
  margin-top: 24px;       /* separación respecto al banner */
  padding-left: 12px;     /* aire respecto al borde */
  padding-right: 12px;
}

/* Título */
.home-sections .section-title {
  margin-bottom: 10px;
}

/* Lista */
.sections-list {
  margin: 0;
  padding: 0;
}

/* Ítems más compactos */
.sections-list li {
  margin-bottom: 4px;     /* ↓ antes estaba muy alto */
  line-height: 1.35;      /* interlineado más editorial */
}

/* Links */
.sections-list a {
  font-size: 13.5px;      /* un pelín más fino */
  font-weight: 500;
  letter-spacing: 0.2px;
}/* =========================
   ÚLTIMAS NOTICIAS – AJUSTE MÓVIL
   Desktop: 9 | Móvil: 4
   ========================= */
@media (max-width: 768px) {
  .latest-grid .post-card:nth-child(n+5) {
    display: none;
  }
}

/* =========================
   SECCIONES (MANUAL) – SIDEBAR
   OJO: tu HTML usa .home-sections-manual
   ========================= */
.home-sections-manual{
  margin-top: 24px;
  padding: 0 12px;
}

.home-sections-manual .section-title{
  margin-bottom: 10px;
}

/* Lista */
.home-sections-manual .sections-manual-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.home-sections-manual .sections-manual-list li{
  margin-bottom: 4px;
  line-height: 1.35;
}

/* Links: rojo, sin línea. Línea aparece solo en hover */
.home-sections-manual .sections-manual-list a{
  color: #b3262e;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  display: inline-block;
  padding-bottom: 2px;
}

.home-sections-manual .sections-manual-list a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0;
  height:2px;
  background:#b3262e;
  transition: width .25s ease;
}

.home-sections-manual .sections-manual-list a:hover::after{
  width:100%;
}

/* Dark */
html.dark .home-sections-manual .sections-manual-list a{
  color:#eaeaea;
}

html.dark .home-sections-manual .sections-manual-list a::after{
  background:#2ecc71;
}

/* =========================
   TÍTULOS DE STRIPS COMO LINK (Yulder/Empresas/etc)
   Rojo sin línea, línea solo hover
   ========================= */
.home-strip .section-title a{
  color:#b3262e !important;
  text-decoration:none !important;
  position:relative;
  display:inline-block;
  padding-bottom: 2px;
}

.home-strip .section-title a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0;
  height:2px;
  background:#b3262e;
  transition: width .25s ease;
}

.home-strip .section-title a:hover::after{
  width:100%;
}
/* ===== FIX SOLO PARA EL TÍTULO "VIDEOS" ===== */
.home-videos .section-title.section-link a{
  position: relative !important;
  display: inline-block !important;
  padding-bottom: 4px !important;
  text-decoration: none !important;
  color: #b3262e !important;
}

.home-videos .section-title.section-link a::after{
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 0 !important;
  height: 2px !important;
  background: #b3262e !important;
  transition: width .25s ease !important;
}

.home-videos .section-title.section-link a:hover::after{
  width: 100% !important;
}

/* dark */
html.dark .home-videos .section-title.section-link a{
  color: #fff !important;
}
html.dark .home-videos .section-title.section-link a::after{
  background: #2ecc71 !important;
}


/* =========================
   HERO SLIDER
   ========================= */
.hero-slider{
  position: relative;
  border-radius: 12px;
  overflow: hidden; /* recorta flechas y slides */
}

.hero-slider-track{
  display: flex;
  transition: transform .35s ease;
  will-change: transform;
}

.hero-slide{
  min-width: 100%;
}

/* Flechas */
.hero-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 5;
}

.hero-prev{ left: 12px; }
.hero-next{ right: 12px; }

.hero-arrow:hover{
  background: rgba(0,0,0,.50);
}

/* Dots */
.hero-dots{
  position: absolute;
  left: 0; right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 6;
}

.hero-dot{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.45);
  cursor: pointer;
}

.hero-dot.is-active{
  background: rgba(255,255,255,.95);
}

/* En móvil: flechas más discretas */
@media (max-width: 900px){
  .hero-arrow{
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
}
/* =========================
   SHORTS (cards verticales)
   ========================= */

.shorts-row{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

/* card un poquito más angosta */
.shorts-row .video-card{
  max-width: 180px;
}

/* thumb vertical 9:16 */
.shorts-row .video-thumb{
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
}

/* imagen ocupa el contenedor sin deformarse */
.shorts-row .video-thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

