body {
    background: #fff;
}

main.templates-page {
    margin: 0;
}

main.templates-page article {
    background: #fff;
}

.templates-hero {
    background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-muted) 100%);
    padding: 96px var(--space-x);
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.templates-hero > * {
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
}

main.templates-page h1 {
    color: var(--text);
    font-size: clamp(2rem, 4.6vw, 3rem);
    line-height: 1.1;
    font-weight: 700;
}

main.templates-page h1 span {
    color: var(--primary);
}

.templates-hero p {
    margin-top: 22px;
    color: var(--muted);
    max-width: 760px;
    font-size: 1.18rem;
    line-height: 1.62;
}

.templates-hero__actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px !important;
}

.templates-proof {
    max-width: var(--container);
    margin: 72px auto 0;
    padding: 0 var(--space-x);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.templates-proof div {
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 24px;
}

.templates-proof strong,
.templates-proof span {
    display: block;
}

.templates-proof strong {
    color: var(--primary);
    font-size: clamp(1.7rem, 2.8vw, 2.3rem);
    line-height: 1;
}

.templates-proof span {
    margin-top: 8px;
    color: var(--muted);
    font-weight: 600;
}

.templates-grid {
    max-width: var(--container);
    margin: 28px auto 72px;
    padding: 0 var(--space-x);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.templates-grid > section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 32px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.templates-grid > section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.templates-grid h2 {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    color: var(--text);
    font-size: 1.28rem;
}

.templates-grid h2::after {
    content: attr(data-count);
}

.templates-grid > section h2::after {
    min-width: 2.4rem;
    border-radius: 999px;
    background: #dbeafe;
    color: var(--primary);
    padding: 0.2rem 0.55rem;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.4;
}

.templates-grid ul {
    list-style: disc;
    columns: 1;
    margin: 16px 0 0 1.25rem;
    padding: 0;
    color: var(--muted);
    line-height: 1.68;
    font-size: 1.03rem;
}

.templates-grid li {
    break-inside: avoid;
}

.templates-grid li+li {
    margin-top: 8px;
}

.templates-cta {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 72px var(--space-x);
}

.templates-cta h3 {
    color: #fff;
    font-size: clamp(1.85rem, 3vw, 2.5rem);
}

.templates-cta p {
    max-width: 760px;
    margin: 12px auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.08rem;
}

.templates-cta .btn {
    margin-top: 26px;
    background: #fff;
    color: var(--primary);
    min-width: 180px;
}

.templates-cta .btn:hover {
    background: #f8fafc;
}

@media (max-width: 820px) {
    .templates-hero,
    .templates-cta {
        padding: 54px var(--space-x);
    }

    .templates-hero__actions .btn {
        width: 100%;
    }

    .templates-proof,
    .templates-grid {
        grid-template-columns: 1fr;
        margin-top: 54px;
    }

    .templates-grid {
        margin-bottom: 54px;
    }

    .templates-grid > section {
        padding: 24px;
    }
}
