/* RESET (Чтобы удалить все предустановки браузера - для параллакса) */
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline;} /* Changed to baseline for better default alignment */
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}
body{line-height:1}
ol,ul{list-style:none}
blockquote,q{quotes:none}
blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}
table{border-collapse:collapse;border-spacing:0}
* { box-sizing: border-box; } /* Added from old styles */

/* CSS Variables (from old style.css) */
:root {
    --main-bg: #0e0e0e; /* Darker background from old file, more aligned with image */
    --accent-color: #58A6FF;
    --accent-color-alpha: rgba(88, 166, 255, 0.7);
    --text-color: #b0b0b0;
    --text-bright: #e8e8e8;
    --border-color-subtle: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(20, 23, 30, 0.8); /* Slightly adjusted card bg for better visibility on dark */
    --shadow-color-basic: rgba(0, 0, 0, 0.3);
    --transition-medium: 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-fast: 0.3s ease;

    /*Шрифты:*/
    --font-family-main: 'Geologica', sans-serif; /* /* 'Comfortaa' или 'Geologica' и в конце можно ставить sans-serif */ 
    /* Управляем жирностью. Значения для вариативного шрифта могут быть любыми! */
    
    /* Шрифт для заголовков (h1, h2 и т.д.) */
    --font-family-headings: 'Comfortaa', sans-serif;
    --font-weight-normal: 200;
    --font-weight-medium: 500;
    --font-weight-bold: 600;

    /* Parallax background color */
    --content-section-bg: #141830; /* Dark blue/purple from image observation ЦВЕТ */
    --button-bg: var(--accent-color);
    --button-text: var(--main-bg);
    --button-hover-bg: var(--accent-color-alpha);
}

/* --- ПОДКЛЮЧЕНИЕ ЛОКАЛЬНЫХ ШРИФТОВ --- */
@font-face {
  font-family: 'Geologica'; 
  src: url('/fonts/Geologica-VariableFont_CRSV,SHRP,slnt,wght.ttf') format('truetype');
  /* ('/fonts/Geologica-VariableFont_CRSV,SHRP,slnt,wght.ttf') */
  font-display: swap;
}

/* --- Правило для Comfortaa --- */
@font-face {
  font-family: 'Comfortaa';
  src: url('/fonts/Comfortaa-VariableFont_wght.ttf') format('truetype');
   /* ('/fonts/Comfortaa-VariableFont_wght.ttf') */
  font-display: swap;
}


/* ============================================ */
/* === ПОЛНАЯ ТИПОГРАФИЧЕСКАЯ ИЕРАРХИЯ === */
/* ============================================ */

/* --- 1. ЗАГОЛОВКИ (Шрифт Comfortaa) --- */

/* Главный заголовок страницы проекта */
.hero-text h1 {
    font-family: var(--font-family-headings);
    font-weight: var(--font-weight-bold);
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Он уже есть, оставляем */
    line-height: 1.1;
}

/* Заголовки внутри статьи (H2, H3) */
.project-article-content h2,
.project-article-content h3 {
    font-family: var(--font-family-headings);
    font-weight: var(--font-weight-bold);
    line-height: 1.3;
}
.project-article-content h2 { font-size: 2rem; } /* H2 побольше */
.project-article-content h3 { font-size: 1.5rem; } /* H3 поменьше */

/* Убираем верхний отступ ТОЛЬКО у самого первого заголовка h2 в статье */
.project-article-content h2:first-of-type {
    margin-top: 0;
}

/* --- 2. ПОДЗАГОЛОВКИ И ВВОДНЫЙ ТЕКСТ (Шрифт Geologica) --- */

/* Подзаголовок под главным H1 */
.hero-subtitle {
    font-family: var(--font-family-main); /* Используем основной шрифт */
    font-weight: var(--font-weight-medium); /* Но делаем его чуть жирнее обычного */
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-bright);
}

/* Описание проекта в hero-блоке */
.hero-description {
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-normal); /* Обычная жирность */
    font-size: clamp(1rem, 2vw, 1.15rem);
}


/* --- 3. ОСНОВНОЙ ТЕКСТ СТАТЬИ (Шрифт Geologica) --- */
.project-article-content p,
.project-article-content li { /* Добавляем li, чтобы стилизовать списки! */
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-normal);
    font-size: 1.1rem; /* Чуть крупнее базового для читаемости */
    line-height: 1.7;
    letter-spacing: 0.01em;
}


/* --- 4. СЛУЖЕБНЫЙ И ИНТЕРФЕЙСНЫЙ ТЕКСТ (Шрифт Geologica) --- */

/* Заголовки в сайдбарах ("Содержание", "Детали") */
/* ВАЖНО: они не должны быть Comfortaa, т.к. это служебные элементы */
.project-sidebar-nav .sidebar-title, 
.project-sidebar-meta h4 {
    font-family: var(--font-family-main); /* Используем основной шрифт! */
    font-weight: var(--font-weight-medium);
    font-size: 0.875rem; /* Маленький размер */
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    margin-bottom: 16px;
}


/* Метаданные (Авторы, Клиент) */
.meta-list dt { /* Термины: "Авторы", "Клиент" */
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem;
}
.meta-list dd { /* Значения */
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-normal);
    font-size: 1rem;
}

/* Теги */
.tag-item {
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-normal);
    font-size: 0.8rem;
}

/* Текст для простых мета-данных (авторы) */
.meta-text {
    color: var(--text-bright);
    font-size: 1rem;
    line-height: 1.5;
}

/* Стили для нового списка событий */
.events-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.event-item {
    padding: 14px;
    border: 1px solid var(--border-color-subtle);
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: rgba(255, 255, 255, 0.03);
}

.event-item:last-child {
    margin-bottom: 0;
}

.event-item span,
.event-item strong {
    display: block; /* Каждый элемент с новой строки */
}

.event-name {
    font-weight: var(--font-weight-medium);
    color: var(--text-bright);
    font-size: 1rem;
    margin-bottom: 6px;
}

.event-place {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 8px;
}

.event-dates {
    font-size: 0.85rem;
    color: var(--text-color);
    font-weight: var(--font-weight-medium);
}


/* Оглавление слева */
#project-toc li a {
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-normal);
    font-size: 0.95rem;
}
#project-toc li a.is-active {
    font-weight: var(--font-weight-bold); /* Активный пункт делаем жирным */
}

