/* ==========================================================================
   Вінницький професійний коледж сфери послуг — дизайн-система
   Глибокий синій + світлі нейтральні + золотий акцент. Системні шрифти.
   ========================================================================== */

/* --- Токени --------------------------------------------------------------- */
:root {
  --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system,
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system,
    Roboto, "Helvetica Neue", Arial, sans-serif;

  --c-navy: #0e2f55;
  --c-navy-deep: #0a2340;
  --c-navy-soft: #16406e;
  --c-blue: #1d5fa7;
  --c-blue-hover: #17508f;
  --c-blue-ring: rgba(29, 95, 167, 0.35);
  --c-gold: #c1922b;
  --c-gold-hover: #a87d1f;
  --c-gold-soft: #f6ecd2;
  --c-ink: #1b2a3a;
  --c-muted: #57677a;
  --c-line: #dce4ee;
  --c-line-soft: #e8eef5;
  --c-bg: #f5f8fc;
  --c-bg-alt: #edf2f9;
  --c-surface: #ffffff;
  --c-danger: #b3372f;
  --c-ok: #2c7a4b;

  --shadow-xs: 0 1px 2px rgba(14, 47, 85, 0.06);
  --shadow-sm: 0 2px 8px rgba(14, 47, 85, 0.08);
  --shadow-md: 0 8px 24px rgba(14, 47, 85, 0.1);
  --shadow-lg: 0 18px 48px rgba(14, 47, 85, 0.16);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --container: 1200px;
  --header-h: 72px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --- База ----------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video,
iframe {
  max-width: 100%;
  height: auto;
}

img {
  border-style: none;
}

a {
  color: var(--c-blue);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

a:hover {
  color: var(--c-blue-hover);
}

:focus-visible {
  outline: 3px solid var(--c-blue-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--c-navy);
  line-height: 1.22;
  margin: 0 0 0.6em;
  font-weight: 650;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.3vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p {
  margin: 0 0 1.1em;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--c-navy);
  color: #fff;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* --- Кнопки --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--c-blue);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.btn--primary:hover {
  background: var(--c-blue-hover);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--gold {
  background: var(--c-gold);
  color: #fff;
}

.btn--gold:hover {
  background: var(--c-gold-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--c-navy);
  border-color: var(--c-line);
}

.btn--ghost:hover {
  border-color: var(--c-blue);
  color: var(--c-blue);
  background: rgba(29, 95, 167, 0.05);
}

/* --- Верхня панель + хедер ------------------------------------------------ */
.topbar {
  background: var(--c-navy-deep);
  color: #cfdcec;
  font-size: 0.85rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  flex-wrap: wrap;
  padding-block: 4px;
}

.topbar a {
  color: #e7eef7;
}

.topbar a:hover {
  color: #fff;
}

.topbar__contacts {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.topbar__contacts span,
.topbar__contacts a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar__socials {
  display: flex;
  gap: 8px;
}

.topbar__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.18s var(--ease);
}

.topbar__socials a:hover {
  background: var(--c-gold);
}

.topbar__socials svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line-soft);
  transition: box-shadow 0.25s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 28px;
  row-gap: 4px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--c-navy);
  min-width: 0;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--c-navy);
}

.brand__logo {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.brand__sub {
  font-size: 0.78rem;
  color: var(--c-muted);
  line-height: 1.3;
  margin-top: 2px;
}

/* --- Навігація ------------------------------------------------------------ */
.nav {
  min-width: 0;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  row-gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__item {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  color: var(--c-ink);
  font-weight: 550;
  font-size: 0.94rem;
  border-radius: var(--r-sm);
  white-space: nowrap;
}

.nav__link:hover,
.nav__item.is-open > .nav__link {
  color: var(--c-blue);
  background: rgba(29, 95, 167, 0.06);
}

.nav__item.is-active > .nav__link {
  color: var(--c-blue);
}

.nav__item.is-active > .nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-gold);
}

.nav__caret {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.55;
  transition: transform 0.2s var(--ease);
}

