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

Матеріал з Київський національний лінгвістичний університет
Перейти до навігації Перейти до пошуку
Немає опису редагування
Мітка: Скасовано
Немає опису редагування
Мітки: Ручний відкіт Скасовано
Рядок 1: Рядок 1:
/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   1. СКИДАННЯ СТАНДАРТНИХ ОБМЕЖЕНЬ MEDIAWIKI
   1. ГЛОБАЛЬНІ СКИНОВІ НАЛАШТУВАННЯ (Vector)
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
#content, #mw-content-container, .mw-body {
 
/* Прибираємо обмеження ширини Vector */
body.skin-vector-2022 .mw-page-container-inner,
body.skin-vector .mw-content-container,
body.skin-vector .vector-body,
body.skin-vector #bodyContent,
body.skin-vector-2022 .mw-body,
body.skin-vector-2022 .mw-body-content {
    max-width: none !important;
     margin-left: 0 !important;
     margin-left: 0 !important;
     padding: 0 !important;
    margin-right: 0 !important;
     max-width: none !important;
     padding-left: 0 !important;
     padding-right: 0 !important;
}
}


/* Приховуємо елементи бокової панелі, АЛЕ залишаємо логотип */
#firstHeading { font-size: clamp(28px, 4vw, 48px); }
#mw-panel .portal, #mw-panel h3 {
    display: none !important;
}
 
#mw-panel {
    width: 0 !important;
    position: absolute !important;
}


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   2. ЛОГОТИП (LOGO) - ПРАЦЮЄ ВСЮДИ
   2. ПРИВІТАННЯ ТА СТАТИСТИКА (Welcome Section)
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
#p-logo {
    display: block !important;
    position: absolute !important;
    top: 10px !important;
    left: 20px !important;
    width: 160px !important;
    height: 160px !important;
    z-index: 100 !important;
}
#p-logo a {
    display: block !important;
    width: 160px !important;
    height: 160px !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    background-position: center !important;
}


/* ══════════════════════════════════════════════
  3. ПРИВІТАННЯ ТА СТАТИСТИКА
══════════════════════════════════════════════ */
.welcome-wrapper {
.welcome-wrapper {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
     justify-content: space-between;
     justify-content: space-between;
     gap: 30px;
     gap: 40px;
     padding: 80px 5vw 60px;
     padding: 60px 5vw;
     background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
     background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
    position: relative;
    overflow: hidden;
     width: 100%;
     width: 100%;
     box-sizing: border-box;
     box-sizing: border-box;
Рядок 57: Рядок 39:
     flex: 1;
     flex: 1;
     text-align: center;
     text-align: center;
     /* Зміщення для балансу з правою панеллю */
     transform: translateX(-50px); /* Центрування відносно сітки */
     margin-right: 280px;  
     z-index: 11;
}
}


.welcome-title {
.welcome-title {
     font-size: clamp(2rem, 5vw, 3rem);
     font-size: clamp(1.8rem, 4vw, 2.6rem);
     font-weight: 800;
     font-weight: 800;
     color: #003d82;
     line-height: 1.2;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #003d82 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
     margin: 0;
     margin: 0;
    line-height: 1.1;
}
}


.welcome-subtitle {
.welcome-subtitle {
     font-size: 1.5rem;
     font-size: 1.4rem;
     color: #444;
     color: #444;
     margin-bottom: 10px;
     margin-bottom: 15px;
}
}