/* Ссылка "На главную" и футер */
.new-project-header a,
.new-project-footer p {
    font-family: var(--font-family-main);
}


/* ============================================= */
/* === СТИЛИ ДЛЯ ОБЩИХ ЭЛЕМЕНТОВ (HEADER, FOOTER) === */
/* ============================================= */

/* --- Общий контейнер для страниц-списков --- */
.page-container {
    padding-top: 60px;
    padding-bottom: 80px;
}

/* --- Заголовок для страниц-списков (Все проекты, Новости и т.д.) --- */
.page-title {
    font-family: var(--font-family-headings);
    font-size: clamp(2.2rem, 5vw, 3rem); /* Крупный, но не гигантский */
    color: var(--text-bright);
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color-subtle);
    padding-bottom: 20px;
}

/* --- Глобальный хедер сайта --- */
.site-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color-subtle);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.site-header .logo-link {
    font-family: var(--font-family-headings);
    font-size: 1.25rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-bright);
    text-decoration: none;
}
.site-header .logo-link:hover {
    color: var(--accent-color);
}

/* --- Глобальный футер сайта --- */
.site-footer {
    padding: 40px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color-subtle);
    text-align: center;
    color: var(--text-color);
    font-size: 0.9rem;
}


/* GLOBAL STYLES */
html {
    background-color: var(--main-bg);
    color: var(--text-color);
    font-family: var(--font-family-main); /* Используем новую переменную */
    font-size: 16px;
    scroll-behavior: smooth;
}


body {
    position: relative;
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: var(--font-weight-normal); /* <-- ЗАДАЕМ НОРМАЛЬНУЮ ЖИРНОСТЬ ДЛЯ ВСЕГО ТЕКСТА */
}

/* Далее будут настройки текста */
/* Все заголовки делаем жирными */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings); 

    font-weight: var(--font-weight-bold);
    color: var(--text-bright);
}

/* Теги <strong> и <b> теперь тоже будут использовать правильную жирность */
strong, b {
    font-weight: var(--font-weight-bold);
}

.project-article-content strong {
    font-weight: var(--font-weight-bold);
    color: var(--text-bright); /* Делаем выделенный текст ярко-белым */
}

/* Для подзаголовков или менее важных заголовков можно использовать среднюю жирность */
.hero-subtitle, .project-card-placeholder h3 {
    font-weight: var(--font-weight-medium);
}

a {
    color: var(--accent-color); /* Default link color */
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--text-bright);
}

/* Language Switcher Styles */
.lang-switcher-container {
    position: fixed; /* Или absolute, если внутри parallax-секции */
    top: 20px;
    right: 40px;
    z-index: 1000;
}

.lang-switcher {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-switcher .lang-link {
    color: #ccc;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.lang-switcher .lang-link:hover {
    color: #fff;
}

.lang-switcher .lang-link.is-active {
    color: #fff;
    cursor: default;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

.lang-switcher .lang-separator {
    color: #667;
    margin: 0 5px;
    font-size: 14px;
}


/* PARALLAX STYLES */
.keyart, .keyart_layer {
    height: 150vh; /* Changed to 100vh for full viewport height */
    min-height: 500px; /* Minimum height for content visibility */
    max-height: 1200px; /* Max height from original new file */
}

#parallax {
    display: block;
    position: relative;
    overflow: hidden;
}

.keyart_hero_title {
    position: absolute;
    top: 35%; /* Adjust for vertical centering */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5; /* Above parallax layers, below potential fixed header */
    text-align: center;
    color: var(--text-bright);
}

.keyart_hero_title h1 {
    font-size: clamp(3rem, 8vw, 6rem); /* Responsive font size */
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(88, 166, 255, 0.5), 0 0 30px rgba(88, 166, 255, 0.3); /* Glow effect */
    margin: 0;
    color: #E0E8FF; /* Brighter, slightly bluish white */
}

.keyart_hero_title .subtitle { /* Optional subtitle styling */
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--accent-color);
    margin-top: 10px;
    opacity: 0.9;
}


.keyart_layer {
    background-position: bottom center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.keyart_layer.parallax {
    position: fixed;
}

#parallax-layer-1 {
    background-image: url('../images/MainBackground/layer1.png');
    z-index: 1;
}
#parallax-layer-2 {
    background-image: url('../images/MainBackground/layer2.png');
    z-index: 2;
}
#parallax-layer-3 {
    background-image: url('../images/MainBackground/layer3.png');
    z-index: 3;
}
#parallax-layer-4 {
    background-image: url('../images/MainBackground/layer4.png');
    z-index: 4;
}

/* Responsive adjustments for parallax layers (less aggressive than original example) */
@media (max-width: 768px) {
    .keyart, .keyart_layer {
        min-height: 500px; /* Adjust height for smaller screens */
    }
    .keyart_hero_title h1 {
       font-size: clamp(2.5rem, 10vw, 4rem);
    }
}


/* STYLING FOR CONTENT BELOW PARALLAX */
#content-below-parallax {
    background-color: var(--content-section-bg); /* Using new variable for distinct background */
    color: var(--text-color);
    position: relative;
    z-index: 10; /* Higher than parallax layers */
    padding-top: 1px; /* Fix potential margin collapse with first section */
}

.container { /* From old styles */
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 20px; /* Added vertical padding */
}

.content-block {
    padding: 60px 0;
    text-align: center; /* Center section title and "view all" button */
    border-bottom: 1px solid var(--border-color-subtle);
}
.content-block:last-child {
    border-bottom: none;
}

.section-title { /* Adapted from old styles */
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 40px;
    letter-spacing: 1.5px;
    padding-bottom: 15px;
    position: relative;
    color: var(--text-bright);
    display: inline-block;
}
.section-title::after { /* From old styles - needs JS to trigger animate class or always on */
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px; /* Fixed width for now */
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-color-alpha) 100%);
}

/* Placeholder Grid for Projects/Videos */
.block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    text-align: left;
}

