/* ============================================
   НЦКІ — Main stylesheet
   Light theme by design (no dark-mode override).
   Per-tile colors are configurable via CSS custom properties
   on each tile element (--tile-bg, --tile-text).
   ============================================ */

/* ---- Self-hosted Montserrat (cyrillic + latin) ---- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../assets/fonts/montserrat-cyrillic-ext.woff2") format("woff2");
  unicode-range:
    U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../assets/fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../../assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* ---- Cross-document View Transitions ---- */
@view-transition {
  navigation: auto;
}

::view-transition-group(*) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Design tokens ---- */
:root {
  /* Type — `100%` honours the user-agent default and any user-set base
     font-size. Don't pin to 16px; that breaks browser font-size preferences. */
  font-size: 100%;
  line-height: 1.5;

  /* Brand */
  --c-brand: #3a7bd5;
  --c-brand-hover: #2e6bc4;
  --c-brand-rgb: 58, 123, 213;

  /* Text */
  --c-text-strong: #2a2a2a;
  --c-text-body: #444;
  --c-text-secondary: #555;
  --c-text-soft: #666;
  --c-text-muted: #767676; /* AA on white (was #999, 2.85:1 → fail) */
  --c-text-muted-2: #717171; /* AA on white (was #888, 3.54:1 → fail) */

  /* Backgrounds and surfaces */
  --c-bg-page: #f0efed;
  --c-bg-soft: #f8f7f5;
  --c-surface: #fff;

  /* Borders */
  --c-border: #e0ddd8;

  /* Radii */
  --r-lg: 20px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-xs: 10px;

  /* Reusable transitions */
  --transition-card: transform 0.2s ease, box-shadow 0.2s ease;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", "Arial", sans-serif;
  background-color: var(--c-bg-page);
  margin: 0;
  padding: 20px;
  /* Default: subpages flow naturally and scroll. Homepage opts into the
     fixed-viewport tile grid below via the WP-supplied .home class. */
}

/* Homepage: fixed-viewport tile grid that fills the dynamic viewport. */
body.home {
  /* dvh follows the dynamic viewport (no Safari URL-bar jitter); vh is a fallback. */
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.grid-container,
.news-grid,
.projects-grid,
.grants-grid,
.learning-grid,
.partners-grid,
.calendar-grid {
  flex: 1;
  min-height: 0;
}

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

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr 1fr 1fr;
  grid-template-areas:
    "news      news      grants    calendar"
    "news      news      grants    calendar"
    "projects  training  partners  about"
    "projects  training  partners  about";
  gap: 14px;
  width: 100%;
}

/* ---- Base Tile ---- */

.tile {
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  padding: 24px;
  /* Per-section brand-pattern overlays (Патерни.pdf). Concrete pattern URL
     is supplied per tile via class/style-selector rules below — this gives
     every section its own visual identity on top of the unified navy fill.
     The pattern stays under the news-image (.news-preview-image covers it
     via inset:0) and under .nav-tile::after corner sheen. */
  background-repeat: repeat;
  background-size: 480px 480px;
}

/* ---- Navigation Tile ---- */

.nav-tile {
  background-color: var(--tile-bg);
  color: var(--tile-text);
  text-decoration: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition-card);
  cursor: pointer;
}

.nav-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.12) 100%
  );
  pointer-events: none;
}

.nav-tile:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-tile:active {
  transform: scale(0.99);
}

/* ---- Tile Label ---- */

