:root {
    --bg: #f8f4ee;
    --bg-soft: #fffaf3;
    --text: #221b18;
    --muted: #756b64;
    --primary: #8f3d2b;
    --primary-dark: #6c2c20;
    --accent: #dcae6f;
    --card: #ffffff;
    --line: rgba(34, 27, 24, 0.12);
    --shadow: 0 18px 45px rgba(64, 37, 25, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(248, 244, 238, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(143, 61, 43, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-dark);
    background: rgba(220, 174, 111, 0.22);
}

.menu-btn {
    display: none;
    border: 0;
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
}

.hero {
    padding: 86px 0 70px;
    background:
        radial-gradient(circle at top left, rgba(220, 174, 111, 0.38), transparent 34%),
        radial-gradient(circle at bottom right, rgba(143, 61, 43, 0.18), transparent 36%);
}

.hero-grid,
.about-grid,
.contact-grid,
.ticket-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 44px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.96;
    letter-spacing: -3px;
    margin-bottom: 24px;
}

h2 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
    letter-spacing: -1.6px;
    margin-bottom: 16px;
}

h3 {
    font-size: 24px;
    line-height: 1.15;
    margin-bottom: 10px;
}

.hero-text,
.section-heading p,
.page-hero p,
.about-grid p,
.cta p {
    color: var(--muted);
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn.primary {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 14px 30px rgba(143, 61, 43, 0.22);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn.secondary {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.6);
}

.btn.secondary:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.hero-card {
    position: relative;
    padding: 18px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 34px;
    box-shadow: var(--shadow);
}

.hero-card img {
    width: 100%;
    border-radius: 26px;
}

.hero-card-info {
    position: absolute;
    left: 38px;
    right: 38px;
    bottom: 38px;
    padding: 18px;
    border-radius: 20px;
    color: #fff;
    background: rgba(34, 27, 24, 0.76);
    backdrop-filter: blur(12px);
}

.hero-card-info span,
.hero-card-info strong {
    display: block;
}

.hero-card-info strong {
    font-size: 24px;
}

.section {
    padding: 78px 0;
}

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

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

.cards.exhibitions-list {
    grid-template-columns: repeat(2, 1fr);
}

.event-card,
.price-card,
.contact-card,
.map-card,
.ticket-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 14px 35px rgba(64, 37, 25, 0.08);
}

.event-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

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

.card-body,
.price-card,
.contact-card,
.ticket-form {
    padding: 24px;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

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

.card-meta {
    margin-top: auto;
    color: var(--primary-dark);
    font-weight: 800;
}

.tag {
    align-self: flex-start;
    display: inline-flex;
    padding: 6px 11px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: rgba(220, 174, 111, 0.24);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

.about-band {
    padding: 76px 0;
    background: var(--text);
    color: #fff;
}

.about-band .eyebrow {
    color: var(--accent);
}

.about-band p {
    color: rgba(255, 255, 255, 0.72);
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.feature-item {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
}

.feature-item strong {
    display: block;
    font-size: 36px;
    line-height: 1;
    color: var(--accent);
}

.feature-item span {
    color: rgba(255, 255, 255, 0.78);
}

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 36px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(220, 174, 111, 0.26), rgba(143, 61, 43, 0.12));
    border: 1px solid var(--line);
}

.cta h2 {
    margin-bottom: 8px;
}

.page-hero {
    padding: 76px 0;
    background:
        linear-gradient(135deg, rgba(143, 61, 43, 0.12), rgba(220, 174, 111, 0.18)),
        var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

.page-hero.small h1 {
    max-width: 780px;
    font-size: clamp(38px, 6vw, 64px);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.filter-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    padding: 11px 16px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.mini-list {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 18px;
}

.gallery-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 14px 35px rgba(64, 37, 25, 0.08);
}

.gallery-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item figcaption {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(34, 27, 24, 0.72);
    border-radius: 999px;
    font-weight: 800;
}

.ticket-grid {
    grid-template-columns: 0.7fr 0.7fr 1.1fr;
    align-items: stretch;
}

.price-card h2 {
    color: var(--primary-dark);
    font-size: 44px;
}

.price-card.featured {
    color: #fff;
    background: var(--text);
}

.price-card.featured h2,
.price-card.featured .tag {
    color: var(--accent);
}

.price-card.featured p,
.price-card.featured .mini-list {
    color: rgba(255, 255, 255, 0.75);
}

.ticket-form {
    display: grid;
    gap: 16px;
}

.ticket-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    font: inherit;
    color: var(--text);
    outline: none;
}

input:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(220, 174, 111, 0.18);
}

