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

нема опису редагування
Немає опису редагування
Немає опису редагування
Рядок 902: Рядок 902:
}
}


/* --- СІТКА І ОСНОВА --- */
/* ==================================================== */
.mcc-heroes-list {
/* СЕКЦІЯ СТИЛІВ КАРТОК ГЕРОЇВ (ОРИГІНАЛЬНА ВЕРСІЯ З КОРЕКТНИМ CSS) */
    display: flex;
/* ==================================================== */
    flex-wrap: wrap;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}


.mcc-heroes-list li {
.mcc-heroes-list { display: flex; flex-wrap: wrap; justify-content: space-between; list-style: none; padding: 0; margin: 20px 0; }
    width: 18.5%;
.mcc-heroes-list li { width: 18.5%; margin-bottom: 20px; }
    margin-bottom: 20px;
    box-sizing: border-box;
}


/* Приховуємо небажані теги <pre>, якщо MediaWiki їх генерує */
/* Стилі картки - зовнішній контейнер */
.mcc-hero-link pre,  
.mcc-hero-card {
.mcc-hero-card pre {
  height: 200px;
    display: none !important;
  width: 100%;
    height: 0 !important;
  border: 1px solid rgba(255,255,255,0.1);
    padding: 0 !important;
  border-radius: 12px;
    margin: 0 !important;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);  
  background-color: #333;
  transition: box-shadow 0.3s ease-in-out;  
}
}


/* --- КЛІКАБЕЛЬНЕ ПОСИЛАННЯ (Вся картка) --- */
/* Стилі для посилання (контейнер) */
.mcc-hero-link {
.mcc-hero-link {
     display: block;
     display: block;
    text-decoration: none; /* Прибираємо підкреслення */
     height: 100%;
    color: inherit;
    cursor: pointer;
    position: relative; /* Необхідно для позиціонування .mcc-hero-card */
}
 
/* --- КОНТЕЙНЕР КАРТКИ --- */
.mcc-hero-card {
     height: 242px;
     width: 100%;
     width: 100%;
    border-radius: 4px;
    overflow: hidden;
     position: relative;
     position: relative;
     box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
     text-decoration: none;
     background-color: #1a1a1a;
     color: white;
     transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
     z-index: 2; /* Щоб бути клікабельним */
    border: 1px solid rgba(255, 255, 255, 0.1);
     overflow: hidden;  
}
 
.mcc-hero-link:hover .mcc-hero-card {
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    transform: translateY(-3px);
}
}


/* ---------------------------------------------------- */
/* ПОЗИЦІОНУВАННЯ ТА АНІМАЦІЯ ЗОБРАЖЕННЯ (СЕКЦІЯ FIX) */
/* ---------------------------------------------------- */


/* --- ЗОБРАЖЕННЯ: Абсолютне позиціонування --- */
/* 1. SPAN контейнер (.hero-image-wiki): Позиціонування */
.mcc-hero-card .hero-image-wiki {
.mcc-hero-card .hero-image-wiki {
     position: absolute;
     position: absolute;
Рядок 962: Рядок 945:
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     z-index: 0;
     z-index: 0;  
     overflow: hidden;
     overflow: hidden;  
}
}


.mcc-hero-card .hero-image-wiki img {
/* 2. IMG елемент (вкладений глибоко: .hero-image-wiki > a > img) */
.mcc-hero-card .hero-image-wiki a img {
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     object-fit: cover;
     object-fit: cover;  
     transform: scale(1);
     transform: scale(1);
     transition: transform 0.3s ease-in-out;
    transform-origin: center center;
     transition: transform 0.3s ease-in-out;  
}
}


.mcc-hero-link:hover .hero-image-wiki img {
/* Анімація при наведенні: збільшення зображення */
    transform: scale(1.1);
.mcc-hero-card:hover .hero-image-wiki a img {
  transform: scale(1.1);
}
}


/* --- ІНФОРМАЦІЙНИЙ БЛОК (ТЕКСТ) --- */
/* Градієнт для читабельності тексту */
.mcc-hero-info {
.mcc-hero-link::after {
    content: '';
     position: absolute;
     position: absolute;
     bottom: 0;
     top: 0;
    left: 0;
     width: 100%;
     width: 100%;
     text-align: center;
     height: 100%;
     padding: 15px 5px;
     background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.0) 50%);
    box-sizing: border-box;
    z-index: 1.5;  
    z-index: 2; /* Над зображенням */
    /* Мінімум затемнення для читабельності, без градієнта */
    background-color: rgba(0, 0, 0, 0.4);  
}
}


/* --- СТИЛІ ТЕКСТУ --- */
/* Інформаційний блок */
.mcc-hero-nickname {
.mcc-hero-info {
    font-size: 14px;
  position: absolute;
    color: white !important;  
  bottom: 10px;  
    font-weight: bold;
  width: 100%;
    line-height: 1.2;
  text-align: center;
    text-shadow: 0 0 5px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 0.8);
  padding: 0 5px;
  box-sizing: border-box;
  z-index: 3;  
}
}


.mcc-hero-date {
.mcc-hero-nickname { font-size: 14px; color: white; font-weight: bold; line-height: 1.2; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); }
    font-size: 14px;
.mcc-hero-date { font-size: 14px; color: yellow; opacity: 0.9; line-height: 1.2; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7); }
    color: yellow !important;
    opacity: 0.9;
    line-height: 1.2;
    text-shadow: 0 0 5px rgba(0, 0, 0, 1), 0 0 10px rgba(0, 0, 0, 0.8);
}


/* --- АДАПТИВНІСТЬ --- */
.mcc-hero-card:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); }
@media (max-width: 992px) {
    .mcc-heroes-list li {
        width: calc(33.333% - 13.333px);
    }
}
@media (max-width: 768px) {
    .mcc-heroes-list li {
        width: calc(50% - 10px);
        margin-bottom: 10px;
    }
}