.project-card-placeholder {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color-subtle);
    border-radius: 8px;
    padding: 20px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.project-card-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color-basic);
}
.project-card-placeholder .card-image-placeholder {
    height: 180px;
    background-color: #2a2e37; /* Placeholder color */
    border-radius: 4px;
    margin-bottom: 15px;

        /* --- ДОБАВЛЕННЫЕ СВОЙСТВА ДЛЯ МАСШТАБИРОВАНИЯ --- */
    background-size: cover;       /* Масштабируем, чтобы покрыть всю область */
    background-position: center;  /* Центрируем изображение */
    background-repeat: no-repeat; /* Запрещаем повторение */
    
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}
.project-card-placeholder .card-image-placeholder.video-placeholder::after {
    content: '►'; /* Play icon placeholder */
    font-size: 3rem;
    opacity: 0.5;
}

.project-card-placeholder h3 {
    font-size: 1.4rem;
    color: var(--text-bright);
    margin-bottom: 10px;
}
.project-card-placeholder p {
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Placeholder List for Exhibitions/News */
.block-list {
    margin-bottom: 40px;
    text-align: left;
}
.list-item-placeholder {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color-subtle);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: background-color var(--transition-fast);
}
.list-item-placeholder:hover {
    background-color: rgba(30, 34, 42, 0.9);
}
.list-item-placeholder h4 {
    font-size: 1.3rem;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.list-item-placeholder p {
    font-size: 1rem;
}

/* "View All" Button */
.view-all-button {
    display: inline-block;
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    border: 1px solid transparent;
}
.view-all-button:hover {
    background-color: var(--button-hover-bg);
    color: var(--text-bright); /* Ensure text is visible on lighter hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(88, 166, 255, 0.3);
}

/* Contact Info Section */
.contact-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.contact-info p {
    margin-bottom: 25px;
    font-size: 1.1rem;
}
.email-link {
    display: block;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin: 20px 0 30px 0;
    font-weight: 600;
    color: var(--text-bright);
}
.email-link:hover {
    color: var(--accent-color);
}
.social-links-placeholder {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}
.social-links-placeholder a {
    font-size: 1rem;
    color: var(--text-color);
    padding: 5px 10px;
    border: 1px solid var(--border-color-subtle);
    border-radius: 4px;
}
.social-links-placeholder a:hover {
    color: var(--text-bright);
    border-color: var(--accent-color);
    background-color: var(--accent-color-alpha);
}

/* Responsive adjustments for content blocks */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 30px 15px;
    }
    .content-block {
        padding: 40px 0;
    }
    .section-title {
        font-size: clamp(1.6rem, 5vw, 2rem);
        margin-bottom: 30px;
    }
    .block-grid {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
        gap: 20px;
    }
}


/* Стили для страницы проекта */
.project-header, .project-footer {
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg); /* Используем переменную из твоего css */
    color: var(--text-bright);
    margin-bottom: 20px;
}

.project-header nav a {
    margin: 0 10px;
    color: var(--accent-color);
}
.project-header nav a:hover {
    color: var(--text-bright);
}

.project-header h1 {
    font-size: 2.5em;
    margin-top: 10px;
    margin-bottom: 5px;
}
.project-header h2 {
    font-size: 1.5em;
    color: var(--text-color);
    font-weight: normal;
}

.project-content.container { /* Чтобы применить существующие отступы контейнера */
    max-width: 900px; /* Можно сделать контент статьи чуть уже для читаемости */
    margin: 20px auto;
    padding: 20px;
}

.project-cover-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.project-content article {
    line-height: 1.7;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Вот оно! Правило для картинок внутри статьи */
.project-content article img {
    max-width: 100%;      /* Главное: картинка не будет шире колонки текста */
    height: auto;         /* Сохраняем правильные пропорции */
    display: block;       /* Убираем лишние отступы и позволяем центрировать */
    margin: 2.5rem auto;  /* Отступы сверху/снизу и центрирование по горизонтали */
    border-radius: 8px;   /* Скругляем углы, чтобы соответствовать стилю карточек */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Легкая тень для объема */
}

/* --- 1. Стили для видео с YouTube (шорткод youtube) --- */
/* Этот селектор остается без изменений, он был правильным */
.video-responsive {
  position: relative;
  overflow: hidden;
  padding-top: 56.25%; /* Соотношение сторон 16:9 */
  margin: 2.5rem auto; /* Возвращаем ему собственные отступы */
  border-radius: 8px;
}
.video-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


/* --- 2. Стили для локального видео (шорткод localVideo) --- */

/* Контейнер <figure>, который теперь управляет отступами и размером */
figure.article-video {
  margin: 2.5rem auto; /* Отступы и центрирование */
  padding: 0;
}

/* Обертка .video-responsive внутри figure.article-video */
.article-video .video-responsive {
  position: relative;
  padding-top: 56.25%;
  border-radius: 8px; /* Скругление на внутреннем блоке */
  overflow: hidden;
  background-color: #000;
}
.article-video .video-responsive video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Обертка .video-original-ratio внутри figure.article-video */
.article-video .video-original-ratio video {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Подпись для локального видео */
figure.article-video figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-color);
  font-style: italic;
}


.project-content article h2, .project-content article h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-bright);
}

.project-gallery h3, .project-details h3 {
    font-size: 1.8em;
    color: var(--text-bright);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}
.gallery-grid figure {
    margin: 0;
    position: relative; /* Для иконки play */
}
.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}
.gallery-grid figcaption {
    font-size: 0.9em;
    color: var(--text-color);
    margin-top: 5px;
    text-align: center;
}
.gallery-grid a .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    opacity: 0.8;
    text-shadow: 0 0 10px black;
    pointer-events: none; /* Чтобы не мешал клику по ссылке */
}





.project-details dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px 20px;
    margin-bottom: 30px;
}
.project-details dt {
    font-weight: bold;
    color: var(--text-bright);
}
.project-details dd {
    margin-left: 0;
}

