/* =========================
   SECȚIUNE ANUNȚURI – HERO
   ========================= */
.news-homepage {
  background: linear-gradient(180deg, #538eff1f 0%, #538eff00 90%);
  padding: 80px 0 95px;
}

.news-homepage > .title {
  text-align: center;
  font-weight: 800;
  font-size: clamp(2.6rem, 4vw, 5.9rem);
  color: var(--color-primary);
  margin: 0 0 3.4rem;
  letter-spacing: -0.01em;
  width: 100%;
  float: left;
}

/* wrapperul generat de tine în PHP */
.news-homepage .news-homepage-slider {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
}

/* viewport-ul nostru – aici tăiem tot ce e în plus */
.news-homepage .news-shell {
  width: 100%;
  max-width: 1280px; /* doar ca să nu fugă prea mult */
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  padding-bottom: 60px;
}

/* banda cu carduri */
.news-homepage .news-track {
  --gap: 1.5rem;
  display: flex;
  gap: var(--gap);
  transition: transform 0.35s ease;
  will-change: transform;
}

/* ===== CARD ===== */
.news-homepage .news-track > section {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 119, 255, 0.08);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem;
  min-height: 138px;
  padding: 30px;
  border: 1px solid rgba(0, 119, 255, 0.03);
  /* lățimea o dăm din JS cu flex-basis, dar punem un fallback */
  flex: 0 0 410px;
}

/* data din stânga */
.news-homepage .news-track .timewrap {
  width: 70px;
}
.news-homepage .news-track .time {
  background: rgb(83 142 255 / 5%);
  border: 1px solid rgb(83 142 255 / 25%);
  border-radius: 14px;
  width: 70px;
  height: 72px;
  display: grid;
  place-items: center;
  text-align: center;
}
.news-homepage .news-track .time .icon {
  color: var(--color-secondary);
  font-size: 20px;
  margin-bottom: 2px;
  margin-top: 5px;
}
.news-homepage .news-track .time .day {
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--color-secondary);
  line-height: 1;
}
.news-homepage .news-track .time .month {
  text-transform: lowercase;
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-text);
  margin-bottom: 5px;
}

/* conținutul */
.news-homepage .news-track .title {
  margin: 0;
}
.news-homepage .news-track .title a {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.2;
  max-height: calc(5.5rem * 2.1);
  overflow: hidden;
  transition: all ease-in 0.3s;
}
.news-homepage .news-track .title a:hover {
  color: var(--color-primary);
  transition: all ease-in 0.3s;
}
.news-homepage .news-track .title a .icon {
  color: var(--color-primary);
  flex: 0 0 auto;
  font-size: 21px;
}

/* publicat */
.news-homepage .news-track .published {
  margin-top: 0.55rem;
  font-size: 1.2rem;
  color: rgba(12, 48, 91, 0.7);
}

/* ===== NAV ===== */
.news-homepage .navigation {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: -10px;
}
.news-homepage .navigation .nav-buttons {
  display: flex;
  gap: 0.75rem;
}
.news-homepage .navigation a {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid rgba(0, 119, 255, 0.08);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  box-shadow: 0 14px 24px rgb(83 142 255 / 20%);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-homepage .navigation a:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0, 119, 255, 0.28);
}
.news-homepage .navigation a.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  box-shadow: none;
}
.news-homepage .navigation .nav-progress {
  margin: 0;
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
}

/* CTA */
.news-homepage .news-cta-row {
  text-align: center;
  margin-top: 2.8rem;
}
.news-homepage .news-cta-row .buton-custom {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--color-secondary);
  color: #fff;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  font-size: 1.1em;
}
.news-homepage .news-cta-row .buton-custom:hover {
  background: var(--color-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .news-homepage .news-track > section {
    grid-template-columns: 60px 1fr;
    gap: 1rem;
  }
}
@media (max-width: 600px) {
  .news-homepage {
    padding: 65px 0 80px;
  }
  .news-homepage .news-homepage-slider {
    padding: 0 1rem;
  }
  .news-homepage .news-cta-row .buton-custom {
    font-size: 1.4rem;
  }
  .news-homepage .news-track .time {
    width: 45px;
    height: 70px;
  }
  .news-homepage .news-track .timewrap {
    width: 50px;
  }
  .news-homepage .news-track > section {
    grid-template-columns: 50px 1fr;
    gap: 1rem;
    min-height: 100px;
    padding: 20px 20px 0px 20px;
  }
  .news-homepage .news-shell {
    padding-bottom: 35px;
  }
}

@media (max-width: 460px) {
  .news-homepage .news-track .published {
    display: none;
  }
  .news-homepage .news-track .time .day {
    font-size: 1.8rem;
  }
  .news-homepage .news-track .time {
    width: 40px;
  }
  .news-homepage .news-track > section {
    grid-template-columns: 40px 1fr;
    gap: 0.2rem;
    padding: 20px;
  }
}