.nav__item.is-open > .nav__link .nav__caret {
  transform: rotate(225deg) translateY(-1px);
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 300px;
  max-width: 720px;
  padding: 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 60;
}

.nav__item.is-open > .dropdown,
.nav__item:hover > .dropdown,
.nav__item:focus-within > .dropdown {
  display: block;
  animation: dropIn 0.18s var(--ease);
}

.nav__item.is-open > .dropdown--wide,
.nav__item:hover > .dropdown--wide,
.nav__item:focus-within > .dropdown--wide {
  display: grid;
}

.dropdown--right {
  left: auto;
  right: 0;
}

@keyframes dropIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dropdown--wide {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 4px 20px;
  padding: 14px 18px;
}

.dropdown__group-label {
  grid-column: 1 / -1;
  margin: 8px 0 2px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-gold-hover);
}

.dropdown__link {
  display: block;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--c-ink);
  font-size: 0.9rem;
  line-height: 1.4;
}

.dropdown__link:hover {
  background: var(--c-bg-alt);
  color: var(--c-blue);
}

.dropdown__link.is-current {
  color: var(--c-blue);
  font-weight: 600;
}

.dropdown__nested {
  margin: 2px 0 6px 14px;
  padding-left: 10px;
  border-left: 2px solid var(--c-line-soft);
}

.dropdown__nested .dropdown__link {
  font-size: 0.85rem;
  color: var(--c-muted);
  padding: 5px 8px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-navy);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease),
    background 0.18s var(--ease);
}

.icon-btn:hover {
  border-color: var(--c-blue);
  color: var(--c-blue);
  background: rgba(29, 95, 167, 0.05);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.burger {
  display: none;
}

/* --- Мобільне меню -------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
  visibility: hidden;
}

.mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--c-line);
  min-height: 64px;
}

.mobile-nav__body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 30px;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 12px;
  border: 0;
  border-bottom: 1px solid var(--c-line-soft);
  background: none;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-ink);
  text-align: left;
  cursor: pointer;
}

.mobile-nav__link.is-current {
  color: var(--c-blue);
}

.mobile-nav__toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-navy);
  cursor: pointer;
  transition: transform 0.25s var(--ease);
}

.mobile-nav__toggle[aria-expanded="true"] {
  transform: rotate(180deg);
  color: var(--c-blue);
}

.mobile-nav__toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

.mobile-nav__submenu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 4px 0 10px 14px;
  border-left: 2px solid var(--c-line-soft);
  margin-left: 12px;
}

.mobile-nav__submenu.is-open {
  display: block;
}

.mobile-nav__sublink {
  display: block;
  padding: 9px 10px;
  color: var(--c-muted);
  font-size: 0.92rem;
  border-radius: var(--r-sm);
}

.mobile-nav__sublink:hover,
.mobile-nav__sublink.is-current {
  color: var(--c-blue);
  background: var(--c-bg-alt);
}

.mobile-nav__group-label {
  padding: 12px 12px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--c-gold-hover);
}

body.nav-locked {
  overflow: hidden;
}

/* --- Герой (головна) ------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-navy-deep) 0%, var(--c-navy) 55%, var(--c-navy-soft) 100%);
  color: #eaf1fa;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(720px 360px at 85% -10%, rgba(193, 146, 43, 0.22), transparent 65%),
    radial-gradient(560px 320px at -10% 110%, rgba(29, 95, 167, 0.35), transparent 60%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: clamp(38px, 6vw, 72px) 0;
  flex-wrap: wrap;
}

.hero__emblem {
  width: clamp(96px, 12vw, 148px);
  height: clamp(96px, 12vw, 148px);
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
}

.hero__body {
  flex: 1 1 420px;
  min-width: 0;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-gold-soft);
}

.hero__title {
  color: #fff;
  font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.7rem);
  font-weight: 700;
  margin-bottom: 10px;
  text-wrap: balance;
}

.hero__subtitle {
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.15rem);
  color: #b9cbe2;
  margin: 0;
  max-width: 62ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero__actions .btn--ghost {
  color: #eaf1fa;
  border-color: rgba(255, 255, 255, 0.35);
}

.hero__actions .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* --- Швидкі посилання ----------------------------------------------------- */
.quicklinks {
  position: relative;
  margin-top: -34px;
  z-index: 5;
}

.quicklinks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
}

