:root {
    --bg: #fafaf7;
    --surface: #ffffff;
    --ink: #16211b;
    --muted: #5e6b62;
    --primary: #17553c;
    --primary-dark: #0e3d2a;
    --header: #0e2b1d;
    --accent: #c8a24e;
    --accent-dark: #a9853a;
    --line: #e4e7e0;
    --radius: 16px;
    --container: 1180px;
    --shadow: 0 10px 30px rgba(14, 43, 29, .08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: 'PT Serif', Georgia, serif; line-height: 1.25; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 100; }
.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.lang-dd { position: relative; }
.lang-btn {
    display: flex; align-items: center; gap: 6px;
    background: none; cursor: pointer;
    border: 1px solid var(--line); border-radius: 9px;
    color: var(--ink); font-size: 13px; font-weight: 600;
    padding: 8px 14px; letter-spacing: .04em;
    font-family: inherit;
    transition: border-color .15s, color .15s;
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-btn svg { transition: transform .15s; }
.lang-dd.open .lang-btn svg { transform: rotate(180deg); }
.lang-menu {
    display: none;
    position: absolute; right: 0; top: calc(100% + 6px);
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    box-shadow: var(--shadow);
    min-width: 150px; padding: 6px; z-index: 200;
}
.lang-dd.open .lang-menu { display: block; }
.lang-item {
    display: block; padding: 8px 12px; border-radius: 7px;
    color: var(--ink); font-size: 14px; font-weight: 500;
}
.lang-item:hover { background: var(--bg); }
.lang-item.active { color: var(--primary); font-weight: 700; background: rgba(23,85,60,.06); }

.mainbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.mainbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }

.brand {
    font-family: 'PT Serif', Georgia, serif;
    font-weight: 700; font-size: 23px; letter-spacing: .01em;
    color: var(--ink);
    flex-shrink: 0;
}
.brand::after { content: "."; color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav-link {
    padding: 24px 12px;
    color: var(--ink);
    font-size: 13.5px; font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--accent); }

.nav-toggle {
    display: none;
    background: none; border: none; cursor: pointer;
    width: 40px; height: 40px;
    flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); transition: .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero, .page-hero {
    position: relative;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(200,162,78,.28), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(23,85,60,.55), transparent 60%),
        linear-gradient(150deg, #0e2b1d 20%, #17553c 100%);
    background-size: cover;
    background-position: center;
    color: #fff;
}
.hero { min-height: 540px; display: flex; align-items: center; }
.page-hero { min-height: 280px; display: flex; align-items: center; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(10,26,18,.78), rgba(10,26,18,.35)); opacity: 0; }
.hero[style] .hero-overlay, .page-hero[style] .hero-overlay { opacity: 1; }
.hero-content { position: relative; max-width: 780px; padding: 72px 24px; }
.hero h1, .page-hero h1 { font-size: clamp(32px, 5vw, 56px); margin-bottom: 20px; letter-spacing: -.01em; }
.hero-lead { font-size: clamp(16px, 2vw, 19px); opacity: .88; max-width: 640px; line-height: 1.75; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.scroll-hint {
    position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
    width: 28px; height: 46px;
    border: 2px solid rgba(255,255,255,.5); border-radius: 16px;
    display: flex; justify-content: center;
}
.scroll-hint span {
    width: 4px; height: 10px; border-radius: 2px;
    background: var(--accent);
    margin-top: 8px;
    animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint {
    0% { transform: translateY(0); opacity: 1; }
    70% { transform: translateY(16px); opacity: 0; }
    100% { transform: translateY(0); opacity: 0; }
}

/* ===== Marquee ===== */
.marquee {
    overflow: hidden;
    background: var(--header);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 16px 0;
    position: relative;
}
.marquee-track {
    display: flex; align-items: center; gap: 34px;
    width: max-content;
    animation: marquee 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-33.333%); }
}
.marquee-item {
    display: inline-flex; align-items: center; gap: 12px;
    color: rgba(255,255,255,.85);
    font-size: 14.5px; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase;
    white-space: nowrap;
}
.marquee-item img { height: 20px; width: auto; border-radius: 3px; }
.marquee-dot { width: 6px; height: 6px; border-radius: 1px; background: var(--accent); transform: rotate(45deg); margin-left: 22px; }

