/*
Theme Name: VtochKu Blog
Theme URI: https://vtochku.one/
Author: VtochKu
Description: WordPress blog with the shared VtochKu marketing layout.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.2
Text Domain: vtochku-blog
*/

:root {
  --vtochku-bg: #fafaff;
  --vtochku-surface: #fff;
  --vtochku-surface-lilac: #f3f2fb;
  --vtochku-text: #20232f;
  --vtochku-muted: #686d7b;
  --vtochku-border: #e7e5f3;
  --vtochku-accent: #6858eb;
  --vtochku-accent-hover: #5545d5;
  --vtochku-focus: #9c93fa;
  --vtochku-gutter: 40px;
  --vtochku-header-height: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--vtochku-header-height) + 24px); }
body { margin: 0; background: var(--vtochku-bg); color: var(--vtochku-text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.65; text-rendering: optimizeLegibility; }
button, input, textarea { font: inherit; }
img, video { max-width: 100%; height: auto; }
.wp-site-blocks > * { margin-block-start: 0; }
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 20; }
:where(a, button, input, textarea, select, summary):focus-visible { outline: 3px solid var(--vtochku-focus); outline-offset: 3px; }
:where(main) :where(h1, h2, h3, h4, p, li, a) { overflow-wrap: anywhere; }

