/* iFly theme
   Палитра: нощно небе #0f2b46, сигнално жълто #ffc72c (табели на летище), мастило #15202b,
   небесен фон #eaf1f8, хартия #f7f9fb, връзки #1d5fa8.
   Шрифт: системен (Segoe UI / SF / Roboto – всички с добра кирилица), без външни заявки. */

:root {
	--night: #0f2b46;
	--signal: #ffc72c;
	--ink: #15202b;
	--muted: #5b6b7a;
	--line: #d6dee6;
	--sky: #eaf1f8;
	--paper: #f7f9fb;
	--link: #1d5fa8;
	--font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1180px;
	--narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6;
	color: var(--ink); background: #fff; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--night); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.015em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: calc(var(--narrow) + 2.5rem); }
.section-pad { padding-top: 2.5rem; padding-bottom: 3.5rem; }

.skip-link { position: absolute; left: -9999px; top: .5rem; z-index: 999; background: var(--signal); color: var(--night); padding: .6rem 1rem; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: .5rem; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: baseline; text-decoration: none; color: var(--night); font-weight: 800; font-size: 1.7rem; letter-spacing: -.04em; line-height: 1; }
.brand__word { position: relative; }
.brand__i { position: relative; display: inline-block; }
.brand__i::before {
	content: ""; position: absolute; left: 50%; top: -.06em; width: .2em; height: .2em;
	transform: translateX(-50%) rotate(45deg); background: var(--signal); border-radius: 2px;
}
.brand__tld { color: var(--muted); font-weight: 600; font-size: .62em; letter-spacing: 0; margin-left: .05em; }
.custom-logo-link img { max-height: 44px; width: auto; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.site-nav__list { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.site-nav__list a { display: block; padding: .55rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.site-nav__list a:hover, .site-nav__list .current-menu-item > a { background: var(--sky); color: var(--night); }
.site-nav__list > li { position: relative; }
.site-nav__list .sub-menu { display: none; }
@media (min-width: 861px) {
	.site-nav__list .menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: .4em; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
	.site-nav__list .sub-menu {
		position: absolute; right: 0; top: 100%; min-width: 250px; z-index: 60;
		list-style: none; margin: 0; padding: .4rem; background: #fff;
		border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -20px rgba(15, 43, 70, .45);
	}
	.site-nav__list li:hover > .sub-menu, .site-nav__list li:focus-within > .sub-menu { display: block; }
	.site-nav__list .sub-menu a { font-weight: 500; white-space: nowrap; }
}
.nav-toggle { display: none; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .8rem; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; } .nav-toggle__bars::after { top: 6px; }

@media (max-width: 860px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem; }
	.site-nav.is-open { display: block; }
	.site-nav__list { flex-direction: column; }
	.site-nav__list .sub-menu { display: block; list-style: none; padding-left: 1rem; }
}

/* ---------- Hero ---------- */
.hero { background: var(--sky); padding: 3rem 0 3.5rem; border-bottom: 1px solid var(--line); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; align-items: start; }
.hero__title { max-width: 16ch; color: var(--night); }
.hero__lead { font-size: 1.15rem; color: #34475a; max-width: 52ch; margin-bottom: 1.6rem; }
.hero__board { padding-top: .4rem; }
@media (max-width: 980px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__title { max-width: 22ch; }
}
@media (max-width: 600px) { .hero { padding: 1.8rem 0 2.2rem; } }

.board-tabs { display: flex; gap: .25rem; margin-bottom: .5rem; flex-wrap: wrap; }
.board-tabs button {
	min-height: 40px; padding: .35rem .85rem; border: 0; border-radius: 8px; background: transparent;
	font: inherit; font-weight: 600; font-size: .95rem; color: var(--muted); cursor: pointer;
}
.board-tabs button:hover { color: var(--night); background: rgba(15, 43, 70, .07); }
.board-tabs button[aria-selected="true"] { background: var(--night); color: #fff; }

/* ---------- Bands ---------- */
.band { padding: 3.25rem 0; }
.band + .band { border-top: 1px solid var(--line); }
.band--paper { background: var(--paper); }
.band__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.band__head h2 { margin: 0; }
.band__lead { color: var(--muted); max-width: 60ch; margin-bottom: 1.4rem; }
.more { font-weight: 700; }

.steps { list-style: none; counter-reset: step; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.steps li { counter-increment: step; display: grid; gap: .35rem; padding-top: 1rem; border-top: 3px solid var(--night); }
.steps li::before { content: counter(step); font-weight: 800; font-size: 1.6rem; color: var(--night); line-height: 1; }
.steps strong { font-size: 1.1rem; }
.steps span { color: var(--muted); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 1.2rem; } }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem 1.5rem; margin-top: 1.2rem; }
.card { display: grid; align-content: start; gap: .8rem; }
.card__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.card__cat { margin: 0; font-size: .85rem; font-weight: 700; color: var(--link); }
.card__title { margin: 0; font-size: 1.2rem; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--link); text-decoration: underline; }
.card__excerpt { margin: 0; color: var(--muted); font-size: .97rem; }

/* ---------- Page heads ---------- */
.page-head { background: var(--sky); padding: 2.4rem 0 2rem; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: .4rem; color: var(--night); }
.page-head__lead { color: #34475a; font-size: 1.1rem; max-width: 60ch; }
.page-head--404 .gate { font-weight: 800; color: var(--night); background: var(--signal); display: inline-block; padding: .2rem .6rem; border-radius: 4px; }
.page-head--404 .ifly-search { margin: 1.5rem 0; }
.filter { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.2rem; }
.filter a { padding: .4rem .85rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; }
.filter a:hover { border-color: var(--night); }
.filter a[aria-current] { background: var(--night); border-color: var(--night); color: #fff; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 1rem; padding: 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: var(--line); }
.crumbs a { color: var(--muted); }

/* ---------- Route page ---------- */
.route__hero { background: var(--sky); padding: 2rem 0 2.4rem; border-bottom: 1px solid var(--line); }
.route__title { color: var(--night); max-width: 24ch; }
.route__codes { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; color: #34475a; margin-bottom: 1.4rem; }
.route__codes b { font-family: "DejaVu Sans Mono", Consolas, ui-monospace, monospace; color: var(--night); background: #fff; padding: .05rem .4rem; border-radius: 4px; border: 1px solid var(--line); }
.route__plane { color: var(--link); }
.route__country { color: var(--muted); }
.route__country::before { content: "("; } .route__country::after { content: ")"; }
.route__body { padding-top: 2.4rem; padding-bottom: 3.5rem; }
.route__body > section { margin-bottom: 2.8rem; }

/* ---------- Articles ---------- */
.article__head { padding: 2.4rem 0 1.4rem; }
.article__title { color: var(--night); }
.article__lead { font-size: 1.2rem; color: #34475a; }
.post-meta { color: var(--muted); font-size: .92rem; }
.post-meta a { color: var(--link); font-weight: 600; text-decoration: none; }
.article__img { margin: 0 auto 2rem; }
.article__img img { border-radius: 14px; width: 100%; }

.prose { padding-bottom: 3rem; font-size: 1.09rem; line-height: 1.7; }
.prose > * { max-width: var(--narrow); }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.5em 0; padding: .8em 1.1em; background: var(--sky); border-left: 4px solid var(--night); border-radius: 0 10px 10px 0; }
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .97rem; }
.prose th, .prose td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { font-size: .85rem; color: var(--muted); }
.prose .ifly-search, .prose .ifly-board { margin: 1.8em 0; }
.prose figure { margin: 1.5em 0; }
.prose figcaption { font-size: .88rem; color: var(--muted); margin-top: .4rem; }
.prose .wp-block-table { overflow-x: auto; }
.tip { background: #fff8e1; border: 1px solid #f3dc8f; border-radius: 10px; padding: .9em 1.1em; }

.site-search { display: flex; gap: .5rem; max-width: 480px; }
.site-search input { flex: 1; min-height: 46px; padding: .5rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; }

.nav-links { display: flex; gap: .6rem; margin-top: 2.5rem; flex-wrap: wrap; }
.nav-links a, .nav-links span { padding: .45rem .85rem; border: 1.5px solid var(--line); border-radius: 8px; text-decoration: none; }
.nav-links .current { background: var(--night); color: #fff; border-color: var(--night); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #c9d6e3; padding: 3rem 0 1.5rem; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer .brand__tld { color: #9fb3c8; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 1000px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
.site-footer__about p { margin-top: 1rem; max-width: 42ch; }
.site-footer__title { color: #fff; font-size: 1rem; margin-bottom: .8rem; }
.footer-links, .socials { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-links a, .socials a { text-decoration: none; }
.footer-links a:hover, .socials a:hover { text-decoration: underline; }
.socials { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 2.5rem; padding-top: 1.2rem; font-size: .85rem; color: #9fb3c8; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* WordPress core helpers */
.alignwide { max-width: 1100px !important; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: .88rem; color: var(--muted); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
