/* ============================================================
   Августовское педагогическое совещание — публичный сайт
   Шрифты: Montserrat (текст, логотип) + PT Serif (заголовки)
   Палитра: белый/кремовый + бордовый + чёрный (футер)
   ============================================================ */

:root {
    /* Цвета задаются также через <style> в head из настроек темы */
    --accent:        #8c2b2b;
    --accent-dk:     #6f2020;
    --accent-soft:   #f4e6e6;
    --bg:            #ffffff;
    --bg-cream:      #fffce4;
    --bg-soft:       #f4f1ea;
    --paper:         #ffffff;
    --ink:           #1d1d1f;
    --ink-soft:      #56524d;
    --line:          #e6e1d5;
    --footer-bg:     #1a1a1a;
    --sans:          'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --serif:         'PT Serif', Georgia, 'Times New Roman', serif;
    --wrap:          1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

.band-cream { background: var(--bg-cream); }
.band-gray  { background: var(--bg-soft); }

.skip-link {
    position: absolute;
    left: -9999px; top: 0;
    background: var(--accent); color: #fff;
    padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ============ Шапка ============ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    transition: box-shadow .35s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(0, 0, 0, .07); }

/* Баннер просмотра архива */
.archive-banner {
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
    text-align: center;
}
.archive-banner-inner { display: flex; align-items: center; justify-content: center; gap: 24px; flex-wrap: wrap; }
.archive-banner-link { color: #fff; text-decoration: underline; }
.archive-banner-link:hover { opacity: .8; }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 88px;
}

.brand-group { display: flex; align-items: center; gap: 60px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.brand-coat { flex: none; height: 60px; width: auto; display: block; }
.brand-coat2 { flex: none; height: 60px; width: auto; display: block; }
.brand-text {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.2;
    letter-spacing: .04em;
    color: var(--ink);
    text-transform: uppercase;
}
.brand-text .brand-text-l1 { display: block; color: var(--accent); }
.brand-text .brand-text-l2 { display: block; color: var(--ink); font-weight: 600; letter-spacing: .05em; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}
.site-nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav-links a {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 10px 4px;
    margin: 0 8px;
    transition: color .25s ease;
}
.site-nav-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: 2px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}
.site-nav-links a:hover,
.site-nav-links a.is-active { color: var(--accent); }
.site-nav-links a:hover::after,
.site-nav-links a.is-active::after { transform: scaleX(1); }

.site-nav-socials { display: flex; align-items: center; gap: 8px; }

/* Кнопка соцсети — общая для шапки и подвала */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    transition: background-color .25s ease, transform .25s ease;
}
.social-btn svg { width: 18px; height: 18px; display: block; }
.social-btn img { width: 22px; height: 22px; object-fit: contain; display: block; }
.social-btn:hover { background: var(--accent-dk); transform: translateY(-2px); }
.social-btn--dark { background: rgba(255,255,255,.12); }
.social-btn--dark:hover { background: var(--accent); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: 0;
    padding: 10px;
    cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--accent); transition: .3s ease; }

/* ============ Первый экран ============ */

.hero { position: relative; overflow: hidden; color: #fff; }

.hero--photo { min-height: 560px; display: flex; align-items: center; }
.hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
    animation: heroZoom 22s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero-veil {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.36) 60%, rgba(0,0,0,.55) 100%),
        linear-gradient(90deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.10) 50%);
}

.hero--plain {
    background:
        radial-gradient(900px 480px at 20% -10%, rgba(140,43,43,.6) 0%, transparent 60%),
        linear-gradient(150deg, #2a1818 0%, var(--accent-dk) 100%);
}
.hero-ornament {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 90%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 90%);
}

.hero-inner { position: relative; padding: 80px 0; width: 100%; }
.hero--plain .hero-inner { padding: 88px 0; }
.hero--photo .hero-inner { display: flex; justify-content: flex-end; }

.hero-card {
    max-width: 760px; text-align: left;
    display: flex; align-items: center; gap: 40px;
}
.hero--plain .hero-card { max-width: 900px; margin: 0 auto; text-align: center; }
.hero-logo-side { flex: none; }
.hero-logo { display: block; height: 160px; width: auto; max-width: 180px; filter: drop-shadow(0 4px 18px rgba(0,0,0,.35)); }
.hero-text { min-width: 0; flex: 1; }

.hero-meta {
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: #fff;
}
.hero-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(26px, 3.5vw, 38px);
    line-height: 1.25;
    text-shadow: 0 2px 22px rgba(0,0,0,.55);
}
.hero-rule { width: 64px; height: 3px; margin: 22px 0; background: var(--accent); }
.hero--plain .hero-rule { margin: 22px auto; background: #f0d8a0; opacity: .8; }
.hero-subtitle {
    margin: 0;
    max-width: 600px;
    font-size: 16.5px;
    line-height: 1.6;
    color: rgba(255,255,255,.92);
}
.hero--plain .hero-subtitle { margin: 0 auto; }

/* ============ Секции ============ */

.section-head { padding: 72px 0 18px; text-align: center; }
.section-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(26px, 3.2vw, 34px);
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -.005em;
}
.head-rule { width: 56px; height: 3px; margin: 18px auto 0; background: var(--accent); }

.section-text    { padding: 18px 0; }
.section-image   { padding: 26px 0; }
.section-gallery { padding: 26px 0; }
.section-button  { padding: 14px 0 28px; text-align: center; }

.prose { max-width: 820px; margin: 0 auto; }
.prose p { margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }
.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
.prose a:hover { color: var(--accent-dk); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--accent); }
.prose h3, .prose h4 {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--accent);
    margin: 1.4em 0 .5em;
    line-height: 1.3;
}
.prose h3 { font-size: 22px; }
.prose h4 { font-size: 18px; color: var(--ink); }
.prose strong { font-weight: 700; }
.prose blockquote {
    margin: 1.3em 0;
    padding: 14px 24px;
    border-left: 3px solid var(--accent);
    background: var(--bg-cream);
    color: var(--ink-soft);
    font-style: italic;
}

.prose table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.3em 0;
    font-size: 15px;
    background: var(--paper);
}
.prose th, .prose td {
    border-bottom: 1px solid var(--line);
    padding: 16px 18px;
    text-align: left;
    vertical-align: top;
}
.prose td:first-child {
    color: var(--accent);
    font-weight: 700;
    white-space: nowrap;
    width: 120px;
    font-feature-settings: 'tnum';
}
.prose th, .prose thead td {
    background: transparent;
    color: var(--accent);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent);
}
.prose tbody tr:hover { background: rgba(140,43,43,.04); }
.prose tbody tr:last-child td { border-bottom: 0; }

.section-image figure { margin: 0; }
.section-image img {
    display: block; width: 100%; height: auto;
    border-radius: 4px;
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
}
.section-image figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-soft); text-align: center; font-style: italic; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery-grid figure { margin: 0; }
.gallery-grid img {
    display: block; width: 100%; height: 184px; object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,.10);
    transition: transform .35s ease, box-shadow .35s ease;
}
.gallery-grid img:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.18); }

.btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent); color: #fff;
    text-decoration: none;
    font-size: 12.5px; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase;
    border-radius: 3px;
    border: 1px solid var(--accent);
    transition: background-color .25s ease, transform .2s ease, box-shadow .25s ease;
    box-shadow: 0 4px 14px rgba(140,43,43,.20);
}
.btn:hover {
    background: var(--accent-dk); border-color: var(--accent-dk);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(140,43,43,.32);
}

.divider { border: 0; border-top: 1px solid var(--line); margin: 50px 0; }

.back-home { padding: 40px 0 8px; text-align: center; }
.back-home a {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 13px;
    padding: 8px 0;
}
.back-home a:hover { text-decoration: underline; }

