/*
Theme Name: Законный Чат
Description: Исправление пагинации для Samsung/Android и улучшение мобильного рендеринга. Добавлена анимация пульсации прогресс-бара.
Version: 11.9.7
*/

/* --- 1. БАЗОВЫЕ НАСТРОЙКИ --- */
html, body { 
    background-color: #050507 !important; 
    color: #e2e8f0 !important;
    font-family: 'Outfit', sans-serif;
    margin: 0;
    padding: 0;
    width: 100%;
    -webkit-font-smoothing: antialiased;
}

button, a, .swiper-button-custom, .swiper-pagination-bullet, .news-modal-trigger {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
    user-select: none !important;
    -webkit-user-select: none;
}

.no-scroll { 
    overflow: hidden !important; 
    height: 100vh !important;
    position: relative;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0E17; }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

/* --- 2. ГЛОБАЛЬНЫЕ ЭФФЕКТЫ --- */
.glass-panel {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.neon-border {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}
.neon-border:hover {
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(255,255,255,0.05);
}

.text-glow {
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
}

.smart-grayscale {
    filter: grayscale(0);
    transition: all 700ms;
}
@media (min-width: 1024px) and (hover: hover) {
    .smart-grayscale { filter: grayscale(100%); }
    .group:hover .smart-grayscale { filter: grayscale(0); }
}

.feed-card-hover {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.feed-card-hover:hover {
    transform: translateY(-8px);
    z-index: 10;
}

/* --- 3. МОДАЛЬНОЕ ОКНО --- */
.modal-overlay { 
    position: fixed !important; 
    top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 99999 !important; 
    background: rgba(5, 5, 7, 0.9); 
    backdrop-filter: blur(24px); 
    -webkit-backdrop-filter: blur(24px);
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
}

.modal-centering-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100%;
    padding: 60px 16px;
    box-sizing: border-box;
}

.modal-content-card {
    width: 100%;
    max-width: 896px; 
    background: #0A0E17;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2.5rem;
    position: relative;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close-btn { 
    position: fixed; top: 24px; right: 24px; z-index: 100000; 
    width: 48px; height: 48px; border-radius: 50%; 
    background: rgba(17, 24, 39, 0.8); border: 1px solid rgba(255, 255, 255, 0.1); 
    color: white; display: flex; align-items: center; justify-content: center; 
    transition: 0.3s; cursor: pointer; 
}
.modal-close-btn:hover { background: #3B82F6; transform: rotate(90deg); }

/* --- 4. ФИКС ПАГИНАЦИИ (Samsung/Android/iOS Fix) --- */
.feed-slider-container {
    position: relative;
    width: 100%;
}

/* Стили для ProgressBar (скругленный вариант) */
.swiper-pagination-progressbar {
    background: rgba(255, 255, 255, 0.1) !important;
    height: 6px !important;
    border-radius: 20px !important; /* Максимальное скругление */
    overflow: hidden !important;
    position: relative !important;
    width: 140px !important; /* Делаем его компактным по центру */
    margin: 0 auto !important;
    top: auto !important;
    bottom: 0 !important;
}

.swiper-pagination-progressbar-fill {
    background: linear-gradient(to right, #3B82F6, #06B6D4) !important;
    border-radius: 20px !important; /* Скругление заполняющей части */
    animation: progressPulse 2.5s infinite ease-in-out; /* Пульсация активной зоны */
}

/* Анимация пульсации для прогресс-бара */
@keyframes progressPulse {
    0%, 100% { 
        filter: brightness(1) drop-shadow(0 0 2px rgba(59, 130, 246, 0.4)); 
    }
    50% { 
        filter: brightness(1.2) drop-shadow(0 0 8px rgba(59, 130, 246, 0.8)); 
    }
}

/* Стили для Bullets (точки на десктопе) */
.swiper-pagination-bullets {
    min-height: 20px !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative !important;
    z-index: 10 !important;
    padding: 10px !important;
    width: 100% !important;
    transform: none !important;
}

.swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    opacity: 1 !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    margin: 4px !important;
}

.swiper-pagination-bullet-active {
    background: #3B82F6 !important;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
}

.nav-btn-inner {
    width: 3.5rem;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2rem;
    background: rgba(10, 14, 23, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    transition: 0.3s;
}

/* --- 5. ОСТАЛЬНЫЕ КОМПОНЕНТЫ --- */
.logo-icon-box {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top right, #2563EB, #9333EA);
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2);
}

.btn-primary-tg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(to right, #3B82F6, #2563EB);
    padding: 1.25rem 2.5rem;
    border-radius: 0.75rem;
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    border: none;
}
.btn-primary-tg:hover {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
}

.resource-item { transition: 0.3s; }
.resource-item:hover { border-color: rgba(6, 182, 212, 0.3); background: rgba(6, 182, 212, 0.05); }

.about-img { 
    border-radius: 2rem; 
    border: 1px solid rgba(255,255,255,0.1); 
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    z-index: 10; 
    position: relative; 
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .about-img {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.5);
}

.about-card {
    padding: 1.5rem; 
    border-radius: 1rem; 
    background-color: #0F131F; 
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.footer-main { background-color: #000; padding: 4rem 0; width: 100%; }
.footer-container { max-width: 80rem; margin: 0 auto; padding: 0 2rem; display: flex; flex-direction: column; gap: 2rem; }

.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }