/*
Theme Name: Центр ОГЗЗО
Description: Проста тема для сайту КЗ «Центр організаційно-господарського забезпечення закладів освіти». Без головного меню; контакти та карта Google у підвалі.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: centr-ogzzo
*/

:root {
  --blue: #14407A;
  --blue-deep: #0E2E57;
  --yellow: #F2B705;
  --ink: #1A2433;
  --muted: #5B6676;
  --line: #D8DEE7;
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--yellow); color: var(--ink); padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* Шапка */
.site-header {
  background: var(--blue);
  color: #fff;
  border-bottom: 6px solid var(--yellow);
}
.site-header__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 1.5rem;
}
.brand-wrap { display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.logo {
  flex: none;
  background: #fff;
  border-radius: 6px;
  padding: .45rem;
  line-height: 0;
}
.logo a { display: block; }
.logo .custom-logo { height: 72px; width: auto; max-width: 160px; object-fit: contain; }
.brand { color: #fff; text-decoration: none; max-width: 46rem; }
.brand:hover { color: #fff; }
.brand__type { display: block; font-size: .95rem; opacity: .85; margin-bottom: .2rem; }
.brand__name {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.9rem);
  line-height: 1.25;
}
.contact-link {
  flex: none;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: .55rem 1.1rem;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 4px;
}
.contact-link:hover { background: #fff; color: var(--blue); border-color: #fff; }

/* Основна область */
.site-main { padding-block: 2.5rem 3.5rem; }
.page-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
}

/* Список публікацій */
.feed { display: grid; gap: 1.75rem; }
.item {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.item--noimg { grid-template-columns: minmax(0, 1fr); }
.item__img { display: block; background: var(--line); }
.item__img img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.item__body { padding: 1.5rem 1.75rem; display: flex; flex-direction: column; justify-content: center; }
.meta { color: var(--muted); font-size: .95rem; margin: 0 0 .4rem; }
.item__title {
  font-family: var(--serif);
  font-size: 1.45rem;
  line-height: 1.3;
  margin: 0 0 .6rem;
}
.item__title a { color: var(--ink); text-decoration: none; }
.item__title a:hover { color: var(--blue); text-decoration: underline; }
.item__text { margin: 0; color: #36404F; }

/* Пагінація */
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.pagination .page-numbers {
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  text-decoration: none;
}
.pagination .current { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Окрема публікація і сторінка */
.entry { max-width: 46rem; margin-inline: auto; }
.entry__title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 1.25rem;
}
.entry__image { margin: 0 0 2rem; }
.entry__image img { width: 100%; border-radius: 4px; }
.entry__image figcaption { color: var(--muted); font-size: .9rem; margin-top: .5rem; }
.entry--single { max-width: 52rem; }
.entry__content { font-family: var(--serif); font-size: 1.125rem; line-height: 1.75; }
.entry__content > * { max-width: 42rem; }
.entry__content h2, .entry__content h3 { font-family: var(--serif); line-height: 1.3; margin-top: 2rem; }
.entry__content img, .entry__content figure { max-width: 100%; }
.entry__content table { border-collapse: collapse; width: 100%; max-width: 100%; font-family: var(--sans); font-size: 1rem; }
.entry__content th, .entry__content td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.entry__content blockquote { margin-inline: 0; padding-left: 1.2rem; border-left: 4px solid var(--yellow); }
.back { display: inline-block; margin-top: 2.5rem; font-weight: 600; }

/* Підвал: контакти і карта */
.site-footer { background: var(--blue-deep); color: #E8EEF7; border-top: 6px solid var(--yellow); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 2.5rem;
  padding-block: 2.75rem;
}
.footer-grid h2 { font-family: var(--serif); font-size: 1.5rem; margin: 0 0 1rem; color: #fff; }
.footer-org { margin: 0 0 1rem; opacity: .85; }
.site-footer address { font-style: normal; margin: 0 0 .75rem; }
.site-footer p { margin: 0 0 .5rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.map { min-height: 300px; border-radius: 4px; overflow: hidden; background: var(--blue); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 300px; border: 0; }
.copy { border-top: 1px solid rgba(255,255,255,.18); padding-block: 1rem; font-size: .9rem; opacity: .8; }

/* 404 */
.notfound { text-align: left; max-width: 40rem; }

@media (max-width: 760px) {
  .site-header__in { flex-direction: column; align-items: flex-start; }
  .brand-wrap { align-items: flex-start; }
  .logo .custom-logo { height: 56px; max-width: 120px; }
  .item { grid-template-columns: minmax(0, 1fr); }
  .item__body { padding: 1.25rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