/* ============ Слайдер фотографий (editorial) ============ */

.section-slider {
    padding: 0;
    margin: 0;
    overflow: hidden;
    line-height: 0;
    font-size: 0;
    background: #000;
}
.slideshow {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    height: clamp(420px, 60vh, 640px);
    overflow: hidden;
    background: #000;
}
.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;       /* блюр-копия фона */
    background-position: center;
    opacity: 0;
    transition: opacity .8s ease;
    pointer-events: none;
}
.slide.active { opacity: 1; pointer-events: auto; }
.slide::before {
    content: "";
    position: absolute; inset: 0;
    backdrop-filter: blur(28px) brightness(.78);
    -webkit-backdrop-filter: blur(28px) brightness(.78);
    background: rgba(0, 0, 0, .10);
}
.slide-image {
    position: relative;
    z-index: 2;
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.slide-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto; height: auto;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.slide-caption {
    position: absolute;
    bottom: 56px; left: 56px;
    z-index: 3;
    color: #fff;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(20px, 2.6vw, 30px);
    line-height: 1.15;
    text-shadow: 0 2px 14px rgba(0,0,0,.6);
    max-width: 70%;
    pointer-events: none;
}
.slide-caption span {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .7s ease .2s, transform .7s ease .2s;
}
.slide-caption span + span { transition-delay: .35s; }
.slide.active .slide-caption span { opacity: 1; transform: none; }

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: none;
    border: 0;
    color: #fff;
    font-family: var(--serif);
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    padding: 16px 22px;
    transition: opacity .2s ease, transform .25s ease;
    opacity: .85;
    text-shadow: 0 2px 14px rgba(0,0,0,.55);
}
.slideshow-nav.left  { left: clamp(16px, 4vw, 56px); }
.slideshow-nav.right { right: clamp(16px, 4vw, 56px); }
.slideshow-nav:hover { opacity: 1; transform: translateY(-50%) scale(1.12); }
.slideshow-nav:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

.slideshow-counter {
    position: absolute;
    bottom: 32px; right: 56px;
    z-index: 10;
    color: #fff;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .18em;
    text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.slideshow-counter .cur { color: #fff; }
.slideshow-counter .tot { opacity: .65; }

/* Полноэкранный просмотр */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .94);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    padding: 40px;
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
    position: absolute; top: 22px; right: 28px;
    background: none; border: 0; color: #fff;
    font-size: 36px; cursor: pointer; line-height: 1;
}
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: none; color: #fff;
    border: 0;
    cursor: pointer;
    font-family: var(--serif); font-size: 40px;
    padding: 16px 22px;
    transition: opacity .2s ease;
    opacity: .8;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-nav.prev { left: 30px; }
.lightbox-nav.next { right: 30px; }

/* ============ Контакты ============ */

.contacts-band {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dk) 100%);
    color: #fff;
    padding: 78px 0;
    position: relative;
    overflow: hidden;
}
.contacts-band::before {
    content: "";
    position: absolute;
    top: -150px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,.07), transparent 70%);
    pointer-events: none;
}
.contacts-band::after {
    content: "";
    position: absolute;
    bottom: -200px; left: -100px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.05), transparent 70%);
    pointer-events: none;
}

.contacts-inner { position: relative; }
.contacts-head { text-align: center; margin-bottom: 40px; }
.contacts-head h2 {
    margin: 0 0 10px;
    font-family: var(--serif);
    font-weight: 700;
    font-size: clamp(28px, 3.4vw, 38px);
    color: #fff;
    line-height: 1.2;
}
.contacts-head h2::after {
    content: "";
    display: block;
    width: 54px; height: 3px;
    background: #f0d8a0;
    margin: 18px auto 0;
}
.contacts-note { margin: 0; font-size: 15px; opacity: .9; }

