/* ============================================================
   NOTICIAS + EVENTOS
   ============================================================ */

/* ----- Layout general ----- */
.news-events {
    padding: 80px 0;
    background: #fff;
}

.news-events__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 65% 1px 35%;
    gap: 40px;
    align-items: start;
}

.news-events__title {
    font-size: 56px;
    line-height: 1;
    font-weight: 400;
    color: #434640;
    margin: 0 0 50px 0;
}

.news-events__divider {
    background: #e6e6e6;
    align-self: stretch;
}

.news-events__cta {
    margin-top: 34px;
}

/* ----- Grid y tarjetas de noticias ----- */
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
}

.news-card__media {
    display: block;
    overflow: hidden;
}

.news-card__img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    background: #f2f2f2;
}

.news-card__img--placeholder {
    height: 260px;
    background: linear-gradient(135deg, #f2f2f2, #e9e9e9);
}

.news-card__headline {
    display: block;
    margin-top: 22px;
    font-size: 25px;
    line-height: 1.15;
    font-weight: 400;
    color: #7ca230;
    text-decoration: none;
}

.news-card__headline:hover {
    text-decoration: none;
}

.news-card__subtitle {
    margin-top: 8px;
    color: #3b3b3b;
    font-size: 16px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__text {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

/* ----- Lista de eventos ----- */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #e6e6e6;
}

.event-item:first-child {
    padding-top: 0;
}

.event-item:hover .event-item__title {
    text-decoration: underline;
}

.event-item__date {
    width: 54px;
    flex: 0 0 52px;
    text-align: left;
}

.event-item__day {
    font-size: 38px;
    line-height: 0.88;
    font-weight: 700;
    color: #7ca230;
}

.event-item__month {
    margin-top: 2px;
    font-size: 9px;
    letter-spacing: 0.05em;
    color: #7ca230;
    text-transform: uppercase;
}

.event-item__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-item__meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
    line-height: 1.05;
}

.event-item__meta span + span::before {
    content: " • ";
    color: #bdbdbd;
}

.event-item__title {
    font-size: 16px;
    line-height: 1.15;
    color: #222;
}

/* ============================================
   FIX AGRESIVO - Stack-box carreras en tablet/móvil
   ============================================ */
@media (max-width: 991px){
  .stack-box .stack-item,
  .stack-box .stack-item-wrapper,
  .stack-box .container-fluid,
  .stack-box .row{
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Anula el ps-8/pe-8/xxl/xl/lg padding de la columna de contenido */
  .stack-box .stack-item-wrapper .col-lg-6,
  .stack-box .stack-item-wrapper [class*="col-lg"],
  .stack-box .stack-item-wrapper .col-lg-6.ps-8,
  .stack-box .stack-item-wrapper .col-lg-6.pe-8,
  .stack-box .stack-item-wrapper .col-lg-6[class*="ps-"],
  .stack-box .stack-item-wrapper .col-lg-6[class*="pe-"]{
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-top: 30px !important;
    padding-bottom: 30px !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    width: 100% !important;
  }

  .stack-box .stack-item-wrapper .col-lg-6 h1,
  .stack-box .stack-item-wrapper .col-lg-6 .text-dark-gray{
    font-size: 2rem !important;
    line-height: 1.1 !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .stack-box .stack-item-wrapper .col-lg-6 p{
    width: 100% !important;
    text-align:left!important;
  }

  /* Imagen de la carrera - altura fija en móvil */
  .stack-box .stack-item-wrapper .col-lg-6.cover-background{
    min-height: 250px !important;
    height: 250px !important;
  }
}

@media (max-width: 480px){
  .stack-box .stack-item-wrapper .col-lg-6 h1,
  .stack-box .stack-item-wrapper .col-lg-6 .text-dark-gray{
    font-size: 1.6rem !important;
  }

  .stack-box .stack-item-wrapper .col-lg-6,
  .stack-box .stack-item-wrapper [class*="col-lg"]{
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

/* ============================================
   FIX AGRESIVO - Noticias/Eventos full width
   ============================================ */
@media (max-width: 992px){
  section.news-events{
    width: 100% !important;
    max-width: 100% !important;
  }

  section.news-events .news-events__container{
    display: block !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
  }

  section.news-events .news-events__news,
  section.news-events .news-events__events,
  section.news-events .news-events__news.pe-8,
  section.news-events .news-events__events.ps-8{
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: none !important;
    float: none !important;
  }

  section.news-events .news-events__events{
    margin-top: 56px !important;
  }

  section.news-events .news-grid{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

@media (max-width: 576px){
  section.news-events .news-events__container{
    padding: 0 16px !important;
  }

  section.news-events .news-events__title{
    font-size: 32px !important;
  }
}

/* ============================================
   FIX - Stack-box no debe tapar noticias (hasta tablet)
   ============================================ */
@media (max-width: 991px){

  /* Anular altura inline del stack-box */
  section.stack-box,
  section.stack-box.forward,
  section.stack-box.z-index-99,
  section.stack-box[style*="height"]{
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    z-index: 1 !important;
    position: relative !important;
    overflow: visible !important;
  }

  /* Cada carrera como bloque normal, sin sticky/fixed */
  section.stack-box .stack-item,
  section.stack-box .stack-item[style*="height"],
  section.stack-box .stack-item-01,
  section.stack-box .stack-item-02,
  section.stack-box .stack-item-03,
  section.stack-box .stack-item-04,
  section.stack-box .stack-item-05,
  section.stack-box .stack-item-06{
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    will-change: auto !important;
  }

  section.stack-box .stack-box-contain,
  section.stack-box .stack-item-wrapper{
    height: auto !important;
    min-height: auto !important;
    position: relative !important;
    transform: none !important;
  }

  /* full-screen en carrera => altura auto, no 100vh */
  section.stack-box .full-screen,
  section.stack-box .stack-item .full-screen,
  section.stack-box .row.full-screen{
    height: auto !important;
    min-height: auto !important;
  }

  /* Noticias/Eventos con z-index para quedar siempre arriba */
  section.news-events{
    position: relative !important;
    z-index: 10 !important;
    clear: both !important;
    background: #fff !important;
    margin-top: 0 !important;
  }

  /* Asegura que después del stack-box no haya overflow raro */
  main.campus-home,
  main.campus-home > section{
    overflow: visible !important;
  }
}

/* Para pantallas muy pequeñas refuerza todo */
@media (max-width: 480px){
  section.stack-box,
  section.stack-box.forward,
  section.stack-box .stack-item{
    height: auto !important;
    min-height: auto !important;
    position: relative !important;
  }
}

/* ============================================
   FIX - Imagen de noticia sin recortarse raro
   ============================================ */
@media (max-width: 991px){
  section.news-events .news-card__img,
  section.news-events .news-card__img--placeholder{
    width: 100% !important;
    height: 320px !important;
    max-height: 320px !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
  }

  section.news-events .news-card__media{
    width: 100% !important;
    display: block !important;
    overflow: hidden !important;
  }
}

@media (max-width: 767px){
  section.news-events .news-card__img,
  section.news-events .news-card__img--placeholder{
    height: 240px !important;
    max-height: 240px !important;
  }
}

@media (max-width: 480px){
  section.news-events .news-card__img,
  section.news-events .news-card__img--placeholder{
    height: 200px !important;
    max-height: 200px !important;
  }
}
