/*
Theme Name: Hub News Glavcom Theme
Author: AI Developer
Description: Тема WordPress у стилі Glavcom для сайту Hub-News з повною підтримкою мобільних пристроїв, адаптивною сіткою та оптимізованими стилями.
Version: 2.5
*/

:root {
    --primary-color: #d9230f;
    --dark-color: #111111;
    --bg-light: #f8f9fa;
    --text-color: #222222;
    --border-color: #e5e5e5;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; font-family: var(--font-main); background-color: #fff; color: var(--text-color); line-height: 1.6; }
img, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-color); }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 15px; }

.main-header { border-bottom: 2px solid var(--primary-color); padding: 15px 0; background: #fff; }
.header-wrapper { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex-wrap: wrap; }
.logo { font-size: 32px; font-weight: 900; text-transform: uppercase; letter-spacing: -1px; }
.logo span { color: var(--primary-color); }

.search-form { display: flex; gap: 5px; width: 100%; max-width: 320px; }
.search-field { width: 100%; padding: 8px 12px; border: 1px solid #ccc; border-radius: 3px; font-size: 14px; }
.search-submit { background: var(--primary-color); color: #fff; border: none; padding: 8px 14px; border-radius: 3px; cursor: pointer; font-weight: 700; }

.main-nav { background: #fff; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 100; }
.main-nav ul { display: flex; list-style: none; gap: 15px; padding: 12px 0; font-weight: 700; font-size: 14px; text-transform: uppercase; overflow-x: auto; white-space: nowrap; }

.glavcom-layout { display: grid; grid-template-columns: 1fr 340px; gap: 25px; margin-top: 25px; margin-bottom: 40px; }
.hero-block { margin-bottom: 30px; }
.main-news-card { position: relative; background: #000; color: #fff; border-radius: 6px; overflow: hidden; }
.main-news-card img { width: 100%; height: 380px; object-fit: cover; opacity: 0.85; }
.main-news-info { position: absolute; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,0.95)); padding: 20px; width: 100%; }
.main-news-info h2 { font-size: 22px; font-weight: 800; color: #fff; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 15px; }
.news-item { border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.news-item img { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; margin-bottom: 10px; }
.news-item h3 { font-size: 15px; font-weight: 700; }
.news-meta { font-size: 12px; color: #777; margin-top: 6px; }

.pagination-container { margin-top: 35px; padding-top: 20px; border-top: 2px solid var(--border-color); text-align: center; }
.pagination-container .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; background: var(--bg-light); border: 1px solid var(--border-color); border-radius: 4px; font-weight: 700; margin: 0 2px; }
.pagination-container .page-numbers.current, .pagination-container .page-numbers:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

.sidebar-box { background: var(--bg-light); border: 1px solid var(--border-color); padding: 18px; border-radius: 4px; margin-bottom: 25px; }
.sidebar-title { font-size: 16px; font-weight: 800; text-transform: uppercase; border-bottom: 2px solid var(--primary-color); padding-bottom: 8px; margin-bottom: 15px; }
.feed-list { list-style: none; }
.feed-item { padding: 10px 0; border-bottom: 1px dashed var(--border-color); font-size: 14px; }

.single-article { margin-top: 20px; }
.single-title { font-size: 28px; font-weight: 800; margin-bottom: 15px; line-height: 1.3; }
.single-meta { font-size: 13px; color: #666; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.single-thumb { margin-bottom: 20px; border-radius: 6px; overflow: hidden; }
.single-content { font-size: 17px; line-height: 1.7; color: #333; }
.single-content p { margin-bottom: 18px; }

.site-footer { background: var(--dark-color); color: #fff; padding: 30px 0; margin-top: 50px; text-align: center; font-size: 13px; }

@media (max-width: 900px) {
    .glavcom-layout { grid-template-columns: 1fr; }
    .header-wrapper { flex-direction: column; align-items: flex-start; }
    .search-form { max-width: 100%; }
    .main-news-card img { height: 260px; }
}