:root {
    --color-bg: #f5f2e9;
    --color-surface: #ffffff;
    --color-surface-soft: #eee8dc;
    --color-primary: #183923;
    --color-primary-light: #265a37;
    --color-accent: #d3b557;
    --color-accent-dark: #b58a4a;
    --color-text: #1f241f;
    --color-muted: #687068;
    --color-border: rgba(24, 57, 35, 0.14);

    --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.08);
    --shadow-header: 0 8px 28px rgba(0, 0, 0, 0.18);
    --shadow-emblem: 0 28px 44px rgba(0, 0, 0, 0.34);

    --radius-lg: 24px;
    --radius-md: 16px;

    --container: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

main {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

body.is-nav-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--color-accent);
    color: #1f241f;
    font-weight: 800;
    transform: translateY(-140%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(24, 57, 35, 0.97);
    color: #ffffff;
    box-shadow: var(--shadow-header);
    backdrop-filter: blur(14px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.site-logo-image {
    width: 58px;
    height: 58px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.24));
}

.site-logo-content {
    display: grid;
    gap: 2px;
}

.site-logo-title {
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-transform: uppercase;
}

.site-logo-subtitle {
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-weight: 700;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    font-size: 15px;
    font-weight: 700;
}

.site-nav a {
    position: relative;
    color: rgba(255, 255, 255, 0.88);
    transition:
        color 0.2s ease,
        opacity 0.2s ease,
        text-shadow 0.2s ease;
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    background: var(--color-accent);
    content: "";
    opacity: 0;
    transform: scaleX(0.4);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus {
    color: #ffffff;
}

.site-nav a:hover::after,
.site-nav a:focus::after {
    opacity: 1;
    transform: scaleX(1);
}

.site-nav a.is-active {
    color: #ffffff;
    text-shadow: 0 0 18px rgba(211, 181, 87, 0.34);
}

.site-nav a.is-active::after {
    opacity: 1;
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 12px;
    background: transparent;
    color: #ffffff;
}

.nav-toggle-line {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 82% 12%,
            rgba(211, 181, 87, 0.32),
            transparent 30%
        ),
        linear-gradient(
            120deg,
            rgba(24, 57, 35, 0.98),
            rgba(24, 57, 35, 0.8)
        );
    color: #ffffff;
}

.hero::after {
    position: absolute;
    inset: auto -8% -26% auto;
    z-index: -1;
    width: 420px;
    height: 420px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
}

.hero-inner {
    display: grid;
    min-height: 580px;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 56px;
    align-items: center;
}

.hero-content {
    max-width: 760px;
    padding: 88px 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--color-accent);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
}

.hero-lead {
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--color-accent);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 900;
}

.hero-text {
    max-width: 620px;
    margin: 24px 0 34px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 20px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-emblem {
    display: flex;
    justify-content: center;
}

.hero-emblem img {
    width: min(100%, 360px);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(var(--shadow-emblem));
}

.button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.button:hover,
.button:focus {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--color-accent);
    color: #1f241f;
}

.button-secondary {
    border-color: rgba(255, 255, 255, 0.38);
    color: #ffffff;
}

.button-secondary:hover,
.button-secondary:focus {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.section {
    padding: 82px 0;
}

.section-light {
    background: var(--color-bg);
}

.section-muted {
    background: var(--color-surface-soft);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 34px;
}

.section-heading h2,
.info-layout h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.14;
}