.project-tags .tag {
    background-color: var(--accent-color-alpha);
    color: var(--text-bright);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* ======== НОВЫЕ СТИЛИ ДЛЯ СТРАНИЦЫ ПРОЕКТА ======== */

/* --- Общие контейнеры --- */
.new-project-header, .new-project-footer {
    padding: 20px 5%;
    text-align: left;
}
.new-project-header a {
    color: var(--text-color);
    font-weight: 500;
}
.new-project-header a:hover {
    color: var(--text-bright);
}
.new-project-footer {
    text-align: center;
    color: var(--text-color);
    margin-top: 80px;
    border-top: 1px solid var(--border-color-subtle);
    padding-top: 40px;
}
.container {
    width: 90%;
    max-width: 1400px; /* Увеличим максимальную ширину для нового макета */
    margin: 0 auto;
}


/* --- 1. Hero-блок --- */
.project-hero {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* Выравнивание по верху */
    padding-top: 60px;
    padding-bottom: 80px;
    border-bottom: 1px solid var(--border-color-subtle);
}
.hero-text {
    flex: 1 1 55%; /* Текст занимает ~55% ширины */
}
.hero-text h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Адаптивный размер шрифта */
    color: var(--text-bright);
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-subtitle, .hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-color);
    line-height: 1.6;
    max-width: 65ch; /* Ограничиваем ширину для лучшей читаемости */
}
.hero-subtitle {
    margin-bottom: 24px;
    color: var(--text-bright);
}
.hero-media {
    flex: 1 1 45%;
    
    /* Ограничиваем максимальную высоту. Это будет работать и для видео. */
    max-height: 75vh; 
    
    border-radius: 12px;
    overflow: hidden;
    
    /* Используем flex для центрирования */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 2. Прямые дочерние элементы .hero-media (и картинка, и обертка видео) */
.hero-media > * {
    /* Растягиваем дочерний элемент на всю ширину контейнера */
    width: 100%;
}

/* 3. Стили только для картинки */
.hero-image-placeholder {
    /* Картинка подстраивается по высоте, чтобы сохранить пропорции */
    height: auto;
    max-height: 100%; /* Дополнительная страховка */
    object-fit: contain;
}

/* --- 2. Основная сетка контента (3 колонки) --- */
.project-body-grid {
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    gap: 40px;
    margin-top: 80px;
    align-items: start; 
}


/* --- 3. Стили для сайдбаров (асимметричное поведение) --- */

/* Левый сайдбар (Содержание) - ДЕЛАЕМ ЕГО "ЛИПКИМ" */
.project-sidebar-nav {
  position: -webkit-sticky;
  position: sticky;
  top: 40px; /* Отступ от верха при скролле */
  
  /* Важно для sticky: сайдбар должен знать свою высоту, чтобы не "схлопываться" */
  /* Это говорит ему "будь высотой со свой контент" */
  align-self: start; 
}

/* Правый сайдбар (Метаданные) - ОСТАВЛЯЕМ ЕГО СТАТИЧНЫМ */
.project-sidebar-meta {
  position: static; /* Явно указываем, что он не "липкий" */
}

/* Левый сайдбар: Навигация */
#project-toc ul {
    list-style: none;
    padding: 0;
}
#project-toc li a {
    display: block;
    padding: 10px 0;
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    border-left: 2px solid var(--border-color-subtle);
    padding-left: 15px;
    font-size: 0.95rem;
}
#project-toc li a:hover {
    color: var(--text-bright);
    padding-left: 20px;
}
#project-toc li a.is-active {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 500;
    padding-left: 20px;
}

/* Правый сайдбар: Метаданные */
.meta-section {
    margin-bottom: 40px;
}
.meta-list dt {
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 4px;
}
.meta-list dd {
    color: var(--text-bright);
    margin-left: 0;
    margin-bottom: 16px;
    font-size: 1rem;
}
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-item { /* Тот самый стиль тегов, как на референсе */
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color-subtle);
    border-radius: 6px;
    color: var(--text-color);
}


/* --- 4. Центральная колонка: Статья --- */
.project-article-content {
    /* Было: max-width: 75ch; */
    max-width: 45rem; /* <-- НОВОЕ ЗНАЧЕНИЕ. Подберите то, что выглядит лучше */
    margin: 0 auto;
}

.project-article-content h2,
.project-article-content h3 {
    color: var(--text-bright);
    line-height: 1.3;
    /* УБИРАЕМ ВЕРХНИЙ ОТСТУП */
    margin-top: 0; 
    /* А нижний делаем большим, он создаст расстояние до следующего блока */
    margin-bottom: 2rem; 
    scroll-margin-top: 60px;
}

.project-article-content h2 { font-size: 2rem; }
.project-article-content h3 { font-size: 1.5rem; }
.project-article-content p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    
    /* --- ДОБАВЛЯЕМ ДЛЯ ЛУЧШЕЙ ЧИТАЕМОСТИ УЗКОГО ШРИФТА --- */
    font-size: 1.1rem; /* Чуть-чуть увеличим размер */
    letter-spacing: 0.01em; /* И добавим немного "воздуха" между буквами */
}

.project-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0; 
}
.video-responsive {
    margin: 2rem 0;
}

/* === СТИЛИ ДЛЯ СПИСКА ПРЕССЫ В САЙДБАРЕ - ИСПРАВЛЕНО === */

.project-sidebar-meta .press-list { /* Добавили .project-sidebar-meta */
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-sidebar-meta .press-item { /* Добавили .project-sidebar-meta */
  margin-bottom: 12px;
}

/* Здесь самый важный селектор */
.project-sidebar-meta .press-item a { /* Добавили .project-sidebar-meta */
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--border-color-subtle);
  border-radius: 6px;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.project-sidebar-meta .press-item a:hover { /* Добавили .project-sidebar-meta */
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-color);
}

.project-sidebar-meta .press-item-title { /* ... и так далее */
  display: block;
  font-weight: 500;
  color: var(--text-bright);
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 4px;
}

