/* ==========================================================================
   Главная страница Tushino 2018
   ========================================================================== */

:root {
    --home-primary: #1d4ed8;
    --home-primary-dark: #1e3a8a;
    --home-accent: #0d9488;
    --home-ink: #0f172a;
    --home-muted: #64748b;
    --home-bg: #f4f7fb;
    --home-card: #ffffff;
    --home-radius: 18px;
    --home-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --home-shadow-hover: 0 18px 44px rgba(15, 23, 42, .16);
    --home-font: 'Manrope', -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--home-font);
}

/* На главной секции идут во всю ширину, свой внутренний контейнер */
.main-container {
    max-width: 100%;
    padding: 0;
}

.home-wrap {
    font-family: var(--home-font);
    color: var(--home-ink);
    background: var(--home-bg);
}

.home-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Hero ---------- */

.home-hero {
    position: relative;
    min-height: calc(100vh - 58px);
    display: flex;
    align-items: center;
    background:
        linear-gradient(105deg, rgba(8, 25, 62, .88) 0%, rgba(13, 60, 110, .72) 45%, rgba(13, 148, 136, .45) 100%),
        url("/static/banner.jpg") center 30% / cover no-repeat;
    color: #fff;
    overflow: hidden;
}

.home-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 120px;
    background: linear-gradient(to bottom, rgba(244, 247, 251, 0), var(--home-bg));
    pointer-events: none;
}

.home-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 80px 20px 140px;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    margin-bottom: 26px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(6px);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, .25);
}

.home-hero h1 {
    max-width: 760px;
    margin: 0 0 20px;
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.02em;
}

.home-hero h1 .accent {
    background: linear-gradient(90deg, #7dd3fc, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-hero-sub {
    max-width: 560px;
    margin: 0 0 36px;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.6;
    color: rgba(255, 255, 255, .85);
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.home-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.home-btn-primary {
    background: linear-gradient(135deg, #2563eb, #0d9488);
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(13, 148, 136, .35);
}

.home-btn-primary:hover {
    color: #fff;
    box-shadow: 0 16px 34px rgba(13, 148, 136, .45);
}

.home-btn-ghost {
    border: 1.5px solid rgba(255, 255, 255, .55);
    color: #fff !important;
    background: rgba(255, 255, 255, .06);
}

.home-btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, .16);
}

/* ---------- Секции ---------- */

.home-section {
    padding: 84px 0;
}

.home-section-head {
    max-width: 640px;
    margin: 0 auto 52px;
    text-align: center;
}

.home-section-kicker {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--home-accent);
}

.home-section-title {
    margin: 0 0 14px;
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.home-section-lead {
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
    color: var(--home-muted);
}

/* ---------- Карточки направлений ---------- */

.home-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.home-feature-card {
    padding: 30px 26px;
    border-radius: var(--home-radius);
    background: var(--home-card);
    box-shadow: var(--home-shadow);
    transition: transform .2s ease, box-shadow .2s ease;
}

.home-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--home-shadow-hover);
}

.home-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    border-radius: 15px;
    color: #fff;
}

.home-feature-icon svg {
    width: 26px;
    height: 26px;
}

.icon-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.icon-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.icon-green { background: linear-gradient(135deg, #34d399, #059669); }
.icon-indigo { background: linear-gradient(135deg, #818cf8, #4f46e5); }

.home-feature-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
}

.home-feature-card p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--home-muted);
}

/* ---------- Последние сообщения ---------- */

.home-posts {
    background: #fff;
}

.home-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.home-post-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border: 1px solid #e6ecf5;
    border-radius: var(--home-radius);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.home-post-card:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: var(--home-shadow-hover);
    text-decoration: none;
    color: inherit;
}

.home-post-date {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--home-accent);
}

.home-post-card h3 {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.35;
}

.home-post-card p {
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--home-muted);
}

.home-post-more {
    margin-top: auto;
    font-size: 14px;
    font-weight: 800;
    color: var(--home-primary);
}

.home-posts-empty {
    padding: 40px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--home-radius);
    text-align: center;
    color: var(--home-muted);
}

.home-posts-all {
    margin-top: 40px;
    text-align: center;
}

.home-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border: 1.5px solid var(--home-primary);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--home-primary);
    text-decoration: none;
    transition: background .18s ease, color .18s ease;
}

.home-btn-outline:hover {
    background: var(--home-primary);
    color: #fff;
    text-decoration: none;
}

/* ---------- Финальный CTA ---------- */

.home-cta {
    padding: 20px 0 84px;
    background: #fff;
}

.home-cta-box {
    position: relative;
    overflow: hidden;
    padding: 64px 40px;
    border-radius: 26px;
    background: linear-gradient(120deg, #1e3a8a 0%, #1d4ed8 55%, #0d9488 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 24px 60px rgba(29, 78, 216, .3);
}

.home-cta-box::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.home-cta-box h2 {
    position: relative;
    margin: 0 0 14px;
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.home-cta-box p {
    position: relative;
    max-width: 520px;
    margin: 0 auto 32px;
    font-size: 16.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .85);
}

.home-btn-light {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 14px;
    background: #fff;
    color: var(--home-primary-dark) !important;
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
    transition: transform .18s ease, box-shadow .18s ease;
}

.home-btn-light:hover {
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .24);
}

/* ---------- Футер ---------- */

.home-footer {
    padding: 36px 0;
    background: #0b1526;
    color: rgba(255, 255, 255, .65);
}

.home-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.home-footer-brand {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
}

.home-footer-brand span {
    color: #34d399;
}

.home-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
}

.home-footer-nav a {
    font-size: 14px;
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    transition: color .15s ease;
}

.home-footer-nav a:hover {
    color: #fff;
    text-decoration: none;
}

.home-footer-copy {
    width: 100%;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .4);
}

/* ---------- Адаптив ---------- */

@media (max-width: 991px) {
    .home-features {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 575px) {
    .home-section {
        padding: 60px 0;
    }

    .home-hero-inner {
        padding: 64px 20px 120px;
    }

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

    .home-cta-box {
        padding: 48px 24px;
    }

    .home-btn {
        width: 100%;
        justify-content: center;
    }
}