.quickcard {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  color: var(--c-navy);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.quickcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(29, 95, 167, 0.35);
  color: var(--c-navy);
}

.quickcard__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: linear-gradient(140deg, var(--c-bg-alt), #dfe9f6);
  color: var(--c-blue);
}

.quickcard__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.quickcard__label {
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.3;
}

.quickcard__hint {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--c-muted);
}

/* --- Банери --------------------------------------------------------------- */
.promo {
  margin: 26px 0 0;
}

.promo a {
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-line-soft);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.promo a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.promo img {
  display: block;
  width: 100%;
}

/* --- Секції --------------------------------------------------------------- */
.section {
  padding: clamp(34px, 5vw, 58px) 0;
}

.section--alt {
  background: var(--c-bg-alt);
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.section__title {
  margin: 0;
  position: relative;
  padding-left: 18px;
}

.section__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  bottom: 0.18em;
  width: 5px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--c-gold), var(--c-blue));
}

.section__more {
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.section__more::after {
  content: "→";
  transition: transform 0.18s var(--ease);
}

.section__more:hover::after {
  transform: translateX(4px);
}

/* --- Новини / картки ------------------------------------------------------ */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
  height: 100%;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--c-bg-alt);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.card:hover .card__media img {
  transform: scale(1.045);
}

.card__date {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(10, 35, 64, 0.82);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px 18px;
  flex: 1;
}

.card__title {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 650;
  line-height: 1.35;
}

.card__title a {
  color: var(--c-navy);
}

.card__title a:hover {
  color: var(--c-blue);
}

.card__excerpt {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__more {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card--plain .card__media {
  display: none;
}

.card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-bg-alt), #d9e5f3);
  color: var(--c-navy);
  font-weight: 700;
  font-size: 2rem;
  opacity: 0.5;
}

/* --- Бічна панель --------------------------------------------------------- */
.side-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.side-panel__head {
  margin: 0;
  padding: 16px 20px;
  font-size: 1.05rem;
  background: linear-gradient(120deg, var(--c-navy), var(--c-navy-soft));
  color: #fff;
}

.side-panel__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.side-item {
  display: flex;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line-soft);
}

.side-item:last-child {
  border-bottom: 0;
}

.side-item__media {
  flex-shrink: 0;
  width: 84px;
  height: 64px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--c-bg-alt);
}

.side-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.side-item__title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.35;
}

.side-item__title a {
  color: var(--c-navy);
}

.side-item__title a:hover {
  color: var(--c-blue);
}

.side-item__date {
  font-size: 0.78rem;
  color: var(--c-gold-hover);
  font-weight: 600;
}

.side-item__excerpt {
  margin: 4px 0 0;
  font-size: 0.83rem;
  color: var(--c-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Хлібні крихти -------------------------------------------------------- */
.breadcrumbs {
  padding: 18px 0 0;
  font-size: 0.86rem;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--c-muted);
}

.breadcrumbs__list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs__list li + li::before {
  content: "/";
  color: #9db0c4;
}

.breadcrumbs a {
  color: var(--c-muted);
}

.breadcrumbs a:hover {
  color: var(--c-blue);
}

/* --- Контентні сторінки --------------------------------------------------- */
.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
  padding: 10px 0 clamp(40px, 6vw, 70px);
}

.page-shell--wide {
  grid-template-columns: minmax(0, 1fr);
}

.page-head {
  padding: clamp(18px, 3vw, 30px) 0 8px;
}

.page-head h1 {
  margin-bottom: 8px;
}

.page-head__meta {
  color: var(--c-muted);
  font-size: 0.92rem;
}

