/* Page-specific variables for naumenko.html */
:root {
    --bs-custom-hero-overlay: rgba(0, 0, 0, 0.55);
    --bs-custom-hero-border-color: rgba(255, 255, 255, 0.7);
    --bs-custom-hero-subtitle-color: #e0e0e0;
    --bs-custom-timeline-line: #c8bca9;
    --bs-custom-timeline-year-bg: #8d7b68;
    --bs-custom-timeline-content-border: #a08c78;
    --bs-custom-timeline-content-title: #6b5b4d;
    --bs-custom-theme-card-shadow-color: rgba(74, 59, 49, 0.08);
    --bs-custom-theme-card-hover-shadow-color: rgba(74, 59, 49, 0.12);
    --bs-custom-theme-card-border-top: #b0a08d;
    --bs-custom-theme-card-icon-color: #8d7b68;
    --bs-custom-theme-card-title-color: #5c4d42;
    --bs-custom-works-example-color: #777;
    --bs-custom-legacy-figcaption-color: #555;
    --bs-custom-interactive-bg: #5a524c;
    --bs-custom-interactive-text: #fdfaf6;
    --bs-custom-interactive-placeholder-bg: rgba(255, 255, 255, 0.1);
    --bs-custom-interactive-placeholder-text: #e0e0e0;
}

/* 1. Hero Section */
.hero-section {
    height: 100vh;
    background: url('static/images/sunrise.jpg') no-repeat center center/cover;
    position: relative;
    z-index: 0; /* Убедимся, что фон под оверлеем */
    display: flex; /* Добавлено для центрирования hero-content */
    align-items: center; /* Добавлено для центрирования hero-content */
    justify-content: center; /* Добавлено для центрирования hero-content */
}
.hero-section::before { /* Затемнение для лучшей читаемости текста */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bs-custom-hero-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center; /* Убедимся, что текст внутри центрирован */
}

.hero-portrait {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 5px solid var(--bs-custom-hero-border-color);
    object-fit: cover;
}

.hero-section h1 {
    font-size: 3.8em;
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}

.subtitle {
    font-family: var(--bs-custom-heading-font);
    font-style: italic;
    font-size: 1.6em;
    color: var(--bs-custom-hero-subtitle-color);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    font-size: 2.5em;
    color: rgba(255, 255, 255, 0.6);
    animation: bounce 2.2s infinite;
    z-index: 2;
    left: 50%; /* Центрируем индикатор */
    transform: translateX(-50%); /* Центрируем индикатор */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12px); }
    60% { transform: translateY(-6px); }
}

/* 2. Шлях Асобы і Пісьменніка (Таймлайн) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
}
.timeline::before { /* Центральная линия таймлайна */
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--bs-custom-timeline-line);
    border-radius: 2px;
}

.timeline-item {
    padding: 20px 0;
    position: relative; /* Make it a positioning context for its children */
    display: flex; /* Keep flex for content and year alignment */
    align-items: flex-start;
    margin-bottom: 30px;
    width: 100%; /* Ensure it spans the full width of timeline */
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse; /* Content on left, year on right */
}

.timeline-year {
    background-color: var(--bs-custom-timeline-year-bg);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95em;
    position: absolute; /* Position relative to .timeline-item */
    top: -10px; /* Скорректировано, чтобы поднять блок с годом */
    left: 50%; /* Center relative to timeline-item */
    transform: translateX(-50%); /* Center horizontally */
    z-index: 1;
    white-space: nowrap; /* Предотвращает перенос текста года */
}

.timeline-content {
    background-color: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.07);
    text-align: left;
    width: calc(50% - 20px); /* Half width minus gap to central line */
    max-width: 380px; /* Add a max-width to prevent it from getting too wide */
    padding-top: 35px; /* Увеличен отступ сверху, чтобы текст не налезал на год */
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 20px; /* Gap to central line */
    margin-left: auto; /* Push content to the left */
    border-left: none;
    border-right: 4px solid var(--bs-custom-timeline-content-border);
}
.timeline-item:nth-child(even) .timeline-content {
    margin-left: 20px; /* Gap to central line */
    margin-right: auto; /* Push content to the right */
    border-right: none; /* Убедимся, что нет правой границы по умолчанию */
    border-left: 4px solid var(--bs-custom-timeline-content-border); /* Добавим левую границу */
}


