/* Cathedrals Guide - main stylesheet. Design tokens first, then layout, then components. */

:root {
  --ink: #2a211d;
  --ink-2: #4d403a;
  --muted: #7f7168;
  --line: #e7ddd1;
  --paper: #f7f2ea;
  --card: #fffdf9;
  --brand: #7a2433;
  --brand-dark: #561824;
  --brand-soft: #f4e5e2;
  --sky: #ece2d4;
  --accent: #9a6a17;
  --accent-dark: #7a520f;
  --gold-soft: #f2e3c3;
  --amber-soft: #fbf2de;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(42, 33, 29, .06), 0 8px 24px rgba(42, 33, 29, .07);
  --font: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: 0; font-family: var(--font-head); color: var(--ink); }
h1 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; }
h2 { font-size: 26px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.screen-reader-text:focus { position: static; width: auto; height: auto; clip: auto; background: var(--card); padding: 8px; }

.vg-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.vg-main { min-height: 60vh; padding-bottom: 60px; }
.vg-section { margin: 48px 0; }
.vg-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.vg-h2 { font-size: 24px; margin: 0 0 18px; }
.vg-more { font-weight: 600; white-space: nowrap; }

/* ---------- header ---------- */
.vg-header { background: var(--card); border-bottom: 1px solid var(--line); border-top: 3px solid var(--brand); position: sticky; top: 0; z-index: 50; }
.vg-header-inner { display: flex; align-items: center; gap: 24px; min-height: 66px; }
.vg-brand { display: inline-flex; align-items: center; }
.vg-logo { display: block; }
.vg-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; min-width: 0; }
/* Пункти меню й перемикач мов не стискаються (інакше стрілка ">" падає на
 * другий рядок), увесь запас ширини забирає пошук. */
.vg-nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex: 0 0 auto; }
.vg-lang { flex: 0 0 auto; }
.vg-nav-search { flex: 0 1 260px; min-width: 0; }
.vg-nav-search .vg-search input { min-width: 0; width: 100%; }
.vg-nav-item { position: relative; }
.vg-nav-item > a { display: block; padding: 10px 12px; color: var(--ink); font-weight: 600; border-radius: var(--radius-sm); white-space: nowrap; }
.vg-nav-item > a:hover, .vg-nav-item:focus-within > a { background: var(--paper); text-decoration: none; }
.vg-has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: 0 0 3px 8px; opacity: .6; }
.vg-sub { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: none; columns: 1; z-index: 60; }
.vg-nav-item:hover .vg-sub, .vg-nav-item:focus-within .vg-sub { display: block; }
.vg-sub li a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; color: var(--ink); border-radius: 6px; }
.vg-sub li a:hover { background: var(--paper); text-decoration: none; }
.vg-sub-all a { color: var(--brand); font-weight: 600; }
.vg-count { color: var(--muted); font-weight: 500; font-size: .9em; }
.vg-nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); width: 44px; height: 40px; padding: 8px 10px; margin-left: auto; cursor: pointer; }
.vg-nav-toggle span:not(.screen-reader-text) { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- search ---------- */
.vg-search { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; background: var(--card); overflow: hidden; }
.vg-search input { border: 0; padding: 9px 16px; font: inherit; font-size: 15px; min-width: 210px; background: transparent; outline: none; color: var(--ink); }
.vg-search button { border: 0; background: var(--brand); color: #fff; padding: 0 14px; cursor: pointer; display: inline-flex; align-items: center; }
.vg-search button:hover { background: var(--brand-dark); }
.vg-hero-search .vg-search { max-width: 560px; margin: 0 auto; font-size: 17px; box-shadow: var(--shadow); }
.vg-hero-search .vg-search input { padding: 15px 22px; font-size: 17px; flex: 1; }
.vg-hero-search .vg-search button { padding: 0 20px; }

/* ---------- hero band ---------- */
.vg-hero-band { background: radial-gradient(1200px 400px at 50% -80px, var(--gold-soft) 0%, rgba(242,227,195,0) 70%), linear-gradient(180deg, #efe4d3 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); padding: 64px 0 48px; text-align: center; }
.vg-hero-inner h1 { max-width: 760px; margin: 0 auto 14px; }
.vg-lead { font-size: 19px; color: var(--ink-2); max-width: 640px; margin: 0 auto 26px; }
.vg-chips-hero { justify-content: center; margin-top: 22px; }

/* ---------- page head / breadcrumbs ---------- */
.vg-crumbs { padding: 18px 0 6px; font-size: 14px; color: var(--muted); }
.vg-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.vg-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.vg-crumbs a { color: var(--muted); }
.vg-page-head { padding: 12px 0 8px; }
.vg-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.vg-kicker a { color: inherit; }
.vg-intro { font-size: 18px; color: var(--ink-2); max-width: 780px; }
.vg-head-cta { margin: 6px 0 10px; }
.vg-backlink { margin: 8px 0 0; font-weight: 600; }

/* ---------- buttons / chips ---------- */
.vg-btn { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer; line-height: 1.2; }
.vg-btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.vg-btn-block { display: block; text-align: center; }
.vg-btn-ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand-soft); padding: 10px 18px; }
.vg-btn-ghost:hover { background: var(--brand-soft); color: var(--brand-dark); }
.vg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 22px; }
.vg-chip-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 14.5px; font-weight: 600; }
.vg-chip-link:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }
.vg-chip { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.92); color: var(--ink); }
.vg-chip-closed { left: auto; right: 10px; background: var(--accent); color: #fff; }

/* ---------- grids / cards ---------- */
.vg-grid { display: grid; gap: 22px; }
.vg-grid-3 { grid-template-columns: repeat(3, 1fr); }
.vg-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vg-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s ease; }
.vg-card:hover { transform: translateY(-2px); }
.vg-card-media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--sky); overflow: hidden; }
.vg-card-media .vg-img { width: 100%; height: 100%; object-fit: cover; }
.vg-img-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; padding: 20px; text-align: center; }
.vg-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.vg-card-title { font-size: 20px; margin: 0 0 4px; }
.vg-card-title a { color: var(--ink); }
.vg-card-place { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.vg-card-blurb { font-size: 15px; color: var(--ink-2); margin: 0 0 12px; flex: 1; }
.vg-card-foot { margin: 0; font-size: 13.5px; font-weight: 700; }
.vg-tickets { color: var(--brand-dark); }
.vg-tickets::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; }
.vg-tickets-none { color: var(--muted); font-weight: 600; }
.vg-tickets-none::before { background: var(--line); }

