/*
Theme Name: Memory in the Making
Theme URI: https://memoryinthemaking.com
Author: Memory in the Making Project
Description: A research project theme dedicated to grassroots war memory practices in Ukraine. "Пам'ять у процесі становлення"
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: mitm
*/

/* ==========================================================================
   1. IMPORTS & FONTS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kufam:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ==========================================================================
   2. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================================================== */

:root {
  /* Colors */
  --color-primary:       #341109;
  --color-white:         #FFFFFF;
  --color-black:         #000000;
  --color-bg-warm:       #F7F2EE;
  --color-bg-cool:       #F6F8FB;
  --color-accent-blue:   #A4D1FB;
  --color-accent-red:    #DC3333;
  --color-steel-blue:    #608FAF;
  --color-nav-blue:      #438AC0;
  --color-partners-gray: #7B8891;
  --color-text-muted:    #838793;
  --color-text-date:     #6C6C6C;
  --color-border:        #B7C3CB;
  --color-divider:       #DBE0EC;
  --color-footer-grad-start: #FFFAD1;

  /* Typography */
  --font-family: 'Kufam', sans-serif;

  /* Font Sizes */
  --fs-h1:      62px;
  --fs-body:    20px;
  --fs-btn:     16px;
  --fs-caption: 14px;

  /* Line Heights */
  --lh-h1:   1;
  --lh-body: 1.2;
  --lh-btn:  1;

  /* Letter Spacing */
  --ls-h1:   -0.04em;
  --ls-body: -0.04em;
  --ls-body-bold: -0.02em;

  /* Spacing */
  --section-pad-top: 120px;
  --section-pad-h:   20px;
  --container-max:   1200px;
  --container-outer: 1280px;
  --gap-section:     40px;
  --gap-cards:       22px;
  --gap-cards-v:     80px;
  --radius-card:     24px;
  --radius-btn:      32px;
  --radius-pill:     32px;

  /* Shadows */
  --shadow-nav:  0px 4px 10px rgba(133, 172, 204, 0.08);
  --shadow-faq:  drop-shadow(0px 2px 6px rgba(133, 172, 204, 0.08));
}

/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-black);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ==========================================================================
   4. TYPOGRAPHY
   ========================================================================== */

.heading-1 {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  color: var(--color-black);
}

.body-regular {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
}

.body-bold {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1;
  letter-spacing: var(--ls-body-bold);
  color: var(--color-black);
}

.caption {
  font-family: var(--font-family);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-caption);
  line-height: 1;
  color: var(--color-text-date);
}

/* ==========================================================================
   5. LAYOUT UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-pad-h);
}

.container--outer {
  width: 100%;
  max-width: var(--container-outer);
  margin-inline: auto;
}

.section-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--section-pad-top) 0 0;
  width: 100%;
}

.section-header .heading-1 {
  text-align: center;
  width: 100%;
}

/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 100px;
  font-family: var(--font-family);
  font-weight: 500;
  font-size: var(--fs-btn);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  border-radius: var(--radius-btn);
  transition: opacity 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--primary .btn__bullet {
  width: 4px;
  height: 4px;
  background: var(--color-white);
  border-radius: 4px;
  flex-shrink: 0;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 14px 100px;
}

/* ==========================================================================
   7. NAVIGATION
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: linear-gradient(90deg, #FFFFFF 17.44%, rgba(255,255,255,0.8) 29.96%, rgba(164,209,251,0.3) 100%);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

.site-header__logo {
  flex-shrink: 0;
}

.site-header__logo img,
.site-header__logo svg {
  height: 60px;
  width: auto;
}

.site-header__logo .logo-placeholder {
  height: 60px;
  width: 212px;
  background: var(--color-nav-blue);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-nav__menu a {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1;
  letter-spacing: var(--ls-body-bold);
  color: var(--color-black);
  transition: color 0.2s;
  padding: 4px 8px;
}

.site-nav__menu a:hover {
  color: var(--color-steel-blue);
}

.site-nav__lang {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 8px;
}

.site-nav__lang span {
  display: block;
  width: 27px;
  height: 9px;
}

.site-nav__lang span:first-child {
  background: #5582C3;
}

.site-nav__lang span:last-child {
  background: #F4D764;
}

/* Right-side header wrapper (nav + lang + toggle) */
.site-header__end {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Language switcher in header — always visible */
.site-header__lang {
  display: flex;
  align-items: center;
}

/* Mobile hamburger — "+" icon rotates −45° on open */
.site-header__toggle {
  display: none;
  position: relative;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.35s ease;
}

.site-header__toggle-bar {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-black);
  border-radius: 2px;
}