.tile-label {
  font-weight: 800;
  font-size: 1.3rem;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Bottom-aligned text for specific tiles */
.tile-align-bottom {
  align-items: flex-end;
  justify-content: flex-start;
}

.tile-align-bottom .tile-label {
  text-align: left;
}

/* ---- Site Header Bar ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.site-header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.site-header-logo-mark {
  height: 44px;
  width: auto;
  display: block;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.site-header-logo:hover .site-header-logo-mark {
  opacity: 0.85;
}

.site-header-name {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #212168;
  line-height: 1.25;
}

.site-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #ccc;
  border-radius: var(--r-lg);
  padding: 7px 14px;
  width: 33vw;
  min-width: 160px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.search-bar:focus-within {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 2px rgba(var(--c-brand-rgb), 0.2);
}

.search-icon {
  color: var(--c-text-muted);
  flex-shrink: 0;
}

.search-input {
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.75rem;
  width: 100%;
  background: transparent;
}

.social-icons {
  display: flex;
  gap: 6px;
}

.social-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  overflow: hidden;
  transition:
    opacity 0.2s,
    transform 0.15s;
}

.social-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.social-icon:hover {
  opacity: 0.85;
  transform: scale(1.1);
}

/* ---- News Tile (special) ---- */

.news-tile {
  grid-area: news;
  background-color: var(--tile-bg);
  color: var(--tile-text);
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  transition: var(--transition-card);
  cursor: pointer;
}

/* Dark image overlay — only on index page carousel */
.grid-container .news-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    transparent 30%,
    transparent 40%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.news-tile:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-tile:active {
  transform: scale(0.99);
}

/* Stretched link covering the entire tile */
.tile-link {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.news-label {
  text-align: left;
  font-size: 1.5rem;
  position: absolute;
  top: 20px;
  left: 24px;
  z-index: 2;
  pointer-events: none;
}

.news-arrows {
  display: flex;
  gap: 12px;
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
}

.arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.arrow-btn:hover {
  background-color: rgba(0, 0, 0, 0.4);
  border-color: #fff;
}

.arrow-btn:active {
  background-color: rgba(0, 0, 0, 0.5);
}

.arrow-btn:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* `.arrow-btn` sets display:flex, which overrides the user-agent rule
   for [hidden]. Restore display:none when the JS toggles hidden so the
   single-post / empty-state arrows actually disappear. */
.arrow-btn[hidden] {
  display: none;
}

/* News preview image — fills entire tile as background */
.news-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  pointer-events: none;
  border-radius: 0;
  margin: 0;
}

/* News preview — text overlay at bottom */
.news-preview {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.news-preview-date {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 6px;
}

.news-preview-title {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-preview-body {
  display: none;
}

/* Empty-state placeholder shown server-side when zero news posts exist —
   mirrors .news-preview positioning so the tile reads as intentionally
   quiet rather than broken. */
.news-empty {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  padding: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.95;
  pointer-events: none;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* News-tile image-overlay text — white with a soft shadow so date / title
   stay legible on top of arbitrary photo content. Independent from
   --tile-text, which controls the empty-state placeholder colour. */
.news-tile .news-preview {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* White tile-labels on the warm-gold tiles (news, projects, learning)
   benefit from a soft dark text-shadow so they read clearly against
   the warm fills — applies to the homepage tiles, subpage sidebar
   tiles, and the mini-tile nav strip across all pages. */
body.home .tile[style*="grid-area: projects"] .tile-label,
body.home .tile[style*="grid-area: training"] .tile-label,
.news-tile .news-label,
.projects-tile .tile-label,
.learning-tile .tile-label,
.mini-tile[style*="news-tile"] .tile-label,
.mini-tile[style*="projects-tile"] .tile-label,
.mini-tile[style*="training-tile"] .tile-label {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* About tile now behaves like every other nav-tile — its background comes
   from the per-tile --tile-bg inline custom property set in front-page.php. */
.about-tile {
  background-color: var(--tile-bg);
  color: var(--tile-text);
}

/* ============================================
   Subpage Layout (News, Projects, etc.)
   ============================================ */

.news-page .news-grid,
.projects-page .projects-grid,
.grants-page .grants-grid,
.learning-page .learning-grid,
.partners-page .partners-grid,
.calendar-page .calendar-grid,
.about-page .about-grid,
.search-page .news-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "top-tiles"
    "sidebar"
    "content";
  gap: 14px;
  width: 100%;
  height: auto;
}

/* Top tile strip */
.top-tiles {
  grid-area: top-tiles;
  display: flex;
  gap: 8px;
}

.mini-tile {
  flex: 1;
  min-width: 0;
  background-color: var(--tile-bg);
  /* Per-section pattern is set by section-specific rules below; here we
     only declare repeat & sizing. Density is tuned for the ~40px-tall
     strip — the pattern needs to read at small heights. */
  background-repeat: repeat;
  background-size: 140px 140px;
  color: var(--tile-text);
  text-decoration: none;
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  transition: var(--transition-card);
  cursor: pointer;
}

.mini-tile:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.mini-tile:active {
  transform: scale(0.97);
}

.mini-tile .tile-label {
  font-size: 0.65rem;
  text-align: center;
  line-height: 1.2;
  padding: 0 4px;
}

/* News content area */
.news-content {
  grid-area: content;
  overflow-y: auto;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 2.5rem;
}

.news-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Card-style article — only inside the listing grid (.news-cards),
   never the detail-page <article> which has the same .news-article class.
   Equivalent to :has(.news-article-link) but without the FF-ESR caveat. */
.news-cards .news-article {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.news-cards .news-article:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.news-article-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.news-article-image {
  object-fit: cover;
  object-position: center top;
  width: 100%;
  border-radius: 0;
  aspect-ratio: 16 / 9;
}

.news-article-text {
  padding: 1.25rem 1.5rem 1.5rem;
}

.news-article-text p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-brand);
}

/* --- News list page: article header (back arrow + title row) --- */
.news-article-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.news-article-header-text {
  flex: 1;
  min-width: 0;
}

.news-article-header-text .news-date {
  margin-bottom: 4px;
}

.news-article .news-article-header-text h2,
.project-card .news-article-header-text h3 {
  margin-bottom: 0;
}

.news-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--c-brand);
  color: var(--c-brand);
  text-decoration: none;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.news-back-link:hover {
  background-color: rgba(var(--c-brand-rgb), 0.1);
  border-color: var(--c-brand-hover);
}

/* --- Individual news detail page --- */

.news-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--c-brand);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.news-detail-back:hover {
  color: var(--c-brand-hover);
}

.news-detail-back svg {
  flex-shrink: 0;
}

.news-detail-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.news-detail-title {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--c-text-strong);
  line-height: 1.2;
  margin-bottom: 24px;
}

.news-detail-image {
  width: 100%;
  border-radius: var(--r-md);
  margin-bottom: 28px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center top;
}

.news-detail-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text-body);
  font-weight: 400;
}