/* Same container, typography and breakpoints as LandingHeader.vue. */
.vtochku-header { background: #fafaffeb; backdrop-filter: blur(18px); border-bottom: 1px solid #ecebfa; }
.vtochku-site-nav { display: flex; align-items: center; gap: 24px; width: min(1280px, calc(100% - var(--vtochku-gutter))); height: var(--vtochku-header-height); margin-inline: auto; }
.vtochku-logo, .vtochku-footer__brand { display: inline-flex; align-items: center; flex-shrink: 0; color: var(--vtochku-text); font-size: 21px; font-weight: 800; letter-spacing: -.04em; line-height: normal; text-decoration: none; white-space: nowrap; }
.vtochku-logo__mark { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-inline-end: 9px; border-radius: 12px; background: #6959eb; color: #fff; font-size: 25px; line-height: normal; }
.vtochku-logo__accent { color: var(--vtochku-accent); }
.vtochku-nav-links { display: flex; align-items: center; gap: 18px; margin-inline-start: auto; }
.vtochku-nav-links a { color: #55596b; font-size: 14px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.vtochku-nav-links a:hover { color: var(--vtochku-accent-hover); }
.vtochku-header-cta { display: inline-flex; align-items: center; justify-content: center; padding: 12px 18px; border-radius: 11px; background: var(--vtochku-accent); color: #fff; font-size: 14px; font-weight: 750; line-height: normal; text-decoration: none; white-space: nowrap; }
.vtochku-header-cta:hover { background: var(--vtochku-accent-hover); color: #fff; }
.vtochku-mobile-menu { display: none; margin-inline-start: auto; }
.vtochku-mobile-menu summary { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--vtochku-text); font-size: 26px; line-height: 1; list-style: none; cursor: pointer; }
.vtochku-mobile-menu summary::-webkit-details-marker { display: none; }
.vtochku-menu-close, .vtochku-mobile-menu[open] .vtochku-menu-open { display: none; }
.vtochku-mobile-menu[open] .vtochku-menu-close { display: inline; }
.vtochku-mobile-menu__panel { position: absolute; top: var(--vtochku-header-height); right: 0; left: 0; display: grid; gap: 4px; max-height: calc(100dvh - var(--vtochku-header-height) - var(--wp-admin--admin-bar--height, 0px)); overflow-y: auto; overscroll-behavior: contain; padding: 16px 24px 24px; background: var(--vtochku-bg); box-shadow: 0 20px 30px #28245118; }
.vtochku-mobile-menu__panel a:not(.vtochku-header-cta) { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 10px; color: #55596b; font-size: 14px; font-weight: 650; text-decoration: none; }
.vtochku-mobile-menu__panel a:not(.vtochku-header-cta):hover { background: var(--vtochku-surface-lilac); }
.vtochku-mobile-menu__panel .vtochku-header-cta { min-height: 48px; margin-top: 10px; }

/* WordPress constrained groups must use the same outer grid as the main site. */
.vtochku-home > .vtochku-hero,
.vtochku-home > .vtochku-latest,
.vtochku-archive > .alignwide,
.vtochku-article-shell > .vtochku-article-head,
.vtochku-article-shell > .vtochku-related {
  width: min(1280px, calc(100% - var(--vtochku-gutter)));
  max-width: none;
  margin-inline: auto;
}
.vtochku-home { padding-block: 0 clamp(64px, 8vw, 112px); }
.vtochku-hero { padding-block: clamp(48px, 6vw, 80px) clamp(40px, 5vw, 64px); }
.vtochku-hero > .vtochku-hero__copy { max-width: 960px; margin-inline: 0 !important; }
/* Gutenberg's constrained layout sets auto margins with !important. */
.vtochku-hero__copy > *, .vtochku-latest > * { margin-inline: 0 !important; }
.vtochku-eyebrow { margin-block: 0; color: #5f52cd; font-size: 13px; font-weight: 800; letter-spacing: .01em; }
.vtochku-eyebrow::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-inline-end: 9px; border-radius: 50%; background: var(--vtochku-accent); vertical-align: middle; }
.vtochku-hero h1 { max-width: 960px; margin-block: 24px 20px; color: var(--vtochku-text); font-size: clamp(40px, 4.2vw, 64px); font-weight: 750; letter-spacing: -.06em; line-height: 1.08; text-wrap: balance; }
.vtochku-hero .vtochku-hero__lead { max-width: 690px; margin-block: 0; color: #676d7c; font-size: 17px; line-height: 1.75; }
.vtochku-latest { padding-block: 0; }
.vtochku-section-heading { max-width: none; margin-block: 0 28px; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; line-height: 1.2; }
.vtochku-post-grid.wp-block-post-template { display: grid; width: 100%; max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.vtochku-post-grid.wp-block-post-template > li { min-width: 0; width: auto !important; margin: 0; }
.vtochku-post-grid > li > .wp-block-template-part { height: 100%; }
.vtochku-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--vtochku-border); border-radius: 18px; background: var(--vtochku-surface); box-shadow: 0 10px 30px #312b6108; transition: border-color .2s, box-shadow .2s; }
.vtochku-card:hover, .vtochku-card:focus-within { border-color: #ccc5f7; box-shadow: 0 18px 38px #4034a51a; }
.vtochku-card .wp-block-post-featured-image { flex-shrink: 0; width: 100%; max-width: none; margin: 0; overflow: hidden; background: var(--vtochku-surface-lilac); }
.vtochku-card .wp-block-post-featured-image img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.vtochku-card .vtochku-card__body { display: flex; flex: 1; flex-direction: column; align-items: stretch; gap: 0; width: 100%; max-width: none; margin: 0; padding: 24px; }
.vtochku-card .wp-block-post-date { margin: 0; color: var(--vtochku-muted); font-size: 13px; }
.vtochku-card .wp-block-post-title { margin-block: 12px; font-size: 22px; line-height: 1.3; letter-spacing: -.03em; }
.vtochku-card .wp-block-post-title a { color: var(--vtochku-text); text-decoration: none; }
.vtochku-card .wp-block-post-title a:hover { color: var(--vtochku-accent-hover); }
.vtochku-card .wp-block-post-excerpt { display: flex; flex: 1; flex-direction: column; margin: 0; color: var(--vtochku-muted); font-size: 15px; line-height: 1.65; }
.vtochku-card .wp-block-post-excerpt__excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin: 0 0 20px; }
.vtochku-card .wp-block-post-excerpt__more-text { margin-block: auto 0; padding-top: 4px; font-size: 14px; font-weight: 700; }
.vtochku-card .wp-block-post-excerpt__more-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--vtochku-accent-hover); text-decoration: none; }
.vtochku-pagination { flex-wrap: wrap; gap: 12px; margin-block-start: 40px; }
.vtochku-pagination a, .vtochku-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-inline: 12px; border-radius: 11px; }
.vtochku-pagination a { border: 1px solid var(--vtochku-border); background: var(--vtochku-surface); color: var(--vtochku-text); text-decoration: none; }
.vtochku-pagination .wp-block-query-pagination-numbers { display: flex; flex-wrap: wrap; gap: 6px; }
.vtochku-pagination .current { background: var(--vtochku-accent); color: #fff; }

/* A broad cover and related grid, with a readable measure for the article. */
.vtochku-article-shell { padding-block: clamp(32px, 5vw, 64px) clamp(64px, 8vw, 112px); }
.vtochku-breadcrumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; margin: 0 0 28px; color: var(--vtochku-muted); font-size: 13px; }
.vtochku-breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; color: #656a79; text-decoration: none; }
.vtochku-breadcrumbs a:hover { color: var(--vtochku-accent-hover); }
.vtochku-article-head > *, .vtochku-related > * { margin-inline: 0 !important; }
.vtochku-article-head .vtochku-article-title { max-width: 1080px; margin-block: 16px 24px; font-size: clamp(34px, 4.2vw, 60px); font-weight: 750; letter-spacing: -.05em; line-height: 1.12; text-wrap: balance; }
.vtochku-article-meta { color: var(--vtochku-muted); font-size: 14px; }
.vtochku-article-head .vtochku-article-cover { width: 100%; max-width: none; margin-block: 32px 0; overflow: hidden; border: 1px solid var(--vtochku-border); border-radius: 22px; background: var(--vtochku-surface-lilac); }
.vtochku-article-cover img { display: block; width: 100%; aspect-ratio: 2.25; object-fit: cover; }
.vtochku-article-shell > .vtochku-article-body { width: min(800px, calc(100% - var(--vtochku-gutter))); max-width: none; margin: clamp(32px, 5vw, 64px) auto 0; font-size: 18px; line-height: 1.85; }
.vtochku-article-body > .wp-block-post-content { max-width: none; }
.vtochku-article-body .wp-block-post-content > * { max-width: 100%; margin-inline: 0; }
.vtochku-article-body .wp-block-post-content > :first-child { margin-top: 0; }
.vtochku-article-body .wp-block-post-content > p:first-of-type { color: #4b5062; font-size: 20px; line-height: 1.75; }
.vtochku-article-body :where(p, ul, ol, figure, blockquote, pre) { margin-block: 0 24px; }
.vtochku-article-body :where(h2, h3, h4) { color: var(--vtochku-text); text-wrap: balance; }
.vtochku-article-body h2 { margin-block: 48px 20px; font-size: clamp(26px, 2.5vw, 34px); line-height: 1.25; letter-spacing: -.04em; }
.vtochku-article-body h3 { margin-block: 32px 16px; font-size: clamp(21px, 2vw, 25px); line-height: 1.35; letter-spacing: -.025em; }
.vtochku-article-body :where(ul, ol) { padding-inline-start: 24px; }
.vtochku-article-body li { margin-block: 8px; padding-inline-start: 4px; }
.vtochku-article-body li::marker { color: var(--vtochku-accent); }
.vtochku-article-body a { color: var(--vtochku-accent-hover); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.vtochku-article-body blockquote { margin-inline: 0; padding: 24px 28px; border: 1px solid #ded9ff; border-inline-start: 3px solid var(--vtochku-accent); border-radius: 0 12px 12px 0; background: var(--vtochku-surface-lilac); }
.vtochku-article-body blockquote > :last-child { margin-bottom: 0; }
.vtochku-article-body code { padding: 2px 6px; border-radius: 6px; background: var(--vtochku-surface-lilac); font-size: .88em; overflow-wrap: anywhere; }
.vtochku-article-body pre { max-width: 100%; overflow-x: auto; padding: 20px; border: 1px solid var(--vtochku-border); border-radius: 12px; background: var(--vtochku-surface-lilac); font-size: 14px; line-height: 1.7; white-space: pre; }
.vtochku-article-body pre code { padding: 0; overflow-wrap: normal; }
.vtochku-article-body .wp-block-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--vtochku-border); border-radius: 12px; background: var(--vtochku-surface); }
.vtochku-article-body table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; line-height: 1.65; }
.vtochku-article-body :where(th, td) { min-width: 144px; padding: 14px 16px; border: 1px solid var(--vtochku-border); text-align: start; vertical-align: top; }
.vtochku-article-body th { background: var(--vtochku-surface-lilac); font-weight: 700; }
.vtochku-article-body :where(iframe, embed, object) { max-width: 100%; }
.vtochku-article-body :where(.wp-block-embed.is-type-video iframe) { height: auto; aspect-ratio: 16 / 9; }
.vtochku-article-body figcaption { margin-top: 12px; color: var(--vtochku-muted); font-size: 13px; text-align: center; }
.vtochku-article-shell > .vtochku-related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--vtochku-border); }
.vtochku-related > h2 { max-width: none; margin: 0 0 28px; font-size: 32px; letter-spacing: -.04em; }
.vtochku-related > .wp-block-query { max-width: none; }
@supports selector(:has(*)) { .vtochku-related:not(:has(.wp-block-post)) { display: none; } }
.vtochku-archive { padding-block: 64px 96px; }
.vtochku-archive__heading { margin-block: 0 40px; font-size: clamp(34px, 4.2vw, 60px); letter-spacing: -.05em; }

/* Same footer layout and legal links as LandingFooter.vue. */
.vtochku-footer { padding-block: 35px; border-top: 1px solid #e8e6f2; background: #fff; color: #656a79; }
.vtochku-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; width: min(1280px, calc(100% - var(--vtochku-gutter))); max-width: none; margin-inline: auto; }
.vtochku-footer__tagline { display: none; }
.vtochku-footer__links { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.vtochku-footer__links a { color: inherit; font-size: 13px; text-decoration: none; }
.vtochku-footer__links a:hover { color: var(--vtochku-accent-hover); }
.vtochku-footer__contact { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: #229ed9; color: #fff; }
.vtochku-footer__contact:hover { background: #1684b9; color: #fff; }
.vtochku-footer__legal { display: flex; flex-basis: 100%; flex-wrap: wrap; justify-content: center; gap: 8px 24px; width: 100%; padding-top: 16px; border-top: 1px solid #e8e6f2; }
.vtochku-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; color: #656a79; font-size: 13px; line-height: 1.5; text-align: center; text-decoration: none; }
.vtochku-footer__legal a:hover { color: var(--vtochku-accent-hover); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1240px) {
  .vtochku-nav-links, .vtochku-site-nav > .vtochku-header-cta { display: none; }
  .vtochku-mobile-menu { display: block; }
}
@media (max-width: 1000px) {
  .vtochku-footer { padding: 32px 0 max(24px, env(safe-area-inset-bottom)); }
  .vtochku-footer__inner { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
  .vtochku-footer__tagline { display: block; margin: 12px 0 24px; color: #85899a; font-size: 13px; }
  .vtochku-footer__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; width: 100%; padding: 16px 0; border-block: 1px solid var(--vtochku-border); }
  .vtochku-footer__links a { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 4px; border-radius: 8px; font-size: 14px; text-align: center; }
  .vtochku-footer__links a:hover { background: var(--vtochku-surface-lilac); }
  .vtochku-footer__contact { margin-top: 16px; }
  .vtochku-footer__legal { margin-top: 20px; }
}
@media (max-width: 900px) { .vtochku-post-grid.wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 600px) {
  :root { --vtochku-gutter: 32px; --vtochku-header-height: 64px; }
  .vtochku-site-nav { gap: 16px; }
  .vtochku-mobile-menu__panel { padding: 12px 16px 20px; }
  .vtochku-hero { padding-block: 40px 36px; }
  .vtochku-hero h1 { margin-block: 20px 16px; font-size: clamp(32px, 8vw, 44px); line-height: 1.12; letter-spacing: -.045em; }
  .vtochku-hero .vtochku-hero__lead { font-size: 16px; line-height: 1.7; }
  .vtochku-section-heading { margin-bottom: 20px; font-size: 28px; }
  .vtochku-post-grid.wp-block-post-template { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .vtochku-card .vtochku-card__body { padding: 20px; }
  .vtochku-card .wp-block-post-title { font-size: 21px; }
  .vtochku-breadcrumbs { margin-bottom: 20px; }
  .vtochku-article-head .vtochku-article-title { font-size: clamp(30px, 7.5vw, 42px); line-height: 1.17; letter-spacing: -.04em; }
  .vtochku-article-head .vtochku-article-cover { margin-top: 24px; border-radius: 16px; }
  .vtochku-article-cover img { aspect-ratio: 16 / 10; }
  .vtochku-article-shell > .vtochku-article-body { font-size: 16px; line-height: 1.8; }
  .vtochku-article-body .wp-block-post-content > p:first-of-type { font-size: 18px; line-height: 1.75; }
  .vtochku-article-body h2 { margin-top: 36px; font-size: 26px; }
  .vtochku-article-body blockquote { padding: 20px; }
  .vtochku-article-shell > .vtochku-related { margin-top: 48px; padding-top: 32px; }
  .vtochku-related > h2 { font-size: 28px; }
  .vtochku-archive { padding-block: 40px 64px; }
  .vtochku-footer__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vtochku-footer__legal { flex-direction: column; align-items: center; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
