/*
* file home.css
*/

/* Блок баннера */
.banner__hero {
    color: #fff;
}
.hero {
    position: relative;
    min-height: 600px;
    display: grid;
    place-items: center;
    padding: 30px 0;
}

/* Фоновое изображение */
.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero__background-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    transform: scale(1.57);
    transform-origin: left center;
}

/* Контент баннера */
.banner__slogan_text {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 2.5s steps(40, end) 2s forwards;
    width: 0;
    font-size: 42px;
    font-weight: 700;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

.hero__content {
    max-width: 1200px;
    width: 100%;
    padding: 0 20px;
    z-index: 1;
}

/* Заголовок */
.hero__header {
    text-align: center;
    margin-bottom: 24px;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero__subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Поиск */
.hero__search {
    margin-bottom: 80px;
    width: 100%;
}

.search {
    max-width: 800px;
    margin: 0 auto;
}

.search__form {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
}

body .search__input {
    flex: 1;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 1rem;
    color: #333;
    outline: none;
    height: 52px;
    outline: 2px solid var(--btncolor);
}

body .search__input:focus {
    outline: 2px solid var(--btncolor);
}

.search__button {
    cursor: pointer;
    transition: background-color 0.2s;
    height: 52px;
    min-width: 166px;
}

.search__button:hover {
    background: #c62828;
}

/* Статистика */
.hero__stats {
    width: 100%;
}

.stats {
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.stats__item {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.stats__icon {
    flex-shrink: 0;
}

.stats__icon svg {
    width: 48px;
    height: 48px;
}

.stats__info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stats__number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin: 5px 0;
    color: #fff;
    white-space: nowrap;
}

.stats__label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
    color: #fff;
}

/* Адаптивность */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2rem;
    }
    
    .stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px 20px;
    }
    
    .stats__item {
        flex: 0 0 calc(50% - 20px);
        justify-content: center;
    }
    
    .stats__info {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
    }
    
    .hero__title {
        font-size: 1.75rem;
    }
    
    .search__form {
        flex-direction: column;
    }
    
    .search__button {
        width: 100%;
    }
    
    .stats__item {
        flex: 0 0 100%;
        justify-content: flex-start;
    }
    
    .stats__icon svg {
        width: 32px;
        height: 32px;
    }
}
/* Секция популярного */
.popular__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок */
.heading h2.popular__title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: center;

}

/* Табы */
.popular__tabs {
    margin-bottom: 40px;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.tabs__button {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 1.125rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
    min-width: 130px;
}

.tabs__button::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: #e0e0e0;
    transition: background-color 0.3s;
}

.tabs__button--active {
    color: #007bff;
}

.tabs__button--active::after {
    background-color: #007bff;
}

.tabs__button:hover {
    color: #007bff;
}

/* Категории */
.popular__categories {
    margin-bottom: 60px;
}

.categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Карточка категории */
.category {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.category__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e8e8;
}

.category__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.category__count {
    font-size: 14px;
    font-weight: 600;
    color: #007bff;
}

/* Список элементов категории */
.category__list {
    list-style: none;
    padding: 0;
}

.category__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.category__link {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    padding: 4px 12px 4px 0;
    transition: color 0.3s;
    flex-grow: 1;
}

.category__link:hover {
    color: #007bff;
}

.category__item-count {
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    padding-left: 12px;
    white-space: nowrap;
}

/* Кнопка "Другие направления" */
.popular__more {
    text-align: center;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .popular__title {
        font-size: 2rem;
    }
    
    .categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .popular {
        padding: 40px 0;
    }
    
    .popular__title {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }
    
    .tabs {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .tabs__button {
        width: 200px;
    }
    
    .categories {
        grid-template-columns: 1fr;
    }
    
    .more-button {
        width: 100%;
        max-width: 300px;
    }
}

/*
*********************************** banner START
*/
.home .banner__users {
    overflow: inherit;
}

.home .banner_img {
    position: absolute;
    line-height: 0;
    left: 150px;
    bottom: 0;
}

.home .banner_img img {
    width: auto;
    height: 420px;
}

.banner__users_content {
    margin-left: 25%;
}
/*
*********************************** banner END
*/

/*
*********************************** hero START
*/
.home__accent {
    height: 522px;
    background: url(../img/home/glare_circles_spots.png) no-repeat center top;
    background-size: cover;
}

.home__accent_block {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
}

.home__accent_content h3 {
    margin: 0;
    font-size: 62px;
    font-weight: 700;
}

.home__accent_content p {
    font-size: 32px;
    font-weight: 700;
}

.home__accent_img {
    margin-top: -58px;
}
/*
*********************************** HOME END
*/