.section-heading p:last-child {
    margin: 16px 0 0;
    color: var(--color-muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 24px;
    align-items: stretch;
}

.news-card {
    width: 100%;
    min-height: 260px;
    padding: 28px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

@media (min-width: 901px) {
    .cards-grid:has(.news-card:only-child) {
        grid-template-columns: minmax(320px, 520px);
    }
}

.card-date {
    margin: 0 0 14px;
    color: var(--color-accent-dark);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.news-card h3 {
    margin: 0 0 14px;
    color: var(--color-primary);
    font-size: 23px;
    line-height: 1.22;
}

.news-card p:last-child {
    margin: 0;
    color: var(--color-muted);
}

.info-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 48px;
    align-items: start;
}

.info-content {
    padding: 30px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.62);
}

.info-content p {
    margin: 0;
    color: var(--color-muted);
    font-size: 18px;
}

.site-footer {
    flex-shrink: 0;
    padding: 36px 0;
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.footer-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.footer-title {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.footer-text,
.footer-copy {
    margin: 0;
}

.footer-text {
    max-width: 520px;
}

@media (min-width: 901px) {
    .cards-grid:has(.news-card:only-child) {
        grid-template-columns: minmax(320px, 520px);
    }
}

@media (max-width: 980px) {
    .site-nav {
        gap: 14px;
        font-size: 14px;
    }
}

@media (max-width: 900px) {
    .hero-inner {
        min-height: auto;
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-content {
        padding: 72px 0 0;
    }

    .hero-emblem {
        justify-content: flex-start;
        padding-bottom: 56px;
    }

    .hero-emblem img {
        width: 180px;
    }

    .info-layout {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 72px;
    }

    .site-logo-subtitle {
        display: none;
    }

    .site-logo-image {
        width: 48px;
        height: 48px;
    }

    .site-logo-title {
        font-size: 15px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        top: 72px;
        right: 0;
        left: 0;
        display: grid;
        justify-content: stretch;
        gap: 0;
        padding: 12px 16px 20px;
        background: rgba(24, 57, 35, 0.99);
        box-shadow: var(--shadow-header);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-10px);
        transition:
            opacity 0.2s ease,
            transform 0.2s ease;
    }

    .site-nav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a {
        padding: 14px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    .site-nav a::after {
        display: none;
    }

    .section {
        padding: 58px 0;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(var(--container), calc(100% - 24px));
    }

    .button {
        width: 100%;
    }

    .site-logo-title {
        max-width: 170px;
    }

    .news-card,
    .info-content {
        padding: 22px;
        border-radius: var(--radius-md);
    }
}

.news-card-image {
    width: 100%;
    height: 190px;
    margin: -6px 0 18px;
    border-radius: 18px;
    object-fit: cover;
}

.card-link {
    display: inline-flex;
    margin-top: 18px;
    color: var(--color-primary);
    font-weight: 900;
}

.card-link:hover,
.card-link:focus {
    color: var(--color-accent-dark);
}

.page-hero {
    padding: 76px 0;
    background:
        linear-gradient(
            120deg,
            rgba(24, 57, 35, 0.98),
            rgba(24, 57, 35, 0.82)
        );
    color: #ffffff;
}

.page-hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.05;
}

.page-hero p:last-child {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 34px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.empty-state h2 {
    margin: 0 0 10px;
    color: var(--color-primary);
}

.empty-state p {
    margin: 0;
    color: var(--color-muted);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 38px;
    font-weight: 800;
}

.pagination a {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
}

.article-page {
    background: var(--color-bg);
}

.article-header {
    padding: 76px 0 46px;
    background:
        linear-gradient(
            120deg,
            rgba(24, 57, 35, 0.98),
            rgba(24, 57, 35, 0.82)
        );
    color: #ffffff;
}

.article-header h1 {
    max-width: 880px;
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.article-header p:last-child {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
}

.article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 28px auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    cursor: zoom-in;
}

.article-gallery {
    padding: 28px 0 86px;
}

.gallery-slider {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    gap: 18px;
    align-items: center;
}

.gallery-stage {
    min-width: 0;
}

.gallery-slide {
    display: none;
    margin: 0;
}

.gallery-slide.is-active {
    display: block;
}

.gallery-image {
    width: 100%;
    max-height: 620px;
    border-radius: var(--radius-lg);
    object-fit: contain;
    background: rgba(24, 57, 35, 0.08);
    box-shadow: var(--shadow-soft);
    cursor: zoom-in;
}

.gallery-caption {
    max-width: 820px;
    margin: 16px auto 0;
    color: var(--color-muted);
    font-size: 15px;
    text-align: center;
}

.gallery-arrow {
    display: inline-flex;
    width: 56px;
    height: 72px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 18px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 52px;
    line-height: 1;
    box-shadow: var(--shadow-soft);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus {
    background: var(--color-primary-light);
    transform: translateY(-1px);
}

.gallery-actions {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.gallery-counter {
    min-width: 64px;
    color: var(--color-muted);
    font-weight: 800;
    text-align: center;
}

.gallery-open,
.gallery-download {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
}

.gallery-download {
    background: var(--color-accent);
    color: #1f241f;
}

.gallery-open:hover,
.gallery-open:focus,
.gallery-download:hover,
.gallery-download:focus {
    transform: translateY(-1px);
}

body.is-lightbox-open {
    overflow: hidden;
}

.image-viewer {
    display: none !important;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 78px 92px 44px;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-figure {
    display: grid;
    max-width: min(1180px, 100%);
    max-height: 100%;
    justify-items: center;
    gap: 14px;
    margin: 0;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 210px);
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.04);
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    text-align: center;
}

.lightbox-download {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border-radius: 999px;
    background: var(--color-accent);
    color: #1f241f;
    font-weight: 900;
    text-decoration: none;
}

.lightbox-close,
.lightbox-arrow {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus,
.lightbox-arrow:hover,
.lightbox-arrow:focus {
    background: rgba(255, 255, 255, 0.24);
}

.lightbox-close {
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 1;
}

.lightbox-arrow {
    top: 50%;
    width: 58px;
    height: 78px;
    border-radius: 18px;
    font-size: 56px;
    line-height: 1;
    transform: translateY(-50%);
}

.lightbox-arrow-prev {
    left: 24px;
}

.lightbox-arrow-next {
    right: 24px;
}

@media (max-width: 900px) {
    .gallery-slider {
        grid-template-columns: 52px minmax(0, 1fr) 52px;
        gap: 12px;
    }

    .gallery-arrow {
        width: 48px;
        height: 62px;
        border-radius: 16px;
        font-size: 44px;
    }
}

@media (max-width: 760px) {
    .gallery-slider {
        grid-template-columns: 1fr;
    }

    .gallery-arrow {
        position: absolute;
        top: 50%;
        z-index: 5;
        width: 44px;
        height: 52px;
        border-radius: 14px;
        font-size: 38px;
        transform: translateY(-50%);
    }

    .gallery-arrow:hover,
    .gallery-arrow:focus {
        transform: translateY(-50%);
    }

    .gallery-arrow-prev {
        left: 10px;
    }

    .gallery-arrow-next {
        right: 10px;
    }

    .gallery-image {
        max-height: 420px;
    }

    .gallery-actions {
        grid-column: 1;
    }

    .gallery-open,
    .gallery-download {
        width: 100%;
    }

    .lightbox {
        padding: 72px 14px 32px;
    }

    .lightbox-image {
        max-height: calc(100vh - 220px);
    }

    .lightbox-arrow {
        top: auto;
        bottom: 24px;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        font-size: 38px;
        transform: none;
    }

    .lightbox-arrow-prev {
        left: 22px;
    }

    .lightbox-arrow-next {
        right: 22px;
    }

    .lightbox-download {
        margin-bottom: 58px;
    }
}

.article-image {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    background: rgba(24, 57, 35, 0.06);
}

.article-content {
    overflow-wrap: break-word;
}

.article-content img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 720px;
    height: auto;
    margin: 28px auto;
    border-radius: var(--radius-md);
    object-fit: contain;
    box-shadow: var(--shadow-soft);
    cursor: zoom-in;
}

.gallery-image {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
    background: rgba(24, 57, 35, 0.08);
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 210px);
    object-fit: contain;
}

@media (max-width: 760px) {
    .article-image {
        max-height: 420px;
    }

    .article-content img {
        max-height: 430px;
        border-radius: 14px;
    }

    .gallery-image {
        max-height: 420px;
    }

    .lightbox-image {
        max-height: calc(100vh - 220px);
    }
}

@media (max-width: 420px) {
    .article-image,
    .article-content img,
    .gallery-image {
        max-height: 360px;
    }
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.archive-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.archive-card-image {
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.archive-card-placeholder {
    display: flex;
    height: 230px;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(
            120deg,
            var(--color-primary),
            var(--color-primary-light)
        );
    color: var(--color-accent);
    font-size: 62px;
    font-weight: 900;
}

.archive-card-content {
    padding: 24px;
}

.archive-card-content h2 {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: 24px;
    line-height: 1.2;
}

.archive-card-content p {
    color: var(--color-muted);
}

.archive-place {
    margin: 0 0 12px;
    color: var(--color-primary) !important;
    font-weight: 800;
}

@media (max-width: 900px) {
    .archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }

    .archive-card-image,
    .archive-card-placeholder {
        height: 210px;
    }
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: start;
}

.about-main {
    display: grid;
    gap: 22px;
}

.about-block,
.details-card,
.about-actions-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.about-block {
    padding: 30px;
}

.about-block h2,
.details-card h2,
.about-actions-card h2 {
    margin: 0 0 16px;
    color: var(--color-primary);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.16;
}

.about-block p {
    margin: 0 0 16px;
    color: var(--color-muted);
    font-size: 17px;
}

.about-block p:last-child {
    margin-bottom: 0;
}

.about-sidebar {
    position: sticky;
    top: 106px;
    display: grid;
    gap: 22px;
}

.details-card,
.about-actions-card {
    padding: 24px;
}

.details-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

.details-list div {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.details-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.details-list dt {
    margin: 0 0 4px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.details-list dd {
    margin: 0;
    color: var(--color-text);
    font-weight: 700;
    line-height: 1.45;
}

.about-actions-card p {
    margin: 0 0 18px;
    color: var(--color-muted);
}

.about-actions {
    display: grid;
    gap: 12px;
}

.button-secondary-dark {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.button-secondary-dark:hover,
.button-secondary-dark:focus {
    background: var(--color-primary);
    color: #ffffff;
}

@media (max-width: 980px) {
    .about-layout {
        grid-template-columns: 1fr;
    }

    .about-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .about-block,
    .details-card,
    .about-actions-card {
        padding: 22px;
    }
}

/* =========================================================
   History page
   ========================================================= */

.history-hero {
    overflow: hidden;
    background:
        radial-gradient(
            circle at 82% 10%,
            rgba(181, 138, 74, 0.34),
            transparent 28%
        ),
        linear-gradient(
            120deg,
            rgba(24, 57, 35, 0.98),
            rgba(24, 57, 35, 0.82)
        );
    color: #ffffff;
}

.history-hero-inner {
    display: grid;
    min-height: 420px;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 42px;
    align-items: center;
    padding: 58px 0;
}

.history-hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
}

.history-hero-content p {
    max-width: 680px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(18px, 2vw, 22px);
}

.history-hero-image {
    display: flex;
    min-height: 320px;
    align-items: center;
    justify-content: center;
}

.history-hero-image img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.3));
}

.history-page {
    display: grid;
    gap: 34px;
}

.history-block,
.history-feature,
.history-founders,
.history-directions,
.history-final,
.history-wide-image {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.history-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
    gap: 30px;
    align-items: center;
    padding: 34px;
}

.history-block-text {
    grid-template-columns: minmax(0, 1fr);
}

.history-block-reverse {
    grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1fr);
}

.history-block-reverse .history-text {
    order: 2;
}

.history-block-reverse .history-image {
    order: 1;
}

.history-block-accent {
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.96),
            rgba(238, 232, 220, 0.72)
        );
}

.history-text h2,
.history-feature-content h2,
.history-founders h2,
.history-directions h2,
.history-final h2 {
    margin: 0 0 18px;
    color: var(--color-primary);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.14;
}

.history-text p,
.history-feature-content p,
.history-final p {
    margin: 0 0 16px;
    color: var(--color-muted);
    font-size: 17px;
}

.history-text p:last-child,
.history-feature-content p:last-child,
.history-final p:last-child {
    margin-bottom: 0;
}

.history-image,
.history-feature-image,
.history-photo-pair figure,
.history-gallery figure,
.history-card img,
.history-final figure {
    overflow: hidden;
    margin: 0;
    border-radius: var(--radius-md);
    background: var(--color-surface-soft);
}

.history-image {
    display: flex;
    min-height: 330px;
    align-items: center;
    justify-content: center;
}

.history-image img {
    width: 100%;
    max-height: 440px;
    object-fit: contain;
}

.history-image-symbol {
    padding: 18px;
    background: var(--color-primary);
}

.history-image-symbol img {
    max-height: 300px;
}

.history-image-portrait {
    min-height: 330px;
}

.history-image-portrait img {
    max-height: 460px;
    object-fit: contain;
}

.history-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.84fr);
    gap: 0;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

