/* ---------- Футер прижат к низу на коротких страницах ---------- */

body {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
}

#layout-content {
    flex: 1 0 auto;
}

#layout-header,
#layout-footer {
    flex-shrink: 0;
}

/* ---------- Новости: шапка страницы ---------- */

.n-hero {
    position: relative;
    padding: 25px 0 50px;
    background: #2D3134 url('/storage/app/media/Black.jpg') center / cover no-repeat;
    color: #fff;
}

.n-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 22, 24, .92) 0%, rgba(20, 22, 24, .75) 60%, rgba(20, 22, 24, .45) 100%);
}

.n-hero .container {
    position: relative;
}

.n-hero__logo {
    display: block;
    width: 170px;
    margin-bottom: 30px;
}

.n-hero__logo img {
    width: 100%;
}

.n-crumbs {
    font-family: 'Roboto';
    font-size: 15px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .6);
    margin-bottom: 18px;
}

.n-crumbs a,
.n-crumbs a:visited {
    color: rgba(255, 255, 255, .85);
}

.n-crumbs a:hover {
    color: #fff;
}

.n-crumbs span {
    margin: 0 8px;
}

.n-hero__title {
    position: relative;
    max-width: 900px;
    margin: 0;
    padding-bottom: 18px;
    font-family: 'Ubuntu';
    font-weight: 700;
    font-size: 38px;
    line-height: 1.2;
    color: #fff;
}

.n-hero__title::before {
    content: "";
    position: absolute;
    bottom: 0;
    width: 70px;
    height: 6px;
    background: #00842D;
    border-radius: 0 3px 3px 0;
}

.n-hero--item .n-hero__title {
    font-size: 32px;
}

/* ---------- Сетка карточек ---------- */

.n-page {
    padding-top: 50px;
}

.n-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.n-card,
.n-card:visited {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid #E6E8EA;
    border-radius: 6px;
    color: #151515;
    transition: box-shadow .25s, transform .25s, border-color .25s;
}

.n-card:hover {
    color: #151515;
    border-color: transparent;
    box-shadow: 0 12px 30px rgba(45, 49, 52, .14);
    transform: translateY(-4px);
}

.n-card__img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #F5F5F5;
}

.n-card__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.n-card__img--contain {
    background: #fff;
    border-bottom: 1px solid #F0F0F0;
}

.n-card__img--contain img {
    object-fit: contain;
    padding: 20px;
}

.n-card:hover .n-card__img img {
    transform: scale(1.04);
}

.n-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 24px 24px;
}

.n-date {
    font-family: 'Exo 2';
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    color: #00842D;
    margin-bottom: 12px;
}

.n-date--light {
    color: #3DBE6A;
}

.n-card__title {
    font-family: 'Ubuntu';
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
    color: #2D3134;
    margin-bottom: 12px;
}

.n-card__text {
    font-family: 'Roboto';
    font-size: 16px;
    line-height: 1.5;
    color: #555;
    margin-bottom: 18px;
}

.n-more {
    margin-top: auto;
    font-family: 'Exo 2';
    font-weight: 600;
    font-size: 15px;
    color: #00842D;
}

.n-empty {
    font-family: 'Roboto';
    font-size: 18px;
    color: #555;
}

/* ---------- Страница новости ---------- */

.n-article {
    width: 100%;
}

.n-article__cover {
    margin-bottom: 35px;
    border: 1px solid #E6E8EA;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    text-align: center;
}

.n-article__cover img {
    max-height: 600px;
    width: auto;
}

.n-body {
    font-family: 'Roboto';
    font-size: 18px;
    line-height: 1.75;
    color: #333;
}

.n-body p {
    margin: 0 0 18px;
}

.n-body h3 {
    margin: 34px 0 14px;
    font-family: 'Ubuntu';
    font-weight: 700;
    font-size: 25px;
    line-height: 1.4;
    color: #2D3134;
}

.n-body ul {
    margin: 0 0 18px;
    padding-left: 22px;
}