.marquee-text { background: var(--bg); border: none; padding: 30px 0 6px; }
.marquee-text .marquee-track { gap: 40px; animation-duration: 60s; }
.marquee-word {
    font-family: 'PT Serif', Georgia, serif;
    font-size: clamp(44px, 7vw, 84px); font-weight: 700;
    color: rgba(23,85,60,.1);
    white-space: nowrap;
}
.marquee-word.outline {
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(200,162,78,.35);
}

/* ===== Photo marquee (скролл пальцем + автопрокрутка на JS) ===== */
.photo-marquee {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 0 26px;
    background: var(--bg);
    cursor: grab;
}
.photo-marquee::-webkit-scrollbar { display: none; }
.photo-marquee.dragging { cursor: grabbing; }
.photo-marquee-track {
    display: flex; align-items: center; gap: 18px;
    width: max-content;
}
.photo-marquee img {
    height: 300px; width: auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(14,43,29,.14);
    user-select: none;
    -webkit-user-drag: none;
}
@media (hover: hover) {
    .photo-marquee img { transition: transform .25s ease; }
    .photo-marquee img:hover { transform: scale(1.035); }
}

/* ===== History collage ===== */
.collage { position: relative; height: 540px; }
.collage img {
    position: absolute;
    width: 56%;
    border-radius: 12px;
    border: 6px solid #fff;
    box-shadow: 0 16px 36px rgba(14,43,29,.22);
    object-fit: cover;
    aspect-ratio: 2/3;
    transition: transform .3s ease, box-shadow .3s ease, z-index 0s .1s;
}
.collage img:nth-child(1) { left: 0; top: 8%; transform: rotate(-6deg); z-index: 1; }
.collage img:nth-child(2) { left: 22%; top: 0; transform: rotate(1.5deg); z-index: 3; }
.collage img:nth-child(3) { right: 0; top: 12%; transform: rotate(6deg); z-index: 2; }
.collage img:hover { transform: rotate(0deg) scale(1.04); z-index: 5; box-shadow: 0 22px 48px rgba(14,43,29,.3); }

