:root {
    --article-header-min-height: 600px;
    --article-header-title-fs: 40px;
    --article-header-title-fw: 400;
    --article-content-fs: 20px;
    --article-content-fw: 300;
    --article-content-max-width: 900px;
    --article-photos-gap: 20px;
    --article-photos-columns: repeat(3, 1fr);
    --article-photo-height: 280px;
}

/**/
.article_header {
    width: 100%;
    min-height: var(--article-header-min-height);
    border-bottom: 1px solid var(--main-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-top: 78px;
    position: relative;
    overflow: hidden;
}

.article_header__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.article_header__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 100%);
}

.article_header__content {
    position: relative;
    z-index: 1;
    padding: 50px 8%;
}

.article_header__date {
    font-size: 16px;
    font-weight: 300;
    color: var(--main-color);
    margin: 0 0 16px;
}

.article_header__title {
    font-size: var(--article-header-title-fs);
    font-weight: var(--article-header-title-fw);
    color: #fff;
    margin: 0;
    line-height: 1.3;
    max-width: var(--article-content-max-width);
}

/**/
.article_body__container {
    padding: var(--padding-body);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article_content {
    width: 100%;
    max-width: var(--article-content-max-width);
    font-size: var(--article-content-fs);
    font-weight: var(--article-content-fw);
    color: var(--main-color);
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.article_content p {
    margin: 0 0 16px;
}

/**/
.article_photos__container {
    width: 100%;
    padding: 0 8% 40px;
}

.article_photos__title {
    font-size: 28px;
    font-weight: 400;
    color: #fff;
    margin: 0 0 20px;
    border-top: 1px solid var(--main-color);
    padding-top: 30px;
}

.article_photos__grid {
    display: grid;
    grid-template-columns: var(--article-photos-columns);
    gap: var(--article-photos-gap);
}

.article_photos__grid > .article_photo__item {
    border-radius: var(--br);
    overflow: hidden;
    height: var(--article-photo-height);
    cursor: pointer;
    transition: var(--trans);
}

.article_photos__grid > .article_photo__item:hover {
    transform: scale(var(--scale-img));
}

.article_photos__grid > .article_photo__item > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/**/
.article_back__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 300;
    color: var(--main-color);
    text-decoration: none;
    transition: var(--trans);
    padding: var(--padding-body);
    width: 100%;
    box-sizing: border-box;
}

.article_back__link.end {
    text-align: end;
    display: flex;
    justify-content: end;
}

.article_back__link:hover {
    color: var(--hover-color);
}

/* Lightbox */
.article_photo_lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.article_photo_lightbox.active {
    display: flex;
}

.article_photo_lightbox > img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--br);
}

.article_photo_lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--trans);
}

.article_photo_lightbox__close:hover {
    opacity: 1;
}

@media only screen and (max-width: 860px) {
    :root {
        --article-header-min-height: 450px;
        --article-header-title-fs: 30px;
        --article-photos-columns: repeat(2, 1fr);
        --article-photo-height: 220px;
    }

    .article_header__content {
        padding: 30px 5%;
    }

    .article_photos__container {
        padding: 0 5% 30px;
    }
}

@media only screen and (max-width: 560px) {
    :root {
        --article-header-min-height: 350px;
        --article-header-title-fs: 24px;
        --article-content-fs: 17px;
        --article-photos-columns: repeat(1, 1fr);
        --article-photo-height: 240px;
    }
}