.n-body a {
    color: #00842D;
    text-decoration: underline;
}

.n-body img {
    height: auto;
    border-radius: 6px;
}

.n-body .n-lead {
    font-size: 21px;
    line-height: 1.6;
    font-weight: 500;
    color: #2D3134;
    padding-left: 20px;
    border-left: 4px solid #00842D;
    margin-bottom: 28px;
}

.n-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
    padding: 25px 15px;
    background: #F5F5F5;
    border-radius: 6px;
    text-align: center;
}

.n-stat {
    flex: 1 1 150px;
    padding: 10px;
    font-size: 18px;
}

.n-stat strong {
    display: block;
    margin-bottom: 8px;
    font-family: 'Ubuntu';
    font-size: 34px;
    line-height: 1.3;
    color: #00842D;
}

.n-source {
    font-family: 'Roboto';
    font-size: 16px;
    color: #555;
    margin: 10px 0 30px;
    padding-top: 20px;
    border-top: 1px solid #E6E8EA;
}

.n-source a {
    color: #00842D;
    text-decoration: underline;
}

.button.n-back {
    margin: 10px 0 0;
    padding: 14px 30px;
}

.button.n-back:hover,
.button.n-back:visited {
    color: #fff;
}

.n-others {
    margin-top: 70px;
}

.n-others .news_title {
    margin-bottom: 35px;
    font-family: 'Ubuntu';
}

/* ---------- Галерея ---------- */

.n-gallery {
    position: relative;
    margin: 35px 0;
    overflow: hidden;
}

.n-gallery__track {
    display: flex;
    gap: 15px;
    transition: transform .5s ease-in-out;
    will-change: transform;
}

.n-gallery__track img {
    display: block;
    flex: 0 0 calc((100% - 30px) / 3);
    width: calc((100% - 30px) / 3);
    height: 280px;
    object-fit: cover;
    border-radius: 6px;
    background: #F5F5F5;
}

.n-gallery__btn {
    position: absolute;
    top: 140px;
    transform: translateY(-50%);
    z-index: 2;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: 20px;
    transition: background .2s;
}

.n-gallery__btn:hover {
    background: #00842D;
}

.n-gallery__prev {
    left: 10px;
}

.n-gallery__next {
    right: 10px;
}

.n-gallery__counter {
    margin-top: 12px;
    text-align: center;
    font-family: 'Roboto';
    font-size: 14px;
    color: #555;
}

/* ---------- Кнопки в шапке: на узких экранах переносим, а не вылезаем за край ---------- */

.menu-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    row-gap: 10px;
}

.menu-right a.button,
.menu-right a.button:hover,
.menu-right a.button:focus,
.menu-right a.button:visited {
    color: #fff;
}

/* ---------- Адаптив ---------- */

@media (max-width: 992px) {
    .n-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .n-hero {
        padding: 90px 0 40px;
    }

    .n-hero__logo {
        width: 110px;
        margin-bottom: 20px;
    }

    .n-hero__title,
    .n-hero--item .n-hero__title {
        font-size: 26px;
    }

    .n-page {
        padding-top: 35px;
    }

    .n-others .news_title {
        font-size: 26px;
        line-height: 1.3;
    }

    .n-body {
        font-size: 16px;
    }

    .n-body .n-lead {
        font-size: 18px;
    }

    .n-body h3 {
        font-size: 21px;
    }

    .n-gallery__track img {
        flex-basis: calc((100% - 15px) / 2);
        width: calc((100% - 15px) / 2);
        height: 230px;
    }

    .n-gallery__btn {
        top: 115px;
    }
}

@media (max-width: 600px) {
    .n-grid {
        grid-template-columns: 1fr;
    }

    .n-card__title {
        font-size: 18px;
    }

    .n-gallery__track img {
        flex-basis: 100%;
        width: 100%;
        height: 300px;
    }

    .n-gallery__btn {
        top: 150px;
    }
}