.stats-panel {
.stats-panel {
     width: 280px;
     width: 280px;
    position: absolute;
     background: rgba(255, 255, 255, 0.75) !important;
    right: 5vw;
     background: rgba(255, 255, 255, 0.8) !important;
     backdrop-filter: blur(10px);
     backdrop-filter: blur(10px);
     border-radius: 20px;
     border-radius: 20px;
     box-shadow: 0 10px 30px rgba(0, 61, 130, 0.1) !important;
    border: 1px solid rgba(0, 61, 130, 0.1) !important;
     border: 1px solid rgba(0, 61, 130, 0.05) !important;
     box-shadow: 0 10px 30px rgba(0, 61, 130, 0.12) !important;
    z-index: 11;
}
 
.stats-panel-header {
    background: rgba(0, 61, 130, 0.05);
    padding: 15px;
    font-weight: 700;
    color: #003d82;
     border-bottom: 1px solid rgba(0, 61, 130, 0.1);
    text-align: center;
}
}


Рядок 96: Рядок 88:


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   4. СІТКА КАТЕГОРІЙ (DESKTOP)
   3. КАТЕГОРІЇ ТА ОСНОВНИЙ ГРИД
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */
.section-categories {
.section-categories {
     font-size: 2.2rem;
     font-size: 2.2rem;
Рядок 103: Рядок 96:
     color: #003d82;
     color: #003d82;
     text-align: center;
     text-align: center;
     margin: 60px auto 40px;
     margin: 50px auto 40px;
     padding-right: 360px; /* Відступ під праву колонку */
     /* Відступ компенсує праву колонку на десктопі */
    margin-right: calc(360px + 5vw + 24px);
}
}


Рядок 112: Рядок 106:
     width: 80px;
     width: 80px;
     height: 5px;
     height: 5px;
     background: #ffd700;
     background: linear-gradient(90deg, #ffd700, #ffed4e);
     margin: 15px auto 0;
     margin: 15px auto 0;
     border-radius: 10px;
     border-radius: 10px;
Рядок 121: Рядок 115:
     gap: 30px;
     gap: 30px;
     padding: 0 5vw;
     padding: 0 5vw;
     justify-content: center;
     margin-bottom: 80px;
     margin-bottom: 100px;
    align-items: flex-start;
     justify-content: center; /* Центрування всього блоку */
}
}


/* Розумна сітка категорій */
.category-grid-container {
.category-grid-container {
     display: grid !important;
     display: grid !important;
    /* ФІКС: 3 колонки на ПК */
     grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
     grid-template-columns: repeat(3, 1fr) !important;
     gap: 25px !important;
     gap: 25px !important;
     flex: 1;
     flex: 1;
    justify-content: center !important;
}
}


Рядок 136: Рядок 132:
     background: white;
     background: white;
     border-radius: 20px;
     border-radius: 20px;
     box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    border: 1px solid rgba(0, 61, 130, 0.08);
     transition: transform 0.3s ease, box-shadow 0.3s ease;
     box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
     text-align: center;
     transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
     border: 1px solid rgba(0,61,130,0.05);
    overflow: hidden;
     max-width: 350px;
     margin: 0 auto; /* Центрування картки в колонці */
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
Рядок 145: Рядок 143:


.category-card:hover {
.category-card:hover {
     transform: translateY(-10px);
     transform: translateY(-10px) scale(1.02);
     box-shadow: 0 15px 35px rgba(0,61,130,0.15);
     box-shadow: 0 20px 40px rgba(0, 61, 130, 0.15);
}
}


.card-image { padding: 30px 20px; }
.card-image { padding: 30px 20px; flex: 1; display: flex; justify-content: center; }
.card-image img { width: 200px; height: 200px; object-fit: contain; }
.card-image img { width: 220px; height: 220px; object-fit: contain; }


.card-title {
.card-title {
     background: #f0f6ff;
     background: rgba(210, 230, 255, 0.2);
     padding: 15px;
     padding: 15px;
    text-align: center;
     font-weight: 700;
     font-weight: 700;
     color: #003d82;
     color: #003d82;
Рядок 161: Рядок 160:
}
}


