.nofollow,
.ajax-info-link {
  cursor: pointer;
  text-decoration: underline;
}
.nofollow:hover,
.ajax-info-link:hover,
.ajax-info-link.btn {
  text-decoration: none;
}

.article-preview__title {
  text-align: left;
  line-height: 1.25em;
}

.article-content._inner:first-child,
.article-content._inner + .article-content._inner {
	padding-bottom: 5.5rem
}

@media (min-width:768px) {
	.article-content._inner:first-child,
	.article-content._inner + .article-content._inner {
		padding-top: 3rem
	}
}

@media (min-width: 1280px) {
  .header__nav-item:nth-child(n + 5) {
    display: none;
  }
  
  .article-content._inner:first-child,
  .article-content._inner + .article-content._inner {
		padding-top: 2rem
	}
}

/* --- RESET RADIO TO LOOK LIKE CHECKBOX --- */

/* 1. Force Square Borders (Override 50% radius) */
.checkbox._as-checkbox input[type="radio"] + .checkbox__content .checkbox__marker {
    border-radius: .4rem !important;
}

/* 2. REMOVE THE RADIO DOT (The Blue Circle) */
.checkbox._as-checkbox input[type="radio"] + .checkbox__content .checkbox__marker:before {
    content: none !important;
    display: none !important;
}

/* 3. SHOW THE SVG (Checkmark) */
/* By default, your CSS likely hides SVGs inside radios or doesn't style them. We copy the checkbox SVG styles here. */
.checkbox._as-checkbox input[type="radio"] + .checkbox__content .checkbox__marker svg {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.8rem;
    height: 1.8rem;
    margin: -.9rem 0 0 -.9rem;
    color: var(--white);
    opacity: 0;
    transform: scale(0);
    transition: all .2s ease 0s;
}

/* --- CHECKED STATES --- */

/* 4. Checked: Fill Background Blue */
.checkbox._as-checkbox input[type="radio"]:checked + .checkbox__content .checkbox__marker {
    background-color: var(--blue);
    border-color: var(--blue);
    opacity: 1;
}

/* 5. Checked: Show SVG */
.checkbox._as-checkbox input[type="radio"]:checked + .checkbox__content .checkbox__marker svg {
    opacity: 1;
    transform: scale(1);
}

/* Infotable */
/* Базовые стили для текстового блока */
.infopage .rte table,
.rte table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    font-size: 15px;
    line-height: 1.6;
}

/* Заголовки таблицы */
.infopage .rte table th,
.rte table th {
    background: linear-gradient(135deg, #f8f6f3 0%, #ede8e3 100%);
    color: #2d3748;
    font-weight: 600;
    text-align: left;
    padding: 16px 20px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #d4cfc7;
}

/* Ячейки таблицы */
.infopage .rte table td,
.rte table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0ebe5;
    vertical-align: top;
}

/* Чередующиеся строки */
.infopage .rte table tr:nth-child(even),
.rte table tr:nth-child(even) {
    background-color: #fafaf8;
}

/* Hover эффект для строк */
.infopage .rte table tbody tr:hover,
.rte table tbody tr:hover {
    background-color: #f5f3f0;
    transition: background-color 0.2s ease;
}

/* Последняя строка без нижней границы */
.infopage .rte table tr:last-child td,
.rte table tr:last-child td {
    border-bottom: none;
}

/* Первый столбец (заголовки строк) */
.infopage .rte table td:first-child,
.rte table td:first-child {
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #c4b5a0 0%, #a89985 100%);
    width: 30%;
}

