﻿.blogs-page,
.article-page {
    width: 100%;
    color: #0a0d14;
    font-family: "Nunito Sans", sans-serif;
}

/* Blog listing hero */

.blogs-hero {
    padding: 140px 24px 120px;
    background: linear-gradient( 180deg, #ffffff 0%, #f2f7ff 100% );
    text-align: center;
}

.blogs-label {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: #0d61f8;
    background: #eaf2ff;
    font-size: 12px;
    font-weight: 500;
}

.blogs-hero h1 {
    margin: 32px 0 0;
    font-size: 52px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.035em;
}

.blogs-hero > p {
    width: 700px;
    max-width: 100%;
    margin: 24px auto 0;
    color: #6b717e;
    font-size: 17px;
    line-height: 1.8;
}

/* Article listing */

.blogs-list-section {
    width: 1360px;
    max-width: calc(100% - 48px);
    min-height: 760px;
    margin: 0 auto;
    padding: 110px 0 140px;
}

.blogs-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 42px;
}

    .blogs-list-heading h2 {
        margin: 0;
        font-size: 32px;
        font-weight: 600;
    }

    .blogs-list-heading > span {
        color: #6b717e;
        font-size: 13px;
    }

/* Text-only blog cards */

.blogs-grid {
    display: grid;
    grid-template-columns: repeat( 3, minmax(0, 1fr) );
    gap: 28px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 30px;
    border: 1px solid #e2e4e9;
    border-radius: 16px;
    color: inherit;
    background: #fff;
    text-decoration: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

    .blog-card:hover,
    .blog-card:focus {
        border-color: #c6d5eb;
        box-shadow: 0 18px 40px rgba(35, 61, 91, 0.09);
        transform: translateY(-3px);
    }

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #6b717e;
    font-size: 11px;
}

    .blog-card-meta > span {
        padding: 5px 9px;
        border-radius: 999px;
        color: #0d61f8;
        background: #edf4ff;
    }

.blog-card h3 {
    margin: 30px 0 0;
    color: #0a0d14;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.45;
}

/* Exactly two visible excerpt lines */

.blog-card > p {
    display: -webkit-box;
    overflow: hidden;
    margin: 16px 0 0;
    color: #6b717e;
    font-size: 14px;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.blog-read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 30px;
    color: #0d61f8;
    font-size: 13px;
    font-weight: 500;
}

/* Loading, empty and error states */

.blogs-state {
    padding: 60px 24px;
    border: 1px solid #e2e4e9;
    border-radius: 16px;
    color: #6b717e;
    background: #fff;
    font-size: 14px;
    text-align: center;
}

.blogs-error {
    border-color: #ffd5d8;
    color: #d4161a;
    background: #fff1f1;
}

/* Article detail */

.article-page {
    width: 900px;
    max-width: calc(100% - 48px);
    min-height: 900px;
    margin: 0 auto;
    padding: 100px 0 140px;
}

.article-back {
    display: inline-flex;
    margin-bottom: 50px;
    color: #6b717e;
    font-size: 13px;
    text-decoration: none;
}

    .article-back:hover,
    .article-back:focus {
        color: #0d61f8;
    }

.article-header {
    padding-bottom: 54px;
    border-bottom: 1px solid #e2e4e9;
    text-align: center;
}

    .article-header h1 {
        margin: 28px 0 0;
        color: #0a0d14;
        font-size: 52px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: -0.035em;
    }

.article-introduction {
    margin: 24px auto 0;
    color: #6b717e;
    font-size: 18px;
    line-height: 1.8;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
    color: #6b717e;
    font-size: 12px;
}

.article-meta-divider {
    color: #8f959d;
}

/* Article body */

.article-content {
    width: 760px;
    max-width: 100%;
    margin: 60px auto 0;
}

    .article-content p {
        margin: 0 0 30px;
        color: #0a0d14;
        font-size: 17px;
        line-height: 1.95;
    }

        .article-content p:first-child::first-letter {
            float: left;
            margin: 8px 10px 0 0;
            color: #0d61f8;
            font-size: 52px;
            font-weight: 600;
            line-height: 0.8;
        }

    .article-content h2 {
        margin: 44px 0 16px;
        color: #0a0d14;
        font-size: 26px;
        font-weight: 600;
        line-height: 1.35;
    }

/* Detail footer actions */

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 760px;
    max-width: 100%;
    margin: 70px auto 0;
    padding-top: 30px;
    border-top: 1px solid #e2e4e9;
}

    .article-footer a {
        color: #0d61f8;
        font-size: 13px;
        font-weight: 500;
        text-decoration: none;
    }

/* Not-found state */

.article-not-found {
    padding: 120px 24px;
    text-align: center;
}

    .article-not-found h1 {
        margin: 28px 0 0;
        font-size: 42px;
        font-weight: 600;
    }

    .article-not-found p {
        width: 540px;
        max-width: 100%;
        margin: 20px auto 0;
        color: #6b717e;
        font-size: 15px;
        line-height: 1.7;
    }

.article-return-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    margin-top: 32px;
    padding: 0 24px;
    border-radius: 16px;
    color: #fff;
    background: #0d61f8;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

    .article-return-button:hover {
        opacity: 0.88;
    }

/* Responsive */

@media (max-width: 1100px) {
    .blogs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .blogs-hero {
        padding-top: 40px;
        padding-bottom: 40px;
    }

        .blogs-hero h1,
        .article-header h1 {
            font-size: 36px;
        }

    .blogs-grid {
        grid-template-columns: 1fr;
    }

    .blogs-list-section {
        max-width: calc(100% - 30px);
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .blog-card {
        min-height: 260px;
    }

    .article-page {
        max-width: calc(100% - 30px);
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .article-content p {
        font-size: 15px;
    }

    .article-content h2 {
        margin-top: 34px;
        font-size: 21px;
    }

    .article-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }
}
