﻿html,
body {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding-top: var(--header-height, 65px);
    background: #edf5f1;
}

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

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

.blog-hero {
    padding: 0 0 6px;
}

.blog-hero h1 {
    margin: -8px 0 0;
    font-family: "Montserrat", sans-serif;
    font-size: clamp(32px, 3.8vw, 54px);
    line-height: 1.15;
    font-weight: 800;
    color: #0f3f2b;
    letter-spacing: -0.01em;
}

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

.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;
    border-radius: 16px;
    border: 1px solid rgba(86, 156, 121, 0.3);
    background: #2a433b;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "media"
        "header"
        "details";
    grid-template-rows: auto auto auto;
    row-gap: 0;
    align-items: start;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.news-card-header { grid-area: header; }

.news-card-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.12;
    color: #f4fff9;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.4);
}

.news-date {
    margin: 4px 0 0;
    font-size: 18px;
    line-height: 1.3;
    color: rgba(244, 255, 249, 0.92);
    letter-spacing: 0.03em;
    text-transform: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

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

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

.news-card-media {
    display: flex;
}

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

.news-details {
    grid-area: details;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.news-read-more-btn {
    display: inline-block;
    cursor: pointer;
    border: 1px solid rgba(226, 248, 237, 0.88);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 18px;
    font-weight: 700;
    color: #f4fff9;
    background: rgba(8, 42, 29, 0.42);
    backdrop-filter: blur(3px);
    font-family: inherit;
}

.news-card-media {
    grid-area: media;
    display: flex;
    justify-content: flex-end;
    align-self: start;
    position: relative;
    margin-bottom: 10px;
}

.news-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 20, 14, 0.06) 35%, rgba(4, 20, 14, 0.78) 100%);
    pointer-events: none;
}

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

.news-media-slides {
    position: relative;
    aspect-ratio: 16 / 9;
}

.news-slide {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 16px;
    border: 1px solid #c5ded0;
    background: #ffffff;
    padding: 10px;
    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 {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.news-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: #b4c9bd;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

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

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

.news-media-slides {
    aspect-ratio: 16 / 10;
}

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

.blog-featured .news-card .news-card-header,
.blog-featured .news-card .news-details {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 3;
}

.blog-featured .news-card .news-card-header {
    bottom: 54px;
}

.blog-featured .news-card .news-details {
    bottom: 12px;
    right: auto;
    width: auto;
}

.blog-featured .news-card .news-media-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    z-index: 5;
    pointer-events: auto;
}

.blog-featured .news-card .news-dot {
    background: rgba(231, 245, 237, 0.65);
}

.blog-featured .news-card .news-dot.is-active {
    background: #ffffff;
}

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

.blog-opened-news {
    padding: 8px 0 24px;
}

.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"
        "intro"
        "media"
        "content"
        "actions";
    row-gap: 8px;
}

.opened-news-intro {
    grid-area: intro;
}

.opened-news-intro > p {
    margin: 0;
    font-size: 24px;
    line-height: 1.55;
    color: #1f5c45;
}

.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 {
    justify-content: center;
    margin-bottom: 0;
}

.opened-news-card .news-card-media > img,
.opened-news-card .news-media-slider {
    width: min(100%, 620px);
}

.opened-news-card .news-card-media::after {
    display: none;
}

.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-actions {
    grid-area: actions;
}

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

    .news-card-media {
        justify-content: center;
    }
}

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

    .blog-hero {
        padding: 6px 0 6px;
    }

    .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;
    }

    .news-card-media {
        justify-content: center;
    }

    .news-card-media > img {
        width: 100%;
    }

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

    .blog-featured .news-card .news-card-header {
        bottom: 60px;
    }

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