MediaWiki:Common.css: відмінності між версіями

Матеріал з Київський національний лінгвістичний університет
Перейти до навігації Перейти до пошуку
Немає опису редагування
Мітка: Скасовано
Немає опису редагування
 
(Не показано 45 проміжних версій цього користувача)
Рядок 1: Рядок 1:
/* ════════════════════════════════════
  ГЛОБАЛЬНИЙ ФІКС ГОРИЗОНТАЛЬНОГО СКРОЛУ
═══════════════════════════════════════ */
html {
    overflow-x: hidden;
    width: 100%;
}
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}
/* Контейнери MediaWiki не повинні виходити за межі */
#mw-page-base,
#mw-head-base,
#mw-head,
#mw-panel,
#content,
.mw-body,
.mw-page-container,
.mw-page-container-inner,
.mw-content-container,
#bodyContent,
#mw-content-text,
.mw-parser-output {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}
/* Блочні елементи не виходять за межі екрану */
div, section, article, aside, nav, header, footer, main,
p, ul, ol, li, table, form, fieldset, blockquote, pre {
    max-width: 100%;
    box-sizing: border-box;
}
/* ── Заголовок сторінки ── */
/* ── Заголовок сторінки ── */
#firstHeading {
#firstHeading {
Рядок 41: Рядок 81:
     flex: 1;
     flex: 1;
     text-align: center;
     text-align: center;
    /* Зміщуємо центр тексту компенсуючи ширину панелі статистики */
     transform: translateX(-50px);
     transform: translateX(-80px);
}
}


Рядок 65: Рядок 104:
}
}


/* ── Панель статистики (справа від привітання) ── */
/* ── Панель статистики ── */
.stats-panel {
.stats-panel {
     width: 260px;
     width: 260px;
Рядок 133: Рядок 172:
     background: transparent;
     background: transparent;
     box-sizing: border-box;
     box-sizing: border-box;
    /* Центруємо тільки над сіткою категорій, ігноруючи праву колонку */
     margin-right: calc(360px + 24px);
     margin-right: calc(360px + 24px);
}
}
Рядок 158: Рядок 196:
     box-sizing: border-box;
     box-sizing: border-box;
     width: 100%;
     width: 100%;
}
/* ── Ліва колонка з заголовком і сіткою ── */
.category-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
}


Рядок 262: Рядок 308:
     position: relative;
     position: relative;
}
}


.random-articles-header {
.random-articles-header {
Рядок 302: Рядок 346:
}
}


.random-article-thumb {
.random-article-thumb-wrap {
     width: 90px;
     width: 90px;
     height: 90px;
     height: 90px;
    min-width: 90px;
    min-height: 90px;
     border-radius: 10px;
     border-radius: 10px;
    object-fit: cover;
     flex-shrink: 0;
     flex-shrink: 0;
    overflow: hidden;
     background: #eef2f8;
     background: #eef2f8;
}
.random-article-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}
}


Рядок 365: Рядок 419:


/* ════════════════════════════════════
/* ════════════════════════════════════
   РЕСУРСИ ТА ПОСИЛАННЯ — MODERN STYLE
   РЕСУРСИ ТА ПОСИЛАННЯ
═══════════════════════════════════════ */
═══════════════════════════════════════ */
.resources-and-contacts {
.resources-and-contacts {
Рядок 378: Рядок 432:
.contacts-block {
.contacts-block {
     flex: 1;
     flex: 1;
     min-width: 320px;
     min-width: 300px;
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 246, 255, 0.85));
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 246, 255, 0.85));
     backdrop-filter: blur(12px);
     backdrop-filter: blur(12px);
Рядок 394: Рядок 448:
}
}


/* Gradient effect on hover */
.resource-block::before,
.resource-block::before,
.contacts-block::before {
.contacts-block::before {
Рядок 494: Рядок 547:
     color: #003d82;
     color: #003d82;
     text-decoration: none;
     text-decoration: none;
}
/* Different accent color for contacts block */
.contacts-block h2 {
}
}


/* ════════════════════════════════════
/* ════════════════════════════════════
   АДАПТИВНІСТЬ — ВИПРАВЛЕНО
   MODERN UI: градієнти, glassmorphism, анімації
═══════════════════════════════════════ */
══════════════════════════════════════ */


/* Великі екрани — компенсація для заголовка категорій */
/* ── Прогрес скролла ── */
@media (min-width: 1101px) {
.scroll-progress {
     .section-categories {
    position: fixed;
        margin-right: calc(360px + 24px);
    top: 0;
    }
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #003d82, #0066cc, #ffd700);
    z-index: 99999;
     transition: width 0.1s ease;
    box-shadow: 0 2px 8px rgba(0, 61, 130, 0.3);
}
}


/* Планшети та менше (1100px) */
/* ── Градієнтний фон для welcome ── */
@media (max-width: 1100px) {
.welcome-wrapper {
    /* Welcome секція */
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
    .welcome-wrapper {
     position: relative;
        flex-direction: column !important;
     overflow: hidden;
        text-align: center !important;
        gap: 24px !important;
    }
   
    .welcome-text {
        transform: translateX(0) !important;
    }
   
    /* Статистика на всю ширину */
    .stats-panel {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
   
    /* Основний layout вертикально */
    .main-content-layout {
        flex-direction: column !important;
    }
   
    /* Заголовок без зміщення */
    .section-categories {
        margin-right: 0 !important;
    }
   
    /* Права колонка */
    .right-column {
        width: 100% !important;
        min-width: unset !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
   
     .random-articles-panel {
        flex: 1;
        min-width: 300px;
     }
   
    /* Сітка залишається 3 колонки */
    .category-grid-container {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}
}


/* Планшети середні (900px) */
.welcome-wrapper::before {
@media (max-width: 900px) {
     content: '';
     /* Ресурси вертикально */
    position: absolute;
    .resources-and-contacts {
     top: 0;
        flex-direction: column !important;
     left: 0;
        gap: 20px !important;
     right: 0;
     }
    bottom: 0;
   
     background:
    .resource-block,
        linear-gradient(to bottom, white 0%, transparent 15%, transparent 85%, white 100%),
    .contacts-block {
         linear-gradient(to right, white 0%, transparent 10%, transparent 90%, white 100%);
        min-width: 100% !important;
    pointer-events: none;
     }
     z-index: 10;
   
    /* Vue Teachers адаптація */
    .vt-layout {
        flex-direction: column-reverse !important;
     }
   
    .vt-sidebar {
        width: 100% !important;
        position: static !important;
     }
   
    .vt-filters {
         flex-direction: row !important;
        flex-wrap: wrap !important;
     }
   
    .vt-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
}


/* Маленькі планшети (820px) */
.welcome-text,
@media (max-width: 820px) {
.stats-panel {
    /* Сітка категорій 2 колонки */
    position: relative;
    .category-grid-container {
    z-index: 11;
        grid-template-columns: repeat(2, 1fr) !important;
}
        gap: 16px !important;
 
    }
/* ── Glassmorphism для статистики ── */
   
.stats-panel {
    /* Права колонка вертикально */
    background: rgba(255, 255, 255, 0.7) !important;
    .right-column {
     backdrop-filter: blur(10px);
        flex-direction: column !important;
     -webkit-backdrop-filter: blur(10px);
     }
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
      
     box-shadow: 0 8px 32px rgba(0, 61, 130, 0.15) !important;
    .random-articles-panel {
        width: 100% !important;
     }
}
}


/* Великі телефони (600px) */
.stats-panel-header {
@media (max-width: 600px) {
     background: linear-gradient(135deg, rgba(0, 61, 130, 0.1), rgba(0, 102, 204, 0.15)) !important;
     /* Зменшені відступи */
    .welcome-wrapper {
        padding: 24px 15px !important;
    }
   
    .main-content-layout {
        padding: 0 15px !important;
        margin-bottom: 40px !important;
    }
   
    .resources-and-contacts {
        margin: 30px 15px 40px !important;
    }
   
    /* Статистика на всю ширину */
    .stats-panel {
        max-width: 100% !important;
    }
}
}


/* Телефони (520px) */
/* ── Glassmorphism для випадкових статей ── */
@media (max-width: 520px) {
.random-articles-panel {
    /* Сітка 1 колонка */
     background: rgba(255, 255, 255, 0.75) !important;
    .category-grid-container {
     backdrop-filter: blur(12px);
        grid-template-columns: 1fr !important;
     -webkit-backdrop-filter: blur(12px);
        gap: 16px !important;
     border: 1px solid rgba(255, 255, 255, 0.3) !important;
    }
   
     /* Шрифти менше */
    .welcome-title {
        font-size: 1.8rem !important;
     }
   
    .welcome-subtitle {
        font-size: 1.15rem !important;
     }
   
    .section-categories {
        font-size: 1.6rem !important;
    }
   
    /* Іконки менші */
    .card-image img {
        width: 180px !important;
        height: 180px !important;
     }
   
    /* Випадкові статті вертикально */
    .random-article-card {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
   
    .random-article-thumb,
    .random-article-thumb-placeholder {
        width: 100% !important;
        max-width: 200px !important;
    }
   
    /* Vue Teachers 1 колонка */
    .vt-grid {
        grid-template-columns: 1fr !important;
    }
}
}


/* Маленькі телефони (400px) */
/* ── Gradient category cards ── */
@media (max-width: 400px) {
.category-card {
    /* Статистика вертикально */
     background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    .stats-panel-item {
     border: 1px solid rgba(0, 61, 130, 0.08);
        flex-direction: column !important;
     position: relative;
        gap: 4px !important;
        text-align: center !important;
    }
   
    .stats-panel-label {
        font-size: 12px !important;
    }
   
    .stats-panel-number {
        font-size: 20px !important;
    }
   
    /* Ресурси менший padding */
    .resource-block li,
    .contacts-block li {
        font-size: 13px !important;
        padding: 8px 10px 8px 24px !important;
    }
   
    /* Іконки категорій ще менші */
    .card-image img {
        width: 150px !important;
        height: 150px !important;
    }
}
/* ══════════════════════════════════════════════
  MODERN UI: градієнти, glassmorphism, анімації
══════════════════════════════════════════════ */
 
/* ── Прогрес скролла ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
     background: linear-gradient(90deg, #003d82, #0066cc, #ffd700);
     z-index: 99999;
    transition: width 0.1s ease;
    box-shadow: 0 2px 8px rgba(0, 61, 130, 0.3);
}
 
/* ── Градієнтний фон для welcome ── */
.welcome-wrapper {
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
     position: relative;
     overflow: hidden;
     overflow: hidden;
}
}


/* Плавний перехід до білого з усіх боків */
.category-card::before {
.welcome-wrapper::before {
     content: '';
     content: '';
     position: absolute;
     position: absolute;
     top: 0;
     top: -50%;
     left: 0;
     left: -50%;
     right: 0;
     width: 200%;
     bottom: 0;
     height: 200%;
     background:  
     background: linear-gradient(135deg, transparent, rgba(0, 61, 130, 0.05), transparent);
        linear-gradient(to bottom, white 0%, transparent 15%, transparent 85%, white 100%),
    transform: rotate(45deg);
        linear-gradient(to right, white 0%, transparent 10%, transparent 90%, white 100%);
     transition: all 0.6s ease;
     pointer-events: none;
     opacity: 0;
     z-index: 10;
}
}


.welcome-text,
.category-card:hover::before {
.stats-panel {
     opacity: 1;
     position: relative;
     top: -25%;
     z-index: 11;
    left: -25%;
}
}


/* ── Glassmorphism для статистики ── */
.category-card:hover .card-image img {
.stats-panel {
     animation: icon-bounce 0.6s ease;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
     border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 61, 130, 0.15) !important;
}
}


.stats-panel-header {
@keyframes icon-bounce {
     background: linear-gradient(135deg, rgba(0, 61, 130, 0.1), rgba(0, 102, 204, 0.15)) !important;
     0%, 100% { transform: scale(1.12) translateY(0); }
    50% { transform: scale(1.12) translateY(-8px); }
}
}


/* ── Glassmorphism для випадкових статей ── */
.random-articles-panel {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}
/* ── Градієнтні картки категорій ── */
.category-card {
.category-card {
     background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
     transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 61, 130, 0.08);
    position: relative;
    overflow: hidden;
}
}


.category-card::before {
.category-card:hover {
     content: '';
     transform: translateY(-8px) scale(1.02);
    position: absolute;
     box-shadow: 0 24px 48px rgba(0, 61, 130, 0.2);
    top: -50%;
     left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, transparent, rgba(0, 61, 130, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}
}


.category-card:hover::before {
@keyframes rainbow {
     opacity: 1;
     0% { color: #003d82; }
     top: -25%;
     25% { color: #0066cc; }
     left: -25%;
    50% { color: #4a90e2; }
     75% { color: #0066cc; }
    100% { color: #003d82; }
}
}


/* ── Мікроанімації: bounce для іконок ── */
.stats-panel-number.animating {
.category-card:hover .card-image img {
     animation: rainbow 1.5s ease-in-out;
     animation: icon-bounce 0.6s ease;
}
}


@keyframes icon-bounce {
/* ── Gradient title ── */
     0%, 100% { transform: scale(1.12) translateY(0); }
.welcome-title {
     50% { transform: scale(1.12) translateY(-8px); }
     background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #003d82 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
     animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}
}


/* ── Gradient hover для карточок ── */
@keyframes gradient-shift {
.category-card {
     0%, 100% { background-position: 0% 50%; }
     transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    50% { background-position: 100% 50%; }
}
}


.category-card:hover {
/* ── Neomorphism for random articles ── */
     transform: translateY(-8px) scale(1.02);
.random-article-card {
     box-shadow: 0 24px 48px rgba(0, 61, 130, 0.2);
     background: linear-gradient(145deg, #ffffff, #f0f6ff);
     box-shadow:
        8px 8px 16px rgba(0, 61, 130, 0.08),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    border: none !important;
}
}


 
.random-article-card:hover {
@keyframes number-pulse {
     box-shadow:
     0%, 100% { transform: scale(1); }
        12px 12px 24px rgba(0, 61, 130, 0.12),
     50% { transform: scale(1.05); color: #0066cc; }
        -12px -12px 24px rgba(255, 255, 255, 1);
     background: linear-gradient(145deg, #f0f6ff, #ffffff);
}
}


/* ── Rainbow effect для анімації чисел ── */
.section-categories {
@keyframes rainbow {
     text-shadow: 0 2px 8px rgba(0, 61, 130, 0.1);
     0% { color: #003d82; }
    25% { color: #0066cc; }
    50% { color: #4a90e2; }
    75% { color: #0066cc; }
    100% { color: #003d82; }
}
}


.stats-panel-number.animating {
.section-categories::after {
     animation: rainbow 1.5s ease-in-out;
     background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700) !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}
}


/* ── Gradient title ── */
/* ════════════════════════════════════
.welcome-title {
  БОКОВЕ МЕНЮ
    background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #003d82 100%);
═══════════════════════════════════════ */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}


@keyframes gradient-shift {
body #mw-panel,
     0%, 100% { background-position: 0% 50%; }
.mw-body #mw-panel {
     50% { background-position: 100% 50%; }
     background: transparent !important;
    padding: 0 !important;
    margin-left: 0px !important;
     margin-right: 15px !important;
}
}


/* ── Smooth reveal для карточок ── */
body #mw-panel .portal,
.category-card {
.mw-body #mw-panel .portal {
     /* AOS сам додає opacity при ініціалізації */
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 246, 255, 0.85)) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 16px !important;
    padding: 16px 14px 14px !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(0, 61, 130, 0.12) !important;
    box-shadow: 0 6px 20px rgba(0, 61, 130, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}
}


/* ── Неоморфізм для випадкових статей ── */
body #mw-panel .portal::before,
.random-article-card {
.mw-body #mw-panel .portal::before {
     background: linear-gradient(145deg, #ffffff, #f0f6ff);
    content: '' !important;
    box-shadow:
    position: absolute !important;
        8px 8px 16px rgba(0, 61, 130, 0.08),
    top: -50% !important;
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    left: -50% !important;
     border: none !important;
    width: 200% !important;
    height: 200% !important;
     background: linear-gradient(135deg, transparent, rgba(0, 61, 130, 0.04), transparent) !important;
    transform: rotate(45deg) !important;
    transition: all 0.6s ease !important;
    opacity: 0 !important;
     pointer-events: none !important;
}
}


.random-article-card:hover {
body #mw-panel .portal:hover,
     box-shadow:  
.mw-body #mw-panel .portal:hover {
        12px 12px 24px rgba(0, 61, 130, 0.12),
    transform: translateY(-4px) !important;
        -12px -12px 24px rgba(255, 255, 255, 1);
     box-shadow: 0 10px 28px rgba(0, 61, 130, 0.12) !important;
    background: linear-gradient(145deg, #f0f6ff, #ffffff);
    border-color: rgba(0, 61, 130, 0.18) !important;
}
}


/* ── Glassmorphism для заголовків ── */
body #mw-panel .portal:hover::before,
.section-categories {
.mw-body #mw-panel .portal:hover::before {
     text-shadow: 0 2px 8px rgba(0, 61, 130, 0.1);
     opacity: 1 !important;
    top: -25% !important;
    left: -25% !important;
}
}


/* ── Gradient підкреслення ── */
body #mw-panel .portal:last-child,
.section-categories::after {
.mw-body #mw-panel .portal:last-child {
     background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700) !important;
     margin-bottom: 0 !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}
}


body #mw-panel .portal h3,
.mw-body #mw-panel .portal h3 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #003d82 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 0 10px 0 !important;
    border-bottom: 2px solid rgba(0, 61, 130, 0.15) !important;
    letter-spacing: -0.2px !important;
    line-height: 1.3 !important;
    position: relative !important;
    z-index: 1 !important;
}


 
body #mw-panel .portal .body ul,
/* ══════════════════════════════════════════════
.mw-body #mw-panel .portal .body ul {
  СТИЛІЗАЦІЯ БОКОВОГО МЕНЮ — MODERN STYLE
     margin: 0 !important;
══════════════════════════════════════════════ */
 
/* Прибираємо загальний фон */
body #mw-panel,
.mw-body #mw-panel {
     background: transparent !important;
     padding: 0 !important;
     padding: 0 !important;
     margin-left: 0px !important;
     position: relative !important;
     margin-right: 15px !important;
     z-index: 1 !important;
}
}


/* Блоки для кожної секції */
body #mw-panel .portal .body ul li,
body #mw-panel .portal,
.mw-body #mw-panel .portal .body ul li {
.mw-body #mw-panel .portal {
     list-style: none !important;
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 246, 255, 0.85)) !important;
     margin: 0 0 6px 0 !important;
    backdrop-filter: blur(12px) !important;
     padding: 0 !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 16px !important;
    padding: 16px 14px 14px !important;
     margin-bottom: 12px !important;
    border: 1px solid rgba(0, 61, 130, 0.12) !important;
    box-shadow: 0 6px 20px rgba(0, 61, 130, 0.08) !important;
     transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}
}


/* Gradient light effect */
body #mw-panel .portal .body ul li:last-child,
body #mw-panel .portal::before,
.mw-body #mw-panel .portal .body ul li:last-child {
.mw-body #mw-panel .portal::before {
     margin-bottom: 0 !important;
     content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: linear-gradient(135deg, transparent, rgba(0, 61, 130, 0.04), transparent) !important;
    transform: rotate(45deg) !important;
    transition: all 0.6s ease !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
}


body #mw-panel .portal:hover,
body #mw-panel .portal .body ul li a,
.mw-body #mw-panel .portal:hover {
.mw-body #mw-panel .portal .body ul li a {
     transform: translateY(-4px) !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
     box-shadow: 0 10px 28px rgba(0, 61, 130, 0.12) !important;
     font-size: 13.5px !important;
     border-color: rgba(0, 61, 130, 0.18) !important;
    font-weight: 400 !important;
}
    color: #0645ad !important;
     text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: block !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    line-height: 1.4 !important;
    background: rgba(255, 255, 255, 0.4) !important;
     border: 1px solid rgba(0, 61, 130, 0.08) !important;
    box-sizing: border-box !important;
}


