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. СКИДАННЯ СТАНДАРТНИХ ОБМЕЖЕНЬ MEDIAWIKI
══════════════════════════════════════════════ */
#content, #mw-content-container, .mw-body {
margin-left: 0 !important;
padding: 0 !important;
max-width: none !important;
}
/* Приховуємо елементи бокової панелі, АЛЕ залишаємо логотип */
#mw-panel .portal, #mw-panel h3 {
display: none !important;
}
#mw-panel {
width: 0 !important;
position: absolute !important;
}
/* ══════════════════════════════════════════════
2. ЛОГОТИП (LOGO) - ПРАЦЮЄ ВСЮДИ
══════════════════════════════════════════════ */
#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 {
display: flex;
align-items: center;
justify-content: space-between;
gap: 30px;
padding: 80px 5vw 60px;
background: linear-gradient(135deg, #f0f6ff 0%, #e8f0ff 50%, #fff 100%);
width: 100%;
box-sizing: border-box;
}
.welcome-text {
flex: 1;
text-align: center;
/* Зміщення для балансу з правою панеллю */
margin-right: 280px;
}
.welcome-title {
font-size: clamp(2rem, 5vw, 3rem);
font-weight: 800;
color: #003d82;
margin: 0;
line-height: 1.1;
}
.welcome-subtitle {
font-size: 1.5rem;
color: #444;
margin-bottom: 10px;
}
.stats-panel {
width: 280px;
position: absolute;
right: 5vw;
background: rgba(255, 255, 255, 0.8) !important;
backdrop-filter: blur(10px);
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 61, 130, 0.1) !important;
border: 1px solid rgba(0, 61, 130, 0.05) !important;
}
.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; }
/* ══════════════════════════════════════════════
4. СІТКА КАТЕГОРІЙ (DESKTOP)
══════════════════════════════════════════════ */
.section-categories {
font-size: 2.2rem;
font-weight: 800;
color: #003d82;
text-align: center;
margin: 60px auto 40px;
padding-right: 360px; /* Відступ під праву колонку */
}
.section-categories::after {
content: '';
display: block;
width: 80px;
height: 5px;
background: #ffd700;
margin: 15px auto 0;
border-radius: 10px;
}
.main-content-layout {
display: flex;
gap: 30px;
padding: 0 5vw;
justify-content: center;
margin-bottom: 100px;
}
.category-grid-container {
display: grid !important;
/* ФІКС: 3 колонки на ПК */
grid-template-columns: repeat(3, 1fr) !important;
gap: 25px !important;
flex: 1;
}
.category-card {
background: white;
border-radius: 20px;
box-shadow: 0 8px 25px rgba(0,0,0,0.06);
transition: transform 0.3s ease, box-shadow 0.3s ease;
text-align: center;
border: 1px solid rgba(0,61,130,0.05);
display: flex;
flex-direction: column;
}
.category-card:hover {
transform: translateY(-10px);
box-shadow: 0 15px 35px rgba(0,61,130,0.15);
}
.card-image { padding: 30px 20px; }
.card-image img { width: 200px; height: 200px; object-fit: contain; }
.card-title {
background: #f0f6ff;
padding: 15px;
font-weight: 700;
color: #003d82;
margin: 0 15px 15px;
border-radius: 12px;
}
.right-column {
width: 360px;
flex-shrink: 0;
}
/* ══════════════════════════════════════════════
5. АДАПТИВНІСТЬ (MOBILE & TABLET)
══════════════════════════════════════════════ */
@media (max-width: 1200px) {
#p-logo {
position: relative !important;
margin: 20px auto !important;
left: 0 !important;
}
.welcome-wrapper {
flex-direction: column;
padding-top: 20px;
}
.welcome-text {
margin-right: 0 !important;
transform: none !important;
}
.stats-panel {
position: relative !important;
right: 0 !important;
margin: 20px auto !important;
width: 100%;
max-width: 320px;
}
.section-categories {
padding-right: 0 !important;
margin: 40px auto !important;
}
.main-content-layout {
flex-direction: column;
align-items: center;
}
.right-column {
width: 100%;
max-width: 400px;
}
/* ФІКС: 2 колонки на планшетах */
.category-grid-container {
grid-template-columns: repeat(2, 1fr) !important;
width: 100%;
}
}
@media (max-width: 800px) {
#mw-head {
display: flex !important;
flex-direction: column !important;
height: auto !important;
position: relative !important;
}
#p-personal, #left-navigation, #right-navigation, #p-search {
position: static !important;
margin: 10px auto !important;
display: flex !important;
justify-content: center !important;
width: 90% !important;
}
#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; }
#p-logo, #p-logo a { width: 130px !important; height: 130px !important; }
}
/* Додаткові фікси для випадкових статей */
.random-article-card {
background: white;
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);
}