.site-header__toggle-bar--h {
  width: 22px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.site-header__toggle-bar--v {
  width: 2px;
  height: 22px;
  transform: translate(-50%, -50%);
}

/* Rotated state — "+" becomes "×" rotated left */
.site-header__toggle.is-active {
  transform: rotate(-45deg);
}

/* ==========================================================================
   8. HERO / INTRO SECTION
   ========================================================================== */

.section-intro {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 140px 20px 0;
  gap: var(--gap-section);
  overflow: hidden;
}

.section-intro__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(255,255,255,0) -16.81%, rgba(255,255,255,0.8) 0.9%, rgba(164,209,251,0.3) 100%);
  pointer-events: none;
  z-index: 0;
}

.section-intro__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 994px;
  width: 100%;
  text-align: center;
}

.section-intro__title {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-h1);
  line-height: 1;
  letter-spacing: var(--ls-h1);
  color: var(--color-black);
  text-align: center;
}

.section-intro__subtitle {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  text-align: center;
  max-width: 994px;
}

.section-intro__hero-image {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  height: 537px;
  border-radius: var(--radius-card);
  overflow: hidden;
  flex-shrink: 0;
}

.section-intro__hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.section-intro__hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(96,143,175,0) 0%, #608FAF 100%);
  mix-blend-mode: overlay;
  z-index: 1;
  pointer-events: none;
}

.section-intro__hero-deco {
  position: absolute;
  right: -2px;
  bottom: -16px;
  z-index: 2;
  width: clamp(190px, 23vw, 292px);
  height: auto;
  opacity: 0.78;
  pointer-events: none;
}

.section-intro__hero-image .placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #608FAF 0%, #341109 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  letter-spacing: 0.2em;
}

.section-intro__buttons {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 20px 0 40px;
}

/* ==========================================================================
   9. ABOUT US SECTION
   ========================================================================== */

.section-about {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.section-about::before{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-bg-warm);
  transform: translateY(50px); /* ось зміщення */
  z-index: 0;
}

.section-about__bg-ring {
  position: absolute;
  top: 0px;
  left: 0px;
  background: var(--color-primary);
  opacity: 0.07;
  pointer-events: none;
  
  width: 100%;
  height: 816px; /* 200px радіус + 300px пряма + 200px радіус */
  
  max-width: 100vw; 
  /* ВЕРСІЯ ДЛЯ ПК ТА ВЕЛИКИХ ЕКРАНІВ */
  clip-path: shape(
    from 0px 816px, 
    line to 50px 816px, 
    arc to 258px 608px of 208px ccw, 
    line to 258px 208px, 
    arc to 450px 16px of 192px cw, 
    line to 100% 16px, 
    line to 100% 0px, 
    line to 450px 0px, 
    arc to 242px 208px of 208px ccw, 
    line to 242px 608px, 
    arc to 50px 800px of 192px cw, 
    line to 0px 800px, 
    close
  );
}
/* МОБІЛЬНА ВЕРСІЯ (для екранів менших за 768px) */
@media (max-width: 768px) {
  .section-about__bg-ring {
    /* Зменшуємо загальну математичну висоту для мобільного: 
       8px + 100px(поворот) + 200px(пряма) + 100px(поворот) + 8px = 416px */
    height: 416px; 
    
    clip-path: shape(
      /* 1. Починаємо в самій нижній точці */
      from 0px 416px, 
      /* 2. Йдемо 25px праворуч (було 50) */
      line to 25px 416px, 
      /* 3. Огинаємо нижній зовнішній радіус (100px + 8px = 108px) */
      arc to 133px 308px of 108px ccw, 
      /* 4. Лінія прямо вгору на 200px (було 400) */
      line to 133px 108px, 
      /* 5. Огинаємо верхній внутрішній радіус (100px - 8px = 92px) */
      arc to 225px 16px of 92px cw, 
      /* 6. Пряма до кінця екрану праворуч */
      line to 100% 16px, 
      
      /* === ПОВЕРТАЄМОСЬ ЗВОРОТНІМ ШЛЯХОМ === */
      /* 7. Піднімаємось на саму гору утворюючи потрібну товщину 16px */
      line to 100% 0px, 
      /* 8. Повертаємось ліворуч */
      line to 225px 0px, 
      /* 9. Верхній вигин назад (зовнішній радіус 108px) */
      arc to 117px 108px of 108px ccw, 
      /* 10. Лінія вниз на 200px */
      line to 117px 308px, 
      /* 11. Нижній вигин назад (внутрішній радіус 92px) */
      arc to 25px 400px of 92px cw, 
      /* 12. Пряма до початку */
      line to 0px 400px, 
      /* 13. Закриваємо */
      close
    );
  }
}

