/* Главная — секции под макет */

.page-home .hero + .section {
    padding-top: 40px;
}

.page-home .section + .section {
    padding-top: 32px;
}

.page-home .section--popular-clubs + .home-features {
    margin-top: 8px;
    padding-top: 32px;
    padding-bottom: 32px;
}

.page-home .home-features + .home-about {
    padding-top: 8px;
    padding-bottom: 56px;
}

@media (min-width: 769px) {
    .page-home .hero + .section {
        padding-top: 48px;
    }

    .page-home .section + .section {
        padding-top: 40px;
    }

    .page-home .section--popular-clubs + .home-features {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .page-home .home-features + .home-about {
        padding-bottom: 72px;
    }
}

/* Рекомендации */

.home-recommended {
    position: relative;
    padding: 8px 0 4px;
    margin: -8px 0 0;
}

.home-recommended__track {
    display: flex;
    align-items: stretch;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px 8px;
}

.home-recommended__track::-webkit-scrollbar {
    display: none;
}

.home-recommended__slide {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 0;
    display: flex;
    scroll-snap-align: start;
}

.home-recommended__slide .home-recommended-card {
    width: 100%;
}

.home-recommended-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.home-recommended-card__top {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    color: inherit;
    text-decoration: none;
}

.home-recommended-card:hover {
    transform: translateY(-3px);
    border-color: rgba(94, 72, 249, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.home-recommended-card__media {
    position: relative;
    aspect-ratio: 16 / 11;
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.04);
}

.home-recommended-card__media--placeholder::before {
    content: attr(data-initials);
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-light);
    background: linear-gradient(160deg, rgba(94, 72, 249, 0.24), rgba(15, 15, 30, 0.92));
}

.home-recommended-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.home-recommended-card__badge--free {
    background: rgba(59, 130, 246, 0.92);
}

.home-recommended-card__badge--default {
    background: rgba(94, 72, 249, 0.88);
}

.home-recommended-card__badge--open {
    background: rgba(34, 197, 94, 0.88);
}

.home-recommended-card__badge--series {
    background: rgba(236, 72, 153, 0.88);
}

.home-recommended-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    z-index: 2;
}

.home-recommended-card__title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
}

.home-recommended-card__meta {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.home-recommended-card__time {
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 6px;
}

.home-recommended-card__detail {
    margin: 0;
    font-size: 13px;
    color: var(--accent-light);
    font-weight: 600;
}

.home-recommended-card__address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
}

.home-recommended-card__address svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--accent-light);
}

.home-recommended-card__event {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 10px 10px;
    padding: 9px 10px;
    border-radius: calc(var(--radius-md) - 2px);
    background: linear-gradient(145deg, rgba(94, 72, 249, 0.18), rgba(94, 72, 249, 0.07));
    border: 1px solid rgba(94, 72, 249, 0.32);
}

.home-recommended-card__event-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.home-recommended-card__event-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-light);
    white-space: nowrap;
}

.home-recommended-card__event-time {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    white-space: nowrap;
}

.home-recommended-card__event-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    text-decoration: none;
}

.home-recommended-card__event-name:hover {
    color: var(--accent-light);
}

.home-recommended-card__event-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 2px;
}

.home-recommended-card__event-detail {
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.68);
}

.home-recommended-card__event-btn {
    flex-shrink: 0;
    min-height: 30px;
    padding: 6px 12px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .home-recommended__slide {
        flex-basis: calc((100% - 20px) / 2);
    }
}

@media (max-width: 640px) {
    .home-recommended {
        margin: -8px -16px 0;
        padding: 8px 16px 4px;
    }

    .home-recommended__slide {
        flex-basis: calc(100% - 48px);
        min-width: calc(100% - 48px);
    }
}

/* Новости */

