/* ==========================================================================
   Newsroom — MBA ACT
   Archive listing + color-coded filter panel. Uses token `--tag-color` on
   individual checkbox rows and news-card tags (set inline by PHP/JS).
   ========================================================================== */

/* Newsroom archive removes the outer .site-main 64-px horizontal padding
   (and 1440 max-width) so the banner + breadcrumbs can be edge-to-edge.
   Same pattern as body.home in home.css. */
body.post-type-archive-mba_news .site-main {
  max-width: none;
  padding: 0;
}

.newsroom {
  max-width: 1440px;
  margin: 0 auto;
  padding: 112px 80px;             /* Figma desktop layout_3EE7LP */
}

/* Page header banner — Figma node 10541:10492 (desktop) / 10541:10277 (mobile).
   Full-width navy bg with absolute MBA logo watermark on the right. */
.newsroom__banner {
  position: relative;
  background-color: var(--color-navy); /* #0B1628 */
  height: 223px;                       /* Figma desktop fixed */
  overflow: hidden;
}

.newsroom__banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 78px 80px;                  /* Figma container x:83 y:78 → ~80/78 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 1;
}

.newsroom__title {
  margin: 0;
  font-size: 54px;                     /* Figma Heading/H1 desktop */
  font-weight: 700;                    /* 65 Bold */
  line-height: 1.1;                    /* 110% */
  letter-spacing: -0.01em;
  color: var(--color-white);
}

.newsroom__description {
  margin: 8px 0 0;
  color: var(--color-white-60);
  font-size: var(--text-md);
  max-width: 640px;
}

/* Watermark — MBA Logo Stacked white at 20% opacity (10% on mobile),
   positioned absolute at top-right per Figma. */
.newsroom__banner::after {
  content: "";
  position: absolute;
  top: -155px;                         /* Figma y:-155 */
  right: -41px;                        /* Figma x:1081 from 1440 → -41 from right */
  width: 405px;
  height: 405px;
  background-image: url('../images/mba-logo-stacked-white.svg');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.20;
  pointer-events: none;
  z-index: 0;
}

.newsroom__layout {
  display: grid;
  grid-template-columns: 273px 1fr;  /* Figma sidebar width */
  gap: 64px;                          /* Figma layout_5IY1XL gap */
  align-items: start;
}

/* --- Filter panel -------------------------------------------------------- */
.newsroom__filter-panel {
  background-color: rgba(230, 231, 233, 0.5);  /* Figma fill_ZS6HSW */
  border-radius: 4px;
  padding: 24px;                                /* Figma layout_X6J46U */
}

/* Filter heading "Media type" — Figma Text/Regular/Bold 16/700/150% black */
.newsroom__filter-heading {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #000000;
}

/* Filter footer — divider + "X of Y results" left + reset button right */
.newsroom__filter-divider {
  border: 0;
  border-top: 1px solid #CED0D4; /* Figma fill_DIR324 */
  margin: 16px 0 12px;
}

.newsroom__filter-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.newsroom__filter-results {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: #545B68; /* Figma fill_R38HY3 */
}

/* Reset button: 1px tangerine-light border, 4×8 padding, icon 14×14, tangerine text */
.newsroom__filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: none;
  border: 1px solid #FF934C;     /* Figma fill_9FBTWV */
  border-radius: 2px;
  color: var(--color-tangerine); /* #FF6600 */
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.newsroom__filter-reset:hover {
  background-color: var(--color-tangerine-lightest);
}

.newsroom__filter-reset .material-symbols-outlined {
  font-size: 14px;               /* Figma 14×14 filter_list_off */
  line-height: 1;
}

/* Per-row count text (right of label, before swatch) */
.newsroom__filter-count {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: #545B68;                /* Figma fill_R38HY3 */
  text-align: right;
}

.newsroom__filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Filter row — checkbox + label LEFT, swatch RIGHT (justify-between) per
   Figma layout_A5KIJM. Native checkbox styled to be 18×18 with 1px navy-light
   stroke, transparent fill, 1px radius. */
.newsroom__filter-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  padding: 8px 0;
}

.newsroom__filter-check:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

.newsroom__filter-check input[type="checkbox"] {
  width: 18px;                          /* Figma layout_T46PS6 */
  height: 18px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #545B68;
  border-radius: 1px;
  background-color: transparent;
  cursor: pointer;
}
.newsroom__filter-check input[type="checkbox"]:checked {
  background-color: var(--color-tangerine);
  border-color: var(--color-tangerine);
}
.newsroom__filter-check input[type="checkbox"]:checked::after {
  content: "✓";
  display: block;
  text-align: center;
  color: var(--color-white);
  font-size: 14px;
  line-height: 16px;
}