.timeline-content h3 {
    font-size: 1.4em;
    color: var(--bs-custom-timeline-content-title);
}
.timeline-content p {
    font-size: 0.95em;
}

/* 3. Сэрца Творчасці */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Убедимся, что есть minmax для адаптивности */
    gap: 35px;
    max-width: 1200px;
    margin: 0 auto;
}

.theme-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--bs-custom-theme-card-shadow-color);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid var(--bs-custom-theme-card-border-top);
}

.theme-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 30px var(--bs-custom-theme-card-hover-shadow-color);
}

.theme-card-icon {
    font-size: 2.8em;
    margin-bottom: 15px;
    color: var(--bs-custom-theme-card-icon-color);
}

.theme-card h3 {
    font-size: 1.7em;
    margin-top: 0;
    color: var(--bs-custom-theme-card-title-color);
}

.works-example {
    font-size: 0.9em !important;
    color: var(--bs-custom-works-example-color);
    font-style: italic;
}

/* 4. Уплыў і Памяць */
.legacy-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
}
.legacy-gallery figure {
    margin: 0;
    text-align: center;
}
.gallery-item {
    width: 250px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 4px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.gallery-item:hover {
    transform: scale(1.05);
}
.legacy-gallery figcaption {
    font-size: 0.9em;
    color: var(--bs-custom-legacy-figcaption-color);
}

/* 5. Рэха Вайны (Інтэрактыў) */
.interactive-section {
    background-color: var(--bs-custom-interactive-bg);
    color: var(--bs-custom-interactive-text);
}
.interactive-section h2,
.interactive-section .section-intro,
.interactive-section .quote {
    color: var(--bs-custom-interactive-text);
}
.interactive-map-placeholder {
    background-color: var(--bs-custom-interactive-placeholder-bg);
    font-size: 1.2em;
    font-style: italic;
    color: var(--bs-custom-interactive-placeholder-text);
}
.quote {
    font-size: 1.2em;
    font-style: italic;
    max-width: 700px;
}

/* Responsiveness for page-specific elements */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.6em;
    }
    .subtitle {
        font-size: 1.3em;
    }
    .timeline::before { /* Хаваем цэнтральную лінію на малых экранах */
        display: none;
    }
    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: column; /* Усе элементы ў слупок */
        align-items: center; /* Цэнтруем */
    }
    .timeline-year {
        position: static; /* Скідваем абсалютнае пазіцыянаванне */
        transform: none; /* Remove transforms */
        margin-bottom: 10px;
        left: auto; /* Reset left/right */
        right: auto; /* Reset left/right */
        top: auto; /* Reset top */
    }
    .timeline-content {
        width: 90%; /* Adjust width for mobile */
        max-width: 400px;
        margin: 0 auto; /* Center content block */
        text-align: center;
        border-left: 4px solid var(--bs-custom-timeline-content-border); /* Consistent border */
        border-right: none; /* Remove right border for odd items */
        padding-top: 20px; /* Вернуть стандартный отступ для мобильных */
    }
    .timeline-item:nth-child(odd) .timeline-content {
        border-right: none;
    }
    .themes-grid {
        grid-template-columns: 1fr; /* На мобильных одна колонка */
    }
}

@media (max-width: 480px) {
    .hero-portrait {
        width: 150px;
        height: 150px;
    }
    .hero-section h1 {
        font-size: 2em;
    }
    .subtitle {
        font-size: 1.1em;
    }
    .legacy-gallery {
        padding: 0 15px;
    }
    .gallery-item {
        width: 100%;
        max-width: 280px; /* Каб не расцягвалася занадта */
        height: auto;
    }
}