/* ===========================================================================
   ekspo.by «ЭкспОценка» — corporate ISO-certification theme over Spectre.css
   Tokens from design/specs.md:
   blue #1B5FA8 / deep #103F73 / teal #2BA39A / sky #E8F1FA
   surface #F7FAFD / ink #1F2630 / muted #677686 / border #DCE6F0
   Headings: Montserrat · Body: Open Sans (full Cyrillic)
   =========================================================================== */
:root {
  --ek-blue: #1B5FA8;
  --ek-blue-deep: #103F73;
  --ek-teal: #2BA39A;
  --ek-sky: #E8F1FA;
  --ek-surface: #F7FAFD;
  --ek-card: #FFFFFF;
  --ek-ink: #1F2630;
  --ek-muted: #677686;
  --ek-border: #DCE6F0;
  --ek-radius: 10px;
  --ek-shadow: 0 4px 16px rgba(27,95,168,0.08);
  --ek-shadow-hover: 0 10px 28px rgba(27,95,168,0.16);
}
body { background: var(--ek-surface); color: var(--ek-ink); font-family: "Open Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
h1,h2,h3,h4,h5,h6 { font-family: "Montserrat", system-ui, sans-serif; color: var(--ek-blue-deep); font-weight: 700; line-height: 1.25; }

/* header */
.ek-header { position: sticky; top: 0; z-index: 60; background: var(--ek-blue); color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.10); }
.ek-header__inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1.25rem; flex-wrap: wrap; }
.ek-brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.05; }
.ek-brand__title { font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 1.3rem; color: #fff; letter-spacing: 0.02em; }
.ek-brand__sub { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: #c5dcf0; }
.ek-nav { display:flex; }
.ek-nav ul { display: flex; flex-wrap: wrap; gap: 0.1rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.ek-nav li { margin: 0; position: relative; }
.ek-nav a { display: block; padding: 0.4rem 0.7rem; border-radius: 6px; color: #e7f0fa; text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: background .2s,color .2s; }
.ek-nav a:hover, .ek-nav a.active { background: rgba(255,255,255,0.16); color: #fff; }
.ek-nav .has-children > .submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; background: var(--ek-card); border: 1px solid var(--ek-border); border-radius: var(--ek-radius); box-shadow: var(--ek-shadow); padding: 0.3rem; z-index: 70; flex-direction: column; }
.ek-nav .has-children:hover > .submenu, .ek-nav .has-children:focus-within > .submenu { display: flex; }
.ek-nav .submenu a { color: var(--ek-ink); white-space: nowrap; font-weight: 400; }
.ek-nav .submenu a:hover { background: var(--ek-sky); color: var(--ek-blue-deep); }
.ek-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.4); color: #fff; border-radius: 6px; padding: 0.25rem 0.6rem; font-size: 1.3rem; cursor: pointer; }
@media (max-width: 980px) {
  .ek-toggle { display: block; }
  .ek-nav { display: none; flex-basis: 100%; }
  #ek-nav-toggle:checked ~ .ek-nav { display: block; }
  .ek-nav ul { flex-direction: column; align-items: stretch; }
  .ek-nav .has-children > .submenu { position: static; box-shadow: none; border: none; padding-left: 1rem; }
}

/* hero */
.ek-hero { background: linear-gradient(120deg, var(--ek-blue), var(--ek-blue-deep)); color: #fff; border-radius: 0 0 16px 16px; padding: 2.8rem 1.5rem; text-align: center; margin-bottom: 2rem; }
.ek-hero h1 { color: #fff; font-size: clamp(1.8rem,4vw,2.7rem); margin: 0 0 0.5rem; }
.ek-hero p { color: #d8e7f6; max-width: 62ch; margin: 0 auto; }
.ek-hero::after { content:""; display:block; width:90px; height:4px; background:var(--ek-teal); margin:1.1rem auto 0; border-radius:4px; }

/* layout */
.ek-wrap { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.ek-cols { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
@media (max-width: 980px) { .ek-cols { grid-template-columns: 1fr; } }
.ek-section-title { font-size: 1.6rem; margin: 0 0 1.1rem; padding-bottom: 0.4rem; border-bottom: 3px solid var(--ek-teal); display: inline-block; }

/* sidebar */
.ek-aside { display: flex; flex-direction: column; gap: 1.25rem; }
.ek-panel { background: var(--ek-card); border: 1px solid var(--ek-border); border-radius: var(--ek-radius); box-shadow: var(--ek-shadow); padding: 1.1rem 1.25rem; }
.ek-panel h3 { font-size: 1.05rem; margin: 0 0 0.7rem; color: var(--ek-blue-deep); }
.ek-panel ul { list-style: none; margin: 0; padding: 0; }
.ek-panel li { margin: 0 0 0.4rem; }
.ek-panel a { color: var(--ek-ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.ek-panel a:hover { color: var(--ek-blue); }

/* content */
.content-prose { max-width: 100%; }
.content-copy { margin: 0 0 1rem; }
.content-heading { margin: 1.5rem 0 0.7rem; }
.content-prose a, .content-copy a, .content-mini-card h3 a { color: var(--ek-blue); text-decoration: underline; text-decoration-color: rgba(27,95,168,0.4); text-underline-offset: 2px; }
.content-prose a:hover, .content-copy a:hover { color: var(--ek-teal); }
.content-figure { margin: 1rem 0; }
.content-figure img, .content-gallery img { max-width: 100%; height: auto; border-radius: 8px; }
.content-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 0.7rem; margin: 1rem 0; }
.content-gallery__item { margin: 0; }
.content-gallery__item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
figcaption { font-size: 0.8rem; color: var(--ek-muted); margin-top: 0.25rem; }
.content-list { padding-left: 1.2rem; margin: 0 0 1rem; }
.content-table-wrap { overflow-x: auto; margin: 1rem 0; }
.content-table { width: 100%; border-collapse: collapse; background: var(--ek-card); }
.content-table td, .content-table th { padding: 0.45rem 0.6rem; border: 1px solid var(--ek-border); text-align: left; vertical-align: top; }
.content-table th { background: var(--ek-sky); color: var(--ek-blue-deep); }

/* cards */
.ek-card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 1rem; }
.content-mini-card { background: var(--ek-card); border: 1px solid var(--ek-border); border-radius: var(--ek-radius); box-shadow: var(--ek-shadow); padding: 1rem 1.1rem; transition: transform .2s, box-shadow .2s; }
.content-mini-card:hover { transform: translateY(-2px); box-shadow: var(--ek-shadow-hover); }
.content-mini-card h3 { font-size: 1.02rem; margin: 0 0 0.3rem; }
.content-mini-card p { margin: 0; color: var(--ek-muted); font-size: 0.88rem; }

/* breadcrumbs */
.ek-breadcrumbs { margin: 0 0 1rem; font-size: 0.85rem; }
.ek-breadcrumbs ul { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; padding: 0; margin: 0; }
.ek-breadcrumbs li::after { content: "›"; margin-left: 0.35rem; color: var(--ek-muted); }
.ek-breadcrumbs li:last-child::after { content: ""; }
.ek-breadcrumbs a { color: var(--ek-blue); text-decoration: none; }

/* article */
.ek-article { background: var(--ek-card); border: 1px solid var(--ek-border); border-radius: var(--ek-radius); box-shadow: var(--ek-shadow); padding: 1.5rem 1.75rem; }
.ek-article__meta { color: var(--ek-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.ek-article__summary { border-left: 4px solid var(--ek-teal); background: var(--ek-sky); padding: 0.8rem 1.1rem; border-radius: 0 8px 8px 0; margin: 0 0 1.4rem; }
.ek-article__image { float: right; max-width: 40%; margin: 0 0 1rem 1.4rem; border-radius: 8px; }
@media (max-width: 600px) { .ek-article__image { float: none; max-width: 100%; margin: 0 0 1rem; } }
.ek-toc { background: var(--ek-sky); border: 1px solid var(--ek-border); border-radius: 8px; padding: 0.9rem 1.1rem; margin-bottom: 1.4rem; }
.ek-toc ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.ek-toc a { color: var(--ek-blue); }

/* category grid */
.ek-cat-grid { display: grid; gap: 1.2rem; }
.ek-cat-grid.cols-2 { grid-template-columns: repeat(2,1fr); }
.ek-cat-grid.cols-3 { grid-template-columns: repeat(3,1fr); }
@media (max-width: 800px) { .ek-cat-grid.cols-2, .ek-cat-grid.cols-3 { grid-template-columns: 1fr; } }
.ek-cat-card { display: flex; flex-direction: column; overflow: hidden; }
.ek-cat-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.ek-cat-card__body { padding: 1rem 1.1rem; }
.ek-cat-card__body h3 a { color: var(--ek-blue-deep); text-decoration: none; }
.ek-cat-card__body h3 a:hover { color: var(--ek-teal); }
.ek-readmore { display: inline-block; margin-top: 0.5rem; color: var(--ek-blue); font-weight: 600; text-decoration: none; }
.ek-readmore:hover { text-decoration: underline; }

/* footer */
.ek-footer { background: var(--ek-blue-deep); color: #cfe0f1; margin-top: 3rem; padding: 2.5rem 1.25rem; border-top: 4px solid var(--ek-teal); }
.ek-footer__inner { max-width: 1200px; margin: 0 auto; }
.ek-footer h2 { color: #fff; margin: 0 0 0.5rem; font-size: 1.25rem; }
.ek-footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 1rem 0; }
.ek-footer__links a { color: #cfe1f3; text-decoration: none; font-size: 0.85rem; }
.ek-footer__links a:hover { text-decoration: underline; color: #fff; }
.ek-footer__copy { color: #8fb0d0; font-size: 0.8rem; margin-top: 1rem; }
