/* =========================================================
   POLITICAL FEED — WWII THEME
   Динамический фон: меняется по мере скролла
   ========================================================= */

body.theme-wwii {
    --w-bg: #11110f;
    --w-panel: rgba(28, 26, 22, 0.9);
    --w-panel-hover: rgba(42, 36, 30, 0.94);
    --w-text: #eee4d3;
    --w-muted: #a99e8e;
    --w-copper: #d47a42;
    --w-ember: #f1a35b;
    --w-gold: #d6b98b;
    --w-border: rgba(208, 167, 117, 0.22);
    --w-red: #a52b24;

    background-color: var(--w-bg);
    color: var(--w-text);
    font-family: Georgia, "Times New Roman", serif;
}

/* =========================================================
   СЛОИ ДИНАМИЧЕСКОГО ФОНА
   Два слоя .pf-bg — для плавной смены картинки
   ========================================================= */

.pf-bg-layer {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.pf-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: grayscale(100%) sepia(16%) contrast(1.06) brightness(0.55);
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.pf-bg.active {
    opacity: 1;
}

/* Тёмная вуаль поверх картинки — для читаемости текста */
.pf-bg-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(
            180deg,
            rgba(10, 10, 9, 0.72) 0%,
            rgba(15, 14, 12, 0.86) 50%,
            rgba(10, 10, 9, 0.94) 100%
        ),
        radial-gradient(
            ellipse at center,
            transparent 25%,
            rgba(0, 0, 0, 0.55) 100%
        );
}

/* Зерно старой плёнки */
.pf-bg-grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.07) 0,
            rgba(0, 0, 0, 0.07) 1px,
            transparent 1px,
            transparent 3px
        );
    opacity: 0.55;
    mix-blend-mode: multiply;
}

/* =========================================================
   ОБЩИЕ ЭЛЕМЕНТЫ
   ========================================================= */

body.theme-wwii *,
body.theme-wwii *::before,
body.theme-wwii *::after { box-sizing: border-box; }

body.theme-wwii a {
    color: var(--w-copper);
    text-decoration: none;
    transition: color 0.25s ease;
}

body.theme-wwii a:hover { color: var(--w-ember); }

body.theme-wwii .header {
    background: rgba(10, 10, 9, 0.92);
    border-bottom: 1px solid rgba(201, 143, 87, 0.2);
    backdrop-filter: blur(8px);
}

body.theme-wwii .header .nav a { color: #c8bda8; }
body.theme-wwii .header .nav a:hover { color: var(--w-ember); }

/* =========================================================
   ШАПКА ПРОЕКТА
   ========================================================= */

body.theme-wwii .project-hero {
    position: relative;
    padding: 90px 8% 60px;
    text-align: center;
    border-bottom: 1px solid rgba(201, 143, 87, 0.25);
    background: transparent;
}

body.theme-wwii .back-link {
    display: inline-block;
    margin-bottom: 26px;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    color: #b6a38d;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

body.theme-wwii .back-link:hover {
    transform: translateX(-4px);
    border-bottom-color: var(--w-copper);
    color: var(--w-ember);
}

body.theme-wwii #project-label {
    display: inline-block;
    margin-bottom: 16px;
    padding: 9px 14px;
    border: 1px solid rgba(194, 106, 57, 0.58);
    color: #d78a52;
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    background: rgba(35, 23, 17, 0.5);
}

body.theme-wwii #project-title {
    margin: 18px auto 20px;
    color: #f0e6d4;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0.01em;
    text-shadow: 0 5px 28px rgba(0, 0, 0, 0.65);
}

body.theme-wwii #project-title::before {
    content: "★";
    display: inline-block;
    margin-right: 0.4em;
    color: #c66d39;
    font-size: 0.42em;
    vertical-align: middle;
    text-shadow: 0 0 18px rgba(231, 112, 48, 0.4);
}

body.theme-wwii #project-title::after {
    content: "★";
    display: inline-block;
    margin-left: 0.4em;
    color: #c66d39;
    font-size: 0.42em;
    vertical-align: middle;
    text-shadow: 0 0 18px rgba(231, 112, 48, 0.4);
}

