/* =======================================================
   MOLMED JOURNAL (FINAL CLEAN VERSION - BLACK LINKS)
   - Шапка: Фиксированная высота 59.91px, картинка.
   - Меню: Без подсветки.
   - Сайдбар: Ссылки всегда черные (не краснеют).
   ======================================================= */

/* 1. ШРИФТЫ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');
body, h1, h2, h3, h4, h5, h6, p, a, li, div, span, input, button {
    font-family: "Inter", sans-serif !important;
}

/* =======================================================
   2. СТРУКТУРА И СЕТКА
   ======================================================= */
.pkp_structure_content {
    max-width: 1160px !important;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    overflow: visible !important;          /* критично для sticky */
    min-height: 100vh !important;           /* чтобы родитель был достаточно высоким */
}

.pkp_structure_main {
    width: 860px !important;
    padding-right: 20px;
}

.pkp_structure_sidebar {
    width: 300px !important;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box !important;
}

@media (min-width: 992px) {
    .pkp_structure_sidebar {
        padding-top: 30px;
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 60px !important;                   /* высота шапки + запас */
        align-self: flex-start !important;
        z-index: 98 !important;
        height: auto !important;
        max-height: none !important;
    }
}

@media (max-width: 991px) {
    .pkp_structure_main,
    .pkp_structure_sidebar {
        width: 100% !important;
        padding: 0 10px;
    }
    .pkp_structure_sidebar {
        order: 2;
        margin-top: 20px;
    }
}

/* Защита sticky от возможных обёрток OJS */
.pkp_structure_page,
main,
.pkp_structure_content > * {
    overflow: visible !important;
}

/* =======================================================
   3. КНОПКИ (ЖЕЛТЫЕ + ВОЛНА)
   ======================================================= */
html body #sub-btn-glow,
html body .sidebar-button,
html body .custom-sidebar-btn,
html body .pkp_structure_sidebar .pkp_block .content > div[style*="background-color"] {
    background-color: #ffe100 !important;
    background: #ffe100 !important;
    border: 1px solid #ffe100 !important;
    border-bottom: 3px solid #cc4400 !important;
    border-radius: 10px !important;
    width: 240px !important;
    margin: 0 auto 15px auto !important;
    padding: 8px 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    position: relative !important;
    overflow: hidden !important;
    display: block;
    text-align: center;
}

html body #sub-btn-glow a,
html body .sidebar-button a,
html body .custom-sidebar-btn a,
html body .pkp_structure_sidebar .pkp_block .content > div[style*="background-color"] a {
    color: #000000 !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    position: relative;
    z-index: 5;
}