.section-about__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 80px;
  gap: var(--gap-section);
}

.section-about__description {
  max-width: 998px;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  text-align: justify;
  color: var(--color-black);
}

.section-about__team {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 22px;
  flex-wrap: wrap;
  max-width: var(--container-max);
  width: 100%;
}

/* Team Member Card */
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 488px;
  max-width: 100%;
  color: var(--color-black);
  text-decoration: none;
}

.team-card__image {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  background: var(--color-border);
}

.team-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.3s ease;
}

a.team-card:hover .team-card__image img,
a.team-card:focus-visible .team-card__image img {
  transform: scale(1.03);
}

.team-card__image .placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #B7C3CB 0%, #838793 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-card__image .placeholder-img svg {
  width: 80px;
  height: 80px;
  opacity: 0.3;
}

.team-card__info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.team-card__name {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1;
  letter-spacing: var(--ls-body-bold);
  color: var(--color-black);
}

.team-card__role {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-text-muted);
}

.team-card__bio {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  text-align: justify;
  color: var(--color-black);
}

.team-card__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 8px;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

a.team-card:hover .team-card__more,
a.team-card:focus-visible .team-card__more {
  opacity: 0.85;
  transform: translateY(-1px);
}

a.team-card:active .team-card__more {
  transform: translateY(0);
}

a.team-card:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 6px;
  border-radius: var(--radius-card);
}

/* ==========================================================================
   10. NEWS SECTION
   ========================================================================== */

.section-news {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 80px;
  gap: var(--gap-section);
  background: var(--color-white);
}

.news-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--gap-cards-v) var(--gap-cards);
  max-width: 1202px;
  width: 100%;
}

/* News Article Card */
.article-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 590px;
  max-width: 100%;
}

.article-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 590 / 344;
  height: auto;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: var(--color-bg-cool);
}

.article-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.article-card:hover .article-card__image img {
  opacity: 0.92;
}

.article-card__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  mix-blend-mode: hue;
  z-index: 1;
}

.article-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(96,143,175,0) 0%, #608FAF 100%);
  mix-blend-mode: overlay;
  z-index: 2;
}

.article-card__image .placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #608FAF 0%, #341109 100%);
}

.article-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

.article-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.article-card__title {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1;
  letter-spacing: var(--ls-body-bold);
  color: var(--color-black);
  width: 100%;
}

.article-card__date {
  font-family: var(--font-family);
  font-style: italic;
  font-weight: 400;
  font-size: var(--fs-caption);
  line-height: 1;
  color: var(--color-text-date);
}

.article-card__excerpt {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.archive-news .article-card__body {
  gap: 8px;
}

.archive-news .article-card__title,
.archive-news .article-card__date,
.archive-news .article-card__excerpt {
  margin: 0;
}

.section-news__cta {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Article card badge (Library / type tag) */
.article-card__badge {
  display: inline-block;
  padding: 2px 16px;
  background: var(--color-accent-blue);
  border-radius: 24px;
  font-family: var(--font-family);
  font-size: 14px;
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  margin-bottom: 8px;
}

/* ==========================================================================
   LIBRARY PAGE
   ========================================================================== */

.archive-library .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px 80px;
}

.archive-library__header {
  padding-top: 120px;
  text-align: center;
  margin-bottom: 60px;
}

.archive-library .news-grid {
  justify-content: flex-start;
}

.archive-news .news-grid,
.archive-library .news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.archive-news .article-card,
.archive-library .article-card {
  width: 100%;
}

.archive-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 0 0;
  flex-wrap: wrap;
}