/* Права колонка */
.right-column {
.right-column {
     width: 360px;
     width: 360px;
     flex-shrink: 0;
     flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
/* ══════════════════════════════════════════════
  4. ВЕРХНЯ ПАНЕЛЬ (Header & Navigation)
══════════════════════════════════════════════ */
#mw-head-base {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 61, 130, 0.1);
}
#p-personal ul {
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 12px;
    padding: 5px 15px !important;
    border: 1px solid rgba(0, 61, 130, 0.1) !important;
}
#p-namespaces li.selected, #p-views li.selected {
    border-bottom: 3px solid #003d82 !important;
    background: rgba(210, 230, 255, 0.3) !important;
}
/* ══════════════════════════════════════════════
  5. МАЙСТЕР-ПАТЧ АДАПТИВНОСТІ (Mobile)
══════════════════════════════════════════════ */
@media (max-width: 1150px) {
    /* Ховаємо бокову панель MediaWiki */
    #mw-panel { display: none !important; }
    /* ПРИМУСОВЕ ПОВЕРНЕННЯ ЛОГОТИПА */
    #p-logo {
        display: block !important;
        position: relative !important;
        margin: 20px auto !important;
        width: 160px !important;
        height: 160px !important;
        float: none !important;
    }
    #p-logo a {
        display: block !important;
        width: 160px !important;
        height: 160px !important;
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        margin: 0 auto !important;
    }
    /* Рятуємо заголовок "Категорії" */
    .section-categories {
        margin: 40px auto !important;
        margin-right: auto !important; /* Скидаємо правий відступ */
        width: 90% !important;
        transform: none !important;
    }
    /* Перебудова Header (щоб не наїжджало) */
    #mw-head {
        position: relative !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        padding-bottom: 15px !important;
    }
    #p-personal, #left-navigation, #right-navigation, #p-search {
        position: static !important;
        float: none !important;
        margin: 10px auto !important;
        display: flex !important;
        justify-content: center !important;
        width: 90% !important;
    }
    #p-personal ul { flex-wrap: wrap; justify-content: center; }
    /* Перебудова контенту */
    .welcome-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    .welcome-text { transform: none !important; margin: 0 0 30px 0; }
    .stats-panel { margin: 0 auto !important; width: 100%; max-width: 320px; }
    .main-content-layout {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
    }
    .right-column { width: 100%; max-width: 400px; margin-top: 50px; }
    /* Центрування сітки */
    .category-grid-container {
        width: 100% !important;
        justify-content: center !important;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    }
}
@media (max-width: 600px) {
    .welcome-title { font-size: 1.8rem !important; }
    .card-image img { width: 160px; height: 160px; }
    #p-logo a { width: 130px !important; height: 130px !important; }
}
/* ══════════════════════════════════════════════
  6. ДОДАТКОВІ ЕФЕКТИ (Animations & Particles)
══════════════════════════════════════════════ */
.scroll-progress {
    position: fixed;
    top: 0; left: 0; height: 4px;
    background: linear-gradient(90deg, #003d82, #ffd700);
    z-index: 10000;
}
.particles-canvas {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 1;
}
/* ══════════════════════════════════════════════
  7. СТИЛІ ДЛЯ VUE КАРТОК (В середині статей)
══════════════════════════════════════════════ */
.vcc-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 15px !important;
    justify-content: center !important;
}
.vcc-card {
    margin: 0 auto !important;
    width: 100% !important;
}
/* Стилізація випадкових статей */
.random-article-card {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    gap: 15px;
    text-decoration: none !important;
    border: 1px solid rgba(0,61,130,0.05);
    transition: 0.3s;
}
.random-article-card:hover {
    background: #f0f6ff;
    transform: translateX(5px);
}
}


/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   5. АДАПТИВНІСТЬ (MOBILE & TABLET)
   ULTIMATE LAYOUT & RESPONSIVE PATCH
  (Додайте це в самий кінець файлу)
══════════════════════════════════════════════ */
══════════════════════════════════════════════ */


