/** FONTS **/

:root {
  --bs-font-sans-serif: 'Gilmer-Regular', Helvetica, sans-serif;
}

/** COLOURS **/

/* Primary brand background colours */
.bg-cai-vibrant-purple {
  background-color: #6c18eb;
}
.bg-cai-electric-blue {
  background-color: #001aeb;
}

/* Secondary brand background colours */
.bg-cai-deep-navy {
  background-color: #090737;
}
.bg-cai-deep-purple {
  background-color: #391099;
}
.bg-cai-light-purple {
  background-color: #9674ec;
}
.bg-cai-white {
  background-color: #ffffff;
}

/** HOMEPAGE **/

/* Custom CSS for the Jumbotron */
.jumbotron-full-bg {
  background-image: url("/images/bg-jumbotron.jpg");

  /* Full height */
  min-height: 720px;

  /* Create the parallax scrolling effect */
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;

  /* Needed for the overlay */
  position: relative;
}

/* Member logo tiles */
.member-tile {
  border: 1px solid #ececf3;
  box-shadow: 0 6px 20px rgba(9, 7, 55, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.member-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(9, 7, 55, 0.14);
}

/* Black overlay for better text readability */
.jumbotron-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2); /* 20% black overlay */
  z-index: 1;
}

/* Position content above the overlay */
.jumbotron-content {
  position: relative;
  z-index: 2;
}

.feature-icon {
  font-size: 3rem;
  color: #001aeb;
}

/* Silver gradient overlay on the ecosystem icon (uses the SVG as a mask) */
.ecosystem-icon {
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    135deg,
    #fafbfc 0%,
    #c7ccd1 22%,
    #eef0f2 42%,
    #aab0b6 58%,
    #d8dbde 76%,
    #898f95 100%
  );
  -webkit-mask: url("/images/icon_white.svg") center / contain no-repeat;
  mask: url("/images/icon_white.svg") center / contain no-repeat;
}

/** NEWS CARDS (homepage) **/

.news-section {
}

.news-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.news-section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6c18eb;
  margin-bottom: 0.5rem;
}

.news-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: calc(3 * 280px + 2 * 1.5rem); /* cap at 3-column width */
  margin-inline: auto;
}


.news-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  border-color: rgba(108, 24, 235, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  color: inherit;
  text-decoration: none;
}

.news-card-img {
  height: 160px;
  background: linear-gradient(135deg, rgba(108, 24, 235, 0.07) 0%, rgba(0, 26, 235, 0.05) 100%);
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.news-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6c18eb;
  background: rgba(108, 24, 235, 0.07);
  border: 1px solid rgba(108, 24, 235, 0.15);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}

.news-date {
  font-size: 0.75rem;
  color: #666;
}

.news-card h3 {
  font-size: 1.05rem;
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 0.625rem;
  line-height: 1.3;
}

.news-card p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 0;
}

.news-card-arrow {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6c18eb;
  letter-spacing: 0.02em;
  transition: gap 0.2s ease;
}

.news-card:hover .news-card-arrow {
  gap: 0.7rem;
}


/** NAVIGATION **/

@media (min-width: 992px) {
  .navbar .nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
  }
}

/** PROGRAMMES **/

/* Monochrome image underlay behind a programme card.
   Add the .programme-card-underlay class to a card and set the image via the
   --underlay-image custom property, e.g.
     style="--underlay-image: url('/images/servers.jpg');"
   Optionally tune --underlay-opacity (default 0.18) to make it more/less prominent. */
.programme-card-underlay {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.programme-card-underlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--underlay-image);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) brightness(0.55);
  opacity: var(--underlay-opacity, 0.18);
}

.programme-card-underlay > .card-body {
  position: relative;
  z-index: 1;
}

.card-clickable {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(108, 24, 235, 0.4);
}

/** CAREERS **/

/* Icon badge sitting at the top of each opportunity card */
.careers-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.5rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
}

/** NEWS / BLOG **/

.medium-container {
  max-width: 800px;
  margin: 40px auto;
}

.medium-post {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fff;
  transition: box-shadow 0.2s ease;
}

.medium-post:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.medium-post h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  color: #222;
}

.medium-post a {
  text-decoration: none;
  color: #222;
}

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

.medium-post .date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.medium-post .excerpt {
  color: #444;
  line-height: 1.5;
  font-size: 1rem;
}
