/* =================================================================
   QULOQ NEWS - ОСНОВНЫЕ СТИЛИ (PUBLIC)
   ================================================================= */

/* --- ПЕРЕМЕННЫЕ --- */
:root {
    --black: #000000;
    --white: #ffffff;
    --yellow: #facc15; /* Electric Yellow */
    --red: #ff0000;
    --gray: #f4f4f4;
    --border: #dddddd;
}

/* --- ОБНУЛЕНИЕ --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =================================================================
   ШАПКА (HEADER)
   ================================================================= */
.main-header {
    background: var(--white);
    border-bottom: 2px solid var(--black);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    font-size: 28px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1.5px;
    text-decoration: none;
    color: var(--black);
}

.main-nav { display: flex; gap: 20px; }
.main-nav a {
    text-decoration: none;
    color: var(--black);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}
.main-nav a:hover { color: var(--yellow); }

.btn-live {
    background: var(--red);
    color: var(--white);
    border: none;
    padding: 4px 12px;
    font-weight: 900;
    font-size: 11px;
    border-radius: 2px;
    cursor: pointer;
    text-transform: uppercase;
}

/* =================================================================
   ГЛАВНАЯ СТРАНИЦА (INDEX)
   ================================================================= */

/* --- БАНЕР СЛОГАН --- */
.hero-banner {
    background: var(--black);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.hero-banner h1 {
    font-size: clamp(14px, 3.5vw, 42px);
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 2px;
}

/* --- ГЛАВНАЯ СЕТКА --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    margin-top: 50px;
}

/* --- СЕТКА НОВОСТЕЙ --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}
.news-card {
    border: 2px solid var(--black);
    padding: 25px;
    background: var(--white);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 5px 5px 0px var(--yellow); }
.news-card h3 a { text-decoration: none; color: var(--black); font-weight: 900; font-size: 22px; line-height: 1.2; }
.news-card .card-meta { font-size: 12px; font-weight: 700; color: #666; margin-bottom: 10px; text-transform: uppercase; }
.news-card p { margin-top: 15px; font-size: 16px; color: #333; line-height: 1.4; }

.read-more-btn {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    background: var(--black);
    color: var(--white);
    padding: 10px 20px;
    text-align: center;
}
.read-more-btn:hover { background: var(--yellow); color: var(--black); }

/* --- СПИСОК РЕЗУЛЬТАТОВ (ЛЕНТА) --- */
.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.search-item {
    display: flex;
    gap: 15px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.search-item:hover {
    border-color: var(--yellow);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.search-item-media {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    position: relative;
    background: #000;
}

.search-item-media img { width: 100%; height: 100%; object-fit: cover; }

/* Видео в ленте */
.search-item-media video.feed-video-cover {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    pointer-events: none !important;
    display: block !important;
    border: none !important;
}

/* Иконка Play на видео в ленте */
.search-item-media:has(video)::after {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
    padding-left: 2px;
}

.search-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-item-info h3 {
    font-size: 16px;
    margin: 0 0 5px 0;
    line-height: 1.2;
}

.search-item-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =================================================================
   СТРАНИЦА СТАТЬИ (ARTICLE)
   ================================================================= */
.meta {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.meta span { margin-right: 15px; }
.meta .category { color: var(--white); background: var(--black); padding: 2px 6px; }

.article-title {
    font-size: clamp(32px, 5vw, 50px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 25px;
}

[contenteditable]:focus {
    outline: 2px solid var(--yellow);
    background: rgba(250, 204, 21, 0.1);
}

.preview-text {
    font-size: 22px;
    font-weight: 500;
    border-left: 8px solid var(--yellow);
    padding-left: 25px;
    margin-bottom: 40px;
    color: #1a1a1a;
}

.main-image img, .main-image video { width: 100%; height: auto; display: block; }
.main-image figcaption {
    font-size: 13px; color: #666; margin: 10px 0 30px; font-style: italic;
}

.article-body { font-size: 19px; color: #111; }
.article-body p { margin-bottom: 25px; }
.article-body h3 {
    font-size: 26px; font-weight: 900; text-transform: uppercase;
    margin: 40px 0 20px;
}
.article-body blockquote {
    font-size: 28px; font-weight: 800; line-height: 1.2;
    margin: 40px 0; padding: 20px 0;
    border-top: 3px solid var(--black);
    border-bottom: 3px solid var(--black);
}

/* Ссылки внутри статьи */
.article-body a {
    color: #d97706;
    text-decoration: none;
    font-weight: 700;
}
.article-body a:hover { color: var(--black); }

/* Теги */
.article-tags {
    margin-top: 40px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.article-tags a {
    text-decoration: none;
    background: var(--gray);
    color: var(--black);
    padding: 5px 15px;
    font-size: 14px;
    font-weight: 700;
}

/* Поделиться */
.share-block {
    margin-top: 40px;
    padding: 20px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 20px;
}
.share-icons { display: flex; gap: 15px; }
.share-btn {
    text-decoration: none;
    color: var(--yellow);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
}

/* Читайте также */
.read-more { margin-top: 60px; border-top: 4px solid var(--black); padding-top: 40px; }
.section-title { font-size: 24px; font-weight: 900; text-transform: uppercase; margin-bottom: 30px; }
.read-more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.more-item { text-decoration: none; color: var(--black); }
.more-item img { width: 100%; height: 200px; object-fit: cover; }
.more-item h5 { font-size: 18px; font-weight: 800; margin-top: 15px; line-height: 1.2; }

/* =================================================================
   САЙДБАР (SIDEBAR)
   ================================================================= */
.sidebar-title {
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    border-bottom: 4px solid var(--black);
    padding-bottom: 8px;
    margin-bottom: 25px;
}

.sidebar-block { margin-bottom: 40px; }

.recent-news { list-style: none; }
.recent-news li { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.recent-news .time { font-weight: 900; font-size: 12px; background: var(--yellow); padding: 2px 4px; margin-right: 5px; }
.recent-news a { text-decoration: none; color: var(--black); font-weight: 700; font-size: 15px; display: inline; margin-top: 5px; transition: 0.2s; }
.recent-news a:hover { color: var(--red); }

.sticky-box {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    margin-top: 0;
}

.editor-choice-card { text-decoration: none; color: var(--black); }
.editor-choice-media {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 2px;
    margin-bottom: 15px;
    display: block;
    background-color: #eee;
}
.editor-choice-card p { font-weight: 800; font-size: 16px; line-height: 1.3; }

/* =================================================================
   ФУТЕР (FOOTER)
   ================================================================= */
.main-footer { background: var(--black); color: var(--white); padding: 60px 0 20px; margin-top: 80px; }
.footer-grid {
    display: flex;
    justify-content: flex-start;
    gap: 500px;
    align-items: flex-start;
}
.footer-info p { margin-top: 0px; max-width: 300px; opacity: 0.7; }
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    white-space: nowrap;
}
.footer-links a { text-decoration: none; color: var(--white); font-weight: 700; opacity: 0.8; }
.footer-bottom { text-align: center; margin-top: 60px; padding-top: 20px; border-top: 1px solid #333; font-size: 12px; opacity: 0.5; }

/* =================================================================
   АДАПТИВНОСТЬ (MOBILE)
   ================================================================= */

/* --- ПЛАНШЕТЫ И МОБИЛЬНЫЕ (до 900px) --- */
@media (max-width: 900px) {
    .container { padding: 0 15px; }
    .main-layout { margin-top: 30px; grid-template-columns: 1fr; gap: 40px; display: block; }
    .main-nav { display: none; }
    .hero-banner h1 { white-space: normal; }

    /* Главная */
    .news-grid { grid-template-columns: 1fr !important; gap: 30px; margin-bottom: 30px !important; }
    .hero-card { grid-template-columns: 1fr; height: auto; min-height: auto; margin-top: 20px !important; margin-bottom: 30px !important; }
    .hero-image { height: 250px; min-height: 250px; }
    .hero-content { padding: 20px; }
    .hero-title { font-size: 24px; line-height: 1.2; }

    .news-item { box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
    .item-media { height: 200px; }
    .item-title { font-size: 18px; }

    /* Статья */
    .article-title { font-size: 28px !important; line-height: 1.2; }
    .article-body { font-size: 17px !important; }
    .article-body p { margin-bottom: 20px; }
    .article-body blockquote { font-size: 20px; padding: 15px; }
    .preview-text { font-size: 18px !important; line-height: 1.5; padding-left: 15px; border-left-width: 4px; margin-bottom: 30px; }
    .article-tags { margin-top: 25px; gap: 8px; }
    .article-tags a { padding: 4px 12px; font-size: 13px; }

    /* Сайдбар и Футер */
    .content-with-sidebar { margin-top: 0 !important; gap: 30px !important; grid-template-columns: 1fr; display: flex; flex-direction: column; }
    .sidebar { margin-top: 40px; padding-top: 20px; border-top: none !important; padding: 0 !important; background: transparent !important; }

    .sidebar .sticky-box {
        background-color: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        margin-top: 30px !important;
        margin-bottom: 10px;
    }
    .sidebar .sticky-box .sidebar-title {
        border-bottom: 2px solid var(--yellow) !important;
        margin-bottom: 15px !important;
        padding-bottom: 10px !important;
        font-size: 16px !important;
    }

    .footer-grid { flex-direction: column; gap: 30px; }
    .footer-links { align-items: flex-start; }
    .read-more-grid { grid-template-columns: 1fr; }
    .read-more { display: none !important; }

    /* Заголовки категорий */
    .category-title { font-size: 24px !important; line-height: 1.2 !important; margin-bottom: 20px !important; word-wrap: break-word; }
    .content-area { margin-bottom: 60px !important; }

    /* Выбор редакции медиа */
    .editor-choice-media { aspect-ratio: 16 / 9 !important; height: auto !important; object-position: center top; }
}

/* --- МОБИЛЬНЫЕ (до 1100px) - Промежуточные --- */
@media (max-width: 1100px) {
    .news-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .news-item .meta-info-grid, .news-item .item-desc, .news-item .link-arrow, .news-item .item-content > div:last-child { display: none !important; }
    .news-item .item-content { padding: 15px !important; min-height: auto !important; display: block !important; }
    .news-item .item-title { margin-bottom: 0 !important; font-size: 18px !important; line-height: 1.3 !important; }
    .news-item .item-media { height: 220px !important; }
}

/* --- МОБИЛЬНЫЕ (до 768px) - Лента новостей --- */
@media (max-width: 768px) {
    .search-results-list { display: flex; flex-direction: column; gap: 0 !important; }
    .search-item {
        height: 125px !important;
        padding: 15px 0 !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        overflow: hidden !important;
    }
    .search-item-media { width: 140px !important; height: 90px !important; border-radius: 5px !important; flex-shrink: 0; margin-right: 0px !important; }
    .search-item-media img { height: 100% !important; object-fit: cover !important; }
    .search-item-info { display: flex; flex-direction: column; justify-content: center; flex-grow: 1; height: 90px; }

    .search-item-info h3 {
        font-size: 15px !important; font-weight: 700 !important; line-height: 1.2 !important; margin: 0 0 4px 0 !important;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis;
    }
    .search-item-info p {
        font-size: 13px !important; color: #888 !important; line-height: 1.3 !important; margin: 0 !important;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
}

/* =================================================================
   ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ
   ================================================================= */
.mobile-only { display: none !important; }
@media (max-width: 900px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
}

.video-container { position: relative; width: 100%; height: 100%; }
.video-container img { width: 100%; height: 100%; object-fit: cover; }
.play-icon-overlay {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px; background: rgba(0, 0, 0, 0.6); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 20px; padding-left: 4px;
}