body #mw-panel .portal:hover::before,
body #mw-panel .portal .body ul li a:hover,
.mw-body #mw-panel .portal:hover::before {
.mw-body #mw-panel .portal .body ul li a:hover {
     opacity: 1 !important;
     background: rgba(0, 61, 130, 0.06) !important;
     top: -25% !important;
     color: #003d82 !important;
     left: -25% !important;
     transform: translateX(4px) !important;
    border-color: rgba(0, 61, 130, 0.15) !important;
}
}


body #mw-panel .portal:last-child,
body #mw-panel #p-navigation h3,
.mw-body #mw-panel .portal:last-child {
.mw-body #mw-panel #p-navigation h3 {
     margin-bottom: 0 !important;
     display: block !important;
    visibility: visible !important;
}
}


/* Заголовки секцій з сірою лінією */
body #mw-panel #p-navigation .body ul li:first-child,
body #mw-panel .portal h3,
.mw-body #mw-panel #p-navigation .body ul li:first-child {
.mw-body #mw-panel .portal h3 {
     margin: 0 0 12px 0 !important;
     font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}
 
body #mw-panel #p-navigation .body ul li:first-child a,
.mw-body #mw-panel #p-navigation .body ul li:first-child a {
     font-size: 15px !important;
     font-size: 15px !important;
     font-weight: 700 !important;
     font-weight: 700 !important;
     color: #003d82 !important;
     color: #003d82 !important;
    margin: 0 0 12px 0 !important;
     padding: 0 0 10px 0 !important;
     padding: 0 0 10px 0 !important;
     border-bottom: 2px solid rgba(0, 61, 130, 0.15) !important;
     border-bottom: 2px solid rgba(0, 61, 130, 0.15) !important;
     letter-spacing: -0.2px !important;
     background: transparent !important;
     line-height: 1.3 !important;
    border-left: none !important;
     position: relative !important;
    border-right: none !important;
     z-index: 1 !important;
     border-top: none !important;
     border-radius: 0 !important;
     pointer-events: none !important;
    cursor: default !important;
}
}


/* Списки */
body #mw-panel #p-navigation .body ul li:first-child a:hover,
body #mw-panel .portal .body ul,
.mw-body #mw-panel #p-navigation .body ul li:first-child a:hover {
.mw-body #mw-panel .portal .body ul {
     transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
     position: relative !important;
    z-index: 1 !important;
}
}


body #mw-panel .portal .body ul li,
/* ════════════════════════════════════
.mw-body #mw-panel .portal .body ul li {
  ВЕРХНЯ ПАНЕЛЬ
     list-style: none !important;
═══════════════════════════════════════ */
     margin: 0 0 6px 0 !important;
 
    padding: 0 !important;
#mw-page-base {
     background: transparent !important;
     background-image: none !important;
}
}


body #mw-panel .portal .body ul li:last-child,
#mw-head-base {
.mw-body #mw-panel .portal .body ul li:last-child {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 246, 255, 0.9)) !important;
     margin-bottom: 0 !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 61, 130, 0.12) !important;
     box-shadow: 0 2px 12px rgba(0, 61, 130, 0.08) !important;
}
}


/* Посилання як міні-карточки */
#p-personal {
body #mw-panel .portal .body ul li a,
     background: transparent !important;
.mw-body #mw-panel .portal .body ul li a {
     border: none !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    color: #0645ad !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: block !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    line-height: 1.4 !important;
     background: rgba(255, 255, 255, 0.4) !important;
     border: 1px solid rgba(0, 61, 130, 0.08) !important;
    box-sizing: border-box !important;
}
}


body #mw-panel .portal .body ul li a:hover,
#p-personal ul {
.mw-body #mw-panel .portal .body ul li a:hover {
    display: flex !important;
     background: rgba(0, 61, 130, 0.06) !important;
    align-items: center !important;
     color: #003d82 !important;
    gap: 0 !important;
     transform: translateX(4px) !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(240,246,255,0.75)) !important;
     border-color: rgba(0, 61, 130, 0.15) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
     border: 1px solid rgba(0, 61, 130, 0.12) !important;
     border-radius: 12px !important;
     padding: 2px 4px !important;
     box-shadow: 0 2px 8px rgba(0, 61, 130, 0.06) !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    margin-left: 0 !important;
}
 
#p-personal li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
}


/* "Головна сторінка" як заголовок */
#p-personal li a {
body #mw-panel #p-navigation h3,
.mw-body #mw-panel #p-navigation h3 {
     display: block !important;
     display: block !important;
     visibility: visible !important;
     color: #0645ad !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
}
}


/* Перший елемент списку "Головна сторінка" перетворюємо на заголовок */
#p-personal li a:hover {
body #mw-panel #p-navigation .body ul li:first-child,
     background-color: rgba(0, 61, 130, 0.1) !important;
.mw-body #mw-panel #p-navigation .body ul li:first-child {
     margin: 0 0 12px 0 !important;
}
}


body #mw-panel #p-navigation .body ul li:first-child a,
#p-personal li.selected a,
.mw-body #mw-panel #p-navigation .body ul li:first-child a {
#p-personal li a.mw-ui-button-primary {
     font-size: 15px !important;
     background: linear-gradient(to right, rgba(240,246,255,0.5), rgba(210,230,255,0.4)) !important;
    font-weight: 700 !important;
     color: #003d82 !important;
     color: #003d82 !important;
     padding: 0 0 10px 0 !important;
     font-weight: 600 !important;
    border-bottom: 2px solid rgba(0, 61, 130, 0.15) !important;
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-radius: 0 !important;
    pointer-events: none !important;
    cursor: default !important;
}
}


body #mw-panel #p-navigation .body ul li:first-child a:hover,
/* Ховаємо менш важливі пункти щоб рядок не переносився */
.mw-body #mw-panel #p-navigation .body ul li:first-child a:hover {
#p-personal li#pt-watchlist,
     transform: none !important;
#p-personal li#pt-mycontris {
     display: none !important;
}
}
/* ══════════════════════════════════════════
  Vue Teachers App — стилі
══════════════════════════════════════════ */


.vt-app {
#p-personal li a {
     font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
     font-size: 12.5px !important;
    width: 100%;
     padding: 5px 7px !important;
     padding: 0 0 60px;
     white-space: nowrap !important;
     box-sizing: border-box;
}
}


/* ── Панель керування ── */
#p-personal li#pt-userpage {
    display: flex !important;
    align-items: center !important;
}


#p-personal li#pt-userpage .mw-userlink {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}


/* Фільтри */
#p-personal li#pt-userpage > a {
.vt-filters {
     padding-left: 22px !important;
     display: flex;
     background-position: 4px center !important;
    gap: 8px;
     flex-wrap: wrap;
}
}


.vt-filter-btn {
#p-namespaces li,
     padding: 8px 16px;
#p-views li {
     border-radius: 20px;
     background: transparent !important;
     border: 1.5px solid rgba(0,61,130,0.18);
     border: none !important;
     background: white;
     border-radius: 0 !important;
    color: #555;
     margin-right: 8px !important;
    font-size: 13.5px;
     margin-bottom: 0 !important;
     font-family: inherit;
     padding: 0 !important;
     cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
}


.vt-filter-btn:hover {
#p-namespaces li a,
     border-color: #003d82;
#p-views li a {
     color: #003d82;
     color: #0645ad !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
     font-weight: 500 !important;
}
}


.vt-filter-btn.active {
#p-namespaces li.selected,
     background: #003d82;
#p-views li.selected {
    color: white;
     background: linear-gradient(to right, rgba(240, 246, 255, 0.4), rgba(210, 230, 255, 0.3)) !important;
     border-color: #003d82;
     border-bottom: 3px solid #003d82 !important;
}
}


/* Сортування */
#p-namespaces li.selected a,
.vt-sort {
#p-views li.selected a {
     display: flex;
     color: #003d82 !important;
    align-items: center;
     font-weight: 700 !important;
    gap: 8px;
     flex-wrap: wrap;
}
}


.vt-sort-label {
#p-search {
     font-size: 13px;
     background: transparent !important;
     color: #888;
    border: none !important;
     white-space: nowrap;
    border-radius: 0 !important;
     padding: 2px 6px !important;
     margin-bottom: 0 !important;
}
}


