.menu-btn.font-bold {
    font-weight: bold;
}

.tabs-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.tabs-pk {
    display: flex;
    margin: 20px 0;
    /*position: sticky;*/
    top: 0;
    z-index: 100;
    padding: 10px 0;
}

.tab-button, .tab-btn {
    background-color: #fff;
    color: #003896;
    padding: 10px 28px;
    margin: 0 5px;
    cursor: pointer;
    border: 1px solid #003896;
    border-radius: 6px;
    font-size: 14px;
}

.tab-button.active, .tab-btn.active {
    background-color: #003896;
    color: #fff;
    border: 1px solid #003896;
}

button, 
button:active, 
button:focus {
    outline: none;
}

.tab-button:hover, .tab-btn:hover {
    background-color: #003896;
    color: #fff;
    border: 1px solid #003896;
}

.menu-btn {
    display: block;
    width: 100%;
    padding: 7px 10px;
    margin-bottom: 5px;
    text-align: left;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.3;
}

.menu-btn.active {
    background: #003896;
    color: #fff;
    border: 1px solid #003896;
}

.menu-btn:hover {
    background: #e0e0e0;
}

.content-box {
    padding: 15px;
    background: #fff;
    min-height: 120px;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
}

.menu-item {
    display: none;
}

.menu-item.active {
    display: block;
}

.content-item {
    display: none;
}

.content-item.active {
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    padding: 10px;
    border: 1px solid #ccc;
    text-align: left;
    word-wrap: break-word;
    word-break: break-word;
}

th {
    background-color: #f5f5f5;
    font-weight: 600;
}


.table-pdf-link {
    display: none;
    padding: 15px;
    background-color: #f0f7ff;
    border: 2px solid #003896;
    border-radius: 8px;
    margin: 15px 0;
}