.form-message {
    margin: 0;
    color: var(--primary-dark);
    font-weight: 800;
}

.contact-grid {
    align-items: stretch;
}

.contact-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-card p,
.contact-line {
    color: var(--muted);
}

.contact-line {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.contact-line:last-child {
    border-bottom: 0;
}

.map-card {
    padding: 18px;
}

.map-card img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    border-radius: 20px;
}

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: var(--bg-soft);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 16px;
    font-weight: 800;
}

.footer-links a:hover {
    color: var(--primary);
}

.hidden {
    display: none !important;
}

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

    .cards,
    .cards.exhibitions-list {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .menu-btn {
        display: inline-grid;
        place-items: center;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 20px;
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        border-radius: 14px;
    }

    .hero {
        padding: 56px 0;
    }

    h1 {
        letter-spacing: -1.8px;
    }

    .cards,
    .cards.exhibitions-list,
    .features {
        grid-template-columns: 1fr;
    }

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

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 240px;
    }

    .gallery-item.large,
    .gallery-item.wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .hero-card-info {
        position: static;
        margin-top: 14px;
        background: var(--text);
    }
}


/* Доработанная галерея */
.gallery-hero {
    overflow: hidden;
}

.gallery-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
    align-items: end;
}

.gallery-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.gallery-stats div {
    padding: 22px;
    border: 1px solid rgba(143, 61, 43, 0.14);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 14px 30px rgba(64, 37, 25, 0.08);
}

.gallery-stats strong,
.gallery-stats span {
    display: block;
}

.gallery-stats strong {
    color: var(--primary-dark);
    font-size: 34px;
    line-height: 1;
}