.vt-sort-btn {
#simpleSearch {
     padding: 7px 14px;
     background: transparent !important;
     border-radius: 8px;
     border: none !important;
     border: 1.5px solid rgba(0,61,130,0.15);
     padding: 0 !important;
    background: white;
    color: #666;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
}


.vt-sort-btn:hover { border-color: #003d82; color: #003d82; }
#searchInput {
.vt-sort-btn.active { background: rgba(0,61,130,0.08); border-color: #003d82; color: #003d82; font-weight: 600; }
    background: transparent !important;
    border: none !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
    color: #333 !important;
}


/* ── Лічильник ── */
/* ── Приховати заголовок на головній ── */
.vt-count {
body.page-Головна_сторінка #firstHeading,
    font-size: 13.5px;
body.page-Головна_сторінка .mw-first-heading,
    color: #888;
body.page-Головна_сторінка .firstHeading {
    margin-bottom: 20px;
     display: none !important;
     padding: 0 4px;
}
}


.vt-count strong { color: #003d82; }
body.page-Головна_сторінка .mw-body-header,
body.page-Головна_сторінка #content-header {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}


/* ── Завантаження ── */
/* ════════════════════════════════════
.vt-loading {
  VUE CATEGORY CARDS
     display: flex;
═══════════════════════════════════════ */
    flex-direction: column;
 
     align-items: center;
.vcc-app { font-family: inherit; }
 
.vcc-topbar {
     display: flex;
     align-items: center;
     gap: 16px;
     gap: 16px;
     padding: 60px 0;
    margin-bottom: 16px;
     color: #888;
    flex-wrap: wrap;
     font-size: 15px;
}
 
.vcc-search {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
     padding: 8px 14px;
     border: 1px solid #d0d7de;
    border-radius: 8px;
     font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
}


.vt-spinner {
.vcc-search:focus {
     width: 40px;
     border-color: #1a3a6b;
     height: 40px;
     box-shadow: 0 0 0 3px rgba(26,58,107,.12);
    border: 3px solid rgba(0,61,130,0.1);
    border-top-color: #003d82;
    border-radius: 50%;
    animation: vt-spin 0.8s linear infinite;
}
}


@keyframes vt-spin {
.vcc-count {
     to { transform: rotate(360deg); }
     font-size: 14px;
    color: #555;
    white-space: nowrap;
}
}


/* ── Порожній результат ── */
.vcc-layout {
.vt-empty {
     display: flex;
     text-align: center;
     gap: 24px;
     padding: 60px 0;
     align-items: flex-start;
     color: #888;
}
}


.vt-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.vcc-main { flex: 1; min-width: 0; }
.vt-empty p { font-size: 15px; margin-bottom: 20px; }


.vt-reset-btn {
.vcc-grid {
    padding: 10px 24px;
    background: #003d82;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}
 
.vt-reset-btn:hover { background: #002d62; }
 
/* ── Сітка карток ── */
.vt-grid {
     display: grid;
     display: grid;
    grid-template-columns: repeat(4, 1fr);
     gap: 16px;
     gap: 16px;
    width: 100%;
    box-sizing: border-box;
}
}


/* ── Картка ── */
.vcc-card {
.vt-card {
     display: flex;
     display: flex;
     gap: 16px;
     flex-direction: row;
     padding: 20px;
    align-items: center;
     background: white;
     gap: 12px;
     border-radius: 16px;
     background: #fff;
     border: 1.5px solid rgba(0,61,130,0.08);
     border: 1px solid #e8edf3;
     box-shadow: 0 4px 16px rgba(0,0,0,0.06);
     border-radius: 12px;
     padding: 14px;
     text-decoration: none;
     text-decoration: none;
     color: inherit;
     color: inherit;
     transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
     transition: box-shadow .2s, transform .2s, border-color .2s;
     align-items: flex-start;
    cursor: pointer;
    overflow: hidden;
    max-width: 100%;
     box-sizing: border-box;
    min-width: 0;
}
}


.vt-card:hover {
.vcc-card:hover {
    transform: translateY(-4px);
     box-shadow: 0 4px 18px rgba(0,0,0,.10);
     box-shadow: 0 12px 32px rgba(0,61,130,0.15);
    transform: translateY(-2px);
     border-color: rgba(0,61,130,0.2);
     border-color: #1a3a6b33;
     text-decoration: none;
     text-decoration: none;
    color: inherit;
}
}


/* Фото */
.vcc-card-img-wrap {
.vt-card-img-wrap {
     flex-shrink: 0;
     flex-shrink: 0;
}
     width: 56px;
 
     height: 56px;
.vt-card-img {
     border-radius: 50%;
     width: 80px;
     overflow: hidden;
     height: 100px;
     background: #eef2f8;
    object-fit: cover;
     border-radius: 10px;
     display: block;
}
 
.vt-card-img-placeholder {
    width: 80px;
    height: 100px;
    border-radius: 10px;
     background: linear-gradient(135deg, #dce8f8, #b8d0f0);
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #003d82;
}
}


/* Тіло картки */
.vcc-card-img {
.vt-card-body {
     width: 100%;
     flex: 1;
     height: 100%;
    min-width: 0;
     object-fit: cover;
     display: flex;
     flex-direction: column;
    gap: 5px;
}
}


/* Бейдж посади */
.vcc-card-img-placeholder {
.vt-card-position {
     font-size: 22px;
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
     font-size: 11.5px;
     font-weight: 700;
     font-weight: 700;
     letter-spacing: 0.3px;
     color: #1a3a6b;
    align-self: flex-start;
     text-transform: uppercase;
     text-transform: uppercase;
}
}


.pos-професор { background: rgba(0,61,130,0.1); color: #003d82; }
.vcc-card-body { flex: 1; min-width: 0; }
.pos-доцент  { background: rgba(0,130,80,0.1);  color: #008250; }
.pos-викладач { background: rgba(180,100,0,0.1); color: #b46400; }
.pos-інше    { background: rgba(100,100,100,0.1); color: #555; }


.vt-card-name {
.vcc-card-badge {
     font-size: 15px;
    display: inline-block;
     font-size: 10px;
     font-weight: 700;
     font-weight: 700;
     color: #003d82;
    text-transform: uppercase;
     line-height: 1.3;
    letter-spacing: .6px;
     color: #b8860b;
    background: #fff8e1;
     border: 1px solid #f0d060;
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 4px;
}
}


.vt-card-occupation {
.vcc-card-name {
     font-size: 12.5px;
     font-size: 14px;
     color: #666;
    font-weight: 600;
     line-height: 1.4;
     color: #1a3a6b;
     line-height: 1.3;
    white-space: nowrap;
     overflow: hidden;
     overflow: hidden;
     display: -webkit-box;
     text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
}


.vt-card-title {
.vcc-card-desc {
     font-size: 12px;
     font-size: 12px;
     color: #999;
     color: #666;
     line-height: 1.3;
    margin-top: 3px;
    overflow: hidden;
     line-height: 1.4;
     display: -webkit-box;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     -webkit-box-orient: vertical;
     font-style: italic;
     overflow: hidden;
}
}


/* ── Адаптивність ── */
.vcc-sidebar {
@media (max-width: 700px) {
    width: 160px;
     .vt-controls { flex-direction: column; align-items: stretch; }
     flex-shrink: 0;
     .vt-grid { grid-template-columns: 1fr; }
    background: #f8f9fb;
     .vt-title { font-size: 1.8rem; }
    border: 1px solid #e8edf3;
     border-radius: 12px;
     padding: 14px;
}
}


/* ── Загальний layout ── */
.vcc-sidebar-title {
.vt-app {
     font-size: 11px;
     padding: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #888;
    margin-bottom: 10px;
}
}


.vt-layout {
.vcc-filters { display: flex; flex-direction: column; gap: 6px; }
     display: flex;
 
     gap: 24px;
.vcc-filter-btn {
     align-items: flex-start;
     padding: 7px 12px;
     width: 100%;
     border: 1px solid #d0d7de;
     box-sizing: border-box;
     border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #333;
     cursor: pointer;
     text-align: left;
    transition: background .15s, border-color .15s, color .15s;
}
}


.vt-main {
.vcc-filter-btn:hover { background: #eef2f8; border-color: #1a3a6b44; }
     flex: 1;
 
     min-width: 0;
.vcc-filter-btn.active {
     width: 100%;
     background: #1a3a6b;
     border-color: #1a3a6b;
    color: #fff;
     font-weight: 600;
}
}


/* ── Sidebar з фільтрами ── */
.vcc-loading {
.vt-sidebar {
     display: flex;
     width: 160px;
     align-items: center;
    flex-shrink: 0;
     gap: 12px;
     border: 1px solid rgba(0,61,130,0.12);
     padding: 40px 0;
    border-radius: 14px;
     color: #888;
     padding: 16px 12px;
     font-size: 15px;
     background: white;
     box-shadow: 0 4px 16px rgba(0,61,130,0.07);
     font-size: 14px;
    position: sticky;
    top: 16px;
}
}


.vt-sidebar-title {
.vcc-spinner {
     font-weight: 700;
     width: 24px;
     color: #003d82;
     height: 24px;
     font-size: 13.5px;
     border: 3px solid #e0e0e0;
     margin-bottom: 10px;
     border-top-color: #1a3a6b;
    padding-bottom: 8px;
     border-radius: 50%;
     border-bottom: 2px solid rgba(0,61,130,0.1);
     animation: vcc-spin .8s linear infinite;
     letter-spacing: 0.3px;
    text-transform: uppercase;
}
}


.vt-filters {
@keyframes vcc-spin { to { transform: rotate(360deg); } }
     display: flex;
 
     flex-direction: column;
.vcc-empty, .vcc-error {
     gap: 5px;
     text-align: center;
     padding: 48px 0;
     color: #888;
}
}


.vt-filter-btn {
.vcc-empty-icon { font-size: 36px; margin-bottom: 8px; }
    display: block;
 
     width: 100%;
.vcc-reset-btn {
     text-align: left;
     margin-top: 10px;
     padding: 7px 12px;
     padding: 8px 20px;
     border: 1px solid #1a3a6b;
     border-radius: 8px;
     border-radius: 8px;
    border: 1.5px solid transparent;
     background: #fff;
     background: transparent;
     color: #1a3a6b;
     color: #444;
    font-size: 13.5px;
    font-family: inherit;
     cursor: pointer;
     cursor: pointer;
     transition: all 0.18s ease;
    font-size: 13px;
     transition: background .15s;
}
}


.vt-filter-btn:hover {
.vcc-reset-btn:hover { background: #eef2f8; }
     background: rgba(0,61,130,0.06);
 
     color: #003d82;
.vcc-preview {
    position: absolute;
    z-index: 9999;
    width: 270px;
     background: #fff;
    border: 1px solid #e0e7f0;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
     padding: 16px;
     text-decoration: none;
     text-decoration: none;
    color: inherit;
    pointer-events: auto;
}
}


.vt-filter-btn.active {
.vcc-preview-top {
     background: #003d82;
     display: flex;
     color: white;
     align-items: center;
    border-color: #003d82;
     gap: 12px;
     font-weight: 600;
     margin-bottom: 10px;
     box-shadow: 0 2px 8px rgba(0,61,130,0.25);
}
}


/* Адаптивність */
.vcc-preview-img,
@media (max-width: 900px) {
.vcc-preview-img-placeholder {
     .vt-layout { flex-direction: column-reverse; }
    width: 52px;
     .vt-sidebar { width: 100%; }
     height: 52px;
     .vt-filters { flex-direction: row; flex-wrap: wrap; }
     border-radius: 50%;
     .vt-grid { grid-template-columns: repeat(2, 1fr); }
     object-fit: cover;
    flex-shrink: 0;
    background: #eef2f8;
    display: flex;
    align-items: center;
     justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #1a3a6b;
}
}


@media (max-width: 500px) {
.vcc-preview-badge {
     .vt-grid { grid-template-columns: 1fr; }
    font-size: 10px;
    font-weight: 700;
     text-transform: uppercase;
    letter-spacing: .5px;
    color: #b8860b;
    margin-bottom: 3px;
}
}


/* ── Превью попап ── */
.vcc-preview-name {
.vt-preview {
     font-size: 14px;
     position: absolute;
     font-weight: 600;
    z-index: 9999;
     color: #1a3a6b;
    width: 260px;
     line-height: 1.3;
    background: white;
}
     border-radius: 14px;
 
     border: 1px solid rgba(0,61,130,0.12);
.vcc-preview-divider {
     box-shadow: 0 8px 32px rgba(0,61,130,0.18);
     height: 1px;
    padding: 16px;
     background: #eef2f8;
    pointer-events: auto;
     margin: 10px 0;
    animation: vt-preview-in 0.15s ease;
     cursor: pointer;
     text-decoration: none;
     color: inherit;
    display: block;
    transition: transform 0.15s, box-shadow 0.15s;
}
}


.vt-preview:hover {
.vcc-preview-desc {
     transform: translateY(-2px);
    font-size: 12px;
     box-shadow: 0 12px 40px rgba(0,61,130,0.22);
    color: #555;
     text-decoration: none;
     line-height: 1.5;
    margin-bottom: 8px;
     display: -webkit-box;
    -webkit-line-clamp: 3;
     -webkit-box-orient: vertical;
    overflow: hidden;
}
}


@keyframes vt-preview-in {
.vcc-preview-row {
     from { opacity: 0; transform: translateY(6px) scale(0.97); }
     display: flex;
     to  { opacity: 1; transform: translateY(0) scale(1); }
    justify-content: space-between;
    font-size: 12px;
     margin-top: 6px;
    gap: 8px;
}
}


.vt-preview-top {
.vcc-preview-lbl { color: #999; white-space: nowrap; }
     display: flex;
 
     gap: 12px;
.vcc-preview-val {
     align-items: flex-start;
     color: #333;
     margin-bottom: 12px;
     text-align: right;
     overflow: hidden;
    text-overflow: ellipsis;
     white-space: nowrap;
}
}


.vt-preview-img {
/* ════════════════════════════════════
     width: 60px;
  МОБІЛЬНА ШАПКА (topbar)
     height: 75px;
═══════════════════════════════════════ */
     object-fit: cover;
 
     border-radius: 8px;
.mobile-topbar {
     flex-shrink: 0;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
     width: 100%;
    max-width: 100vw;
     height: 52px;
    z-index: 10003;
     align-items: center;
     gap: 8px;
    padding: 0 10px 0 4px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 61, 130, 0.1);
     box-shadow: 0 1px 8px rgba(0, 61, 130, 0.07);
}
}


.vt-preview-img-placeholder {
/* ── Кнопка гамбургера ── */
    width: 60px;
.topbar-menu-btn {
    height: 75px;
    border-radius: 8px;
    background: linear-gradient(135deg, #dce8f8, #b8d0f0);
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: center;
     justify-content: center;
     font-size: 1.6rem;
     width: 40px;
     font-weight: 700;
    height: 40px;
     color: #003d82;
    background: transparent;
    border: none;
     border-radius: 10px;
     cursor: pointer;
     flex-shrink: 0;
     flex-shrink: 0;
    padding: 0;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}
}


.vt-preview-info {
.topbar-menu-btn:hover,
    flex: 1;
.topbar-menu-btn:active {
     min-width: 0;
     background: rgba(0, 61, 130, 0.07);
}
}


.vt-preview-position {
.topbar-hamburger {
     display: inline-block;
     display: flex;
     padding: 2px 8px;
     flex-direction: column;
    border-radius: 20px;
     gap: 5px;
     font-size: 10.5px;
     align-items: center;
     font-weight: 700;
     justify-content: center;
    letter-spacing: 0.4px;
    text-transform: uppercase;
     margin-bottom: 6px;
}
}


.vt-preview-name {
.topbar-hamburger span {
     font-size: 14px;
     display: block;
     font-weight: 700;
    width: 20px;
     color: #003d82;
     height: 2px;
     line-height: 1.3;
     background: #003d82;
     border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
}
}


.vt-preview-divider {
/* Анімація в ✕ при відкритому меню */
     height: 1px;
.topbar-menu-btn.active .topbar-hamburger span:nth-child(1) {
     background: rgba(0,61,130,0.08);
    transform: translateY(7px) rotate(45deg);
     margin-bottom: 10px;
}
.topbar-menu-btn.active .topbar-hamburger span:nth-child(2) {
     opacity: 0;
     transform: scaleX(0);
}
.topbar-menu-btn.active .topbar-hamburger span:nth-child(3) {
     transform: translateY(-7px) rotate(-45deg);
}
}


.vt-preview-row {
/* Логотип у шапці */
.mobile-topbar-logo {
     display: flex;
     display: flex;
     flex-direction: column;
    align-items: center;
     margin-bottom: 8px;
    gap: 7px;
    text-decoration: none;
    color: #003d82;
     flex-shrink: 0;
     padding: 4px 6px;
    border-radius: 8px;
    transition: background 0.15s;
}
}


.vt-preview-lbl {
.mobile-topbar-logo:hover {
     font-size: 10.5px;
     background: rgba(0, 61, 130, 0.05);
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}
}


.vt-preview-val {
.mobile-topbar-logo img {
     font-size: 13px;
     width: 28px;
     color: #333;
    height: 28px;
     line-height: 1.4;
    object-fit: contain;
     border-radius: 6px;
     max-width: 28px !important;
}
}
/* ══════════════════════════════════════════════
  СТИЛІЗАЦІЯ ВЕРХНЬОЇ ПАНЕЛІ — SIMPLIFIED
══════════════════════════════════════════════ */


/* Прибираємо білий фон що заходить на логотип */
.mobile-topbar-logo-text {
#mw-page-base {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
     background: transparent !important;
    font-size: 13px;
     background-image: none !important;
    font-weight: 700;
    color: #003d82;
    white-space: nowrap;
    overflow: hidden;
     text-overflow: ellipsis;
     max-width: 100px;
}
}


/* Фон знизу під header */
/* ── Пошук у шапці ── */
#mw-head-base {
.mobile-topbar-search {
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 246, 255, 0.9)) !important;
     flex: 1;
     backdrop-filter: blur(20px) !important;
     min-width: 0;
     -webkit-backdrop-filter: blur(20px) !important;
     display: flex;
     border-bottom: 1px solid rgba(0, 61, 130, 0.12) !important;
     align-items: center;
     box-shadow: 0 2px 12px rgba(0, 61, 130, 0.08) !important;
     overflow: visible;
}
}


/* ═══ МЕНЮ КОРИСТУВАЧА (personal) ═══ */
/* Слот пошуку */
 
#mobile-topbar-search-slot {
#p-personal {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: visible;
}
 
/* Рідний блок #p-search всередині топбара */
#mobile-topbar-search-slot #p-search,
#mobile-topbar-search-slot .portlet,
#mobile-topbar-search-slot .mw-portlet {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
     background: transparent !important;
     background: transparent !important;
     border: none !important;
     border: none !important;
}
    box-shadow: none !important;
 
#p-personal ul {
     display: flex !important;
     display: flex !important;
     align-items: center !important;
     align-items: center !important;
     gap: 4px !important;
     flex: 1 !important;
    min-width: 0 !important;
}


    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(240,246,255,0.75)) !important;
/* Ховаємо заголовок блоку пошуку */
    backdrop-filter: blur(12px) !important;
#mobile-topbar-search-slot h3,
    -webkit-backdrop-filter: blur(12px) !important;
#mobile-topbar-search-slot .mw-portlet-label,
 
#mobile-topbar-search-slot label[for="searchInput"] {
    border: 1px solid rgba(0, 61, 130, 0.12) !important;
     display: none !important;
    border-radius: 12px !important;
    padding: 4px 8px !important;
     box-shadow: 0 2px 8px rgba(0, 61, 130, 0.06) !important;
}
}


#p-personal li {
/* Обгортка .body всередині #p-search */
     list-style: none !important;
#mobile-topbar-search-slot #p-search .body,
#mobile-topbar-search-slot #p-search > div {
     width: 100% !important;
     margin: 0 !important;
     margin: 0 !important;
     padding: 0 !important;
     padding: 0 !important;
}
}


#p-personal li a {
/* Форма пошуку */
    display: block !important;
/* Сброс всего внутри слота */
    color: #0645ad !important;
#mobile-topbar-search-slot * {
    font-family: system-ui, -apple-system, sans-serif !important;
     background: transparent !important;
     font-size: 13.5px !important;
     border: none !important;
     font-weight: 500 !important;
     box-shadow: none !important;
 
     padding: 6px 10px !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
}
}