.table-pdf-link a {
    display: flex;
    align-items: flex-start; 
    gap: 10px;
    color: #003896;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

.table-pdf-link a:hover {
    text-decoration: underline;
}

.table-pdf-link i {
    font-size: 24px;
    flex-shrink: 0; 
    margin-top: 2px; 
}

@media (min-width: 769px) {

    .table-pdf-link {
        display: none !important;
    }
    

    table {
        display: table !important;
    }
    
    
    table {
        font-size: 13px;
        table-layout: auto;
        max-width: 100%;
    }
    
    th, td {
        padding: 8px 6px;
        font-size: 13px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: break-word;
    }
    
    th {
        font-size: 13px;
        font-weight: 600;
    }
    
    table:has(th:nth-child(6)),
    table:has(th:nth-child(7)),
    table:has(th:nth-child(8)),
    table:has(th:nth-child(9)),
    table:has(th:nth-child(10)) {
        font-size: 12px;
    }
    
    table:has(th:nth-child(6)) th,
    table:has(th:nth-child(6)) td,
    table:has(th:nth-child(7)) th,
    table:has(th:nth-child(7)) td,
    table:has(th:nth-child(8)) th,
    table:has(th:nth-child(8)) td,
    table:has(th:nth-child(9)) th,
    table:has(th:nth-child(9)) td,
    table:has(th:nth-child(10)) th,
    table:has(th:nth-child(10)) td {
        font-size: 11px;
        padding: 6px 4px;
    }
}

@media (max-width: 768px) {


    table {
        display: table;
        font-size: 12px;
        width: 100%;
        max-width: 100%;
        table-layout: fixed; 
    }
    
    th, td {
        font-size: 12px;
        padding: 6px 4px;
        white-space: normal; 
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    table:has(th:nth-child(1)):not(:has(th:nth-child(5))) {
        font-size: 11px;
    }
    
    table:has(th:nth-child(1)):not(:has(th:nth-child(5))) th,
    table:has(th:nth-child(1)):not(:has(th:nth-child(5))) td {
        font-size: 11px;
        padding: 5px 3px;
    }
    
    table:has(th:nth-child(5)) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        table-layout: auto;
    }
    
    table:has(th:nth-child(5)) th,
    table:has(th:nth-child(5)) td {
        white-space: nowrap;
    }
    
    table.table-fit-mobile {
        display: table !important; 
        width: 100%;
        table-layout: fixed; 
        overflow-x: visible;
    }
    
    table.table-fit-mobile th,
    table.table-fit-mobile td {
        white-space: normal; 
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        font-size: 11px;
        padding: 6px 4px;
        line-height: 1.3;
    }
    
    @media (max-width: 400px) {
        table.table-fit-mobile th,
        table.table-fit-mobile td {
            font-size: 10px;
            padding: 5px 3px;
        }
    }
    /** на телефонах скрыть таблицу */
    table.table-hide-mobile, .table-hide-mobile {
        display: none !important;
    }
    
    .content-item:has(table.table-hide-mobile) .table-pdf-link {
        display: block !important;
    }
    
    table.table-compact-mobile {
        font-size: 11px;
        display: table; 
    }
    
    table.table-compact-mobile th,
    table.table-compact-mobile td {
        font-size: 10px;
        padding: 5px 3px;
        white-space: normal;
    }
    
    table.table-scroll-mobile {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; 
    }
    
    table.table-scroll-mobile::after {
        content: "→ Прокрутите вправо";
        display: block;
        text-align: center;
        font-size: 11px;
        color: #666;
        padding: 5px;
        background: #f5f5f5;
        border-top: 1px solid #ccc;
    }
}

@media (max-width: 768px) {

    .hide-on-mobile {
        display: none !important;
    }
    

    .min-width-mobile {
        min-width: 100px;
    }
}

@media (max-width: 567px) {
    .tabs-pk {
        display: block;
        margin-bottom: 6px;
    }
    .tab-btn {
        margin: 0px 8px 13px 0px;
        padding: 8px 9px;
        font-size: 12px;
    }
}

@media (min-width: 768px) {
    .tabs-wrapper {
        margin-bottom: 40px; 
    }
    
    .tabs-wrapper .row {
        display: flex;
        align-items: flex-start; 
    }
    
    .menu-container {
        height: auto;
        align-self: flex-start;
    }
    
    .col-12.col-md-9.col-lg-9 {
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }
    
    .content-box {
        background: #fff;
        padding: 15px;
        min-height: 600px; 
        display: flex;
        flex-direction: column;
    }
    
    .content-item {
        display: none;
    }
    
    .content-item.active {
        display: block;
        flex: 1;
    }
    
    .col-12.col-md-3.col-lg-3 {
        background: transparent;
    }
}


@media (max-width: 767px) {
    .tabs-wrapper {
        margin-bottom: 30px; 
    }
    
    .tabs-pk {
        flex-shrink: 0; 
    }
    
    .menu-container {
        margin-bottom: 15px;
        height: auto;
    }
    
    .content-box {
        height: 70vh !important; 
        max-height: 70vh; 
        min-height: auto; 
        overflow-y: auto; 
        margin-bottom: 20px;
    }
}

.btn-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.btn-links-grid .btn-icon-white {
    margin-bottom: 0 !important;
}

.btn-links-grid-full {
    display: block;
    margin-bottom: 30px;
}

.btn-links-grid-full .btn-icon-white,
.btn-links-grid-full .accordion-grey {
    margin-bottom: 0 !important;
}

@media (max-width: 768px) {
    .btn-links-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}



/* Стили сноски */
.footnote-ref {
    display: inline-block;
    position: relative;
    color: #0066cc;
    font-weight: 600;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.2s;
}

.footnote-ref:hover {
    color: #004499;
}

/* Tooltip */
.footnote-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 12px 16px;
    background: #333;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    max-width: 350px;
    width: max-content;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    font-weight: normal;
}

/* Стрелка tooltip */
.footnote-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
}

/* Активное состояние */
.footnote-ref.active .footnote-tooltip {
    display: block;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .footnote-tooltip {
        position: fixed;
        left: 10px !important;
        right: 10px;
        bottom: 20px !important;
        top: auto !important;
        transform: none !important;
        max-width: none;
        width: auto;
        margin: 0;
    }

    .footnote-tooltip::after {
        display: none;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px 10px;
    }
}
td sup{
    font-size: 12px;
}
/* Раздел сносок внизу */
.footnotes-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 20px;
}

.footnote-item {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
}
.footnote-item p{
    font-size: 12px;
}
.footnote-item strong{
    float: left;
    padding-right: 3px;
    font-size: 10px;
}
.footnote-number {
    position: absolute;
    left: 0;
    color: #0066cc;
    font-weight: 600;
}

.footnote-text {
    color: #555;
    line-height: 1.6;
}

/* Кнопка закрытия для мобильных */
.close-tooltip {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 768px) {
    .close-tooltip {
        display: block;
    }
}