/*
Theme Name: buhlerpro
Theme URI: https://buhler-ahs.pro/
Author: You
Description: Buhler Pro
Version: 1.0
*/

/* {
    outline: 1px solid red !important;
} */

* {
    font-family: 'Onest', Arial, sans-serif !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
} 

/* Базовый размер (≥1680px) */
body {
    font-size: 16px;
}

/* 1201px – 1679px */
@media (max-width: 1679px) {
    body {
        font-size: 15px;
    }
}

/* 768px – 1200px */
@media (max-width: 1200px) {
    body {
        font-size: 14px;
    }
}

/* ≤767px */
@media (max-width: 767px) {
    body {
        font-size: 13px;
    }
}

/* Все ссылки */
a {
    color: #2e528b;
    text-decoration: none;
}

a:hover {
    color: #1a3a5e;
    text-decoration: underline;
}



/* Если нужно исключить кнопки или другие элементы */
.button a,
.btn a,
.custom-btn a {
    color: inherit; /* или другой цвет */
}


.my-related-block {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}


/* Сетка для 3 колонок */
ul.my-related-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 40px 0 0 !important;
}

/* Карточка поста */
li.my-related-post {
    width: 100% !important;
}

.my-post-wrapper {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    background: transparent !important;
}

/* Блок с картинкой */
.my-post-imgwrapper {
    aspect-ratio: 1.3 !important;
    margin-bottom: 20px !important;
    overflow: hidden !important;
}

.my-post-bgimg {
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    border-radius: 20px !important;
    transition: transform 0.4s !important;
}

.my-post-bgimg:hover {
    transform: scale(1.05) !important;
}

/* Заголовок */
.my-post-title {
    font-size: 16px !important;
    color: #2e528b !important;
    font-family: 'Onest', sans-serif !important;
    text-transform: uppercase !important;
    line-height: 1.35 !important;
    margin-bottom: 10px !important;
}

.my-post-title a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Кнопка */
.my-post-button {
    margin-top: auto !important;
}

