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

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


/* ==================================================== */
/* --- ГЛОБАЛЬНІ СТИЛІ СПИСКУ --- */
/* СЕКЦІЯ СТИЛІВ КАРТОК ГЕРОЇВ (ЧИСТИЙ HTML-ПІДХІД) */
.mcc-heroes-list {
/* ==================================================== */
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}
 
.mcc-heroes-list li {
    width: 18.5%; /* 5 колонок */
    margin-bottom: 20px;
    box-sizing: border-box;
}


/* ... (Стилі mcc-heroes-list, li, mcc-hero-card, mcc-hero-link залишаються без змін) ... */
/* --- БАЗОВА КАРТКА --- */
.mcc-hero-card {
    height: 242px;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    position: relative; /* Базовий контейнер для absolute позиціонування */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    background-color: #1a1a1a;
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
}


.mcc-heroes-list { display: flex; flex-wrap: wrap; justify-content: space-between; list-style: none; padding: 0; margin: 20px 0; }
.mcc-hero-card:hover {
.mcc-heroes-list li { width: 18.5%; margin-bottom: 20px; }
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
.mcc-hero-card { height: 200px; width: 100%; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; 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; }
    transform: translateY(-3px); /* Легкий підйом */
.mcc-hero-link { display: block; height: 100%; width: 100%; position: relative; text-decoration: none; color: white; z-index: 2; overflow: hidden; }
}


/* ---------------------------------------------------- */
/* --- КЛЮЧОВЕ РІШЕННЯ: ПОСИЛАННЯ-НАКЛАДКА --- */
/* ПОЗИЦІОНУВАННЯ ТА АНІМАЦІЯ ЗОБРАЖЕННЯ (ЧИСТИЙ IMG) */
.mcc-hero-overlay-link {
/* ---------------------------------------------------- */
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    background: none; /* Прозоре, щоб бачити вміст */
    z-index: 100; /* !!! НАЙВИЩИЙ ШАР: Гарантовано перехоплює клік !!! */
    cursor: pointer;
}


/* 1. DIV контейнер: позиціонування */
/* --- КОНТЕЙНЕР ЗОБРАЖЕННЯ (Елемент MediaWiki) --- */
/* Цей елемент тепер є прямим дочірнім елементом .mcc-hero-card */
.mcc-hero-card .hero-image-wiki {
.mcc-hero-card .hero-image-wiki {
     position: absolute;
     position: absolute;
Рядок 924: Рядок 958:
     width: 100%;
     width: 100%;
     height: 100%;
     height: 100%;
     z-index: 0;  
     z-index: 0;
     overflow: hidden;  
     overflow: hidden;
}
}


/* 2. IMG елемент: масштабування та ефекти */
.mcc-hero-card .hero-image-wiki img {
.mcc-hero-card .hero-image-wiki 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;  
     transition: transform 0.3s ease-in-out, filter 0.3s ease-in-out;
}
}


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


/* Градієнт */
/* --- ГРАДІЄНТНЕ ПОКРИТТЯ (Використовуємо ::before/::after на картці, а не на посиланні) --- */
.mcc-hero-link::after {
.mcc-hero-card::after {
     content: '';
     content: '';
     position: absolute;
     position: absolute;
Рядок 951: Рядок 983:
     height: 100%;
     height: 100%;
     background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.0) 50%);
     background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.0) 50%);
     z-index: 1.5;  
     z-index: 1; /* Під посиланням */
}
}


/* Інформаційний блок */
/* --- ІНФОРМАЦІЙНИЙ БЛОК --- */
.mcc-hero-info {
.mcc-hero-info {
  position: absolute;
    position: absolute;
  bottom: 10px;  
    bottom: 15px;
  width: 100%;
    width: 100%;
  text-align: center;
    text-align: center;
  padding: 0 5px;
    padding: 0 5px;
  box-sizing: border-box;
    box-sizing: border-box;
  z-index: 3;  
    z-index: 2; /* Над градієнтом, але під посиланням-накладкою */
}
}


.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); }
.mcc-hero-nickname {
.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); }
    font-size: 14px;
    color: white;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}


.mcc-hero-card:hover { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6); }
.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.9);
}
 
/* --- КАРТКА ЧЕМПІОНА --- */
.mcc-champion-card {
    border: 2px solid yellow;
    box-shadow: 0 4px 10px rgba(255, 204, 0, 0.5);
}
 
/* --- АДАПТИВНІСТЬ --- */
@media (max-width: 992px) {
    .mcc-heroes-list li {
        width: calc(33.333% - 13.333px); /* 3 в ряд */
    }
}
@media (max-width: 768px) {
    .mcc-heroes-list li {
        width: calc(50% - 10px); /* 2 в ряд */
        margin-bottom: 10px;
    }
}
@media (max-width: 576px) {
    .mcc-heroes-list li {
        width: 100%; /* 1 в ряд */
        margin-bottom: 10px;
    }
}