body {
    font-family: Inter, system-ui, Arial; 
}

/* Базовый контейнер для контента */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Заголовки страниц */
main h1 {
    font-size: 32px;
    font-weight: 700;
    margin-top: 100px; /* учитываем фиксированную шапку */
    margin-bottom: 16px;
    color: #fff;
}

main p {
    font-size: 16px;
    line-height: 1.6;
    color: #cbd5e1;
}

/* Сетка инструментов */
.tools-grid {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 32px;
    flex-wrap: wrap;
    justify-content: space-evenly;
}

/* Карточка инструмента */
.tool-card {
    background: #1f2937;
    color: #fff;
    border-radius: 16px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Видимые карточки при скролле */
.tool-card.visible {
    max-width: 530px;
    opacity: 1;
    transform: translateY(0);
}

/* Hover эффект */
.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

/* Лого инструмента */
.tool-logo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover .tool-logo {
    transform: scale(1.1) rotate(-5deg);
    border-color: #66c0ff;
}

/* Название */
.tool-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Описание */
.tool-desc {
    font-size: 17px;
    margin-bottom: 12px;
    line-height: 1.5;
    color: #cbd5e1;
}

/* Инструкция */
.tool-instruction {
    background: #111827;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: #e2e8f0;
    margin-bottom: 12px;
}

/* Ссылка на инструмент */
.tool-link {
    display: inline-block;
    margin-top: auto;
    color: #3399ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.tool-link:hover {
    color: #66c0ff;
    transform: translateX(4px);
}

/* Фиксированная шапка */
.site-header {
    background: #0f1724;
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* Скрытие шапки при скролле */
.site-header.hide {
    transform: translateY(-100%);
}

/* Лого */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: 40px;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: rotate(-10deg) scale(1.1);
}

.logo-text {
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    font-family: 'Arial', sans-serif;
}

/* Навигация */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #3399ff;
    transition: width 0.3s ease;
}

.main-nav a:hover {
    color: #3399ff;
}

.main-nav a:hover::after {
    width: 100%;
}









.tools-hero {
    background: linear-gradient(135deg, #0f1724, #1e293b);
    color: #fff;
    padding: 0px 16px 30px;
    text-align: center;
    border-radius: 12px;
    margin-top: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.tools-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(51,153,255,0.15) 0%, transparent 70%);
    /* анимация теперь один раз и останавливается в конце */
    animation: rotateBGOnce 5s ease forwards;
}

@keyframes rotateBGOnce {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(45deg); } /* конечный угол */
}

.tools-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.tools-hero h1 {
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    animation: fadeInUp 1s ease forwards;
}

.tools-hero p {
    font-size: 18px;
    margin-bottom: 24px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.3s;
    animation-fill-mode: forwards;
}

.tools-hero .btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    background: #3399ff;
    transition: background 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.6s;
    animation-fill-mode: forwards;
}

.tools-hero .btn:hover {
    background: #66c0ff;
    transform: translateY(-2px);
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}



/* Адаптив */
@media (max-width: 768px) {

    main h1 {
        margin-top: 16px;
    }

    .btn-primary {
        font-size: 0;
    }

    .btn-primary::after {
        content: "Предложить идею";
        font-size: 14px;
    }

    .tool-desc {
        font-size: 14px;
    }

    .tools-hero h1 { font-size: 28px; }
    .tools-hero p { font-size: 16px; }
    
    .main-nav ul {
        flex-direction: column;
        gap: 12px;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-card {
        padding: 16px;
    }
}