/* 1. ПОВЕРТАЄМО ЛОГОТИП ТА ВИПРАВЛЯЄМО САЙДБАР */
#mw-panel {
    width: 0 !important;
    position: absolute !important;
    visibility: visible !important;
}
/* Ховаємо текст меню, лишаємо ЛОГО */
#mw-panel .portal, #mw-panel h3 { display: none !important; }
#p-logo {
    display: block !important;
    position: absolute !important;
    top: 10px !important;
    left: 20px !important;
    width: 160px !important;
    height: 160px !important;
    z-index: 100 !important;
}
#p-logo a {
    display: block !important;
    width: 160px !important;
    height: 160px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
/* 2. ЦЕНТРУВАННЯ ТЕКСТУ ТА СТАТИСТИКИ */
.welcome-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 80px 5vw 60px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
.welcome-text {
    flex: 1 !important;
    text-align: center !important;
    margin-right: 300px !important; /* Компенсація для центрування відносно всього екрана */
}
.stats-panel {
    width: 280px !important;
    position: absolute !important;
    right: 5vw !important;
}
/* 3. СІТКА КАТЕГОРІЙ (3 В РЯД НА ПК) */
.section-categories {
    text-align: center !important;
    margin: 60px auto 40px !important;
    padding-right: 360px !important; /* Щоб заголовок був над картками */
    width: auto !important;
}
.main-content-layout {
    display: flex !important;
    gap: 30px !important;
    padding: 0 5vw !important;
    justify-content: center !important;
}
.category-grid-container {
    display: grid !important;
    /* ЖОРСТКО: 3 колонки на великих екранах */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    flex: 1 !important;
    max-width: 1200px !important;
}
.category-card {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 360px !important;
}
.right-column {
    width: 360px !important;
    flex-shrink: 0 !important;
}
/* 4. АДАПТИВНІСТЬ ДЛЯ ПЛАНШЕТІВ (1200px і менше) */
@media (max-width: 1200px) {
@media (max-width: 1200px) {
     #p-logo {
     #p-logo {
Рядок 175: Рядок 427:
         margin: 20px auto !important;
         margin: 20px auto !important;
         left: 0 !important;
         left: 0 !important;
        top: 0 !important;
     }
     }


     .welcome-wrapper {
     .welcome-wrapper {
         flex-direction: column;
         flex-direction: column !important;
         padding-top: 20px;
         padding-top: 20px !important;
     }
     }


     .welcome-text {
     .welcome-text {
         margin-right: 0 !important;
         margin-right: 0 !important;
        transform: none !important;
     }
     }


Рядок 191: Рядок 443:
         right: 0 !important;
         right: 0 !important;
         margin: 20px auto !important;
         margin: 20px auto !important;
         width: 100%;
         width: 100% !important;
         max-width: 320px;
         max-width: 320px !important;
     }
     }


Рядок 201: Рядок 453:


     .main-content-layout {
     .main-content-layout {
         flex-direction: column;
         flex-direction: column !important;
         align-items: center;
         align-items: center !important;
    }
 
    .category-grid-container {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 в ряд */
     }
     }


     .right-column {
     .right-column {
         width: 100%;
         width: 100% !important;
         max-width: 400px;
         max-width: 400px !important;
     }
     }
}


    /* ФІКС: 2 колонки на планшетах */
/* 5. АДАПТИВНІСТЬ ДЛЯ ТЕЛЕФОНІВ (700px і менше) */
@media (max-width: 700px) {
     .category-grid-container {
     .category-grid-container {
         grid-template-columns: repeat(2, 1fr) !important;
         grid-template-columns: 1fr !important; /* 1 в ряд */
        width: 100%;
     }
     }
}