/* ===== Parallax band ===== */
.parallax-band {
    position: relative;
    min-height: 430px;
    display: flex; align-items: center;
    background-size: cover;
    background-position: center 30%;
    background-attachment: fixed;
}
.parallax-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(10,26,18,.78), rgba(10,26,18,.3));
}
.parallax-content { position: relative; color: #fff; padding-top: 40px; padding-bottom: 40px; }
.parallax-content h2 {
    font-size: clamp(30px, 4.5vw, 52px);
    max-width: 720px; line-height: 1.25;
}

/* ===== Stats band ===== */
.stats-band { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats-band-inner {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; padding: 44px 24px;
}
.stat { text-align: center; position: relative; }
.stat + .stat::before {
    content: ""; position: absolute; left: -12px; top: 12%; height: 76%;
    width: 1px; background: var(--line);
}
.stat-number {
    font-family: 'PT Serif', Georgia, serif;
    font-size: clamp(40px, 5vw, 62px); font-weight: 700;
    color: var(--primary); line-height: 1.1;
}
.stat-number::after { content: ""; display: block; width: 34px; height: 3px; background: var(--accent); margin: 10px auto 12px; border-radius: 2px; }
.stat-label { color: var(--muted); font-size: 14.5px; max-width: 240px; margin: 0 auto; }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .marquee-track, .photo-marquee-track { animation: none; }
    .parallax-band { background-attachment: scroll; }
}

.president-address { margin-top: 26px; }
.section-dark .content-html blockquote { color: #f0e9da; border-left-color: var(--accent); }
.section-dark .content-html li::before { background: var(--accent); }

/* ===== Buttons ===== */
.btn {
    display: inline-block; padding: 13px 26px; border-radius: 10px;
    font-weight: 600; font-size: 15px; transition: .15s;
}
.btn-primary { background: var(--accent); color: #221a08; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border: 1.5px solid rgba(255,255,255,.45); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.8); }
.btn-outline-light { border: 1.5px solid rgba(255,255,255,.45); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-link { padding: 0; color: var(--primary); font-weight: 600; }
.btn-link:hover { color: var(--primary-dark); }

/* ===== Sections ===== */
.section { padding: 76px 0; }
.section-alt { background: #f1f4ee; }
.section-dark { background: var(--header); color: #e8ede8; }
.section-dark .section-title { color: #fff; }
.section-dark .section-text { color: rgba(255,255,255,.82); }

.section-title {
    font-size: clamp(26px, 3.4vw, 38px);
    margin-bottom: 18px;
    letter-spacing: -.01em;
    position: relative;
}
.section-subtitle { font-family: 'PT Serif', Georgia, serif; font-size: 23px; margin: 44px 0 16px; }
.section-text { max-width: 760px; margin-bottom: 18px; color: var(--muted); }
.section-dark .section-text { color: rgba(255,255,255,.82); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    text-transform: uppercase; letter-spacing: .14em;
    font-size: 12px; font-weight: 700; color: var(--accent);
    margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--accent); }

.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split-media.portrait img { max-height: 480px; object-fit: cover; }
.sticky-media { align-self: start; position: sticky; top: 96px; }

/* ===== Editor content ===== */
.content-html { max-width: 820px; }
.content-html p { margin-bottom: 15px; }
.content-html h2, .content-html h3 { font-family: 'PT Serif', Georgia, serif; margin: 30px 0 14px; }
.content-html ul, .content-html ol { margin: 0 0 18px 4px; list-style: none; }
.content-html li { margin-bottom: 9px; padding-left: 24px; position: relative; }
.content-html li::before {
    content: ""; position: absolute; left: 0; top: .62em;
    width: 8px; height: 8px; border-radius: 2px;
    background: var(--accent); transform: rotate(45deg);
}
.content-html img { border-radius: var(--radius); margin: 20px 0; }
.content-html blockquote {
    border-left: 3px solid var(--accent);
    padding: 6px 0 6px 22px; margin: 22px 0;
    font-family: 'PT Serif', Georgia, serif;
    font-size: 17.5px; color: var(--ink);
}

/* ===== News ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 30px; }
.news-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--ink);
    display: flex; flex-direction: column;
    transition: transform .18s, box-shadow .18s;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-thumb { aspect-ratio: 16/9; overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-thumb img { transform: scale(1.04); }
.news-body { padding: 20px 22px 24px; }
.news-body h3 { font-size: 17.5px; margin: 8px 0 8px; }
.news-body p { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-date { font-size: 12px; color: var(--accent-dark); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.article { max-width: 820px; }
.article-image { border-radius: var(--radius); margin: 24px 0; box-shadow: var(--shadow); }
.article-lead { font-size: 18.5px; font-weight: 500; margin-bottom: 20px; line-height: 1.65; }

.pagination { display: flex; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.page-link {
    min-width: 42px; text-align: center; padding: 9px 0;
    border: 1px solid var(--line); border-radius: 9px;
    color: var(--ink); font-weight: 600; background: var(--surface);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Countries ===== */
.country-strip { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0; }
.country-chip {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
    padding: 9px 20px 9px 11px; font-weight: 600; font-size: 14.5px;
    transition: border-color .15s;
}
.country-chip:hover { border-color: var(--accent); }
.country-chip img {
    height: 22px; width: auto;
    border-radius: 4px;
    border: 1px solid rgba(22,33,27,.08);
    box-shadow: 0 1px 3px rgba(22,33,27,.12);
}

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 20px; margin: 26px 0; }
.country-grid.large { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.country-grid.muted .country-card { opacity: .72; }
.country-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 22px; text-align: center;
    transition: transform .15s, box-shadow .15s;
}
.country-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.country-card img {
    height: 44px; width: auto;
    border-radius: 6px;
    margin: 0 auto 14px;
    border: 1px solid rgba(22,33,27,.08);
    box-shadow: 0 2px 6px rgba(22,33,27,.14);
}
.country-name { font-weight: 700; }
.country-year { font-size: 13px; color: var(--accent-dark); font-weight: 700; margin-top: 4px; }
.country-desc { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* ===== Contacts ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin: 30px 0; }
.contact-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px 24px;
    border-top: 3px solid var(--accent);
}
.contact-label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.contact-value { font-weight: 600; font-size: 16px; }

/* ===== Footer ===== */
.site-footer { background: var(--header); color: rgba(255,255,255,.72); margin-top: 48px; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding: 56px 24px; }
.footer-brand { font-family: 'PT Serif', Georgia, serif; font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.footer-brand::after { content: "."; color: var(--accent); }
.footer-about { font-size: 14.5px; max-width: 420px; }
.footer-heading { font-weight: 700; color: #fff; margin-bottom: 14px; font-size: 15px; }
.footer-links, .footer-contacts { list-style: none; }
.footer-links li, .footer-contacts li { margin-bottom: 9px; font-size: 14.5px; }
.footer-links a, .footer-contacts a { color: rgba(255,255,255,.72); }
.footer-links a:hover, .footer-contacts a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; opacity: .6; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
    .nav-link { padding: 24px 8px; font-size: 13px; }
}

@media (max-width: 960px) {
    .split { grid-template-columns: 1fr; gap: 30px; }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .photo-marquee img { height: 210px; }
    .collage { height: 400px; max-width: 520px; margin: 0 auto; width: 100%; }
    .parallax-band { background-attachment: scroll; min-height: 340px; }

    .main-nav {
        display: flex;
        position: absolute; top: 68px; left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--line);
        flex-direction: column; align-items: stretch;
        padding: 10px 24px 16px;
        box-shadow: var(--shadow);
        max-height: 0; padding-top: 0; padding-bottom: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        visibility: hidden;
        transition: max-height .35s ease, opacity .3s ease, transform .3s ease,
                    padding .35s ease, visibility 0s linear .35s;
    }
    .main-nav.open {
        max-height: 480px;
        padding-top: 10px; padding-bottom: 16px;
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
        transition: max-height .35s ease, opacity .3s ease .05s, transform .3s ease,
                    padding .35s ease, visibility 0s;
    }
    .main-nav .nav-link {
        opacity: 0; transform: translateX(-8px);
        transition: opacity .25s ease, transform .25s ease;
    }
    .main-nav.open .nav-link { opacity: 1; transform: translateX(0); }
    .main-nav.open .nav-link:nth-child(1) { transition-delay: .05s; }
    .main-nav.open .nav-link:nth-child(2) { transition-delay: .08s; }
    .main-nav.open .nav-link:nth-child(3) { transition-delay: .11s; }
    .main-nav.open .nav-link:nth-child(4) { transition-delay: .14s; }
    .main-nav.open .nav-link:nth-child(5) { transition-delay: .17s; }
    .main-nav.open .nav-link:nth-child(6) { transition-delay: .2s; }
    .main-nav.open .nav-link:nth-child(7) { transition-delay: .23s; }
    .main-nav.open .nav-link:nth-child(8) { transition-delay: .26s; }
    .nav-link { padding: 12px 4px; border-bottom: none; font-size: 15px; }
    .nav-link.active { border-bottom: none; }
    .nav-toggle { display: flex; }
}

@media (max-width: 620px) {
    .news-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero { min-height: 460px; }
    .topbar-contacts { gap: 12px; }
}