.news-article h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin-bottom: 10px;
  line-height: 1.3;
}

.news-article .news-date {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

.news-article p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--c-text-soft);
  font-weight: 400;
}

/* Subpage sidebar tile — static, not clickable */
.news-page .news-tile,
.projects-page .projects-tile,
.grants-page .grants-tile,
.learning-page .learning-tile,
.partners-page .partners-tile,
.calendar-page .calendar-tile,
.about-page .about-tile,
.search-page .news-tile {
  grid-area: sidebar;
  cursor: default;
}

/* Restore news tile styles on subpage sidebar (overrides carousel layout) */
.news-page .news-tile {
  align-items: flex-start;
}

.news-page .news-tile .news-label {
  position: relative;
  top: auto;
  left: auto;
  font-size: 1.3rem;
}

.news-page .news-tile:hover,
.projects-page .projects-tile:hover,
.grants-page .grants-tile:hover,
.learning-page .learning-tile:hover,
.partners-page .partners-tile:hover,
.calendar-page .calendar-tile:hover,
.about-page .about-tile:hover,
.search-page .news-tile:hover {
  transform: none;
  box-shadow: none;
}

/* Subtle sheen on subpage sidebar tiles */
.news-page .news-tile::after,
.projects-page .projects-tile::after,
.grants-page .grants-tile::after,
.learning-page .learning-tile::after,
.partners-page .partners-tile::after,
.calendar-page .calendar-tile::after,
.about-page .about-tile::after,
.search-page .news-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.12) 100%
  );
  pointer-events: none;
}

/* ---- Projects Page ---- */

.projects-content {
  grid-area: content;
  overflow-y: auto;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 1.875rem;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  display: flex;
  flex-direction: column;
}

/* Card-style project — only inside .project-cards (listing/search),
   never the single-detail wrapper which uses the same class. */
.project-cards .project-card {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.project-cards .project-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.project-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.project-card-image {
  object-fit: cover;
  object-position: center top;
  width: 100%;
  border-radius: 0;
  aspect-ratio: 16 / 9;
}

.project-card-text {
  padding: 1.25rem 1.5rem 1.5rem;
}

.project-card-text p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-brand);
}

.project-card h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin-bottom: 10px;
  line-height: 1.3;
}

.project-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--c-text-soft);
  font-weight: 400;
}

/* Sidebar tile styles */
.projects-tile,
.grants-tile,
.learning-tile,
.partners-tile,
.calendar-tile {
  background-color: var(--tile-bg);
  color: var(--tile-text);
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
}