@media (max-width: 800px) {
    /* Рятуємо верхню панель (Header) */
     #mw-head {
     #mw-head {
         display: flex !important;
         display: flex !important;
Рядок 223: Рядок 479:
         height: auto !important;
         height: auto !important;
         position: relative !important;
         position: relative !important;
        top: 0 !important;
     }
     }


     #p-personal, #left-navigation, #right-navigation, #p-search {
     #p-personal, #left-navigation, #right-navigation, #p-search {
         position: static !important;
         position: static !important;
         margin: 10px auto !important;
         margin: 5px auto !important;
        width: 95% !important;
         display: flex !important;
         display: flex !important;
         justify-content: center !important;
         justify-content: center !important;
         width: 90% !important;
         float: none !important;
     }
     }


     #p-personal ul { flex-wrap: wrap; justify-content: center; }
     #p-personal ul { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 650px) {
    /* ФІКС: 1 колонка на телефонах */
    .category-grid-container {
        grid-template-columns: 1fr !important;
    }
      
      
    .category-card {
        max-width: 320px;
    }
     .welcome-title { font-size: 1.8rem !important; }
     .welcome-title { font-size: 1.8rem !important; }
    #p-logo, #p-logo a { width: 130px !important; height: 130px !important; }
}
}


/* Додаткові фікси для випадкових статей */
/* Прибираємо білу смугу зліва на всіх роздільних здатностях */
.random-article-card {
#content, #mw-data-after-content, .mw-body {
    background: white;
     margin-left: 0 !important;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    gap: 15px;
    text-decoration: none !important;
     margin-bottom: 10px;
    border: 1px solid rgba(0,61,130,0.05);
}
}

Версія за 16:31, 24 березня 2026

/* ══════════════════════════════════════════════
   1. ГЛОБАЛЬНІ СКИНОВІ НАЛАШТУВАННЯ (Vector)
══════════════════════════════════════════════ */

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

#firstHeading { font-size: clamp(28px, 4vw, 48px); }

/* ══════════════════════════════════════════════
   2. ПРИВІТАННЯ ТА СТАТИСТИКА (Welcome Section)
══════════════════════════════════════════════ */

.welcome-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 60px 5vw;
    background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.welcome-text {
    flex: 1;
    text-align: center;
    transform: translateX(-50px); /* Центрування відносно сітки */
    z-index: 11;
}

.welcome-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #003d82 0%, #0066cc 50%, #003d82 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.welcome-subtitle {
    font-size: 1.4rem;
    color: #444;
    margin-bottom: 15px;
}

.stats-panel {
    width: 280px;
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(0, 61, 130, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 61, 130, 0.12) !important;
    z-index: 11;
}

.stats-panel-header {
    background: rgba(0, 61, 130, 0.05);
    padding: 15px;
    font-weight: 700;
    color: #003d82;
    border-bottom: 1px solid rgba(0, 61, 130, 0.1);
    text-align: center;
}

.stats-panel-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 61, 130, 0.05);
}

.stats-panel-number { font-weight: 800; color: #003d82; }

/* ══════════════════════════════════════════════
   3. КАТЕГОРІЇ ТА ОСНОВНИЙ ГРИД
══════════════════════════════════════════════ */

.section-categories {
    font-size: 2.2rem;
    font-weight: 800;
    color: #003d82;
    text-align: center;
    margin: 50px auto 40px;
    /* Відступ компенсує праву колонку на десктопі */
    margin-right: calc(360px + 5vw + 24px); 
}

.section-categories::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background: linear-gradient(90deg, #ffd700, #ffed4e);
    margin: 15px auto 0;
    border-radius: 10px;
}

.main-content-layout {
    display: flex;
    gap: 30px;
    padding: 0 5vw;
    margin-bottom: 80px;
    align-items: flex-start;
    justify-content: center; /* Центрування всього блоку */
}

/* Розумна сітка категорій */
.category-grid-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
    gap: 25px !important;
    flex: 1;
    justify-content: center !important;
}

.category-card {
    background: white;
    border-radius: 20px;
    border: 1px solid rgba(0, 61, 130, 0.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    max-width: 350px;
    margin: 0 auto; /* Центрування картки в колонці */
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 61, 130, 0.15);
}

