
/* =========================================================
   PROGINSKY — ARTICLES PAGE
   ========================================================= */

:root {
    --articles-primary: #313849;
    --articles-primary-dark: #252b39;
    --articles-accent: #d37518;
    --articles-accent-hover: #b9610e;
    --articles-text: #313849;
    --articles-muted: #727987;
    --articles-bg: #ffffff;
    --articles-bg-soft: #f5f6f8;
    --articles-border: #e7e9ee;
    --articles-radius: 18px;
    --articles-container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--articles-bg);
    color: var(--articles-text);
    font-family: "Inter", "Arial", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.articles-page {
    min-height: 70vh;
}

.articles-page a,
.articles-header a {
    text-decoration: none;
}

.articles-page img {
    display: block;
    max-width: 100%;
}

/* =========================================================
   HEADER
   ========================================================= */

.articles-header {
    position: relative;
    z-index: 20;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid var(--articles-border);
}

.articles-header__container {
    max-width: var(--articles-container);
    min-height: 88px;
    margin: 0 auto;
    padding: 16px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.articles-header__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.articles-header__logo img {
    display: block;
    width: 145px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
}

.articles-header__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 26px;
}

.articles-header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;

    color: var(--articles-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;

    transition: color .2s ease;
}

.articles-header__link::after {
    content: "";
    position: absolute;
    bottom: 3px;
    left: 0;
    width: 100%;
    height: 2px;

    background: var(--articles-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .2s ease;
}

.articles-header__link:hover,
.articles-header__link--active {
    color: var(--articles-accent);
}

.articles-header__link:hover::after,
.articles-header__link--active::after {
    transform: scaleX(1);
}

.articles-header__phone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    padding: 12px 17px;
    border: 1px solid var(--articles-border);
    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;
    color: var(--articles-primary);
    white-space: nowrap;

    transition:
        border-color .2s ease,
        color .2s ease,
        background .2s ease;
}

.articles-header__phone:hover {
    color: var(--articles-accent);
    border-color: var(--articles-accent);
    background: #fffaf5;
}

/* =========================================================
   HERO
   ========================================================= */

.articles-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(
            115deg,
            #313849 0%,
            #252b39 100%
        );
}

.articles-hero__container {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;

    max-width: var(--articles-container);
    min-height: 360px;
    margin: 0 auto;
    padding: 72px 24px;
}

.articles-hero__content {
    position: relative;
    z-index: 2;
    max-width: 780px;
}

.articles-hero__label {
    display: inline-flex;
    align-items: center;

    margin-bottom: 24px;
    padding: 9px 15px;

    border: 1px solid rgba(211, 117, 24, .42);
    border-radius: 100px;
    background: rgba(211, 117, 24, .12);

    color: #f0a554;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.articles-hero__title {
    max-width: 760px;
    margin: 0 0 22px;

    color: #ffffff;
    font-size: clamp(36px, 4.4vw, 60px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.8px;
}

.articles-hero__subtitle {
    max-width: 630px;
    margin: 0;

    color: rgba(255, 255, 255, .76);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.75;
}

/* Decorative circles */

.articles-hero__decor {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.articles-hero__circle {
    position: absolute;
    display: block;
    border-radius: 50%;
}

.articles-hero__circle--1 {
    width: 390px;
    height: 390px;
    top: -180px;
    right: -105px;

    background: rgba(211, 117, 24, .14);
    border: 1px solid rgba(211, 117, 24, .18);
}

.articles-hero__circle--2 {
    width: 260px;
    height: 260px;
    right: 165px;
    bottom: -175px;

    border: 48px solid rgba(255, 255, 255, .045);
}

/* Orange accent stripe */

.articles-hero::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: var(--articles-accent);
}

/* =========================================================
   ARTICLES SECTION
   ========================================================= */

.articles {
    padding: 82px 24px 105px;
    background: var(--articles-bg-soft);
}

.articles__container {
    width: 100%;
    max-width: var(--articles-container);
    margin: 0 auto;
}

.articles__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 38px;
}

.articles__title {
    position: relative;
    margin: 0;
    padding-bottom: 17px;

    color: var(--articles-primary);
    font-size: clamp(27px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.7px;
}

.articles__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;

    width: 55px;
    height: 4px;
    border-radius: 10px;
    background: var(--articles-accent);
}

/* =========================================================
   ARTICLE GRID
   ========================================================= */