.project-sidebar-meta .press-item-source {
  display: block;
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* ================================== */
/* === СТИЛИ ДЛЯ ЕДИНОЙ ГАЛЕРЕИ === */
/* ================================== */

/* --- 1. Общий контейнер --- */
.gallery-container {
  margin: 2.5rem 0;
}
.gallery-container h3.gallery-title {
    font-family: var(--font-family-headings);
    font-weight: var(--font-weight-bold);
    font-size: 1.5rem;
    color: var(--text-bright);
    margin-bottom: 1.5rem;
}

/* --- 2. Стили для сеток (is-grid) --- */
.gallery-container.is-grid {
  display: grid;
  gap: var(--gap, 1rem);
}
/* Элемент сетки */
.gallery-container.is-grid .gallery-item {
  position: relative;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.gallery-container.is-grid .gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-container.is-grid .gallery-item:hover img {
  transform: scale(1.05);
}
.gallery-container.is-grid .gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: var(--text-bright);
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.gallery-container.is-grid .gallery-item:hover figcaption {
  opacity: 1;
}

/* --- Макеты для сеток --- */
.gallery-container.is-grid.layout-single   { grid-template-columns: 1fr; }
.gallery-container.is-grid.layout-duo      { grid-template-columns: 1fr 1fr; }
.gallery-container.is-grid.layout-quad     { grid-template-columns: 1fr 1fr; }
.gallery-container.is-grid.layout-default  { grid-template-columns: repeat(var(--cols, 3), 1fr); }
.gallery-container.is-grid.layout-special-3 {
  grid-template-columns: 2fr 1fr;
  grid-template-areas: "big small-1" "big small-2";
}
.gallery-container.is-grid.layout-special-3 .gallery-item:nth-child(1) { grid-area: big; }
.gallery-container.is-grid.layout-special-3 .gallery-item:nth-child(2) { grid-area: small-1; }
.gallery-container.is-grid.layout-special-3 .gallery-item:nth-child(3) { grid-area: small-2; }


/* --- 3. Стили для большой галереи (is-big), она же Swiper --- */
.gallery-container.is-big .main-swiper {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
    background-color: #1a1a1a;
}
.gallery-container.is-big .main-swiper .swiper-slide figure {
    margin: 0;
    position: relative;
}
.gallery-container.is-big .main-swiper .swiper-slide img {
    display: block;
    width: 100%;
    height: 500px;
    object-fit: cover;
}
.gallery-container.is-big .main-swiper .swiper-slide figcaption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--text-bright);
    font-size: 1rem;
    text-align: left;
}
.gallery-container.is-big .main-swiper .swiper-button-next,
.gallery-container.is-big .main-swiper .swiper-button-prev {
    color: var(--accent-color);
    transition: transform 0.2s ease;
}
.gallery-container.is-big .main-swiper .swiper-button-next:hover,
.gallery-container.is-big .main-swiper .swiper-button-prev:hover {
    transform: scale(1.2);
}
.gallery-container.is-big .thumbs-swiper {
    height: 100px;
}
.gallery-container.is-big .thumbs-swiper .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.gallery-container.is-big .thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
}
.gallery-container.is-big .thumbs-swiper .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* --- Стили для одиночных изображений в статье --- */
figure.article-image {
  margin: 2.5rem auto; /* Отступы сверху/снизу и центрирование по горизонтали */
  padding: 0;
  /* max-width устанавливается инлайново шорткодом */
}

figure.article-image img {
  max-width: 100%;      /* Главное: картинка не будет шире своего контейнера figure */
  height: auto;         /* Сохраняем правильные пропорции */
  display: block;       /* Убираем лишние отступы */
  margin: 0;            /* Убираем стандартные отступы img */
  border-radius: 8px;   /* Скругляем углы */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Легкая тень */
}

figure.article-image figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-color);
  font-style: italic;
}



/* --- Слайдер с миниатюрами (превью) --- */
.thumbs-swiper {
    height: 100px; /* Высота полосы с превью */
    box-sizing: border-box;
    padding: 0; /* Или можно полностью убрать padding, если не нужен */
}

.thumbs-swiper .swiper-slide {
    width: 25%;
    height: 100%;
    opacity: 0.5; /* Неактивные превью делаем полупрозрачными */
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1; /* Активное превью делаем ярким */
    border: 2px solid var(--accent-color);
    border-radius: 6px;
}

.thumbs-swiper .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* --- Стили для аудиоплеера в статье (НОВЫЙ БЛОК) --- */
figure.article-audio {
  margin: 2.5rem auto;
  padding: 0;
  max-width: 100%; /* Аудиоплеер всегда будет по ширине колонки */
}

figure.article-audio audio {
  width: 100%; /* Растягиваем стандартный плеер на всю ширину */
  border-radius: 6px; /* Можно добавить легкое скругление */
}

/* Используем те же стили для подписи, что и у картинок/видео */
figure.article-audio figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
  color: var(--text-color);
  font-style: italic;
}

/* === СТИЛИ ДЛЯ АКЦЕНТНОЙ ЦИТАТЫ (PULL QUOTE) - ИСПРАВЛЕНО === */

figure.pull-quote { /* Было: .pull-quote */
  margin: 2.5rem 0;
  padding: 2rem;
  background-color: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--accent-color);
  border-radius: 0 8px 8px 0;
}

.pull-quote blockquote { /* Было: .pull-quote blockquote */
  border: none;
  padding: 0;
  margin: 0;
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--text-bright);
  font-family: var(--font-family-headings);
}

.pull-quote .quote-author {
  display: block;
  margin-top: 1rem;
  text-align: right;
  font-style: normal;
  color: var(--text-color);
}

/* ================================== */
/* === СТИЛИ ДЛЯ БЛОКА НЕЙРОКУРАТОРА === */
/* ================================== */

.neuro-review-block {
  margin: 3rem 0; /* Отступы сверху и снизу */
  background-color: rgba(255, 255, 255, 0.03); /* Чуть заметный фон */
  border: 1px solid var(--border-color-subtle);
  border-radius: 8px;
  overflow: hidden; /* Чтобы скругление работало */
}

.neuro-review-block details {
  /* Убираем стандартный маркер-треугольник */
  list-style: none;
}
.neuro-review-block details > summary::-webkit-details-marker {
  display: none;
}

.neuro-review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  outline: none; /* Убираем синюю рамку при фокусе */
}
.neuro-review-summary:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.neuro-review-icon {
  font-size: 1.5rem;
}

.neuro-review-title {
  font-family: var(--font-family-headings);
  font-weight: 500;
  color: var(--text-bright);
  flex-grow: 1; /* Заголовок занимает все доступное место */
}

/* Наша кастомная стрелочка-индикатор */
.neuro-review-action {
  width: 1em;
  height: 1em;
  border-right: 2px solid var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  transform: rotate(45deg);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  margin-right: 10px;
}

/* Когда блок раскрыт, поворачиваем стрелку */
.neuro-review-block details[open] > summary .neuro-review-action {
  transform: rotate(225deg);
}


.neuro-review-content {
  padding: 0 20px 20px 20px; /* Отступы только внутри, не у заголовка */
  border-top: 1px solid var(--border-color-subtle);
}

