.menu-btn.font-bold {
    font-weight: bold;
}
table.table-hide-mobile p{
    margin-bottom: 0;
}
.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;
    font-size: 14px;
    line-height: 1.4;
}

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;
        padding: 0;
        font-size: 14px;
    }
}

.btn-links-grid {
    display: grid;
    grid-template-columns: 1fr 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;
    font-size: 12px;
}

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

/* Tooltip - полностью скрыт внутри элемента */
.footnote-ref .footnote-tooltip {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Tooltip когда перемещён в body */
.footnote-tooltip-active {
    display: block !important;
    position: fixed;
    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: 99999;
    font-weight: normal;
    pointer-events: auto;
}

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

td sup{
    font-size: 12px;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .footnote-tooltip-active {
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 20px !important;
        top: auto !important;
        max-width: none !important;
        width: auto !important;
        margin: 0 !important;
    }
}
/* Раздел сносок внизу */
.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;
    }
}

/* Стили для аккордеона в содержании */
.accordion-item {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.accordion-header {
    background: #f9f9f9;
    padding: 5px 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #003896;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #e0e0e0;
}

.accordion-item.active .accordion-header {
    background: #003896;
    color: #fff;
}

.accordion-header::after {
    content: '+';
    font-size: 24px;
    font-weight: normal;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-header::after {
    content: '−';
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fff;
}

.accordion-content-inner {
    padding: 15px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
}

/* Кнопка прокрутки вверх в аккордеоне */
.accordion-scroll-top {
    position: sticky;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #003896;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 56, 150, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
    margin: 20px auto 0;
    font-size: 24px;
    line-height: 1;
}

.accordion-scroll-top:hover {
    background: #00296b;
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 56, 150, 0.4);
}

.accordion-scroll-top:active {
    transform: translateX(-50%) translateY(-1px);
}

/* Иконка стрелки вверх */
.accordion-scroll-top::before {
    content: '↑';
}

@media (max-width: 768px) {
    .accordion-header {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .accordion-scroll-top {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 10px;
    }
    
    .accordion-content-inner {
        padding: 12px;
    }
}

/*************************/
.slider-container {
    margin: 0 auto;
    position: relative;
}

.slider {
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    overflow: hidden;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Кастомизация кнопок */
/*.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9) !important;
    width: 30px;
    height: 50px;
    border-radius: 5px;
    font-size: 20px;
    color: #333 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
}

.owl-carousel:hover .owl-nav button.owl-prev,
.owl-carousel:hover .owl-nav button.owl-next {
    opacity: 1;
    pointer-events: auto;
}

.owl-carousel .owl-nav button.owl-prev:hover,
.owl-carousel .owl-nav button.owl-next:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateY(-50%) scale(1.1);
}

.owl-carousel .owl-nav button.owl-prev {
    left: 0;
}

.owl-carousel .owl-nav button.owl-next {
    right: 0;
}*/
.owl-nav{
    position: absolute;
}

/* Кастомизация точек */
.owl-carousel .owl-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.owl-carousel .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgb(38, 71, 150) !important;
    border: 2px solid rgb(38, 71, 150);
    transition: all 0.3s;
}

.owl-carousel .owl-dot.active {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.2);
}

.owl-carousel .owl-dot span {
    display: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .owl-carousel .owl-nav {
        display: none;
    }
    .owl-carousel .owl-dots {
        bottom: 15px;
        gap: 8px;
    }
    .owl-carousel .owl-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .owl-carousel .owl-dots {
        bottom: -15px;
        gap: 6px;
    }
    .owl-carousel .owl-dot {
        width: 8px;
        height: 8px;
    }
}

/*************************/

.contacts-container {
    padding: 30px;
    margin: 0 auto;
}

.contacts-container h2 {
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 30px;
    color: #333;
}

.content-wrapper {
    display: flex;
    gap: 40px;
}

.contacts-list {
    flex: 1;
}

.contact-card {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-photo {
    width: 100px;
    height: 130px;
    flex-shrink: 0;
}

.contact-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-size: 18px;
    color: #003896;
    font-weight: normal;
    margin-bottom: 3px;
}

.contact-position {
    font-size: 13px;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.4;
}

.contact-details {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.contact-details div {
    margin-bottom: 3px;
}

.contact-label {
    display: inline-block;
    min-width: 80px;
    color: #333;
}

.contact-link {
    color: #0066cc;
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

.icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 5px;
    position: relative;
    top: -1px;
}

.phone-icon {
    background: url('/abiturients/img/phone.svg') no-repeat center;
    background-size: contain;
}

.email-icon {
    background: url('/abiturients/img/mail.svg') no-repeat center;
    background-size: contain;
}

.right-section {
    width: 420px;
    flex-shrink: 0;
}

.info-block {
    margin-bottom: 25px;
}

.info-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.info-content {
    font-size: 16px;
    color: #0066cc;
    line-height: 1.5;
}

.map-container {
    position: relative;
}

.map-container img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #ddd;
}

.phone-gray {
    color: #666;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
    }

    .right-section {
        width: 100%;
        order: -1; /* Перемещаем правый блок наверх */
    }

    .contacts-list {
        order: 1;
    }
}

@media (max-width: 768px) {
    .contacts-container {
        padding: 20px;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .content-wrapper {
        gap: 30px;
    }

    .contact-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .contact-photo {
        width: 120px;
        height: 156px;
    }

    .contact-info {
        width: 100%;
    }

    .contact-details div {
        margin-bottom: 5px;
    }

    .contact-label {
        display: block;
        margin-bottom: 2px;
    }

    .map-container img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .contacts-container {
        padding: 15px;
    }

    h1 {
        font-size: 18px;
    }

    .contact-card {
        margin-bottom: 25px;
    }

    .contact-photo {
        width: 100px;
        height: 130px;
    }

    .contact-name {
        font-size: 15px;
    }

    .contact-position,
    .contact-details,
    .info-title,
    .info-content {
        font-size: 14px;
    }

    .info-block {
        margin-bottom: 20px;
    }
}