.articles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* =========================================================
   ARTICLE CARDS

   Supported class variants:
   .article-card
   .articles-card
   .articles__card
   ========================================================= */

.articles__grid :is(
    .article-card,
    .articles-card,
    .articles__card
) {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;

    background: #ffffff;
    border: 1px solid var(--articles-border);
    border-radius: var(--articles-radius);

    box-shadow: 0 4px 22px rgba(31, 41, 55, .035);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.articles__grid :is(
    .article-card,
    .articles-card,
    .articles__card
):hover {
    transform: translateY(-6px);
    border-color: rgba(211, 117, 24, .28);
    box-shadow: 0 18px 40px rgba(31, 41, 55, .11);
}

/* Image containers */

.articles__grid :is(
    .article-card__image,
    .articles-card__image,
    .articles__card-image,
    .article-card__picture,
    .article-card__img
) {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e9ebef;
}

/* Images */

.articles__grid :is(
    .article-card__image,
    .articles-card__image,
    .articles__card-image,
    .article-card__picture,
    .article-card__img
) img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.articles__grid :is(
    .article-card,
    .articles-card,
    .articles__card
):hover img {
    transform: scale(1.055);
}

/* Text content */

.articles__grid :is(
    .article-card__content,
    .article-card__body,
    .articles-card__content,
    .articles__card-content
) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;

    min-width: 0;
    padding: 25px;
}

/* Dates */