.newsroom__filter-swatch {
  display: inline-block;
  width: 8px;                           /* Figma layout_GO9F3V */
  height: 8px;
  border-radius: 999px;
  background-color: var(--tag-color, var(--color-neutral));
  flex-shrink: 0;
  order: 99;                            /* push to right edge */
}

.newsroom__filter-label {
  flex: 1;
  font-size: 16px;
  font-weight: 400;                     /* Figma Text/Regular/Normal */
  line-height: 1.5;
  color: var(--color-navy);
}

/* --- Mobile filter toggle ------------------------------------------------ */
.newsroom__filter-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-navy);
  color: var(--color-white);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  cursor: pointer;
}

/* --- Results grid -------------------------------------------------------- */
.newsroom__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;                            /* Figma layout_6GHVXH */
}

.newsroom__item {
  display: flex;
}

/* News card — Figma layout_30KDYU. Outer column with image (188 fixed),
   absolute tag overlay, content padding 24 / gap 24. */
.card--news {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: var(--color-white);
  border: 1px solid var(--color-navy-lightest);  /* #E6E7E9 */
  border-radius: 4px;
  box-shadow: 0px 3px 16px -4px rgba(0, 0, 0, 0.09);
  overflow: hidden;
  text-decoration: none;
}

.card--news .card__image {
  width: 100%;
  height: 188px;                       /* Figma layout_1JMEIG */
  position: relative;
  background-color: var(--color-navy-lightest);
}
.card--news .card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Dark-gradient overlay on the image so the absolute tag stays readable */
.card--news .card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 22, 40, 0.6) 0%, rgba(11, 22, 40, 0) 60%);
  pointer-events: none;
}

.card--news .card__content {
  display: flex;
  flex-direction: column;
  gap: 16px;                            /* Figma layout_XA6CDU */
  padding: 24px;                        /* Figma layout_YV2H3N */
}

/* Tag pill — absolute over image, square 4px radius, padding 4×8, not
   uppercase. Background per category via inline --tag-color. Text colour
   strategy: WHITE by default (catches dark + tangerine bgs), override to
   navy-darkest for the known light category colours. */
.newsroom__tag {
  position: absolute;
  top: 10px;
  left: 9px;
  z-index: 1;
  display: inline-block;
  padding: 4px 8px;
  background-color: var(--tag-color, var(--color-neutral));
  color: var(--color-white);           /* default: white text on dark/tangerine bgs */
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

/* Light-coloured category bgs need dark text — soft-green / light-blue /
   light-orange (peach) / accent-silver per the seeded palette. */
.newsroom__tag[style*="#81B9A2"],
.newsroom__tag[style*="#CBDAE6"],
.newsroom__tag[style*="#FFAD77"],
.newsroom__tag[style*="#EBEBEB"] {
  color: var(--color-navy-darkest);    /* #03060C */
}

.newsroom__empty {
  padding: var(--space-10);
  text-align: center;
  color: var(--color-neutral-dark);
}

/* --- Pagination — Figma layout_ORM4F5/C34TRS ---------------------------- */
.newsroom .navigation.pagination {
  display: flex;
  justify-content: center;
  padding: 9px 0;
  margin-top: 48px;                    /* Figma News Items Wrapper gap (48 between rows-block and pagination) */
}

.newsroom .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;            /* center cluster — Figma had space-between
                                         on 7 fixed children (315 px wide); with
                                         variable child count we use center+gap. */
  gap: 8px;
  padding: 3px 9px;
}

.newsroom .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 33px;                     /* Figma layout_TF2CVH 33×29 */
  height: 29px;
  padding: 0 6px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--color-navy);            /* Figma fill_AHOZKO #0B1628 */
  font-size: 16px;
  font-weight: 700;                    /* Figma Text/Regular/Bold (115:3272) */
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.newsroom .page-numbers.current {
  border-color: var(--color-tangerine); /* Figma fill_FJMHIL #FF6600 */
  color: var(--color-tangerine);
}

.newsroom .page-numbers:not(.current):hover {
  color: var(--color-tangerine-dark);
}

.newsroom .page-numbers.dots {
  border: 0;
}

.newsroom .page-numbers .material-symbols-outlined {
  font-size: 24px;                     /* Figma 24×24 chevron */
  line-height: 1;
}

/* Hide WP screen-reader heading "Posts pagination" */
.newsroom .navigation .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.card--news .card__date {
  color: #545B68;                      /* Figma fill_R38HY3 */
  font-size: 12px;
  font-weight: 400;                    /* Figma Text/Tiny/Normal */
  line-height: 1.3;
}

