/* ==========================================================================
   NEWS / ANNOUNCEMENT CARDS  (the sliding boxes under the "About us" text)
   --------------------------------------------------------------------------
   You never need to touch this file to add a card — cards are plain HTML
   blocks inside index.html. See README-changes.md.
   ========================================================================== */

.news {
  background-color: #f4f3ff;
  border-top: 1px solid #e3e0fb;
  border-bottom: 1px solid #e3e0fb;
  padding: 45px 0 55px;
}

.news-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Section heading + arrows ---------- */

.news-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.news-title {
  font-size: 26px;
  font-weight: 500;
  color: #2f3142;
  margin: 0;
  line-height: 1.2;
}

/* Short gradient rule under the heading — echoes the hero overlay. */
.news-title::after {
  content: "";
  display: block;
  width: 58px;
  height: 3px;
  margin-top: 10px;
  background-image: linear-gradient(90deg, #482ff7, #8a2f86);
}

.news-arrows {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.news-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid #c9c3f5;
  border-radius: 50%;
  background-color: #ffffff;
  color: #482ff7;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-arrow:hover:not(:disabled) {
  background-color: #482ff7;
  border-color: #482ff7;
  color: #ffffff;
}

.news-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.news-arrow:focus-visible {
  outline: 2px solid #482ff7;
  outline-offset: 2px;
}

/* ---------- The sliding track ---------- */

.news-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  /* hide the scrollbar, the arrows are the control */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.news-track::-webkit-scrollbar {
  display: none;
}

/* ---------- One card ---------- */

.news-card {
  flex: 0 0 calc((100% - 48px) / 3);   /* 3 cards visible on a wide screen */
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(43, 30, 107, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(43, 30, 107, 0.18);
}

/* Thin gradient strip at the top of every card. */
.news-card::before {
  content: "";
  display: block;
  height: 4px;
  background-image: linear-gradient(90deg, #482ff7, #8a2f86);
}

.news-media {
  display: block;
  height: 170px;
  background-color: #ffffff;
  overflow: hidden;
}

.news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* photographs fill the box */
  display: block;
}

/* Add class "news-media-logo" when the picture is a logo, so that it is
   shown whole instead of being cropped. */
.news-media-logo {
  background-color: #ffffff;
  padding: 18px;
}

.news-media-logo img {
  object-fit: contain;
}

.news-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 18px 20px 22px;
}

.news-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #8a2f86;
  background-color: #f6ecf6;
  border-radius: 3px;
  padding: 4px 9px;
  margin-bottom: 12px;
}

.news-card h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  color: #2f3142;
  margin: 0 0 10px;
}

.news-card p {
  font-size: 14.5px;
  line-height: 1.6;
  color: #55586b;
  margin: 0 0 16px;
}

.news-link {
  margin-top: auto;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 500;
  color: #482ff7;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.news-link:hover {
  border-bottom-color: #482ff7;
}

.news-link:focus-visible {
  outline: 2px solid #482ff7;
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .news-card {
    flex: 0 0 calc((100% - 24px) / 2);   /* 2 cards */
  }
}

@media (max-width: 700px) {
  .news {
    padding: 35px 0 40px;
  }
  .news-card {
    flex: 0 0 84%;                        /* 1 card, next one peeks in */
  }
  .news-title {
    font-size: 22px;
  }
  .news-media {
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-track {
    scroll-behavior: auto;
  }
  .news-card:hover {
    transform: none;
  }
}