.card-image { padding: 30px 20px; flex: 1; display: flex; justify-content: center; }
.card-image img { width: 220px; height: 220px; object-fit: contain; }

.card-title {
    background: rgba(210, 230, 255, 0.2);
    padding: 15px;
    text-align: center;
    font-weight: 700;
    color: #003d82;
    margin: 0 15px 15px;
    border-radius: 12px;
}

/* Права колонка */
.right-column {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ══════════════════════════════════════════════
   4. ВЕРХНЯ ПАНЕЛЬ (Header & Navigation)
══════════════════════════════════════════════ */

#mw-head-base {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 61, 130, 0.1);
}

#p-personal ul {
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 12px;
    padding: 5px 15px !important;
    border: 1px solid rgba(0, 61, 130, 0.1) !important;
}

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

/* ══════════════════════════════════════════════
   5. МАЙСТЕР-ПАТЧ АДАПТИВНОСТІ (Mobile)
══════════════════════════════════════════════ */

@media (max-width: 1150px) {
    /* Ховаємо бокову панель MediaWiki */
    #mw-panel { display: none !important; }

    /* ПРИМУСОВЕ ПОВЕРНЕННЯ ЛОГОТИПА */
    #p-logo {
        display: block !important;
        position: relative !important;
        margin: 20px auto !important;
        width: 160px !important;
        height: 160px !important;
        float: none !important;
    }
    #p-logo a {
        display: block !important;
        width: 160px !important;
        height: 160px !important;
        background-size: contain !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        margin: 0 auto !important;
    }

    /* Рятуємо заголовок "Категорії" */
    .section-categories {
        margin: 40px auto !important;
        margin-right: auto !important; /* Скидаємо правий відступ */
        width: 90% !important;
        transform: none !important;
    }

    /* Перебудова Header (щоб не наїжджало) */
    #mw-head {
        position: relative !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        padding-bottom: 15px !important;
    }

    #p-personal, #left-navigation, #right-navigation, #p-search {
        position: static !important;
        float: none !important;
        margin: 10px auto !important;
        display: flex !important;
        justify-content: center !important;
        width: 90% !important;
    }

    #p-personal ul { flex-wrap: wrap; justify-content: center; }

    /* Перебудова контенту */
    .welcome-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }

    .welcome-text { transform: none !important; margin: 0 0 30px 0; }
    .stats-panel { margin: 0 auto !important; width: 100%; max-width: 320px; }

    .main-content-layout {
        flex-direction: column;
        align-items: center;
        padding: 0 20px;
    }

    .right-column { width: 100%; max-width: 400px; margin-top: 50px; }

    /* Центрування сітки */
    .category-grid-container {
        width: 100% !important;
        justify-content: center !important;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .welcome-title { font-size: 1.8rem !important; }
    .card-image img { width: 160px; height: 160px; }
    #p-logo a { width: 130px !important; height: 130px !important; }
}

/* ══════════════════════════════════════════════
   6. ДОДАТКОВІ ЕФЕКТИ (Animations & Particles)
══════════════════════════════════════════════ */

.scroll-progress {
    position: fixed;
    top: 0; left: 0; height: 4px;
    background: linear-gradient(90deg, #003d82, #ffd700);
    z-index: 10000;
}

.particles-canvas {
    position: absolute;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 1;
}

/* ══════════════════════════════════════════════
   7. СТИЛІ ДЛЯ VUE КАРТОК (В середині статей)
══════════════════════════════════════════════ */
.vcc-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    gap: 15px !important;
    justify-content: center !important;
}

.vcc-card {
    margin: 0 auto !important;
    width: 100% !important;
}

/* Стилізація випадкових статей */
.random-article-card {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    display: flex;
    gap: 15px;
    text-decoration: none !important;
    border: 1px solid rgba(0,61,130,0.05);
    transition: 0.3s;
}

