
/* =========================================
   ВНЕ КАНОНА — главная страница
   Blocksy Child
   ========================================= */

.vk-home {
  --vk-bg: #f7f7fb;
  --vk-card: #ffffff;
  --vk-ink: #191925;
  --vk-muted: #77778b;
  --vk-line: #e8e7f0;
  --vk-accent: #7657e8;
  --vk-accent-light: #eee9ff;
  --vk-dark: #171622;

  width: calc(100% - 40px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 0 54px;
  color: var(--vk-ink);
  font-size: 15px;
  line-height: 1.6;
  box-sizing: border-box;
}

.vk-home,
.vk-home *,
.vk-home *::before,
.vk-home *::after {
  box-sizing: border-box;
}

.vk-home img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  object-fit: cover;
}

.vk-home a {
  text-decoration: none;
}

.vk-home h1,
.vk-home h2,
.vk-home h3,
.vk-home p {
  margin-top: 0;
}

.vk-home h1,
.vk-home h2,
.vk-home h3 {
  color: inherit;
}

.vk-home p:last-child {
  margin-bottom: 0;
}

/* Заголовок страницы Blocksy */

body.home .hero-section {
  width: calc(100% - 40px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 0 14px;
  box-sizing: border-box;
}

body.home .hero-section .page-title {
  margin: 0;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.035em;
}

/* Главный баннер */

.vk-home .vk-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  background: var(--vk-dark);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(27, 21, 54, 0.09);
}

.vk-home .vk-feature__image {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 300px;
  overflow: hidden;
}

.vk-home .vk-feature__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.vk-home .vk-feature__image:hover img {
  transform: scale(1.03);
}

.vk-home .vk-feature__content {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 30px;
  background:
    radial-gradient(
      ellipse at 100% 0%,
      rgba(118, 87, 232, 0.2),
      transparent 55%
    ),
    var(--vk-dark);
}

.vk-home .vk-feature__content > p {
  width: 100%;
}

.vk-home .vk-feature__content > .vk-eyebrow,
.vk-home .vk-feature__content > .vk-feature__description {
  width: auto;
}

.vk-home .vk-eyebrow,
.vk-home .vk-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--vk-accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.vk-home .vk-eyebrow {
  margin-bottom: 14px;
  color: #c4b7ff;
}

.vk-home .vk-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  align-self: center;
  margin-top: 0;
  background: #a18aff;
  border-radius: 50%;
  transform: none;
  vertical-align: middle;
}

.vk-home .vk-feature h1 {
  max-width: 440px;
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(28px, 3.2vw, 43px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.vk-home .vk-feature__description {
  max-width: 390px;
  margin: 0 0 18px;
  color: #c2c0d0;
  font-size: 13px;
  line-height: 1.7;
}

.vk-home .vk-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 46px;
  max-width: 100%;
  padding: 0 22px;
  gap: 8px;
  margin: 20px auto 14px;
  color: #ffffff;
  background: var(--vk-accent);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(10, 8, 22, 0.28);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.vk-home .vk-button > br {
  display: none;
}

.vk-home .vk-button > span[aria-hidden="true"] {
  display: none;
}

.vk-home .vk-button::after {
  content: "→";
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-variant-emoji: text;
  font-weight: 400;
  line-height: 1;
  transform: translateY(-1px);
}

.vk-home .vk-button:hover {
  color: #ffffff;
  background: #6444d5;
  border-color: #a18aff;
  box-shadow: 0 10px 22px rgba(10, 8, 22, 0.36);
}

.vk-home .vk-button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.vk-home .vk-button:active {
  transform: translateY(1px);
}

.vk-home .vk-feature__number {
  position: absolute;
  right: 12px;
  bottom: -25px;
  color: rgba(255, 255, 255, 0.04);
  font-size: 130px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

/* Секции */

.vk-home .vk-section {
  min-width: 0;
  margin-top: 44px;
}

.vk-home .vk-section__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.vk-home .vk-section__heading .vk-kicker {
  margin-bottom: 6px;
}

.vk-home .vk-section__heading h2,
.vk-home .vk-topics__intro h2 {
  margin: 0;
  font-size: clamp(25px, 2.7vw, 34px);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.vk-home .vk-text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding-bottom: 4px;
  color: var(--vk-accent);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* Карточки материалов */

.vk-home .vk-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

/* Учитываем возможные обёртки WordPress */

.vk-home .vk-post-grid > p {
  display: contents;
}

.vk-home .vk-post-grid > .vk-post,
.vk-home .vk-post-grid > p > .vk-post {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  align-self: stretch;
  margin: 0;
  overflow: hidden;
  background: var(--vk-card);
  border: 1px solid var(--vk-line);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(25, 25, 37, 0.025);
}

.vk-home .vk-post--large {
  grid-column: auto;
}

.vk-home .vk-post__image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  overflow: hidden;
  background: #e7e3f1;
}

.vk-home .vk-post__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.vk-home .vk-post:hover .vk-post__image img {
  transform: scale(1.035);
}

.vk-home .vk-post__image-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 7px;
  color: #ffffff;
  background: rgba(24, 22, 37, 0.85);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
}

.vk-home .vk-post__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 15px;
}

.vk-home .vk-post__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--vk-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.vk-home .vk-post__meta span:first-child {
  color: var(--vk-accent);
}

.vk-home .vk-post h3 {
  width: 100%;
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

.vk-home .vk-post h3 a {
  color: var(--vk-ink);
}

.vk-home .vk-post h3 a:hover {
  color: var(--vk-accent);
}

.vk-home .vk-post__body > p {
  margin: 0;
  color: var(--vk-muted);
  font-size: 12px;
  line-height: 1.65;
}

/* Рубрики */

.vk-home .vk-topics {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 44px;
  min-width: 0;
  margin-top: 52px;
  padding: 30px 0;
  border-top: 1px solid var(--vk-line);
  border-bottom: 1px solid var(--vk-line);
}

.vk-home .vk-topics__intro {
  min-width: 0;
}

.vk-home .vk-topics__intro .vk-kicker {
  margin-bottom: 10px;
}

.vk-home .vk-topics__intro h2 {
  max-width: 340px;
  margin-bottom: 12px;
}

.vk-home .vk-topics__intro > p:last-child {
  max-width: 340px;
  margin: 0;
  color: var(--vk-muted);
  font-size: 13px;
  line-height: 1.7;
}

.vk-home .vk-topic-list {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--vk-line);
}

/* Ссылки рубрик: поддержка структуры с p и без него */

.vk-home .vk-topic-list > p {
  width: 100%;
  margin: 0;
  padding: 0;
}

.vk-home .vk-topic-list > a,
.vk-home .vk-topic-list > p > a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 16px 3px;
  color: var(--vk-ink);
  border-bottom: 1px solid var(--vk-line);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
}

