/*
Theme Name: Turkey Excursions
Description: Лёгкая тема партнёрского сайта экскурсий. Логика данных — в плагине tex-core.
Version: 0.1.0
Requires PHP: 8.2
Text Domain: tex
*/

/* ---------- Шрифты: свои файлы (Google Fonts из РФ грузится нестабильно), только кириллица и латиница ---------- */
/* Manrope cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Manrope latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Unbounded cyrillic */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(assets/fonts/unbounded-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* Unbounded latin */
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(assets/fonts/unbounded-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Токены из макета ---------- */
:root {
	--ink: #102A43;
	--ink-2: #243B53;
	--muted: #486581;
	--muted-2: #334E68;
	--line: #D9E2EC;
	--line-2: #EEF2F6;
	--field: #BCCCDC;
	--accent: #0B6E75;
	--accent-hover: #084E53;
	--accent-soft: #E6F3F4;
	--bg-soft: #EEF6F7;
	--bg-softer: #F7FAFB;
	--ph: #D6EAEC;
	--badge-bg: #FCE9D6;
	--badge-ink: #8A3B0A;
	--tip-ink: #5C2A08;
	--on-dark: #D9E2EC;
	--on-dark-2: #BCCCDC;
	--r-card: 16px;
	--r-btn: 10px;
	--font-head: 'Unbounded', 'Segoe UI', sans-serif;
	--font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
	--wrap: 1200px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* иначе display:flex у блоков перебивает hidden */
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: #fff; line-height: 1.5; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.2; }
summary { cursor: pointer; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 8px 12px; width: auto; height: auto; clip: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.h-display { font-family: var(--font-head); font-weight: 700; }
.h-section { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 28px; }
.lead { margin: 0; font-size: 17px; color: var(--muted-2); }
.muted { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 0; border-radius: var(--r-btn); background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn--lg { padding: 14px 22px; font-size: 15px; }
.badge { align-self: flex-start; background: var(--badge-bg); color: var(--badge-ink); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--field); color: var(--ink-2); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; background: #fff; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Шапка ---------- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: relative; z-index: 20; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.logo__img img { display: block; width: 138px; height: 48px; }
.logo__text { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.15; }
.logo__text b { font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.logo__text span { font-size: 14px; color: var(--muted-2); }
@media (max-width: 600px) {
	.logo { gap: 8px; }
	.logo__img img { width: 101px; height: 35px; }
	.logo__text b { font-size: 17px; }
	.logo__text span { font-size: 12px; }
}
.nav { display: flex; gap: 28px; align-items: center; font-weight: 600; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav__drop { position: relative; }
.nav__drop > button { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.nav__menu { display: none; position: absolute; top: calc(100% + 12px); left: -16px; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 8px 24px rgba(16, 42, 67, .08); }
.nav__menu a { display: block; padding: 10px 12px; border-radius: 8px; }
.nav__menu a:hover { background: var(--bg-softer); }
.nav__drop.is-open .nav__menu { display: block; }
.burger { display: none; min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-btn); background: #fff; cursor: pointer; align-items: center; justify-content: center; }

@media (max-width: 1100px) {
	.site-header__cta { display: none; }
	.burger { display: inline-flex; }
	.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
	.nav.is-open { display: flex; }
	.nav > a, .nav__drop > button { padding: 12px 0; min-height: 44px; width: 100%; text-align: left; }
	.nav__menu { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; }
}

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #fff; }
.hero__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 72px; }
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.hero__kicker { font-size: 14px; font-weight: 600; letter-spacing: .04em; color: #9FD8DC; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(32px, 4.5vw, 50px); line-height: 1.12; }
.hero p { margin: 0; font-size: 18px; color: var(--on-dark); max-width: 520px; }
.hero__img { border-radius: 20px; overflow: hidden; background: #1F4A6E; aspect-ratio: 6 / 5; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }

.search { background: #fff; color: var(--ink); border-radius: 16px; padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted-2); }
.field select { font: inherit; font-size: 15px; font-weight: 500; min-height: 44px; padding: 0 12px; border: 1px solid var(--field); border-radius: var(--r-btn); background: #fff; color: var(--ink); }

/* ---------- Секции ---------- */
.section { padding-top: 48px; padding-bottom: 48px; }
.section--soft { background: var(--bg-soft); }
.section--softer { background: var(--bg-softer); border-top: 1px solid var(--line); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section__head p { margin: 6px 0 0; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 24px; }

.perks { border-bottom: 1px solid var(--line); }
.perks__in { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-top: 24px; padding-bottom: 24px; font-size: 15px; font-weight: 600; color: var(--muted-2); }
.perks__in div { display: flex; gap: 10px; align-items: center; }
.perks svg { flex-shrink: 0; }

.resorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.resort-tile { display: flex; flex-direction: column; gap: 4px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--bg-softer); }
.resort-tile:hover { border-color: var(--accent); color: var(--ink); }
.resort-tile b { font-size: 18px; }
.resort-tile span { font-size: 14px; color: var(--muted); }

/* ---------- Карточка ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: #fff; }
.card__img { display: block; aspect-ratio: 3 / 2; background: var(--ph); }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.card__title { margin: 0; font-size: 18px; line-height: 1.3; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__meta { font-size: 14px; color: var(--muted); }
.card__foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line-2); }
.price { font-size: 14px; color: var(--muted); }
.price strong { font-size: 20px; color: var(--ink); }

.disclosure { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

/* ---------- Квиз-блок ---------- */
.quiz-teaser { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; align-items: center; }
.panel { background: #fff; border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.option { font: inherit; font-weight: 600; min-height: 52px; border: 1px solid var(--field); border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; padding: 8px 12px; }
.option:hover { border-color: var(--accent); }
.option[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }

.quiz__progress { display: flex; flex-direction: column; gap: 8px; }
.quiz__bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; width: 33%; background: var(--accent); transition: width .2s; }
.quiz__title { margin: 0; font-size: 22px; outline: none; }
@media (max-width: 600px) { .options { grid-template-columns: 1fr; } }

/* ---------- Блог-плитки, сервисы, FAQ ---------- */
.post-tile { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
.post-tile__img { aspect-ratio: 5 / 3; border-radius: 14px; background: #E4ECF3; overflow: hidden; }
.post-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.post-tile b { font-size: 18px; line-height: 1.3; }
.post-tile span { font-size: 14px; color: var(--muted); }

.services { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.service { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: 16px; background: var(--ink); color: #fff; text-decoration: none; }
.service:hover { background: var(--ink-2); color: #fff; }
.service b { font-size: 18px; }
.service span { font-size: 14px; color: var(--on-dark); }

.faq { display: flex; flex-direction: column; gap: 16px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.faq summary { font-weight: 700; font-size: 16px; }
.faq details p, .faq details div { margin: 12px 0 0; color: var(--muted-2); }
.narrow { max-width: 820px; margin: 0 auto; }

/* ---------- Внутренние страницы ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 24px; }
.crumbs a { color: var(--accent); }
.page-head { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; padding-bottom: 8px; }
.page-head h1 { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: clamp(28px, 3.6vw, 40px); }
.page-head .lead { max-width: 820px; }
.intro { font-size: 17px; max-width: 820px; color: var(--muted-2); }
.intro p { margin: 0 0 12px; }

.layout { display: flex; gap: 48px; flex-wrap: wrap; align-items: flex-start; padding-top: 8px; padding-bottom: 72px; }
.layout__main { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.layout__side { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 24px; }
@media (max-width: 900px) { .layout__side { position: static; max-width: none; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.fact { background: var(--bg-softer); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.fact span { display: block; font-size: 13px; color: var(--muted); }
.fact b { font-size: 16px; }
.cover { border-radius: 18px; overflow: hidden; background: var(--ph); aspect-ratio: 16 / 9; }
.cover img { width: 100%; height: 100%; object-fit: cover; }

.offers { border: 2px solid var(--accent); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.offers__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.offers__head b { font-size: 18px; }
.offer { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: 16px; }
.offer__img { width: 120px; height: 84px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--ph); }
.offer__img img { width: 100%; height: 100%; object-fit: cover; }
.offer__info { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; }
.offer__info b { line-height: 1.35; }
.offer__info span { font-size: 14px; color: var(--muted); }
.offer__info .badge { font-size: 12px; color: var(--badge-ink); }
.offer__buy { display: flex; align-items: center; gap: 16px; }
.offer__more { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; cursor: pointer; padding: 8px 0; align-self: flex-start; min-height: 44px; }
.stars { color: var(--badge-ink); font-weight: 700; }

.prose { font-size: 17px; line-height: 1.65; }
.prose h2 { font-size: 26px; margin: 32px 0 12px; }
.prose h3 { font-size: 20px; margin: 24px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose .wp-block-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; margin: 0 0 16px; }
.prose th, .prose td { padding: 14px 16px; text-align: left; border-top: 1px solid var(--line); }
.prose thead th { background: var(--bg-softer); border-top: 0; }
.prose .tip, .prose .is-style-tip { background: var(--badge-bg); border-radius: 14px; padding: 16px 20px; color: var(--tip-ink); }
.prose .offers { margin: 24px 0; }
.prose .grid { margin: 24px 0; }
.toc { background: var(--bg-softer); border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; }
.toc b { display: block; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

.box { border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.box a { text-decoration: none; font-weight: 600; }
.box--dark { background: var(--ink); color: #fff; border: 0; padding: 24px; gap: 14px; }
.box--dark p { margin: 0; font-size: 14px; color: var(--on-dark); }

.empty { padding: 40px; text-align: center; border: 1px dashed var(--field); border-radius: var(--r-card); color: var(--muted); }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-btn); text-decoration: none; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); }
.site-footer__in { padding-top: 48px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 20px; font-size: 14px; }
.site-footer__top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer .logo { color: #fff; }
.site-footer .logo__img { background: #fff; border-radius: 10px; padding: 6px 10px; } /* тёмно-синее «Go» не видно на тёмном фоне */
.site-footer .logo__text span { color: var(--on-dark); }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0; color: var(--on-dark-2); max-width: 760px; }

@media (max-width: 600px) {
	.wrap { padding-left: 16px; padding-right: 16px; }
	.hero__in { padding-top: 40px; padding-bottom: 40px; gap: 32px; }
	.section { padding-top: 36px; padding-bottom: 36px; }
	.h-section { font-size: 22px; }
	.grid { grid-template-columns: 1fr; }
	.offer__img { width: 96px; height: 72px; }
	.offer__buy { width: 100%; justify-content: space-between; }
}