/* ---- Calendar Page ---- */

.calendar-content {
  grid-area: content;
  display: flex;
  gap: 20px;
  overflow: hidden;
}

.calendar-grid-wrapper {
  flex: 3;
  min-width: 0;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.calendar-month-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--c-text-strong);
  min-width: 200px;
  text-align: center;
}

.calendar-nav {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--c-bg-page);
  color: var(--c-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
  flex-shrink: 0;
}

/* Calendar nav buttons — keep font inheritance now that they're <button> */
.calendar-nav[type="button"] {
  font: inherit;
}

.calendar-nav:hover {
  background-color: var(--c-brand);
  color: #fff;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-header {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  text-align: center;
  padding: 8px 0;
}

/* Calendar day cells render as <button>s — strip native chrome and
   apply the day-cell visual treatment in one place. */
.calendar-day {
  background: none;
  border: 0;
  font: inherit;
  text-align: center;
  padding: 12px 4px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  border-radius: var(--r-xs);
  cursor: pointer;
  transition: background-color 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.calendar-day:hover {
  background: var(--c-bg-page);
}

.calendar-day.empty {
  cursor: default;
  pointer-events: none;
}

.calendar-day.empty:hover {
  background: transparent;
}

.calendar-day:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.calendar-day.today {
  background: #212168;
  color: #fff;
}

.calendar-day.today:hover {
  background: #1a1a52;
}

.calendar-day.selected {
  outline: 2px solid #212168;
  outline-offset: -2px;
}

.calendar-day.today.selected {
  outline-color: #fff;
}

.calendar-day-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.calendar-day-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-legend {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  column-gap: 32px;
  row-gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--c-text-muted-2);
  font-weight: 600;
}

.calendar-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calendar-events {
  flex: 2;
  min-width: 0;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 1.875rem;
  overflow-y: auto;
}

.calendar-events-date {
  font-size: 1rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin-bottom: 16px;
  text-transform: capitalize;
}

.calendar-event-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-left: 3px solid var(--cat-color, var(--c-brand));
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  background: var(--c-bg-soft);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.calendar-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.calendar-event-card:last-child {
  margin-bottom: 0;
}

.calendar-event-category {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  color: #fff;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.calendar-event-time {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cat-color, var(--c-brand));
  margin-bottom: 4px;
}

.calendar-date-group {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin: 20px 0 10px;
}

.calendar-date-group:first-child {
  margin-top: 0;
}

.calendar-event-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin-bottom: 4px;
}

.calendar-event-desc {
  font-size: 0.8rem;
  color: var(--c-text-soft);
  line-height: 1.5;
}

.calendar-no-events {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  font-style: italic;
}

/* Subpage sidebar-tile becomes a banner. `height: auto !important`
   beats the more specific `.grid-container .news-tile { height: 320px }`
   that takes effect on tablet — without `!important`, the homepage
   carousel rule would win on subpages too. */
.news-page .news-tile,
.projects-page .projects-tile,
.grants-page .grants-tile,
.learning-page .learning-tile,
.partners-page .partners-tile,
.calendar-page .calendar-tile,
.about-page .about-tile,
.search-page .news-tile {
  height: auto !important;
  min-height: auto;
  padding: 16px 24px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

/* ---- About Page ---- */

.about-content {
  grid-area: content;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 2.5rem;
}

.about-section {
  margin-bottom: 40px;
}

.about-section:last-child {
  margin-bottom: 0;
}

.about-heading {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--c-text-strong);
  line-height: 1.2;
  margin-bottom: 20px;
}

.about-subheading {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.about-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text-body);
  font-weight: 400;
  margin-bottom: 16px;
}

.about-text:last-child {
  margin-bottom: 0;
}

/* About text block — styles content from WordPress editor */
.about-text-block p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text-body);
  font-weight: 400;
  margin-bottom: 16px;
}

.about-text-block p:last-child {
  margin-bottom: 0;
}

/* Search result type label */
.search-result-type {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-bottom: 8px;
  font-weight: 700;
}

/* About gallery — 2 columns on desktop/tablet */
.about-gallery {
  margin-bottom: 40px;
}

.about-gallery .media-gallery-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Map + Address row */
.about-map-row {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.about-map-wrapper {
  flex: 3;
  min-width: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg-page);
}

.about-map {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: none;
  display: block;
}