.vk-home .vk-topic-list__index {
  color: #aaa5bd;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vk-home .vk-topic-list__name {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  color: var(--vk-ink);
  word-break: normal;
  overflow-wrap: break-word;
  writing-mode: horizontal-tb;
}

.vk-home .vk-topic-list__arrow {
  justify-self: end;
  color: var(--vk-accent);
  font-size: 17px;
  text-align: right;
}

.vk-home .vk-topic-list a:hover .vk-topic-list__name {
  color: var(--vk-accent);
}

/* Нижний блок */

.vk-home .vk-manifesto {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  margin-top: 38px;
  padding: 30px 22px;
  text-align: center;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(118, 87, 232, 0.12),
      transparent 65%
    ),
    #f0edf9;
  border: 1px solid #e6e0f7;
  border-radius: 12px;
}

.vk-home .vk-manifesto__mark {
  display: none;
}

.vk-home .vk-manifesto .vk-kicker {
  margin-bottom: 9px;
}

.vk-home .vk-manifesto h2 {
  max-width: 600px;
  margin: 0 0 9px;
  font-size: clamp(23px, 2.5vw, 30px);
  font-weight: 800;
  line-height: 1.25;
}

.vk-home .vk-manifesto__caption {
  max-width: 570px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

/* Планшеты */

@media (max-width: 800px) {
  .vk-home .vk-feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .vk-home .vk-feature__image {
    min-height: 260px;
  }

  .vk-home .vk-feature__content {
    padding: 22px;
  }

  .vk-home .vk-feature h1 {
    font-size: clamp(26px, 3.5vw, 36px);
  }

  .vk-home .vk-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vk-home .vk-topics {
    gap: 24px;
  }
}

/* Телефоны */

@media (max-width: 560px) {
  .vk-home {
    width: calc(100% - 28px);
    padding: 16px 0 34px;
  }

  body.home .hero-section {
    width: calc(100% - 28px);
    padding: 18px 0 12px;
  }

  .vk-home .vk-feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .vk-home .vk-feature__image {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .vk-home .vk-feature__content {
    padding: 22px 18px;
  }

  .vk-home .vk-feature h1 {
    font-size: clamp(28px, 7vw, 36px);
  }

  .vk-home .vk-section {
    margin-top: 34px;
  }

  .vk-home .vk-section__heading {
    align-items: flex-start;
    gap: 12px;
  }

  .vk-home .vk-section__heading h2,
  .vk-home .vk-topics__intro h2 {
    font-size: 25px;
  }

  .vk-home .vk-post-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .vk-home .vk-post__body {
    padding: 15px;
  }

  .vk-home .vk-topics {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    margin-top: 38px;
    padding: 24px 0;
  }

  .vk-home .vk-topics__intro h2,
  .vk-home .vk-topics__intro > p:last-child {
    max-width: 100%;
  }

  .vk-home .vk-topic-list > a,
  .vk-home .vk-topic-list > p > a {
    grid-template-columns: 30px minmax(0, 1fr) 22px;
  }

  .vk-home .vk-manifesto {
    margin-top: 28px;
    padding: 24px 16px;
  }
}

/* Узкие телефоны */

@media (max-width: 360px) {
  .vk-home {
    width: calc(100% - 20px);
  }

  body.home .hero-section {
    width: calc(100% - 20px);
  }

  .vk-home .vk-section__heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .vk-home .vk-feature__content {
    padding: 20px 16px;
  }
}

/* Уменьшение анимации по настройкам устройства */

@media (prefers-reduced-motion: reduce) {
  .vk-home *,
  .vk-home *::before,
  .vk-home *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
  }
}


/* Финальное исправление сетки главного баннера */

.vk-home section.vk-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-rows: minmax(350px, auto);
  align-items: stretch;
  position: relative;
  min-width: 0;
  min-height: 350px;
  overflow: hidden;
}

.vk-home section.vk-feature > a.vk-feature__image {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 350px;
  overflow: hidden;
}

.vk-home section.vk-feature > a.vk-feature__image img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vk-home section.vk-feature > .vk-feature__content {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  min-height: 350px;
  padding: 30px;
  overflow: hidden;
}

@media (max-width: 767px) {
  .vk-home section.vk-feature {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
  }

  .vk-home section.vk-feature > a.vk-feature__image {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 8;
  }

  .vk-home section.vk-feature > .vk-feature__content {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    padding: 24px;
  }
}