#p-personal li a:hover {
/* Стилизуем именно внутренний контейнер */
     background-color: rgba(0, 61, 130, 0.1) !important;
#mobile-topbar-search-slot .vector-search-box-inner {
}
     background: rgba(0, 61, 130, 0.05) !important;
 
     border: 1px solid rgba(0, 61, 130, 0.15) !important;
 
     border-radius: 20px !important;
/* Активний пункт (наприклад сторінка користувача) */
#p-personal li.selected a,
#p-personal li a.mw-ui-button-primary {
     background: linear-gradient(to right, rgba(240,246,255,0.5), rgba(210,230,255,0.4)) !important;
     color: #003d82 !important;
    font-weight: 600 !important;
}
/* ═══ КОРЕКЦІЯ ФОНУ ТА ІКОНКИ КОРИСТУВАЧА ═══ */
 
/* Расширяем фон немного влево */
#p-personal ul {
    margin-left: -8px !important;  /* вынос влево */
    padding-left: 12px !important;   /* компенсируем внутренний отступ */
}
 
/* Контейнер имени пользователя */
#p-personal li#pt-userpage {
     display: flex !important;
     display: flex !important;
     align-items: center !important;
     align-items: center !important;
    padding: 0 8px 0 12px !important;
    height: 34px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;        /* добавь */
    vertical-align: middle !important; /* добавь */
}
#mobile-topbar-search-slot .vector-search-box-input {
    height: 34px !important;
    line-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
}
}


/* Иконка пользователя */
#mobile-topbar-search-slot .vector-search-box-inner:focus-within {
#p-personal li#pt-userpage .mw-userlink::before,
    border-color: rgba(0, 61, 130, 0.4) !important;
#p-personal li#pt-userpage a::before {
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.08) !important;
     margin-right: 8px !important;   /* расстояние между иконкой и текстом */
     background: #fff !important;
}
}


/* Если используется встроенный avatar span */
/* Поле вводу */
#p-personal li#pt-userpage .mw-userlink {
#mobile-topbar-search-slot #searchInput,
     display: flex !important;
#mobile-topbar-search-slot input[type="search"],
     align-items: center !important;
#mobile-topbar-search-slot input[name="search"] {
     gap: 8px !important;           /* гарантированный отступ */
    flex: 1 !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 13.5px !important;
    color: #333 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    height: 34px !important;
     line-height: 34px !important;
     vertical-align: middle !important;
     display: block !important;
}
}


 
#mobile-topbar-search-slot input::placeholder {
#p-personal li#pt-userpage > a {
     color: #aaa !important;
    padding-left: 26px !important;
     background-position: 6px center !important;
}
}


 
/* Кнопка пошуку */
 
#mobile-topbar-search-slot #searchButton,
/* ═══ ТАБУЛЯЦІЯ (Головна, Обговорення, Читати, Редагувати) ═══ */
#mobile-topbar-search-slot button[type="submit"],
#p-namespaces li,
#mobile-topbar-search-slot input[type="submit"] {
#p-views li {
     background: transparent !important;
     background: transparent !important;
     border: none !important;
     border: none !important;
     border-radius: 0 !important;
     padding: 2px !important;
     margin-right: 8px !important;
    margin: 0 !important;
     margin-bottom: 0 !important;
    cursor: pointer !important;
     padding: 0 !important;
    color: #999 !important;
    display: flex !important;
    align-items: center !important;
     justify-content: center !important;
     flex-shrink: 0 !important;
     width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    transition: color 0.15s, background 0.15s !important;
}
}


#p-namespaces li a,
#mobile-topbar-search-slot #searchButton:hover,
#p-views li a {
#mobile-topbar-search-slot button[type="submit"]:hover {
     color: #0645ad !important;
     color: #003d82 !important;
     font-family: system-ui, -apple-system, sans-serif !important;
    background: rgba(0, 61, 130, 0.08) !important;
     font-size: 13.5px !important;
}
     font-weight: 500 !important;
 
/* Підказки автокомпліту MediaWiki */
#mobile-topbar-search-slot .suggestions,
.suggestions {
    position: fixed !important;
    top: 52px !important;
     z-index: 10020 !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 8px 24px rgba(0, 61, 130, 0.14) !important;
    max-width: calc(100vw - 20px) !important;
}
#mobile-topbar-search-slot {
    display: flex !important;
     align-items: center !important;
     justify-content: center !important;
    flex: 1 !important;
}
}


#p-namespaces li.selected,
#mobile-topbar-search-slot form {
#p-views li.selected {
    width: 100% !important;
     background: linear-gradient(to right, rgba(240, 246, 255, 0.4), rgba(210, 230, 255, 0.3)) !important;
}
     border-bottom: 3px solid #003d82 !important;
#mobile-topbar-search-slot .vector-search-box,
#mobile-topbar-search-slot .vector-search-box-form {
     display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
     width: 100% !important;
}
}


#p-namespaces li.selected a,
#mobile-topbar-search-slot h3 {
#p-views li.selected a {
     display: none !important;
     color: #003d82 !important;
    font-weight: 700 !important;
}
}


/* ═══ ПОШУК ═══ */
/* ── Юзер-аватар ── */
#p-search {
.topbar-user-wrap {
     background: transparent !important;
     position: static;
    border: none !important;
     flex-shrink: 0;
    border-radius: 0 !important;
}
    padding: 2px 6px !important;
     margin-bottom: 0 !important;
}


#simpleSearch {
.topbar-user-avatar {
     background: transparent !important;
    display: flex;
     border: none !important;
    align-items: center;
     padding: 0 !important;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
     background: linear-gradient(135deg, #003d82, #0066cc);
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
     transition: box-shadow 0.15s, transform 0.15s;
     box-shadow: 0 2px 8px rgba(0, 61, 130, 0.25);
}
}


#searchInput {
.topbar-user-avatar:hover {
     background: transparent !important;
     box-shadow: 0 4px 14px rgba(0, 61, 130, 0.35);
    border: none !important;
     transform: scale(1.05);
    font-family: system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
     color: #333 !important;
}
}


.topbar-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #555;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}


 
.topbar-login-btn:hover {
 
    background: rgba(0, 61, 130, 0.07);
/* Приховати заголовок "Головна сторінка" ТІЛЬКИ на головній */
     color: #003d82;
body.page-Головна_сторінка #firstHeading,
body.page-Головна_сторінка .mw-first-heading,
body.page-Головна_сторінка .firstHeading {
     display: none !important;
}
}


/* Приховати синю смужку (border-bottom) під заголовком, якщо вона лишається */
/* ── Дропдаун — fixed щоб не виходив за межі ── */
body.page-Головна_сторінка .mw-body-header,
.topbar-user-dropdown {
body.page-Головна_сторінка #content-header {
    position: fixed;
     border-bottom: none !important;
    top: 52px;
     padding-bottom: 0 !important;
    right: 8px;
     margin-bottom: 0 !important;
    left: auto;
    width: 210px;
    background: #fff;
    border: 1px solid rgba(0, 61, 130, 0.1);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 61, 130, 0.14), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
     pointer-events: none;
     transition: opacity 0.18s ease, transform 0.18s ease;
     z-index: 10015;
}
}
/* ════════════════════════════════════
  МОБІЛЬНІ ФІКСИ — HEADER + SIDEBAR
═══════════════════════════════════════ */


/* Ховаємо sidebar на мобільних */
.topbar-user-dropdown.open {
@media (max-width: 1100px) {
     opacity: 1;
     #mw-panel {
     transform: translateY(0) scale(1);
        display: none !important;
     pointer-events: auto;
     }
}
      
 
    /* Контент на всю ширину без sidebar */
