/* =========================================================
   NEWS PAGE
   Matches theme used on Events/Home
========================================================= */

.page-content {
  padding-bottom: 2.25rem;
}

/* Buttons (safe local fallback if needed) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1;
}

.btn-primary {
  background: #23407c;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(35, 64, 124, 0.22);
}

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn.primary {
  background: #23407c;
  color: #ffffff;
}

.btn.primary:hover {
  filter: brightness(0.95);
}

.btn.secondary {
  background: #ffffff;
  color: #23407c;
  border-color: #cdd6ea;
}

.btn.secondary:hover {
  background: #f2f5fb;
}

/* HERO */
.page-hero {
  padding: 2rem 0 1.25rem;
  background: #f3f5f9;
  border-bottom: 1px solid #e7e7e7;
}

.hero-inner {
  max-width: 80ch;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  opacity: 0.8;
  color: #23407c;
}

.page-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  line-height: 1.15;
  color: #091024;
}

.herop {
  margin: 0 0 1.15rem;
  line-height: 1.65;
  color: #4c556a;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* SECTION */
.section {
  padding: 1.5rem 0;
}

.section-head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.section-title {
  margin: 0;
  font-size: 1.35rem;
  color: #091024;
}

.section-subtitle {
  margin: 0;
  color: #4c556a;
  line-height: 1.6;
  max-width: 90ch;
}

/* NEWS GRID */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.news-card {
  background: #ffffff;
  border: 1px solid #e7e7e7;
  box-shadow: 0 10px 30px rgba(10, 20, 40, 0.06);
  border-radius: 16px;
}

.news-card-inner {
  padding: 1.1rem 1.1rem 1.2rem;
  display: grid;
  gap: 0.75rem;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: #6b7488;
  font-size: 0.9rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #23407c;
  background: rgba(35, 64, 124, 0.08);
  border: 1px solid rgba(35, 64, 124, 0.14);
}

.meta-dot {
  opacity: 0.7;
}

.meta-author {
  color: #6b7488;
}

.news-title {
  margin: 0;
  color: #091024;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.news-excerpt {
  margin: 0;
  color: #39455f;
  line-height: 1.65;
}

.news-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.2rem;
}

/* =========================================================
   MEDIA RELEASE
========================================================= */

.media-release {
  padding: 2.25rem 0 2.5rem;
  background: #ffffff;
  border-top: 1px solid #e7e7e7;
}

.media-release-head h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  color: #091024;
}

/* NEW: grid wrapper for 3-up layout */
.media-release-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

/* Card becomes vertical (video top, content bottom) */
.media-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(10, 20, 40, 0.06);
  overflow: hidden;
  height: 100%;
}

/* Responsive video wrapper */
.media-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}

.media-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Content */
.media-content {
  padding: 1.15rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1; /* helps align button to bottom */
}

.media-content h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #091024;
  line-height: 1.3;
}

.media-content p {
  margin: 0;
  line-height: 1.65;
  color: #3a445c;
  max-width: 65ch;

  /* optional: keeps cards from becoming wildly different heights */
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* push the button to bottom for consistent card height */
.media-content .btn {
  margin-top: auto;
}

/* =========================================================
   MEDIA RELEASE — RESPONSIVE
========================================================= */

/* 2 across on tablets */
@media (max-width: 1000px) {
  .media-release-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 1 across on phones */
@media (max-width: 650px) {
  .media-release-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .media-content {
    padding: 1rem;
  }

  .media-release-head h2 {
    font-size: 1.35rem;
  }
}

/* =========================================================
   MEDIA RELEASE — ACTIONS
========================================================= */

.media-actions {
  margin-top: auto;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* A subtle secondary button style that fits your scheme */
.btn.btn-ghost {
  background: transparent;
  border: 1px solid #e7e7e7;
  color: #091024;
}

.btn.btn-ghost:hover {
  background: #f6f7fb;
}

/* =========================================================
   MEDIA MODAL
========================================================= */

.media-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.media-modal.is-open {
  display: block;
}

.media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 16, 36, 0.55);
}

.media-modal-panel {
  position: relative;
  width: min(720px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e7e7e7;
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(10, 20, 40, 0.18);
  margin: 1rem auto;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
}

.media-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e7e7e7;
}

.media-modal-header h3 {
  margin: 0;
  color: #091024;
  font-size: 1.1rem;
  line-height: 1.35;
}

.media-modal-close {
  border: 1px solid #e7e7e7;
  background: #ffffff;
  color: #091024;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.media-modal-close:hover {
  background: #f6f7fb;
}

.media-modal-body {
  padding: 1rem 1.1rem;
  overflow: auto;
  color: #3a445c;
  line-height: 1.7;
}

.media-modal-footer {
  padding: 1rem 1.1rem;
  border-top: 1px solid #e7e7e7;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* --- Modal footer buttons: force consistent button styling --- */
.media-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Make BOTH <a> and <button> with .btn look identical in the modal */
.media-modal-footer a.btn,
.media-modal-footer button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* These make it look like your real buttons even if global .btn isn't hitting */
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;     /* kills underline */
  cursor: pointer;
  white-space: nowrap;

  /* prevent weird default button rendering on some browsers */
  -webkit-appearance: none;
  appearance: none;
}

.media-modal-footer a.btn-primary,
.media-modal-footer a.btn-primary:visited,
.media-modal-footer a.btn-primary:hover,
.media-modal-footer a.btn-primary:active {
  color: #ffffff;
}


/* Ensure primary looks like a primary button even if <a> */
.media-modal-footer a.btn-primary,
.media-modal-footer button.btn-primary {
  color: #ffffff;
}

/* Ghost button should also look consistent */
.media-modal-footer a.btn-ghost,
.media-modal-footer button.btn-ghost {
  background: transparent;
  border: 1px solid #e7e7e7;
  color: #000000;
}

.media-modal-footer a.btn-ghost:hover,
.media-modal-footer button.btn-ghost:hover {
  background: #f6f7fb;
}




/* Prevent background scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

@media (max-width: 650px) {
  .media-modal-panel {
    width: calc(100% - 1.25rem);
  }

  .media-modal-footer {
    justify-content: stretch;
  }

  .media-modal-footer .btn {
    width: 100%;
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 980px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .media-card-inner {
    grid-template-columns: 1fr;
  }

  .media-embed {
    border-left: none;
    border-top: 1px solid #e7e7e7;
  }
}

@media (max-width: 520px) {
  .news-card-inner,
  .media-copy {
    padding: 0.95rem;
  }
}
