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

/* Layout components */
.container {
     width: 100%;
     max-width: 1440px;
     margin: 0 auto;
     padding: 0 16px;
}

.container-narrow {
     width: 100%;
     max-width: 1140px;
     margin: 0 auto;
     padding: 0 16px;
     position: relative;
}

.flex-row {
     display: flex;
     flex-direction: row;
     align-items: center;
}

.flex-column {
     display: flex;
     flex-direction: column;
}

.flex-center {
     justify-content: center;
     align-items: center;
}

.flex-between {
     justify-content: space-between;
}

.flex-start {
     justify-content: flex-start;
}

.flex-end {
     justify-content: flex-end;
}

.section {
     padding: 48px 0;
}

/* Main content styles */
/* ===== EVENTS PAGE ===== */

.events-page {
     padding: 48px 0;
}

.events-page.news-page {
     background-color: #f3f3f3;
}

.news-page .events-title {
     margin-bottom: 16px;
}

.news-page .events-subtitle {
     margin-top: 0;
}

/* Заголовок */
.events-header {
     text-align: left;
     margin-bottom: 32px;
}

.events-title {
     font-family: 'Dihjauti', sans-serif;
     font-size: 48px;
     text-align: center ;
     font-weight: 700;
     line-height: 110%;
     margin-bottom: 8px;
     color: #2d030b;
}

.events-subtitle {
     font-family: 'Behrens Antiqua', 'Cormorant Garamond', serif;
     font-size: 18px;
     color: #896246;
     line-height: 120%;
     text-align: center;
}

/* Секции */
.events-section {
     margin-bottom: 48px;
}

.events-section:last-child {
     margin-bottom: 0;
}

.events-section-title {
     text-align: center;          /* было left → center, как в Figma */
     font-family: 'Dihjauti', sans-serif;
     font-size: 36px;
     font-weight: 700;
     line-height: 120%;
     margin-bottom: 8px;
     color: #2d030b;
}

.events-section-subtitle {
     font-family: 'Behrens Antiqua', 'Cormorant Garamond', serif;
     font-size: 18px;
     color: #896246;
     line-height: 120%;
     text-align: center;
     margin-bottom: 32px;
     max-width: 640px;
     margin-left: auto;
     margin-right: auto;
}

/* СЕТКА: 3 × 3 */
.events-grid {
     display: grid;
     grid-template-columns: repeat(3, minmax(0, 367px));
     gap: 40px 24px;
     justify-content: center;
}

.events-inner {
     max-width: 1140px;
     margin: 0 auto;
}

/* Карточка */
.event-card {
     display: flex;
     justify-content: space-between;
     flex-direction: column;
}

/* Фото */
.event-image {
     overflow: hidden;
     border-radius: 8px;
}

.event-image img {
     width: 100%;
     height: 230px;
     object-fit: cover;
     display: block;
     border-radius: 8px;
     transition: transform .4s ease;
}

.event-card:hover .event-image img {
     transform: scale(1.03);
}


.image-placeholder {
     width: 100%;
     height: 100%;
     background-color: #eceaea;
     border-radius: 4px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 14px;
     color: #978080;
}

/* Название */
.event-title {
     cursor: pointer;
     font-size: 18px;
     font-weight: 700;
     line-height: 120%;
     margin-top: 24px;
     margin-bottom: 24px;
     color: #210201;
}

/* Цена и дата */
.event-meta {
     display: flex;
     justify-content: space-between;
     align-items: center;
     font-family: 'Gill Sans Nova', sans-serif;
     font-size: 14px;
     color: #896246;
     line-height: 120%;
}

.event-date {
     font-family: 'Gill Sans Nova', sans-serif;
     font-size: 14px;
     color: #896246;
     line-height: 120%;
}

/* Просмотры */
.event-views {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     font-family: 'Gill Sans Nova', sans-serif;
     font-size: 14px;
     color: #896246;
     line-height: 120%;
}

/* Место под SVG */
.event-eye {
     width: 16px;
     height: 16px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     flex-shrink: 0;
}

/* Если SVG будет внутри */
.event-eye svg {
     width: 100%;
     height: 100%;
     fill: currentColor;
}

/* Responsive media queries */
@media (max-width: 639px) {

     /* Events mobile styles */
     .events-page {
          padding: 32px 0;
     }

     .events-header {
          margin-bottom: 24px;
          padding: 0 16px;
     }

     .events-title {
          font-size: 28px;
          margin-bottom: 12px;
     }

     .events-subtitle {
          font-size: 14px;
     }

     .events-section {
          margin-bottom: 40px;
     }

     .events-section-title {
          font-size: 24px;
          margin-bottom: 8px;
          padding: 0 16px;
     }

     .events-section-subtitle {
          font-size: 14px;
          margin-bottom: 24px;
          padding: 0 16px;
     }

     /* .events-inner {
          padding: 0 16px;
     } */

     /* ============================================================
        SENIOR-LEVEL КАРУСЕЛЬ — без хака с !important.
        Ключевые свойства:
        - scroll-padding-inline-start: 16px → snap-start привязан к 16px от
          левого края (а не к 0), что даёт визуальный отступ
        - padding-inline 16px / 64px → правый padding 64px ОБЯЗАТЕЛЬНО, иначе
          mandatory snap последней карточки недостижим (max scrollLeft <
          её snap-точки), и пользователь "застревает" между snap'ами
        - scroll-snap-stop: always → блокирует пролёт нескольких карточек за
          один быстрый swipe (UX как у iOS Photos)
        - overscroll-behavior-x: contain → не прокручивает body при достижении края
        ============================================================ */
     .events-grid {
          display: flex;
          gap: 16px;
          padding: 0 64px 0 16px;      /* left=16 (отступ под snap-start), right=64 (= peek + breathing для snap последней карточки) */
          overflow-x: auto;
          overflow-y: hidden;
          scroll-snap-type: x mandatory;
          scroll-padding-inline-start: 16px;
          overscroll-behavior-x: contain;
          -webkit-overflow-scrolling: touch;
          scrollbar-width: none;
          -ms-overflow-style: none;
     }

     .events-grid::-webkit-scrollbar {
          display: none;
     }

     .event-card {
          flex: 0 0 calc(100vw - 64px);   /* card занимает viewport - 64px (16 padding + 48 peek) */
          max-width: none;
          scroll-snap-align: start;
          scroll-snap-stop: always;       /* всегда останавливается на каждой карточке */
     }

     /* Картинка пропорционально уменьшается на мобильной (десктоп — 230px) */
     .event-image,
     .event-image img {
          height: 180px;
     }

     .event-title {
          font-size: 16px;
          margin-top: 16px;
          margin-bottom: 16px;
     }

     .event-meta {
          font-size: 12px;
     }
}