/* eko-dim.com.ua — Фінансова компанія «ЕКО-ДІМ».
   Colours and type follow the old theme: olive green menu, orange call-to-action bands,
   Rubik (light) headings and Open Sans text. Greens and greys are a step darker where text
   sits on them, so that it stays readable (WCAG AA). */

@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/rubik-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/rubik-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; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/open-sans-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/open-sans-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; }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/open-sans-italic-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/open-sans-italic-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 {
  --green: #68982b;        /* brand green: accents, large headings */
  --green-dark: #4f7d1d;   /* menu background (white text 4.9:1) */
  --green-text: #467018;   /* links on white (5.9:1) */
  --orange: #ee7d1a;       /* brand orange: bands, underlines */
  --ink: #14141c;
  --text: #474750;
  --muted: #62626c;
  --line: #e4e4e8;
  --soft: #f5f6f2;
  --side: 300px;
  --pad: clamp(20px, 4.5vw, 56px);
  --head: "Rubik", "Helvetica Neue", Arial, sans-serif;
  --body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font: 16px/1.7 var(--body); color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--green-text); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; color: var(--ink); line-height: 1.25; }
strong { font-weight: 700; color: #2c2c33; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: #fff; color: var(--ink); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* ---------- layout and menu ---------- */
.layout { min-height: 100vh; }
.sidebar { background: var(--green-dark); color: #fff; }
.sidebar a { color: #fff; text-decoration: none; }
.brand { margin: 0; }
.brand a { display: flex; align-items: center; gap: 12px; }
.brand img { width: 54px; }
.brand__caption { font: 500 12px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; }

.nav__list, .nav__list ul { list-style: none; margin: 0; padding: 0; }
.nav__list > li { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.nav__list a, .nav__list summary {
  display: block; padding: 13px 28px; font: 400 15px/1.4 var(--head); letter-spacing: .06em; text-transform: uppercase;
  color: #fff; cursor: pointer;
}
.nav__list summary { list-style: none; position: relative; padding-right: 48px; }
.nav__list summary::-webkit-details-marker { display: none; }
.nav__list summary::after {
  content: ""; position: absolute; right: 30px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s;
}
.nav__list details[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.nav__list ul { padding: 0 0 10px; }
.nav__list ul a { padding: 8px 28px 8px 42px; font-size: 14px; letter-spacing: .02em; text-transform: none; line-height: 1.45; }
.nav__list a:hover, .nav__list summary:hover { background: rgba(0, 0, 0, .14); color: #fff; }
.nav__list a[aria-current="page"] { background: rgba(0, 0, 0, .2); box-shadow: inset 4px 0 0 var(--orange); }
.sidebar__contacts { padding: 22px 28px 28px; font-size: 14px; line-height: 1.6; }
.sidebar__contacts p { margin: 0 0 8px; }
.sidebar__label { font: 500 12px/1.2 var(--head); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.sidebar__contacts a:hover { text-decoration: underline; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px; margin-left: auto; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 4px; background: transparent; color: #fff; font: 500 14px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
}
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after { display: block; width: 18px; height: 2px; background: #fff; transition: transform .2s; }
.nav-toggle__icon { position: relative; }
.nav-toggle__icon::before, .nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { transform: translateY(-6px) rotate(-45deg); }

/* phones and tablets: bar on top, menu opens below it */
@media (max-width: 1099px) {
  .sidebar { position: sticky; top: 0; z-index: 20; }
  .sidebar__bar { display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 8px var(--pad); }
  .js .nav { display: none; }
  .js .nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 68px); overflow-y: auto;
    background: var(--green-dark); border-top: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 18px 30px rgba(0, 0, 0, .25); }
  html:not(.js) .nav-toggle { display: none; }
  .nav__list a, .nav__list summary { padding-left: var(--pad); }
  .nav__list ul a { padding-left: calc(var(--pad) + 16px); }
  .sidebar__contacts { padding-left: var(--pad); }
}

/* desktop: fixed menu column on the left, as on the old site */
@media (min-width: 1100px) {
  .layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
  .sidebar__bar { padding: 40px 28px 34px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
  .brand a { flex-direction: column; gap: 10px; text-align: center; }
  .brand img { width: 128px; }
  .brand__caption { display: none; }  /* the big logo already says it */
  .nav-toggle { display: none; }
  .nav { display: flex; flex-direction: column; flex: 1; }
  .sidebar__contacts { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .14); }
}

.page { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }
main { flex: 1; }
main:focus { outline: none; }

/* ---------- home ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: min(92vh, 900px); color: #fff; background: #2a2a30; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 14, 22, .78), rgba(14, 14, 22, .55) 70%, rgba(14, 14, 22, .4)); }
.hero__inner { max-width: 760px; padding: 72px var(--pad); font-size: 15px; line-height: 1.75; }
.hero__inner p { margin: 0 0 16px; }
.hero strong { color: #fff; font-weight: 700; }
.hero a { color: #fff; }
.hero__title { margin: 0 0 30px; color: #fff; font-weight: 300; font-size: clamp(36px, 5vw, 50px); }
.hero__title::after, .section-title::after { content: ""; display: block; width: 78px; height: 3px; margin-top: 18px; background: var(--orange); }
.hero__contacts { margin-top: 26px !important; font-size: 16px; }
.hero__contacts a { font: 500 22px/1.4 var(--head); text-decoration: none; letter-spacing: .02em; }
.hero__contacts a:hover { text-decoration: underline; }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; padding: 40px var(--pad); background: var(--orange); color: var(--ink); }
.cta + .cta { border-top: 1px solid rgba(20, 20, 28, .12); }
.cta__title { margin: 0; font-weight: 300; font-size: clamp(22px, 2.6vw, 28px); color: var(--ink); }
.cta__text p { margin: 6px 0 0; font-size: 15px; line-height: 1.6; max-width: 640px; }
.btn { display: inline-block; flex: none; padding: 15px 32px; background: #fff; color: var(--ink); border-radius: 2px; font: 500 14px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; transition: background .2s, color .2s; }
.btn:hover { background: var(--ink); color: #fff; }

.news { padding: 72px var(--pad) 80px; }
.section-title { margin: 0 0 40px; font-weight: 300; font-size: clamp(34px, 4.4vw, 48px); }

/* ---------- news cards ---------- */
.cards { display: grid; gap: 36px 30px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { display: flex; flex-direction: column; }
.card__link { display: block; text-decoration: none; color: var(--ink); }
.card__img { display: block; width: 100%; aspect-ratio: 37 / 25; object-fit: cover; background: var(--soft); transition: opacity .2s; }
.card__title { margin: 18px 0 8px; font-size: 19px; font-weight: 400; line-height: 1.35; color: var(--ink); transition: color .2s; }
.card__link:hover .card__title { color: var(--green-text); }
.card__link:hover .card__img { opacity: .88; }
.card__date { margin: 0; font-size: 13px; color: var(--muted); }
.card__text { margin: 10px 0 0; font-size: 14px; line-height: 1.6; }
.more { display: inline-flex; align-items: center; gap: 10px; margin-top: 36px; color: var(--ink); font: 500 15px/1 var(--head); text-decoration: none; }
.more::after { content: "→"; color: var(--orange); font-size: 18px; transition: transform .2s; }
.more:hover::after { transform: translateX(4px); }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 56px; }
.pager ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font: 400 15px/1 var(--head); }
.pager a:hover { border-color: var(--green); color: var(--green-text); }
.pager a[aria-current="page"] { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }

/* ---------- inner pages ---------- */
.page-head { padding: 64px var(--pad) 28px; }
.crumbs ol { display: flex; flex-wrap: wrap; margin: 0 0 18px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "›"; margin: 0 9px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green-text); }
.page-title { margin: 0; font-weight: 300; font-size: clamp(28px, 3.6vw, 42px); color: var(--green-dark); overflow-wrap: anywhere; }
.page-title::after { content: ""; display: block; width: 64px; height: 3px; margin-top: 20px; background: var(--orange); }
.page-meta { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.page-meta a { color: var(--muted); }

.content { max-width: 920px; padding: 8px var(--pad) 72px; }
.content--wide { max-width: none; }
.content > :first-child { margin-top: 0; }
.content p, .content ul, .content ol, .content blockquote, .content .table-scroll { margin: 0 0 1.1em; }
.content ul, .content ol { padding-left: 1.4em; }
.content h2 { font-size: 26px; margin: 1.6em 0 .6em; font-weight: 400; }
.content h3 { font-size: 22px; margin: 1.5em 0 .6em; font-weight: 400; }
.content h4 { font-size: 19px; margin: 1.4em 0 .5em; font-weight: 500; }
.content blockquote { padding: 4px 0 4px 22px; border-left: 3px solid var(--green); font-style: italic; color: #3a3a42; }
.content img { display: inline-block; vertical-align: top; margin: 6px 6px 6px 0; }
.content p:has(> img + img) { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.content p:has(> img + img) img { margin: 0; width: 100%; }
.content sup { line-height: 0; }
.content a { overflow-wrap: anywhere; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); }
.content table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.content td, .content th { padding: 9px 12px; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.content tr:nth-child(even) td { background: #fafaf8; }
.content td p { margin: 0 0 .4em; }
.content td p:last-child { margin-bottom: 0; }
.content table:has(td:nth-child(6)) { min-width: 980px; font-size: 13px; }

/* links to documents: icon, name, type and size */
.doc { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; font-weight: 600; text-decoration: none; }
.doc::before { content: ""; flex: none; align-self: center; width: 22px; height: 26px; background: url("../img/doc-pdf.svg") no-repeat center / contain; }
.doc--doc::before, .doc--docx::before { background-image: url("../img/doc-word.svg"); }
.doc:hover { text-decoration: underline; }
.doc__meta { font-weight: 400; font-size: 13px; color: var(--muted); white-space: nowrap; }
.doc-list { list-style: none; padding: 0 !important; border-top: 1px solid var(--line); }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list .doc { display: flex; padding: 16px 4px; }
.doc-list .doc__meta { margin-left: auto; }
.license a { display: inline-block; border: 1px solid var(--line); padding: 10px; background: #fff; }
.license img { margin: 0; max-width: min(100%, 640px); }
.video-link a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.video-link a::before { content: "▶"; color: #c4302b; }

.post__image { margin: 0 0 1.4em; }
.post__image img { display: block; width: 100%; max-width: 760px; margin: 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-nav a { display: block; color: var(--ink); text-decoration: none; font: 400 16px/1.4 var(--head); }
.post-nav a span { display: block; margin-bottom: 6px; font: 400 12px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.post-nav a:hover { color: var(--green-text); }
.post-nav__next { text-align: right; }
.post + .content { padding-top: 0; }
.post + .content .more { margin-top: 28px; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #b9b9c4; font-size: 14px; line-height: 1.7; padding: 52px var(--pad) 28px; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__grid { display: grid; gap: 28px 48px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.footer__title { margin: 0 0 12px; color: #fff; font: 500 16px/1.4 var(--head); letter-spacing: .02em; }
.footer p { margin: 0 0 10px; }
.footer__copy { margin: 36px 0 0 !important; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .page-head { padding-top: 40px; }
  .hero { min-height: 0; }
  .hero__inner { padding-top: 48px; padding-bottom: 48px; }
  .cta { padding-top: 32px; padding-bottom: 32px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__next { text-align: left; }
  .doc-list .doc__meta { margin-left: 0; }
}

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

@media print {
  .sidebar, .footer, .skip-link, .post-nav, .more, .pager { display: none !important; }
  .layout { display: block; }
  .page-head, .content { padding: 0; max-width: none; }
  a { color: inherit; }
}