.gallery-stats span {
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

.gallery-section {
    padding-top: 64px;
}

.gallery-heading-row {
    max-width: 840px;
}

.gallery-filters {
    position: sticky;
    top: 88px;
    z-index: 10;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(248, 244, 238, 0.86);
    backdrop-filter: blur(14px);
}

.advanced-gallery {
    grid-auto-rows: 245px;
}

.gallery-photo {
    transition: 0.25s ease;
}

.gallery-photo.hidden {
    display: none;
}

.gallery-open {
    width: 100%;
    height: 100%;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.gallery-open::after {
    content: "Открыть";
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(34, 27, 24, 0.66);
    opacity: 0;
    transform: translateY(-6px);
    transition: 0.25s ease;
    font-size: 13px;
    font-weight: 800;
}

.gallery-item:hover .gallery-open::after {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item figcaption {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 32px);
}

.gallery-item figcaption span,
.gallery-item figcaption small {
    display: inline-flex;
}

.gallery-item figcaption small {
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: var(--accent);
    font-size: 11px;
    white-space: nowrap;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(20, 14, 12, 0.86);
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    width: min(980px, 100%);
}

.lightbox-content img {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.lightbox-content p {
    margin: 14px 0 0;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 22px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--text);
    background: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

/* Доработанные контакты и место под Яндекс.Карту */
.contacts-section .contact-grid {
    grid-template-columns: 0.9fr 1.1fr;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.yandex-map-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.map-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.map-card-header h2 {
    margin-bottom: 0;
}

.map-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: rgba(220, 174, 111, 0.24);
    font-weight: 800;
    white-space: nowrap;
}

.yandex-map-place {
    min-height: 420px;
    overflow: hidden;
    border: 1px dashed rgba(143, 61, 43, 0.32);
    border-radius: 22px;
    background: var(--bg-soft);
}

.yandex-map-place iframe {
    width: 100%;
    height: 420px;
    display: block;
    border: 0;
}

.map-placeholder {
    position: relative;
    min-height: 420px;
}

.map-placeholder img {
    width: 100%;
    height: 420px;
    min-height: 420px;
    object-fit: cover;
    border-radius: 0;
    opacity: 0.62;
}

.map-placeholder-info {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 18px;
    border-radius: 18px;
    color: #fff;
    background: rgba(34, 27, 24, 0.78);
    backdrop-filter: blur(10px);
}

.map-placeholder-info strong,
.map-placeholder-info span {
    display: block;
}

.map-placeholder-info strong {
    font-size: 20px;
}

.map-placeholder-info span {
    color: rgba(255, 255, 255, 0.78);
}

.map-help {
    padding: 18px;
    border-radius: 20px;
    background: rgba(220, 174, 111, 0.14);
}

.map-help h3 {
    margin-bottom: 8px;
}

.map-help ol {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.map-help code {
    padding: 2px 6px;
    border-radius: 8px;
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.92em;
}

@media (max-width: 980px) {
    .gallery-hero-grid,
    .contacts-section .contact-grid {
        grid-template-columns: 1fr;
    }

    .gallery-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 760px) {
    .gallery-filters {
        position: static;
    }

    .gallery-stats {
        grid-template-columns: 1fr;
    }

    .gallery-item figcaption {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 18px;
    }

    .map-card-header,
    .contact-actions {
        flex-direction: column;
    }

    .lightbox {
        padding: 16px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
    }
}

/* Real photo images */
.hero-card img,
.event-card img,
.gallery-open img,
.map-placeholder img {
    background: #efe2d3;
}

.gallery-open img {
    transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-open:hover img {
    transform: scale(1.04);
    filter: brightness(0.96);
}

/* Feedback form on contacts page */
.feedback-section {
    padding-top: 0;
}

.feedback-card {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 34px;
    align-items: start;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 35px rgba(64, 37, 25, 0.08);
    padding: 34px;
}

.feedback-info p {
    color: var(--muted);
}

.feedback-form {
    display: grid;
    gap: 18px;
}

.feedback-form .form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.feedback-form label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: var(--bg-soft);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: 0.2s ease;
}

.feedback-form textarea {
    resize: vertical;
    min-height: 130px;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(220, 174, 111, 0.18);
}

.form-message {
    min-height: 24px;
    margin: 0;
    color: var(--primary-dark);
    font-weight: 800;
}

@media (max-width: 820px) {
    .feedback-card,
    .feedback-form .form-row {
        grid-template-columns: 1fr;
    }

    .feedback-card {
        padding: 24px;
    }
}

.search-row { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.search-row label { font-weight: 700; }
.search-row input { flex: 1; max-width: 430px; padding: 12px 16px; border: 1px solid #ccc; border-radius: 10px; font: inherit; }
@media (max-width: 600px) { .search-row { flex-direction: column; align-items: stretch; } }

.demo-grid { grid-template-columns: minmax(0, 1fr); max-width: 850px; }
.search-row select { padding: 12px 16px; border: 1px solid #ccc; border-radius: 10px; font: inherit; background: #fff; }

/* Search and sorting layout */
.search-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content minmax(200px, 280px);
    align-items: center;
    gap: 16px;
}

.search-row label {
    white-space: nowrap;
}

.search-row input,
.search-row select {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

@media (max-width: 760px) {
    .search-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
}

/* Contacts page with one project card */
.contacts-section .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1140px;
    gap: 0;
}

.contacts-section {
    padding-bottom: 32px;
}

.contacts-section .contact-card {
    width: 100%;
    padding: 28px 34px;
}

.contacts-section .contact-card p:not(.eyebrow) {
    max-width: 780px;
}

@media (max-width: 820px) {
    .contacts-section .contact-card {
        padding: 24px;
    }
}