.topbar-dropdown-header {
    #content,
    display: flex;
    .mw-body {
    align-items: center;
        margin-left: 0 !important;
     gap: 10px;
    }
    padding: 14px 14px 12px;
   
    background: linear-gradient(135deg, rgba(0,61,130,0.04), rgba(0,102,204,0.06));
    /* Логотип менший */
    #p-logo {
        width: 80px !important;
        height: 80px !important;
     }
   
    #p-logo a {
        width: 80px !important;
        height: 80px !important;
        background-size: contain !important;
    }
}
}


/* ════════════════════════════════════════════════════════════
.topbar-dropdown-avatar {
  ПРОСТИЙ РОБОЧИЙ МОБІЛЬНИЙ ФІКС
    display: flex;
════════════════════════════════════════════════════════════ */
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003d82, #0066cc);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}


/* ══════════ 1100px — ПЛАНШЕТИ ══════════ */
.topbar-dropdown-name {
@media (max-width: 1100px) {
     font-family: system-ui, -apple-system, sans-serif;
     /* Ховаємо sidebar повністю */
     font-size: 13px;
    #mw-panel {
    font-weight: 600;
        display: none !important;
    color: #003d82;
    }
     overflow: hidden;
   
     text-overflow: ellipsis;
    /* Контент без margin */
     white-space: nowrap;
    #content,
    .mw-body {
        margin-left: 0 !important;
     }
   
    /* Логотип менший */
    #p-logo a {
        background-size: 70px !important;
        width: 70px !important;
        height: 70px !important;
     }
   
    /* Центрування категорій */
     .category-grid-container {
        justify-items: center !important;
     }
   
    /* Заголовок без компенсації */
    .section-categories {
        margin-right: 0 !important;
    }
}
}


/* ══════════ 900px — ПЛАНШЕТИ ══════════ */
.topbar-dropdown-divider {
@media (max-width: 900px) {
     height: 1px;
     /* Header компактніше */
    background: rgba(0, 61, 130, 0.07);
    #p-personal li a {
     margin: 0;
        font-size: 12px !important;
        padding: 4px 8px !important;
     }
   
    #p-namespaces li a,
    #p-views li a {
        font-size: 12px !important;
        padding: 5px 10px !important;
    }
}
}


/* ══════════ 768px — МАЛІ ПЛАНШЕТИ ══════════ */
.topbar-dropdown-item {
@media (max-width: 768px) {
     display: flex;
     /* Логотип ще менший */
     align-items: center;
     #p-logo a {
    gap: 9px;
        background-size: 60px !important;
    padding: 11px 14px;
        width: 60px !important;
     font-family: system-ui, -apple-system, sans-serif;
        height: 60px !important;
     font-size: 13.5px;
     }
    color: #333;
   
    text-decoration: none;
    /* Header: все у вертикальні блоки */
    transition: background 0.13s;
    #mw-head {
     cursor: pointer;
        position: relative !important;
}
        padding-top: 70px !important;
 
        min-height: auto !important;
.topbar-dropdown-item svg {
     }
    color: #666;
   
    flex-shrink: 0;
    /* Верхнє меню */
}
    #p-personal {
 
        position: relative !important;
.topbar-dropdown-item:hover {
        float: none !important;
    background: rgba(0, 61, 130, 0.05);
        right: auto !important;
    color: #003d82;
        top: auto !important;
    text-decoration: none;
        text-align: center !important;
}
        margin: 0 auto 8px !important;
 
     }
.topbar-dropdown-item:hover svg {
   
    color: #003d82;
    #p-personal ul {
}
        display: inline-flex !important;
 
        flex-wrap: wrap !important;
.topbar-dropdown-logout {
        justify-content: center !important;
    color: #c0392b;
    }
}
   
 
    /* Ліва навігація */
.topbar-dropdown-logout svg {
    #left-navigation {
    color: #c0392b;
        float: none !important;
        margin: 0 auto 8px !important;
        text-align: center !important;
    }
   
    /* Права навігація */
    #right-navigation {
        float: none !important;
        margin: 0 auto 8px !important;
        text-align: center !important;
    }
   
    #p-namespaces,
    #p-views {
        float: none !important;
        display: inline-block !important;
    }
   
    /* Пошук */
    #p-search {
        float: none !important;
        margin: 0 auto !important;
        max-width: 90% !important;
    }
}
}


/* ══════════ 520px ТЕЛЕФОНИ ══════════ */
.topbar-dropdown-logout:hover {
@media (max-width: 520px) {
    background: rgba(192, 57, 43, 0.06);
     /* Логотип маленький */
    color: #c0392b;
    #p-logo a {
}
        background-size: 50px !important;
 
        width: 50px !important;
/* ════════════════════════════════════
        height: 50px !important;
  МОБІЛЬНЕ МЕНЮ ОВЕРЛЕЙ
    }
═══════════════════════════════════════ */
   
 
    /* Header компактніший */
.mobile-menu-toggle {
     #mw-head {
    display: none !important;
         padding-top: 60px !important;
}
 
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    backdrop-filter: blur(2px);
}
 
.mobile-menu-overlay.open {
     display: block;
}
 
body.mobile-nav-open #mw-panel {
    transform: translateX(0) !important;
    box-shadow: 4px 0 32px rgba(0, 61, 130, 0.18) !important;
}
 
/* Прибираємо нижню панель — більше не використовується */
.mobile-bottom-nav {
    display: none !important;
}
 
/* ════════════════════════════════════
  АДАПТИВНІСТЬ — BREAKPOINTS
═══════════════════════════════════════ */
 
/* ── 1280px: трохи звужуємо праву колонку ── */
@media (max-width: 1280px) {
     .right-column {
         width: 300px;
        min-width: 300px;
     }
     }
      
     .section-categories {
     #p-personal li a,
        margin-right: calc(300px + 24px);
     #p-namespaces li a,
    }
     #p-views li a {
    .card-image img {
         font-size: 11px !important;
        width: 190px;
         padding: 4px 8px !important;
        height: 190px;
    }
}
 
/* ── 1100px: планшет landscape — мобільна шапка ── */
@media (max-width: 1100px) {
 
    /* Показуємо мобільну шапку */
    .mobile-topbar {
        display: flex !important;
    }
 
    /* Відступ зверху для контенту (під мобільну шапку 52px) */
    #mw-body,
    .mw-body,
    #content,
    #bodyContent,
    .mw-page-container {
        padding-top: 52px !important;
        box-sizing: border-box !important;
    }
 
    /* Без відступу знизу — нижнього таббара більше немає */
    body {
        padding-bottom: 0 !important;
    }
 
    /* Ховаємо оригінальну шапку MediaWiki повністю */
    #mw-head,
    #mw-head-base,
     #p-personal,
    #mw-page-base {
        display: none !important;
    }
 
    /* Бокова навігація — ховається за екран зліва */
    #mw-panel {
        position: fixed !important;
        top: 52px !important;
        left: 0 !important;
        height: calc(100vh - 52px) !important;
        width: 280px !important;
        overflow-y: auto !important;
        z-index: 10002 !important;
        padding: 16px 12px 24px !important;
        margin: 0 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        background: rgba(248, 251, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-right: 1px solid rgba(0, 61, 130, 0.12) !important;
    }
 
    /* Контент займає весь екран */
    #mw-content-column,
    .mw-content-column,
    #content,
    .mw-body {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
 
    /* Welcome — стек */
    .welcome-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        padding: 32px 5vw 28px;
    }
 
    .welcome-text {
        transform: none;
    }
 
    .welcome-title {
        font-size: 2rem;
    }
 
    .welcome-subtitle {
        font-size: 1.2rem;
    }
 
    .stats-panel {
        width: 100%;
        max-width: 460px;
    }
 
    /* Заголовок категорій — без правого відступу */
    .section-categories {
        margin-right: 0;
        font-size: 1.8rem;
    }
 
    /* Layout — стек */
    .main-content-layout {
        flex-direction: column;
        padding: 0 4vw;
        gap: 20px;
    }
 
    .category-column {
        width: 100%;
    }
 
    /* Права колонка — горизонтально */
    .right-column {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }
 
    .right-column > * {
        flex: 1 1 280px;
        min-width: 280px;
    }
 
    /* Сітка категорій — 3 колонки */
    .category-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
 
    .card-image img {
        width: 160px;
        height: 160px;
    }
}
 
/* ── 820px: планшет portrait — 2 колонки ── */
@media (max-width: 820px) {
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
 
    .card-image img {
        width: 140px;
        height: 140px;
    }
 
    .welcome-title {
        font-size: 1.75rem;
    }
 
    /* Ресурси */
    .resources-and-contacts {
        flex-direction: column;
        gap: 16px;
        margin: 30px 4vw 40px;
    }
 
    .resource-block,
    .contacts-block {
        min-width: unset;
        width: 100%;
    }
 
    /* VCC фільтри — горизонтально зверху */
    .vcc-layout {
        flex-direction: column-reverse;
    }
 
    .vcc-sidebar {
        width: 100%;
        padding: 12px;
    }
 
    .vcc-filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
 
    .vcc-filter-btn {
        flex: 0 0 auto;
        font-size: 12px;
        padding: 5px 10px;
    }
 
    .vcc-sidebar-title {
        margin-bottom: 8px;
    }
}
 
/* ── 600px: великий мобільний ── */
@media (max-width: 600px) {
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
 
    .card-image img {
        width: 110px;
        height: 110px;
    }
 
    .card-title {
        font-size: 13px;
        padding: 6px 8px 10px;
    }
 
    .welcome-wrapper {
        padding: 24px 4vw 20px;
        gap: 18px;
    }
 
    .welcome-title {
        font-size: 1.5rem;
    }
 
    .welcome-subtitle {
        font-size: 1rem;
    }
 
    .section-categories {
        font-size: 1.5rem;
        margin: 20px 0 20px;
    }
 
    .main-content-layout {
        padding: 0 3vw;
    }
 
    /* Випадкові статті — менший thumb */
    .random-article-thumb-wrap,
    .random-article-thumb-placeholder {
        width: 64px;
        height: 64px;
        min-width: 64px;
        min-height: 64px;
    }
 
    .random-article-title {
        font-size: 13px;
    }
 
    .random-article-excerpt {
        font-size: 12px;
    }
 
    /* Права колонка */
    .right-column {
        flex-direction: column;
    }
 
    .right-column > * {
        min-width: unset;
        width: 100%;
    }
}
 
/* ── 480px: мобільний ── */
@media (max-width: 480px) {
    .category-grid-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
 
    .card-image {
        padding: 14px 0 8px;
    }
 
    .card-image img {
        width: 90px;
        height: 90px;
    }
 
    .welcome-title {
        font-size: 1.35rem;
    }
 
    .section-categories {
        font-size: 1.3rem;
    }
 
    .vcc-grid {
        grid-template-columns: 1fr !important;
    }
 
    /* Ресурси */
    .resource-block,
    .contacts-block {
        padding: 18px 16px 20px;
    }
 
    .resource-block h2,
    .contacts-block h2 {
        font-size: 1.15rem !important;
    }
 
    .resource-block li,
     .contacts-block li {
        font-size: 13px;
        padding: 7px 10px 7px 24px;
    }
}
 
/* ── 360px: дуже маленький мобільний ── */
@media (max-width: 360px) {
    .category-grid-container {
        grid-template-columns: 1fr;
    }
 
    .card-image img {
        width: 120px;
        height: 120px;
    }
 
    .welcome-title {
        font-size: 1.2rem;
    }
 
    .section-categories {
        font-size: 1.1rem;
    }
}
 
/* ════════════════════════════════════
  TOUCH DEVICES: прибираємо hover-анімації
═══════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    .category-card:hover {
        transform: none;
        box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    }
 
    .category-card:hover .card-image img {
        animation: none;
        transform: none;
    }
 
    .category-card:hover::before {
        opacity: 0;
    }
 
    .random-article-card:hover {
        transform: none;
    }
 
    .resource-block:hover,
    .contacts-block:hover {
        transform: none;
    }
 
    body #mw-panel .portal:hover {
        transform: none !important;
    }
 
    .vcc-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
 
    .category-card:active {
        transform: scale(0.98);
        box-shadow: 0 4px 16px rgba(0, 61, 130, 0.15);
    }
 
    .vcc-card:active {
        transform: scale(0.98);
    }
}
 
/* ════════════════════════════════════
  PRINT
═══════════════════════════════════════ */
@media print {
    #mw-panel,
    .scroll-progress,
    .mobile-topbar,
    .mobile-menu-overlay,
    .random-articles-panel,
    .stats-panel {
        display: none !important;
    }
 
    .main-content-layout {
        flex-direction: column;
        padding: 0;
    }
 
    .category-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
     }
 
    .category-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
 
/* ════════════════════════════════════
  ІНФОБОКС ТА ЗОБРАЖЕННЯ В СТАТТЯХ
═══════════════════════════════════════ */
 
/* Картинки в статтях — завжди масштабуються */
.mw-parser-output img,
.mw-parser-output .thumbimage img,
.mw-parser-output .infobox img {
    max-width: 100% !important;
    height: auto !important;
}
 
/* thumb/frame обгортки */
.mw-parser-output .thumb,
.mw-parser-output .thumbinner {
    max-width: 100% !important;
    box-sizing: border-box !important;
}
 
/* Таблиці — не виходять за межі */
.mw-parser-output table,
.mw-parser-output .infobox,
.mw-parser-output .wikitable {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}
 