body.theme-wwii #project-desc {
    max-width: 680px;
    margin: 0 auto;
    color: #c8bda8;
    font-size: 1.08rem;
    font-style: italic;
    line-height: 1.8;
}

/* =========================================================
   ЛЕНТА ВРЕМЕНИ
   ========================================================= */

body.theme-wwii .timeline-section {
    padding: 70px 8% 110px;
    background: transparent;
    position: relative;
    z-index: 1;
}

body.theme-wwii .timeline-wrapper {
    position: relative;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

body.theme-wwii .timeline-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(186, 106, 62, 0.75) 7%,
        rgba(201, 133, 82, 0.55) 48%,
        rgba(165, 64, 37, 0.6) 92%,
        transparent
    );
    box-shadow: 0 0 20px rgba(194, 89, 43, 0.2);
}

body.theme-wwii .timeline-event {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 80px;
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
}

body.theme-wwii .timeline-event:nth-child(odd) {
    flex-direction: row;
    justify-content: flex-end;
    padding-right: calc(50% + 42px);
    text-align: right;
}

body.theme-wwii .timeline-event:nth-child(even) {
    flex-direction: row-reverse;
    justify-content: flex-end;
    padding-left: calc(50% + 42px);
    text-align: left;
}

body.theme-wwii .timeline-dot {
    position: absolute;
    top: 22px;
    left: 50%;
    z-index: 3;
    width: 17px;
    height: 17px;
    border: 2px solid #c77945;
    border-radius: 50%;
    background: #191714;
    transform: translateX(-50%);
    box-shadow:
        0 0 0 5px rgba(199, 121, 69, 0.08),
        0 0 13px rgba(211, 102, 49, 0.15);
    transition: all 0.35s ease;
}

body.theme-wwii .timeline-event.pf-event-active .timeline-dot,
body.theme-wwii .timeline-event:hover .timeline-dot {
    border-color: #f0a25b;
    background: #d47a42;
    box-shadow:
        0 0 0 7px rgba(212, 122, 66, 0.18),
        0 0 26px rgba(230, 112, 48, 0.45);
}

/* =========================================================
   ФОТОГРАФИИ СОБЫТИЙ
   ========================================================= */

body.theme-wwii .timeline-photo {
    position: relative;
    display: block;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 16 / 10; /* Жесткие пропорции */
    overflow: hidden;
    border: 8px solid #e8e1d2; /* Светлая рамка */
    background: #111; /* Черный фон, если фото прозрачное */
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(201, 161, 118, 0.15);
    isolation: isolate;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

body.theme-wwii .timeline-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет весь контейнер без искажений */
    object-position: center;
    opacity: 1;
    filter: grayscale(100%) sepia(14%) contrast(1.05) brightness(0.96);
    transition: filter 0.6s ease, transform 0.8s ease;
}

/* Пустая рамка (если фото нет) */
body.theme-wwii .timeline-photo.empty {
    background: #171613;
    border-color: rgba(201, 170, 131, 0.22);
}

body.theme-wwii .timeline-photo.empty img {
    display: none;
}

/* =========================================================
   КАРТОЧКА СОБЫТИЯ
   ========================================================= */

body.theme-wwii .timeline-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 27px 28px;
    border: 1px solid var(--w-border);
    border-left: 3px solid var(--w-copper);
    background: var(--w-panel);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    transition: all 0.35s ease;
}

body.theme-wwii .timeline-event:nth-child(even) .timeline-card {
    border-left: 1px solid var(--w-border);
    border-right: 3px solid var(--w-copper);
}

body.theme-wwii .timeline-event.pf-event-active .timeline-card {
    border-color: rgba(211, 139, 81, 0.55);
    box-shadow:
        0 17px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(178, 80, 39, 0.12);
}

body.theme-wwii .timeline-card:hover {
    transform: translateY(-4px);
    border-color: rgba(211, 139, 81, 0.6);
    background: var(--w-panel-hover);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.55),
        0 0 22px rgba(178, 80, 39, 0.15);
}