.archive-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: var(--fs-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
  background: var(--color-accent-red);
  border-color: var(--color-accent-red);
  color: var(--color-white);
}

.no-results-wrap {
  text-align: center;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  font-family: var(--font-family);
  font-size: var(--fs-body);
  color: var(--color-text-muted);
}

/* ==========================================================================
   11. FAQ SECTION
   ========================================================================== */

.section-faq {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 120px;
  gap: 32px;
  overflow: hidden;
}

.section-faq::before{
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-bg-cool);
  transform: translateY(50px); /* ось зміщення */
  z-index: 0;
}

.section-faq__bg-ring {
  position: absolute;
  left: 0px;
  top: 0px;
  opacity: 0.07;
  background: var(--color-primary);
  pointer-events: none;
  width: 100%;
  height: 816px;
  max-width: 100vw; 
  /* ВЕРСІЯ ДЛЯ ПК (математично справа наліво) */
  clip-path: shape(
    from 100% 816px, 
    line to calc(100% - 50px) 816px, 
    arc to calc(100% - 258px) 608px of 208px cw, 
    line to calc(100% - 258px) 208px, 
    arc to calc(100% - 450px) 16px of 192px ccw, 
    line to 0px 16px, 
    
    line to 0px 0px, 
    line to calc(100% - 450px) 0px, 
    arc to calc(100% - 242px) 208px of 208px cw, 
    line to calc(100% - 242px) 608px, 
    arc to calc(100% - 50px) 800px of 192px ccw, 
    line to 100% 800px, 
    close
  );
}
/* МОБІЛЬНА ВЕРСІЯ (справа наліво) */
@media (max-width: 768px) {
  .s-shape-bottom-to-top-reversed {
    height: 416px; 
    
    clip-path: shape(
      from 100% 416px, 
      line to calc(100% - 25px) 416px, 
      arc to calc(100% - 133px) 308px of 108px cw, 
      line to calc(100% - 133px) 108px, 
      arc to calc(100% - 225px) 16px of 92px ccw, 
      line to 0px 16px, 
      
      line to 0px 0px, 
      line to calc(100% - 225px) 0px, 
      arc to calc(100% - 117px) 108px of 108px cw, 
      line to calc(100% - 117px) 308px, 
      arc to calc(100% - 25px) 400px of 92px ccw, 
      line to 100% 400px, 
      close
    );
  }
}



/* Підіймаємо контент FAQ вище псевдоелемента-фону (z-index: 0) */
.section-faq .section-header,
.section-faq .faq-list {
  position: relative;
  z-index: 1;
}

.faq-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 998px;
  gap: 0;
}

.faq-item {
  width: 100%;
  filter: var(--shadow-faq);
  border-bottom: 1px solid var(--color-divider);
}

.faq-item__trigger {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  width: 100%;
  gap: 16px;
  cursor: pointer;
  background: transparent;
  border: none;
  text-align: left;
}

.faq-item__question {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  flex: 1;
}

.faq-item__icon {
  width: 22px;
  height: 22px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  background: var(--color-black);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.faq-item__icon::before {
  width: 14px;
  height: 2px;
}

.faq-item__icon::after {
  width: 2px;
  height: 14px;
}

.faq-item.is-open .faq-item__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}

.faq-item__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.faq-item.is-open .faq-item__answer {
  grid-template-rows: 1fr;
}

.faq-item__answer-inner {
  overflow: hidden;
}

.faq-item__answer-content {
  padding: 0 0 20px;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  text-align: justify;
  color: var(--color-black);
}

/* ==========================================================================
   12. MAP SECTION
   ========================================================================== */

.section-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 80px;
  gap: var(--gap-section);
  background: var(--color-white);
}

/* Map Filters */
.map-filters {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: var(--container-max);
}

.map-filters__row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.map-filter-select {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 20px;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-width: 200px;
  transition: border-color 0.2s;
}

.map-filter-select:focus {
  outline: none;
  border-color: var(--color-steel-blue);
}

.map-search-row {
  display: flex;
  flex-direction: row;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.map-search-input {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 8px 20px;
  gap: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-text-muted);
}

.map-search-input input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  color: var(--color-black);
  flex: 1;
  outline: none;
}

.map-search-input input::placeholder {
  color: var(--color-border);
}

.map-search-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-border);
}