.about-address {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--c-bg-soft);
  border-radius: var(--r-md);
}

.about-address-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-address-text {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--c-text-body);
  font-weight: 400;
}

.about-address-text strong {
  font-weight: 800;
  color: var(--c-text-strong);
}

.about-address-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-brand);
  text-decoration: none;
  transition: color 0.2s;
}

.about-address-link:hover {
  color: var(--c-brand-hover);
}

/* Contacts */
.about-contacts-grid {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.about-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.about-contact-item svg {
  color: var(--c-brand);
  flex-shrink: 0;
  margin-top: 2px;
}

.about-contact-item a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-text-strong);
  text-decoration: none;
  line-height: 1.7;
  transition: color 0.2s;
}

.about-contact-item a:hover {
  color: var(--c-brand);
}

/* ---- 404 Page ---- */

.error404-page .error404-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "top-tiles"
    "sidebar"
    "content";
  gap: 14px;
  width: 100%;
  height: auto;
}

.error404-tile {
  grid-area: sidebar;
  background-color: var(--tile-bg);
  color: var(--tile-text);
}

.error404-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.12) 100%
  );
  pointer-events: none;
}

.error404-tile .tile-label {
  font-size: 1.3rem;
}

.error404-content {
  grid-area: content;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error404-body {
  text-align: center;
  max-width: 480px;
  padding: 2rem 0;
}

.error404-number {
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(160deg, #212168 0%, #3a3a90 50%, #5a5ab0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.error404-heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin-bottom: 12px;
}

.error404-message {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--c-text-secondary);
  margin-bottom: 28px;
}

.error404-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-bg-page);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 10px 16px;
  margin-bottom: 20px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.error404-search:focus-within {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(var(--c-brand-rgb), 0.15);
}

.error404-search svg {
  flex-shrink: 0;
  color: var(--c-text-muted);
}

.error404-search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--c-text-body);
}

.error404-search input::placeholder {
  color: var(--c-text-muted);
}

.error404-home-link {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #212168;
  text-decoration: none;
  padding: 10px 28px;
  border: 2px solid #212168;
  border-radius: var(--r-lg);
  transition:
    background-color 0.2s,
    color 0.2s;
}

.error404-home-link:hover {
  background: #212168;
  color: #fff;
}

/* ---- Media Gallery ---- */

.media-gallery {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--c-border);
}

.media-gallery-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--c-text-strong);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.media-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Defensive: hide the grid if it ends up empty (the parent <section>
   is also gated server-side in template-parts/media-gallery.php). */
.media-gallery-grid:empty {
  display: none;
}

.media-thumb {
  position: relative;
  border: none;
  padding: 0;
  background: var(--c-bg-page);
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 16 / 10;
  transition: var(--transition-card);
}

.media-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.media-thumb:focus-visible {
  outline: 3px solid var(--c-brand);
  outline-offset: 2px;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s;
}

.media-thumb--video:hover .media-thumb-play {
  background: rgba(0, 0, 0, 0.45);
}

.media-thumb-play svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ---- Media Lightbox ---- */

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.media-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.media-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-lightbox-content img {
  width: 90vw;
  max-height: 85vh;
  border-radius: var(--r-sm);
  object-fit: contain;
}

.media-lightbox-content video {
  width: 90vw;
  max-height: 85vh;
  border-radius: var(--r-sm);
  background: #000;
}

.media-lightbox-content iframe {
  width: 90vw;
  max-height: 85vh;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--r-sm);
  background: #000;
}

.media-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1001;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.media-lightbox-close:hover {
  background-color: rgba(0, 0, 0, 0.5);
  border-color: #fff;
}

.media-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background-color 0.2s,
    border-color 0.2s;
  z-index: 1001;
}

.media-lightbox-nav:hover {
  background-color: rgba(0, 0, 0, 0.5);
  border-color: #fff;
}

.media-lightbox-nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.media-lightbox-prev {
  left: 20px;
}

.media-lightbox-next {
  right: 20px;
}