.history-feature-image {
    display: flex;
    min-height: 560px;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.history-feature-image img {
    width: 100%;
    max-height: 620px;
    object-fit: contain;
}

.history-feature-content {
    padding: 34px;
}

.history-feature-split {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 30px;
    padding: 34px;
}

.history-feature-split .history-feature-content {
    padding: 0;
}

.history-feature-large {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.78fr);
}

.history-feature-image-large {
    min-height: 580px;
}

.history-feature-image-large img {
    max-height: 640px;
}

.history-photo-pair {
    display: grid;
    gap: 18px;
}

.history-photo-pair figure {
    display: flex;
    min-height: 360px;
    align-items: center;
    justify-content: center;
    padding: 14px;
}

.history-photo-pair img {
    width: 100%;
    max-height: 440px;
    object-fit: contain;
}

.history-founders,
.history-directions,
.history-final {
    padding: 34px;
}

.founders-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.founder-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
}

.founder-card figure {
    display: flex;
    height: 300px;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: var(--color-surface-soft);
}

.founder-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.founder-card div {
    padding: 22px;
}

.founder-card h3,
.history-card h3 {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: 22px;
    line-height: 1.22;
}

.founder-card p,
.history-card p {
    margin: 0;
    color: var(--color-muted);
}

.history-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.history-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
}

