:root {
  --accent: #6c4dff;
  --accent-dark: #5238cc;
  --ink: #14121f;
  --font-heading: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  color: #2b2b38;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand {
  font-family: var(--font-heading);
}

/* Navbar */
.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
}

.nav-link {
  font-weight: 500;
  color: #4a4a58 !important;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-via) 45%, var(--accent) 100%);
  color: #fff;
  padding: 6rem 0 5rem;
}

.hero .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
}

.hero h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero .lead {
  color: rgba(255, 255, 255, .82);
  max-width: 640px;
}

.hero .btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.hero .btn-primary:hover {
  background: #f1eeff;
  border-color: #f1eeff;
  color: var(--ink);
}

.hero .btn-outline-light {
  border-width: 1.5px;
}

/* Personal hero — author photo with a soft organic "blob" behind it (inspired by
   webtemplates/personal/proman-1.0.0's splash-behind-photo hero), plus an articles-count
   stat pulled from the same `articles` list article_list.html/sidebar.html already use —
   no new data pipeline needed. Shorter than the corporate/news hero by design (smaller
   photo + tighter padding, see .hero-personal below) — user feedback 2026-08-25. */
.hero-personal {
  padding: 3.5rem 0 2.5rem;
}

.hero-personal-photo-wrap {
  position: relative;
  display: inline-block;
}

.hero-personal-blob {
  position: absolute;
  inset: -14%;
  z-index: 0;
  background: rgba(255, 255, 255, .16);
  border-radius: 42% 58% 65% 35% / 45% 45% 55% 55%;
}

.hero-personal-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, .9);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .25);
}

/* Personal — pages WITHOUT a real sidebar (home/about/agreement/author list) go
   full-width instead of leaving an empty 4-col gap where .col-lg-8's sibling <aside>
   used to sit (see .personal-full-width usages: about_sections.html/agreement.html/
   article_list.html's personal branch). Article pages are NOT in this list — they keep
   the normal col-lg-8+col-lg-4 split with a real Recent Posts sidebar (see
   sidebar.html), per user feedback 2026-08-25. The announcement feed on full-width
   pages becomes a magazine-style grid: 1 big featured post (most recent) + compact
   posts filling the other 2 columns, 2 per column — pure CSS Grid auto-placement
   (post-magazine-featured spans 2 row tracks, no JS/masonry lib needed). */
.personal-full-width {
  flex: 0 0 100%;
  max-width: 100%;
}

.post-magazine-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .post-magazine-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .post-magazine-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .post-magazine-featured {
    grid-row: span 2;
  }
}

.post-magazine-card {
  display: flex;
  flex-direction: column;
}

.post-magazine-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 270 / 170;
  object-fit: cover;
}

.post-magazine-featured .post-magazine-thumb {
  aspect-ratio: 2.4 / 1;
}

.post-magazine-excerpt {
  font-size: 1rem;
  line-height: 1.55;
  color: #4a4a58;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Personal article page — right-hand Recent Posts sidebar, stacked cards (thumb over
   category+date+title), see sidebar.html's `article is defined` branch. */
.sidebar-post-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 270 / 170;
  object-fit: cover;
}

/* Buttons */
.btn {
  border-radius: 999px;
  font-weight: 600;
  padding: .65rem 1.6rem;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), .25);
}

a {
  color: var(--accent);
}

/* Article cards */
.post-card {
  border: 1px solid var(--soft-border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: box-shadow .2s ease, transform .2s ease;
  background: #fff;
}

.post-card:hover {
  box-shadow: 0 12px 30px rgba(20, 18, 31, .08);
  transform: translateY(-2px);
}

.post-card h2 a {
  color: var(--ink);
  text-decoration: none;
}

.post-card h2 a:hover {
  color: var(--accent);
}

.post-thumb {
  width: 270px;
  height: 170px;
  max-width: 100%;
  object-fit: cover;
}

/* News — top-story carousel (no CTA button), gated on template_type == news. Slides are
   stacked absolutely so swapping the active one never reflows the section's height. */
.news-carousel {
  position: relative;
  min-height: 480px;
  overflow: hidden;
}

.news-carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease;
}

.news-carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.news-carousel-scrim {
  height: 100%;
  display: flex;
  align-items: center;
  background: linear-gradient(to top, rgba(10, 8, 20, .82) 0%, rgba(10, 8, 20, .3) 60%, rgba(10, 8, 20, .5) 100%);
}

