/* ===== Подключение шрифта Literata ===== */
@font-face {
    font-family: 'Literata';
    src: url('../fonts/Literata36pt-Regular.woff2') format('woff2'),
         url('../fonts/Literata36pt-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Literata';
    src: url('../fonts/Literata36pt-Medium.woff2') format('woff2'),
         url('../fonts/Literata36pt-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Literata';
    src: url('../fonts/Literata36pt-SemiBold.woff2') format('woff2'),
         url('../fonts/Literata36pt-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Literata';
    src: url('../fonts/Literata36pt-Bold.woff2') format('woff2'),
         url('../fonts/Literata36pt-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Сетка */
    --container-width: 1400px;
    --header-height: 110px;
    --hero-height: 600px;

    /* Отступы */
    --space-xs: 20px;
    --space-sm: 30px;
    --space-md: 40px;
    --space-lg: 60px;
    --space-xl: 80px;
    --space-xxl: 120px;

    /* Цвета */
    --color-white:      #FFFFFF;
    --color-accent:     #8B6F4B;
    --color-accent-alt: #B0A091;
    --color-light-blue: #B0CEF5;
    --color-dark:       #362B23;
    --color-text-secondary: #8B6F4B;

    /* Типографика */
    --font-family: 'Literata', serif;
    --font-menu: 16px;
    --font-section-title: 24px;
    --font-body: 19px;

    /* Скругления */
    --radius-sm: 8px;
    --radius-md: 20px;
    --radius-lg: 24px;

    /* Тени */
    --shadow-card: none;
}

/* Глобальный контейнер сайта — 1400px */
.site-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    background: var(--color-white);
}

/* Фон всей страницы */
body {
    background-color: #FFFFFF;
    background-image: url('../images/ornament.png');
    background-repeat: repeat;
    background-size: 500px auto;
}

/* ===== Заголовок раздела ===== */
.section-title {
    height: 85px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--color-accent);
}

.section-title-text {
    font-family: var(--font-family);
    font-size: var(--font-section-title);
    font-weight: 600;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.4em;
    line-height: 1;
}

/* ===== Интеграция с QTickets ===== */
.qtickets-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qtickets-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.qtickets-modal__content {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: #fff;
    border-radius: 20px;
    overflow-y: auto;
    padding: 30px;
    padding-bottom: 80px;
}

.qtickets-modal__close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--color-accent);
}

.qtickets-modal__body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.qtickets-modal__image {
    width: 100%;
}

.qtickets-modal__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.qtickets-modal__info {
    width: 100%;
}

.qtickets-modal__info h2 {
    font-family: var(--font-family);
    font-size: 24px;
    color: var(--color-accent);
    margin: 0 0 20px;
}

.qtickets-modal__description {
    font-size: 14px;
    color: var(--color-dark);
    margin-bottom: 20px;
}

.qtickets-modal__shows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.qtickets-modal__show {
    display: flex;
    gap: 15px;
    padding: 10px;
    background: #f5f0e8;
    border-radius: 10px;
}

.qtickets-modal__date {
    font-weight: 600;
    color: var(--color-accent);
}

.qtickets-modal__time {
    color: var(--color-dark);
}

.qtickets-modal__price {
    margin-left: auto;
    font-weight: 600;
    color: var(--color-accent);
}

.qtickets-modal__no-shows {
    padding: 20px;
    background: #f5f0e8;
    border-radius: 10px;
    color: var(--color-accent);
    font-size: 15px;
    text-align: center;
}

