/* =========================================================================
   EFAM — site.css
   Компоненти за целия сайт. Без твърди цветове/размери — всичко идва
   от theme.css. Повърхностите (.s-*) предефинират семантичните токени,
   така всеки компонент се адаптира автоматично върху бял, сив, червен
   или тъмен фон без допълнителни правила.
   ========================================================================= */

/* --- Повърхности (семантични токени) ---------------------------------- */
:root, .s-light {
    --bg: var(--c-paper); --fg: var(--c-ink); --mut: var(--c-muted);
    --line: var(--c-line); --acc: var(--c-brand); --card: var(--c-paper);
}
.s-soft  { --bg: var(--c-soft); --card: var(--c-paper); }
.s-brand {
    --bg: var(--c-brand); --fg: var(--c-paper); --acc: var(--c-paper);
    --mut: color-mix(in srgb, var(--c-paper) 82%, transparent);
    --line: color-mix(in srgb, var(--c-paper) 22%, transparent);
    --card: color-mix(in srgb, var(--c-paper) 10%, transparent);
}
.s-dark {
    --bg: var(--c-ink); --fg: var(--c-paper);
    --acc: color-mix(in srgb, var(--c-brand) 55%, var(--c-paper));
    --mut: color-mix(in srgb, var(--c-paper) 66%, transparent);
    --line: color-mix(in srgb, var(--c-paper) 14%, transparent);
    --card: color-mix(in srgb, var(--c-paper) 6%, transparent);
}
body, .s-light, .s-soft, .s-brand, .s-dark { background: var(--bg); color: var(--fg); }
.s-soft { background: var(--bg) url("../../img/bg_grey.png") center / cover no-repeat; }
.hero.s-soft::before, .hero.s-soft::after { content: none; }
.s-brand { background: var(--c-brand) url("../../img/bg_red.png") center / cover no-repeat; }

/* --- Основа ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: var(--t-m)/var(--lh) var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--acc) 45%, transparent); outline-offset: 3px; }

h1, h2, h3, h4, .display {
    margin: 0 0 .5em; font-family: var(--f-head); font-weight: var(--fw-head);
    line-height: var(--lh-head); letter-spacing: var(--ls-head); text-wrap: balance;
    font-feature-settings: var(--ff-head, normal);
}
.display { font-size: var(--t-5xl); }
h1 { font-size: var(--t-4xl); }
h2 { font-size: var(--t-3xl); }
h3 { font-size: var(--t-l); line-height: 1.3; }
h4 { font-size: var(--t-m); line-height: 1.4; }
p, ul, ol, table, figure, details { margin: 0 0 1em; }
:is(h1, h2, h3, h4, p, ul, ol, table, figure, .display):last-child { margin-bottom: 0; }
strong, b { font-weight: var(--fw-bold); }
small, .small { font-size: var(--t-s); }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--gap) 0; }

.eyebrow { display: block; margin-bottom: 1em; font-size: var(--t-xs); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.lead { font-size: var(--t-l); line-height: 1.5; color: var(--fg); }
.mut { color: var(--mut); }
.acc { color: var(--acc); }
.c { text-align: center; }
.c .lead, .c .text { margin-inline: auto; }

/* Списък с отметки (наследство от текущия сайт) */
.list { padding: 0; list-style: none; }
.list li { position: relative; padding: .3em 0 .3em 1.8em; }
.list li::before {
    content: ""; position: absolute; left: .35em; top: .55em; width: .35em; height: .7em;
    border: solid var(--acc); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* --- Layout ------------------------------------------------------------ */
.w { width: min(100% - 2 * var(--pad), var(--w)); margin-inline: auto; }
.text { max-width: var(--w-text); }
.sec { padding-block: var(--sec); }
.sec-head { margin-bottom: calc(var(--gap) * 1.5); }

/* Една grid-utility за всички колонни подредби. --min настройва колоната. */
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 260px)), 1fr)); }
.split { display: grid; gap: calc(var(--gap) * 2); align-items: center; }
@media (min-width: 800px) {
    .split { grid-template-columns: 1fr 1fr; }
    .split.rev > :first-child { order: 2; }
}
.grid > *, .split > * { min-width: 0; }   /* колоните да се свиват (графики, таблици) */
.row { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 1.5); align-items: center; }

/* --- Бутони ------------------------------------------------------------
   Цветовете идват от повърхността: червен на бяло, бял на червено.   */