.map-search-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  gap: 10px;
  background: var(--color-accent-red);
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  width: 58px;
  height: 48px;
  transition: opacity 0.2s;
}

.map-search-btn:hover {
  opacity: 0.85;
}

.map-search-btn svg {
  color: white;
  width: 24px;
  height: 24px;
}

/* Map Container */
.map-container {
  width: 100%;
  max-width: var(--container-max);
  height: 584px;
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  background: #E8EEF3;
}

.map-container iframe,
.map-container #map {
  width: 100%;
  height: 100%;
  border: none;
}

/* Journal / People Cards Grid */
.journal-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: var(--gap-cards-v) 16px;
  max-width: 1240px;
  width: 100%;
}

/* Journal/Person Card */
.journal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 590px;
  max-width: 100%;
}

.journal-card__image {
  width: 100%;
  height: 344px;
  overflow: hidden;
  position: relative;
}

.journal-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.4s ease;
}

.journal-card:hover .journal-card__image img {
  transform: scale(1.03);
}

.journal-card__image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #000;
  mix-blend-mode: hue;
  z-index: 1;
}

.journal-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(96,143,175,0) 0%, #608FAF 100%);
  mix-blend-mode: overlay;
  z-index: 2;
}

.journal-card__image .placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #608FAF 0%, #341109 100%);
}

.journal-card__badge {
  position: absolute;
  right: 23px;
  bottom: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 4px 30px;
  gap: 10px;
  background: var(--color-accent-blue);
  border-radius: 24px;
  z-index: 3;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  white-space: nowrap;
}

.journal-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
}

.journal-card__name {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: var(--fs-body);
  line-height: 1;
  letter-spacing: var(--ls-body-bold);
  color: var(--color-black);
  width: 100%;
}

