/* Общие стили */
body {
    padding: 0px;
    margin: 0px;
    font-family: Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    width: calc(100vw - var(--scrollbar-width));
    background: #ffffff;
    font-size: 18px;
}

/* Стили для скроллбара */
html {
    scroll-padding-top: 0 !important;
    --wp-admin--admin-bar--height: 0 !important;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

h2 {
    margin-block-start: 0px!important;
    margin-block-end: 0px!important;
    font-weight: bold;
    unicode-bidi: isolate;
}

.container {
    margin: 0 auto;
    padding: 0 16px;
}


/* Шапка сайта */
.site-header .topbar {
    width: 100%;
    height: 40px;
    background-color: #692424;
    box-shadow: 0px 5px 4px rgba(0, 0, 0, 0.25);
}

.topbar__inner {
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
}

.topbar__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

a.topbar__left {
    text-decoration: none;
}

.topbar__site-icon {
    height: 28px;
    width: auto;
    display: block;
}

.topbar__site-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__middle {
    margin-left: auto;
    margin-right: 16px;
    flex: 0 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
}

.topbar__right {
    display: flex;
    align-items: center;
    height: 100%;
}

.topbar__auth {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    box-sizing: border-box;
    height: 30px;
    border-left: 2px solid #968B8B;
    border-right: 2px solid #968B8B;
}

.topbar__auth-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50px;
    object-fit: cover;
    display: block;
}

.topbar__auth-name,
.topbar__auth-login-text {
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}

.topbar__nav {
    margin: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.topbar__menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    height: 100%;
    align-items: center;
}

.topbar__menu li {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.topbar__menu a {
    color: #ffffff;
    font-size: 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
    font-weight: 600;
}

.topbar__menu a:hover {
    text-decoration: underline;
}

.topbar__menu-link-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar__menu-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    object-fit: contain;
}

.topbar__menu-text {
    display: inline-block;
    line-height: 1;
}

.topbar__burger {
    display: none;
    margin-left: auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.topbar__burger span {
    position: absolute;
    left: 50%;
    width: 22px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
    transform: translateX(-50%);
    transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.topbar__burger span:nth-child(1) {
    top: 11px;
}

.topbar__burger span:nth-child(2) {
    top: 18px;
}

.topbar__burger span:nth-child(3) {
    top: 25px;
}

.topbar__burger.topbar__burger--active span:nth-child(1) {
    top: 18px;
    transform: translateX(-50%) rotate(45deg);
}

.topbar__burger.topbar__burger--active span:nth-child(2) {
    opacity: 0;
}

.topbar__burger.topbar__burger--active span:nth-child(3) {
    top: 18px;
    transform: translateX(-50%) rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu__overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-menu__panel {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 290px;
    max-width: 80%;
    background-color: #692424;
    color: #ffffff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px 10px 20px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.mobile-menu--open {
    pointer-events: auto;
    opacity: 1;
}

.mobile-menu--open .mobile-menu__panel {
    transform: translateX(0);
}

.mobile-menu__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding-right: 40px;
}

.mobile-menu__user {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mobile-menu__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.mobile-menu__user-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.mobile-menu__name {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.mobile-menu__logout-link {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.mobile-menu__logout-link:hover {
    text-decoration: underline;
    color: #ffffff;
}

.mobile-menu__close {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-menu__nav {
    margin-top: 24px;
}

.mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu__item {
    margin: 0;
    padding: 0;
}

.mobile-menu__link {
    color: #ffffff;
    font-size: 18px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.mobile-menu__link-text {
    display: inline-block;
}

.mobile-menu__list a {
    color: #ffffff;
    font-size: 18px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.mobile-menu__list a:hover {
    text-decoration: underline;
}

.mobile-menu__list .topbar__menu-link-inner {
    gap: 10px;
}

.mobile-menu__list .topbar__menu-icon {
    width: 20px;
    height: 20px;
}

body.mobile-menu-open {
    overflow: hidden;
}

body.admin-bar .mobile-menu__panel {
    padding-top: 10px;
}

/* ===========================
   Главный слайдер (Главная)
   =========================== */

.home-slider {
    position: relative;
    width: 100%;
    height: min(600px, 60vh);
    overflow: hidden;
    background: #000000;
}

.home-slider__inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.home-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

/* Затемнение изображения */
.home-slider__slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

.home-slider__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.home-slider__bg {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
}

.home-slider__content {
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 65px;
    text-align: center;
    box-sizing: border-box;
}

.home-slider__title {
    margin: 0;
    color: #ffffff;
    font-weight: 700;
    font-size: clamp(22px, 4vw, 38px);
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.home-slider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.home-slider__arrow--prev {
    left: 20px;
}

.home-slider__arrow--next {
    right: 20px;
}

.home-slider__arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
}

.home-slider__arrow:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}


h2.home-articles__title {
    text-align: center;
    color: #6B1323;
    margin: 15px 0px!important;
    font-size: clamp(22px, 4vw, 26px);
}


.home-articles__title {
    margin-top: 40px;
    margin-bottom: 24px;
    font-size: 24px;
    line-height: 1.3;
    font-weight: 700;
    color: #111111;
}

.home-articles__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.home-article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 15px;
    background-color: #ffffff;
    text-decoration: none;
    box-shadow: 0 8px 18px rgb(15 35 52 / 22%);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 35, 52, 0.12);
}

.home-article-card__image-wrapper {
    width: 100%;
    height: 190px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    background-color: #f1f3fb;
}

.home-article-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.home-article-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px 14px 16px;
}

.home-article-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.3;
    color: #777777;
}

.home-article-card__category {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-article-card__date {
    flex-shrink: 0;
    white-space: nowrap;
}

.home-article-card__title {
    margin: 0;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.35;
    color: #111111;
}

.home-article-card__excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
}

.home-article-card__footer {
    margin-top: auto;
    padding-top: 12px;
}

.home-article-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    background-color: #692424;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
    text-decoration: none;
}

.home-articles__more {
    margin: 5px 0px 15px 0px;
    text-align: center;
}

.home-articles__more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 26px;
    border-radius: 999px;
    background-color: #692424;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home-articles__more-button:hover {
    background-color: #692424;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 35, 52, 0.12);
}

main.index_text {
    text-align: justify;
    max-width: 1600px;
    padding: 0px 10px;
    margin: 0 auto;
}

main.index_text h1 {
    text-align: center;
    font-size: clamp(22px, 4vw, 30px);
}




















@media (max-width: 1500px) {
    .home-articles__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1035px) {
    .topbar__middle,
    .topbar__right {
        display: none;
    }

    .topbar__burger {
        display: block;
    }

    .mobile-menu__name {
        font-size: 16px;
    }

    .mobile-menu__list a {
        font-size: 17px;
    }

    .mobile-menu__nav {
        margin: 24px 0px 0px 7px;
    }

    .home-articles__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    main.index_text {
        text-align: left;
    }
}

@media (max-width: 800px) {
    .topbar__inner {
        gap: 8px;
    }

    .topbar__site-title {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .home-articles__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .topbar__auth-name {
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-slider {
        height: min(400px, 55vh);
    }

    .home-slider__content {
        padding: 20px 55px;
    }

    .home-slider__arrow {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}
