html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: #edf5f1;
}

.blog-main {
    flex-grow: 1;
    color: #14382c;
}

.blog-shell {
    width: min(1720px, 100% - 48px);
    margin: 0 auto;
}

.blog-featured {
    padding: 24px 0;
}

.blog-featured .blog-shell.blog-empty-state {
    display: block;
    padding: 48px 0;
    text-align: center;
    font-size: 18px;
    color: #14382c;
}

.blog-featured .blog-shell {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    grid-auto-rows: 1fr;
    align-items: start;
}

.news-card {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    scroll-margin-top: calc(var(--header-height, 65px) + 20px);
    border-radius: 16px;
    border: 1px solid rgba(86, 156, 121, 0.3);
    background: #ffffff;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "media"
        "header"
        "details";
    grid-template-rows: auto 1fr auto;
    row-gap: 0;
    align-items: start;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(15, 63, 43, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.news-card:hover {
    box-shadow: 0 10px 26px rgba(15, 63, 43, 0.14);
    transform: translateY(-2px);
}

.news-card-header {
    grid-area: header;
    padding: 18px 20px 0;
}

.news-card-header h2 {
    margin: 0;
    font-family: "Montserrat", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f3f2b;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.news-date {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.3;
    color: #5a7168;
    letter-spacing: 0.03em;
    text-transform: none;
}

.news-card-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.news-card-content {
    display: none;
}

.news-card-content > p {
    margin: 0;
    font-size: clamp(17px, 1.3vw, 21px);
    line-height: 1.55;
    color: #1f5c45;
    text-align: justify;
}

.news-card-content .news-callout {
    background: rgba(31, 111, 78, 0.12);
    border-left: 4px solid #1f6f4e;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 700;
    color: #124833;
    text-align: left;
}

.news-details {
    grid-area: details;
    padding: 14px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.news-read-more-btn {
    display: inline-block;
    cursor: pointer;
    border: none;
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: #1f6f4e;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.news-read-more-btn:hover {
    background: #0f3f2b;
}

.news-card-media {
    grid-area: media;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef5f1;
    border-bottom: 1px solid rgba(86, 156, 121, 0.25);
}

.news-media-slider {
    width: 100%;
    height: 100%;
}

.news-media-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.news-slide {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    inset: 0;
    transition: opacity 0.35s ease;
}

.news-slide.is-active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.news-media-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.news-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(15, 63, 43, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.news-dot.is-active {
    background: #1f6f4e;
    transform: scale(1.15);
}

.news-card-media > img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
    object-fit: contain;
}

.news-image-title {
    display: none;
    margin: 6px 0 0;
    font-size: 12px;
    color: #7a7a7a;
    text-align: center;
}

.news-card.is-hidden {
    display: none;
}

.blog-opened-news {
    padding: 8px 0 24px;
    scroll-margin-top: calc(var(--header-height, 65px) + 20px);
}

.opened-news-card {
    width: 100%;
    box-sizing: border-box;
    border-radius: 24px;
    border: 1px solid rgba(86, 156, 121, 0.35);
    background: #dce9e2;
    padding: 28px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "media"
        "content"
        "actions";
    row-gap: 8px;
}

.opened-news-card .news-card-media,
.opened-news-card .news-card-content {
    display: flex;
}

.opened-news-card .news-card-content > p {
    font-size: 24px;
}

.opened-news-card .news-card-header h2 {
    -webkit-line-clamp: unset;
}

.opened-news-card .news-card-media {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    width: min(100%, 620px);
    aspect-ratio: auto;
    height: auto;
    overflow: visible;
    background: transparent;
    border-bottom: none;
    border-radius: 12px;
}

.opened-news-card .news-image-title {
    display: block;
    width: min(100%, 620px);
    margin-top: 16px;
}

.opened-news-card .news-media-dots {
    position: static;
    margin-top: 14px;
}

.opened-news-card .news-card-media > img,
.opened-news-card .news-media-slider,
.opened-news-card .news-media-slides {
    width: 100%;
}

.opened-news-card .news-media-slider {
    height: auto;
}

.opened-news-card .news-media-slides {
    aspect-ratio: 16 / 10;
    height: auto;
}

.opened-news-card .news-card-media > img {
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0;
}

.opened-news-card .news-slide {
    border-radius: 0;
    border: none;
    background: transparent;
    padding: 0;
}

.opened-news-card .news-card-header,
.opened-news-card .news-details {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
}

.opened-news-card .news-card-header h2 {
    color: #0f3d2d;
    text-shadow: none;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(32px, 3.8vw, 54px);
    line-height: 1.15;
    font-weight: 800;
}

.opened-news-card .news-date {
    color: rgba(18, 72, 51, 0.75);
    text-shadow: none;
    font-size: 18px;
}

.opened-news-card .news-read-more-btn {
    border: 1px solid #1e6e4e;
    color: #124833;
    background: #e3f3ea;
    backdrop-filter: none;
    font-size: 18px;
}

.opened-news-card .news-read-more-btn:hover {
    background: #cfe8db;
}

.opened-news-actions {
    grid-area: actions;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .blog-featured .blog-shell {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-shell {
        width: min(1720px, 100% - 20px);
    }

    .news-card {
        width: 100%;
        grid-template-columns: 1fr;
        grid-template-areas:
            "media"
            "header"
            "details";
        border-radius: 18px;
        padding: 0;
        gap: 14px;
    }

    .blog-featured .blog-shell {
        grid-template-columns: 1fr;
        gap: 14px;
        grid-auto-rows: auto;
    }

    .news-card-header h2 {
        font-size: 24px;
    }

    .news-card-content > p {
        font-size: 24px;
    }

    .opened-news-card {
        border-radius: 18px;
        padding: 18px;
    }
}