.my-btn {
    display: inline-flex !important;
    padding: 7px 15px !important;
    border: 1px solid #2e528b !important;
    border-radius: 20px !important;
    background: #2e528b !important;
    color: #fff !important;
    font-family: 'Onest', sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.my-btn:hover {
    background: #fff !important;
    color: #2e528b !important;
}









/* Специальный стиль созданный для выравниание бага */

.price-list .t396__elem {
    position: relative !important;
    top: auto !important;
    left: auto !important;
}









/* корректировки поверх блоков и стилей */

.t-feed__button-readmore .t-btn.t-btnflex.t-btnflex_type_button {
    color: #ffffff !important;
    background-color: #2e528b !important;
    border: 1px solid #2e528b !important;
    border-radius: 20px !important;
}

.t-feed__post-title a {
    text-decoration: none !important;
    border-bottom: none !important;
}

.js-feed-post {
    cursor: pointer;
}

/* Заголовки в контенте статей */
.tilda-page-wrapper h1,
.tilda-page-wrapper h2,
.tilda-page-wrapper h3 {
    color: #2e528b; /* твой синий */
}








/* На проверку после перезаписи */

.t-feed__post-title {
    font-size: 16px;
    color: #2e528b;
    font-family: 'Onest';
    font-weight: 400;
    text-transform: uppercase;
}

.t-feed__post-descr {
    font-size: 16px;
    line-height: 1.25;
    color: #272727;
    font-family: 'Onest';
    font-weight: 300;
    margin-top: 8px;
}

.t-feed__button-readmore .t-btn.t-btnflex.t-btnflex_type_button {
    color: #ffffff !important;
    background-color: #2e528b !important;
    border: 1px solid #2e528b !important;
    border-radius: 20px !important;
    transition: all 0.2s ease-in-out !important;
}

.t-feed__button-readmore .t-btn.t-btnflex.t-btnflex_type_button:hover {
    color: #2e528b !important;
    background-color: #ffffff !important;
    border: 1px solid #2e528b !important;
}






/* Стили для контента из редактора */
.tn-atom p,
.tn-atom h1, 
.tn-atom h2, 
.tn-atom h3, 
.tn-atom h4 {
    margin-top: 1em;
    margin-bottom: 1em;
}

.tn-atom p:first-child,
.tn-atom h1:first-child,
.tn-atom h2:first-child,
.tn-atom h3:first-child,
.tn-atom h4:first-child {
    margin-top: 0;
}

.tn-atom p:last-child,
.tn-atom h1:last-child,
.tn-atom h2:last-child,
.tn-atom h3:last-child,
.tn-atom h4:last-child {
    margin-bottom: 0;
}



/* ===== !!!!!!!!!!! Набор классов для приведения верстки сайта из положения абсолют и фиксированной высоты в потоковую верстку !!!!!!!!!!!! =====  */

/* Компаунд селекторы */
.t396__elem.adecvat-self,
.tn-atom.adecvat-self,
.t396__carrier.adecvat-self,
.t396__filter.adecvat-self,
.t396.adecvat-self,
.t-feed__post.adecvat-self,
.t-feed__container.adecvat-self,
.t-store__card.adecvat-self,
.t-records.adecvat-self,
.t-col.adecvat-self,
.t-row.adecvat-self {
   position: relative !important;
height: auto !important;
left: auto !important;
top: auto !important;
right: auto !important;
bottom: auto !important;
z-index: auto !important;
}

/* Селектор по родителю */
.adecvat-parent .t396__carrier,
.adecvat-parent .t396__filter,
.adecvat-parent .t396__elem,
.adecvat-parent  .tn-atom,
.adecvat-parent  .t396__carrier,
.adecvat-parent .t396__filter,
.adecvat-parent  .t396,
.adecvat-parent .t-feed__post,
.adecvat-parent .t-feed__container,
.adecvat-parent .t-store__card,
.adecvat-parent .t-records,
.adecvat-parent .t-col,
.adecvat-parent .t-row  {
position: relative !important;
height: auto !important;
left: auto !important;
top: auto !important;
right: auto !important;
bottom: auto !important;
z-index: auto !important;
}

/* Особый случай */
.t396__artboard.adecvat-parent {
    height: auto !important;
    width: 100% !important;
}

/* ===== Набор классов для приведения верстки сайта из положения абсолют и фиксированной высоты в потоковую верстку END ===== */


/* Базовые стили текста */
.t-text-base {
    font-family: 'Onest', Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

.t-text-title {
    font-family: 'Onest', Arial, sans-serif !important;
    font-size: 36px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    color: #2e528b !important;
    margin-bottom: 20px !important;
}

.t-text-subtitle {
    font-family: 'Onest', Arial, sans-serif !important;
    font-size: 24px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
    color: #2e528b !important;
}

.t-text-small {
    font-family: 'Onest', Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: #666 !important;
}

.t-text-uppercase {
    font-family: 'Onest', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #2e528b !important;
}

.t-text-uppercase-xl {
    font-family: 'Onest', Arial, sans-serif !important;
    font-size: 64px !important;
    line-height: 1.3 !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
}




/* 768px */
@media screen and (max-width: 768px) {
    .t-text-title {
        font-size: 28px !important;
    }
    .t-text-subtitle {
        font-size: 20px !important;
    }
    .t-text-base {
        font-size: 15px !important;
    }
    .t-text-small {
        font-size: 13px !important;
    }
    .t-text-uppercase {
        font-size: 13px !important;
    }
    .t-text-uppercase-xl {
        font-size: 48px !important;
    }
    .largetitle {
        font-size: 28px !important;
        padding-bottom: 25px !important;
    }
}

/* 480px */
@media screen and (max-width: 480px) {
    .t-text-title {
        font-size: 24px !important;
    }
    .t-text-subtitle {
        font-size: 18px !important;
    }
    .t-text-base {
        font-size: 14px !important;
    }
    .t-text-small {
        font-size: 12px !important;
    }
    .t-text-uppercase {
        font-size: 12px !important;
    }
    .t-text-uppercase-xl {
        font-size: 36px !important;
    }
    .largetitle {
        font-size: 24px !important;
        padding-bottom: 20px !important;
    }
    
}






/* Добавочные стили к верстке */
.largetitle {
color: #2e528b;
font-size: 36px;
font-family: 'Onest',Arial,sans-serif;
line-height: 1.25;
font-weight: 400;
text-transform: uppercase;
padding-bottom: 30px;
}

.component-text {
    margin-bottom: 20px;
}

.t760 .product-content p {
    margin-block-start: 0 !important;
    margin-block-end: 20px !important;
    margin-bottom: 20px !important;
}

/* ==== Отступы после параграфов, глобально для сайта ==== */


p {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    margin-block-start: 0 !important;
    margin-block-end: 20px !important;
}

h1 {
    margin-bottom: 20px !important;
}



/* ==== Базовые ==== */

.w-auto { width: auto !important; }
.w-full { width: 100% !important; }
.h-auto { height: auto !important; }
.h-full { height: 100% !important; }
.max-w-full { max-width: 100% !important; }
.overflow-hidden { overflow: hidden !important; }



/* ==== Марджини ==== */
.m-0 { margin: 0 !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-30 { margin-bottom: 30px !important; }
.mb-40 { margin-bottom: 40px !important; }
.mb-50 { margin-bottom: 50px !important; }
.mb-60 { margin-bottom: 60px !important; }
.mb-100 { margin-bottom: 100px !important; }



.mt-10 { margin-top: 10px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-30 { margin-top: 30px !important; }
.mt-40 { margin-top: 40px !important; }
.mt-100 { margin-top: 100px !important; }


/* Отрицательные марджины */
.mt-n10 { margin-top: -10px !important; }
.mt-n20 { margin-top: -20px !important; }
.mt-n30 { margin-top: -30px !important; }
.mt-n40 { margin-top: -40px !important; }

.mb-n10 { margin-bottom: -10px !important; }
.mb-n20 { margin-bottom: -20px !important; }
.mb-n30 { margin-bottom: -30px !important; }
.mb-n40 { margin-bottom: -40px !important; }

.ml-n10 { margin-left: -10px !important; }
.ml-n20 { margin-left: -20px !important; }
.ml-n30 { margin-left: -30px !important; }
.ml-n40 { margin-left: -40px !important; }

.mr-n10 { margin-right: -10px !important; }
.mr-n20 { margin-right: -20px !important; }
.mr-n30 { margin-right: -30px !important; }
.mr-n40 { margin-right: -40px !important; }


/* Общие паддинги (со всех сторон) */
.p-0 { padding: 0 !important; }
.p-20 { padding: 20px !important; }
.p-40 { padding: 40px !important; }
.p-90 { padding: 90px !important; }

/* Горизонтальные паддинги */
.px-20 { 
    padding-left: 20px !important; 
    padding-right: 20px !important; 
}
.px-40 { 
    padding-left: 40px !important; 
    padding-right: 40px !important; 
}
.px-90 { 
    padding-left: 90px !important; 
    padding-right: 90px !important; 
}

/* Вертикальные паддинги */
.pt-40 { padding-top: 40px !important; }
.pb-40 { padding-bottom: 40px !important; }
.pt-20 { padding-top: 20px !important; }
.pb-20 { padding-bottom: 20px !important; }

.py-20 { 
    padding-top: 20px !important; 
    padding-bottom: 20px !important; 
}
.py-40 { 
    padding-top: 40px !important; 
    padding-bottom: 40px !important; 
}

/* ==== Флексы ==== */
.flex { display: flex !important; }
.flex-row { flex-direction: row !important; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }

.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.items-stretch { align-items: stretch !important; }

/* Горизонтальные гапы (только column-gap) */
.gap-x-10 {
    column-gap: 10px !important;
    row-gap: 0 !important;
}
.gap-x-20 {
    column-gap: 20px !important;
    row-gap: 0 !important;
}
.gap-x-30 {
    column-gap: 30px !important;
    row-gap: 0 !important;
}
.gap-x-40 {
    column-gap: 40px !important;
    row-gap: 0 !important;
}

/* Вертикальные гапы (только row-gap) */
.gap-y-10 {
    row-gap: 10px !important;
    column-gap: 0 !important;
}
.gap-y-20 {
    row-gap: 20px !important;
    column-gap: 0 !important;
}
.gap-y-30 {
    row-gap: 30px !important;
    column-gap: 0 !important;
}
.gap-y-40 {
    row-gap: 40px !important;
    column-gap: 0 !important;
}

/* Универсальные (обе стороны) */
.gap-10 { gap: 10px !important; }
.gap-20 { gap: 20px !important; }
.gap-30 { gap: 30px !important; }
.gap-40 { gap: 40px !important; }
.gap-50 { gap: 50px !important; }
.gap-60 { gap: 60px !important; }

/* ==== Сетка ==== */
.col-1 { width: 8.333% !important; }
.col-2 { width: 16.666% !important; }
.col-3 { width: 25% !important; }
.col-4 { width: 33.333% !important; }
.col-5 { width: 41.666% !important; }
.col-6 { width: 50% !important; }
.col-7 { width: 58.333% !important; }
.col-8 { width: 66.666% !important; }
.col-9 { width: 75% !important; }
.col-10 { width: 83.333% !important; }
.col-11 { width: 91.666% !important; }
.col-12 { width: 100% !important; }

/* ==== Текст ==== */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-bold { font-weight: 700 !important; }

.text-12 { font-size: 12px !important; }
.text-14 { font-size: 14px !important; }
.text-16 { font-size: 16px !important; }
.text-18 { font-size: 18px !important; }
.text-20 { font-size: 20px !important; }
.text-24 { font-size: 24px !important; }
.text-30 { font-size: 30px !important; }
.text-36 { font-size: 36px !important; }

/* ==== Цвета ==== */
.color-white { color: #ffffff !important; }
.color-black { color: #000000 !important; }
.color-gray { color: #666666 !important; }
.color-blue { color: #2e528b !important; }
.color-darkblue { color: #1a3a5e !important; }

.bg-white { background-color: #ffffff !important; }
.bg-gray { background-color: #f5f5f5 !important; }
.bg-blue { background-color: #2e528b !important; }

/* ==== Границы и скругления ==== */
.rounded-10 { border-radius: 10px !important; }
.rounded-20 { border-radius: 20px !important; }
.rounded-30 { border-radius: 30px !important; }
.rounded-full { border-radius: 9999px !important; }

/* ==== Позиционирование ==== */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.static { position: static !important; }

/* ==== Отображение ==== */
.block { display: block !important; }
.inline-block { display: inline-block !important; }
.hidden { display: none !important; }

/* ==== Контейнеры ==== */
.container-1280 {
    width: 100% !important;
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.container-1680 {
    width: 100% !important;
    max-width: 1680px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.container-1180 {
    width: 100% !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

.container-fluid {
    width: 100% !important;
}

/* ==== Цвета ==== */

.w-360 { width: 360px !important; }


/* ==== Кнопки ==== */


.buh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #2e528b;
    color: #ffffff !important;
    border: 1px solid #2e528b;
    border-radius: 30px;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Onest', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

.buh-btn:hover {
    background-color: transparent;
    color: #2e528b !important;
    border-color: #2e528b;
}

/* Фиксированная ширина 180px */

.buh-btn-w-180 {
    width: 180px;
    padding: 12px 0;
}

.buh-btn-w-160 {
    width: 160px;
    padding: 12px 0;
}

/* Авто-ширина (по содержимому) */

.buh-btn-hug {
    width: auto;
    padding: 12px 25px;
}

.buh-btn-text-large {
    font-size: 18px;
    font-weight: 400;
}

.buh-btn-text-medium {
    font-size: 14px;
    font-weight: 400;
}

.buh-btn-text-small {
    font-size: 13px;
    font-weight: 600;
}


/* ------- СТИЛИ АНИМАЦИЙ ---------- */


.stagger-container {
    --stagger-delay: 0.1s;
}

.stagger-container > * {
    animation-delay: calc(var(--stagger-item-index, 0) * var(--stagger-delay));
}

/* Анимация при появлении вьюпорта */
.stagger-container.scroll-fade-up > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: calc(var(--stagger-item-index, 0) * 0.1s);
}

.stagger-container.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Автоматический стаггер на основе индекса */
.scroll-fade-up {
    transition-delay: calc((var(--stagger-index, 1) - 1) * 0.15s);
}

.scroll-fade-left,
.scroll-fade-right,
.scroll-zoom-in {
    transition-delay: calc((var(--stagger-index, 1) - 1) * 0.15s);
}

/* Базовые анимации появления */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-up {
    animation: fadeUp 0.8s ease forwards;
}

.animate-fade-down {
    animation: fadeDown 0.8s ease forwards;
}

.animate-fade-left {
    animation: fadeLeft 0.8s ease forwards;
}

.animate-fade-right {
    animation: fadeRight 0.8s ease forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.8s ease forwards;
}

/* Анимации с задержками */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }

/* Анимации для появления при скролле (через Intersection Observer) */
.scroll-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Ключевые кадры для анимаций */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Анимации для внутренних элементов карточки */
.stagger-child > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: calc(var(--child-index, 0) * 0.1s);
}

.stagger-child.visible > * {
    opacity: 1;
    transform: translateY(0);
}





/* Анимация для элементов с CSS-переменной --item-index */
.buh-exhibition-card [style*="--item-index"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: calc(var(--item-index) * 0.15s);
}

.buh-exhibition-card.scroll-fade-up.visible [style*="--item-index"] {
    opacity: 1;
    transform: translateY(0);
}




/* ---- ОФОРМЛЕНИЕ ГАЛЕРЕИ ------ */

/* Отступы между картинками */
.wp-block-gallery.has-nested-images {
    gap: 20px !important;
}

/* Скругление углов для контейнеров картинок */
.wp-block-gallery.has-nested-images .wp-block-image {
    border-radius: 20px !important;
    overflow: hidden;
}

/* Скругление для самих изображений (на всякий случай) */
.wp-block-gallery.has-nested-images img {
    border-radius: 12px !important;
}

/* Для планшетов */
@media (min-width: 768px) {
    .wp-block-gallery.has-nested-images {
        gap: 30px !important;
    }
}

/* Для десктопов */
@media (min-width: 1024px) {
    .wp-block-gallery.has-nested-images {
        gap: 40px !important;
    }
}

/* ---- ДОП КЛАСС ДЛЯ РЕДАКТИРОВАНИЯ КОЛОНОК (надо прописывать в поле additional clases в редактировании выбранной галереи в редакторе, видно тильдовские стили перебивают, поэтому класс columns-4 из ВП спорит и не применяется) ------ */


/* ГАЛЕРЕЯ — 2 КОЛОНКИ */
.my-gallery-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
}

/* ГАЛЕРЕЯ — 3 КОЛОНКИ */
.my-gallery-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

/* ГАЛЕРЕЯ — 4 КОЛОНКИ */
.my-gallery-4 {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

/* ГАЛЕРЕЯ — 5 КОЛОНОК */
.my-gallery-5 {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px !important;
}

/* ГАЛЕРЕЯ — 6 КОЛОНОК */
.my-gallery-6 {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 20px !important;
}

/* ГАЛЕРЕЯ — 7 КОЛОНОК */
.my-gallery-7 {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 20px !important;
}

/* ГАЛЕРЕЯ — 8 КОЛОНОК */
.my-gallery-8 {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 20px !important;
}

/* ОБЩИЕ ПРАВИЛА ДЛЯ ВСЕХ ГАЛЕРЕЙ С МОИМИ КЛАССАМИ */
[class*="my-gallery-"] .wp-block-image {
    width: 100% !important;
    margin: 0 !important;
}

/* АДАПТИВ: на узких экранах уменьшаем кол-во колонок */
@media (max-width: 1024px) {
    [class*="my-gallery-"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    [class*="my-gallery-"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    [class*="my-gallery-"] {
        grid-template-columns: 1fr !important;
    }
}



/* ---- СКРУГЛЕНИЕ ДЛЯ ВСЕХ КАРТИНОК В КОНТЕНТЕ ------ */
.entry-content img,
.wp-block-image img,
.wp-block-media-text img,
.wp-block-cover img,
.wp-block-group img,
.page-content img,
.post-content img,
.t-bgimg,
.tn-atom__img {
    border-radius: 20px !important;
    overflow: hidden;
}