/* Файл: dotascore/static/css/home_styles.css */

/* ========================================================= */
/* БАЗОВЫЕ СТИЛИ */
/* ========================================================= */

h1 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 50px;
    font-family: 'Roboto', sans-serif;
    font-size: 2.5em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.news-section {
    margin-bottom: 80px;
    position: relative;
    /* Убедимся, что секция видима */
    display: block; 
    opacity: 1;
}

.news-section-title {
    color: #f0f8ff;
    font-size: 2em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 35px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* ========================================================= */
/* СЛАЙДЕР */
/* ========================================================= */

.news-slider-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 60px;
    box-sizing: border-box; /* Важно для правильных размеров */
}

.news-slider {
    overflow: hidden;
    padding: 20px 10px;
    margin: -20px -10px; /* Компенсация теней */
}

.news-slider-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* ========================================================= */
/* КАРТОЧКИ (FIX ИЗОБРАЖЕНИЙ) */
/* ========================================================= */

.news-card {
    min-width: 100%; /* Занимает всю ширину слайдера */
    background: #1a1f2e;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 480px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.news-card-image-container {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: #000;
}

/* 1. РАЗМЫТЫЙ ФОН */
.news-image-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(15px) brightness(0.5); /* Размываем и затемняем */
    transform: scale(1.1); /* Убираем белые края */
    z-index: 1;
}

/* 2. ОСНОВНАЯ КАРТИНКА */
.news-card-image {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Картинка видна целиком! */
    z-index: 2;
}

.news-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, #1a1f2e 10%, transparent);
    z-index: 3;
}

.news-card-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
}

.news-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}
.dota-badge { background: #007bff; }
.guild-badge { background: #28a745; }

/* ========================================================= */
/* КОНТЕНТ КАРТОЧКИ */
/* ========================================================= */

.news-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 4;
    background: #1a1f2e; /* Страховка, если фон прозрачный */
}

.news-card-title {
    color: #fff;
    font-size: 1.3em;
    font-weight: bold;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.news-card-description {
    color: #b0b0b0;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 15px;
    flex-grow: 1;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.news-card-date {
    color: #00d2ff;
    font-size: 0.85em;
}

.news-card-link {
    color: #fff;
    text-decoration: none;
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    transition: 0.3s;
}

.news-card-link:hover {
    background: #00d2ff;
    color: #000;
}

/* Специфика гильдии */
.guild-card .news-card-date { color: #98ff98; }
.guild-card .news-card-link:hover { background: #98ff98; color: #000; }

/* ========================================================= */
/* НАВИГАЦИЯ (ОБНОВЛЕННАЯ) */
/* ========================================================= */

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;  /* Чуть больше для удобства */
    height: 48px;
    
    /* Современный фон "Стекло" */
    background: rgba(26, 31, 46, 0.7); 
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    
    /* Центрирование иконки SVG */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    
    /* Плавные переходы */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Скрываем кнопки на мобильных, так как там свайп (опционально) */
@media (max-width: 600px) {
    .slider-nav {
        width: 36px;
        height: 36px;
        /* Если хотите скрыть совсем, раскомментируйте: display: none; */
    }
}

/* Состояние: Наведение (Общее) */
.slider-nav:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.1); /* Легкое увеличение */
    border-color: transparent;
    color: #000; /* Иконка становится черной для контраста */
}

/* Состояние: Неактивна (Конец/Начало слайдера) */
.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(0,0,0,0.2);
    box-shadow: none;
    transform: translateY(-50%) scale(0.95);
}

/* Позиционирование */
.slider-nav-prev { left: 5px; }
.slider-nav-next { right: 5px; }

/* === ЦВЕТОВЫЕ ТЕМЫ === */

/* Секция Dota (Синяя тема) */
.dota-section .slider-nav:hover:not(:disabled) {
    background: #00d2ff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.6); /* Синее свечение */
}

/* Секция Guild (Зеленая тема) */
.guild-section .slider-nav:hover:not(:disabled) {
    background: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.6); /* Зеленое свечение */
}

/* ИНДИКАТОРЫ (Точки снизу) */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    padding: 10px 0;
}

.slider-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    padding: 0;
    position: relative;
    overflow: hidden;
    
    /* Плавные переходы для всех свойств */
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.slider-indicator:hover:not(.active) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.2);
}

/* === АКТИВНОЕ СОСТОЯНИЕ - DOTA (Синяя тема) === */
.dota-section .slider-indicator.active {
    width: 40px; /* Превращается в полоску */
    height: 10px;
    border-radius: 5px;
    
    /* Градиент синий */
    background: linear-gradient(90deg, 
        #0099ff 0%, 
        #00d2ff 50%, 
        #00ffff 100%
    );
    
    border: 1px solid rgba(0, 210, 255, 0.5);
    box-shadow: 
        0 0 15px rgba(0, 210, 255, 0.6),
        0 0 30px rgba(0, 210, 255, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
    
    transform: scale(1);
}

/* Анимация пульсации для активной точки Dota */
@keyframes dota-pulse {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(0, 210, 255, 0.6),
            0 0 30px rgba(0, 210, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(0, 210, 255, 0.8),
            0 0 40px rgba(0, 210, 255, 0.5);
    }
}

.dota-section .slider-indicator.active {
    animation: dota-pulse 2s ease-in-out infinite;
}

/* === АКТИВНОЕ СОСТОЯНИЕ - GUILD (Зеленая тема) === */
.guild-section .slider-indicator.active {
    width: 40px;
    height: 10px;
    border-radius: 5px;
    
    /* Градиент зеленый */
    background: linear-gradient(90deg, 
        #20a040 0%, 
        #28a745 50%, 
        #98ff98 100%
    );
    
    border: 1px solid rgba(40, 167, 69, 0.5);
    box-shadow: 
        0 0 15px rgba(40, 167, 69, 0.6),
        0 0 30px rgba(40, 167, 69, 0.3),
        inset 0 1px 3px rgba(255, 255, 255, 0.3);
    
    transform: scale(1);
}

/* Анимация пульсации для активной точки Guild */
@keyframes guild-pulse {
    0%, 100% {
        box-shadow: 
            0 0 15px rgba(40, 167, 69, 0.6),
            0 0 30px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(40, 167, 69, 0.8),
            0 0 40px rgba(40, 167, 69, 0.5);
    }
}

.guild-section .slider-indicator.active {
    animation: guild-pulse 2s ease-in-out infinite;
}

/* Эффект блика на активной полоске */
.slider-indicator.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent
    );
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* ========================================================= */
/* АДАПТИВНОСТЬ */
/* ========================================================= */

@media (max-width: 600px) {
    .news-slider-container { padding: 0 30px; }
    .slider-nav { width: 30px; height: 30px; font-size: 16px; }
    .news-card { height: auto; min-height: 420px; }
    .news-card-image-container { height: 200px; }
        .slider-indicators {
        gap: 10px;
        margin-top: 20px;
    }
    
    .slider-indicator {
        width: 8px;
        height: 8px;
    }
    
    .slider-indicator.active {
        width: 32px;
        height: 8px;
    }
}