.history-card img {
    width: 100%;
    height: clamp(380px, 34vw, 500px);
    padding: 10px;
    object-fit: contain;
    background: var(--color-surface-soft);
}

.history-card div {
    padding: 26px;
}

.history-card h3 {
    font-size: 24px;
}

.history-gallery {
    display: grid;
    gap: 22px;
}

.history-gallery-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-gallery-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.history-gallery figure {
    display: flex;
    min-height: 420px;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.history-gallery img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

/* Блок: сверху одно фото, снизу два фото в одной строке */
.history-gallery-focus {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-gallery-focus .history-gallery-main {
    grid-column: 1 / -1;
}

.history-gallery-focus .history-gallery-side {
    grid-column: auto;
}

.history-gallery-focus figure {
    min-height: 440px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.history-gallery-focus img {
    width: 100%;
    max-height: 560px;
    object-fit: contain;
}

/* Блок со штабом: три фото средне-крупно */
.history-gallery-headquarters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-gallery-headquarters figure:first-child {
    grid-column: 1 / -1;
}

.history-gallery-headquarters figure {
    min-height: 560px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.history-gallery-headquarters img {
    width: 100%;
    max-height: 700px;
    object-fit: contain;
}

.history-wide-image {
    overflow: hidden;
    margin: 0;
    padding: 28px;
    text-align: center;
}

.history-wide-image img {
    width: 100%;
    max-height: 780px;
    object-fit: contain;
}

.history-wide-image-large img {
    max-height: 920px;
}

.history-wide-image-reconstruction img {
    max-height: 520px;
}

.history-final {
    background:
        linear-gradient(
            135deg,
            rgba(24, 57, 35, 0.96),
            rgba(24, 57, 35, 0.84)
        );
    color: #ffffff;
}

.history-final-content {
    display: grid;
    grid-template-columns: minmax(0, 0.62fr) minmax(460px, 1.38fr);
    gap: 30px;
    align-items: center;
}

.history-final h2 {
    color: #ffffff;
}

.history-final p {
    color: rgba(255, 255, 255, 0.84);
}

.history-final figure {
    display: flex;
    min-height: 680px;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.history-final img {
    width: 100%;
    max-height: 840px;
    object-fit: contain;
}

.history-final-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 26px;
}

.history-about-button {
    border-color: rgba(255, 255, 255, 0.658);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.history-about-button:hover,
.history-about-button:focus {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #1f241f;
}

@media (max-width: 980px) {
    .history-hero-inner,
    .history-block,
    .history-block-reverse,
    .history-feature,
    .history-feature-split,
    .history-feature-large,
    .history-final-content,
    .history-gallery-focus,
    .history-gallery-headquarters {
        grid-template-columns: 1fr;
    }

    .history-block-reverse .history-text,
    .history-block-reverse .history-image {
        order: initial;
    }

    .history-gallery-focus .history-gallery-main,
    .history-gallery-headquarters figure:first-child {
        grid-column: auto;
    }

    .history-feature-content,
    .history-feature-split .history-feature-content {
        padding: 30px;
    }

    .founders-grid,
    .history-card-grid,
    .history-gallery-two,
    .history-gallery-three {
        grid-template-columns: 1fr;
    }

    .history-card img,
    .history-gallery img,
    .history-gallery-focus img,
    .history-gallery-headquarters img,
    .history-feature-image img,
    .history-feature-image-large img,
    .history-photo-pair img,
    .history-final img,
    .history-wide-image img {
        max-height: 620px;
    }

    .history-gallery figure,
    .history-gallery-focus figure,
    .history-gallery-headquarters figure,
    .history-feature-image,
    .history-feature-image-large,
    .history-photo-pair figure,
    .history-final figure {
        min-height: auto;
    }
}

@media (max-width: 760px) {
    .history-hero-inner {
        min-height: auto;
        padding: 46px 0;
    }

    .history-hero-image {
        min-height: 220px;
    }

    .history-hero-image img {
        max-height: 220px;
    }

    .history-block,
    .history-feature-split,
    .history-founders,
    .history-directions,
    .history-final,
    .history-wide-image {
        padding: 24px;
    }

    .history-feature {
        padding: 0;
    }

    .history-feature-content {
        padding: 24px;
    }

    .history-card img,
    .history-gallery img,
    .history-gallery-focus img,
    .history-gallery-headquarters img,
    .history-feature-image img,
    .history-feature-image-large img,
    .history-photo-pair img,
    .history-final img,
    .history-wide-image img {
        max-height: 520px;
    }

    .history-card img {
        height: auto;
    }

    .history-gallery figure,
    .history-gallery-focus figure,
    .history-gallery-headquarters figure,
    .history-wide-image,
    .history-final figure {
        padding: 14px;
    }

    .founder-card figure {
        height: 260px;
    }

    .history-card div {
        padding: 22px;
    }
}

@media (max-width: 420px) {
    .history-block,
    .history-feature-split,
    .history-founders,
    .history-directions,
    .history-final,
    .history-wide-image {
        padding: 20px;
    }

    .history-feature {
        padding: 0;
    }

    .history-feature-content {
        padding: 20px;
    }

    .history-card img,
    .history-gallery img,
    .history-gallery-focus img,
    .history-gallery-headquarters img,
    .history-feature-image img,
    .history-feature-image-large img,
    .history-photo-pair img,
    .history-final img,
    .history-wide-image img {
        max-height: 430px;
    }
}

/* =========================================================
   Feedback page
   ========================================================= */

.feedback-page {
    max-width: 1120px;
}

.feedback-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 34px;
    align-items: stretch;
}

.feedback-content,
.feedback-contact-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.feedback-content {
    padding: 36px;
}

.feedback-content h2,
.feedback-contact-card h2 {
    margin: 0 0 18px;
    color: var(--color-primary);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.14;
}

.feedback-content p {
    max-width: 760px;
    margin: 0 0 18px;
    color: var(--color-muted);
    font-size: 18px;
}

.feedback-content p:last-child {
    margin-bottom: 0;
}

.feedback-contact-card {
    display: flex;
    flex-direction: column;
    padding: 28px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.98),
            rgba(238, 232, 220, 0.74)
        );
}

.feedback-contact-card h2 {
    font-size: clamp(24px, 3vw, 32px);
}

.feedback-contact-list {
    display: grid;
    gap: 18px;
    margin: 8px 0 26px;
}

.feedback-contact-item {
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
}

.feedback-contact-label {
    display: block;
    margin-bottom: 10px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.feedback-contact-item strong {
    display: block;
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    word-break: break-word;
}

.feedback-email-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.feedback-email-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(24, 57, 35, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    word-break: break-word;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.feedback-email-link:hover,
.feedback-email-link:focus {
    border-color: var(--color-accent-dark);
    color: var(--color-accent-dark);
    transform: translateY(-1px);
}

.feedback-email-link.is-copied {
    border-color: var(--color-accent-dark);
    background: var(--color-accent);
    color: #1f241f;
}

.feedback-copy-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    background: transparent;
    color: var(--color-primary);
    font-weight: 900;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.feedback-copy-button:hover,
.feedback-copy-button:focus {
    background: var(--color-primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.feedback-copy-button.is-copied {
    border-color: var(--color-accent-dark);
    background: var(--color-accent);
    color: #1f241f;
}

.feedback-copy-status {
    min-height: 22px;
    margin: 10px 0 0;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 800;
}

.feedback-mail-button {
    width: 100%;
    margin-top: auto;
}

.feedback-email-link:disabled,
.feedback-copy-button:disabled,
.feedback-mail-button.is-disabled {
    cursor: not-allowed;
    opacity: 0.72;
    transform: none;
    pointer-events: none;
}

.feedback-email-link:disabled:hover,
.feedback-email-link:disabled:focus,
.feedback-copy-button:disabled:hover,
.feedback-copy-button:disabled:focus,
.feedback-mail-button.is-disabled:hover,
.feedback-mail-button.is-disabled:focus {
    transform: none;
}

@media (max-width: 980px) {
    .feedback-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .feedback-content,
    .feedback-contact-card {
        padding: 24px;
    }

    .feedback-content p {
        font-size: 17px;
    }
}

@media (max-width: 420px) {
    .feedback-content,
    .feedback-contact-card {
        padding: 20px;
    }

    .feedback-contact-item {
        padding: 16px;
    }

    .feedback-email-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .feedback-email-link,
    .feedback-copy-button {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   Home headquarters block
   ========================================================= */

.home-headquarters {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.75fr);
    gap: 34px;
    align-items: stretch;
}

.home-headquarters-content,
.home-headquarters-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.home-headquarters-content {
    position: relative;
    overflow: hidden;
    padding: 38px;
    background:
        radial-gradient(
            circle at 88% 18%,
            rgba(211, 181, 87, 0.18),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.98),
            rgba(238, 232, 220, 0.72)
        );
}

.home-headquarters-content::after {
    position: absolute;
    right: -70px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border: 1px solid rgba(24, 57, 35, 0.1);
    border-radius: 50%;
    content: "";
}

.home-headquarters-content h2 {
    position: relative;
    margin: 0;
    color: var(--color-primary);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.14;
}

.home-headquarters-content p {
    position: relative;
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 18px;
}

.home-headquarters-card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    background:
        linear-gradient(
            135deg,
            rgba(24, 57, 35, 0.98),
            rgba(24, 57, 35, 0.86)
        );
    color: #ffffff;
}

.home-headquarters-card .home-headquarters-label {
    display: block;
    margin-bottom: 12px;
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-headquarters-card strong {
    display: block;
    margin-bottom: 16px;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
}

.home-headquarters-card p {
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
}

.home-map-actions {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.home-map-button {
    display: inline-flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 900;
    text-align: center;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.home-map-button:hover,
.home-map-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.home-map-button-yandex {
    background: var(--color-accent);
    color: #1f241f;
}

.home-map-button-2gis {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.home-map-button-2gis:hover,
.home-map-button-2gis:focus {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.14);
}

.home-map-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    object-fit: contain;
}

.home-map-button-yandex .home-map-icon {
    width: 35px;
    height: 35px;
}

@media (max-width: 980px) {
    .home-headquarters {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .home-headquarters-content,
    .home-headquarters-card {
        padding: 24px;
    }

    .home-map-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .home-headquarters-content,
    .home-headquarters-card {
        padding: 20px;
    }

    .home-map-button {
        min-height: 52px;
        padding: 0 18px;
    }
}

/* =========================================================
   Scroll to top button
   ========================================================= */

.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(211, 181, 87, 0.7);
    border-radius: 50%;
    background:
        linear-gradient(
            135deg,
            var(--color-accent),
            var(--color-accent-dark)
        );
    color: #1f241f;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px) scale(0.94);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.scroll-top:hover,
.scroll-top:focus {
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
    transform: translateY(-2px) scale(1.03);
}

.scroll-top:active {
    transform: translateY(0) scale(0.98);
}

@media (max-width: 760px) {
    .scroll-top {
        right: 16px;
        bottom: 18px;
        width: 46px;
        height: 46px;
        font-size: 24px;
    }
}

@media (max-width: 420px) {
    .scroll-top {
        right: 14px;
        bottom: 14px;
        width: 44px;
        height: 44px;
        font-size: 23px;
    }
}

/* =========================================================
   Advertisement blocks
   ========================================================= */

.ads-block {
    margin-top: 34px;
}

.ads-grid {
    display: grid;
    gap: 22px;
}

.ads-grid-count-1 {
    grid-template-columns: minmax(0, 1fr);
}

.ads-grid-count-2,
.ads-grid-count-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ad-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.ad-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px 0;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ad-media-link {
    display: block;
}

.ad-media {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 5;
    object-fit: cover;
    background: var(--color-surface-soft);
}

.ad-card video.ad-media {
    height: auto;
}

.ad-video-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 14px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--color-accent);
    color: #1f241f;
    font-weight: 900;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 14px 14px;
    color: var(--color-muted);
    font-size: 12px;
}

@media (min-width: 981px) {
    .ads-grid-count-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ads-block {
        margin-top: 28px;
    }

    .ads-grid-count-1,
    .ads-grid-count-2,
    .ads-grid-count-3 {
        grid-template-columns: 1fr;
    }

    .ad-media {
        aspect-ratio: 16 / 7;
    }
}

/* =========================================================
   Advertisement blocks
   ========================================================= */

.ads-block {
    margin-top: 34px;
}

.ads-grid {
    display: grid;
    gap: 22px;
}

.ads-grid-count-1 {
    grid-template-columns: minmax(0, 1fr);
}

.ads-grid-count-2,
.ads-grid-count-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid > .ads-block,
.archive-grid > .ads-block {
    grid-column: 1 / -1;
    margin-top: 8px;
    margin-bottom: 8px;
}

.ad-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.ad-label {
    display: flex;
    min-height: 30px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px 6px;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ad-label-overlay {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 3;
    color: rgba(255, 255, 255, 0.9);
    pointer-events: none;
}

.ad-media-link {
    display: block;
}

.ad-media {
    display: block;
    width: 100%;
    max-height: 360px;
    aspect-ratio: 16 / 5;
    object-fit: contain;
    background:
        linear-gradient(
            135deg,
            rgba(238, 232, 220, 0.72),
            rgba(255, 255, 255, 0.94)
        );
}

.ad-video-wrap {
    position: relative;
    overflow: hidden;
    background: #000000;
}

.ad-video {
    cursor: default;
}

.ad-card video.ad-media {
    height: auto;
    background: #000000;
}

.ad-video-wrap::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    height: 48%;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.56),
            rgba(0, 0, 0, 0)
        );
    content: "";
    pointer-events: none;
}

.ad-sound-button {
    position: absolute;
    top: 36px;
    left: 12px;
    z-index: 4;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.52);
    color: #ffffff;
    font-size: 16px;
    line-height: 1;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.ad-sound-button:hover,
.ad-sound-button:focus {
    background: rgba(0, 0, 0, 0.76);
    transform: translateY(-1px);
}

.ad-overlay-link {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 4;
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 8px;
    background: rgba(211, 181, 87, 0.95);
    color: #1f241f;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.ad-overlay-link:hover,
.ad-overlay-link:focus {
    background: var(--color-accent);
    transform: translateY(-1px);
}

.ad-video-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin: 14px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--color-accent);
    color: #1f241f;
    font-weight: 900;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.ad-video-link:hover,
.ad-video-link:focus {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 10px 14px 14px;
    color: var(--color-muted);
    font-size: 12px;
}

@media (min-width: 981px) {
    .ads-grid-count-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ads-block {
        margin-top: 28px;
    }

    .ads-grid-count-1,
    .ads-grid-count-2,
    .ads-grid-count-3 {
        grid-template-columns: 1fr;
    }

    .ad-media {
        max-height: 320px;
        aspect-ratio: 16 / 7;
    }
}

@media (max-width: 420px) {
    .ad-label {
        padding: 8px 12px 6px;
    }

    .ad-media {
        max-height: 260px;
        aspect-ratio: 16 / 8;
    }

    .ad-sound-button {
        top: 34px;
        left: 10px;
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .ad-overlay-link {
        right: 10px;
        bottom: 10px;
        left: 10px;
        min-height: 34px;
        border-radius: 8px;
        font-size: 13px;
    }
}

/* =========================================================
   Yandex ad blocks
   ========================================================= */

.yandex-ads-block {
    grid-column: 1 / -1;
    margin-top: 10px;
    margin-bottom: 10px;
}

.yandex-ad-card {
    overflow: hidden;
    min-height: 120px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

@media (max-width: 760px) {
    .yandex-ad-card {
        min-height: 100px;
        border-radius: var(--radius-md);
    }
}

/* =========================================================
   Partners block
   ========================================================= */

.partners-section {
    margin-top: 42px;
}

.partners-heading {
    max-width: 780px;
    margin-bottom: 24px;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.partner-card {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.partner-card:hover,
.partner-card:focus {
    border-color: rgba(211, 181, 87, 0.75);
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
}

.partner-logo-wrap {
    display: flex;
    width: 126px;
    height: 104px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid rgba(24, 57, 35, 0.12);
    border-radius: 20px;
    background: #ffffff;
}

.partner-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.partner-title {
    max-width: 280px;
    color: var(--color-primary);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
}

.partner-description {
    max-width: 260px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 980px) {
    .partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .partners-grid {
        grid-template-columns: 1fr;
    }

    .partner-card {
        min-height: 190px;
        padding: 22px;
    }

    .partner-logo-wrap {
        width: 112px;
        height: 96px;
    }

    .partner-title {
        font-size: 17px;
    }
}

/* =========================================================
   News videos
   ========================================================= */

.news-video-section {
    margin-top: 34px;
    margin-bottom: 72px;
}

.news-video-grid {
    display: grid;
    gap: 24px;
}

.news-video-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.news-video-player {
    display: block;
    width: 100%;
    max-height: 560px;
    background: #000000;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.news-video-caption {
    margin: 0;
    padding: 16px 20px 20px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .news-video-section {
        margin-top: 28px;
        margin-bottom: 52px;
    }

    .news-video-player {
        max-height: 360px;
    }
}

/* =========================================================
   Official social channels
   ========================================================= */

.feedback-social-block {
    margin-top: 34px;
    padding-top: 26px;
    border-top: 1px solid var(--color-border);
}

.feedback-social-block h3 {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: 24px;
    line-height: 1.2;
}

.feedback-social-block p {
    max-width: 620px;
    margin-bottom: 18px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link,
.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface);
    color: var(--color-primary);
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.social-link:hover,
.social-link:focus,
.footer-social-link:hover,
.footer-social-link:focus {
    border-color: rgba(211, 181, 87, 0.75);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.10);
}

.social-link img,
.footer-social-link img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.footer-social-link {
    min-height: 38px;
    padding: 8px 14px;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.footer-social-link img {
    width: 22px;
    height: 22px;
}

@media (max-width: 560px) {
    .social-links {
        flex-direction: column;
        align-items: stretch;
    }

    .social-link {
        width: 100%;
    }

    .footer-social {
        align-items: flex-start;
    }
}

/* =========================================================
   Error pages
   ========================================================= */

.empty-state {
    max-width: 760px;
    margin: 0 auto;
    padding: 42px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 14px;
    color: var(--color-primary);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.empty-state p {
    margin: 0 auto 24px;
    max-width: 560px;
    color: var(--color-muted);
    font-size: 17px;
    line-height: 1.65;
}

.empty-state .about-actions {
    justify-content: center;
}

@media (max-width: 560px) {
    .empty-state {
        padding: 28px 20px;
    }

    .empty-state .about-actions {
        align-items: stretch;
    }

    .empty-state .button {
        width: 100%;
    }
}
