/* ==========================================================================
   Институт по системна психотерапия — theme stylesheet
   За портване към WordPress: копирайте съдържанието в style.css на темата.
   Цветовете от клиента са дефинирани в :root като CSS променливи.
   ========================================================================== */

:root {
  /* Клиентски палет (актуален)
     Син:    #5CACEE (steelblue2)
     Зелен:  #4EEE94 (seagreen2)
     Жълт:   #F0E68C (khaki)

     Предишен палет 2 (paleturquoise / palegreen / gold) — за бърз revert:
     --blue-900: #96CDCD;
     --blue-700: #96CDCD;
     --blue-600: #96CDCD;
     --blue-500: #96CDCD;
     --blue-400: #96CDCD;
     --blue-050: #eef8f8;
     --green:    #98FB98;
     --green-dk: #98FB98;
     --yellow:   #FFD700;
     --yellow-dk:#FFD700;

     Оригинален палет — за бърз revert:
     --blue-900: #003a80;
     --blue-700: #0052b3;
     --blue-600: #0066cc;
     --blue-500: #0066ff;
     --blue-400: #0099ff;
     --blue-050: #eaf3ff;
     --green:    #00cc33;
     --green-dk: #00a827;
     --yellow:   #ffdd33;
     --yellow-dk:#f5c400;
  */
  --blue-900: #5CACEE;
  --blue-700: #5CACEE;
  --blue-600: #5CACEE;   /* primary — steelblue2 */
  --blue-500: #5CACEE;
  --blue-400: #5CACEE;
  --blue-050: #eef5fc;
  --green:    #4EEE94;   /* seagreen2 */
  --green-dk: #4EEE94;
  --yellow:   #F0E68C;   /* khaki */
  --yellow-dk:#F0E68C;

  --ink:      #0f172a;
  --text:     #1f2937;
  --muted:    #64748b;
  --line:     #e5e7eb;
  --bg:       #ffffff;
  --bg-soft:  #f6f9fd;

  --radius:   14px;
  --radius-sm:10px;
  --shadow:   0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg:0 20px 50px rgba(15, 23, 42, .12);

  /* Шрифтов тест: базов вариант беше Inter и за заглавията; сега тестваме Manrope */
  --font-sans: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Manrope", "Inter", "Segoe UI", sans-serif;

  --container: 1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body > * { width: 100%; max-width: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--ink); margin: 0 0 .5em; line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; }

/* Layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--soft { background: var(--bg-soft); }

/* ==========================================================================
   Header  (WP: header.php)
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 24px; max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 44px; height: 44px; }
.brand-text {
  font-family: var(--font-head); font-weight: 700; color: var(--blue-600);
  line-height: 1.1; font-size: 13px; letter-spacing: .02em; text-transform: uppercase;
  white-space: nowrap;
}
.brand-text span { display: block; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; padding: 8px;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; height: 2px; background: var(--ink); border-radius: 2px;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; width: 100%; }
.nav-toggle span::after  { position: absolute; top:  7px; width: 100%; }

.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 20px; flex-wrap: wrap;
}
.primary-nav a {
  color: var(--ink); font-weight: 500; font-size: 14px;
  padding: 8px 2px; position: relative; white-space: nowrap;
}
.primary-nav a.active, .primary-nav a:hover { color: var(--blue-600); }
.primary-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--blue-600); border-radius: 2px;
}

.search-toggle {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink); cursor: pointer;
}
.search-toggle:hover, .search-toggle[aria-expanded="true"] { color: var(--blue-600); background: var(--bg-soft); }
.header-search {
  border-top: 1px solid var(--line); background: #fff; padding: 14px 0;
}
.header-search .search-form { margin-bottom: 0; max-width: 720px; }
.header-search[hidden] { display: none !important; }

.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  border: 0; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: var(--yellow-dk); color: var(--ink); }
.btn--blue   { background: var(--blue-600); color: #fff; }
.btn--blue:hover { background: var(--blue-700); color: #fff; }
.btn--green  { background: var(--green); color: var(--ink); }
.btn--green:hover { background: var(--green-dk); color: var(--ink); }
.btn--ghost  { background: transparent; color: var(--blue-600); border: 1.5px solid var(--blue-600); }
.btn--ghost:hover { background: var(--blue-050); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--blue-600); font-weight: 600; font-size: 14px;
}
.link-arrow::after { content: "\2192"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--blue-700) 0%, var(--blue-600) 55%, var(--blue-400) 100%);
  color: #fff; overflow: hidden;
  text-shadow: 0 0 4px rgba(0, 0, 0, .9), 0 1px 0 rgba(0, 0, 0, .5);
}
.hero-photo {
  position: absolute; top: 0; right: 0; bottom: 0; width: 62%;
  /* Маската избледнява снимката (и синия воал от ::before) плавно към фона — без видим ръб */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 28%, #000 55%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 28%, #000 55%);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0, 96, 195, .42) 0%, rgba(0, 58, 128, .25) 100%);
}
.hero-grid {
  position: relative; z-index: 2;
  padding: 88px 24px 108px; max-width: var(--container); margin: 0 auto;
}
.hero-copy { max-width: 980px; }
.hero .quote-mark {
  font-family: Georgia, serif; font-size: 90px; line-height: .8;
  color: var(--yellow); margin-bottom: 8px;
}
.hero h1 {
  color: #fff; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800;
  letter-spacing: -.01em;
}
.hero .author { color: #fff; font-weight: 500; margin: 24px 0 32px; font-size: 15px; }
.hero-actions {
  display: flex; gap: 12px; flex-wrap: nowrap; align-items: center;
}
.hero-actions .btn {
  white-space: nowrap; flex: 0 0 auto;
  padding: 14px 18px; font-size: 13px;
}

/* Feature strip */
.features {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  margin: -60px auto 0; max-width: calc(var(--container) - 48px); position: relative; z-index: 2;
  padding: 28px 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature + .feature { border-left: 1px solid var(--line); padding-left: 24px; }
.feature-icon { flex: 0 0 34px; width: 34px; height: 34px; }
.feature-icon svg { width: 100%; height: 100%; }
.feature-icon.icon-blue   { color: var(--blue-600); }
.feature-icon.icon-green  { color: var(--green); }
.feature-icon.icon-yellow { color: var(--yellow-dk); }
.feature strong { display: block; color: var(--ink); font-family: var(--font-head); font-size: 15px; }
.feature span   { color: var(--muted); font-size: 13px; }

/* ==========================================================================
   Category cards (3 главни рубрики)
   ========================================================================== */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 60px; height: 60px;
  border-radius: 50%; display: grid; place-items: center; color: var(--ink);
  box-shadow: 0 6px 20px rgba(0, 30, 70, .3); border: 3px solid rgba(255,255,255,.85);
}
.cat-badge svg { width: 28px; height: 28px; }
.cat-badge.blue  { background: var(--blue-600); }
.cat-badge.blue2 { background: var(--blue-400); }
.cat-badge.green { background: var(--green); }
.cat-body { padding: 22px 22px 24px; }
.cat-body h3 { color: var(--blue-600); margin-bottom: 10px; }
.cat-body p  { color: var(--muted); font-size: 15px; margin-bottom: 14px; }

/* ==========================================================================
   Mission band
   ========================================================================== */
.mission {
  background: var(--blue-050); border-radius: var(--radius); overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 0;
}
.mission-body { padding: 48px; }
.mission .eyebrow {
  color: var(--blue-600); font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px;
}
.mission-image { position: relative; min-height: 340px; }
.mission-image > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mission-logo {
  position: absolute; top: 0; right: 0; bottom: 0; width: 44%;
  background: var(--blue-700); color: #fff;
  display: grid; place-content: center; gap: 16px; text-align: center; padding: 24px;
  text-shadow: 0 0 4px rgba(0, 0, 0, .9), 0 1px 0 rgba(0, 0, 0, .5);
}
.mission-logo img { width: 110px; height: 110px; margin: 0 auto; border-radius: 50%; background: #fff; border: 7px #fff solid; }
.mission-logo span {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: .04em; line-height: 1.35;
}

/* ==========================================================================
   News + Blog dual column
   ========================================================================== */
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.dual .col-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px;
}
.dual h2 { color: var(--blue-600); font-size: 1.35rem; text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.two-col .post-list { grid-template-columns: repeat(2, 1fr); }
.post-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease;
}
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card img {
  /* Taller than the old 160px strip so faces/portraits crop less harshly */
  aspect-ratio: 3 / 2;
  height: auto;
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: center 22%;
  background: var(--blue-600);
}
.post-card__img--placeholder {
  /* Full-bleed branded tile — no nested padding/contain box */
  object-fit: cover;
  object-position: center;
}
.post-body { padding: 12px 14px 14px; }
.post-date { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.post-body h4 {
  font-size: 17px; line-height: 1.3; margin: 0 0 8px; color: var(--ink); font-weight: 700;
}
.post-body .link-arrow { font-size: 13px; margin-top: auto; }

/* ==========================================================================
   Upcoming trainings — date chips
   ========================================================================== */
.events-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.events-grid--archive { grid-template-columns: repeat(2, 1fr); }
.event {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px; display: flex; gap: 14px; align-items: flex-start;
}
a.event--card {
  color: inherit; text-decoration: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
a.event--card:hover {
  box-shadow: var(--shadow); transform: translateY(-2px); color: inherit;
}
a.event--card:hover p { color: var(--blue-600); }
.date-chip {
  flex: 0 0 auto; min-width: 54px; padding: 10px 8px;
  background: var(--yellow); color: var(--ink); border-radius: 8px;
  text-align: center; font-family: var(--font-head); line-height: 1;
}
.date-chip .d { font-size: 22px; font-weight: 800; display: block; }
.date-chip .m { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; display: block; }
.event p { font-size: 14px; margin: 0 0 6px; color: var(--ink); font-weight: 600; }
.event-when {
  display: block; color: var(--ink); font-size: 13px; font-weight: 600; margin-bottom: 4px;
}
.event-when--lg { font-size: 1.15rem; margin-bottom: 8px; }
.event-meta { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.event-single-meta {
  display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px;
}
.event-single-meta__body { padding-top: 2px; }
.tag {
  display: inline-block; font-size: 11px; padding: 4px 10px; border-radius: 999px;
  background: var(--blue-050); color: var(--blue-600); text-transform: uppercase; letter-spacing: .06em;
}
.tag--green { background: #e4f9ea; color: var(--green-dk); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery-grid a { border-radius: var(--radius-sm); overflow: hidden; display: block; aspect-ratio: 1/1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-grid a:hover img { transform: scale(1.05); }

.gallery-page { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery-page a { aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; }
.gallery-page img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Footer  (WP: footer.php)
   ========================================================================== */
.site-footer {
  background: var(--blue-700); color: #fff; padding: 56px 0 24px;
  text-shadow: 0 0 4px rgba(0, 0, 0, .9), 0 1px 0 rgba(0, 0, 0, .5);
  margin-top: auto;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); opacity: 1; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr 1fr; gap: 40px; }
.footer-grid h4 { color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.footer-grid a { color: #fff; }
.footer-grid a:hover { color: var(--yellow); opacity: 1; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 14px; }
.footer-brand p { margin-top: 14px; font-size: 13px; color: #fff; }
.footer-logo { border-radius: 50%; background: #fff; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.45);
  display: grid; place-items: center; color: #fff;
  text-shadow: none;
}
.contact-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); }
.contact-list a[href^="tel:"] { white-space: nowrap; }
.contact-person { display: flex; flex-direction: column; gap: 2px; }
.contact-person strong { color: var(--ink); font-weight: 600; }
.contact-list .ico {
  color: #000; flex: 0 0 auto; display: inline-flex; margin-top: 3px;
  filter: none;
}
.contact-list .mail-link { color: var(--blue-600); }
.contact-list .mail-link:hover { color: var(--blue-700); opacity: 1; }
/* Footer contact list — бял текст и сянка върху синия фон */
.site-footer .contact-list li { color: #fff; }
.site-footer .contact-person strong { color: #fff; }
.site-footer .contact-list .ico {
  color: var(--yellow);
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, .9)) drop-shadow(0 1px 0 rgba(0, 0, 0, .5));
}
.site-footer .contact-list .mail-link { color: #fff; }
.site-footer .contact-list .mail-link:hover { color: var(--yellow); opacity: 1; }
.btn--block { width: 100%; justify-content: center; }
.map-box {
  background: #e5eef8; border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 4/3; margin-top: 14px;
}
.map-box iframe, .map-box img { width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.25); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 20px; font-size: 13px; flex-wrap: wrap;
}
.site-footer .btn--green,
.site-footer .btn--yellow {
  color: var(--ink);
  text-shadow: none;
}
.site-footer .btn--green:hover,
.site-footer .btn--yellow:hover {
  color: var(--ink);
  opacity: 1;
}
.site-footer .btn--blue {
  color: #fff;
  text-shadow: none;
}
.hero .btn { text-shadow: none; }

/* ==========================================================================
   Inner pages
   ========================================================================== */
.page-hero {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff; padding: 64px 0;
  text-shadow: 0 0 4px rgba(0, 0, 0, .9), 0 1px 0 rgba(0, 0, 0, .5);
}
.page-hero h1 { color: #fff; margin: 0 0 8px; }
.breadcrumbs { color: #fff; font-size: 14px; margin: 0 0 14px; line-height: 1.4; }
.breadcrumbs a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs a:hover { color: var(--yellow); }

.two-col { display: grid; grid-template-columns: 260px 1fr; gap: 48px; }
.side-nav { position: sticky; top: 96px; align-self: start; }
.side-nav h4 { color: var(--blue-600); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.side-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.side-nav a {
  display: block; padding: 10px 14px; border-radius: 8px; color: var(--ink);
  font-size: 14px; border-left: 3px solid transparent;
}
.side-nav a:hover { background: var(--bg-soft); }
.side-nav a.active { background: var(--blue-050); color: var(--blue-600); border-left-color: var(--blue-600); font-weight: 600; }

.prose h2 { color: var(--blue-600); margin-top: 1.8em; }
.prose h3 { color: var(--ink); margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
  border-left: 4px solid var(--yellow);
  padding: 8px 20px; margin: 1.6em 0; color: var(--muted); font-style: italic;
  background: var(--bg-soft);
}

/* Full prose/editor typography lives in assets/css/content.css */

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
.team-card__photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}
.team-card__name {
  margin: 12px 0 4px;
  font-size: 1.05rem;
  color: var(--ink);
  text-align: center;
}
.team-card__role {
  margin: 0;
  color: var(--blue-600);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}
@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .team-grid { grid-template-columns: 1fr; }
}

.team-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  text-align: center;
  padding: 0;
}

/* Single post / search reading column (centered inside .container) */
.reading {
  max-width: 880px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.reading .cover,
.single .cover {
  aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; margin: 20px 0 30px;
}
.reading .cover img,
.single .cover img { width: 100%; height: 100%; object-fit: cover; }
.back-link {
  display: inline-block; margin-top: 32px; font-weight: 600; color: var(--blue-600);
}
.back-link:hover { color: var(--blue-700); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.form-field { display: grid; gap: 6px; margin-bottom: 16px; }
.form-field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; background: #fff; color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid var(--blue-400); outline-offset: 1px; border-color: var(--blue-400);
}
.form-field textarea { min-height: 140px; resize: vertical; }

/* 404 / Search */
.center-msg { text-align: center; padding: 100px 24px; }
.center-msg .code {
  font-family: var(--font-head); font-size: 120px; font-weight: 800;
  color: var(--blue-600); line-height: 1; margin: 0;
}

.post-cats { display: inline; }
.post-cats a { color: var(--blue-600); }
.reading .meta,
.single .meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
  color: var(--muted); font-size: 14px; margin-bottom: 20px;
}

/* Structured single-post meta (author / date / category) */
.entry-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 20px;
  margin: 0 0 28px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.entry-meta__item {
  margin: 0;
  min-width: 0;
}
.entry-meta__label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.entry-meta__label svg {
  flex-shrink: 0;
  color: var(--blue-600);
}
.entry-meta__value {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-word;
}
.entry-meta__value a {
  color: var(--blue-600);
  text-decoration: none;
}
.entry-meta__value a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 700px) {
  .entry-meta {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.page-hero__lead { color: rgba(255,255,255,.85); max-width: 640px; margin: 8px 0 0; }

/* Search results */
.search-form { display: flex; gap: 10px; margin-bottom: 32px; }
.search-form input {
  flex: 1; padding: 14px 18px; font-size: 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.result-item {
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.result-item h3 { margin: 0 0 6px; }
.result-item h3 a { color: var(--ink); }
.result-item h3 a:hover { color: var(--blue-600); }
.result-item .kind {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--blue-600); margin-bottom: 6px;
}
.result-item .kind--events { color: var(--green-dk); }
.result-meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.result-excerpt { color: var(--ink); font-size: 15px; }
.result-excerpt p { margin: 0; }
.search-empty__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* Numbered pagination */
.pagination-wrap { margin-top: 40px; }
.aisys-pagination .nav-links,
.navigation.pagination .nav-links {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center;
}
.aisys-pagination .page-numbers,
.navigation.pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.aisys-pagination .page-numbers:hover,
.navigation.pagination .page-numbers:hover {
  border-color: var(--blue-600); color: var(--blue-600);
}
.aisys-pagination .page-numbers.current,
.navigation.pagination .page-numbers.current {
  background: var(--blue-600); border-color: var(--blue-600); color: #fff;
}
.aisys-pagination .page-numbers.dots,
.navigation.pagination .page-numbers.dots {
  border: 0; background: transparent; min-width: auto;
}

/* ==========================================================================
   Section heads
   ========================================================================== */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 28px;
}
.sec-head h2 {
  color: var(--blue-600); font-size: 1.35rem; text-transform: uppercase; letter-spacing: .06em; margin: 0;
}
.sec-head .link-arrow, .col-head .link-arrow { color: var(--green-dk); }
.sec-head .link-arrow:hover, .col-head .link-arrow:hover { color: var(--green); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid { padding: 56px 24px 80px; }
  .hero-photo { width: 100%; }
  .hero-photo::before {
    background: linear-gradient(90deg, rgba(0, 82, 179, .93) 0%, rgba(0, 96, 195, .82) 100%);
  }
  .hero-actions { flex-wrap: wrap; }
  .features { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .feature + .feature { border-left: 0; padding-left: 0; }
  .mission-logo { position: static; width: auto; padding: 20px; }
  .mission-image { display: grid; grid-template-columns: 1.4fr 1fr; }
  .mission-image > img { position: static; }
  .cat-grid { grid-template-columns: 1fr; }
  .mission { grid-template-columns: 1fr; }
  .mission-image { min-height: 260px; }
  .dual { grid-template-columns: 1fr; gap: 48px; }
  .events-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-page { grid-template-columns: repeat(3, 1fr); }
  .team-grid   { grid-template-columns: repeat(2, 1fr); }
  .two-col     { grid-template-columns: 1fr; }
  .side-nav    { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid{ grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .nav-toggle { display: block; }
  .primary-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); padding: 16px 24px;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 6px; }
  .primary-nav a { display: block; padding: 10px 0; }
  .header-inner { flex-wrap: wrap; }
  .search-toggle { order: 3; margin-left: auto; }
  .nav-toggle { order: 4; }
  .primary-nav { order: 5; width: 100%; }
  .features { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: 1fr; }
  .events-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-page { grid-template-columns: repeat(2, 1fr); }
  .team-grid   { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mission-body { padding: 32px 24px; }
  .brand-text { font-size: 12px; }
  .brand img { width: 38px; height: 38px; }
}