/* Title + excerpt sizes per Figma desktop Heading/H6 (20/700/130%/-1%) +
   Text/Small/Normal (14/400/140%). Mobile overrides title to 18 below. */
.card--news .card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-navy-darkest);    /* #03060C */
  margin: 0;
}
.card--news .card__excerpt {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-navy-darkest);
  margin: 0;
}

/* "Read more →" link-styled span at the bottom of each card. The outer
   <a class="card--news"> wraps the whole card so this is a span (HTML can't
   nest <a> in <a>), but visually identical to the Figma link button. */
.card--news .card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;                     /* small gap above */
  font-size: 14px;
  font-weight: 700;                    /* Figma Text/Small/Bold */
  line-height: 1.4;
  color: var(--color-navy);            /* Figma fill_AHOZKO #0B1628 */
  text-decoration: none;
  border-radius: 2px;
  align-self: flex-start;
}
.card--news:hover .card__readmore {
  color: var(--color-tangerine);
}
.card--news .card__readmore .material-symbols-outlined {
  font-size: 24px;                     /* Figma 24×24 arrow_right_alt */
  line-height: 1;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .newsroom__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Newsroom mobile — values from Figma node 10541:10285 (Section_Newsroom Body
     on the NEWSROOM // MOBILE artboard 10541:10274). */
  .newsroom__banner-inner {
    padding: 50px 20px;            /* Figma mobile layout_JUPQGV */
    min-height: 0;
  }
  .newsroom__title {
    font-size: 38px;               /* Figma mobile Heading/H1 */
  }
  .newsroom__banner::after {
    /* Mobile: watermark 247×247 @ opacity 0.10, abs at x:135 y:50 */
    top: 50px;
    right: -25px;                  /* x:135 from 402 → ~-25 from right */
    width: 247px;
    height: 247px;
    opacity: 0.10;
  }
  .newsroom {
    padding: 50px 20px;            /* Figma layout_MFL7LN */
    max-width: none;
  }
  .newsroom__layout {
    grid-template-columns: 1fr;
    gap: 16px;                     /* Figma Mobile Filter Panel ↔ Main */
  }
  /* Filters button: full-width 44px, white bg + navy 2px border + filter_list icon */
  .newsroom__filter-toggle {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    height: 44px;
    padding: 10px 24px;
    background-color: var(--color-white);
    color: var(--color-navy);
    border: 2px solid var(--color-navy);
    border-radius: 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    gap: 12px;
  }
  /* Filter panel: collapsed by default, opens inline below toggle.
     Figma: padding 16, radius 4, bg rgba(230,231,233,0.5). */
  .newsroom__filter-panel {
    display: none;
    padding: 16px;
    background-color: rgba(230, 231, 233, 0.5);
    border-radius: 4px;
  }
  .newsroom__filter-panel.is-open {
    display: block;
  }
  /* Each filter row: checkbox+label LEFT, swatch on RIGHT (justify-between).
     Figma swatch is 8×8 ellipse, sits to the right of the count text. */
  .newsroom__filter-check {
    justify-content: space-between;
    padding: 8px 0;
  }
  .newsroom__filter-label {
    flex: 1;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
  }
  .newsroom__filter-swatch {
    width: 8px;
    height: 8px;
    order: 99;                     /* push to right edge */
    border: 0;
  }
  /* Cards stack single column with 16 px gap */
  .newsroom__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* News card structure: full-width column, image fixed 241 px, tag pill
     positioned absolutely over the image (top-left). */
  .card--news {
    position: relative;
    display: block;
    background-color: var(--color-white);
    border: 1px solid var(--color-navy-lightest);
    border-radius: 4px;
    box-shadow: 0px 3px 16px -4px rgba(0, 0, 0, 0.09);
    overflow: hidden;
  }
  .card--news .card__image {
    height: 241px;
    aspect-ratio: auto;
    width: 100%;
  }
  .card--news .card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .card--news .card__content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;                      /* Figma layout_9VEQEX heading↔excerpt */
  }
  .card--news .newsroom__tag {
    position: absolute;
    top: 10px;
    left: 9px;
    z-index: 1;
    padding: 4px 8px;              /* Figma layout_KX3J59 */
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
    color: var(--color-navy);      /* default — overridden per tag bg by light/dark logic above */
  }
  .card--news .card__date {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    color: #545B68;                /* Figma fill_FUXUJV */
    order: -1;                     /* date sits ABOVE heading per Figma */
  }
  .card--news .card__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--color-navy-darkest); /* #03060C */
    margin: 0;
  }
  .card--news .card__excerpt {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-navy-darkest);
    margin: 0;
  }
}