.articles__grid :is(
    .article-card__date,
    .articles-card__date,
    .articles__card-date
) {
    display: block;
    margin-bottom: 13px;

    color: var(--articles-muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

/* Article titles */

.articles__grid :is(
    .article-card__title,
    .articles-card__title,
    .articles__card-title
) {
    margin: 0 0 13px;

    color: var(--articles-primary);
    font-size: 20px;
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: -.3px;

    overflow-wrap: anywhere;
    transition: color .2s ease;
}

.articles__grid :is(
    .article-card,
    .articles-card,
    .articles__card
):hover :is(
    .article-card__title,
    .articles-card__title,
    .articles__card-title
) {
    color: var(--articles-accent);
}

/* Descriptions */

.articles__grid :is(
    .article-card__description,
    .article-card__intro,
    .articles-card__description,
    .articles__card-description
) {
    margin: 0 0 22px;

    color: var(--articles-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.75;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

/* Read more links */

.articles__grid :is(
    .article-card__more,
    .article-card__link,
    .articles-card__more,
    .articles__card-link
) {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: auto;

    color: var(--articles-accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;

    transition: color .2s ease;
}

.articles__grid :is(
    .article-card__more,
    .article-card__link,
    .articles-card__more,
    .articles__card-link
):hover {
    color: var(--articles-accent-hover);
}

/* Entire card as anchor */

.articles__grid > a:is(
    .article-card,
    .articles-card,
    .articles__card
) {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   PAGINATION — MODX pdoPage
   ========================================================= */

.articles__container > .pagination,
.articles__container > .page-nav,
.articles__container > .page-navigation,
.articles__container > nav.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 52px 0 0;
    padding: 0;
    list-style: none;
}

.articles__container .pagination li,
.articles__container .page-nav li {
    list-style: none;
}

.articles__container .pagination a,
.articles__container .pagination span,
.articles__container .page-nav a,
.articles__container .page-nav span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 43px;
    height: 43px;
    padding: 8px 13px;

    background: #ffffff;
    color: var(--articles-primary);

    border: 1px solid var(--articles-border);
    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease;
}

.articles__container .pagination a:hover,
.articles__container .page-nav a:hover {
    color: var(--articles-accent);
    border-color: var(--articles-accent);
}

.articles__container .pagination .active a,
.articles__container .pagination .active span,
.articles__container .page-nav .active a,
.articles__container .page-nav .active span,
.articles__container .pagination a.active {
    color: #ffffff;
    background: var(--articles-accent);
    border-color: var(--articles-accent);
}

.articles__container .pagination .disabled a,
.articles__container .pagination .disabled span {
    opacity: .4;
    pointer-events: none;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.articles__grid:empty {
    display: none;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.articles-header a:focus-visible,
.articles-page a:focus-visible {
    outline: 3px solid var(--articles-accent);
    outline-offset: 4px;
}

/* =========================================================
   TABLET — UP TO 1100px
   ========================================================= */

@media (max-width: 1100px) {

    .articles-header__container {
        flex-wrap: wrap;
        gap: 15px 24px;
    }

    .articles-header__nav {
        order: 3;
        width: 100%;
        justify-content: center;
        gap: 10px 28px;
    }

    .articles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .articles-hero__container {
        min-height: 330px;
    }
}

/* =========================================================
   MOBILE — UP TO 767px
   ========================================================= */

@media (max-width: 767px) {

    .articles-header__container {
        min-height: auto;
        padding: 14px 18px;
        gap: 12px;
    }

    .articles-header__logo img {
        width: 120px;
    }

    .articles-header__phone {
        padding: 10px 11px;
        font-size: 12px;
    }

    .articles-header__nav {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 22px;

        width: 100%;
        padding: 8px 0 3px;
        overflow-x: auto;
        overflow-y: hidden;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .articles-header__nav::-webkit-scrollbar {
        display: none;
    }

    .articles-header__link {
        min-height: 35px;
        font-size: 13px;
    }

    .articles-hero__container {
        min-height: 310px;
        padding: 57px 20px 62px;
    }

    .articles-hero__label {
        margin-bottom: 19px;
        padding: 8px 12px;
        font-size: 10px;
    }

    .articles-hero__title {
        margin-bottom: 18px;
        font-size: clamp(32px, 8vw, 43px);
        letter-spacing: -1px;
        line-height: 1.15;
    }

    .articles-hero__subtitle {
        font-size: 14px;
        line-height: 1.7;
    }

    .articles-hero__circle--1 {
        width: 280px;
        height: 280px;
        right: -185px;
        top: -100px;
    }

    .articles-hero__circle--2 {
        width: 160px;
        height: 160px;
        right: -40px;
        bottom: -95px;
        border-width: 30px;
    }

    .articles {
        padding: 54px 18px 75px;
    }

    .articles__head {
        margin-bottom: 28px;
    }

    .articles__title {
        font-size: 27px;
        padding-bottom: 15px;
    }

    .articles__grid {
        grid-template-columns: 1fr;
        gap: 21px;
    }

    .articles__grid :is(
        .article-card__content,
        .article-card__body,
        .articles-card__content,
        .articles__card-content
    ) {
        padding: 22px;
    }

    .articles__grid :is(
        .article-card__title,
        .articles-card__title,
        .articles__card-title
    ) {
        font-size: 19px;
    }

    .articles__container > .pagination,
    .articles__container > .page-nav {
        margin-top: 37px;
    }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 390px) {

    .articles-header__logo img {
        width: 105px;
    }

    .articles-header__phone {
        font-size: 11px;
        padding: 9px;
    }

    .articles-hero__title {
        font-size: 31px;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .articles-header *,
    .articles-page * {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}



/* ARTICLE CARD — LAYOUT FIX */

.articles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.articles__grid > * {
    min-width: 0;
    width: 100%;
}

.articles__grid .article-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
}

.articles__grid .article-card__content,
.articles__grid .article-card__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding: 24px;
}

.articles__grid .article-card__title,
.articles__grid .article-card__description,
.articles__grid .article-card__date {
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: normal;
    writing-mode: horizontal-tb;
}

.articles__grid .article-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.articles__grid .article-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1000px) {
    .articles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .articles__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* Карточки статей — вертикальное расположение */

.articles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.articles__grid .article-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.articles__grid .article-card__image {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100% !important;
    height: 230px !important;
    aspect-ratio: auto !important;
    overflow: hidden;
    background: #f1f2f5;
}

.articles__grid .article-card__image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center;
}

.articles__grid .article-card__content,
.articles__grid .article-card__body {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0;
    padding: 24px;
}

@media (max-width: 1000px) {
    .articles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .articles__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Исправление кликабельности навигации */

.articles-header {
    position: relative !important;
    z-index: 1000 !important;
    isolation: isolate;
    pointer-events: auto !important;
}

.articles-header__container {
    position: relative;
    z-index: 2;
}

.articles-header__nav {
    position: relative;
    z-index: 3;
    pointer-events: auto !important;
}

.articles-header__link,
.articles-header__logo,
.articles-header__phone {
    position: relative;
    z-index: 4;
    pointer-events: auto !important;
    cursor: pointer;
}

.articles-hero,
.articles-page {
    position: relative;
    z-index: 0;
}

.articles-hero__decor,
.articles-hero__circle {
    pointer-events: none !important;
}