/* Стили для текста внутри блока, чтобы он наследовал стили статьи */
.neuro-review-content p,
.neuro-review-content li {
  font-family: var(--font-family-main);
  font-weight: var(--font-weight-normal);
  font-size: 1.05rem; /* Можно сделать чуть меньше основного текста */
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--text-color);
  margin-top: 1rem;
}
.neuro-review-content p:first-child {
  margin-top: 0;
}
.neuro-review-content h4 { /* Если вдруг внутри будут подзаголовки */
  margin-top: 1.5rem;
}

.neuro-review-readmore {
  display: inline-block;
  margin-top: 20px; /* Отступ от текста выше */
  padding: 10px 18px;
  background-color: var(--accent-color-alpha);
  color: var(--text-bright);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  border: 1px solid var(--accent-color);
}

.neuro-review-readmore:hover {
  background-color: var(--accent-color);
  color: var(--main-bg); /* Текст становится темным на ярком фоне */
  transform: translateY(-2px);
}


/* ======================================================== */
/* === СТИЛИ ДЛЯ НЕЙРО-ОБЗОРА (V5 - ФИНАЛЬНАЯ ВЕРСИЯ) === */
/* ======================================================== */

/* 1. Общий контейнер Hero (без изменений) */
.neuro-hero-fullscreen {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center center;
  color: var(--text-bright);
  overflow: hidden;
}

.neuro-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(16, 17, 29, 0.4) 0%, rgba(16, 17, 29, 0.85) 100%);
  z-index: 1;
}

/* 2. Контейнер контента (главная сетка) */
.neuro-hero-content-v3 {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  display: grid;
  /* Левая колонка (контекст) занимает 1 часть, правая (фокус) - 2 части */
  grid-template-columns: 1fr auto 2fr;
  align-items: center;
  gap: 40px;
  padding: 20px;
}

/* 3. Левая колонка (Контекст: "Кураторский анализ") */
.hero-context-side {
  text-align: right;
}
.hero-context-side h2 {
  font-family: var(--font-family-headings);
  font-size: clamp(1.5rem, 3vw, 2.2rem); /* Размер как у небольшого заголовка */
  font-weight: var(--font-weight-medium);
  color: var(--text-bright);
  margin: 0; /* Убираем лишние отступы */
}

/* ======================================================== */
/* === СТИЛИ ДЛЯ ССЫЛКИ НА НЕЙРО-ОБЗОР (КОМПАКТНАЯ ВЕРСИЯ) === */
/* ======================================================== */

.neuro-review-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px; /* Уменьшаем отступ между иконкой и текстом */
    padding: 12px 14px; /* Уменьшаем внутренние отступы */
    background-color: rgba(88, 166, 255, 0.05);
    border: 1px solid var(--border-color-subtle);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.neuro-review-sidebar-link:hover {
    border-color: var(--accent-color);
    background-color: rgba(88, 166, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.1);
}

.neuro-review-sidebar-link .icon {
    font-size: 1.8rem; /* ЗНАЧИТЕЛЬНО уменьшаем размер иконки */
    color: var(--text-bright);
    /* Убираем лишние отступы, если они есть у эмодзи */
    line-height: 1; 
}

.neuro-review-sidebar-link .text-content {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Делаем текст плотнее */
}

.neuro-review-sidebar-link .title {
    font-family: var(--font-family-main); /* Используем основной, более строгий шрифт */
    font-weight: var(--font-weight-medium);
    font-size: 0.9rem; /* Делаем основной текст чуть меньше */
    color: var(--text-bright);
}

.neuro-review-sidebar-link .action {
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: var(--font-weight-normal); /* Делаем призыв к действию менее жирным */
}

/* ============================================= */
/* === СТИЛИ ДЛЯ ССЫЛКИ "НАЗАД К ПРОЕКТУ"    === */
/* ============================================= */

.neuro-back-to-project {
  display: inline-block;
  margin-top: 12px; /* Небольшой отступ от заголовка "Кураторский анализ" */
  font-family: var(--font-family-main);
  font-size: 0.95rem;
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
  opacity: 0.8;
}

.neuro-back-to-project:hover {
  color: var(--text-bright);
  opacity: 1;
  transform: translateX(-4px); /* Приятный эффект сдвига при наведении */
}

/* 4. Разделитель (без изменений) */
.hero-divider {
  width: 1px;
  height: 150px;
  background-color: var(--border-color-subtle);
}

/* 5. Правая колонка (Фокус: Название проекта и теглайн) */
.hero-focus-side {
  text-align: left;
}
.hero-focus-side h1 {
  font-family: var(--font-family-headings);
  font-size: clamp(2.5rem, 5vw, 4.5rem); /* Большой, акцентный размер */
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  margin: 0 0 24px 0; /* Отступ только снизу, до теглайна */
}
.hero-focus-side p {
  font-family: var(--font-family-main);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-color);
  max-width: 45ch;
  margin: 0; /* Убираем лишние отступы */
}


/* --- Навигация и индикатор скролла остаются без изменений --- */
.neuro-back-to-home {
  position: absolute;
  top: 30px;
  left: 40px;
  z-index: 10;
  color: var(--text-bright);
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  padding: 10px 20px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}
.neuro-back-to-home:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--main-bg);
  border-color: transparent;
}
.neuro-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.neuro-scroll-indicator:hover {
  opacity: 1;
}
.neuro-scroll-indicator span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.neuro-scroll-indicator .arrow-down {
  width: 16px;
  height: 24px;
  border: 2px solid var(--text-color);
  border-radius: 10px;
  position: relative;
}
.neuro-scroll-indicator .arrow-down::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 4px;
  background-color: var(--text-color);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scroll-mouse-wheel 2s infinite;
}

@keyframes scroll-mouse-wheel {
  0% { transform: translate(-50%, 0); opacity: 0; }
  40% { opacity: 1; }
  80% { transform: translate(-50%, 10px); opacity: 0; }
  100% { opacity: 0; }
}
#main-content {
  background-color: var(--content-section-bg);
  position: relative;
  z-index: 5;
  padding-top: 1px;
  scroll-margin-top: 40px;
}

/* ================================== */
/* === СТИЛИ ДЛЯ НОВОСТНОГО БЛОКА === */
/* ================================== */