/* ── Мобільні ≤1100px ── */
@media (max-width: 1100px) {
 
    /* Інфобокс — знімаємо float, на всю ширину */
    .mw-parser-output .infobox,
    .mw-parser-output table.infobox {
        float: none !important;
        margin: 0 0 20px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: table !important;
    }
 
    /* Таблиці — горизонтальний скрол */
    .mw-parser-output .wikitable {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
 
    /* Всі float-картинки — знімаємо float */
    .mw-parser-output .thumb,
    .mw-parser-output .thumb.tright,
    .mw-parser-output .thumb.tleft,
    .mw-parser-output .thumbinner,
    .mw-parser-output .floatright,
    .mw-parser-output .floatleft,
    .mw-parser-output [style*="float: right"],
    .mw-parser-output [style*="float:right"],
    .mw-parser-output [style*="float: left"],
    .mw-parser-output [style*="float:left"] {
        float: none !important;
        display: block !important;
        margin: 0 auto 16px !important;
        max-width: 100% !important;
        width: auto !important;
        clear: both !important;
    }
 
    .mw-parser-output .thumb img,
    .mw-parser-output .thumbinner img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
    }
 
    /* Thumb-блоки — перебиваємо inline width від MediaWiki (style="width:Npx") */
    .mw-parser-output .thumb,
    .mw-parser-output .thumb.tright,
    .mw-parser-output .thumb.tleft,
    .mw-parser-output .thumbinner,
    .mw-parser-output .thumb[style],
    .mw-parser-output .thumbinner[style] {
        width: clamp(120px, 48vw, 280px) !important;
        max-width: clamp(120px, 48vw, 280px) !important;
        box-sizing: border-box !important;
    }
 
    .mw-parser-output .thumbcaption {
        text-align: center !important;
    }
 
    /* Інфобокс: фото масштабується пропорційно ширині екрану */
    .mw-parser-output .infobox td:has(img),
    .mw-parser-output table.infobox td:has(img) {
        width: clamp(100px, 44vw, 220px) !important;
        max-width: clamp(100px, 44vw, 220px) !important;
        padding: 6px !important;
    }
 
    .mw-parser-output .infobox td:has(img) img,
    .mw-parser-output table.infobox td:has(img) img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}
 
/* ── Маленькі екрани ≤430px: інфобокс вертикально ── */
@media (max-width: 430px) {
 
    /* Вся таблиця стає вертикальною */
    .mw-parser-output .infobox,
    .mw-parser-output table.infobox {
        display: block !important;
    }
 
    .mw-parser-output .infobox tbody,
    .mw-parser-output table.infobox tbody {
        display: block !important;
    }
 
    /* Кожен рядок — блок */
    .mw-parser-output .infobox tr,
    .mw-parser-output table.infobox tr {
        display: block !important;
        border-bottom: 1px solid rgba(0,0,0,0.07) !important;
        overflow: hidden !important;
    }
 
    /* Комірки — блоки */
    .mw-parser-output .infobox td,
    .mw-parser-output .infobox th,
    .mw-parser-output table.infobox td,
    .mw-parser-output table.infobox th {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 6px 10px !important;
        border: none !important;
    }
 
    /* Заголовок */
    .mw-parser-output .infobox caption,
    .mw-parser-output table.infobox caption {
         font-size: 14px !important;
        font-weight: 700 !important;
         padding: 10px 12px 6px !important;
        display: block !important;
    }
 
    /* Фото — на всю ширину, не більше 260px */
    .mw-parser-output .infobox img,
    .mw-parser-output table.infobox img {
        width: 100% !important;
        max-width: 260px !important;
        height: auto !important;
        border-radius: 8px !important;
        display: block !important;
        margin: 4px auto !important;
    }
 
    /* Рядки з th+td (назва + значення) — горизонтально */
    .mw-parser-output .infobox tr:has(th + td),
    .mw-parser-output table.infobox tr:has(th + td) {
        display: flex !important;
        align-items: flex-start !important;
    }
 
    .mw-parser-output .infobox tr:has(th + td) th,
    .mw-parser-output table.infobox tr:has(th + td) th {
        width: 38% !important;
        text-align: left !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #555 !important;
        padding: 7px 6px 7px 10px !important;
    }
 
    .mw-parser-output .infobox tr:has(th + td) td,
    .mw-parser-output table.infobox tr:has(th + td) td {
        width: 62% !important;
        text-align: left !important;
        font-size: 13px !important;
        padding: 7px 10px 7px 6px !important;
     }
     }
}
}

Поточна версія на 15:18, 25 березня 2026

/* ════════════════════════════════════
   ГЛОБАЛЬНИЙ ФІКС ГОРИЗОНТАЛЬНОГО СКРОЛУ
═══════════════════════════════════════ */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Контейнери MediaWiki не повинні виходити за межі */
#mw-page-base,
#mw-head-base,
#mw-head,
#mw-panel,
#content,
.mw-body,
.mw-page-container,
.mw-page-container-inner,
.mw-content-container,
#bodyContent,
#mw-content-text,
.mw-parser-output {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Блочні елементи не виходять за межі екрану */
div, section, article, aside, nav, header, footer, main,
p, ul, ol, li, table, form, fieldset, blockquote, pre {
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Заголовок сторінки ── */
#firstHeading {
    font-size: clamp(28px, 4vw, 48px);
}

/* ── Бокове меню ── */
#mw-panel {
    font-size: clamp(14px, 1.2vw, 18px);
}

/* ── Прибираємо обмеження Vector ── */
body.skin-vector-2022 .mw-page-container-inner,
body.skin-vector .mw-content-container,
body.skin-vector .vector-body,
body.skin-vector #bodyContent {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.skin-vector-2022 .mw-body,
body.skin-vector-2022 .mw-body-content {
    max-width: none !important;
    margin: 0 !important;
}

/* ════════════════════════════════════
   ПРИВІТАННЯ + СТАТИСТИКА
═══════════════════════════════════════ */
.welcome-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 40px 5vw 40px;
    box-sizing: border-box;
    width: 100%;
}

.welcome-text {
    flex: 1;
    text-align: center;
    transform: translateX(-50px);
}

.welcome-subtitle {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.45rem;
    font-weight: 400;
    color: #444;
    letter-spacing: 0.6px;
    margin-bottom: 10px;
    opacity: 0.92;
}

.welcome-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.45rem;
    font-weight: 700;
    line-height: 1.18;
    color: #003d82;
    letter-spacing: -0.3px;
    margin: 0;
}

/* ── Панель статистики ── */
.stats-panel {
    width: 260px;
    flex-shrink: 0;
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,61,130,0.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.07);
    overflow: hidden;
}

.stats-panel-header {
    background: rgba(210, 230, 255, 0.35);
    color: #003d82;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(0,61,130,0.1);
}

.stats-panel-list {
    padding: 4px 0;
}

.stats-panel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(0,61,130,0.05);
    transition: background 0.2s;
}

.stats-panel-item:last-child {
    border-bottom: none;
}

.stats-panel-item:hover {
    background: rgba(210, 230, 255, 0.2);
}

.stats-panel-label {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #555;
}

.stats-panel-number {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #003d82;
}

/* ════════════════════════════════════
   ЗАГОЛОВОК КАТЕГОРІЙ
═══════════════════════════════════════ */
.section-categories {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    color: #003d82;
    text-align: center;
    margin: 30px 0 30px;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
    margin-right: calc(360px + 24px);
}

.section-categories::after {
    content: '';
    display: block;
    width: 90px;
    height: 4px;
    background: #ffd700;
    margin: 14px auto 0;
    border-radius: 2px;
}

/* ════════════════════════════════════
   ОСНОВНИЙ LAYOUT: категорії + права колонка
═══════════════════════════════════════ */
.main-content-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 0 5vw;
    margin: 0 0 70px;
    box-sizing: border-box;
    width: 100%;
}

/* ── Ліва колонка з заголовком і сіткою ── */
.category-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ── Сітка карток — 3 в ряд ── */
.category-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    flex: 1;
    min-width: 0;
}

/* ── Права колонка ── */
.right-column {
    width: 360px;
    min-width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: flex-start;
    padding-top: 0;
}

/* ════════════════════════════════════
   КАРТКИ КАТЕГОРІЙ
═══════════════════════════════════════ */
.category-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    transition: all 0.28s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    border: 1px solid rgba(0,61,130,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,61,130,0.18);
    border-color: rgba(0,61,130,0.15);
}

.card-image {
    padding: 20px 0 12px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.card-image img {
    width: 230px;
    height: 230px;
    object-fit: contain;
    transition: transform 0.35s ease;
}

.category-card:hover .card-image img {
    transform: scale(1.12);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #003d82;
    text-align: center;
    padding: 8px 12px 12px;
    line-height: 1.4;
    flex-grow: 0;
    background: rgba(210, 230, 255, 0.15);
    border-radius: 10px;
    margin: 0 10px 14px;
}

.card-title pre {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
    white-space: normal !important;
}

/* ════════════════════════════════════
   ВИПАДКОВІ СТАТТІ
═══════════════════════════════════════ */
.random-articles-panel {
    background: white;
    border-radius: 16px;
    border: 1px solid rgba(0,61,130,0.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.random-articles-header {
    background: rgba(210, 230, 255, 0.35);
    color: #003d82;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,61,130,0.1);
}

#random-articles-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.random-article-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    background: rgba(210, 230, 255, 0.12);
    border: 1px solid rgba(0,61,130,0.07);
    text-decoration: none;
    color: inherit;
    transition: all 0.22s ease;
    align-items: flex-start;
}

.random-article-card:hover {
    background: rgba(210, 230, 255, 0.35);
    border-color: rgba(0,61,130,0.18);
    transform: translateX(3px);
    text-decoration: none;
}

.random-article-thumb-wrap {
    width: 90px;
    height: 90px;
    min-width: 90px;
    min-height: 90px;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    background: #eef2f8;
}

.random-article-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.random-article-thumb-placeholder {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e8eef7, #c8d8ee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.random-article-info {
    flex: 1;
    min-width: 0;
}

.random-article-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #003d82;
    margin-bottom: 6px;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.random-article-excerpt {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #555;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.random-articles-loading {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 13px;
    font-family: system-ui, sans-serif;
}

.random-articles-refresh {
    display: none;
}

/* ════════════════════════════════════
   РЕСУРСИ ТА ПОСИЛАННЯ
═══════════════════════════════════════ */
.resources-and-contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 50px 5vw 60px;
    align-items: stretch;
}

.resource-block,
.contacts-block {
    flex: 1;
    min-width: 300px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 246, 255, 0.85));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 61, 130, 0.12);
    border-radius: 16px;
    padding: 24px 28px 28px;
    box-shadow: 0 6px 20px rgba(0, 61, 130, 0.08);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.resource-block::before,
.contacts-block::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, transparent, rgba(0, 61, 130, 0.04), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.resource-block:hover,
.contacts-block:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 61, 130, 0.14);
    border-color: rgba(0, 61, 130, 0.18);
}

.resource-block:hover::before,
.contacts-block:hover::before {
    opacity: 1;
    top: -25%;
    left: -25%;
}

.resource-block ul,
.contacts-block ul {
    flex: 1;
    list-style: none;
    padding-left: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.resource-block h2,
.contacts-block h2 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #003d82 !important;
    margin: 0 0 18px 0 !important;
    padding: 0 0 12px 0 !important;
    line-height: 1.3 !important;
    letter-spacing: -0.3px !important;
    position: relative;
    z-index: 1;
}

.resource-block li,
.contacts-block li {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 14.5px;
    color: #444;
    padding: 8px 12px 8px 28px;
    position: relative;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.4);
}

.resource-block li:hover,
.contacts-block li:hover {
    background: rgba(0, 61, 130, 0.06);
    transform: translateX(4px);
}

.resource-block li::before,
.contacts-block li::before {
    content: '→';
    position: absolute;
    left: 10px;
    color: #003d82;
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.2s;
}

.resource-block li:hover::before,
.contacts-block li:hover::before {
    transform: translateX(3px);
}

.resource-block li a,
.contacts-block li a {
    color: #0645ad;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.resource-block li a:hover,
.contacts-block li a:hover {
    color: #003d82;
    text-decoration: none;
}

/* ════════════════════════════════════
   MODERN UI: градієнти, glassmorphism, анімації
══════════════════════════════════════ */

/* ── Прогрес скролла ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #003d82, #0066cc, #ffd700);
    z-index: 99999;
    transition: width 0.1s ease;
    box-shadow: 0 2px 8px rgba(0, 61, 130, 0.3);
}

/* ── Градієнтний фон для welcome ── */
.welcome-wrapper {
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
    position: relative;
    overflow: hidden;
}

.welcome-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(to bottom, white 0%, transparent 15%, transparent 85%, white 100%),
        linear-gradient(to right, white 0%, transparent 10%, transparent 90%, white 100%);
    pointer-events: none;
    z-index: 10;
}

.welcome-text,
.stats-panel {
    position: relative;
    z-index: 11;
}

/* ── Glassmorphism для статистики ── */
.stats-panel {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 61, 130, 0.15) !important;
}

.stats-panel-header {
    background: linear-gradient(135deg, rgba(0, 61, 130, 0.1), rgba(0, 102, 204, 0.15)) !important;
}

/* ── Glassmorphism для випадкових статей ── */
.random-articles-panel {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ── Gradient category cards ── */
.category-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(0, 61, 130, 0.08);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, transparent, rgba(0, 61, 130, 0.05), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.category-card:hover::before {
    opacity: 1;
    top: -25%;
    left: -25%;
}

.category-card:hover .card-image img {
    animation: icon-bounce 0.6s ease;
}

@keyframes icon-bounce {
    0%, 100% { transform: scale(1.12) translateY(0); }
    50% { transform: scale(1.12) translateY(-8px); }
}

.category-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 48px rgba(0, 61, 130, 0.2);
}