.journal-card__excerpt {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journal-card__location {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.journal-card__location-icon {
  width: 17px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.journal-card__location-text {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-text-muted);
}

.section-map__cta {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Map Marker Icon */
.mitm-map-marker {
  background: none;
  border: none;
}

/* Map Popup */
.mitm-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.16);
  border: none;
}

.mitm-popup .leaflet-popup-content {
  margin: 0;
  width: 280px !important;
}

.mitm-popup .leaflet-popup-tip-container {
  margin-top: -1px;
}

.mitm-popup-inner {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.mitm-popup-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.mitm-popup-img--placeholder {
  background: linear-gradient(135deg, var(--color-steel-blue) 0%, #341109 100%);
}

.mitm-popup-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mitm-popup-tag {
  display: inline-block;
  padding: 2px 12px;
  background: var(--color-accent-blue);
  border-radius: 24px;
  font-family: var(--font-family);
  font-size: 14px;
  letter-spacing: var(--ls-body);
  color: var(--color-black);
  align-self: flex-start;
}

.mitm-popup-name {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: var(--ls-body-bold);
  color: var(--color-black);
}

.mitm-popup-excerpt {
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: var(--ls-body);
  color: var(--color-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mitm-popup-city {
  font-family: var(--font-family);
  font-size: 13px;
  color: var(--color-text-muted);
  letter-spacing: var(--ls-body);
}

.mitm-popup-inner:hover .mitm-popup-name {
  text-decoration: underline;
}

/* Highlighted journal card */
.journal-card.is-highlighted {
  outline: 2px solid var(--color-accent-red);
  outline-offset: 4px;
  border-radius: var(--radius-card);
}

/* ==========================================================================
   13. CONTACTS SECTION
   ========================================================================== */

.section-contacts {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 120px;
  gap: 32px;
  overflow: hidden;
  background: var(--color-white);
}

.section-contacts__bg-ring {
  position: absolute;
  width: calc(100% + 174px);
  height: clamp(150px, 45vw, 550px);
  left: -270px;
  top: 41px;
  opacity: 0.04;
  border: 16px solid var(--color-primary);
  border-radius: 200px;
  transform: scaleY(-1);
  pointer-events: none;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
  max-width: var(--container-max);
}

.contact-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.contact-item__icon {
  width: 23px;
  height: 24px;
  flex-shrink: 0;
  color: var(--color-black);
}

.contact-item__text {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--color-black);
}

.contact-item a {
  color: var(--color-black);
  transition: color 0.2s;
}

.contact-item a:hover {
  color: var(--color-steel-blue);
}

/* ==========================================================================
   14. PARTNERS SECTION
   ========================================================================== */

.section-partners {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 20px;
  min-height: 180px;
  background: var(--color-partners-gray);
  gap: 24px;
}

.section-partners__label {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* ── Viewport — обгортка з кнопками навігації ─────────────────────────── */
.section-partners__viewport {
  position: relative;
  width: 100%;
  max-width: var(--container-max);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Track — стрічка партнерів ───────────────────────────────────────── */
.section-partners__track {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

/* Slider-режим: вмикається через JS коли елементи не вміщуються */
.section-partners__viewport.is-slider .section-partners__track {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.section-partners__viewport.is-slider .section-partners__track::-webkit-scrollbar {
  display: none;
}

.section-partners__viewport.is-slider .partner-item {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ── Partner item ─────────────────────────────────────────────────────── */
.partner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 150px;
}

.partner-item__desc {
  font-family: var(--font-family);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  max-width: 180px;
  line-height: 1.4;
}

/* ── Partner logo ─────────────────────────────────────────────────────── */
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.partner-logo img {
  width: auto;
  height: 100%;
  max-width: 220px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.partner-logo img:hover {
  opacity: 1;
}

.placeholder-logo {
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  min-width: 110px;
  white-space: nowrap;
}

/* ── Навігаційні кнопки слайдера ─────────────────────────────────────── */
.partners-nav {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, opacity 0.2s;
  z-index: 1;
}

.partners-nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.partners-nav[hidden] {
  display: none;
}

/* ==========================================================================
   15. FOOTER
   ========================================================================== */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  min-height: 100px;
  background: linear-gradient(90deg, var(--color-footer-grad-start) 0%, rgba(255,250,209,0) 100%);
}

.site-footer__inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: var(--container-max);
  height: 60px;
  opacity: 0.2;
}

.site-footer__logo {
  display: flex;
  align-items: center;
}

.site-footer__logo img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

.site-footer__brand {
  display: flex;
  align-items: center;
}

.site-footer__brand img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
   16. SINGLE POST / PAGE TEMPLATES
   ========================================================================== */

/* Single news: ширина 1280px як в інших блоках */
.single-news .container {
  max-width: var(--container-outer); /* 1280px */
  padding-top: 140px;
  padding-bottom: 80px;
}

.entry-header {
  padding: 0 0 32px;
  text-align: left;
  background: none;
}

/* Featured image після заголовка, без радіусу */
.entry-featured-image {
  width: 100%;
  margin-bottom: 48px;
  overflow: hidden;
}

.entry-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  object-fit: cover;
}

.entry-header__category {
  display: inline-block;
  padding: 4px 30px;
  background: var(--color-accent-blue);
  border-radius: 24px;
  font-family: var(--font-family);
  font-size: var(--fs-caption);
  color: var(--color-black);
  margin-bottom: 24px;
}

.entry-header__title {
  font-family: var(--font-family);
  font-weight: 400;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: var(--ls-h1);
  color: var(--color-black);
  max-width: 800px;
  margin: 0 auto 24px;
}

.entry-header__meta {
  font-family: var(--font-family);
  font-style: italic;
  font-size: var(--fs-caption);
  color: var(--color-text-date);
}

.entry-hero-image {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  height: 500px;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.entry-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entry-content {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.6;
  letter-spacing: var(--ls-body);
  color: var(--color-black);
}

.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { font-size: 36px; font-weight: 400; margin: 2em 0 0.75em; letter-spacing: var(--ls-h1); }
.entry-content h3 { font-size: 28px; font-weight: 400; margin: 1.5em 0 0.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; margin-bottom: 1.5em; }
.entry-content li { margin-bottom: 0.5em; list-style: disc; }
.entry-content a { color: var(--color-steel-blue); text-decoration: underline; }
.entry-content blockquote { border-left: 4px solid var(--color-accent-blue); padding-left: 24px; margin: 2em 0; font-style: italic; color: var(--color-text-muted); }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption { text-align: center; font-size: var(--fs-caption); color: var(--color-text-date); margin-top: 8px; }

/* Person Profile */
.single-person .container {
  max-width: 1120px;
  margin: 60px auto;
  padding: 0 20px;
}

.single-person-article {
  max-width: 100%;
}

.single-person .person-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  font-family: var(--font-family);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  text-align: justify;
}

.single-person .person-bio.entry-content {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.person-image-col {
  width: 100%;
}

.person-image-wrap {
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.person-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: top;
}

.person-content-col {
  width: 100%;
}

.person-name {
  font-family: var(--font-family);
  font-weight: 500;
  font-size: 36px;
  letter-spacing: var(--ls-body-bold);
  margin-bottom: 8px;
}

.person-role {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  color: var(--color-text-muted);
  letter-spacing: var(--ls-body);
  margin-bottom: 8px;
}

.person-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  margin-bottom: 32px;
}

.person-bio {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
}

/* ==========================================================================
   17. WORDPRESS CORE COMPATIBILITY
   ========================================================================== */

/* Gutenberg alignment */
.alignwide  { max-width: 1200px; margin-inline: auto; }
.alignfull  { margin-inline: calc(-50vw + 50%); max-width: 100vw; }
.alignleft  { float: left; margin-right: 2em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 2em; margin-bottom: 1em; }
.aligncenter { text-align: center; margin-inline: auto; }

/* WP Core Blocks */
.wp-block-image img { border-radius: var(--radius-card); }
.wp-block-separator { border: none; border-top: 1px solid var(--color-divider); margin: 40px 0; }
.wp-block-quote { border-left: 4px solid var(--color-accent-blue); padding-left: 24px; margin: 2em 0; }
.wp-block-quote cite { font-size: var(--fs-caption); color: var(--color-text-muted); display: block; margin-top: 8px; }

/* Search Form */
.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 600px;
}

.search-field {
  flex: 1;
  padding: 8px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-family: var(--font-family);
  font-size: var(--fs-body);
  outline: none;
  transition: border-color 0.2s;
}

.search-field:focus { border-color: var(--color-steel-blue); }

.search-submit {
  background: var(--color-accent-red);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 24px;
  font-family: var(--font-family);
  font-size: var(--fs-body);
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-submit:hover { opacity: 0.85; }

/* Pagination */
.navigation.pagination {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-family: var(--font-family);
  font-size: var(--fs-body);
  color: var(--color-black);
  transition: background 0.2s, color 0.2s;
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Comments */
.comments-area { max-width: 800px; margin: 60px auto; padding: 0 20px; }
.comments-title { font-size: 28px; font-weight: 400; margin-bottom: 40px; }
.comment-list { padding: 0; }
.comment { list-style: none; margin-bottom: 32px; }
.comment-meta { margin-bottom: 12px; }
.comment-author .fn { font-weight: 500; }
.comment-metadata { font-size: var(--fs-caption); color: var(--color-text-date); }
.comment-content { font-size: var(--fs-body); line-height: 1.6; }

/* ==========================================================================
   18. UTILITY CLASSES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.text-justify { text-align: justify; }

.mt-0 { margin-top: 0; }
.mb-40 { margin-bottom: 40px; }
.mb-80 { margin-bottom: 80px; }

/* ==========================================================================
   19. RESPONSIVE — TABLET (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  :root {
    --fs-h1: 48px;
    --fs-body: 18px;
    --section-pad-top: 80px;
    --container-max: 960px;
  }

  .section-intro { padding: 120px 16px 0; }
  .section-intro__hero-image { height: 400px; }
  .section-intro__hero-deco {
    bottom: -12px;
    width: clamp(170px, 26vw, 240px);
  }

  .section-about__team,
  .news-grid,
  .journal-grid {
    gap: 40px 16px;
  }

  .team-card,
  .article-card,
  .journal-card {
    width: calc(50% - 8px);
  }

  .profile-layout { gap: 40px; }
  .profile-layout__image { width: 280px; }
  .profile-layout__image img { height: 360px; }
}

/* ==========================================================================
   19.1 RESPONSIVE — MOBILE LANDSCAPE / SMALL TABLET
   ========================================================================== */

@media (max-width: 950px) and (max-height: 520px) and (orientation: landscape) {
  .section-news {
    padding: 0 16px 56px;
    gap: 28px;
  }

  .news-grid {
    gap: 32px 14px;
  }

  .article-card {
    width: calc(50% - 7px);
    gap: 12px;
  }

  .article-card__body {
    gap: 10px;
  }

  .article-card__meta {
    gap: 6px;
  }

  .article-card__title {
    line-height: 1.1;
  }

  .article-card__excerpt {
    -webkit-line-clamp: 2;
  }

  .section-news__cta {
    margin-top: 4px;
  }
}

/* ==========================================================================
   20. RESPONSIVE — MOBILE (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
  :root {
    --fs-h1: 36px;
    --fs-body: 16px;
    --section-pad-top: 60px;
  }

  /* Nav */
  .site-header {
    padding: 16px 20px;
    height: 72px;
  }

  /* Nav — collapsed by default, absolute overlay when open
     position:absolute (not fixed) avoids backdrop-filter containment bugs in Safari */
  .site-nav {
    display: none;
  }

  .site-nav.is-open {
    display: block;
    position: absolute;   /* positioned relative to .site-header (position:fixed) */
    top: 100%;            /* starts right below the header */
    left: 0;
    right: 0;
    min-height: calc(100vh - 72px);
    background: #fff;
    z-index: 10;
    overflow-y: auto;
  }

  /* Menu list — 20px side padding creates the indent for all borders */
  .site-nav.is-open .site-nav__menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
  }

  /* Each item: only border-bottom, full container width (respects 20px padding) */
  .site-nav.is-open .site-nav__menu > li {
    list-style: none;
    border-bottom: 1px solid #DBE0EC;
  }

  .site-nav.is-open .site-nav__menu > li:first-child {
    border-top: 1px solid #DBE0EC;
  }

  .site-nav.is-open .site-nav__menu a {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding: 24px 0;
    min-height: 60px;
    box-sizing: border-box;
    font-family: var(--font-family);
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--color-black);
    text-decoration: none;
  }

  .site-nav.is-open .site-nav__menu a:hover {
    color: #438AC0;
  }

  .site-nav.is-open .site-nav__menu a.active,
  .site-nav.is-open .site-nav__menu li.current-menu-item > a {
    color: #438AC0;
  }

  .site-nav.is-open .site-nav__menu li.current-menu-item {
    border-bottom-color: #438AC0;
  }

  .site-header__toggle { display: block; }

  /* Hero */
  .section-intro { padding: 100px 16px 0; }
  .section-intro__title { font-size: 32px; }
  .section-intro__hero-image { height: 260px; }
  .section-intro__hero-deco {
    right: -8px;
    bottom: -10px;
    width: clamp(130px, 38vw, 180px);
  }
  .section-intro__buttons { flex-direction: column; align-items: center; }
  .btn { padding: 16px 40px; }

  /* Sections */
  .section-about__team,
  .news-grid,
  .journal-grid {
    flex-direction: column;
    gap: 40px;
  }

  .team-card,
  .article-card,
  .journal-card {
    width: 100%;
  }

  .section-news {
    padding: 0 16px 64px;
    gap: 32px;
  }

  .news-grid {
    gap: 36px;
  }

  .archive-news .news-grid,
  .archive-library .news-grid {
    grid-template-columns: 1fr;
  }

  .article-card {
    gap: 14px;
  }

  .article-card__body {
    gap: 12px;
  }

  .article-card__meta {
    gap: 6px;
  }

  .article-card__title {
    line-height: 1.12;
  }

  /* Map */
  .map-filters__row { flex-direction: column; }
  .map-filter-select { width: 100%; }
  .map-container { height: 360px; }

  /* Profile */
  .profile-layout { flex-direction: column; gap: 32px; }
  .profile-layout__image { width: 100%; max-width: 400px; margin: 0 auto; }
  .profile-layout__image img { height: 320px; }

  /* Partners */
  .section-partners__track { gap: 28px; }
  .partner-logo img { max-height: 70px; max-width: 160px; }

  /* Footer */
  .site-footer__inner { flex-direction: column; height: auto; text-align: center; }
}

/* ==========================================================================
   20.1 RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
  .section-news {
    padding-inline: 14px;
    padding-bottom: 56px;
    gap: 28px;
  }

  .news-grid {
    gap: 32px;
  }

  .article-card {
    gap: 12px;
  }

  .article-card__body {
    gap: 10px;
  }

  .article-card__title {
    line-height: 1.15;
  }
}

/* ==========================================================================
   21. PRINT STYLES
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .section-intro__buttons,
  .section-news__cta,
  .section-map__cta { display: none; }
  body { font-size: 12pt; color: #000; }
}
