﻿:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #0077FF; /* Клубный синий */
    --accent-hover: #005bb5;
    --secondary-color: #1e1e1e;
    --text-muted: #a0a0a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background-color: var(--secondary-color);
    padding: 20px 0;
    border-bottom: 2px solid var(--accent-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 20px;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 800;
    color: #fff;
}

.nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 20px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav a:hover, .nav a.active {
    color: var(--accent-color);
}

/* Выпадающее меню */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown .dropbtn {
    cursor: pointer;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--secondary-color);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border: 1px solid #333;
    border-radius: 4px;
}
.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin-left: 0 !important;
}
.dropdown-content a:hover {
    background-color: #333;
    color: var(--accent-color);
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Баннер */
.hero {
    background: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.9)), url('../assets/hero-bg.jpg') center/cover;
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 42px;
    margin-bottom: 10px;
    color: #fff;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-info {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

.btn-outline {
    border: 2px solid var(--text-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
}

/* Секции */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    color: #fff;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 10px auto 0;
}

/* Сетки */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
}

.info-block h3 {
    color: var(--accent-color);
    font-size: 24px;
    margin-bottom: 20px;
}

.info-block p {
    margin-bottom: 15px;
    color: #ccc;
    line-height: 1.8;
    font-size: 15px;
}

/* Достижения */
.achievements-list {
    list-style: none;
    padding: 0;
}

.achievements-list li {
    background-color: var(--secondary-color);
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--accent-color);
    font-weight: 600;
}

/* Таблицы */
.table-container {
    overflow-x: auto;
    background-color: var(--secondary-color);
    border-radius: 8px;
    margin-top: 20px;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #333;
}
th {
    background-color: #1a1a1a;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 12px;
}
tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Карточки матчей */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.match-card {
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #333;
    transition: transform 0.2s;
}

.match-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.match-header {
    background-color: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    border-bottom: 1px solid #333;
}

.match-tournament {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.match-body {
    padding: 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.match-team {
    font-weight: 600;
    flex: 1;
    font-size: 14px;
}

.match-team:last-child {
    text-align: right;
}

.match-score {
    font-size: 28px;
    font-weight: 800;
    padding: 0 15px;
    color: var(--text-color);
}

.score-win { color: #4ade80; }
.score-lose { color: #ef4444; }
.score-draw { color: #fbbf24; }

.match-footer {
    padding: 10px 15px;
    background-color: #151515;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.badge.tech {
    background-color: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

/* Модальные окна */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    background-color: var(--secondary-color);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-top: 4px solid var(--accent-color);
}
.modal-close {
    position: absolute;
    top: 15px; right: 15px;
    background: none; border: none;
    color: var(--text-muted); font-size: 24px;
    cursor: pointer;
}
.modal-close:hover { color: var(--text-color); }
.modal-title { font-size: 22px; font-weight: 800; margin-bottom: 15px; color: var(--accent-color); }
.modal-section { margin-bottom: 20px; }
.modal-section h4 { font-size: 14px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; border-bottom: 1px solid #333; padding-bottom: 5px; }
.modal-section p, .modal-section li { font-size: 15px; margin-bottom: 5px; line-height: 1.5; }
.modal-section ul { padding-left: 20px; }

/* Кликабельные элементы */
.clickable { cursor: pointer; transition: opacity 0.2s; }
.clickable:hover { opacity: 0.7; }

/* Сортировка */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.sortable:hover {
    color: #fff;
}
.sortable::after {
    content: ' ▼';
    font-size: 10px;
    opacity: 0.5;
}
.sortable.asc::after {
    content: ' ▲';
    opacity: 1;
    color: var(--accent-color);
}
.sortable.desc::after {
    content: ' ▼';
    opacity: 1;
    color: var(--accent-color);
}

/* Зал славы */
.hall-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 768px) {
    .hall-grid { grid-template-columns: 1fr; }
}
.hall-card {
    background-color: var(--secondary-color);
    padding: 25px;
    border-radius: 12px;
    border-top: 4px solid var(--accent-color);
}
.hall-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #fff;
}
.hall-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.tag {
    background-color: #2a2a2a;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #444;
}
.record-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}
.record-item:last-child {
    border-bottom: none;
}
.record-value {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 18px;
    text-align: right;
}
.timeline {
    list-style: none;
    padding: 0;
    border-left: 2px solid var(--accent-color);
    margin-left: 10px;
}
.timeline li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
}
.timeline li::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 50%;
}
.timeline-date {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 4px;
}

/* Подвал */
.footer {
    background-color: #0a0a0a;
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid #333;
}

/* === СЛАЙДЕР С ФОТО === */
.slider-container {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 3px solid var(--secondary-color);
}

.slide {
    display: none;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.slide.active {
    display: block;
    animation: fade 0.5s;
}

@keyframes fade {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 5px;
    transition: 0.3s;
    z-index: 10;
}

.slider-btn:hover {
    background-color: var(--accent-color);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* === ИСПРАВЛЕНИЕ РАЗМЕРА ЛОГОТИПА === */
.logo img {
    height: 50px !important;
    width: 50px !important;
    object-fit: contain; /* Чтобы логотип не искажался */
    border-radius: 5px;
    margin-right: 15px;
}
.logo {
    display: flex;
    align-items: center;
}

/* === ГАЛЕРЕЯ ВНИЗУ (3 В РЯД) === */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.photo-gallery img {
    width: 100%;
    height: 250px; /* Фиксированная высота, чтобы фото были ровными */
    object-fit: cover; /* Чтобы фото не искажались, а обрезались по краям */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 2px solid var(--secondary-color);
    transition: transform 0.3s;
}

.photo-gallery img:hover {
    transform: scale(1.05); /* Легкий эффект при наведении */
    border-color: var(--accent-color);
}

@media (max-width: 768px) {
    .photo-gallery {
        grid-template-columns: 1fr; /* На телефонах фото будут друг под другом */
    }
}

/* === НОВОСТИ ВК (АДАПТИВ) === */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr !important;
    }
}

/* === СЕТКА НОВОСТЕЙ === */
@media (max-width: 900px) {
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important; /* На узких экранах блоки встают друг под друга */
    }
}

/* === ПЛАВНАЯ ПРОКРУТКА === */
html {
    scroll-behavior: smooth;
}

/* === ТРИ КОЛОНКИ НОВОСТЕЙ === */
@media (max-width: 1024px) {
    /* Планшеты: 2 колонки */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important; 
    }
}
@media (max-width: 768px) {
    /* Телефоны: 1 колонка */
    div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important; 
    }
}

/* === АНИМАЦИИ ПОЯВЛЕНИЯ === */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === УЛУЧШЕНИЯ ДЛЯ МОБИЛЬНЫХ === */
@media (max-width: 768px) {
    .section-title { font-size: 26px; }
    .hero h2 { font-size: 36px; }
}