.media-lightbox-caption {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 70vw;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ---- Responsive: Tablet (2 columns) ---- */

@media (max-width: 1023px) {
  /* Homepage at tablet: drop the fixed-viewport behaviour — the 4-col
     grid degrades to 3 columns and overflow naturally. */
  body.home {
    height: auto;
    overflow: auto;
  }

  .grid-container {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto 1fr 1fr;
    grid-template-areas:
      "news      news      news"
      "projects  grants    calendar"
      "training  partners  about";
    height: auto;
  }

  .nav-tile {
    min-height: 200px;
  }

  .grid-container .news-tile {
    height: 320px;
  }

  .tile-label {
    font-size: 1.15rem;
  }

  .news-label {
    font-size: 1.3rem;
  }

  .site-header {
    gap: 6px;
  }

  .site-header-brand {
    gap: 6px;
  }

  .search-bar {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  /* Center text in nav-tiles on tablet */
  .tile-align-bottom {
    align-items: center;
    justify-content: center;
  }

  .tile-align-bottom .tile-label {
    text-align: center;
  }

  /* ---- Subpage responsive: tablet ---- */
  .news-page .news-grid,
  .projects-page .projects-grid,
  .grants-page .grants-grid,
  .learning-page .learning-grid,
  .partners-page .partners-grid,
  .calendar-page .calendar-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "top-tiles"
      "sidebar"
      "content"
      "content";
    height: auto;
  }

  .top-tiles {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mini-tile {
    flex: 1 0 120px;
  }

  /* Content flows with the page (no inner scroll on tablet/mobile) */
  .news-content,
  .projects-content,
  .calendar-content,
  .about-content,
  .search-page .projects-content {
    overflow: visible;
    height: auto;
  }

  .calendar-content {
    flex-direction: column;
  }

  .calendar-grid-wrapper {
    flex: none;
  }

  .calendar-events {
    flex: none;
    max-height: none;
  }

  .calendar-legend {
    grid-template-columns: repeat(2, max-content);
    column-gap: 24px;
  }

  .news-detail-title {
    font-size: 1.5rem;
  }

  .project-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-heading {
    font-size: 1.5rem;
  }

  .about-map-row {
    flex-direction: column;
  }

  .about-map {
    min-height: 280px;
  }
}

/* ---- Responsive: Mobile (1 column) ---- */

@media (max-width: 599px) {
  body {
    padding: 12px;
  }

  .grid-container {
    grid-template-columns: 1fr;
    grid-template-areas:
      "news"
      "projects"
      "grants"
      "calendar"
      "training"
      "partners"
      "about";
    gap: 12px;
  }

  .nav-tile {
    min-height: 150px;
  }

  .grid-container .news-tile {
    height: 320px;
  }

  .tile {
    border-radius: var(--r-md);
    padding: 20px;
  }

  .tile-label {
    font-size: 1.1rem;
  }

  .news-cards {
    grid-template-columns: 1fr;
  }

  .error404-number {
    font-size: 5rem;
  }

  .error404-heading {
    font-size: 1.25rem;
  }

  .error404-content {
    padding: 1.5rem;
  }

  /* ---- Subpage responsive: mobile ---- */
  .mini-tile {
    flex: 1 0 100px;
  }

  .project-cards {
    grid-template-columns: 1fr;
  }

  .news-detail-title {
    font-size: 1.25rem;
  }

  .news-detail-image {
    border-radius: var(--r-sm);
  }

  .news-detail-body {
    font-size: 0.9rem;
    line-height: 1.7;
  }

  .site-header {
    gap: 10px;
  }

  .site-header-name {
    display: none;
  }

  .site-header-brand {
    gap: 8px;
  }

  .search-bar {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 5px 10px;
  }

  .social-icon {
    width: 24px;
    height: 24px;
  }

  .social-icons {
    gap: 4px;
  }

  .calendar-day {
    padding: 10px 2px 6px;
  }

  .calendar-day-dot {
    width: 4px;
    height: 4px;
  }

  .calendar-legend {
    grid-template-columns: max-content;
    row-gap: 6px;
  }

  .media-gallery-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .media-thumb {
    border-radius: var(--r-xs);
  }

  .media-lightbox-nav {
    width: 36px;
    height: 36px;
  }

  .media-lightbox-prev {
    left: 10px;
  }

  .media-lightbox-next {
    right: 10px;
  }

  .media-lightbox-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }

  .media-lightbox-caption {
    bottom: 46px;
    max-width: 85vw;
    font-size: 0.8rem;
  }

  .about-content {
    padding: 24px;
  }

  .about-heading {
    font-size: 1.25rem;
  }

  .about-gallery .media-gallery-grid {
    grid-template-columns: 1fr;
  }

  .about-map-row {
    flex-direction: column;
  }

  .about-map {
    min-height: 240px;
  }

  .about-contacts-grid {
    flex-direction: column;
    gap: 20px;
  }
}

/* ============================================
   Accessibility, icons, route transitions
   ============================================ */

/* Visually-hidden helper — for skip-target h1's, screen-reader labels,
   and the route-change announcer. clip-path is the modern equivalent
   of the deprecated `clip: rect(...)` form. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Inline SVG defaults — colour follows currentColor; CSS-controlled. */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.media-thumb-play .icon--play-overlay {
  color: #fff;
}

/* Focus-visible defaults — visible keyboard focus across all interactive elements. */
:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
}
.tile:focus-visible,
.mini-tile:focus-visible,
.nav-tile:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -3px;
  box-shadow: 0 0 0 5px rgba(var(--c-brand-rgb), 0.5);
}
.search-input:focus,
.search-input:focus-visible {
  outline: 2px solid var(--c-brand);
  outline-offset: 2px;
}
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
  /* Programmatic focus on landmarks shouldn't show an outline. */
  outline: none;
}