/* --- 1. Слайдер на главной --- */
.news-slider-container {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 40px auto;
  padding: 0 50px; /* Оставляем место для стрелок */
}

#news-swiper {
  width: 100%;
  height: auto;
}

#news-swiper .swiper-slide {
  height: auto; /* Высота подстраивается под контент */
}

/* Стили для стрелок навигации */
.news-swiper-prev,
.news-swiper-next {
  color: var(--accent-color);
  top: 50%;
  transform: translateY(-50%);
}
.news-swiper-prev { left: 0; }
.news-swiper-next { right: 0; }

/* --- 2. Карточка новости (используется в слайдере и на странице списка) --- */
.news-card {
  display: block;
  text-decoration: none;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color-subtle);
  border-radius: 8px;
  overflow: hidden;
  height: 100%; /* Карточка занимает всю высоту слайда */
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-color-basic);
  border-color: var(--accent-color-alpha);
}

.news-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border-color-subtle);
}

.news-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Этот блок растягивается, чтобы заполнить оставшееся место */
}

.news-card-title {
  font-family: var(--font-family-headings);
  font-size: 1.25rem;
  color: var(--text-bright);
  margin: 0 0 10px 0;
  line-height: 1.3;
}

.news-card-excerpt {
  font-family: var(--font-family-main);
  font-size: 0.95rem;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  flex-grow: 1; /* Текст занимает доступное пространство */
}

.news-card-date {
  font-family: var(--font-family-main);
  font-size: 0.8rem;
  color: var(--text-color);
  margin-top: 16px;
  opacity: 0.7;
}


/* --- 3. Стили для страницы отдельной новости (/layouts/news-item.njk) --- */
.news-article-container {
  max-width: 720px; /* Оптимальная ширина для чтения */
}

.news-article-header {
  margin-bottom: 30px;
  text-align: center;
}

.news-article-header .page-title {
  border-bottom: none;
  margin-bottom: 10px;
}

.news-article-date {
  font-size: 1rem;
  color: var(--text-color);
}

.news-article-image {
  margin: 0 0 40px 0;
  padding: 0;
}
.news-article-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.news-article-image figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
  color: var(--text-color);
  font-style: italic;
}

.news-article-content p,
.news-article-content li {
  font-family: var(--font-family-main);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}
.news-article-content h2,
.news-article-content h3 {
    margin: 2.5rem 0 1.5rem 0;
    font-family: var(--font-family-headings);
    color: var(--text-bright);
}



/* ========================================================= */
/* === АДАПТИВНОСТЬ ДЛЯ СТРАНИЦЫ ПРОЕКТА (ФИНАЛЬНАЯ ВЕРСИЯ) === */
/* ========================================================= */

/* --- Планшеты и маленькие десктопы (до 1024px) --- */
@media (max-width: 1024px) {
    /* --- 1. Исправляем HERO-блок --- */
    .project-hero {
        /* Ставим блоки друг под друга */
        flex-direction: column;
        gap: 40px;
    }

    /* КЛЮЧЕВОЕ ИСПРАВЛЕНИЕ: Сбрасываем flex-свойства для дочерних элементов,
       чтобы они занимали всю доступную ширину в колонке */
    .hero-text,
    .hero-media {
        flex-basis: 100%; /* Устанавливаем базовую ширину в 100% */
        width: 100%;
    }

    /* --- 2. Исправляем основную сетку контента --- */
    .project-body-grid {
        /* ВМЕСТО GRID ИСПОЛЬЗУЕМ BLOCK. Это самый надежный способ для одной колонки. */
        display: block;
        margin-top: 60px;
    }

    /* Скрываем ненужное оглавление */
    .project-sidebar-nav {
        display: none;
    }

    /* Центральная колонка и сайдбар теперь обычные блоки */
    .project-article-content,
    .project-sidebar-meta {
        position: static;   /* Убираем "липкость" */
        max-width: 100%;    /* Занимают всю ширину контейнера */
        margin-bottom: 60px; /* Добавляем отступ снизу */
    }

    /* Убираем последний отступ */
    .project-sidebar-meta {
        margin-bottom: 0;
    }
    
    .project-article-content > p:first-child:empty {
    display: none;
    }

    /* Чтобы текст в статье не растягивался на всю ширину, ограничиваем его здесь */
    .project-article-content {
       max-width: 75ch; /* Ограничиваем по символам для читаемости */
       margin-left: auto;   /* И центрируем этот блок */
       margin-right: auto;
    }
}