/* Блик */
html body #sub-btn-glow::before,
html body .sidebar-button::before,
html body .custom-sidebar-btn::before,
html body .pkp_structure_sidebar .pkp_block .content > div[style*="background-color"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(-45deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.7s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

html body #sub-btn-glow:hover::before,
html body .sidebar-button:hover::before,
html body .custom-sidebar-btn:hover::before,
html body .pkp_structure_sidebar .pkp_block .content > div[style*="background-color"]:hover::before {
    left: 100%;
}

html body #sub-btn-glow:hover,
html body .pkp_structure_sidebar .pkp_block .content > div[style*="background-color"]:hover {
    background: #ffeb3b !important;
    transform: translateY(-2px);
}

/* =======================================================
   4. САЙДБАР (ЗАГОЛОВКИ И ССЫЛКИ)
   ======================================================= */
/* Заголовки блоков - СИНИЙ ГРАДИЕНТ */
.pkp_structure_sidebar .pkp_block .title {
    background: linear-gradient(180deg, #005b9f 0%, #00004d 100%) !important;
    color: #ffffff !important;
    border-radius: 10px;
    text-align: center;
    padding: 5px 0 !important;
    font-weight: bold;
    text-transform: uppercase;
}

/* Разделители меню */
.pkp_structure_sidebar ul li {
    border-bottom: 1px solid #0e1162 !important;
    border-radius: 10px;
}

/* СТРОГИЙ ЧЕРНЫЙ ЦВЕТ ДЛЯ ССЫЛОК */
.pkp_structure_sidebar ul li a,
.pkp_structure_sidebar .pkp_block .content a {
    color: #000000 !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

.pkp_structure_sidebar ul li a:hover,
.pkp_structure_sidebar .pkp_block .content a:hover {
    color: #000000 !important;
    background: transparent !important;
}

/* =======================================================
   5. ОСТАЛЬНОЕ (КАРТИНКИ, PDF)
   ======================================================= */
.journal-top-banner img,
.custom-journal-wrapper img {
    width: 100%;
    height: auto;
}

/* PDF Header - Синий */
.header_view {
    background: linear-gradient(180deg, #005b9f 0%, #00004d 100%) !important;
    border-bottom: none;
}
.header_view .download {
    background: #ffe100 !important;
    color: #000 !important;
    border-radius: 4px;
}

/* Мобильная адаптация кнопок */
@media (max-width: 991px) {
    html body #sub-btn-glow,
    html body .pkp_structure_sidebar .pkp_block .content > div[style*="background-color"] {
        width: 100% !important;
    }
}

/* =======================================================
   АККОРДЕОН "ACADEMIC BLACK"
   ======================================================= */
.vrach-accordion-lite {
    max-width: 100%;
    margin: 30px 0;
    font-family: "Inter", sans-serif;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}
.vrach-accordion-lite details {
    border-bottom: 1px solid #f0f0f0;
    background: transparent;
    transition: all 0.3s ease;
}
.vrach-accordion-lite details:last-child { border-bottom: none; }
.vrach-accordion-lite summary {
    padding: 18px 10px 18px 35px;
    font-weight: 600;
    font-size: 15px;
    color: #555c66;
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: color 0.2s ease;
}
.vrach-accordion-lite summary::-webkit-details-marker { display: none; }
.vrach-accordion-lite summary::before {
    content: '';
    position: absolute;
    left: 15px; top: 50%;
    width: 0; height: 0;
    border-top: 5px solid transparent; border-bottom: 5px solid transparent;
    border-left: 7px solid #b0b0b0;
    transform: translateY(-50%);
    transition: all 0.2s ease;
}
.vrach-accordion-lite summary:hover { color: #333; }
.vrach-accordion-lite summary:hover::before {
    border-left-color: #888;
    transform: translateY(-50%) scale(1.1);
}
.vrach-accordion-lite details[open] summary {
    color: #000; font-weight: 700;
}
.vrach-accordion-lite details[open] summary::before {
    transform: translateY(-50%) rotate(90deg);
    border-left-color: #ef372e;
}
.vrach-accordion-lite .content {
    padding: 5px 10px 25px 35px;
    font-size: 15px; line-height: 1.6;
    color: #000000;
    font-weight: 400; opacity: 0;
    transform: translateY(-10px);
    animation: fadeInUp 0.35s forwards 0.1s;
}
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* ЯЗЫКОВЫЕ КНОПКИ */
.hard-lang-switch {
    z-index: 100000 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 2px !important;
}
.hard-lang-switch a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background-color: #ffffff !important;
    color: #333333 !important;
    text-decoration: none !important;
    font-family: 'Roboto', sans-serif !important;
    font-weight: bold !important;
    font-size: 11px !important;
    height: 24px !important;
    padding: 0 8px !important;
    border-radius: 3px !important;
    border: 1px solid #dcdcdc !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}
.hard-lang-switch a:hover,
.hard-lang-switch a.active-locale {
    color: #ef372e !important;
    border-color: #ef372e !important;
    background-color: #fff !important;
}
@media (max-width: 991px) {
    .hard-lang-switch {
        position: fixed !important;
        top: 60px !important;
        right: 15px !important;
        left: auto !important;
        background: transparent !important;
        padding: 5px 0 !important;
    }
}
@media (min-width: 992px) {
    .hard-lang-switch {
        position: absolute !important;
        top: 28px !important;
        right: 220px !important;
    }
}

/* =======================================================
   ШАПКА ФИКСИРОВАННОЙ ВЫСОТЫ (59.91px) + КАРТИНКА
   ======================================================= */
.pkp_structure_head {
    height: auto !important;
    min-height: 0 !important;
}
.pkp_site_name_wrapper {
    height: 59.91px !important;
    min-height: 59.91px !important;
    max-height: 59.91px !important;
    padding: 0 !important;
    margin: 0 !important;
    background-image: url('https://vrach.digital-medic.ru//public/site/images/header-bg.jpg') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    display: flex !important;
    align-items: center !important;
    padding-left: 20px !important;
    box-sizing: border-box !important;
}
.pkp_site_name_wrapper h1 {
    font-size: 20px !important;
    line-height: 1 !important;
    margin: 0 !important;
}

/* =======================================================
   КНОПКА НАВЕРХ
   ======================================================= */
.scroll-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background-color: #ffe100 !important;
    border-bottom: 3px solid #cc4400 !important;
    color: #000000 !important;
    font-size: 28px;
    font-weight: bold;
    text-decoration: none !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: #ffeb3b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

@media (max-width: 991px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 22px;
    }
}

/* =======================================================
   БЛОК С ЛОГОТИПОМ SCOPUS
   ======================================================= */
.custom-partners-logos {
    text-align: center;
    margin: 0;
    padding: 0;
}

.custom-partners-logos a {
    display: inline-block;
    transition: transform 0.25s ease;
}

.custom-partners-logos img.scopus-logo {
    height: 92px;
    width: auto;
    max-width: 320px;
    display: block;
    margin: 0 auto;
    transition: all 0.25s ease;
}

.custom-partners-logos a:hover img.scopus-logo {
    transform: scale(1.07);
}

.pkp_structure_sidebar .custom-partners-logos {
    margin: 1px 0 3px;
}

.pkp_structure_sidebar .custom-partners-logos img.scopus-logo {
    height: 82px;
    max-width: 100%;
}

@media (max-width: 991px) {
    .custom-partners-logos {
        margin: 1px 0 3px;
    }
    .custom-partners-logos img.scopus-logo {
        height: 76px;
        max-width: 280px;
    }
}

/* =======================================================
   СТРАНИЦА КОНТАКТОВ — синий + жёлтый акцент
   ======================================================= */
.contacts-wrapper {
    width: 100%;
    font-family: "Inter", sans-serif;
    margin-top: 20px;
}
.contact-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.contact-header {
    background: linear-gradient(180deg, #005b9f 0%, #00004d 100%);
    padding: 15px 20px;
    text-align: center;
}
.contact-header h2 {
    color: #ffffff !important;
    margin: 0 !important;
    font-size: 18px !important;
    text-transform: uppercase;
    font-weight: 700;
}
.contact-body {
    padding: 25px;
}
.address-row {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}
.address-item {
    flex: 1 1 300px;
}
.address-label {
    color: #005b9f;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.address-text {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}
.people-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.person-card {
    flex: 1 1 300px;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    border-left: 4px solid #005b9f;
    transition: transform 0.2s ease;
}
.person-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.person-role {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}
.person-name {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 15px;
}
.person-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.contact-link {
    text-decoration: none !important;
    color: #333 !important;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-link:hover {
    color: #005b9f !important;
}
.map-container {
    margin-top: 20px;
    background: #fff;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.map-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-left: 10px;
}
/* Уменьшаем логотип Scopus в сайдбаре (правый столбец) */
.pkp_structure_sidebar .custom-partners-logos img.scopus-logo {
    height: 70px !important;          /* было 82px → делаем меньше, например 70px */
    max-width: 100% !important;
}

/* Ещё меньше на мобильных */
@media (max-width: 991px) {
    .pkp_structure_sidebar .custom-partners-logos img.scopus-logo {
        height: 65px !important;      /* было 76px → подгони под вкус */
        max-width: 260px !important;  /* или оставь 100% */
    }
}