/* Pagination — duplicated above and below the card grid so long listings
   don't force a full scroll to reach the controls. */
.ncci-pagination {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.ncci-pagination--top {
  margin-bottom: 24px;
}
.ncci-pagination--bottom {
  margin-top: 24px;
}
.ncci-pagination .page-numbers {
  display: inline-block;
  min-width: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--c-surface);
  color: var(--c-brand);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
}
.ncci-pagination .page-numbers.current {
  background: var(--c-brand);
  color: #fff;
}
.ncci-pagination .page-numbers:hover:not(.current) {
  background: #e6e6e6;
}

/* Search no-results message */
.search-no-results {
  font-size: 1rem;
  color: var(--c-text-secondary);
  line-height: 1.8;
}

/* Reduced motion — short-circuit animations and view transitions. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  ::view-transition-group(*) {
    animation-duration: 0.001ms;
  }
}

/* Higher-contrast users — flatten the muted greys to fully-dark.
   Applies on top of the AA-compliant defaults. */
@media (prefers-contrast: more) {
  :root {
    --c-text-muted: var(--c-text-strong);
    --c-text-muted-2: var(--c-text-strong);
    --c-text-soft: var(--c-text-strong);
  }
}


/* ========================================
   Per-section brand-pattern assignments
   ========================================
   Every tile shares the same navy fill (var(--tile-bg) → #212168). Each
   section gets its own pattern overlay so the seven destinations are
   visually distinct. Selector matches both the homepage tile (which
   carries view-transition-name in its inline style) and the subpage
   sidebar tile (which carries the matching CPT class), plus the
   mini-tile in the nav strip on every subpage.
*/
.tile[style*="news-tile"],
.news-tile,
.mini-tile[style*="news-tile"] {
  background-image: url("../../assets/patterns/topographic.svg");
}
.tile[style*="projects-tile"],
.projects-tile,
.mini-tile[style*="projects-tile"] {
  background-image: url("../../assets/patterns/triangles.svg");
}
.tile[style*="grants-tile"],
.grants-tile,
.mini-tile[style*="grants-tile"] {
  background-image: url("../../assets/patterns/suns-stars.svg");
}
.tile[style*="calendar-tile"],
.calendar-tile,
.mini-tile[style*="calendar-tile"] {
  background-image: url("../../assets/patterns/dashes.svg");
}
.tile[style*="training-tile"],
.learning-tile,
.mini-tile[style*="training-tile"] {
  background-image: url("../../assets/patterns/mountains.svg");
}
.tile[style*="partners-tile"],
.partners-tile,
.mini-tile[style*="partners-tile"] {
  background-image: url("../../assets/patterns/circles.svg");
}
.tile[style*="about-tile"],
.about-tile,
.mini-tile[style*="about-tile"] {
  background-image: url("../../assets/patterns/squares.svg");
}

/* Specials — 404 + search are standalone routes without a CPT tile class. */
.error404-tile {
  background-image: url("../../assets/patterns/squiggles.svg");
}
.search-page .news-tile {
  /* Search ranges across all content; pick the dots+S-curves mix. */
  background-image: url("../../assets/patterns/dots-waves.svg");
}
