html {
    scroll-behavior: smooth;
}

.gptai-news-library {
    --gptai-news-columns: 3;
    --gptai-news-grid-gap: 24px;
    --gptai-news-section-gap: 64px;
    --gptai-news-scroll-offset: 120px;
    color: #17213b;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.gptai-news-library,
.gptai-news-library * {
    box-sizing: border-box;
}

.gptai-news-library__intro {
    margin-bottom: 44px;
}

.gptai-news-library__heading,
.gptai-news-library__section-title,
.gptai-news-library__card-title,
.gptai-news-library__intro-text p,
.gptai-news-library__section-description p,
.gptai-news-library__excerpt,
.gptai-news-library__empty {
    margin-top: 0;
}

.gptai-news-library__heading {
    margin-bottom: 12px;
}

.gptai-news-library__intro-text,
.gptai-news-library__section-description {
    color: #5d6474;
}

.gptai-news-library__intro-text > :last-child,
.gptai-news-library__section-description > :last-child {
    margin-bottom: 0;
}

.gptai-news-library__sections {
    display: grid;
    gap: var(--gptai-news-section-gap);
}

.gptai-news-library__anchor-navigation {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 44px;
    padding: 22px 24px 24px;
    border: 1px solid #dce9e7;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7fbfa 0%, #f2f8f8 100%);
    box-shadow: 0 10px 30px rgba(32, 80, 76, 0.06);
}

.gptai-news-library__anchor-label {
    display: block;
    width: 100%;
    color: #454d5e;
    font-weight: 700;
}

.gptai-news-library__anchor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    padding-inline-start: 0 !important;
    list-style: none;
}

.gptai-news-library__anchor-item {
    margin: 0;
    padding: 0;
}

.gptai-news-library__anchor-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    border: 1px solid #d8e2e5;
    border-radius: 999px;
    padding: 9px 15px;
    background: #fff;
    color: #276f6b;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(32, 80, 76, 0.04);
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.gptai-news-library__anchor-link:hover,
.gptai-news-library__anchor-link:focus-visible {
    border-color: #4ea7a1;
    background: #e3f3f1;
    color: #215f5b;
    text-decoration: none !important;
    box-shadow: 0 5px 14px rgba(32, 80, 76, 0.1);
    transform: translateY(-1px);
}

.gptai-news-library__section {
    min-width: 0;
    scroll-margin-top: var(--gptai-news-scroll-offset);
}

.gptai-news-library__section-header {
    margin-bottom: 22px;
}

.gptai-news-library__section-title {
    margin-bottom: 8px;
}

.gptai-news-library__grid {
    display: grid;
    grid-template-columns: repeat(var(--gptai-news-columns), minmax(0, 1fr));
    gap: var(--gptai-news-grid-gap);
}

.gptai-news-library__card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e7ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(32, 45, 75, 0.08);
}

.gptai-news-library__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #eef2f6;
}

.gptai-news-library__image {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 220ms ease;
}

.gptai-news-library__card:hover .gptai-news-library__image {
    transform: scale(1.025);
}

.gptai-news-library__card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px;
}

.gptai-news-library__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin-bottom: 10px;
    color: #6d7482;
    font-size: 0.84rem;
}

.gptai-news-library__author::before {
    margin-right: 14px;
    color: #b4bac5;
    content: "•";
}

.gptai-news-library__card-title {
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.gptai-news-library__card-title a {
    color: inherit;
    text-decoration: none;
}

.gptai-news-library__card-title a:hover,
.gptai-news-library__card-title a:focus-visible {
    color: #4ea7a1;
    text-decoration: none;
}

.gptai-news-library__excerpt {
    margin-bottom: 0;
    color: #5d6474;
    line-height: 1.65;
}

.gptai-news-library__section-action {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
}

.gptai-news-library__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #4ea7a1;
    border-radius: 999px;
    padding: 11px 20px;
    background: #4ea7a1;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.gptai-news-library__button:hover,
.gptai-news-library__button:focus-visible {
    border-color: #347f7a;
    background: #347f7a;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.gptai-news-library__back-to-top {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0 !important;
}

.gptai-news-library__back-to-top svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.gptai-news-library__button:focus-visible,
.gptai-news-library__card-title a:focus-visible,
.gptai-news-library__anchor-link:focus-visible {
    outline: 3px solid rgba(78, 167, 161, 0.3);
    outline-offset: 3px;
}

.gptai-news-library__empty {
    padding: 18px 20px;
    border: 1px solid #e2e7ee;
    border-radius: 14px;
    background: #f7f9fb;
    color: #5d6474;
}

@media (max-width: 1024px) {
    .gptai-news-library {
        --gptai-news-columns: 2;
        --gptai-news-section-gap: 52px;
    }
}

@media (max-width: 767px) {
    .gptai-news-library {
        --gptai-news-columns: 1;
        --gptai-news-grid-gap: 18px;
        --gptai-news-section-gap: 42px;
    }

    .gptai-news-library__intro {
        margin-bottom: 32px;
    }

    .gptai-news-library__section-header {
        margin-bottom: 18px;
    }

    .gptai-news-library__anchor-navigation {
        padding: 18px;
    }

    .gptai-news-library__anchor-list {
        align-items: flex-start;
        flex-direction: row;
    }

    .gptai-news-library__anchor-link {
        min-height: 44px;
    }

    .gptai-news-library__section-action {
        width: 100%;
    }

    .gptai-news-library__section-action > .gptai-news-library__button:not(.gptai-news-library__back-to-top) {
        flex: 1 1 auto;
        width: auto;
    }

    .gptai-news-library__back-to-top {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }
}