body.theme-wwii .timeline-year {
    display: inline-block;
    margin-bottom: 9px;
    color: #d9854b;
    font-family: "Courier New", monospace;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1;
}

body.theme-wwii .timeline-date {
    display: block;
    margin-bottom: 15px;
    color: #9a8c78;
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

body.theme-wwii .timeline-card h3 {
    margin: 0 0 12px;
    color: #f0e5d2;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.32;
    transition: color 0.25s ease;
}

body.theme-wwii .timeline-card:hover h3,
body.theme-wwii .timeline-event.pf-event-active .timeline-card h3 {
    color: #f0b77e;
}

body.theme-wwii .timeline-card p {
    margin: 0 0 18px;
    color: #b7ac9a;
    font-size: 0.93rem;
    line-height: 1.75;
}

body.theme-wwii .timeline-read-more {
    display: inline-block;
    padding-bottom: 3px;
    border-bottom: 1px solid transparent;
    color: #d9854b;
    font-family: "Courier New", monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: all 0.25s ease;
}

body.theme-wwii .timeline-card:hover .timeline-read-more {
    border-bottom-color: rgba(217, 133, 75, 0.6);
    color: #f1b77f;
}

/* =========================================================
   МОДАЛЬНОЕ ОКНО
   ========================================================= */

body.theme-wwii #article-modal {
    background: rgba(6, 6, 5, 0.92);
    backdrop-filter: blur(8px);
}

body.theme-wwii .modal-content {
    background: #191815;
    border: 1px solid var(--w-border);
    color: var(--w-text);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.75);
}

body.theme-wwii #modal-title {
    color: #f0e5d2;
    font-family: "Playfair Display", Georgia, serif;
}

body.theme-wwii .modal-date {
    color: #a8957d;
    font-family: "Courier New", monospace;
    letter-spacing: 0.1em;
}

body.theme-wwii #modal-image {
    filter: grayscale(100%) sepia(14%);
    border: 6px solid #2a2820;
}

body.theme-wwii #modal-body {
    color: #d2c5b1;
    font-size: 16px;
    line-height: 1.9;
}

body.theme-wwii #modal-body h1,
body.theme-wwii #modal-body h2,
body.theme-wwii #modal-body h3 {
    color: #f0e5d2;
    font-family: "Playfair Display", Georgia, serif;
}

body.theme-wwii #modal-body blockquote {
    border-left: 2px solid var(--w-copper);
    color: var(--w-muted);
    font-style: italic;
}

