/* ============================================================
   ШАПКА САЙТА — sticky, всегда сверху
   ============================================================ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 32px;
    background: rgba(15, 12, 41, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Логотип */
.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.site-logo:hover { opacity: 0.8; }

.site-logo__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(79,172,254,0.25), rgba(167,139,250,0.25));
    border: 1px solid rgba(79, 172, 254, 0.4);
    color: #4facfe;
    font-size: 1.15rem;
    line-height: 1;
}

.site-logo__text {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

/* Поиск */
.site-search {
    flex: 1;
    max-width: 540px;
    margin-left: auto;
    position: relative;
}

.site-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #707080;
    pointer-events: none;
    display: flex;
    transition: color 0.2s;
}

.site-search__input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    font-size: 0.95rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e8e8f0;
    outline: none;
    transition: all 0.2s ease;
}

.site-search__input::placeholder {
    color: #707080;
}

.site-search__input:focus {
    border-color: #4facfe;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.15);
}

.site-search:focus-within .site-search__icon {
    color: #4facfe;
}

/* Кнопка */
.site-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #a0a0b0;
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.site-btn:hover {
    background: rgba(167, 139, 250, 0.15);
    border-color: #a78bfa;
    color: #fff;
}

.site-btn:active {
    transform: scale(0.97);
}

.site-btn__icon {
    font-size: 1rem;
    line-height: 1;
}

/* ============================================================
   ГЛАВНАЯ СТРАНИЦА
   ============================================================ */

.hero {
    position: relative;
    z-index: 1;
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 32px 80px;
    animation: fadeIn 0.5s ease;
}

/* --- Интро --- */
.intro {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.intro__label {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: #4facfe;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding: 5px 12px;
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.25);
    border-radius: 6px;
}

.intro__title {
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.7px;
    color: #e8e8f0;
    margin-bottom: 14px;
}

.intro__desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #a0a0b0;
    max-width: 620px;
}

/* --- Разделы --- */
.sections__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}

.sections__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e8e8f0;
    letter-spacing: -0.3px;
}

.sections__hint {
    font-size: 0.85rem;
    color: #707080;
}

.sections__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* --- Карточка раздела --- */
.section-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    text-decoration: none;
    color: #e8e8f0;
    overflow: hidden;
    transition: all 0.25s ease;
    cursor: pointer;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4facfe, #00f2fe, #a78bfa);
    opacity: 0;
    transition: opacity 0.25s;
}

.section-card:hover {
    background: rgba(79, 172, 254, 0.06);
    border-color: rgba(79, 172, 254, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.section-card:hover::before { opacity: 1; }

.section-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
}

.section-card__num {
    font-family: 'SF Mono', Consolas, Monaco, monospace;
    font-size: 0.8rem;
    color: #707080;
    letter-spacing: 1px;
    font-weight: 600;
}

.section-card__icon {
    font-size: 1.6rem;
    line-height: 1;
    opacity: 0.85;
}

.section-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e8e8f0;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
    line-height: 1.3;
}

.section-card__desc {
    font-size: 0.9rem;
    color: #707080;
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

.section-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.section-card__count {
    font-size: 0.85rem;
    color: #4facfe;
    font-weight: 600;
}

.section-card__arrow {
    color: #707080;
    font-size: 1.1rem;
    transition: all 0.25s;
}

.section-card:hover .section-card__arrow {
    color: #4facfe;
    transform: translateX(4px);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */

@media (max-width: 900px) {
    .site-header {
        padding: 12px 20px;
        gap: 12px;
    }

    .site-btn__text { display: none; }
    .site-btn { padding: 10px 12px; }
}

@media (max-width: 700px) {
    .site-header {
        flex-wrap: wrap;
        padding: 10px 16px;
        gap: 10px;
    }

    .site-search {
        order: 3;
        flex-basis: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .page {
        padding: 28px 16px 60px;
    }

    .intro {
        margin-bottom: 32px;
        padding-bottom: 24px;
    }

    .intro__label {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    .intro__desc {
        font-size: 0.95rem;
    }

    .sections__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 16px;
    }

    .sections__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .section-card {
        padding: 18px;
    }

    .section-card__top { margin-bottom: 14px; }
    .section-card__title { font-size: 1.05rem; }
    .section-card__desc { margin-bottom: 16px; }
}