/* --- Мобильные устройства (до 768px) --- */
@media (max-width: 768px) {
    .container {
        width: 95%; /* Делаем отступы по бокам чуть меньше */
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero-text h1 {
        font-size: clamp(2rem, 10vw, 2.8rem);
    }
    
    /* Уменьшаем высоту слайдера на мобильных, чтобы он не занимал весь экран */
    .main-swiper .swiper-slide img {
        height: 350px; 
    }

    /* Уменьшаем высоту превью-слайдера */
    .thumbs-swiper {
        height: 80px;
    }

    /* Чтобы текст на мобильных не был прижат к краям */
    .project-article-content {
        max-width: 100%; /* На самых узких экранах пусть занимает всю ширину */
    }
}


/* ======================================================== */
/* === АДАПТИВНОСТЬ ДЛЯ HERO-БЛОКА НЕЙРО-ОБЗОРА       === */
/* (Этот код не влияет на страницы обычных проектов)      */
/* ======================================================== */

/* --- Планшеты и маленькие десктопы (до 1024px) --- */
@media (max-width: 1024px) {
  /* Выбираем именно тот контейнер, который используется в neuro-review.njk */
  .neuro-hero-content-v3 {
    /* Меняем сетку на одну колонку, чтобы всё встало друг под другом */
    grid-template-columns: 1fr;
    gap: 20px; /* Уменьшаем отступ между блоками */
    text-align: center; /* Центрируем весь контент для аккуратности */
  }

  /* Текстовые блоки теперь тоже будут выровнены по центру */
  .hero-context-side,
  .hero-focus-side {
    text-align: center;
  }
  
  /* Прячем разделительную линию, она больше не нужна в одной колонке */
  .hero-divider {
    display: none;
  }
  
  /* Ссылке "Назад к проекту" добавим отступ, чтобы отделить её от заголовка */
  .neuro-back-to-project {
     display: inline-block; /* Чтобы margin сработал */
     margin-bottom: 20px; 
  }

  /* Можно немного уменьшить главный заголовок на планшетах */
  .hero-focus-side h1 {
     font-size: clamp(2.2rem, 10vw, 3.5rem); 
  }
}


/* --- Мобильные устройства (до 768px) --- */
@media (max-width: 768px) {
  /* Уменьшаем высоту hero-блока, чтобы он не занимал весь экран */
  .neuro-hero-fullscreen {
    min-height: 500px;
    height: auto; /* Высота теперь зависит от контента */
    padding-top: 100px; /* Отступ сверху для навигации */
    padding-bottom: 60px; /* Отступ снизу для кнопки скролла */
  }
  
  /* Делаем заголовки еще компактнее */
  .hero-context-side h2 {
    font-size: 1.5rem;
  }
  .hero-focus-side h1 {
    font-size: clamp(2rem, 12vw, 2.8rem);
  }
  
  /* Поправляем позицию кнопок "На главную" и "Скролл вниз" */
  .neuro-back-to-home {
    top: 20px;
    left: 20px;
  }
  .neuro-scroll-indicator {
    bottom: 20px;
  }
}

/* ========================================================= */
/* === СТИЛИ ДЛЯ ИНТЕРАКТИВНОГО ЗАГОЛОВКА (V2 - УЛУЧШЕННЫЙ) === */
/* ========================================================= */

/* --- 1. Основная интерактивная область --- */
.keyart_hero_title {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    text-align: center;
    color: var(--text-bright);
    padding: 20px 30px; /* Добавим "воздуха", чтобы было легче навести мышь */
    cursor: pointer;
    border-radius: 12px;
}

/* --- 2. Заголовок "Soul Tuner" --- */
.keyart_hero_title h1 {
    /* Готовим заголовок к анимации сдвига */
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- 3. Новая линия (создана через псевдо-элемент) --- */
.keyart_hero_title h1::after {
    content: '';
    display: block;
    width: 100%; /* <-- ИЗМЕНЕНИЯ ЗДЕСЬ (ширина в % от ширины "SoulTuner") */
    height: 2px; /* <-- ИЗМЕНЕНИЯ ЗДЕСЬ (толщина линии) */
    background-color: var(--text-bright); /* <-- ИЗМЕНЕНИЯ ЗДЕСЬ (белый цвет) */
    margin: 0px auto 0 auto; /* <-- НОВОЕ, уменьшенное значение */
    
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- 4. Стильная кнопка "О художнике" --- */
.hero-nav-link {
    font-family: var(--font-family-main);
    color: var(--text-bright);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.05em; /* Добавляем "воздуха" между буквами */
    margin-top: 12px; /* Увеличиваем отступ от линии */
    display: inline-block;
    padding: 10px 20px; /* Делаем ее похожей на кнопку */
    border: 1px solid var(--border-color-subtle);
    border-radius: 30px; /* Сильно скругляем углы */
    background-color: rgba(14, 14, 14, 0.3); /* Полупрозрачный фон */
    backdrop-filter: blur(4px);
    
    /* Изначально кнопка скрыта и сдвинута вниз */
    opacity: 0;
    transform: translateY(15px);
    cursor: pointer;
    
    /* Плавный переход с небольшой задержкой, чтобы появиться после линии */
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    transition-delay: 0.1s;
}

/* --- 5. Анимации при наведении на всю область .keyart_hero_title --- */

/* Сдвигаем заголовок вверх */
.keyart_hero_title:hover h1 {
    transform: translateY(-10px);
}

/* "Растягиваем" линию */
.keyart_hero_title:hover h1::after {
    transform: scaleX(1);
}

/* Когда JS добавляет класс, кнопка появляется */
.hero-nav-link.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Эффект при наведении на саму кнопку */
.hero-nav-link:hover {
    background-color: var(--accent-color-alpha);
    border-color: var(--accent-color);
    color: var(--text-bright);
}


/* ========================================================= */
/* === СТИЛИ ДЛЯ СТРАНИЦЫ "О ХУДОЖНИКЕ" (ABOUT.NJK)    === */
/* ========================================================= */

/* --- 1. Основные контейнеры --- */
.about-page .page-title {
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 2rem;
}

.about-hero {
    display: grid;
    /* Текст (первый элемент) займет все место, фото (второй) - сколько нужно */
    grid-template-columns: 1fr auto; 
    gap: 40px;
    align-items: start;
    padding-bottom: 4rem;
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--border-color-subtle);
}

/* --- 2. Фотография --- */
.about-photo-wrapper {
    position: sticky;
    top: 120px; 
    /* Задаем базовую ширину, от которой будет считаться высота */
    width: 300px; 
    max-height: calc(100vh - 160px);
    aspect-ratio: 2 / 3;
}
.about-photo {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    border-radius: 8px;
}

/* --- 3. Контентная часть (текст) --- */
.prose-styling h2 {
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-medium);
    font-size: 1.8rem;
    line-height: 1.4;
    color: var(--text-bright);
    margin-bottom: 1.5rem;
}

.prose-styling p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.prose-styling h3 { /* Для стилизации цитаты */
    font-family: var(--font-family-headings);
    font-weight: var(--font-weight-normal);
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-bright);
    padding: 1.5rem;
    border-left: 3px solid var(--accent-color);
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
}

/* --- 4. Секция с деталями (CV, Инструменты) --- */
.about-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Адаптивная сетка */
    gap: 40px;
}

.details-title {
    font-family: var(--font-family-main);
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color-subtle);
}

.cv-list {
    list-style: none;
    padding: 0;
}

.cv-list li {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}
.cv-list li strong {
    color: var(--text-bright);
    margin-right: 0.5em;
}

/* --- 5. Кнопка "Скачать CV" --- */
.about-cta {
    margin-top: 2rem;
}


/* --- Адаптивность для мобильных устройств --- */
@media (max-width: 900px) {
    .about-hero {
        grid-template-columns: 1fr; /* Колонки встают друг под другом */
    }
    .about-photo-wrapper {
        position: static; /* Убираем "липкость" */
        /* На мобильных фото идет после текста, поэтому ставим отступ сверху */
        margin-top: 2rem;
        width: 100%; 
        max-width: 300px;
        margin-bottom: 0;
        max-height: none; 
    }
}