body.theme-wwii .close-btn { color: #a99b87; }
body.theme-wwii .close-btn:hover { color: var(--w-ember); }

body.theme-wwii #reading-progress {
    background: linear-gradient(90deg, #8c3b29, #e49a5d);
}

body.theme-wwii .open-article-btn {
    display: inline-block;
    margin-top: 26px;
    padding: 12px 16px;
    border: 1px solid rgba(199, 121, 69, 0.55);
    color: #e1a36e;
    font-family: "Courier New", monospace;
    font-size: 12px;
    letter-spacing: 0.04em;
    transition: background 0.25s ease;
}

body.theme-wwii .open-article-btn:hover {
    background: rgba(199, 121, 69, 0.12);
}

/* =========================================================
   FOOTER
   ========================================================= */

body.theme-wwii footer {
    background: rgba(10, 10, 9, 0.95);
    border-top: 1px solid rgba(201, 143, 87, 0.2);
    color: #a99e8e;
    position: relative;
    z-index: 1;
}

body.theme-wwii footer h3 { color: #eee4d3; }
body.theme-wwii .footer-nav a { color: #9a8c78; }
body.theme-wwii .footer-nav a:hover { color: var(--w-ember); }

/* =========================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ========================================================= */

@media (max-width: 760px) {
    body.theme-wwii .project-hero { padding: 70px 5% 40px; }
    body.theme-wwii #project-title { font-size: clamp(2rem, 9vw, 3.2rem); }

    body.theme-wwii .timeline-section { padding: 40px 5% 70px; }
    body.theme-wwii .timeline-wrapper::before { left: 11px; }
    body.theme-wwii .timeline-photo {
        max-width: 100%;
        aspect-ratio: 16 / 9;
        border-width: 6px;
    }

    /* Карточки */
    body.theme-wwii .timeline-card {
        padding: 20px;
    }

    /* Цитаты на мобилке */
    .pf-quote-block {
        margin: 50px auto;
        padding: 40px 20px;
    }
    .pf-quote-text {
        font-size: 1.3rem;
    }

    body.theme-wwii .timeline-event,
    body.theme-wwii .timeline-event:nth-child(odd),
    body.theme-wwii .timeline-event:nth-child(even) {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 55px;
        padding: 0 0 0 32px;
        text-align: left;
    }

    body.theme-wwii .timeline-dot {
        top: 17px;
        left: 11px;
        width: 14px;
        height: 14px;
    }

    body.theme-wwii .timeline-photo { width: 100%; max-width: 440px; }

    body.theme-wwii .timeline-card,
    body.theme-wwii .timeline-event:nth-child(even) .timeline-card {
        width: 100%;
        max-width: 520px;
        padding: 22px;
        text-align: left;
        border-left: 3px solid var(--w-copper);
        border-right: 1px solid var(--w-border);
    }

    /* Фон пофиксить чуть менее заметным на телефоне */
    .pf-bg {
        background-attachment: scroll;
        filter: grayscale(100%) sepia(16%) contrast(1.06) brightness(0.5);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-bg { transition-duration: 0.01ms !important; }
    body.theme-wwii *,
    body.theme-wwii *::before,
    body.theme-wwii *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
/* =========================================================
   АТМОСФЕРА — ИСКРЫ И ВЗРЫВЫ
   ========================================================= */

/* Искра — поднимается вверх с дрейфом */
.pf-ember {
    position: fixed;
    bottom: -8px;
    z-index: 4;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd28a 0%, #d47a42 60%, #8b3410 100%);
    box-shadow:
        0 0 6px rgba(241, 163, 91, 0.85),
        0 0 14px rgba(212, 122, 66, 0.5),
        0 0 22px rgba(139, 52, 16, 0.25);
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: pfEmberFloat var(--duration, 7s) cubic-bezier(0.22, 0.9, 0.4, 1) forwards;
    will-change: transform, opacity;
}

@keyframes pfEmberFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.6);
    }
    12% {
        opacity: 1;
        transform: translate(calc(var(--drift, 20px) * 0.15), -6vh) scale(1.1);
    }
    60% {
        opacity: 0.75;
    }
    100% {
        opacity: 0;
        transform: translate(var(--drift, 20px), -70vh) scale(0.4);
    }
}

/* Взрыв — короткая яркая вспышка */
.pf-explosion {
    position: fixed;
    z-index: 5;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff5d8 0%, #ffb14a 35%, #d44a1c 70%, transparent 100%);
    box-shadow:
        0 0 20px rgba(255, 180, 90, 0.9),
        0 0 40px rgba(212, 74, 28, 0.7),
        0 0 70px rgba(139, 52, 16, 0.4);
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    animation: pfExplosion 1.6s ease-out forwards;
    will-change: transform, opacity;
}

.pf-explosion::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 200, 120, 0.55), transparent 70%);
    animation: pfExplosionRing 1.6s ease-out forwards;
}

.pf-explosion::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 1px solid rgba(255, 180, 90, 0.7);
    animation: pfExplosionRing 1.6s ease-out forwards;
}

@keyframes pfExplosion {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    8% {
        opacity: 1;
        transform: scale(1.4);
    }
    35% {
        opacity: 0.9;
        transform: scale(2.2);
    }
    100% {
        opacity: 0;
        transform: scale(4);
    }
}

@keyframes pfExplosionRing {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    20% {
        opacity: 0.9;
        transform: scale(1.4);
    }
    100% {
        opacity: 0;
        transform: scale(5);
    }
}