.random-article-card:hover {
    background: #f0f6ff;
    transform: translateX(5px);
}

/* ══════════════════════════════════════════════
   ULTIMATE LAYOUT & RESPONSIVE PATCH
   (Додайте це в самий кінець файлу)
══════════════════════════════════════════════ */

/* 1. ПОВЕРТАЄМО ЛОГОТИП ТА ВИПРАВЛЯЄМО САЙДБАР */
#mw-panel {
    width: 0 !important;
    position: absolute !important;
    visibility: visible !important;
}

/* Ховаємо текст меню, лишаємо ЛОГО */
#mw-panel .portal, #mw-panel h3 { display: none !important; }

#p-logo {
    display: block !important;
    position: absolute !important;
    top: 10px !important;
    left: 20px !important;
    width: 160px !important;
    height: 160px !important;
    z-index: 100 !important;
}

#p-logo a {
    display: block !important;
    width: 160px !important;
    height: 160px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* 2. ЦЕНТРУВАННЯ ТЕКСТУ ТА СТАТИСТИКИ */
.welcome-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 80px 5vw 60px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.welcome-text {
    flex: 1 !important;
    text-align: center !important;
    margin-right: 300px !important; /* Компенсація для центрування відносно всього екрана */
}

.stats-panel {
    width: 280px !important;
    position: absolute !important;
    right: 5vw !important;
}

/* 3. СІТКА КАТЕГОРІЙ (3 В РЯД НА ПК) */
.section-categories {
    text-align: center !important;
    margin: 60px auto 40px !important;
    padding-right: 360px !important; /* Щоб заголовок був над картками */
    width: auto !important;
}

.main-content-layout {
    display: flex !important;
    gap: 30px !important;
    padding: 0 5vw !important;
    justify-content: center !important;
}

.category-grid-container {
    display: grid !important;
    /* ЖОРСТКО: 3 колонки на великих екранах */
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    flex: 1 !important;
    max-width: 1200px !important;
}

.category-card {
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 360px !important;
}

.right-column {
    width: 360px !important;
    flex-shrink: 0 !important;
}

/* 4. АДАПТИВНІСТЬ ДЛЯ ПЛАНШЕТІВ (1200px і менше) */
@media (max-width: 1200px) {
    #p-logo {
        position: relative !important;
        margin: 20px auto !important;
        left: 0 !important;
        top: 0 !important;
    }

    .welcome-wrapper {
        flex-direction: column !important;
        padding-top: 20px !important;
    }

    .welcome-text {
        margin-right: 0 !important;
    }

    .stats-panel {
        position: relative !important;
        right: 0 !important;
        margin: 20px auto !important;
        width: 100% !important;
        max-width: 320px !important;
    }

    .section-categories {
        padding-right: 0 !important;
        margin: 40px auto !important;
    }

    .main-content-layout {
        flex-direction: column !important;
        align-items: center !important;
    }

    .category-grid-container {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 в ряд */
    }

    .right-column {
        width: 100% !important;
        max-width: 400px !important;
    }
}

/* 5. АДАПТИВНІСТЬ ДЛЯ ТЕЛЕФОНІВ (700px і менше) */
@media (max-width: 700px) {
    .category-grid-container {
        grid-template-columns: 1fr !important; /* 1 в ряд */
    }

    /* Рятуємо верхню панель (Header) */
    #mw-head {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        position: relative !important;
        top: 0 !important;
    }

    #p-personal, #left-navigation, #right-navigation, #p-search {
        position: static !important;
        margin: 5px auto !important;
        width: 95% !important;
        display: flex !important;
        justify-content: center !important;
        float: none !important;
    }

    #p-personal ul { flex-wrap: wrap; justify-content: center; }
    
    .welcome-title { font-size: 1.8rem !important; }
}

/* Прибираємо білу смугу зліва на всіх роздільних здатностях */
#content, #mw-data-after-content, .mw-body {
    margin-left: 0 !important;
}