/* news-cards.css — Home page News & Events card grid.
   Replaces the plain bulleted .sx-tab-section__mini-list. Three image cards
   with category pill + date + title. Click opens a centered modal with the
   full event details. Vanilla port of a shadcn/framer-motion news-cards
   template, scoped under .sx-news to avoid touching any other section. */

.sx-news {
  padding-block: var(--space-section, var(--space-20));
  background: var(--color-cream-50);
}

.sx-news__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-12);
}

.sx-news__header .sx-eyebrow {
  margin-bottom: var(--space-3);
}

.sx-news__header .sx-display {
  margin: 0;
}

/* Decorative status-bar trio under the header, ported from the template.
   Pure visual rhythm — three thin gold lines with descending opacity/width. */
.sx-news__rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin-top: var(--space-6);
}
.sx-news__rules span {
  display: block;
  height: 2px;
  background: var(--color-gold, #F9BD3D);
  border-radius: 9999px;
}
.sx-news__rules span:nth-child(1) { width: 120px; opacity: 0.95; }
.sx-news__rules span:nth-child(2) { width: 80px;  opacity: 0.65; }
.sx-news__rules span:nth-child(3) { width: 40px;  opacity: 0.35; }

/* ----- Grid ----- */

.sx-news__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .sx-news__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

@media (min-width: 1024px) {
  .sx-news__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ----- Card ----- */

.sx-news-card {
  position: relative;
  background: #fff;
  border: 1px solid rgba(0, 22, 41, 0.10);
  border-radius: var(--radius-lg, 14px);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 22, 41, 0.06);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 320ms cubic-bezier(0.16, 1, 0.3, 1),
              border-color 320ms ease;
}

.sx-news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 36px rgba(0, 22, 41, 0.14);
  border-color: rgba(0, 22, 41, 0.18);
}

.sx-news-card__trigger {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.sx-news-card__trigger:focus-visible {
  outline: 3px solid var(--color-gold, #F9BD3D);
  outline-offset: 4px;
}

/* Image area */
.sx-news-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(0, 22, 41, 0.05);
}

.sx-news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sx-news-card:hover .sx-news-card__media img {
  transform: scale(1.05);
}

/* Bottom gradient so the category pill is always readable */
.sx-news-card__media::after {
  content: "";
  position: absolute;
  inset: 50% 0 0 0;
  background: linear-gradient(to top, rgba(0, 22, 41, 0.55), transparent);
  pointer-events: none;
}

.sx-news-card__category {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 1;
  padding: 6px 12px;
  background: var(--color-gold, #F9BD3D);
  color: var(--color-navy-900, #001629);
  font-family: var(--font-sans, "Barlow Semi Condensed", sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 22, 41, 0.18);
}

/* Card body */
.sx-news-card__body {
  padding: var(--space-6) var(--space-6) var(--space-8);
}

.sx-news-card__date {
  display: inline-block;
  font-family: var(--font-sans, "Barlow Semi Condensed", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-deep, #B48326);
  margin-bottom: var(--space-2);
}

.sx-news-card__title {
  font-family: var(--font-serif, "Source Serif 4", Georgia, serif);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-navy-900, #001629);
  margin: 0;
  transition: color 200ms ease;
}

.sx-news-card:hover .sx-news-card__title {
  color: var(--color-gold-deep, #B48326);
}

/* "See all Events" button row */
.sx-news__actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-12);
}

/* ===== Modal ===== */

.sx-news-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 0ms linear 280ms;
}

.sx-news-modal[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transition: opacity 280ms ease, visibility 0ms;
}

.sx-news-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 22, 41, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.sx-news-modal__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-cream-50, #FBF7EE);
  border: 1px solid rgba(0, 22, 41, 0.12);
  border-radius: var(--radius-xl, 18px);
  box-shadow: 0 32px 80px rgba(0, 22, 41, 0.35);
  transform: translateY(20px) scale(0.97);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sx-news-modal[data-open="true"] .sx-news-modal__panel {
  transform: translateY(0) scale(1);
}

.sx-news-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 22, 41, 0.12);
  border-radius: 9999px;
  cursor: pointer;
  color: var(--color-navy-900, #001629);
  transition: background-color 200ms ease, transform 200ms ease;
}

.sx-news-modal__close:hover {
  background: #fff;
  transform: scale(1.06);
}

.sx-news-modal__close svg {
  width: 18px;
  height: 18px;
}

.sx-news-modal__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0, 22, 41, 0.06);
}

.sx-news-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sx-news-modal__media::after {
  content: "";
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(to top, rgba(0, 22, 41, 0.6), transparent);
  pointer-events: none;
}

.sx-news-modal__category {
  position: absolute;
  bottom: 18px;
  left: 18px;
  z-index: 1;
  padding: 7px 14px;
  background: var(--color-gold, #F9BD3D);
  color: var(--color-navy-900, #001629);
  font-family: var(--font-sans, "Barlow Semi Condensed", sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
}

.sx-news-modal__body {
  padding: var(--space-8) var(--space-8) var(--space-10);
}

@media (min-width: 768px) {
  .sx-news-modal__body { padding: var(--space-10) var(--space-12); }
}

.sx-news-modal__date {
  font-family: var(--font-sans, "Barlow Semi Condensed", sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-deep, #B48326);
  margin: 0 0 var(--space-3);
}

.sx-news-modal__title {
  font-family: var(--font-serif, "Source Serif 4", Georgia, serif);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 600;
  line-height: 1.18;
  color: var(--color-navy-900, #001629);
  margin: 0 0 var(--space-6);
}

.sx-news-modal__lede {
  font-family: var(--font-serif, "Source Serif 4", Georgia, serif);
  font-size: 17px;
  line-height: 1.65;
  color: rgba(0, 22, 41, 0.78);
  margin: 0 0 var(--space-8);
}

.sx-news-modal__meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-6);
  row-gap: var(--space-3);
  padding: var(--space-6) 0 0;
  border-top: 1px solid rgba(0, 22, 41, 0.10);
  margin: 0;
}

.sx-news-modal__meta dt {
  font-family: var(--font-sans, "Barlow Semi Condensed", sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 22, 41, 0.55);
  align-self: center;
}

.sx-news-modal__meta dd {
  font-family: var(--font-serif, "Source Serif 4", Georgia, serif);
  font-size: 16px;
  color: var(--color-navy-900, #001629);
  margin: 0;
}

/* Lock background scroll while modal is open */
body.sx-news-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .sx-news-card,
  .sx-news-card__media img,
  .sx-news-card__title,
  .sx-news-modal,
  .sx-news-modal__panel,
  .sx-news-modal__close {
    transition: none !important;
  }
}