.content {
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xs);
  padding: clamp(22px, 3.5vw, 40px);
}

.content > :first-child {
  margin-top: 0;
}

.content > :last-child {
  margin-bottom: 0;
}

/* заголовок статті всередині контенту (оригінальний entry-title) */
.content h1 {
  margin: 0 0 0.55em;
  font-size: clamp(1.55rem, 1.1rem + 1.9vw, 2.15rem);
  line-height: 1.22;
}

.content h2,
.content h3,
.content h4 {
  margin-top: 1.6em;
}

.content a {
  text-decoration: underline;
  text-decoration-color: rgba(29, 95, 167, 0.35);
  text-underline-offset: 2px;
}

.content a:hover {
  text-decoration-color: currentColor;
}

.content img {
  display: block;
  margin: 1.4em auto;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-line-soft);
}

.content figure {
  margin: 1.5em 0;
  text-align: center;
}

.content figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--c-muted);
}

.content blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--c-gold);
  background: var(--c-gold-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--c-ink);
  font-style: italic;
}

.content table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 0.94rem;
  display: block;
  overflow-x: auto;
}

.content th,
.content td {
  border: 1px solid var(--c-line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.content th {
  background: var(--c-bg-alt);
  color: var(--c-navy);
  font-weight: 650;
}

.content ul,
.content ol {
  padding-left: 1.4em;
  margin: 0 0 1.1em;
}

.content li {
  margin-bottom: 0.4em;
}

.content hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: 2em 0;
}

.content .wp-caption,
.content .gallery,
.content dl {
  max-width: 100%;
}

.content iframe {
  border: 0;
  border-radius: var(--r-md);
  margin: 1.2em 0;
}

.content .et_pb_image_main,
.content .et_pb_text_inner {
  max-width: 100%;
}

.content .wpcf7-form,
.content form {
  margin: 1.2em 0;
}

/* --- Бічна колонка сторінок ----------------------------------------------- */
.aside-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 20px;
}

.aside-card h2,
.aside-card h3 {
  font-size: 1.02rem;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--c-gold-soft);
}

.aside-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aside-card li {
  border-bottom: 1px solid var(--c-line-soft);
}

.aside-card li:last-child {
  border-bottom: 0;
}

.aside-card a {
  display: block;
  padding: 9px 2px;
  color: var(--c-ink);
  font-size: 0.92rem;
}

.aside-card a:hover {
  color: var(--c-blue);
}

/* --- Сторінка новини ------------------------------------------------------ */
.post-hero-img {
  margin: 0 0 26px;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.post-hero-img img {
  display: block;
  width: 100%;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 22px;
  color: var(--c-muted);
  font-size: 0.9rem;
}

.post-meta time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  color: var(--c-gold-hover);
}

.tag {
  display: inline-flex;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  background: var(--c-bg-alt);
  color: var(--c-navy);
  font-size: 0.78rem;
  font-weight: 600;
}

/* --- Пагінація ------------------------------------------------------------ */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-surface);
  color: var(--c-ink);
  font-weight: 600;
  font-size: 0.92rem;
}

.pagination a:hover {
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.pagination .is-current {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: #fff;
}

/* --- Пошук (модалка) ------------------------------------------------------ */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 20px 20px;
  background: rgba(10, 35, 64, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  /* visibility миттєво ховається лише після завершення fade-out */
  transition: opacity 0.22s var(--ease), visibility 0s 0.22s;
}

.search-modal.is-open {
  opacity: 1;
  visibility: visible;
  /* а при відкритті — одразу, щоб input міг отримати фокус у тому ж кадрі */
  transition: opacity 0.22s var(--ease), visibility 0s 0s;
}

.search-modal__panel {
  width: min(680px, 100%);
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-12px);
  transition: transform 0.22s var(--ease);
}

.search-modal.is-open .search-modal__panel {
  transform: translateY(0);
}

.search-modal__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line);
}

