/* --- RESET & VARIABLES --- */
:root {
    --bg-color: #cd90ff;
    --card-bg: #2A2A2A;
    --text-color: #FFFFFF;
    --text-secondary: #FFF;
    --accent-color: #8034DD;
    --accent-hover: #9450e6;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Rubik Gemstones', system-ui;
    --container-width: 800px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: #cd90ff; color: var(--text-color); font-family: var(--font-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* --- HEADER --- */
header {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 20px 0;
    background: rgba(34, 34, 34, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-wrapper {
    width: 100%; max-width: var(--container-width); margin: 0 auto; padding: 0 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 16px; font-weight: 700; color: #fff; }
.back-link {
    font-size: 14px; color: #FFF;
    display: flex; align-items: center; gap: 8px;
    transition: color 0.3s;

}
.back-link:hover { color:#FFFFFF; }

/* --- ARTICLE CONTAINER --- */
.article-container {
    max-width: var(--container-width);
    margin: 120px auto 60px auto;
    padding: 0 20px;
}

/* --- ARTICLE HEADER --- */
.article-meta {
    display: flex; gap: 15px; margin-bottom: 20px;
    font-size: 14px; color: var(--accent-color);
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
}
.article-title {
    font-size: 42px; line-height: 1.2;
    margin-bottom: 30px; font-weight: 700;
}
.author-block {
    display: flex; align-items: center; gap: 15px;
    padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 40px;
}
.author-avatar {
    width: 50px; height: 50px; border-radius: 50%;
    background-color: #333;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50"%3E%3Crect width="50" height="50" fill="%238034DD"/%3E%3Ctext x="50%25" y="50%25" dominant-baseline="middle" text-anchor="middle" fill="white" font-size="20"%3E%D0%94%D0%90%3C/text%3E%3C/svg%3E');
    background-size: cover;
}
.author-info h4 { font-size: 16px; font-weight: 700; }
.author-info p { font-size: 14px; color: white; }

/* ====== НОВОЕ: Изображение статьи (Hero Image) ====== */
.article-hero-image {
    width: 100%;
    height: 400px;  /* Фиксированная высота для красивого кропа */
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    background-color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* Красиво обрезает изображение, сохраняя пропорции */
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

.article-hero-image:hover img {
    transform: scale(1.03);  /* Лёгкий зум при наведении */
}

/* Плейсхолдер если нет изображения */
.article-hero-image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2A2A2A 0%, #1f1f1f 100%);
}

.article-hero-image--placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}
/* ================================================== */

/* --- ARTICLE CONTENT --- */
.article-content {
    font-size: 18px;           /* Комфортный размер */
    line-height: 1.6;          /* Воздух между строками */
    color: #ffffff;            /* Контраст, но не режет глаза */
    padding: 0 16px;           /* Отступы от краёв экрана */
    max-width: 65ch;           /* Оптимальная длина строки (~65 символов) */
    margin: 0 auto;            /* Центрирование блока */
    word-wrap: break-word;
    font-style: bold;  /* Длинные слова не ломают вёрстку */
}
.article-content p { margin-bottom: 24px; font-style: bold; }
.article-content h2 {
    font-size: 28px; margin-top: 40px; margin-bottom: 20px; color: #fff;
}
.article-content ul { margin-bottom: 24px; padding-left: 20px; }
.article-content li { margin-bottom: 10px; position: relative; }
.article-content li::marker { color: var(--accent-color); }

.highlight-box {
    background: rgba(128, 52, 221, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 20px 30px; margin: 30px 0;
    border-radius: 0 12px 12px 0; font-style: italic; color: #fff;
}

.article-image {
    width: 100%; height: auto; border-radius: 12px;
    margin: 30px 0; background-color: #333;
}

/* --- ACTIONS --- */
.article-actions {
    margin-top: 60px; padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex; justify-content: space-between; align-items: center;
}
.like-btn {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    color: var(--text-secondary); font-size: 16px; font-weight: 600;
    transition: color 0.3s;
}
.like-btn:hover { color: #ff4d4d; }
.like-btn.liked { color: #ff4d4d; }
.like-btn svg {
    width: 24px; height: 24px; fill: none;
    stroke: currentColor; stroke-width: 2; transition: fill 0.3s;
}
.like-btn.liked svg {
    fill: #ff4d4d; stroke: #ff4d4d; animation: pulse 0.4s ease;
}
.share-btn {
    background: rgba(255,255,255,0.1); color: #fff;
    padding: 10px 20px; border-radius: 8px; font-size: 14px;
    transition: background 0.3s;
}
.share-btn:hover { background: rgba(255,255,255,0.2); }

/* --- CTA BOX --- */
.cta-box {
    margin-top: 80px;
    background: linear-gradient(135deg, #2A2A2A 0%, #1f1f1f 100%);
    padding: 40px; border-radius: 20px; text-align: center;
    border: 1px solid rgba(128, 52, 221, 0.2);
}
.cta-box h3 { font-size: 24px; margin-bottom: 15px; }
.cta-box p { color: var(--text-secondary); margin-bottom: 25px; }
.btn-primary {
    background: var(--accent-color); color: #fff;
    padding: 15px 30px; border-radius: 12px;
    font-weight: 600; display: inline-block;
    transition: background 0.3s;
}
.btn-primary:hover { background: var(--accent-hover); }

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .article-title { font-size: 32px; }
    .article-container { margin-top: 100px; }
    .article-hero-image { height: 250px; }  /* Меньше высота на мобильных */
}