.infopage .rte table tr:hover td:first-child,
.rte table tr:hover td:first-child {
    background: linear-gradient(135deg, #b8a692 0%, #9d8978 100%);
}

/* КРИТИЧНО: Отключаем старые стили для списков внутри таблицы */
.infopage .rte table ul li:before,
.rte table ul li:before {
    content: "—" !important;
    display: inline !important;
    position: absolute !important;
    left: 0 !important;
    color: #2d3748 !important;
    font-weight: 600 !important;
    width: auto !important;
    height: auto !important;
    background-color: transparent !important;
    margin: 0 !important;
    border-radius: 0 !important;
    vertical-align: baseline !important;
}

/* Списки внутри ячеек */
.infopage .rte table ul,
.rte table ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.infopage .rte table ul li,
.rte table ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.infopage .rte table ul li:last-child,
.rte table ul li:last-child {
    margin-bottom: 0;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .infopage .rte table,
    .rte table {
        font-size: 14px;
    }
    
    .infopage .rte table th,
    .rte table th,
    .infopage .rte table td,
    .rte table td {
        padding: 12px 15px;
    }
    
    .infopage .rte table,
    .rte table,
    .infopage .rte table thead,
    .rte table thead,
    .infopage .rte table tbody,
    .rte table tbody,
    .infopage .rte table tr,
    .rte table tr,
    .infopage .rte table th,
    .rte table th,
    .infopage .rte table td,
    .rte table td {
        display: block;
        width: 100%;
    }
    
    .infopage .rte table thead tr,
    .rte table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .infopage .rte table tr,
    .rte table tr {
        margin-bottom: 15px;
        border: 1px solid #f0ebe5;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .infopage .rte table td,
    .rte table td {
        border: none;
        border-bottom: 1px solid #f0ebe5;
        position: relative;
        padding-left: 40%;
        text-align: left;
    }
    
    .infopage .rte table td:before,
    .rte table td:before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: #2d3748;
    }
    
    .infopage .rte table td:first-child,
    .rte table td:first-child {
        background: linear-gradient(135deg, #c4b5a0 0%, #a89985 100%);
        color: #fff;
        width: 100%;
    }
    
    .infopage .rte table ul li,
    .rte table ul li {
        padding-left: 20px;
    }
}
/* END.Infotable */

/* Fancybox Popup */
/* === FANCYBOX AJAX POPUP STYLES === */

/* Фон с плавным появлением/исчезновением */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__backdrop {
    background: rgba(24, 24, 27, 0.92) !important;
    transition: opacity 0.25s ease !important;
}

/* Плавная анимация для контейнера */
.fancybox__container:has(.fancybox__slide.has-ajax) {
    transition: opacity 0.25s ease !important;
}

/* Убираем лишние анимации, оставляем только opacity */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__carousel,
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__slide {
    animation: none !important;
    transition: none !important;
}

/* Слайд */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__slide {
    padding: 2rem;
}

/* Контент с плавным появлением */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content {
    padding: 5rem 2rem 3rem 2rem; /* Увеличен верхний отступ для кнопки */
    background: var(--white);
    border-radius: 2rem;
    box-shadow: 0 8px 24px #8187bd26;
    max-width: 90rem;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content {
        max-width: 80rem;
        max-height: 80vh;
        padding: 5rem 5rem 4rem 5rem;
    }
}

@media (min-width: 1200px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content {
        max-width: 70rem;
        max-height: 75vh;
    }
}

/* Кнопка закрытия - FIXED в правом верхнем углу */
.fancybox__container:has(.fancybox__slide.has-ajax) .ajax-popup-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    padding: 0;
}

.fancybox__container:has(.fancybox__slide.has-ajax) .ajax-popup-close:hover {
    background: #eee;
}

.fancybox__container:has(.fancybox__slide.has-ajax) .ajax-popup-close svg {
    width: 2.4rem;
    height: 2.4rem;
    color: var(--text-color, #333);
}

/* Скрываем стандартную кнопку Fancybox */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__button--close {
    display: none !important;
}

/* Заголовки */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h1,
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h2 {
    font-size: 2.4rem;
    line-height: 1.2;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    color: var(--text-color);
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h1,
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h2 {
        font-size: 2.8rem;
        margin: 0 0 2rem 0;
    }
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h3 {
    font-size: 2rem;
    line-height: 1.3;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: var(--text-color);
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h3 {
        font-size: 2.2rem;
        margin: 2.5rem 0 1.5rem 0;
    }
}

/* Текст */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content p,
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content .rte {
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content p,
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content .rte {
        font-size: 1.5rem;
        line-height: 1.7;
    }
}

/* Списки */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content ul,
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content ol {
    font-size: 1.4rem;
    line-height: 1.6;
    margin: 1rem 0;
    padding-left: 2rem;
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content ul,
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content ol {
        font-size: 1.5rem;
        line-height: 1.7;
    }
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content ul li,
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content ol li {
    margin-bottom: 0.8rem;
}

/* Таблицы */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content table {
    font-size: 1.3rem;
    margin: 2rem 0;
    width: 100%;
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content table {
        font-size: 1.4rem;
    }
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content table th {
    font-size: 1.2rem;
    padding: 1.2rem 1.5rem;
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content table th {
        font-size: 1.3rem;
        padding: 1.4rem 1.8rem;
    }
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content table td {
    padding: 1.2rem 1.5rem;
}

@media (min-width: 768px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content table td {
        padding: 1.4rem 1.8rem;
    }
}

/* Скроллбар */
.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content::-webkit-scrollbar {
    width: 8px;
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Адаптив */
@media (max-width: 767px) {
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__slide {
        padding: 1rem;
    }
    
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content {
        padding: 4.5rem 1.5rem 3rem 1.5rem;
        max-height: 90vh;
        border-radius: 1.5rem;
    }
    
    .fancybox__container:has(.fancybox__slide.has-ajax) .ajax-popup-close {
        width: 3.5rem;
        height: 3.5rem;
        top: 1rem;
        right: 1rem;
    }
    
    .fancybox__container:has(.fancybox__slide.has-ajax) .ajax-popup-close svg {
        width: 2rem;
        height: 2rem;
    }
    
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h1,
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content h2 {
        font-size: 2rem;
        margin: 0 0 1.2rem 0;
    }
    
    .fancybox__container:has(.fancybox__slide.has-ajax) .fancybox__content::-webkit-scrollbar {
        width: 4px;
    }
}

/* === КОНЕЦ FANCYBOX AJAX POPUP STYLES === */
/* END.Fancybox Popup */