.search-modal__bar svg {
  width: 20px;
  height: 20px;
  stroke: var(--c-muted);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.search-modal__input {
  flex: 1;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1.05rem;
  color: var(--c-ink);
  background: none;
  min-width: 0;
}

.search-modal__results {
  max-height: 54vh;
  overflow-y: auto;
  margin: 0;
  padding: 8px;
  list-style: none;
}

.search-modal__results a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  color: var(--c-ink);
}

.search-modal__results a:hover,
.search-modal__results a:focus-visible {
  background: var(--c-bg-alt);
  color: var(--c-blue);
}

.search-modal__results .s-title {
  display: block;
  font-weight: 650;
  color: var(--c-navy);
}

.search-modal__results .s-path {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--c-muted);
}

.search-modal__empty {
  padding: 22px;
  text-align: center;
  color: var(--c-muted);
}

/* --- Зворотний зв'язок ---------------------------------------------------- */
.contact-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 26px 30px;
  background: linear-gradient(120deg, var(--c-navy), var(--c-navy-soft));
  border-radius: var(--r-lg);
  color: #dbe7f5;
  margin: clamp(30px, 5vw, 54px) 0 0;
}

.contact-strip h2 {
  color: #fff;
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.contact-strip p {
  margin: 0;
  font-size: 0.95rem;
}

.contact-strip__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-strip a.btn--ghost {
  color: #eaf1fa;
  border-color: rgba(255, 255, 255, 0.4);
}

.contact-strip a.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* --- Підвал --------------------------------------------------------------- */
.site-footer {
  margin-top: clamp(40px, 6vw, 70px);
  background: var(--c-navy-deep);
  color: #b7c7dc;
  font-size: 0.92rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr 1fr;
  gap: 34px;
  padding: clamp(34px, 5vw, 56px) 0 30px;
}

.site-footer h2 {
  color: #fff;
  font-size: 1.02rem;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(193, 146, 43, 0.55);
  display: inline-block;
}

.site-footer a {
  color: #cfdcec;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer p {
  margin: 0 0 0.8em;
}

.site-footer strong {
  color: #e7eef7;
}

.footer-contacts dl {
  margin: 0;
}

.footer-contacts dt {
  margin-top: 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.footer-contacts dd {
  margin: 3px 0 0;
  line-height: 1.55;
}

.footer-map {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 200px;
  background: rgba(255, 255, 255, 0.06);
}

.footer-map iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
  filter: saturate(0.85);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 7px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 16px 0 20px;
  font-size: 0.86rem;
}

.site-footer__bottom-inner .author-credit {
  font-weight: 600;
  color: #e7eef7;
}

.site-footer__bottom-inner .author-credit a {
  color: var(--c-gold);
}

.site-footer__bottom-inner .author-credit a:hover {
  color: #fff;
}

/* --- Анімаці появи -------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- 404 ------------------------------------------------------------------ */
.error-page {
  text-align: center;
  padding: clamp(60px, 12vh, 130px) 20px;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  color: var(--c-navy);
  line-height: 1;
  margin: 0;
}

.error-page p {
  color: var(--c-muted);
  margin: 14px auto 26px;
  max-width: 46ch;
}

/* --- Адаптив -------------------------------------------------------------- */
@media (max-width: 1100px) {
  .news-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 26px;
  }
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .burger {
    display: inline-flex;
  }
  .news-layout,
  .page-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .brand__sub {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .site-header__inner {
    justify-content: flex-start;
  }
  .brand {
    flex-shrink: 1;
    max-width: 100%;
  }
  .brand__title {
    overflow-wrap: anywhere;
  }
  .container {
    width: min(100% - 28px, var(--container));
  }
  .topbar__inner {
    justify-content: center;
    text-align: center;
  }
  .hero__inner {
    text-align: center;
    justify-content: center;
  }
  .hero__actions {
    justify-content: center;
  }
  .quicklinks {
    margin-top: -22px;
  }
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .contact-strip {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .brand__title {
    font-size: 0.92rem;
  }
  .brand__logo {
    width: 44px;
    height: 44px;
  }
  .site-footer__bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}