.qtickets-modal__button {
    display: inline-block;
    padding: 12px 32px;
    background: var(--color-accent-alt);
    color: #fff;
    font-family: var(--font-family);
    font-size: 16px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.qtickets-modal__button:hover {
    opacity: 0.8;
}

.qtickets-modal__commission {
    font-size: 12px;
    color: var(--color-accent-alt);
    margin: 10px 0 20px;
}

@media (max-width: 768px) {
    .qtickets-modal__content {
        width: 95%;
        max-height: 90vh;
        padding: 20px;
    }

    .qtickets-modal__image img {
        max-height: 200px;
    }
}

/* Перебиваем стили QTickets */
.qtickets-modal__button.qtickets-button,
.qtickets-modal__button.qtickets-button:link,
.qtickets-modal__button.qtickets-button:visited {
    background: #8b6f4b !important;
    border: 1px solid #8b6f4b !important;
    color: #ffffff !important;
}

.qtickets-modal__button.qtickets-button:hover,
.qtickets-modal__button.qtickets-button:active {
    background: #a58965 !important;
    border-color: #a58965 !important;
    color: #ffffff !important;
}

.fair-card__button.qtickets-button,
.fair-card__button.qtickets-button:link,
.fair-card__button.qtickets-button:visited {
    background: #8b6f4b !important;
    border: 1px solid #8b6f4b !important;
    color: #ffffff !important;
}

.fair-card__button.qtickets-button:hover,
.fair-card__button.qtickets-button:active {
    background: #a58965 !important;
    border-color: #a58965 !important;
    color: #ffffff !important;
}

@media (min-width: 1920px) {
    body {
        zoom: 1;
    }
}

/* Ссылки в текстовом контенте */
.tab-page-content a,
.event-card__excerpt a,
.qtickets-modal__description a,
.fair-card__excerpt a {
    color: var(--color-accent);
    text-decoration: underline;
}

.tab-page-content a:hover,
.event-card__excerpt a:hover,
.qtickets-modal__description a:hover,
.fair-card__excerpt a:hover {
    opacity: 0.7;
}

/* ============================================================
   Кастомизация MediaElement.js плеера
   ============================================================ */
.mejs-container {
    max-width: 70% !important;
    margin: 30px auto;
    border-radius: 20px;
    overflow: hidden;
    background: var(--color-accent) !important;
}

.mejs-container .mejs-controls {
    height: 44px !important;
    padding: 0 12px !important;
    align-items: center !important;
    background: var(--color-accent) !important;
    border-radius: 0 0 20px 20px !important;
}

.mejs-container .mejs-controls .mejs-button {
    width: 30px !important;
    height: 30px !important;
    margin: 4px 4px 0 !important;   /* было: margin: 0 4px !important; */
}

.mejs-container .mejs-controls .mejs-button > button {
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background-color: var(--color-accent-alt) !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 14px 14px !important;
    font-size: 0 !important;
    text-indent: -9999px !important;
    transition: background-color .2s ease;
}

.mejs-container .mejs-controls .mejs-button > button:hover {
    background-color: #a58965 !important;
}

/* PLAY */
.mejs-container .mejs-controls .mejs-play > button {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23ffffff' d='M5 3.5v9l8-4.5z'/></svg>") !important;
}

/* PAUSE */
.mejs-container .mejs-controls .mejs-pause > button {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><rect x='4' y='3.5' width='3' height='9' fill='%23ffffff'/><rect x='9' y='3.5' width='3' height='9' fill='%23ffffff'/></svg>") !important;
}

/* VOLUME */
.mejs-container .mejs-controls .mejs-volume-button > button {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23ffffff' d='M3 6v4h3l4 3V3L6 6H3z'/><path fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' d='M11.5 5.5a3.5 3.5 0 0 1 0 5'/><path fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' d='M13 4a5.5 5.5 0 0 1 0 8'/></svg>") !important;
}

/* MUTE */
.mejs-container .mejs-controls .mejs-volume-button > button.mejs-volume-muted {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%23ffffff' d='M3 6v4h3l4 3V3L6 6H3z'/><path fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' d='M11 6l4 4M15 6l-4 4'/></svg>") !important;
}

.mejs-time {
    color: #fff !important;
}

.mejs-time-rail {
    padding-top: 10px !important;
}

.mejs-time-total {
    background: rgba(255,255,255,0.3) !important;
}

.mejs-time-loaded {
    background: var(--color-accent-alt) !important;
}

.mejs-time-current {
    background: #fff !important;
}

@media (max-width: 768px) {
    .mejs-container {
        max-width: 95% !important;
    }
}