/* ==========================================================================
   RockLive — Тема (Dark / Light) за новинарските страници
   Дизайнът е с CSS custom properties, за да може по-късно лесно
   да се разшири към целия сайт (index.php), без да се преправя структурата.
   ========================================================================== */

:root {
    /* ---- ТЪМНА ТЕМА (по подразбиране, пасва на текущия дизайн на сайта) ---- */
    --bg-page: #0a0a0a;
    --bg-header: #1a1a1a;
    --bg-card: #1e1e1e;
    --bg-elevated: #2c2c2c;
    --bg-hover: #333333;

    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #999999;
    --text-faint: #666666;

    --border-color: #333333;
    --border-subtle: #2c2c2c;

    --accent-red: #e74c3c;
    --accent-red-dark: #b91c1c;
    --accent-yellow: #facc15;

    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.5);
    --bg-page-gradient: radial-gradient(circle at 20% 30%, #1a0c0c 0%, #020101 100%);
    --card-translucent-bg: #111111dd;

    /* ---- Топли акценти (заглавия, hover, календар) — идентичността на сайта ---- */
    --accent-peach: #f5c6a0;
    --warm-tint: #2a1a1a;
    --warm-tint-strong: #2c0f0f;
    --warm-gradient-start: #1f1a17;
    --warm-text: #ffaa88;

    color-scheme: dark;
}

[data-theme="light"] {
    --bg-page: #f7f5f3;
    --bg-header: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f0eeec;
    --bg-hover: #e8e6e4;

    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-muted: #6b6b6b;
    --text-faint: #999999;

    --border-color: #e2e0de;
    --border-subtle: #ececea;

    --accent-red: #e74c3c;
    --accent-red-dark: #b91c1c;
    --accent-yellow: #b8860b;

    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);
    --bg-page-gradient: none;
    --card-translucent-bg: #ffffff;

    --accent-peach: #a8551f;
    --warm-tint: #fbeee7;
    --warm-tint-strong: #f6dcd0;
    --warm-gradient-start: #fff3ec;
    --warm-text: #c2410c;

    color-scheme: light;
}

/* ---- Базови стилове, ползващи променливите ---- */
body.news-page {
    background: var(--bg-page);
    background-image: var(--bg-page-gradient, none);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ---- Бутон за смяна на темата (☀️/🌙) ---- */
.theme-toggle-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50px;
    padding: 4px 10px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}
.theme-toggle-btn:hover { background: var(--bg-hover); }

/* ==========================================================================
   НОВИНАРСКИ ЛИСТИНГ (news.php) — контейнер 1200px
   ========================================================================== */
.news-list-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

.news-list-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin: 0 0 20px;
    color: var(--text-primary);
}

.news-card {
    display: flex;
    gap: 20px;
    background: #2a2a2a;
    padding: 4px;
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-card-inner {
    display: flex;
    gap: 20px;
    background: var(--card-translucent-bg, #111111dd);
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.news-card-img {
    flex-shrink: 0;
    width: 600px;
    max-width: 45%;
    aspect-ratio: 600 / 315;
    object-fit: cover;
    background: var(--bg-elevated);
    display: block;
}

.news-card-body {
    flex: 1;
    min-width: 0;
    padding: 16px 20px 16px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.news-card-title {
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 8px;
    line-height: 1.3;
}

.news-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Мобилен: снимката отгоре, текстът отдолу */
@media (max-width: 700px) {
    .news-card-inner { flex-direction: column; }
    .news-card-img { width: 100%; max-width: 100%; }
    .news-card-body { padding: 12px 16px 16px; }
}

/* ==========================================================================
   ПРОСТА СТРАНИЦА (FAQ, Contacts, Add...) — само карта със съдържание,
   без реклама/sidebar, за разлика от news-article.php
   ========================================================================== */
.simple-page-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}
.simple-page-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 20px;
}
.simple-page-card {
    background: var(--card-translucent-bg, #111111dd);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 24px 28px;
    box-sizing: border-box;
    color: var(--text-secondary);
    line-height: 1.7;
}
.simple-page-card p { margin: 0 0 16px; }
.simple-page-card a { color: var(--accent-yellow); }

/* FAQ конкретно - accordion */
.faq-item {
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--accent-yellow);
    font-size: 1rem;
    font-weight: 600;
    padding: 16px 4px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background 0.2s;
    font-family: inherit;
    line-height: 1.4;
}
.faq-question:hover { background: var(--bg-hover); }
.faq-question .faq-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    color: var(--accent-yellow);
}
.faq-question.open .faq-icon { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 4px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.9rem;
}
.faq-answer.open { max-height: 600px; padding: 0 4px 18px 4px; }
.faq-answer a { color: var(--accent-yellow); text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }
.faq-answer ul { padding-left: 20px; margin: 8px 0; }
.faq-answer ul li { margin-bottom: 4px; }
.faq-stats {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 auto 24px;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border-radius: 50px;
    display: table;
}
.faq-stats span { color: var(--accent-yellow); font-weight: bold; }
.back-to-top {
    display: inline-block;
    margin-top: 24px;
    color: var(--accent-yellow);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: all 0.2s ease;
}
.back-to-top:hover { background: var(--accent-yellow); color: #000; }

/* ==========================================================================
   ДЕТАЙЛНА НОВИНА (news-article.php)
   ========================================================================== */
.article-page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

.article-hero-img {
    width: 1200px;
    max-width: 100%;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 24px auto 20px;
    background: var(--bg-elevated);
}

.article-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.25;
}

.article-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Централна колона (текст + реклама) вдясно от нея, sidebar най-вдясно */
.article-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #2a2a2a;
    padding: 4px;
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    box-sizing: border-box;
}
.article-layout-inner {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background: var(--card-translucent-bg, #111111dd);
    border-radius: 20px;
    padding: 20px 24px;
    width: 100%;
    box-sizing: border-box;
}

.article-main {
    display: flex;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

.article-content {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}
.article-content p { margin: 0 0 18px; }
.article-content img { max-width: 100%; border-radius: 8px; }
.article-content a { color: var(--accent-yellow); }

.sidebar-promo-column {
    flex-shrink: 0;
    width: 300px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.promo-ins-holder {
    width: 100%;
    min-height: 600px;
    display: flex;
    justify-content: center;
}

.fallback-banner {
    width: 300px;
    height: 600px;
    max-width: 100%;
    background: transparent;
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    overflow: hidden;
}
.fallback-banner-title {
    color: var(--accent-yellow);
    font-weight: bold;
    font-size: 1rem;
}
.fallback-banner-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}
.fallback-banner a { color: inherit; text-decoration: none; display: block; width: 100%; }
.fallback-banner img { max-width: 100%; max-height: 400px; object-fit: cover; border-radius: 8px; }

.article-sidebar {
    flex-shrink: 0;
    width: 300px;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-red);
}

.sidebar-news-item {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    text-decoration: none;
    color: inherit;
}
.sidebar-news-img {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--bg-elevated);
}
.sidebar-news-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.3;
}
.sidebar-news-date {
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-top: 3px;
}

.article-video-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}
.article-video-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.article-video-item {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.article-video-item iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ---- Responsive: под 1020px, ад-колоната изчезва, sidebar пада отдолу ---- */
@media (max-width: 1020px) {
    .article-layout { flex-direction: column; }
    .article-layout-inner { flex-direction: column; }
    .article-sidebar { width: 100%; }
    .article-content { width: 100%; }
}
@media (max-width: 700px) {
    .article-main { flex-direction: column; }
    .sidebar-promo-column { width: 100%; order: 3; }
    .article-title { font-size: 1.4rem; }
}