/* Anons pulled from the article's opening paragraph (longer than the meta description) —
   the bigger footprint comes from more text, not from an inflated font size. */
.news-carousel-excerpt {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-carousel-arrow:hover {
  background: rgba(255, 255, 255, .32);
}

.news-carousel-prev {
  left: 1rem;
}

.news-carousel-next {
  right: 1rem;
}

.news-carousel-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 4px;
}

/* Видимая точка — 9px, но область нажатия увеличена до 24x24 (Lighthouse "Touch
   targets are not sized appropriately"), см. лог сессии 2026-08-25. */
.news-carousel-dot {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  padding: 0;
}

.news-carousel-dot::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
}

.news-carousel-dot.active::after {
  background: #fff;
}

.news-card-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 4px;
  margin-bottom: .75rem;
}

/* News — "more stories" list below the carousel: thumb spans the full width of the
   text column below it (stacked, not side-by-side), category pill. */
.news-row-thumb {
  display: block;
  width: 900px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 2.4 / 1;
  object-fit: cover;
}

.news-row-category {
  display: inline-block;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .7rem;
  font-weight: 600;
}

.news-row h2 a:hover {
  color: var(--accent);
}

/* Anons pulled from the opening paragraph of every section of the article's body
   (up to 6) — the bigger footprint comes from more text, not font size. No clamp:
   a line-clamp here was silently cutting the already-built text short. */
.news-row-excerpt {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #4a4a58;
}

/* News list, everything after the featured first item: compact square thumb + short
   clamped excerpt (the layout the whole list used before the featured item was split out). */
.news-row-thumb-compact {
  object-fit: cover;
}

.news-row-excerpt-compact {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #4a4a58;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar */
/* Recent Posts thumb — fixed height only, width follows the source's own aspect ratio
   (thumbnail_url crops are landscape 270x170) instead of being forced into a square,
   which used to stretch/squish the image. */
.sidebar-recent-thumb {
  width: auto;
  height: 88px;
  aspect-ratio: 1.6 / 1;
  object-fit: cover;
}

.sidebar-widget h6 {
  position: relative;
  padding-bottom: .6rem;
  letter-spacing: .06em;
}

.sidebar-widget h6::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

.ad-slot {
  background: var(--soft-bg);
  border: 1px solid var(--soft-border);
  border-radius: 12px;
  padding: 1rem;
}

.tag-pill {
  background: var(--soft-bg) !important;
  color: var(--ink) !important;
  border: none !important;
  font-weight: 500;
  padding: .4rem .85rem;
}

.tag-pill:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

/* Breadcrumbs */
.site-breadcrumb {
  --bs-breadcrumb-item-padding-x: 0.75rem;
  --bs-breadcrumb-divider-color: var(--soft-border);
}

/* Footer */
footer {
  background: var(--footer-bg);
}

footer a {
  color: var(--footer-link);
}

footer a:hover {
  color: #fff;
}

/* Personal footer — multi-column link area (Recent Posts/Categories/Tags) above the
   usual copyright bar, inspired by webtemplates/news/ZenBlog-1.0.0's footer layout —
   default Bootstrap border-bottom is barely visible on our dark footer_bg. */
.footer-personal-cols {
  border-bottom-color: rgba(255, 255, 255, .12) !important;
}

/* Иконки соцсетей — глифы, не текст в блоке, аудит "links rely on color" на них не
   распространяется; текстовые ссылки (User Agreement) подчёркивание НЕ теряют — иначе
   отличаются от соседнего текста копирайта только цветом (см. Lighthouse Accessibility). */
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  font-size: 1rem;
  text-decoration: none;
}

.social-links a:hover {
  background: var(--accent);
  color: #fff;
}

/* Bootstrap .text-secondary (#6c757d) откалиброван под светлый фон — на тёмном футере
   проваливает WCAG AA (нужно ≥4.5:1, см. Lighthouse Accessibility contrast); на .ad-slot
   тоже впритык проваливается. Точечные переопределения вместо правки самого
   Bootstrap-класса (он используется и на светлых фонах, где ОК). footer_muted/soft_text
   уже подобраны генератором палитры под контраст именно с footer_bg/soft_bg. */
footer .text-secondary {
  color: var(--footer-muted) !important;
}

.ad-slot p {
  color: var(--soft-text) !important;
}
