/* ============================================================
   Главная страница каталога — финальная версия (с бейджами и центрированием)
   ============================================================ */

/* --------------------------------------------------------
   Переменные для главной страницы (изолированы)
-------------------------------------------------------- */
.home-content {
  --primary-gradient: linear-gradient(135deg, #0ABAB5, #1E6FD9);
  --color-link-hover: #00A9D6;
  --radius-btn: 12px;
  --radius-lg: 16px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-card: 0 4px 20px rgba(10, 186, 181, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(10, 186, 181, 0.15);
  --color-primary-start: #0ABAB5;
  --color-text-primary: #2D2D3A;
  --color-text-muted: #6B7280;
  --color-border: #E5E7EB;
  --font-primary: 'Inter', sans-serif;
  --header-height: 82px;

  width: 100%;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
  color: var(--color-text-primary);
}

/* Сброс ограничений родительской темы */
body.page-template-home-catalog #primary,
body.page-template-home-catalog .content-area,
body.page-template-home-catalog .site-main,
body.page-template-home-catalog main {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
}

body.page-template-home-catalog .home-content {
    margin-top: 0 !important;
}

.home-content section {
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.home-container {
    /* max-width удалён, наследуется от глобального #content */
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Кнопки */
.home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-btn);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}
.home-btn--primary {
    background: var(--primary-gradient);
    color: white;
}
.home-btn--primary:hover {
    background: var(--color-link-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn);
}
.home-btn--outline {
    background: transparent;
    border: 2px solid var(--color-primary-start);
    color: var(--color-primary-start);
    background: white;
}
.home-btn--outline:hover {
    background: var(--primary-gradient);
    color: white;
}
.home-btn--lg { padding: 16px 32px; font-size: 18px; }

/* Заголовки секций */
.home-section-header { text-align: center; margin-bottom: 48px; }
.home-section-title { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.home-section-subtitle { font-size: 18px; color: var(--color-text-muted); }
.home-section-link {
    display: inline-block;
    margin-top: 8px;
    color: var(--color-primary-start);
    font-weight: 600;
    text-decoration: none;
}

/* --------------------------------------------------------
   HERO – полный экран с центрированием
-------------------------------------------------------- */
.home-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 0 !important;
    padding-top: 0 !important;
    background-color: #F8F9FE;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.home-hero--fullscreen {
    min-height: calc(100vh - var(--header-height, 82px));
    height: auto;
}
@supports (height: 100dvh) {
    .home-hero--fullscreen {
        min-height: calc(100dvh - var(--header-height, 82px));
    }
}
/* Для мобильных */
@media (max-width: 768px) {
    .home-content {
        --header-height: 64px;
    }
}

.home-hero--bg { background-image: url('/wp-content/themes/reboot-child/assets/images/hero-bg-mobile.webp'); }
@media (min-width: 768px) { .home-hero--bg { background-image: url('/wp-content/themes/reboot-child/assets/images/hero-bg-tablet.webp'); } }
@media (min-width: 1024px) { .home-hero--bg { background-image: url('/wp-content/themes/reboot-child/assets/images/hero-bg-desktop.webp'); } }

.home-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.home-hero__blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.3; }
.home-hero__blob--1 { width: 400px; height: 400px; background: var(--color-primary-start); top: -100px; right: -50px; }
.home-hero__blob--2 { width: 300px; height: 300px; background: #00B4D8; bottom: -50px; left: -100px; }
.home-hero__blob--3 { width: 250px; height: 250px; background: #FF6B6B; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.home-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
    box-sizing: border-box;
    text-align: center;
}
.home-hero__title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.home-hero__subtitle { font-size: 18px; color: var(--color-text-muted); margin-bottom: 32px; }

/* Поиск */
.home-hero__search {
    display: flex;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.home-hero__search i {
    display: flex;
    align-items: center;
    padding-left: 20px;
    color: #6B7280;
    font-size: 20px;
}
.home-hero__search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 16px;
    font-size: 16px;
    background: transparent;
    color: var(--color-text-primary);
    height: 44px;
    line-height: 44px;
    margin-right: 8px;
}
.home-hero__search input::placeholder { color: #9CA3AF; }
/* Живой поиск – кнопка скрыта */
.home-hero__search .home-btn {
    display: none;
}
.home-hero__search input {
    border-radius: 28px;
    margin-right: 0;
}

/* Бейджи категорий (на всю ширину контейнера) */
.home-hero__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto 32px;
}
.home-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(10, 186, 181, 0.3);
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.home-badge:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Основные кнопки героя */
.home-hero__buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}
.home-hero__buttons .home-btn--primary {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    border: none !important;
}
.home-hero__buttons .home-btn--primary:hover { background: var(--color-link-hover) !important; }

/* --------------------------------------------------------
   STATS (статистика) – внутри hero, но ограничена
-------------------------------------------------------- */
.home-stats {
    width: 100%;
    margin-top: 40px;
    background: transparent;
}
.home-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 100%;
}
.home-stats__card {
    background: linear-gradient(135deg, #F0FDFA 0%, #FFFFFF 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.home-stats__card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.home-stats__icon { flex-shrink: 0; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.home-stats__icon img { width: 48px; height: 48px; object-fit: contain; }
.home-stats__content { display: flex; flex-direction: column; justify-content: center; }
.home-stats__number { font-size: 42px; font-weight: 700; color: var(--color-text-primary); line-height: 1.2; }
.home-stats__label { font-size: 12px; color: var(--color-text-muted); }

/* --------------------------------------------------------
   КАТАЛОГ (нейросети)
-------------------------------------------------------- */
.home-catalog { padding: 80px 0; background: #fff; }
.home-catalog__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 40px; }
.home-catalog__more { text-align: center; }

/* Рейтинг в карточках */
.ai-card__rating-big {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 14px;
    color: #F59E0B;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ai-card__rating-big svg { width: 14px; height: 14px; }

.home-content .ai-card__thumbnail {
    height: 200px;
    overflow: hidden;
}
.home-content .ai-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------
   ПРОМТЫ
-------------------------------------------------------- */
.home-prompts { padding: 80px 0; background: linear-gradient(135deg, #F0FDFA 0%, #FDF2F8 100%); }
.home-prompts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 40px; }
.home-prompts__more { text-align: center; }

.prompt-card__rating-big {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 14px;
    color: #F59E0B;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.prompt-card__rating-big svg { width: 14px; height: 14px; }

/* Цвет ссылок на тёмном фоне */
.ai-card__category-badge,
.prompt-card__neural-badge,
.ai-card__category-badge:visited,
.prompt-card__neural-badge:visited,
.ai-card__category-badge:hover,
.prompt-card__neural-badge:hover,
.ai-card__category-badge:active,
.prompt-card__neural-badge:active {
    color: #fff !important;
}

/* --------------------------------------------------------
   СТАТЬИ
-------------------------------------------------------- */
.home-articles { padding: 80px 0; background: #fff; }
.home-articles__grid--3cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
/* Карточка статьи (унифицированная) */
.article-card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}
.article-card__thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.article-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-card:hover .article-card__img { transform: scale(1.05); }
.article-card__category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    text-decoration: none;
    z-index: 2;
}
.article-card__category-badge:hover,
.article-card__category-badge:visited { color: #fff !important; }
.article-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.article-card__title { font-size: 18px; font-weight: 600; margin: 0 0 8px; line-height: 1.3; }
.article-card__title a { color: var(--color-text-primary); text-decoration: none; }
.article-card__title a:hover { color: var(--color-link); }
.article-card__excerpt {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.article-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}
.article-card__views,
.article-card__date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* --------------------------------------------------------
   ДОПОЛНИТЕЛЬНЫЕ СЕКЦИИ (рейтинг слайдер, about, faq – на случай использования)
-------------------------------------------------------- */
.home-rating { padding: 80px 0; background: #F8F9FE; }
.home-rating__slider { position: relative; }
.home-rating__track {
    display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; padding: 20px 0; -ms-overflow-style: none; scrollbar-width: none;
}
.home-rating__track::-webkit-scrollbar { display: none; }
.home-rating-card {
    position: relative; min-width: 280px; background: white;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    overflow: hidden; transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.home-rating-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.home-rating-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px; color: white; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.home-rating-badge--gold { background: #FFD700; }
.home-rating-badge--silver { background: #C0C0C0; }
.home-rating-badge--bronze { background: #CD7F32; }
.home-rating-card__image { width: 100%; height: 160px; object-fit: cover; }
.home-rating-card__placeholder { width: 100%; height: 160px; background: #E5E7EB; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #6B7280; }
.home-rating-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.home-rating-card__row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.home-rating-card__category { background: #F0F0F5; padding: 4px 10px; border-radius: 12px; font-size: 12px; color: #6B7280; font-weight: 500; }
.home-rating-card__rating { font-weight: 700; color: #F59E0B; background: rgba(245, 158, 11, 0.1); padding: 2px 8px; border-radius: 12px; font-size: 14px; display: flex; align-items: center; gap: 4px; }
.home-rating-card__name { font-size: 18px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.home-rating-card__desc { font-size: 14px; color: #6B7280; margin-bottom: 12px; flex-grow: 1; }
.home-rating-card__link { display: block; text-align: center; background: var(--primary-gradient); color: white; font-weight: 600; padding: 8px; border-radius: var(--radius-sm); text-decoration: none; transition: background 0.2s; }
.home-rating-card__link:hover { background: var(--color-link-hover); }
.home-rating-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: white; border: 1px solid var(--color-border); border-radius: 50%;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    font-size: 24px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.08); z-index: 5; transition: box-shadow 0.2s;
}
.home-rating-arrow:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.12); }
.home-rating-arrow--left { left: -22px; }
.home-rating-arrow--right { right: -22px; }

.home-about { padding: 80px 0; background: #F8F9FE; }
.home-about__inner { display: flex; gap: 60px; align-items: center; margin-bottom: 60px; }
.home-about__text { flex: 1; }
.home-about__title { font-size: 36px; font-weight: 700; margin-bottom: 20px; }
.home-about__desc { font-size: 16px; color: var(--color-text-muted); margin-bottom: 20px; }
.home-about__features { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.home-about__features li { font-weight: 500; }
.home-about__image { flex: 1; display: flex; justify-content: center; }
.home-about__image img { max-width: 100%; height: auto; }

.home-faq { max-width: 800px; margin: 0 auto; }
.home-faq__title { font-size: 24px; font-weight: 700; margin-bottom: 24px; text-align: center; }
.home-faq__item { background: white; border-radius: var(--radius-md); margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.home-faq__item summary {
    padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center;
}
.home-faq__item summary::after { content: "+"; font-size: 24px; transition: transform 0.3s; }
.home-faq__item[open] summary::after { content: "−"; transform: rotate(180deg); }
.home-faq__item p { padding: 0 20px 16px; color: var(--color-text-muted); font-size: 15px; }

/* Анимация появления */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Заголовок секции со ссылкой справа */
.home-section-header--with-link {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.home-section-header--with-link .home-section-header__left { flex: 1; }
.home-section-header--with-link .home-section-link {
    margin-left: 20px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--color-primary-start);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: 0.2s;
}
.home-section-header--with-link .home-section-link:hover {
    border-bottom-color: var(--color-primary-start);
}
@media (max-width: 640px) {
    .home-section-header--with-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .home-section-header--with-link .home-section-link {
        margin-left: 0;
    }
}

.home-seo-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    color:#999;
} 
    

/* Сообщение "не найдено" */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: var(--radius-lg);
    color: var(--color-text-muted);
    font-size: 16px;
}

/* --------------------------------------------------------
   АДАПТИВ
-------------------------------------------------------- */
@media (max-width: 1024px) {
    .home-stats__grid { grid-template-columns: repeat(2, 1fr); }
    .home-prompts__grid { grid-template-columns: repeat(2, 1fr); }
    .home-catalog__grid { grid-template-columns: repeat(2, 1fr); }
    .home-articles__grid--3cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .home-hero__title { font-size: 28px; }
    .home-hero__search {
        flex-direction: column;
        background: none;
        box-shadow: none;
        border: none;
        backdrop-filter: none;
        gap: 10px;
    }
    .home-hero__search i { display: none; }
    .home-hero__search input {
        background: rgba(255,255,255,0.9);
        border-radius: 28px;
        padding: 16px 24px;
        border: 1px solid rgba(255,255,255,0.2);
        height: auto;
        margin-right: 0;
    }
    .home-hero__badges {
        max-width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    .home-badge { white-space: nowrap; }
    .home-stats__grid { grid-template-columns: 1fr; }
    .home-catalog__grid,
    .home-prompts__grid,
    .home-articles__grid--3cols { grid-template-columns: 1fr; }
    .home-hero__buttons { flex-direction: column; align-items: center; }
    .home-btn--lg { width: 100%; max-width: 280px; }
    .home-articles__grid--3cols { gap: 20px; }
}
@media (max-width: 480px) {
    .home-hero__title { font-size: 32px; }
}