.vg-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.vg-tile { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); border-left: 3px solid var(--accent); }
.vg-tile:hover { text-decoration: none; border-left-color: var(--brand); }
.vg-tile strong { font-size: 19px; font-family: var(--font-head); }
.vg-tile span { color: var(--muted); font-size: 14px; }

/* ---------- single ---------- */
.vg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 8px; }
.vg-hero { margin: 0 0 22px; }
.vg-hero .vg-img { width: 100%; border-radius: var(--radius); max-height: 560px; object-fit: cover; }
.vg-photo-credit { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.vg-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; margin: 0 0 28px; padding: 18px 20px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.vg-facts div { min-width: 0; }
.vg-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.vg-facts dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.vg-notice { padding: 14px 18px; border-radius: var(--radius-sm); background: var(--amber-soft); border: 1px solid #f3d9b4; margin: 0 0 20px; }
.vg-notice-closed { background: #fdeceb; border-color: #f4c4be; }

.vg-prose { font-size: 17.5px; line-height: 1.7; }
.vg-prose h2 { font-size: 24px; margin: 34px 0 12px; }
.vg-prose h2:first-child { margin-top: 0; }
.vg-prose p { margin: 0 0 1.15em; }
.vg-prose-narrow { max-width: 760px; }
.vg-prose-2col { columns: 2; column-gap: 40px; color: var(--ink-2); }
.vg-prose-2col p { break-inside: avoid; }

.vg-booking { margin: 30px 0; padding: 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.vg-booking .vg-h2 { margin-bottom: 4px; }
.vg-booking-note { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.vg-booking-more { margin: 14px 0 0; font-weight: 700; }
.vg-booking gyg-widget { display: block; min-height: 120px; }
.vg-booking-country { border-top-color: var(--brand); }
.vg-gyg-activities gyg-widget { display: block; }
.vg-archive-gyg { margin: 40px 0; }
.vg-nearby, .vg-faq, .vg-compare-links { margin: 40px 0; }
.vg-faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); margin-bottom: 8px; padding: 0 16px; }
.vg-faq-item summary { padding: 13px 0; font-weight: 700; cursor: pointer; list-style: none; position: relative; padding-right: 28px; }
.vg-faq-item summary::-webkit-details-marker { display: none; }
.vg-faq-item summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-size: 20px; color: var(--brand); }
.vg-faq-item[open] summary::after { content: "–"; }
.vg-faq-item p { padding-bottom: 14px; color: var(--ink-2); }
.vg-links { list-style: none; padding: 0; margin: 0; }
.vg-links li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.vg-links li:last-child { border-bottom: 0; }

.vg-sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 18px; }
.vg-map { height: 260px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sky); }
.vg-map-link { font-size: 13.5px; margin: -8px 0 0; }
.vg-side-book { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.vg-side-book-kicker { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700; color: var(--brand); margin: 0 0 4px; }
.vg-side-book-name { font-weight: 700; font-size: 18px; margin: 0 0 14px; }
.vg-side-book-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.vg-side-links { background: var(--card); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.vg-side-links h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- archive map ---------- */
.vg-map-toggle { margin: 0 0 24px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.vg-map-toggle summary { padding: 12px 18px; font-weight: 700; cursor: pointer; }
.vg-archive-map { height: 380px; border-radius: 0 0 var(--radius) var(--radius); background: var(--sky); }
.vg-section .vg-archive-map { border-radius: var(--radius); }

/* ---------- compare ---------- */
.vg-compare-card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.vg-compare-card .vg-img { border-radius: var(--radius-sm); aspect-ratio: 16/10; object-fit: cover; width: 100%; margin-bottom: 12px; }
.vg-compare-card h2 { font-size: 22px; margin-bottom: 2px; }
.vg-compare-card h2 a { color: var(--ink); }
.vg-table-wrap { overflow-x: auto; }
.vg-table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.vg-table th, .vg-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.vg-table thead th { background: var(--gold-soft); font-size: 15px; font-family: var(--font-head); }
.vg-table tbody th { font-weight: 600; color: var(--muted); font-size: 14px; width: 30%; }

/* ---------- pagination ---------- */
.pagination { margin: 30px 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.page-numbers { padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.page-numbers.current { background: var(--brand); color: #fff; border-color: var(--brand); }
a.page-numbers:hover { border-color: var(--brand); text-decoration: none; }

/* ---------- footer ---------- */
.vg-footer { background: #241b18; color: #d8ccc0; padding: 48px 0 24px; margin-top: 40px; }
.vg-footer a { color: #f3eadf; }
.vg-footer h3 { color: #e9cf95; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.vg-footer ul { list-style: none; padding: 0; margin: 0; }
.vg-footer li { padding: 3px 0; font-size: 15px; }
.vg-footer .vg-count { color: #a89788; }
.vg-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.vg-footer-about .vg-logo text { fill: #fff; }
.vg-footer-about p { font-size: 15px; margin-top: 14px; }
.vg-footer-note { color: #a89788; font-size: 13.5px !important; }
.vg-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; font-size: 14px; color: #a89788; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.vg-footer-menu { list-style: none; display: flex; gap: 16px; margin: 0; padding: 0; }

/* ---------- responsive ---------- */
/* Шапка має власні пороги, не спільні з сіткою контенту: 1120px - тиснемо
 * відступи, 1020px - ховаємо пошук, 900px - гамбургер (те саме значення в
 * assets/js/main.js). Пошук лишається в меню-гамбургері і в героєві головної. */
@media (max-width: 1120px) and (min-width: 901px) {
  .vg-header-inner { gap: 14px; }
  .vg-nav { gap: 12px; }
  .vg-nav-item > a { padding: 10px 9px; }
  .vg-nav-search { flex-basis: 190px; }
  .vg-nav .vg-lang { margin-left: 6px; }
  .vg-nav .vg-lang li a, .vg-nav .vg-lang li span { padding: 4px 6px; }
}
@media (max-width: 1020px) and (min-width: 901px) {
  .vg-nav-search { display: none; }
}
@media (max-width: 900px) {
  .vg-nav-toggle { display: block; }
  .vg-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; flex-direction: column; align-items: stretch; box-shadow: var(--shadow); }
  .vg-nav.is-open { display: flex; }
  .vg-nav-list { flex-direction: column; }
  .vg-nav-search { flex-basis: auto; }
  .vg-sub { position: static; display: none; box-shadow: none; border: 0; padding: 0 0 8px 14px; }
  .vg-nav-item.is-open .vg-sub { display: block; }
  .vg-has-sub > a { cursor: pointer; }
  .vg-nav .vg-lang { margin: 10px 0 0; }
}
@media (max-width: 1000px) {
  .vg-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .vg-tiles { grid-template-columns: repeat(3, 1fr); }
  .vg-layout { grid-template-columns: 1fr; }
  .vg-sidebar { position: static; }
  .vg-footer-grid { grid-template-columns: 1fr 1fr; }
  .vg-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .vg-grid-3, .vg-grid-2 { grid-template-columns: 1fr; }
  .vg-tiles { grid-template-columns: repeat(2, 1fr); }
  .vg-hero-band { padding: 40px 0 32px; }
  .vg-prose-2col { columns: 1; }
  .vg-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .vg-facts { grid-template-columns: 1fr 1fr; }
  .vg-archive-map { height: 300px; }
}

/* Друга частина тексту хаба - під списком */
.vg-intro-more { max-width: 780px; font-size: 17px; color: var(--ink-2); }
.vg-intro-more p { margin: 0 0 1em; }
.vg-intro { margin-bottom: 4px; }
.vg-page-head { padding-bottom: 4px; }
.vg-chips { margin: 10px 0 16px; }

/* перемикач мов */
.vg-lang { list-style: none; display: flex; gap: 2px; margin: 0 0 0 14px; padding: 0; align-items: center; }
.vg-lang li a, .vg-lang li span { display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); text-decoration: none; }
.vg-lang li span { background: var(--brand-soft); color: var(--brand); }
.vg-lang li a:hover { background: var(--line, #eef1f4); }
.vg-footer-bottom .vg-lang { margin-left: auto; }
@media (max-width: 900px) { .vg-nav .vg-lang { margin: 10px 0 0; } }

/* перелік турів у хабах турів */
.vg-tour-list { margin: 18px 0 0; padding-left: 1.4em; }
.vg-tour-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.vg-tour-list li:last-child { border-bottom: 0; }
.vg-tour-list a { font-weight: 600; }
.vg-chip-tours { background: var(--gold-soft); border-color: #e2cc9a; }
.vg-booking-hubs { margin: 14px 0 0; font-size: .95em; }
.vg-booking-hubs a { font-weight: 600; }
.vg-tour-hubs .vg-chips { margin-top: 10px; }
