/* ======================= Общие стили ======================= */
body {
    font-family: system-ui, sans-serif;
    background: linear-gradient(180deg,#f8fafc,#eef2ff);
    max-width: 1100px;
    margin: auto;
    padding: 40px;
    color: #1e293b;
}

/* ======================= Заголовок ======================= */
.hero {
    text-align: center;
    margin-bottom: 60px;
}

.wave {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(90deg,#6366f1,#22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: wave 4s infinite;
}

@keyframes wave {
    0%,100% { letter-spacing: 0 }
    50% { letter-spacing: 4px }
}

.hero-subtitle {
    font-size: 18px;
    color: #475569;
}

/* ======================= Сетка карточек постов ======================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
    gap: 24px;
}

/* Карточка поста */
.card {
    background: white;
    padding: 28px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,.08);
    position: relative;
}

.card-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg,#6366f1,#22d3ee);
}

.card h2 {
    margin-top: 0;
}

.card p.muted {
    color: #475569;
}

.read-more, .btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 16px;
    background: #6366f1;
    color: white;
    border-radius: 10px;
    text-decoration: none;
}

/* ======================= Пост ======================= */
.post {
    background: white;
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,.1);
    position: relative;
}

/* ======================= Футер ======================= */
.footer {
    margin-top: 100px;
    padding: 60px;
    background: white;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(0,0,0,.1);
}

.footer h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 40px;
    background: linear-gradient(90deg,#6366f1,#22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Сетка мини-карточек футера */
.random-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.random-posts li.card-mini {
    background: white;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.random-posts li.card-mini:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

.random-posts li.card-mini a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #1e293b;
    text-decoration: none;
}

.random-posts li.card-mini h4 {
    font-size: 18px;
    margin: 0 0 8px 0;
    font-weight: 700;
    line-height: 1.3;
}

.random-posts li.card-mini p {
    font-size: 14px;
    color: #475569;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.random-posts li.card-mini small {
    font-size: 12px;
    color: #64748b;
}

.random-posts li.card-mini::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg,#6366f1,#22d3ee);
    z-index: 1;
}

/* ======================= Категории как карточки ======================= */
.categories-grid {
    margin: 40px 0;
}

.categories-grid h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 40px;
    background: linear-gradient(90deg,#6366f1,#22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.categories-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-card {
    background: white;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
}

.category-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(90deg,#6366f1,#22d3ee);
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
