MediaWiki:Common.css

Матеріал з Київський національний лінгвістичний університет
Перейти до навігації Перейти до пошуку

Увага: Після публікування слід очистити кеш браузера, щоб побачити зміни.

  • Firefox / Safari: тримайте Shift, коли натискаєте Оновити, або натисніть Ctrl-F5 чи Ctrl-Shift-R (⌘-R на Apple Mac)
  • Google Chrome: натисніть Ctrl-Shift-R (⌘-Shift-R на Apple Mac)
  • Edge: тримайте Ctrl, коли натискаєте Оновити, або натисніть Ctrl-F5.
/* ══════════════════════════════════════════════
   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);
}