.home-news {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-news-card {
    display: flex;
    gap: 14px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

.home-news-card__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.home-news-card--gift .home-news-card__icon {
    color: var(--accent-light);
    background: rgba(94, 72, 249, 0.15);
}

.home-news-card--promo .home-news-card__icon {
    color: #f472b6;
    background: rgba(244, 114, 182, 0.12);
}

.home-news-card__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.home-news-card__text {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.home-news-card__meta {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.home-news-card__link {
    display: inline-flex;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-light);
    text-decoration: none;
}

.home-news-card__link:hover {
    color: #fff;
}

@media (max-width: 900px) {
    .home-news {
        grid-template-columns: 1fr;
    }
}

/* Популярные клубы — компактный ряд */

.home-clubs-compact {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.home-club-compact {
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.home-club-compact:hover {
    border-color: rgba(94, 72, 249, 0.35);
}

.home-club-compact__link {
    display: flex;
    gap: 12px;
    padding: 14px;
    color: inherit;
    text-decoration: none;
}

.home-club-compact__thumb {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.06);
}

.home-club-compact__thumb--placeholder::before {
    content: attr(data-initials);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-light);
    background: rgba(94, 72, 249, 0.18);
    border-radius: inherit;
}

.home-club-compact__body {
    min-width: 0;
}

.home-club-compact__head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 4px;
}

.home-club-compact__name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-club-compact__rating {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
}

.home-club-compact__note {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
}

@media (max-width: 1100px) {
    .home-clubs-compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .home-clubs-compact {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        margin: 0 -16px;
        padding: 0 16px;
    }

    .home-clubs-compact::-webkit-scrollbar {
        display: none;
    }

    .home-club-compact {
        flex: 0 0 min(280px, 78vw);
        scroll-snap-align: start;
    }
}

/* Нижние блоки */

.home-features__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.home-feature {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 280px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

.home-feature__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 28px;
}

.home-feature__title {
    margin: 0;
    font-size: clamp(20px, 2.2vw, 24px);
    font-weight: 800;
    line-height: 1.25;
}

.home-feature__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.home-feature__list {
    margin: 0;
    padding-left: 1.1em;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.home-feature__list li + li {
    margin-top: 6px;
}

.home-feature__content .btn {
    width: fit-content;
}

.home-feature--beginner,
.home-feature--map {
    display: block;
    min-height: 280px;
}

.home-feature--beginner .home-feature__media,
.home-feature--map .home-feature__map-preview {
    position: absolute;
    inset: 0;
    min-height: 100%;
}

.home-feature--beginner .home-feature__content,
.home-feature--map .home-feature__content {
    position: relative;
    z-index: 2;
    width: min(100%, 46%);
    min-height: 280px;
}

.home-feature__media,
.home-feature__map-preview {
    position: relative;
    min-height: 180px;
    background-size: cover;
    background-position: center;
}

.home-feature__media::after,
.home-feature__map-preview::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(112deg,
        #0f0f1f,
        rgba(15, 15, 31, 0.95) 16.81%,
        rgb(15, 15, 30) 33.61%,
        rgba(15, 15, 30, 0.9) 44.12%,
        rgba(15, 15, 30, 0.48) 64%,
        rgba(15, 15, 30, 0.12) 72%,
        transparent);
    pointer-events: none;
}

.home-feature__map-preview {
    overflow: hidden;
    background: #0f1118;
}

.home-feature__map-tiles {
    position: absolute;
    inset: 0;
}

.home-feature__map-tile {
    position: absolute;
    display: block;
    object-fit: cover;
    filter: saturate(0.85) brightness(0.82);
}

.home-feature__map-pin {
    position: absolute;
    left: var(--pin-x);
    top: var(--pin-y);
    z-index: 2;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: var(--accent);
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 5px rgba(94, 72, 249, 0.22), 0 3px 10px rgba(0, 0, 0, 0.35);
}

@media (max-width: 900px) {
    .home-features__grid {
        grid-template-columns: 1fr;
    }

    .home-feature {
        grid-template-columns: 1fr;
    }

    .home-feature--beginner .home-feature__content,
    .home-feature--map .home-feature__content {
        width: 100%;
        min-height: 240px;
    }

    .home-feature--beginner .home-feature__media::after,
    .home-feature--map .home-feature__map-preview::after {
        background: linear-gradient(
            180deg,
            rgba(15, 15, 30, 0.15) 0%,
            rgba(15, 15, 30, 0.55) 45%,
            var(--bg-glass) 100%
        );
    }
}

/* О проекте и FAQ */

.home-about__inner {
    display: grid;
    gap: 40px;
}

.home-about__top {
    display: grid;
    gap: 24px;
}

.home-about__text {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.home-about__text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.home-about__features {
    padding: 24px 22px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(94, 72, 249, 0.12), rgba(255, 255, 255, 0.04));
    border: 1px solid rgba(94, 72, 249, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.home-about__features-title {
    margin: 0 0 16px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
}

.home-about__list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-about__list li {
    position: relative;
    padding-left: 28px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
}

.home-about__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(94, 72, 249, 0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B6AFF' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.home-about__faq-wrap {
    padding-top: 8px;
}

.home-about__faq-wrap .section__title {
    margin-bottom: 16px;
}

.home-faq {
    display: grid;
    gap: 10px;
}

.home-faq__item {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.home-faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.home-faq__question svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.home-faq__item--open .home-faq__question svg {
    transform: rotate(45deg);
}

.home-faq__answer {
    display: none;
    padding: 0 20px 18px;
}

.home-faq__item--open .home-faq__answer {
    display: block;
}

.home-faq__answer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.home-faq__answer a {
    color: var(--accent-light);
}

@media (min-width: 901px) {
    .home-about__top {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        gap: 32px;
        align-items: start;
    }

    .home-about__features {
        position: sticky;
        top: calc(var(--header-height) + 24px);
    }
}