/* Като a.button от html/basic.html: правоъгълни, 41px, Open Sans 700 16px */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6em;
    min-height: 41px; padding: 1px 30px 0; border: 0; border-radius: 0;
    background: var(--acc); color: var(--c-paper); font: var(--fw-bold) var(--t-m)/1.2 var(--f-body);
    cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .5s ease, color .5s ease;
}
.btn:hover { text-decoration: none; background: var(--c-brand-dark); }
.s-brand .btn:not(.line) { color: var(--c-brand); }
.s-brand .btn:hover { background: var(--c-soft); }
.s-dark .btn:hover { background: color-mix(in srgb, var(--acc) 85%, #000); }
.btn.line { background: var(--card); color: var(--fg); box-shadow: inset 0 0 0 1px var(--c-line); }
.btn.line:hover { background: var(--c-soft); color: var(--fg); }
:is(.s-brand, .s-dark) .btn.line { background: transparent; box-shadow: inset 0 0 0 1px var(--fg); }
:is(.s-brand, .s-dark) .btn.line:hover { background: var(--fg); color: var(--bg); }
.btn.sm { min-height: 34px; padding-inline: 20px; font-size: var(--t-s); }
.link-more { font-weight: var(--fw-bold); }
.link-more::after { content: " \2192"; }

/* --- Header ------------------------------------------------------------ */
.hd { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.hd .w { position: relative; display: flex; align-items: center; gap: var(--gap); height: var(--header-h); }
.logo { display: block; padding-block: 10px; }
.logo img { width: var(--logo-w); height: var(--logo-h); object-fit: contain; }
.nav { margin-left: auto; }
.nav ul { margin: 0; padding: 0; list-style: none; }
.nav a { display: block; color: var(--fg); font-weight: 600; font-size: var(--t-s); }
.nav a:hover, .nav .on > a { color: var(--acc); text-decoration: none; }
.lang { display: flex; gap: var(--u); font-size: var(--t-xs); font-weight: var(--fw-bold); }
.lang a { color: var(--mut); }
.lang .on { color: var(--fg); }
/* Търсенето е закотвено вдясно и се разгъва върху менюто, без да го измества */
.hd form.search { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: inline-block; margin: 0; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 20px; box-sizing: border-box; text-align: right; white-space: nowrap; overflow: hidden; }
.hd form.search input { width: 38px; height: 38px; margin: 0 -44px 0 0; padding: 5px 18px; border: 0; box-sizing: border-box; vertical-align: top; position: relative; color: transparent; background: transparent; font-family: var(--f-body); font-size: 15px; cursor: pointer; transition: width .3s ease, color .3s ease, margin-right .3s ease; }
.hd form.search input:focus-visible { outline: none; }
.hd form.search button { width: 44px; height: 38px; margin: 0; padding: 0; border: 0; box-sizing: border-box; vertical-align: top; background: var(--c-paper) url(../../svg/header/search.svg) no-repeat right 8px center / 20px; cursor: pointer; transition: background-position .3s ease; }
.hd form.search input:not(:placeholder-shown),
.hd form.search input:focus { width: 240px; margin-right: 0; color: var(--c-ink); cursor: text; box-shadow: none; }
.hd form.search input:not(:placeholder-shown) + button,
.hd form.search input:focus + button { background-position: center; }
.burger { display: none; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.burger span, .burger span::before, .burger span::after {
    display: block; width: 24px; height: 2px; margin: auto; background: var(--fg); transition: transform var(--speed), background var(--speed);
}
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; }
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span::after { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 1200px) {
    .nav a { white-space: nowrap; }
    .nav { display: flex; align-items: center; gap: calc(var(--gap) * 1.5); margin-right: calc(40px + var(--gap)); }
    .nav > ul { display: flex; gap: calc(var(--gap) * 1.2); }
    .nav > ul > li { position: relative; }
    .nav > ul > li > a { line-height: var(--header-h); }
    .dd > a::after { content: ""; display: inline-block; width: .4em; height: .4em; margin: 0 0 .2em .5em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
    .dd ul {
        position: absolute; top: 100%; left: calc(var(--gap) * -1); min-width: 300px; padding: var(--u);
        background: var(--bg); border: 1px solid var(--line); border-radius: 0 0 var(--rad) var(--rad); box-shadow: var(--shadow);
        opacity: 0; visibility: hidden; transform: translateY(6px); transition: var(--speed);
    }
    .dd:hover ul, .dd:focus-within ul { opacity: 1; visibility: visible; transform: none; }
    .dd ul a { padding: calc(var(--u) * 1.2) calc(var(--u) * 2); border-radius: var(--rad-s); }
    .dd ul a:hover { background: var(--c-brand-soft); }
}
@media (max-width: 1199.98px) {
    .burger { display: block; margin-left: auto; }
    .hd form.search { right: calc(44px + var(--gap)); }
    .nav {
        position: fixed; inset: var(--header-h) 0 0 0; padding: var(--gap) var(--pad); overflow-y: auto;
        background: var(--bg); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: var(--speed);
    }
    body.nav-open { overflow: hidden; }
    body.nav-open .nav { opacity: 1; visibility: visible; transform: none; }
    .nav > ul > li { border-bottom: 1px solid var(--line); }
    .nav a { padding: calc(var(--u) * 1.6) 0; font-size: var(--t-m); }
    .dd ul { padding: 0 0 var(--u) var(--gap); }
    .dd ul a { padding: var(--u) 0; color: var(--mut); }
    .lang { margin-top: var(--gap); }
}
@media (max-width: 419.999px) {
    .hd form.search input:focus { width: 140px; }
}

/* --- Hero / банер ------------------------------------------------------
   Декоративните ленти взимат цвета си от --fg → работят на всеки фон. */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
    content: ""; position: absolute; z-index: -1; top: -10%; bottom: -10%; border-radius: 160px 0 0 0;
    background: color-mix(in srgb, var(--fg) 6%, transparent); transform: skewX(-20deg);
}
.hero::before { left: 38%; right: -30%; }
.hero::after { left: 62%; right: -30%; background: color-mix(in srgb, #000 10%, transparent); }
.hero .w { display: grid; gap: calc(var(--gap) * 2); align-items: center; min-height: var(--hero-h, clamp(420px, 62vh, 600px)); padding-block: calc(var(--sec) * .8); }
.hero .lead { max-width: 34ch; color: var(--mut); }
.hero .row { margin-top: calc(var(--gap) * 1.5); }
.hero-mark { justify-self: center; width: min(100%, 360px); padding: calc(var(--gap) * 1.6); border-radius: var(--rad); background: var(--c-paper); box-shadow: var(--shadow); }
.hero-media { align-self: stretch; min-height: 260px; border-radius: var(--rad); overflow: hidden; border-right: 14px solid var(--c-brand); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media.symbol { display: grid; place-items: center; background: transparent; border-right: 0; }
.hero-media.symbol img { height: auto; object-fit: contain; filter: invert(58%); }
.display em { font-style: normal; color: var(--acc); display: block; }
@media (min-width: 800px) {
    .hero .w { grid-template-columns: 1.15fr .85fr; }
}
/* Шапка само с текст: без медия и без фиксирана височина */
.hero.plain .w { display: block; min-height: 0; }
.hero.plain .lead { max-width: var(--w-text); }

/* Огледален hero: текст вдясно, ленти вляво */
.hero.end::before { left: -30%; right: 38%; transform: skewX(20deg); border-radius: 0 160px 0 0; }
.hero.end::after { left: -30%; right: 62%; transform: skewX(20deg); border-radius: 0 160px 0 0; }
.hero.end .w { padding-top: calc(var(--logo-h) * 1.5 + var(--gap) * 3); }
/* Карусел директно под хедъра: няма припокриващо лого, затова без допълнителния отстъп */
body > .carousel .hero.end .w,
main > .carousel .hero.end .w { padding-top: calc(var(--sec) * .8); }
@media (min-width: 800px) {
    .hero.end .w { grid-template-columns: .85fr 1.15fr; }
    .hero.end .w > * { grid-column: 2; }
}

/* Голямо лого горе вляво на бяла подложка */
.mark {
    position: absolute; top: 0; left: max(var(--pad), (100% - var(--w)) / 2); z-index: 5; display: block;
    padding: var(--gap) calc(var(--gap) * 1.2); background: var(--c-paper);
    border-radius: 0 0 var(--rad) var(--rad); box-shadow: var(--shadow);
}
.mark img { width: calc(var(--logo-w) * 1.6); height: auto; }

/* Карусел (scroll-snap, JS само за точки/автоплей) */
.carousel { position: relative; }
.slides { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slides > * { scroll-snap-align: start; }
.dots { position: absolute; left: 0; right: 0; bottom: calc(var(--gap) * 1.2); display: flex; justify-content: center; gap: var(--u); }
.dots button { width: 10px; height: 10px; padding: 0; border: 2px solid var(--c-paper); border-radius: 50%; background: transparent; cursor: pointer; transition: var(--speed); }
.dots button.on { width: 30px; border-radius: 5px; background: var(--c-paper); }
body > .carousel .hero-person,
main > .carousel .hero-person { display: none; }
@media (min-width: 800px) {
    body > .carousel .hero-person,
    main > .carousel .hero-person {
        display: block; position: absolute; bottom: 0; pointer-events: none;
        left: max(var(--pad), calc((100% - var(--w)) / 2));
        width: auto; height: auto; max-height: 100%;
        max-width: calc(min(100% - 2 * var(--pad), var(--w)) * .4);
    }
}
/* Статичен фон: изображението е на обвивката и не се мести със слайдовете */
.carousel.still {
    background: var(--c-brand) url("../../img/bg_red.png") center / cover no-repeat;
}
.carousel.still .hero { background: transparent; }
.carousel.still .hero::before,
.carousel.still .hero::after { content: none; }
/* Преливане: слайдовете са един върху друг — леко отместване и прозрачност */
.carousel.fade .slides { grid-auto-flow: row; grid-auto-columns: auto; overflow: hidden; scroll-snap-type: none; }
.carousel.fade .slides > * { grid-area: 1 / 1; opacity: 0; pointer-events: none; }
.carousel.fade .slides > *.on { opacity: 1; pointer-events: auto; }
.carousel.fade .slides > *.in { animation: fade-in .7s ease; }
.carousel.fade .slides > *.out { animation: fade-out .7s ease forwards; }
.carousel.fade.rev .slides > *.in { animation-name: fade-in-back; }
.carousel.fade.rev .slides > *.out { animation-name: fade-out-back; }
@keyframes fade-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes fade-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(-40px); } }
@keyframes fade-in-back { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes fade-out-back { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(40px); } }

/* --- Карти ------------------------------------------------------------- */
.card {
    display: flex; flex-direction: column; gap: var(--u); padding: calc(var(--gap) * 1.2);
    background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); color: var(--fg);
}
#fees .card,
#invest .card { border-radius: 0; }
.card p { color: var(--mut); font-size: var(--t-s); }
.card .link-more { margin-top: auto; padding-top: var(--u); }
a.card { transition: box-shadow var(--speed), transform var(--speed); }
a.card:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-3px); }
.ico {
    width: 52px; height: 52px; margin-bottom: var(--u); background: var(--acc);
    -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
.tag { align-self: flex-start; padding: .3em .8em; border-radius: 99px; background: color-mix(in srgb, var(--acc) 10%, transparent); color: var(--acc); font-size: var(--t-xs); font-weight: var(--fw-bold); }
.card.person { padding: 0; overflow: hidden; gap: 0; box-shadow: 0 8px 30px #0000000D; }
.card.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.card.person h3,
.card.person .role,
.card.person > p { margin-inline: calc(var(--gap) * 1.2); }
.card.person h3 { margin-top: calc(var(--gap) * 1.2); }
.card.person .role { margin-bottom: 0; color: var(--acc); font-size: var(--t-xs); font-weight: var(--fw-bold); }
.card.person > p:last-child { margin-top: var(--u); margin-bottom: calc(var(--gap) * 1.2); }
.kv { display: flex; justify-content: space-between; gap: var(--gap); padding-block: calc(var(--u) * 1.2); border-bottom: 1px solid var(--line); font-size: var(--t-s); }
.kv:last-child { border-bottom: 0; }
.kv b { text-align: right; }
.up { color: var(--c-ok); }

/* Ключови факти (под hero) */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); box-shadow: var(--shadow); }
.facts.flat { border-radius: 0; }
.facts > div { padding: calc(var(--gap) * 1.1); border-left: 1px solid var(--line); margin-left: -1px; }
.facts b { display: block; margin: .2em 0; font: var(--fw-head) var(--t-2xl)/1.1 var(--f-head); color: var(--acc); }
.facts small { color: var(--mut); }
@media (max-width: 799.98px) {
    .facts > div { padding: var(--gap) calc(var(--u) * 2); }
    .facts b { font-size: var(--t-xl); white-space: nowrap; }
}
.lift { position: relative; margin-top: calc(var(--sec) * -.4); }
main > section > .facts { width: 100%; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 0; box-shadow: 0 8px 30px #0000000D; }
main > section:has(> .facts) { width: min(100% - 2 * var(--pad), var(--w)); margin: -30px auto 0; padding: 0; position: relative; z-index: 1; /* картата застъпва hero-то, който е изолиран слой */ }
main > section > .facts > div { padding: 20px; border-left: 1px solid var(--c-line); margin-left: 0; }
main > section > .facts > div:first-child { border-left: 0; }
main > section > .facts small { display: block; color: var(--c-muted); }
main > section > .facts b { display: block; margin: 8px 0; color: var(--c-brand); font-family: var(--f-head); font-size: 28px; font-weight: 700; line-height: 1.1; }
@media (max-width: 799.98px) {
    main > section > .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    main > section > .facts > div:nth-child(odd) { border-left: 0; }
    main > section > .facts > div:nth-child(n + 3) { border-top: 1px solid var(--c-line); }
    main > section > .facts b { font-size: 28px; white-space: normal; }
}
@media (max-width: 559.98px) {
    main > section > .facts { grid-template-columns: 1fr; }
    main > section > .facts > div { border-left: 0; border-top: 1px solid var(--c-line); }
    main > section > .facts > div:first-child { border-top: 0; }
}

/* --- Фонд: лепкава лента с табове -------------------------------------- */
.tabs { position: sticky; top: var(--header-h); z-index: 1; /* лентата остава над секциите, които минават под нея */ background: var(--bg); border-bottom: 1px solid var(--line); }
.document-list { border: 1px solid var(--c-line); background: var(--c-paper); padding: 20px 30px; }
.document-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--lgray); }
.document-item:last-child { border-bottom: 0; }
.document-item small { display: block; color: var(--grey); }
.document-item > :last-child { text-align: right; }
.document-item .copy { justify-content: flex-end; }
.risk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.risk-row img { max-width: 100%; height: auto; }
.risk-row p { flex: 1; min-width: 200px; margin: 0; color: var(--c-muted); }
.profile-faq { border-top: 1px solid var(--c-line); margin: 12px 0 0; }
.profile-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.profile-faq summary::-webkit-details-marker { display: none; }
.profile-faq summary::after,
.qa summary::after { content: "+"; color: var(--c-brand); font-size: 20px; line-height: 1; }
.qa summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa details { border-bottom: 1px solid var(--c-line); margin: 0; }
.qa .col-copy p:last-child,
.qa details p { color: var(--c-muted); }
.qa details p { margin: 0 0 14px 0; line-height: 24px; }
.profile .profile-faq p { margin: 0 0 18px 0; color: var(--text); }
main { --red: var(--c-brand); --d-red: var(--c-brand-dark); --black: var(--c-ink); --grey: var(--c-muted); --border: var(--c-line); --white: var(--c-paper); --text: var(--c-ink); --lgray: #f0f0f0; }
main > .profile,
main > .portfolio,
main > .dist,
main > .qa,
main > .welcome,
main > #team > .welcome,
main > .bg-grey > section { width: min(100% - 2 * var(--pad), var(--w)); margin: 0 auto; padding: 60px 0; font-size: 15px; line-height: normal; }
main > .bg-grey { padding-block: 20px; background: #f9f9f9; }
main .col-copy > h4,
main .document-list > h4 { margin: 1.33em 0 0; color: var(--red); font-family: var(--f-body); font-size: 12px; font-weight: 700; line-height: normal; letter-spacing: normal; text-transform: uppercase; text-wrap: wrap; font-feature-settings: normal; }
.profile h1,
.portfolio h1,
.dist h1,
.qa h1,
.bg-grey h1,
.welcome h1 { margin: 0 0 20px; font-family: "Open Sans Condensed", sans-serif; font-size: 28px; font-weight: 700; line-height: normal; letter-spacing: normal; text-wrap: wrap; font-feature-settings: normal; }
.profile h3,
.portfolio h3,
.dist h3,
.qa h3,
.bg-grey h3 { margin: 0 0 10px; font-family: "Open Sans Condensed", sans-serif; font-size: 20px; font-weight: 700; line-height: normal; letter-spacing: normal; text-wrap: wrap; font-feature-settings: normal; }
.profile small,
.portfolio small,
.dist small,
.qa small,
.bg-grey small { font-size: smaller; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
main > .profile > .cols,
main > .dist > .cols,
main > .qa > .cols,
main > .bg-grey > section > .cols { gap: calc(var(--gap) * 2); }
.col-copy { padding: 0; }
.profile .col-copy p,
.portfolio .col-copy p,
.dist .col-copy p,
.qa .col-copy p,
.bg-grey .col-copy p { margin: 0 0 18px 0; line-height: 24px; }
.col-copy ul { margin: 0; padding: 0; }
.col-copy ul li,
.col-copy ol li { padding: 5px; font-size: 15px; color: var(--text); }
.col-copy ul li { list-style: none; position: relative; }
.col-copy ul li::before { position: absolute; display: block; content: " "; border-bottom: 1px solid var(--grey); border-right: 1px solid var(--grey); width: 6px; height: 12px; top: 14px; left: -20px; transform: translateY(-50%) rotate(45deg); }
.profile { background: var(--white); }
main > .bg-grey > section.profile { background: transparent; }
.profile > .cols { align-items: start; }
#profile { padding-bottom: 0; }
#order > .cols { align-items: stretch; }
.profile .risk-row p { margin: 0; line-height: 24px; color: var(--grey); }
.profile .document-list { padding: 20px 30px; box-shadow: 0 8px 30px #0000000D; }
.profile .col-copy ul { margin: 1em 0; padding-left: 40px; }
.profile .col-copy ul li::before { border-bottom-color: var(--red); border-right-color: var(--red); }
.about-trio .cols { grid-template-columns: 1fr 1fr 1fr; gap: 40px; align-items: start; }
.about-trio .cols > div > img { width: 100%; object-fit: cover; border-radius: 12px; aspect-ratio: 3 / 4; box-shadow: 0 8px 30px #0000000D; }
.about-trio .col-copy { padding-top: 20px; }
.about-trio .col-copy p { color: var(--grey); }
.about-trio .col-copy ul.about-cards { display: block; margin: 20px 0 0 0; padding: 0; }
.about-trio .about-cards li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--lgray); }
.about-trio .about-cards li:last-child { border-bottom: 0; }
.about-trio .col-copy ul.about-cards li::before { content: none; }
.about-trio .about-cards .ico { width: 40px; height: 40px; margin: 0; }
main > .sec:has(> .w > .news-grid) { padding-block: 60px; }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 30px; margin-top: 20px; }
.news-grid a { display: block; color: var(--text); text-decoration: none; }
.news-grid img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; background: var(--lgray); transition: opacity .2s; }
.news-grid time { display: block; margin: 16px 0 6px 0; color: var(--grey); font-size: 13px; }
.news-grid h3 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: normal; text-wrap: wrap; }
.news-grid a:hover { text-decoration: none; }
.news-grid a:hover img { opacity: .85; }
.news-grid a:hover h3 { color: var(--red); }
.news-more { margin: 40px 0 0; text-align: center; }
.team-grid { margin-top: 28px; }
/* Екип: бяла карта, кръгла снимка + текст, 2 колони */
.team-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.team-list .person { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: start; padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 0; }
.team-list .person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 20%; box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--line); }
.team-list .person h3 { margin: 4px 0 2px; font-size: 20px; }
.team-list .person .role { margin: 0 0 10px; color: var(--acc); font-size: 12px; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .03em; }
.team-list .person p:last-child { margin: 0; color: var(--mut); font-size: 15px; line-height: 1.6; }
@media (max-width: 799.98px) {
    .team-list { grid-template-columns: 1fr; }
}
@media (max-width: 499.98px) {
    .team-list .person { grid-template-columns: 64px 1fr; gap: 16px; }
    .team-list .person img { width: 64px; height: 64px; }
}
@media (max-width: 999.98px) {
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599.98px) {
    .news-grid { grid-template-columns: 1fr; }
}
.about-chart .cols { grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.about-chart.profile { background: transparent; }
.about-chart .col-copy p { color: var(--grey); }
.welcome h1 { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.nav-card { padding: 30px; background: var(--white); box-shadow: 0 8px 30px #0000000D; }
.nav-card small { display: block; color: var(--grey); }
.nav-card b { display: block; margin: 4px 0; color: var(--text); font-size: 36px; font-weight: 400; line-height: 1.2; }
.about-chart .nav-card p { margin: 0 0 20px 0; font-size: 14px; }
.nav-card .up { color: #2E7D32; }
.nav-card .down { color: var(--red); }
#nav-chart { height: 280px; }
#nav-chart svg { display: block; overflow: visible; cursor: crosshair; touch-action: pan-y; }
#nav-chart text { fill: var(--grey); font-size: 12px; }
#nav-chart .grid { stroke: var(--border); stroke-dasharray: 2 5; }
#nav-chart .line { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linejoin: round; }
#nav-chart stop { stop-color: var(--red); }
#nav-chart .guide { stroke: var(--grey); stroke-dasharray: 3 3; pointer-events: none; }
#nav-chart .dot { fill: var(--red); stroke: var(--white); stroke-width: 2; }
.nav-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
#nav-period { position: relative; display: inline-block; width: 240px; }
#nav-period input[type=text] { box-sizing: border-box; width: 100%; margin: 0; padding: 6px 12px; border: 1px solid var(--border); border-radius: 2px; background: var(--white); color: var(--black); font: 400 14px/24px var(--f-body); appearance: none; }
#nav-range { padding-right: 36px; background: var(--white) url(/efam/svg/form/calendar.svg) right 12px center / 16px no-repeat; cursor: pointer; }
#nav-period input[aria-invalid=true] { border-color: var(--red); }
.period-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; /* падащото меню покрива графиката под него */ width: 340px; padding: 20px; background: var(--white); border: 1px solid var(--border); box-shadow: 0 8px 30px #0000001A; }
.period-pop .scenarios { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px 0; }
.period-pop a.button { display: inline-block; padding: 0 12px; background: var(--white); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); font-size: 16px; line-height: 40px; font-weight: 700; text-decoration: none; text-transform: none; }
.period-pop a.button:hover { background: var(--lgray); color: var(--text); text-decoration: none; }
.period-pop a.button.line.is-on { color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.about-chart .period-pop .cols { grid-template-columns: 1fr 1fr; gap: 10px; }
.period-pop .cols label { display: block; min-width: 0; }
.about-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.about-cards .document-list { margin: 0; }
.portfolio .about-cards p,
.bg-grey .about-cards p { margin: 10px 0; line-height: 24px; color: var(--grey); }
.about-cards .ico { display: block; width: 64px; height: 64px; margin: 0 0 12px 0; background: var(--red); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.col-copy p.notice { margin: 20px 0; padding: 20px; background: var(--lgray); border-left: 4px solid var(--red); }
.portfolio > .col-copy p { max-width: 860px; }
.portfolio .document-list { margin: 0; box-shadow: 0 8px 30px #0000000D; }
.portfolio .cols { align-items: center; }
.portfolio .about-cards { margin-top: 0; }
.portfolio > h3 { margin-top: 40px; }
.portfolio .about-cards h3 { display: flex; align-items: center; gap: 10px; }
.portfolio .about-cards h3 span { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; background: var(--red); color: var(--white); font-family: var(--f-body); font-size: 15px; font-weight: 700; line-height: 1; }
.portfolio > p:last-child { margin: 10px 0; line-height: 24px; color: var(--grey); }
.donut { display: grid; place-items: center; width: 100%; max-width: 300px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; }
.donut > div { display: grid; place-content: center; width: 58%; aspect-ratio: 1; border-radius: 50%; background: var(--white); text-align: center; color: var(--grey); }
.donut b { color: var(--text); font-size: 20px; line-height: normal; }
.legend { margin: 0; padding: 0; }
.legend li { position: relative; display: flex; justify-content: space-between; gap: 20px; padding: 10px 0 10px 24px; border-bottom: 1px solid var(--lgray); list-style: none; font-size: 15px; line-height: normal; }
.legend li:last-child { border-bottom: 0; }
.legend li::before { content: ""; position: absolute; left: 0; top: 50%; width: 12px; height: 12px; border: 0; background: var(--c); transform: translateY(-50%); }
.dist .document-list { margin: 0; box-shadow: 0 8px 30px #0000000D; }
.dist .document-list p { color: var(--grey); font-size: 15px; line-height: 24px; }
.dist .document-list > p:not(.kv) { margin: 10px 0; }
.dist .kv { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin: 16px 0 0 0; border-bottom: 0; padding: 0; font-size: 15px; }
.dist .kv b { color: var(--red); font-size: 15px; text-align: right; }
.dist .steps { display: block; margin: 20px 0; padding: 0; counter-reset: step; }
.dist .steps li { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-top: 0; border-bottom: 1px solid var(--lgray); counter-increment: step; }
.dist .steps li:first-child { border-color: var(--lgray); }
.dist .steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; margin: 0; background: var(--red); color: var(--white); font: 700 15px/1 var(--f-body); }
.dist .steps span { flex: 1; font-weight: 700; }
.dist .steps small { display: block; font-weight: 400; color: var(--grey); }
.dist input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; margin: 8px 0 0 0; background: transparent; cursor: pointer; }
.dist input[type="range"]:focus { outline: none; }
.dist input[type="range"]::-webkit-slider-runnable-track { box-sizing: border-box; height: 8px; border: 1px solid var(--red); border-radius: 8px; background: linear-gradient(to right, var(--red) var(--p, 0%), #ececec var(--p, 0%)); }
.dist input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; box-sizing: border-box; width: 20px; height: 20px; margin-top: -6px; border: 2px solid #ececec; border-radius: 50%; background: var(--red); }
.dist input[type="range"]::-moz-range-track { box-sizing: border-box; height: 8px; border: 1px solid var(--red); border-radius: 8px; background: #ececec; }
.dist input[type="range"]::-moz-range-progress { height: 6px; border-radius: 8px 0 0 8px; background: var(--red); }
.dist input[type="range"]::-moz-range-thumb { box-sizing: border-box; width: 20px; height: 20px; border: 2px solid #ececec; border-radius: 50%; background: var(--red); }
.dist .scenarios { display: flex; flex-wrap: nowrap; gap: 10px; margin: 16px 0; }
.dist a.button { display: inline-block; padding: 1px 30px 0 30px; background: var(--red); color: var(--white); font-size: 16px; line-height: 40px; font-weight: 700; text-decoration: none; }
.dist a.button.line { background: var(--white); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.dist a.button.line:hover { background: var(--lgray); color: var(--text); text-decoration: none; }
.dist .scenarios a.button { flex: 1; padding: 1px 8px 0; white-space: nowrap; text-align: center; text-transform: none; }
.dist .scenarios a.button.line.is-on { color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.dist .portal-card { margin-top: 20px; padding: 20px; background: var(--lgray); }
.dist .result { border-left: 4px solid var(--red); }
.dist .result p { margin: 10px 0; font-size: 15px; line-height: 24px; color: var(--grey); }
.dist .result b { display: block; margin: 8px 0; color: var(--red); font-family: var(--f-head); font-size: 28px; font-weight: 700; line-height: 1.1; }
.docs .document-list { margin: 0; box-shadow: 0 8px 30px #0000000D; }
.docs .document-list a { display: grid; grid-template-columns: 1fr auto; gap: 10px 20px; align-items: center; margin: 0; padding: 10px 0 10px 40px; border: 0; border-bottom: 1px solid var(--lgray); border-radius: 0; background-color: transparent; background-repeat: no-repeat; background-position: left center; background-size: 24px 24px; color: var(--text); }
.docs .document-list a.pdf { background-image: url(../../svg/filetypes/pdf.svg); }
.docs .document-list a.archive { background-image: url(../../svg/filetypes/archive.svg); }
.docs .document-list a:last-child { border-bottom: 0; }
.docs .document-list a:hover { text-decoration: none; color: var(--red); background-color: transparent; }
.docs .document-list small { color: var(--grey); }
@media (max-width: 799.98px) {
    .cols,
    .about-cards,
    .about-trio .cols,
    .about-chart .cols { grid-template-columns: 1fr; }
    .document-item { display: block; }
    .document-item > :last-child { text-align: left; }
    .document-item .copy { justify-content: flex-start; }
}
.tabs .w { display: flex; align-items: center; gap: var(--gap); }
.tabs nav { display: flex; gap: calc(var(--gap) * 1.2); overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs nav::-webkit-scrollbar { display: none; }
.tabs nav a { flex: none; padding: calc(var(--u) * 2.2) 0; border-bottom: 3px solid transparent; color: var(--mut); font-size: var(--t-s); font-weight: 600; white-space: nowrap; }
.tabs nav a:hover { color: var(--fg); text-decoration: none; }
.tabs nav a.on { color: var(--acc); border-color: var(--acc); }
.tabs .btn { flex: none; }
@media (max-width: 799.98px) {
    .tabs .btn { display: none; }
    .tabs nav { -webkit-mask: linear-gradient(90deg, #000 80%, transparent); mask: linear-gradient(90deg, #000 80%, transparent); }
}
[id] { scroll-margin-top: calc(var(--header-h) + 64px); }

/* Рисков индикатор 1–7 */
.risk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; padding: 0; list-style: none; counter-reset: r; }
.risk li { padding: .7em 0; background: var(--c-soft); color: var(--mut); text-align: center; font-weight: var(--fw-bold); counter-increment: r; }
.risk li::before { content: counter(r); }
.risk li:first-child { border-radius: var(--rad-s) 0 0 var(--rad-s); }
.risk li:last-child { border-radius: 0 var(--rad-s) var(--rad-s) 0; }
.risk .on { background: var(--acc); color: var(--bg); transform: scaleY(1.18); border-radius: var(--rad-s); }
.risk + .row { justify-content: space-between; margin-top: var(--u); font-size: var(--t-xs); color: var(--mut); }

/* Стъпки */
.steps { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); padding: 0; list-style: none; counter-reset: s; }
.steps li { padding: var(--gap) 0 0; border-top: 3px solid var(--line); counter-increment: s; }
.steps li::before { content: "0" counter(s); display: block; margin-bottom: var(--u); font: var(--fw-head) var(--t-2xl)/1 var(--f-head); color: var(--acc); }
.steps li:first-child { border-color: var(--acc); }
.steps p { color: var(--mut); font-size: var(--t-s); }

/* Таблица (на мобилно се подрежда; етикетът идва от data-label) */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.tbl th { padding: var(--u) calc(var(--u) * 1.5); color: var(--mut); font-size: var(--t-xs); font-weight: 600; text-align: right; vertical-align: bottom; }
.tbl td { padding: calc(var(--u) * 1.8) calc(var(--u) * 1.5); border-top: 1px solid var(--line); text-align: right; }
.tbl :is(th, td):first-child { text-align: left; font-weight: var(--fw-bold); }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--acc) 4%, transparent); }
@media (max-width: 799.98px) {
    .tbl thead { display: none; }
    .tbl tr { display: block; padding: var(--u) 0; border-top: 1px solid var(--line); }
    .tbl td { display: flex; justify-content: space-between; gap: var(--gap); padding: calc(var(--u) * .6) 0; border: 0; }
    .tbl td::before { content: attr(data-label); color: var(--mut); font-weight: 400; text-align: left; }
    .tbl td:first-child { font-size: var(--t-m); }
    .tbl td:first-child::before { content: none; }
}

/* Калкулатор */
.calc { padding: calc(var(--gap) * 1.4); background: var(--card); border: 1px solid var(--line); border-radius: var(--rad); box-shadow: var(--shadow); }
.calc label { display: flex; justify-content: space-between; margin: var(--gap) 0 var(--u); font-weight: 600; font-size: var(--t-s); }
.calc output { color: var(--acc); font-weight: var(--fw-head); }
.calc .res { margin-top: var(--gap); padding: var(--gap); border-radius: var(--rad-s); background: color-mix(in srgb, var(--acc) 7%, transparent); }
.calc .res b { display: block; font: var(--fw-head) var(--t-3xl)/1.15 var(--f-head); color: var(--acc); }
input[type=range] { width: 100%; accent-color: var(--acc); }

/* Документи */
.file {
    display: flex; align-items: center; gap: calc(var(--u) * 1.5); padding: calc(var(--u) * 1.6) var(--u) calc(var(--u) * 1.6) 48px;
    border-bottom: 1px solid var(--line); color: var(--fg); background: var(--i) 8px center / 26px no-repeat;
}
.card:has(> .file) { gap: 0; padding-block: var(--u); }
.card > .file:last-child { border-bottom: 0; }
.file small { margin-left: auto; color: var(--mut); white-space: nowrap; }
.file:hover { text-decoration: none; color: var(--acc); }
.file b { margin-left: auto; padding-left: var(--gap); color: var(--fg); white-space: nowrap; }
.reports .file:first-child { border-top: 1px solid var(--line); }
.pdf { --i: url(../../svg/filetypes/pdf.svg); }
.doc { --i: url(../../svg/filetypes/doc.svg); }
.xls { --i: url(../../svg/filetypes/xls.svg); }
.zip { --i: url(../../svg/filetypes/archive.svg); }

/* Въпроси и отговори (native <details>, без JS) */
.faq { border-bottom: 1px solid var(--line); margin: 0; }
.faq summary { display: flex; justify-content: space-between; gap: var(--gap); padding: calc(var(--u) * 2.4) 0; font-weight: var(--fw-bold); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--acc); font-size: var(--t-xl); line-height: .8; transition: transform var(--speed); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding-bottom: var(--gap); color: var(--mut); }

/* Хоризонтални ленти (топ позиции, разпределение). Ширина: style="--v: 80%" */
.bars { padding: 0; list-style: none; }
.bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--gap); padding: calc(var(--u) * 1.5) 0; border-bottom: 1px solid var(--line); }
.bars li:last-child { border-bottom: 0; }
.bars span { font-weight: var(--fw-bold); }
.bars small { grid-column: 1; color: var(--mut); }
.bars b { grid-row: 1 / 3; grid-column: 2; align-self: center; font: var(--fw-head) var(--t-xl)/1 var(--f-head); color: var(--acc); }
.bars li::after { content: ""; grid-column: 1 / -1; height: 4px; margin-top: var(--u); border-radius: 4px; background: linear-gradient(90deg, var(--acc) var(--v), var(--line) var(--v)); }

/* Навигационна пътечка */
.crumbs { display: flex; flex-wrap: wrap; gap: .5em; margin-bottom: var(--gap); padding: 0; list-style: none; font-size: var(--t-xs); color: var(--mut); }
.crumbs li + li::before { content: "/"; margin-right: .5em; }
.crumbs a { color: inherit; }

/* Копиране (IBAN и др.) */
.copy { display: flex; flex-wrap: wrap; align-items: center; gap: var(--u); font-variant-numeric: tabular-nums; }
.copy code { font: var(--fw-bold) var(--t-m) var(--f-body); letter-spacing: .04em; }
.copy button { padding: .3em .8em; border: 1px solid var(--line); border-radius: var(--rad-s); background: none; color: var(--acc); font: 600 var(--t-xs) var(--f-body); cursor: pointer; }

/* Мобилна лепкава CTA лента */
.dock { display: none; }
@media (max-width: 799.98px) {
    .dock { position: sticky; bottom: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between; gap: var(--gap); padding: var(--u) var(--pad); background: var(--bg); border-top: 1px solid var(--line); box-shadow: var(--shadow); }
    .dock small { color: var(--mut); line-height: 1.3; }
}

/* Бележка / предупреждение */
.note { padding: var(--gap); border-left: 4px solid var(--acc); background: color-mix(in srgb, var(--acc) 6%, transparent); font-size: var(--t-s); }
.warrning { max-width: 900px; margin: 0 auto; padding: 0 20px 20px 20px; font-size: 12px; }

/* 404 от html/basic.html. z-index: -1 е нужен, за да остане водният знак зад текста. */
.not-found { max-width: 760px; margin: 0 auto; padding: 20px 0 0 0; display: flex; align-items: center; color: var(--c-muted); }
.not-found > div { position: relative; padding: 20px; margin: 40px auto; }
.not-found h3 { margin-bottom: 20px; color: var(--c-ink); }
.not-found p { margin: 0 0 12px 0; }
.not-found ul { margin: 0 0 40px 0; padding: 0; }
.not-found ul li { list-style: none; position: relative; padding: 5px 5px 5px 30px; font-size: 15px; color: var(--c-ink); }
.not-found ul li::before { position: absolute; display: block; content: ""; border-bottom: 1px solid var(--c-muted); border-right: 1px solid var(--c-muted); width: 6px; height: 12px; top: 14px; left: 5px; transform: translateY(-50%) rotate(45deg); }
.not-found .btn { text-transform: uppercase; }
@media (min-width: 480px) {
    .not-found > div::before { content: "404"; position: absolute; z-index: -1; line-height: 240px; font-size: 240px; font-weight: bold; color: #CCC3; }
}

/* CTA лента */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--gap); padding: calc(var(--gap) * 2); border-radius: 0; }
.cta p { color: var(--mut); }

/* Новини */
.news time { color: var(--acc); font-size: var(--t-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; }
.news h3 { font-size: var(--t-m); }

/* Форми */
.form { display: grid; gap: calc(var(--u) * 2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.form .full { grid-column: 1 / -1; }
input:not([type=range], [type=checkbox]), select, textarea {
    width: 100%; padding: .85em 1em; border: 1px solid var(--line); border-radius: var(--rad-s);
    background: var(--card); color: var(--fg); font: inherit; font-size: var(--t-s);
}
:is(input, select, textarea):focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 15%, transparent); }
textarea { min-height: 140px; resize: vertical; }
.check { display: flex; gap: var(--u); align-items: flex-start; font-size: var(--t-s); color: var(--mut); }
.check input { accent-color: var(--acc); margin-top: .3em; }
/* Форма за запитване: полетата от html/basic.html (css/form.css), без заобляне. */
form.contacts {
    align-content: start; min-width: 0; padding: calc(var(--gap) * 1.2);
    background: var(--c-paper); border: 1px solid var(--c-line); border-radius: 0;
}
form.contacts input:not([type=checkbox]),
form.contacts select,
form.contacts textarea {
    width: 100%; margin: 0; padding: 6px 12px; border: 1px solid var(--c-line); border-radius: 0;
    background-color: var(--c-paper); color: var(--c-ink); box-shadow: none;
    font-family: var(--f-body); font-weight: 400; font-size: 14px; line-height: 24px;
    appearance: none;
}
form.contacts select {
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.3' d='M11.57 13.56 16 17.98 20.43 13.56'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right center; background-size: 28px 28px;
}
form.contacts textarea { min-height: 140px; resize: vertical; }
form.contacts :is(input, select, textarea):focus { outline: none; border-color: var(--c-brand); box-shadow: none; }
form.contacts .btn { border-radius: 0; text-transform: uppercase; }
/* Чекбокс като label.checkbox във form.css: скрит input, кутия в span, отметка с ::before. */
form.contacts label.checkbox {
    display: block; min-width: 0; margin: 0; padding: 5px 0 5px 30px;
    color: var(--c-ink); font-size: 14px; line-height: 19px; user-select: none;
}
form.contacts label.checkbox input { display: none; }
form.contacts label.checkbox span {
    display: inline-block; width: 18px; height: 18px; margin: 1px 6px 0 -30px;
    background: var(--c-paper); border: 1px solid var(--c-line); vertical-align: top;
}
form.contacts label.checkbox:hover span { border-color: var(--c-muted); }
form.contacts label.checkbox input:checked + span { position: relative; background: var(--c-muted); border-color: var(--c-muted); }
form.contacts label.checkbox input:checked + span::before {
    content: ""; position: absolute; top: 3px; left: 6px; width: 4px; height: 8px;
    border-bottom: 2px solid var(--c-paper); border-right: 2px solid var(--c-paper); transform: rotate(45deg);
}
form.contacts label.checkbox a { color: var(--c-brand); text-decoration: underline; }

/* Медия */
.media { border-radius: var(--rad); overflow: hidden; aspect-ratio: 4 / 3; background: var(--c-soft); }
.media img { width: 100%; height: 100%; object-fit: cover; }

/* --- Footer ------------------------------------------------------------ */
.ft { padding-block: var(--sec) var(--gap); font-size: var(--t-s); background: #393939; }
.ft h4 { color: var(--fg); }
.ft ul { padding: 0; list-style: none; }
.ft li { padding: .25em 0; }
.ft a { color: var(--mut); }
.ft a:hover { color: var(--fg); }
.ft a.btn:not(.line) { color: var(--c-paper); }
.ft a.btn.line { background: transparent; color: var(--c-paper); box-shadow: inset 0 0 0 1px var(--c-paper); }
.ft a.btn.line:hover { background: var(--c-paper); color: #000; box-shadow: none; }
.ft .legal { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--u) var(--gap); margin-top: var(--sec); padding-top: var(--gap); border-top: 1px solid var(--line); color: var(--mut); font-size: var(--t-xs); }
.ft .legal span { flex: 1 1 40rem; }
.ft .legal a { display: inline-flex; align-items: center; gap: calc(var(--u) * .5); margin-left: auto; white-space: nowrap; }