.contacts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 18px;
    max-width: 960px;
    margin: 0 auto;
}
.contacts-card {
    flex: 0 1 270px;
    min-width: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 24px;
    background: rgba(255, 255, 255, .08);
    border-radius: 6px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .14);
    transition: transform .3s ease, background-color .3s ease, border-color .3s ease;
}
.contacts-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .26);
}
.contacts-ico {
    display: flex;
    align-items: center; justify-content: center;
    width: 52px; height: 52px;
    background: rgba(255,255,255,.16);
    border-radius: 50%;
    margin-bottom: 14px;
}
.contacts-ico svg { width: 22px; height: 22px; color: #fff; }
.contacts-ico img { width: 28px; height: 28px; object-fit: contain; filter: brightness(0) invert(1); }
.contacts-label {
    font-size: 12px; font-weight: 600;
    letter-spacing: .18em; text-transform: uppercase;
    color: rgba(255, 255, 255, .75);
    margin-bottom: 6px;
}
.contacts-value {
    color: #fff;
    text-decoration: none;
    font-size: 19px; font-weight: 600;
    letter-spacing: .01em;
    transition: opacity .2s ease;
}
.contacts-value:hover { opacity: .85; }

/* ============ Подвал ============ */


.site-footer { background: var(--footer-bg); color: rgba(255,255,255,.7); }
.footer-grid {
    padding: 56px 0 36px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 30px;
}
.footer-brand { display: flex; align-items: center; gap: 60px; }
.footer-brand-main { display: flex; align-items: center; gap: 16px; }
.footer-coat { height: 50px; width: auto; flex: none; }
.footer-coat2 { height: 50px; width: auto; flex: none; }
.footer-brand-text {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .04em;
    line-height: 1.3;
    text-transform: uppercase;
}
.footer-brand-l1 { display: block; color: #fff; }
.footer-brand-l2 { display: block; color: rgba(255,255,255,.55); font-weight: 500; }

.footer-socials { text-align: right; }
.footer-socials-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.5);
    margin-bottom: 10px;
}
.footer-socials-list { display: flex; gap: 10px; justify-content: flex-end; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 22px 0;
}
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: rgba(255,255,255,.45);
}
.footer-bottom-inner p { margin: 0; }
.footer-year { letter-spacing: .04em; }

/* ============ Анимации появления ============ */

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.hero .reveal { transition-delay: .1s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-bg { animation: none; transform: none; }
    .slide-caption span { opacity: 1 !important; transform: none !important; }
    * { transition-duration: .01ms !important; }
}

/* ============ Мобильная версия ============ */

@media (max-width: 920px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        background: #fff;
        border-bottom: 2px solid var(--accent);
        box-shadow: 0 14px 30px rgba(0,0,0,.14);
        padding: 14px 16px 20px;
    }
    .site-nav.open { display: flex; }
    .site-nav-links { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav-links a { padding: 13px 12px; margin: 0; }
    .site-nav-links a::after { display: none; }
    .site-nav-links a:hover,
    .site-nav-links a.is-active { background: var(--accent); color: #fff; }
    .site-nav-socials { justify-content: center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); }
    .brand-coat { height: 48px; }
    .brand-text { font-size: 12px; }
    .hero--photo { min-height: 480px; }
    .hero--photo .hero-inner { justify-content: flex-start; }
    .hero-inner { padding: 56px 0; }
    .hero-card { max-width: none; padding: 0 20px; flex-direction: column; gap: 20px; }
    .hero-logo { height: 100px; max-width: 120px; }
    .prose table { display: block; overflow-x: auto; }
    .prose td:first-child { white-space: nowrap; }
    .slide-caption { bottom: 36px; left: 28px; font-size: 18px; }
    .slideshow-counter { bottom: 22px; right: 28px; font-size: 12px; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
    .brand-group { gap: 24px; }
    .footer-brand { flex-direction: column; gap: 20px; }
    .footer-socials { text-align: center; }
    .footer-socials-list { justify-content: center; }
    .footer-bottom-inner { justify-content: center; text-align: center; }
}
