/* ==========================================================================
   1. ГЛОБАЛЬНІ НАЛАШТУВАННЯ ТА БЛАКИТНО-БІЛА ПАЛІТРА (stylenews.css)
   ========================================================================== */
:root {
    --brand-dark-blue: #0B132B; /* Глибокий сапфірово-синій */
    --brand-navy: #1C2541;      /* Начений синій */
    --brand-cyan: #0EA5E9;      /* Яскравий блакитно-блакитний (Cyan) */
    --brand-cyan-hover: #0284C7;
    --brand-sky: #38BDF8;       /* Небесно-блакитний акцент */
    --neutral-light: #F0F9FF;   /* Преміальний біло-крижаний фоновий колір */
    --neutral-dark: #0B132B;
    --text-white: #FFFFFF;
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-premium: 0 10px 45px rgba(14, 165, 233, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Прибирає синій спалах при тапі на смартфоні */
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    background-color: var(--brand-dark-blue);
    color: var(--text-white);
}

body {
    overflow-x: hidden;
    width: 100vw;
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Скляні панелі з блакитним сяйвом (Glassmorphism) */
.glass {
    background: rgba(11, 19, 43, 0.85);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 12px 40px rgba(11, 19, 43, 0.35);
}


/* ==========================================================================
   2. ШАПКА САЙТУ ТА МОБІЛЬНЕ МЕНЮ
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
}

.header-limit {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    border-radius: 20px;
}

.logo a {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-white);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo .gold-text {
    color: var(--brand-sky);
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-sky);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-switch {
    background: none;
    border: none;
    color: var(--text-white);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 4px 8px;
}

/* Гамбургер кнопка */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.mobile-menu-toggle .bar {
    width: 22px;
    height: 2px;
    background-color: var(--text-white);
    transition: var(--transition-smooth);
}


/* ==========================================================================
   3. HERO НОВИН (ПРИСТОСОВАНО ПІД ТЕЛЕФОНИ)
   ========================================================================== */
.inner-page {
    background-color: var(--brand-dark-blue);
    color: var(--text-white);
}

.page-hero {
    padding: 160px 0 30px 0;
    text-align: center;
}

.page-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-badge {
    color: var(--brand-sky);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.page-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -1px;
    margin: 10px 0 14px 0;
    line-height: 1.15;
}

.page-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #94A3B8;
    line-height: 1.6;
}


/* ==========================================================================
   4. БЛОК ФІЛЬТРІВ ТА ПОШУКУ
   ========================================================================== */
.blog-main-section {
    position: relative;
    z-index: 10;
}

.blog-filter-bar {
    transition: var(--transition-smooth);
}

.filter-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-categories .tab-btn {
    border: 1px solid rgba(56, 189, 248, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #94A3B8;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.filter-categories .tab-btn:hover,
.filter-categories .tab-btn.active {
    background-color: var(--brand-cyan);
    color: #FFFFFF;
    border-color: var(--brand-cyan);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

.search-input-wrapper input {
    transition: var(--transition-smooth);
}

.search-input-wrapper input:focus {
    border-color: var(--brand-sky) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
    background: rgba(11, 19, 43, 0.95) !important;
}


/* ==========================================================================
   5. СІТКА СТАТЕЙ ТА ГОЛОВНА НОВИНА
   ========================================================================== */
.blog-layout-grid {
    width: 100%;
}

.featured-news-card {
    transition: var(--transition-smooth);
}

.featured-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.15);
}

.featured-news-card .news-title {
    color: var(--neutral-dark) !important;
    font-size: clamp(1.2rem, 3vw, 1.5rem) !important;
}

.featured-news-card .news-excerpt {
    color: #475569 !important;
}

/* Картки стандартних новин */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.news-card {
    background-color: var(--text-white);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.1);
    transition: var(--transition-smooth);
    color: var(--neutral-dark);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
}

.news-image-wrapper {
    position: relative;
    border-radius: 0;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.news-card:hover .news-img {
    transform: scale(1.04);
}

.news-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.news-body {
    padding: 24px;
}

.news-date {
    font-size: 0.78rem;
    color: #64748B;
    font-weight: 600;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 6px 0 10px 0;
    color: var(--neutral-dark);
    line-height: 1.35;
}

.news-excerpt {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 18px;
}

.news-read-btn {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-cyan);
}


/* ==========================================================================
   6. ПРАВА КОЛОНКА (СИДБАР)
   ========================================================================== */
.sidebar-widget {
    transition: var(--transition-smooth);
}

.popular-posts-list a:hover h5 {
    color: var(--brand-sky) !important;
}

.popular-posts-list img {
    transition: var(--transition-smooth);
}

.popular-posts-list a:hover img {
    transform: scale(1.08);
}

.tags-cloud .btn-glass:hover {
    background-color: var(--brand-cyan);
    border-color: var(--brand-cyan);
    color: #ffffff;
}

.sidebar-widget form input:focus {
    border-color: var(--brand-sky) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.25);
}


/* ==========================================================================
   7. КНОПКИ ТА УТИЛІТИ
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    white-space: nowrap;
}

.btn-sm { padding: 8px 14px; font-size: 0.78rem; border-radius: 10px; }
.btn-glass { background-color: rgba(255, 255, 255, 0.1); color: var(--text-white); border: 1px solid rgba(255, 255, 255, 0.2); }
.btn-glass:hover { background-color: rgba(255, 255, 255, 0.2); }
.btn-gold { background-color: var(--brand-cyan); color: var(--text-white); border: none; box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35); }
.btn-gold:hover { background-color: var(--brand-cyan-hover); box-shadow: 0 8px 25px rgba(14, 165, 233, 0.45); }

.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   8. СПЕЦІАЛЬНИЙ МОБІЛЬНИЙ АДАПТИВ (ПЛАНШЕТИ ТА СМАРТФОНИ)
   ========================================================================== */
@media (max-width: 992px) {
    .blog-layout-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .featured-news-card {
        grid-template-columns: 1fr !important;
    }

    .featured-news-card .news-image-wrapper {
        min-height: 220px !important;
    }

    .featured-news-card .news-body {
        padding: 24px !important;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 75px;
        left: 16px;
        right: 16px;
        background: rgba(11, 19, 43, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid rgba(56, 189, 248, 0.25);
        border-radius: 20px;
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    }

    .nav-menu.active { display: flex; }
    .mobile-menu-toggle { display: flex; }

    .nav-actions { display: flex !important; align-items: center !important; gap: 8px !important; }
    .nav-actions .btn { display: inline-flex !important; padding: 6px 12px !important; font-size: 0.75rem !important; border-radius: 8px !important; }
}

@media (max-width: 576px) {
    .container { padding: 0 16px; }
    .page-hero { padding: 120px 0 24px 0; }
    
    .blog-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 16px !important;
        margin-bottom: 30px !important;
    }

    .filter-categories {
        overflow-x: auto;
        padding-bottom: 6px;
        flex-wrap: nowrap;
    }

    .search-input-wrapper {
        max-width: 100% !important;
    }

    .sidebar-widget {
        padding: 20px !important;
    }

    .btn { width: 100%; } /* Повноширинні кнопки під палець */
}