@keyframes rainbow {
    0% { color: #003d82; }
    25% { color: #0066cc; }
    50% { color: #4a90e2; }
    75% { color: #0066cc; }
    100% { color: #003d82; }
}

.stats-panel-number.animating {
    animation: rainbow 1.5s ease-in-out;
}

/* ── Gradient title ── */
.welcome-title {
    background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #003d82 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Neomorphism for random articles ── */
.random-article-card {
    background: linear-gradient(145deg, #ffffff, #f0f6ff);
    box-shadow:
        8px 8px 16px rgba(0, 61, 130, 0.08),
        -8px -8px 16px rgba(255, 255, 255, 0.9);
    border: none !important;
}

.random-article-card:hover {
    box-shadow:
        12px 12px 24px rgba(0, 61, 130, 0.12),
        -12px -12px 24px rgba(255, 255, 255, 1);
    background: linear-gradient(145deg, #f0f6ff, #ffffff);
}

.section-categories {
    text-shadow: 0 2px 8px rgba(0, 61, 130, 0.1);
}

.section-categories::after {
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700) !important;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* ════════════════════════════════════
   БОКОВЕ МЕНЮ
═══════════════════════════════════════ */

body #mw-panel,
.mw-body #mw-panel {
    background: transparent !important;
    padding: 0 !important;
    margin-left: 0px !important;
    margin-right: 15px !important;
}

body #mw-panel .portal,
.mw-body #mw-panel .portal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 246, 255, 0.85)) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: 16px !important;
    padding: 16px 14px 14px !important;
    margin-bottom: 12px !important;
    border: 1px solid rgba(0, 61, 130, 0.12) !important;
    box-shadow: 0 6px 20px rgba(0, 61, 130, 0.08) !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

body #mw-panel .portal::before,
.mw-body #mw-panel .portal::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: linear-gradient(135deg, transparent, rgba(0, 61, 130, 0.04), transparent) !important;
    transform: rotate(45deg) !important;
    transition: all 0.6s ease !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body #mw-panel .portal:hover,
.mw-body #mw-panel .portal:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 28px rgba(0, 61, 130, 0.12) !important;
    border-color: rgba(0, 61, 130, 0.18) !important;
}

body #mw-panel .portal:hover::before,
.mw-body #mw-panel .portal:hover::before {
    opacity: 1 !important;
    top: -25% !important;
    left: -25% !important;
}

body #mw-panel .portal:last-child,
.mw-body #mw-panel .portal:last-child {
    margin-bottom: 0 !important;
}

body #mw-panel .portal h3,
.mw-body #mw-panel .portal h3 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #003d82 !important;
    margin: 0 0 12px 0 !important;
    padding: 0 0 10px 0 !important;
    border-bottom: 2px solid rgba(0, 61, 130, 0.15) !important;
    letter-spacing: -0.2px !important;
    line-height: 1.3 !important;
    position: relative !important;
    z-index: 1 !important;
}

body #mw-panel .portal .body ul,
.mw-body #mw-panel .portal .body ul {
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

body #mw-panel .portal .body ul li,
.mw-body #mw-panel .portal .body ul li {
    list-style: none !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
}

body #mw-panel .portal .body ul li:last-child,
.mw-body #mw-panel .portal .body ul li:last-child {
    margin-bottom: 0 !important;
}

body #mw-panel .portal .body ul li a,
.mw-body #mw-panel .portal .body ul li a {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 400 !important;
    color: #0645ad !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: block !important;
    padding: 9px 12px !important;
    border-radius: 8px !important;
    line-height: 1.4 !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border: 1px solid rgba(0, 61, 130, 0.08) !important;
    box-sizing: border-box !important;
}

body #mw-panel .portal .body ul li a:hover,
.mw-body #mw-panel .portal .body ul li a:hover {
    background: rgba(0, 61, 130, 0.06) !important;
    color: #003d82 !important;
    transform: translateX(4px) !important;
    border-color: rgba(0, 61, 130, 0.15) !important;
}

body #mw-panel #p-navigation h3,
.mw-body #mw-panel #p-navigation h3 {
    display: block !important;
    visibility: visible !important;
}

body #mw-panel #p-navigation .body ul li:first-child,
.mw-body #mw-panel #p-navigation .body ul li:first-child {
    margin: 0 0 12px 0 !important;
}

body #mw-panel #p-navigation .body ul li:first-child a,
.mw-body #mw-panel #p-navigation .body ul li:first-child a {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #003d82 !important;
    padding: 0 0 10px 0 !important;
    border-bottom: 2px solid rgba(0, 61, 130, 0.15) !important;
    background: transparent !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-radius: 0 !important;
    pointer-events: none !important;
    cursor: default !important;
}

body #mw-panel #p-navigation .body ul li:first-child a:hover,
.mw-body #mw-panel #p-navigation .body ul li:first-child a:hover {
    transform: none !important;
}

/* ════════════════════════════════════
   ВЕРХНЯ ПАНЕЛЬ
═══════════════════════════════════════ */

#mw-page-base {
    background: transparent !important;
    background-image: none !important;
}

#mw-head-base {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 246, 255, 0.9)) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(0, 61, 130, 0.12) !important;
    box-shadow: 0 2px 12px rgba(0, 61, 130, 0.08) !important;
}

#p-personal {
    background: transparent !important;
    border: none !important;
}

#p-personal ul {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(240,246,255,0.75)) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(0, 61, 130, 0.12) !important;
    border-radius: 12px !important;
    padding: 2px 4px !important;
    box-shadow: 0 2px 8px rgba(0, 61, 130, 0.06) !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    margin-left: 0 !important;
}

#p-personal li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#p-personal li a {
    display: block !important;
    color: #0645ad !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
}

#p-personal li a:hover {
    background-color: rgba(0, 61, 130, 0.1) !important;
}

#p-personal li.selected a,
#p-personal li a.mw-ui-button-primary {
    background: linear-gradient(to right, rgba(240,246,255,0.5), rgba(210,230,255,0.4)) !important;
    color: #003d82 !important;
    font-weight: 600 !important;
}

/* Ховаємо менш важливі пункти щоб рядок не переносився */
#p-personal li#pt-watchlist,
#p-personal li#pt-mycontris {
    display: none !important;
}

#p-personal li a {
    font-size: 12.5px !important;
    padding: 5px 7px !important;
    white-space: nowrap !important;
}

#p-personal li#pt-userpage {
    display: flex !important;
    align-items: center !important;
}

#p-personal li#pt-userpage .mw-userlink {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

#p-personal li#pt-userpage > a {
    padding-left: 22px !important;
    background-position: 4px center !important;
}

#p-namespaces li,
#p-views li {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin-right: 8px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

#p-namespaces li a,
#p-views li a {
    color: #0645ad !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
}

#p-namespaces li.selected,
#p-views li.selected {
    background: linear-gradient(to right, rgba(240, 246, 255, 0.4), rgba(210, 230, 255, 0.3)) !important;
    border-bottom: 3px solid #003d82 !important;
}

#p-namespaces li.selected a,
#p-views li.selected a {
    color: #003d82 !important;
    font-weight: 700 !important;
}

#p-search {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 2px 6px !important;
    margin-bottom: 0 !important;
}

#simpleSearch {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

#searchInput {
    background: transparent !important;
    border: none !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    font-size: 14px !important;
    color: #333 !important;
}

/* ── Приховати заголовок на головній ── */
body.page-Головна_сторінка #firstHeading,
body.page-Головна_сторінка .mw-first-heading,
body.page-Головна_сторінка .firstHeading {
    display: none !important;
}

body.page-Головна_сторінка .mw-body-header,
body.page-Головна_сторінка #content-header {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ════════════════════════════════════
   VUE CATEGORY CARDS
═══════════════════════════════════════ */

.vcc-app { font-family: inherit; }

.vcc-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.vcc-search {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 8px 14px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.vcc-search:focus {
    border-color: #1a3a6b;
    box-shadow: 0 0 0 3px rgba(26,58,107,.12);
}

.vcc-count {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

.vcc-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.vcc-main { flex: 1; min-width: 0; }

.vcc-grid {
    display: grid;
    gap: 16px;
}

.vcc-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .2s, transform .2s, border-color .2s;
    cursor: pointer;
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.vcc-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.10);
    transform: translateY(-2px);
    border-color: #1a3a6b33;
    text-decoration: none;
    color: inherit;
}

.vcc-card-img-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vcc-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vcc-card-img-placeholder {
    font-size: 22px;
    font-weight: 700;
    color: #1a3a6b;
    text-transform: uppercase;
}

.vcc-card-body { flex: 1; min-width: 0; }

.vcc-card-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #b8860b;
    background: #fff8e1;
    border: 1px solid #f0d060;
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 4px;
}

.vcc-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a6b;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vcc-card-desc {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vcc-sidebar {
    width: 160px;
    flex-shrink: 0;
    background: #f8f9fb;
    border: 1px solid #e8edf3;
    border-radius: 12px;
    padding: 14px;
}

.vcc-sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #888;
    margin-bottom: 10px;
}

.vcc-filters { display: flex; flex-direction: column; gap: 6px; }

.vcc-filter-btn {
    padding: 7px 12px;
    border: 1px solid #d0d7de;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: background .15s, border-color .15s, color .15s;
}

.vcc-filter-btn:hover { background: #eef2f8; border-color: #1a3a6b44; }

.vcc-filter-btn.active {
    background: #1a3a6b;
    border-color: #1a3a6b;
    color: #fff;
    font-weight: 600;
}

.vcc-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 40px 0;
    color: #888;
    font-size: 15px;
}

.vcc-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: #1a3a6b;
    border-radius: 50%;
    animation: vcc-spin .8s linear infinite;
}

@keyframes vcc-spin { to { transform: rotate(360deg); } }

.vcc-empty, .vcc-error {
    text-align: center;
    padding: 48px 0;
    color: #888;
}

.vcc-empty-icon { font-size: 36px; margin-bottom: 8px; }

.vcc-reset-btn {
    margin-top: 10px;
    padding: 8px 20px;
    border: 1px solid #1a3a6b;
    border-radius: 8px;
    background: #fff;
    color: #1a3a6b;
    cursor: pointer;
    font-size: 13px;
    transition: background .15s;
}

.vcc-reset-btn:hover { background: #eef2f8; }

.vcc-preview {
    position: absolute;
    z-index: 9999;
    width: 270px;
    background: #fff;
    border: 1px solid #e0e7f0;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    padding: 16px;
    text-decoration: none;
    color: inherit;
    pointer-events: auto;
}

.vcc-preview-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.vcc-preview-img,
.vcc-preview-img-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #eef2f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #1a3a6b;
}

.vcc-preview-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #b8860b;
    margin-bottom: 3px;
}

.vcc-preview-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a3a6b;
    line-height: 1.3;
}

.vcc-preview-divider {
    height: 1px;
    background: #eef2f8;
    margin: 10px 0;
}

.vcc-preview-desc {
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vcc-preview-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 6px;
    gap: 8px;
}

.vcc-preview-lbl { color: #999; white-space: nowrap; }

.vcc-preview-val {
    color: #333;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ════════════════════════════════════
   МОБІЛЬНА ШАПКА (topbar)
═══════════════════════════════════════ */

.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    height: 52px;
    z-index: 10003;
    align-items: center;
    gap: 8px;
    padding: 0 10px 0 4px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 61, 130, 0.1);
    box-shadow: 0 1px 8px rgba(0, 61, 130, 0.07);
}

/* ── Кнопка гамбургера ── */
.topbar-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.topbar-menu-btn:hover,
.topbar-menu-btn:active {
    background: rgba(0, 61, 130, 0.07);
}

.topbar-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.topbar-hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #003d82;
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: center;
}

/* Анімація в ✕ при відкритому меню */
.topbar-menu-btn.active .topbar-hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.topbar-menu-btn.active .topbar-hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.topbar-menu-btn.active .topbar-hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Логотип у шапці */
.mobile-topbar-logo {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #003d82;
    flex-shrink: 0;
    padding: 4px 6px;
    border-radius: 8px;
    transition: background 0.15s;
}

.mobile-topbar-logo:hover {
    background: rgba(0, 61, 130, 0.05);
}

.mobile-topbar-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    max-width: 28px !important;
}

.mobile-topbar-logo-text {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #003d82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* ── Пошук у шапці ── */
.mobile-topbar-search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: visible;
}

/* Слот пошуку */
#mobile-topbar-search-slot {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    overflow: visible;
}

/* Рідний блок #p-search всередині топбара */
#mobile-topbar-search-slot #p-search,
#mobile-topbar-search-slot .portlet,
#mobile-topbar-search-slot .mw-portlet {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Ховаємо заголовок блоку пошуку */
#mobile-topbar-search-slot h3,
#mobile-topbar-search-slot .mw-portlet-label,
#mobile-topbar-search-slot label[for="searchInput"] {
    display: none !important;
}

/* Обгортка .body всередині #p-search */
#mobile-topbar-search-slot #p-search .body,
#mobile-topbar-search-slot #p-search > div {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Форма пошуку */
/* Сброс всего внутри слота */
#mobile-topbar-search-slot * {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Стилизуем именно внутренний контейнер */
#mobile-topbar-search-slot .vector-search-box-inner {
    background: rgba(0, 61, 130, 0.05) !important;
    border: 1px solid rgba(0, 61, 130, 0.15) !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 8px 0 12px !important;
    height: 34px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 0 !important;        /* добавь */
    vertical-align: middle !important; /* добавь */
}
#mobile-topbar-search-slot .vector-search-box-input {
    height: 34px !important;
    line-height: 34px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
}

#mobile-topbar-search-slot .vector-search-box-inner:focus-within {
    border-color: rgba(0, 61, 130, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(0, 61, 130, 0.08) !important;
    background: #fff !important;
}

/* Поле вводу */
#mobile-topbar-search-slot #searchInput,
#mobile-topbar-search-slot input[type="search"],
#mobile-topbar-search-slot input[name="search"] {
    flex: 1 !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 13.5px !important;
    color: #333 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    height: 34px !important;
    line-height: 34px !important;
    vertical-align: middle !important;
    display: block !important;
}

#mobile-topbar-search-slot input::placeholder {
    color: #aaa !important;
}

/* Кнопка пошуку */
#mobile-topbar-search-slot #searchButton,
#mobile-topbar-search-slot button[type="submit"],
#mobile-topbar-search-slot input[type="submit"] {
    background: transparent !important;
    border: none !important;
    padding: 2px !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: #999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    transition: color 0.15s, background 0.15s !important;
}

#mobile-topbar-search-slot #searchButton:hover,
#mobile-topbar-search-slot button[type="submit"]:hover {
    color: #003d82 !important;
    background: rgba(0, 61, 130, 0.08) !important;
}

/* Підказки автокомпліту MediaWiki */
#mobile-topbar-search-slot .suggestions,
.suggestions {
    position: fixed !important;
    top: 52px !important;
    z-index: 10020 !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 8px 24px rgba(0, 61, 130, 0.14) !important;
    max-width: calc(100vw - 20px) !important;
}
#mobile-topbar-search-slot {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
}

#mobile-topbar-search-slot form {
    width: 100% !important;
}
#mobile-topbar-search-slot .vector-search-box,
#mobile-topbar-search-slot .vector-search-box-form {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}