/* Уважение к reduce-motion */
@media (prefers-reduced-motion: reduce) {
    .pf-ember,
    .pf-explosion {
        display: none !important;
    }
}
/* =========================================================
   ПРОЛЕТАЮЩИЙ САМОЛЁТ — вид сверху, вдоль бокового края
   ========================================================= */

.pf-plane {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;                 /* ниже карточек — они перекрывают */
    width: 150px;
    height: 100px;
    pointer-events: none;
    opacity: 0;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
    will-change: transform, opacity;
    transform-origin: center center;
}

.pf-plane svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Тёмный металл с лёгкой медной подсветкой контура */
.pf-plane svg .body   { fill: #1c1a16; }
.pf-plane svg .wing   { fill: #211e19; }
.pf-plane svg .engine { fill: #16140f; stroke: rgba(212, 122, 66, 0.35); stroke-width: 0.8; }
.pf-plane svg .glass  { fill: #3a2f24; opacity: 0.85; }
.pf-plane svg .line   { fill: none; stroke: rgba(212, 122, 66, 0.28); stroke-width: 0.8; }

/* На узких экранах боковых полей нет — прячем */
@media (max-width: 1100px) {
    .pf-plane {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-plane {
        display: none !important;
    }
}
/* =========================================================
   ПРОЖЕКТОРЫ — раз в минуту пробегают по небу
   ========================================================= */

.pf-searchlight {
    position: fixed;
    top: -10vh;
    z-index: 2;
    width: 240px;
    height: 130vh;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        to bottom,
        rgba(255, 245, 210, 0.35) 0%,
        rgba(255, 240, 190, 0.12) 30%,
        rgba(255, 235, 170, 0.04) 70%,
        transparent 100%
    );
    filter: blur(2px);
    mix-blend-mode: screen;
    transform-origin: top center;
    will-change: transform, opacity;
    animation: pfSearchlight var(--duration, 8s) ease-in-out forwards;
}

.pf-searchlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255, 250, 220, 0.5),
        transparent 90%
    );
    transform: translateX(-50%);
    filter: blur(1px);
}

@keyframes pfSearchlight {
    0% {
        opacity: 0;
        transform: rotate(var(--start-angle, -25deg));
    }
    15% {
        opacity: 0.55;
    }
    85% {
        opacity: 0.55;
    }
    100% {
        opacity: 0;
        transform: rotate(var(--end-angle, 25deg));
    }
}

@media (max-width: 760px) {
    .pf-searchlight {
        width: 160px;
        opacity: 0.7;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-searchlight { display: none !important; }
}
/* =========================================================
   ПОЛНОЭКРАННЫЕ ЦИТАТЫ МЕЖДУ СОБЫТИЯМИ
   ========================================================= */

.pf-quote-block {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 90px auto;
    padding: 60px 40px;
    text-align: center;
    border-top: 1px solid rgba(201, 143, 87, 0.25);
    border-bottom: 1px solid rgba(201, 143, 87, 0.25);
    background:
        radial-gradient(
            ellipse at center,
            rgba(94, 72, 45, 0.12) 0%,
            transparent 70%
        );
}

.pf-quote-block::before {
    content: "“";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 130px;
    line-height: 1;
    color: rgba(212, 122, 66, 0.3);
    pointer-events: none;
}

.pf-quote-text {
    margin: 0 0 25px;
    color: #f0e5d2;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.35;
    letter-spacing: -0.005em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.pf-quote-author {
    display: inline-block;
    color: #d9854b;
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.pf-quote-author::before,
.pf-quote-author::after {
    content: "—";
    display: inline-block;
    margin: 0 12px;
    opacity: 0.5;
}

@media (max-width: 760px) {
    .pf-quote-block {
        margin: 60px auto;
        padding: 45px 20px;
    }
    .pf-quote-block::before {
        font-size: 90px;
        top: -20px;
    }
}
/* =========================================================
   ПОЛНОЭКРАННЫЕ ЦИТАТЫ МЕЖДУ СОБЫТИЯМИ
   ========================================================= */

.pf-quote-block {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 90px auto;
    padding: 60px 40px;
    text-align: center;
    border-top: 1px solid rgba(201, 143, 87, 0.25);
    border-bottom: 1px solid rgba(201, 143, 87, 0.25);
    background:
        radial-gradient(
            ellipse at center,
            rgba(94, 72, 45, 0.12) 0%,
            transparent 70%
        );
}

.pf-quote-block::before {
    content: "“";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 130px;
    line-height: 1;
    color: rgba(212, 122, 66, 0.3);
    pointer-events: none;
}

.pf-quote-text {
    margin: 0 0 25px;
    color: #f0e5d2;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.35;
    letter-spacing: -0.005em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

.pf-quote-author {
    display: inline-block;
    color: #d9854b;
    font-family: "Courier New", monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.pf-quote-author::before,
.pf-quote-author::after {
    content: "—";
    display: inline-block;
    margin: 0 12px;
    opacity: 0.5;
}

@media (max-width: 760px) {
    .pf-quote-block {
        margin: 60px auto;
        padding: 45px 20px;
    }
    .pf-quote-block::before {
        font-size: 90px;
        top: -20px;
    }
}
/* =========================================================
   СРАВНЕНИЕ "ТОГДА И СЕЙЧАС"
   ========================================================= */

.timeline-photo {
    position: relative;
}

.pf-photo-toggle {
    position: absolute;
    bottom: 12px;
    left: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid rgba(212, 122, 66, 0.6);
    background: rgba(20, 18, 15, 0.88);
    color: #e1a36e;
    font-family: "Courier New", monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    cursor: pointer;
    transform: translateX(-50%);
    transition: all 0.25s ease;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

.pf-photo-toggle:hover {
    background: rgba(40, 28, 18, 0.95);
    border-color: #d78a52;
    color: #f0b77e;
}

.pf-photo-toggle::before {
    content: "◐";
    font-size: 1rem;
    line-height: 1;
}

.timeline-photo .pf-modern-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
    filter: saturate(0.85) contrast(1.05) brightness(0.98);
    z-index: 1;
    pointer-events: none;
}

.timeline-photo.pf-show-modern .pf-modern-img {
    opacity: 1;
}

.timeline-photo.pf-show-modern .pf-photo-main {
    opacity: 0;
}

.timeline-photo .pf-photo-main {
    transition: opacity 0.8s ease;
    position: relative;
    z-index: 2;
}

@media (max-width: 760px) {
    .pf-photo-toggle {
        font-size: 0.6rem;
        padding: 6px 10px;
        bottom: 8px;
    }
}
/* =========================================================
   ГЛОБУС СОБЫТИЙ (рисует setupMap в js/project.js)
   ========================================================= */
.pf-map {
    --map-ink: #f0e5d2;
    --map-muted: #8f8372;
    --map-accent: #d9854b;
    --map-hot: #e2552b;
    --map-bg: rgba(16, 14, 11, 0.95);
    --map-line: rgba(201, 143, 87, 0.35);

    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.pf-map.pf-map-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Кнопка «Карта» */
.pf-map-launch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 10px 12px;
    border: 1px solid var(--map-line);
    border-radius: 999px;
    background: var(--map-bg);
    color: var(--map-ink);
    font: 700 0.72rem/1 "Courier New", monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pf-map-launch svg {
    width: 20px;
    height: 20px;
    color: var(--map-accent);
}

.pf-map-launch:hover {
    border-color: var(--map-accent);
    transform: translateY(-2px);
}

.pf-map-launch:focus-visible,
.pf-map-tool:focus-visible {
    outline: 2px solid var(--map-accent);
    outline-offset: 3px;
}

.pf-map.is-open .pf-map-launch {
    display: none;
}

/* Панель с глобусом */
.pf-map-panel {
    width: 340px;
    overflow: hidden;
    border: 1px solid var(--map-line);
    border-radius: 6px;
    background: var(--map-bg);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    transform-origin: bottom right;
    animation: pfMapOpen 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pf-map-panel[hidden] {
    display: none;
}

@keyframes pfMapOpen {
    from { opacity: 0; transform: scale(0.85) translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.pf-map-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px 8px 12px;
    border-bottom: 1px solid rgba(201, 143, 87, 0.18);
}

.pf-map-label {
    color: var(--map-accent);
    font-family: "Courier New", monospace;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pf-map-tools {
    display: flex;
    gap: 4px;
}

.pf-map-tool {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid rgba(201, 143, 87, 0.3);
    border-radius: 3px;
    background: transparent;
    color: var(--map-muted);
    font: 400 18px/1 Georgia, serif;
    cursor: pointer;
}

.pf-map-tool:hover {
    color: var(--map-ink);
    border-color: var(--map-accent);
}

.pf-map-frame {
    position: relative;
    height: 300px;
    background: radial-gradient(ellipse at center, rgba(40, 32, 22, 0.35), transparent 70%);
}

.pf-map-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}

.pf-map-canvas:active {
    cursor: grabbing;
}

.pf-map-hint,
.pf-map-status {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: var(--map-muted);
    font-family: "Courier New", monospace;
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    white-space: nowrap;
    pointer-events: none;
}

.pf-map-hint {
    bottom: 6px;
    transition: opacity 0.6s ease;
}

.pf-map-hint.is-gone {
    opacity: 0;
}

.pf-map-status {
    top: 50%;
    color: var(--map-ink);
}

.pf-map-tool svg {
    display: block;
    width: 12px;
    height: 12px;
    margin: auto;
}

.pf-map-expand[aria-pressed="true"] {
    color: var(--map-ink);
    border-color: var(--map-accent);
}

/* Большая карта */
.pf-map.is-large .pf-map-panel {
    width: min(760px, calc(100vw - 48px));
}

.pf-map.is-large .pf-map-frame {
    height: min(560px, calc(100vh - 210px));
}

/* Легенда: блоки и линия фронта */
.pf-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 7px 12px;
    border-top: 1px solid rgba(201, 143, 87, 0.18);
    color: var(--map-muted);
    font-family: "Courier New", monospace;
    font-size: 0.64rem;
    letter-spacing: 0.06em;
}

.pf-map-legend[hidden] {
    display: none;
}

.pf-map-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pf-map-key i {
    flex: none;
    display: block;
}

.pf-map-key--side i {
    width: 7px;
    height: 7px;
    background: var(--key, var(--map-ink));
    box-shadow: 0 0 0 1px var(--key-edge, transparent);
    transform: rotate(45deg);
}

.pf-map-key--front i {
    width: 16px;
    height: 6px;
    background:
        linear-gradient(var(--map-hot), var(--map-hot)) center / 100% 2px no-repeat,
        repeating-linear-gradient(90deg, transparent 0 3px, var(--map-ink) 3px 4px, transparent 4px 6px);
    opacity: 0.9;
}

.pf-map-caption {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-height: 38px;
    padding: 9px 12px 10px;
    border-top: 1px solid rgba(201, 143, 87, 0.18);
}

.pf-map-year {
    flex: none;
    color: var(--map-accent);
    font-family: "Courier New", monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.pf-map-place {
    overflow: hidden;
    color: var(--map-ink);
    font-family: "Playfair Display", Georgia, serif;
    font-size: 0.95rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@media (max-width: 760px) {
    .pf-map {
        right: 16px;
        bottom: 16px;
    }

    .pf-map-panel {
        width: calc(100vw - 32px);
        max-width: 360px;
    }

    .pf-map-frame {
        height: 220px;
    }

    .pf-map.is-large .pf-map-panel {
        width: calc(100vw - 32px);
        max-width: none;
    }

    .pf-map.is-large .pf-map-frame {
        height: min(460px, calc(100vh - 230px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .pf-map-panel {
        animation: none;
    }
}

/* Курсор печатной машинки */
.pf-typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #d47a42;
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: pfBlink 0.8s step-end infinite;
}

@keyframes pfBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}