#mobile-topbar-search-slot h3 {
    display: none !important;
}

/* ── Юзер-аватар ── */
.topbar-user-wrap {
    position: static;
    flex-shrink: 0;
}

.topbar-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003d82, #0066cc);
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 0.15s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0, 61, 130, 0.25);
}

.topbar-user-avatar:hover {
    box-shadow: 0 4px 14px rgba(0, 61, 130, 0.35);
    transform: scale(1.05);
}

.topbar-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #555;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.topbar-login-btn:hover {
    background: rgba(0, 61, 130, 0.07);
    color: #003d82;
}

/* ── Дропдаун — fixed щоб не виходив за межі ── */
.topbar-user-dropdown {
    position: fixed;
    top: 52px;
    right: 8px;
    left: auto;
    width: 210px;
    background: #fff;
    border: 1px solid rgba(0, 61, 130, 0.1);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 61, 130, 0.14), 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 10015;
}

.topbar-user-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.topbar-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
    background: linear-gradient(135deg, rgba(0,61,130,0.04), rgba(0,102,204,0.06));
}

.topbar-dropdown-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003d82, #0066cc);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.topbar-dropdown-name {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #003d82;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-dropdown-divider {
    height: 1px;
    background: rgba(0, 61, 130, 0.07);
    margin: 0;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 14px;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13.5px;
    color: #333;
    text-decoration: none;
    transition: background 0.13s;
    cursor: pointer;
}

.topbar-dropdown-item svg {
    color: #666;
    flex-shrink: 0;
}

.topbar-dropdown-item:hover {
    background: rgba(0, 61, 130, 0.05);
    color: #003d82;
    text-decoration: none;
}

.topbar-dropdown-item:hover svg {
    color: #003d82;
}

.topbar-dropdown-logout {
    color: #c0392b;
}

.topbar-dropdown-logout svg {
    color: #c0392b;
}

.topbar-dropdown-logout:hover {
    background: rgba(192, 57, 43, 0.06);
    color: #c0392b;
}

/* ════════════════════════════════════
   МОБІЛЬНЕ МЕНЮ — ОВЕРЛЕЙ
═══════════════════════════════════════ */

.mobile-menu-toggle {
    display: none !important;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.open {
    display: block;
}

body.mobile-nav-open #mw-panel {
    transform: translateX(0) !important;
    box-shadow: 4px 0 32px rgba(0, 61, 130, 0.18) !important;
}

/* Прибираємо нижню панель — більше не використовується */
.mobile-bottom-nav {
    display: none !important;
}

/* ════════════════════════════════════
   АДАПТИВНІСТЬ — BREAKPOINTS
═══════════════════════════════════════ */

/* ── 1280px: трохи звужуємо праву колонку ── */
@media (max-width: 1280px) {
    .right-column {
        width: 300px;
        min-width: 300px;
    }
    .section-categories {
        margin-right: calc(300px + 24px);
    }
    .card-image img {
        width: 190px;
        height: 190px;
    }
}

/* ── 1100px: планшет landscape — мобільна шапка ── */
@media (max-width: 1100px) {

    /* Показуємо мобільну шапку */
    .mobile-topbar {
        display: flex !important;
    }

    /* Відступ зверху для контенту (під мобільну шапку 52px) */
    #mw-body,
    .mw-body,
    #content,
    #bodyContent,
    .mw-page-container {
        padding-top: 52px !important;
        box-sizing: border-box !important;
    }

    /* Без відступу знизу — нижнього таббара більше немає */
    body {
        padding-bottom: 0 !important;
    }

    /* Ховаємо оригінальну шапку MediaWiki повністю */
    #mw-head,
    #mw-head-base,
    #p-personal,
    #mw-page-base {
        display: none !important;
    }

    /* Бокова навігація — ховається за екран зліва */
    #mw-panel {
        position: fixed !important;
        top: 52px !important;
        left: 0 !important;
        height: calc(100vh - 52px) !important;
        width: 280px !important;
        overflow-y: auto !important;
        z-index: 10002 !important;
        padding: 16px 12px 24px !important;
        margin: 0 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        background: rgba(248, 251, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-right: 1px solid rgba(0, 61, 130, 0.12) !important;
    }

    /* Контент займає весь екран */
    #mw-content-column,
    .mw-content-column,
    #content,
    .mw-body {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Welcome — стек */
    .welcome-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 24px;
        padding: 32px 5vw 28px;
    }

    .welcome-text {
        transform: none;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .welcome-subtitle {
        font-size: 1.2rem;
    }

    .stats-panel {
        width: 100%;
        max-width: 460px;
    }

    /* Заголовок категорій — без правого відступу */
    .section-categories {
        margin-right: 0;
        font-size: 1.8rem;
    }

    /* Layout — стек */
    .main-content-layout {
        flex-direction: column;
        padding: 0 4vw;
        gap: 20px;
    }

    .category-column {
        width: 100%;
    }

    /* Права колонка — горизонтально */
    .right-column {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .right-column > * {
        flex: 1 1 280px;
        min-width: 280px;
    }

    /* Сітка категорій — 3 колонки */
    .category-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-image img {
        width: 160px;
        height: 160px;
    }
}

/* ── 820px: планшет portrait — 2 колонки ── */
@media (max-width: 820px) {
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-image img {
        width: 140px;
        height: 140px;
    }

    .welcome-title {
        font-size: 1.75rem;
    }

    /* Ресурси */
    .resources-and-contacts {
        flex-direction: column;
        gap: 16px;
        margin: 30px 4vw 40px;
    }

    .resource-block,
    .contacts-block {
        min-width: unset;
        width: 100%;
    }

    /* VCC фільтри — горизонтально зверху */
    .vcc-layout {
        flex-direction: column-reverse;
    }

    .vcc-sidebar {
        width: 100%;
        padding: 12px;
    }

    .vcc-filters {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .vcc-filter-btn {
        flex: 0 0 auto;
        font-size: 12px;
        padding: 5px 10px;
    }

    .vcc-sidebar-title {
        margin-bottom: 8px;
    }
}

/* ── 600px: великий мобільний ── */
@media (max-width: 600px) {
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-image img {
        width: 110px;
        height: 110px;
    }

    .card-title {
        font-size: 13px;
        padding: 6px 8px 10px;
    }

    .welcome-wrapper {
        padding: 24px 4vw 20px;
        gap: 18px;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        font-size: 1rem;
    }

    .section-categories {
        font-size: 1.5rem;
        margin: 20px 0 20px;
    }

    .main-content-layout {
        padding: 0 3vw;
    }

    /* Випадкові статті — менший thumb */
    .random-article-thumb-wrap,
    .random-article-thumb-placeholder {
        width: 64px;
        height: 64px;
        min-width: 64px;
        min-height: 64px;
    }

    .random-article-title {
        font-size: 13px;
    }

    .random-article-excerpt {
        font-size: 12px;
    }

    /* Права колонка */
    .right-column {
        flex-direction: column;
    }

    .right-column > * {
        min-width: unset;
        width: 100%;
    }
}

/* ── 480px: мобільний ── */
@media (max-width: 480px) {
    .category-grid-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .card-image {
        padding: 14px 0 8px;
    }

    .card-image img {
        width: 90px;
        height: 90px;
    }

    .welcome-title {
        font-size: 1.35rem;
    }

    .section-categories {
        font-size: 1.3rem;
    }

    .vcc-grid {
        grid-template-columns: 1fr !important;
    }

    /* Ресурси */
    .resource-block,
    .contacts-block {
        padding: 18px 16px 20px;
    }

    .resource-block h2,
    .contacts-block h2 {
        font-size: 1.15rem !important;
    }

    .resource-block li,
    .contacts-block li {
        font-size: 13px;
        padding: 7px 10px 7px 24px;
    }
}

/* ── 360px: дуже маленький мобільний ── */
@media (max-width: 360px) {
    .category-grid-container {
        grid-template-columns: 1fr;
    }

    .card-image img {
        width: 120px;
        height: 120px;
    }

    .welcome-title {
        font-size: 1.2rem;
    }

    .section-categories {
        font-size: 1.1rem;
    }
}

/* ════════════════════════════════════
   TOUCH DEVICES: прибираємо hover-анімації
═══════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    .category-card:hover {
        transform: none;
        box-shadow: 0 6px 24px rgba(0,0,0,0.08);
    }

    .category-card:hover .card-image img {
        animation: none;
        transform: none;
    }

    .category-card:hover::before {
        opacity: 0;
    }

    .random-article-card:hover {
        transform: none;
    }

    .resource-block:hover,
    .contacts-block:hover {
        transform: none;
    }

    body #mw-panel .portal:hover {
        transform: none !important;
    }

    .vcc-card:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .category-card:active {
        transform: scale(0.98);
        box-shadow: 0 4px 16px rgba(0, 61, 130, 0.15);
    }

    .vcc-card:active {
        transform: scale(0.98);
    }
}

/* ════════════════════════════════════
   PRINT
═══════════════════════════════════════ */
@media print {
    #mw-panel,
    .scroll-progress,
    .mobile-topbar,
    .mobile-menu-overlay,
    .random-articles-panel,
    .stats-panel {
        display: none !important;
    }

    .main-content-layout {
        flex-direction: column;
        padding: 0;
    }

    .category-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .category-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ════════════════════════════════════
   ІНФОБОКС ТА ЗОБРАЖЕННЯ В СТАТТЯХ
═══════════════════════════════════════ */

/* Картинки в статтях — завжди масштабуються */
.mw-parser-output img,
.mw-parser-output .thumbimage img,
.mw-parser-output .infobox img {
    max-width: 100% !important;
    height: auto !important;
}

/* thumb/frame обгортки */
.mw-parser-output .thumb,
.mw-parser-output .thumbinner {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Таблиці — не виходять за межі */
.mw-parser-output table,
.mw-parser-output .infobox,
.mw-parser-output .wikitable {
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
}

/* ── Мобільні ≤1100px ── */
@media (max-width: 1100px) {

    /* Інфобокс — знімаємо float, на всю ширину */
    .mw-parser-output .infobox,
    .mw-parser-output table.infobox {
        float: none !important;
        margin: 0 0 20px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: table !important;
    }

    /* Таблиці — горизонтальний скрол */
    .mw-parser-output .wikitable {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Всі float-картинки — знімаємо float */
    .mw-parser-output .thumb,
    .mw-parser-output .thumb.tright,
    .mw-parser-output .thumb.tleft,
    .mw-parser-output .thumbinner,
    .mw-parser-output .floatright,
    .mw-parser-output .floatleft,
    .mw-parser-output [style*="float: right"],
    .mw-parser-output [style*="float:right"],
    .mw-parser-output [style*="float: left"],
    .mw-parser-output [style*="float:left"] {
        float: none !important;
        display: block !important;
        margin: 0 auto 16px !important;
        max-width: 100% !important;
        width: auto !important;
        clear: both !important;
    }

    .mw-parser-output .thumb img,
    .mw-parser-output .thumbinner img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
    }

    /* Thumb-блоки — перебиваємо inline width від MediaWiki (style="width:Npx") */
    .mw-parser-output .thumb,
    .mw-parser-output .thumb.tright,
    .mw-parser-output .thumb.tleft,
    .mw-parser-output .thumbinner,
    .mw-parser-output .thumb[style],
    .mw-parser-output .thumbinner[style] {
        width: clamp(120px, 48vw, 280px) !important;
        max-width: clamp(120px, 48vw, 280px) !important;
        box-sizing: border-box !important;
    }

    .mw-parser-output .thumbcaption {
        text-align: center !important;
    }

    /* Інфобокс: фото масштабується пропорційно ширині екрану */
    .mw-parser-output .infobox td:has(img),
    .mw-parser-output table.infobox td:has(img) {
        width: clamp(100px, 44vw, 220px) !important;
        max-width: clamp(100px, 44vw, 220px) !important;
        padding: 6px !important;
    }

    .mw-parser-output .infobox td:has(img) img,
    .mw-parser-output table.infobox td:has(img) img {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}

/* ── Маленькі екрани ≤430px: інфобокс вертикально ── */
@media (max-width: 430px) {

    /* Вся таблиця стає вертикальною */
    .mw-parser-output .infobox,
    .mw-parser-output table.infobox {
        display: block !important;
    }

    .mw-parser-output .infobox tbody,
    .mw-parser-output table.infobox tbody {
        display: block !important;
    }

    /* Кожен рядок — блок */
    .mw-parser-output .infobox tr,
    .mw-parser-output table.infobox tr {
        display: block !important;
        border-bottom: 1px solid rgba(0,0,0,0.07) !important;
        overflow: hidden !important;
    }

    /* Комірки — блоки */
    .mw-parser-output .infobox td,
    .mw-parser-output .infobox th,
    .mw-parser-output table.infobox td,
    .mw-parser-output table.infobox th {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important;
        padding: 6px 10px !important;
        border: none !important;
    }

    /* Заголовок */
    .mw-parser-output .infobox caption,
    .mw-parser-output table.infobox caption {
        font-size: 14px !important;
        font-weight: 700 !important;
        padding: 10px 12px 6px !important;
        display: block !important;
    }

    /* Фото — на всю ширину, не більше 260px */
    .mw-parser-output .infobox img,
    .mw-parser-output table.infobox img {
        width: 100% !important;
        max-width: 260px !important;
        height: auto !important;
        border-radius: 8px !important;
        display: block !important;
        margin: 4px auto !important;
    }

    /* Рядки з th+td (назва + значення) — горизонтально */
    .mw-parser-output .infobox tr:has(th + td),
    .mw-parser-output table.infobox tr:has(th + td) {
        display: flex !important;
        align-items: flex-start !important;
    }

    .mw-parser-output .infobox tr:has(th + td) th,
    .mw-parser-output table.infobox tr:has(th + td) th {
        width: 38% !important;
        text-align: left !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #555 !important;
        padding: 7px 6px 7px 10px !important;
    }

    .mw-parser-output .infobox tr:has(th + td) td,
    .mw-parser-output table.infobox tr:has(th + td) td {
        width: 62% !important;
        text-align: left !important;
        font-size: 13px !important;
        padding: 7px 10px 7px 6px !important;
    }
}