/* Events / news — Invento teal + beet system */

.events-page,
.event-detail-page {
    --ev-teal: #00828e;
    --ev-teal-deep: #015d66;
    --ev-beet: #7e2f3d;
    --ev-beet-deep: #691726;
    --ev-text: #474849;
    --ev-text-secondary: #959aa6;
    --ev-bg: #f2f9f9;
    --ev-radius: 20px;
    --ev-grad-head: linear-gradient(281deg, #892436 11.88%, #02aaba 84.86%);
    --ev-grad-fill: linear-gradient(100deg, #7e2f3d 0%, #00828e 100%);
    width: 100%;
    color: var(--ev-text);
}

.btn-outline-tashkent {
    color: var(--ev-teal);
    border-color: var(--ev-teal);
}
.btn-outline-tashkent:hover {
    color: #fff;
    background: var(--ev-teal);
    border-color: var(--ev-teal);
}

.color-secondary {
    color: var(--ev-text-secondary);
}

/* ── Banner (StreamField) ─────────────────────────────────────────────────── */
.ev-banner {
    padding-top: 20px;
}
.ev-banner__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--ev-radius);
    box-shadow: 0 4px 32px rgba(130, 130, 130, 0.2);
    overflow: hidden;
    min-height: 102px;
}
.ev-banner__text {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
}
.ev-banner__text .site-bc {
    color: var(--ev-text-secondary);
}
.ev-banner__text .site-bc__item a:hover {
    color: var(--ev-teal);
}
.ev-banner__title {
    margin: 0.75rem 0 0;
    font-weight: 700;
    font-size: clamp(1.75rem, 5vw, 3.25rem);
    line-height: 1.1;
    background: var(--ev-grad-head);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}
.ev-banner__desc {
    margin: 0.75rem 0 0;
    font-size: 1rem;
    color: var(--ev-text);
    max-width: 36ch;
}
.ev-banner__media {
    display: none;
}
@media (min-width: 768px) {
    .ev-banner__card {
        flex-direction: row;
        align-items: stretch;
        min-height: 220px;
    }
    .ev-banner__text {
        flex: 0 0 48%;
        padding: 36px 40px;
    }
    .ev-banner__media {
        display: block;
        flex: 1;
        position: relative;
        background: url("../img/pattern_min.3455eee9d12e.svg") no-repeat -35px center;
        background-size: 400px 400px;
    }
    .ev-banner__img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0 var(--ev-radius) var(--ev-radius) 0;
        clip-path: ellipse(80% 121% at 87% 82%);
    }
}

/* ── Feed band ────────────────────────────────────────────────────────────── */
.ev-feed {
    margin-top: clamp(1.5rem, 3vw, 2.5rem);
    padding: 0 0 clamp(2.5rem, 6vw, 4rem);
    background: transparent;
}

.ev-feed__layout {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}
@media (min-width: 992px) {
    .ev-feed__layout {
        grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
        gap: 2.5rem 3rem;
        align-items: start;
    }
}

.ev-feed__aside-inner {
    position: static;
}
@media (min-width: 992px) {
    .ev-feed__aside-inner {
        position: sticky;
        top: 100px;
    }
}

.ev-feed__aside-label {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ev-text-secondary);
}

.ev-filter__group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
@media (min-width: 992px) {
    .ev-filter__group {
        flex-direction: column;
        align-items: stretch;
    }
    .ev-filter__item .btn {
        width: 100%;
        text-align: left;
    }
}

.ev-filter .btn {
    border-radius: 999px;
}
.ev-filter .btn-check:checked + .btn {
    color: #fff;
    background: var(--ev-grad-fill);
    border-color: transparent;
}
.ev-filter .btn-check:checked + .btn span {
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
}

.ev-sidebar {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(149, 154, 166, 0.28);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (max-width: 991.98px) {
    .ev-sidebar {
        grid-template-columns: 1fr 1fr;
        gap: 1rem 1.25rem;
        align-items: start;
    }
}
.ev-sidebar__campus {
    min-width: 0;
}
.ev-sidebar__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
    line-height: 1.25;
    min-height: 2.5em;
    color: var(--ev-text);
}
.ev-socs.socs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: none;
}
.ev-socs .soc {
    width: 38px;
    height: 38px;
    margin: 0;
    border-radius: 10px;
    border: 1.5px solid var(--ev-teal, #00828E);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.ev-socs .soc:hover {
    transform: translateY(-2px);
    background: var(--ev-teal, #00828E);
    border-color: var(--ev-teal, #00828E);
}
.ev-socs .soc img {
    width: 16px;
    height: 16px;
    max-width: 16px;
    max-height: 16px;
    object-fit: contain;
    display: block;
    /* Keep glyph visible inside the box (global .soc img filter crushes telegram) */
    filter: brightness(0) saturate(100%) invert(36%) sepia(42%) saturate(746%) hue-rotate(143deg) brightness(94%) contrast(101%);
}
.ev-socs .soc:hover img {
    filter: brightness(0) invert(1);
}

/* ── Story cards ──────────────────────────────────────────────────────────── */
.ev-feed__main {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.ev-story {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin: 0;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(149, 154, 166, 0.28);
    align-items: stretch;
}
.ev-story:first-child {
    padding-top: 0;
}
.ev-story.is-hidden {
    display: none;
}
.ev-story:not(.is-hidden) {
    display: grid;
}

@media (min-width: 640px) {
    .ev-story {
        grid-template-columns: minmax(160px, 38%) minmax(0, 1fr);
        gap: 1.15rem 1.35rem;
        padding: 1.25rem 0;
        align-items: stretch;
    }
    .ev-story:not(:has(.ev-story__media)) {
        grid-template-columns: 1fr;
    }
}

.ev-story__media {
    display: block;
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e4eef0;
    align-self: stretch;
    min-height: 140px;
}
@media (min-width: 640px) {
    .ev-story__media {
        aspect-ratio: auto;
        min-height: 100%;
        height: 100%;
        max-height: none;
    }
}
.ev-story__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.ev-story__media:hover img {
    transform: scale(1.04);
}

.ev-story__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.ev-story__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.7rem;
    margin-bottom: 0.45rem;
}

.ev-story__tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid transparent;
    pointer-events: none;
}
.ev-story__tag--tashkent {
    color: var(--ev-teal);
    border-color: rgba(0, 130, 142, 0.45);
    background: rgba(0, 130, 142, 0.06);
}
.ev-story__tag--ashgabat {
    color: var(--ev-beet);
    border-color: rgba(126, 47, 61, 0.4);
    background: rgba(126, 47, 61, 0.06);
}

.ev-story__date {
    font-size: 0.8rem;
    color: var(--ev-text-secondary);
    font-variant-numeric: tabular-nums;
}

.ev-story__title {
    margin: 0 0 0.5rem;
    font-weight: 700;
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
}
.ev-story__title a {
    color: var(--ev-text);
    text-decoration: none;
    transition: color 0.2s ease;
}
.ev-story__title a:hover {
    color: var(--ev-teal);
}

.ev-story__excerpt {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--ev-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
}

.ev-story__more {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ev-teal);
    text-decoration: none;
}
.ev-story__more svg {
    transition: transform 0.25s ease;
}
.ev-story__more:hover {
    color: var(--ev-teal-deep);
}
.ev-story__more:hover svg {
    transform: translateX(3px);
}

/* Featured keeps same media size as the rest of the feed */

/* Reveal motion */
.ev-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--ev-delay, 0ms),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--ev-delay, 0ms);
}
.ev-reveal.is-in {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .ev-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .ev-story__media img {
        transition: none;
    }
}

.ev-empty {
    padding: 2.5rem 0;
}
.ev-empty__title {
    margin: 0 0 0.35rem;
    font-weight: 700;
    font-size: 1.25rem;
}
.ev-empty__text,
.ev-feed__empty-filter {
    margin: 0;
    color: var(--ev-text-secondary);
}
.ev-feed__empty-filter {
    padding: 2rem 0;
}

/* ── Detail ───────────────────────────────────────────────────────────────── */
.event-detail-page .site-bc {
    color: var(--ev-text-secondary);
    margin-top: 1.25rem;
}
.event-detail-page .site-bc__item a:hover {
    color: var(--ev-teal);
}
.ev-detail__title {
    font-weight: 700;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    margin-bottom: 0.75rem;
}
.ev-detail__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}
.ev-detail__body {
    font-size: 1.0625rem;
    line-height: 1.65;
    max-width: none;
    width: 100%;
}
.ev-detail__body .ev-article-block {
    margin: 0 0 1.5rem;
}
.ev-detail__body .ev-article-block:last-child {
    margin-bottom: 0;
}
.ev-detail__body .richtext-content p {
    margin-bottom: 1rem;
}
.ev-detail__body .richtext-content p:last-child {
    margin-bottom: 0;
}
.ev-detail__body .richtext-content h2,
.ev-detail__body .richtext-content h3 {
    margin: 1.5rem 0 0.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ev-text);
}
.ev-detail__body .richtext-content h2 {
    font-size: 1.35rem;
}
.ev-detail__body .richtext-content h3 {
    font-size: 1.15rem;
}
.ev-detail__body .richtext-content ul,
.ev-detail__body .richtext-content ol {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}
.ev-detail__body .richtext-content a {
    color: var(--ev-teal);
}

/* Lead */
.ev-article-lead {
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    line-height: 1.5;
    font-weight: 500;
    color: var(--ev-text);
}

/* Image */
.ev-article-image {
    margin: 0 0 1.5rem;
}
.ev-article-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--ev-radius);
}
.ev-article-image figcaption {
    margin-top: 0.55rem;
    font-size: 0.875rem;
    color: var(--ev-text-secondary);
}

/* Image + text */
.ev-article-image-text {
    display: grid;
    gap: 1.15rem;
    align-items: center;
}
@media (min-width: 768px) {
    .ev-article-image-text {
        grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
        gap: 1.5rem 1.75rem;
    }
    .ev-article-image-text--right .ev-article-image-text__media {
        order: 2;
    }
    .ev-article-image-text--right .ev-article-image-text__text {
        order: 1;
    }
}
.ev-article-image-text__media {
    border-radius: var(--ev-radius);
    overflow: hidden;
    background: #e4eef0;
    aspect-ratio: 4 / 3;
}
.ev-article-image-text__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Quote */
.ev-article-quote {
    margin: 0 0 1.5rem;
    padding: 1.25rem 0 1.25rem 1.25rem;
    border-left: 3px solid var(--ev-teal);
}
.ev-article-quote__text {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.45;
    font-style: italic;
    color: var(--ev-text);
}
.ev-article-quote__footer {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    font-size: 0.9rem;
    font-style: normal;
}
.ev-article-quote__author {
    font-weight: 600;
    font-style: normal;
    color: var(--ev-text);
}
.ev-article-quote__role {
    color: var(--ev-text-secondary);
}

/* Gallery (reuses .event-media) */
.ev-detail__body .ev-article-gallery {
    max-width: none;
}

/* Video */
.ev-article-video__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--ev-radius);
    overflow: hidden;
    background: #111;
}
.ev-article-video__frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.ev-article-video__caption {
    margin: 0.55rem 0 0;
    font-size: 0.875rem;
    color: var(--ev-text-secondary);
}

/* Callout */
.ev-article-callout {
    padding: 1.15rem 1.25rem;
    border-radius: var(--ev-radius);
    border: 1px solid transparent;
}
.ev-article-callout--info {
    background: rgba(0, 130, 142, 0.07);
    border-color: rgba(0, 130, 142, 0.22);
}
.ev-article-callout--tip {
    background: rgba(0, 130, 142, 0.1);
    border-color: rgba(0, 130, 142, 0.28);
}
.ev-article-callout--important {
    background: rgba(126, 47, 61, 0.07);
    border-color: rgba(126, 47, 61, 0.28);
}
.ev-article-callout__title {
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--ev-text);
}
.ev-article-callout--important .ev-article-callout__title {
    color: var(--ev-beet);
}
.ev-article-callout--info .ev-article-callout__title,
.ev-article-callout--tip .ev-article-callout__title {
    color: var(--ev-teal-deep);
}

/* Facts */
.ev-article-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}
@media (min-width: 768px) {
    .ev-article-facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .ev-article-facts:has(.ev-article-facts__item:nth-child(3):last-child),
    .ev-article-facts:has(.ev-article-facts__item:nth-child(2):last-child) {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }
}
.ev-article-facts__item {
    padding: 1rem 0.85rem;
    border-radius: var(--ev-radius);
    background: var(--ev-bg);
    text-align: center;
}
.ev-article-facts__value {
    font-weight: 700;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.15;
    background: var(--ev-grad-head);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.ev-article-facts__label {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--ev-text-secondary);
    line-height: 1.35;
}

/* CTA */
.ev-article-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1.25rem 0;
}
.ev-article-cta__btn {
    border-radius: 999px;
}
.ev-detail__media-heading {
    font-weight: 700;
    margin-bottom: 1rem;
}
.event-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.event-media-item {
    border-radius: var(--ev-radius);
    overflow: hidden;
    background: #f2f9f9;
    aspect-ratio: 1;
    border: 0;
    padding: 0;
    cursor: zoom-in;
    display: block;
    width: 100%;
}
.event-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.event-media-item:hover img {
    transform: scale(1.04);
}

.ev-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(20, 20, 20, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.ev-lightbox.is-open {
    display: flex;
}
.ev-lightbox img {
    max-width: min(96vw, 1100px);
    max-height: 90vh;
    border-radius: 12px;
    object-fit: contain;
}
.ev-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

/* Article slider */
.ev-article-slider {
    margin: 1.75rem 0 2rem;
    --ev-slider-accent: #00828e;
}
.ev-article-slider--center {
    width: 100%;
}
.ev-article-slider--left,
.ev-article-slider--right {
    max-width: min(100%, 28rem);
}
.ev-article-slider--left {
    margin-right: auto;
}
.ev-article-slider--right {
    margin-left: auto;
}
@media (min-width: 900px) {
    .ev-article-slider--left {
        float: left;
        margin: 0.35rem 1.75rem 1.25rem 0;
        max-width: 42%;
    }
    .ev-article-slider--right {
        float: right;
        margin: 0.35rem 0 1.25rem 1.75rem;
        max-width: 42%;
    }
    .ev-detail__body::after {
        content: "";
        display: table;
        clear: both;
    }
}
.ev-article-slider__viewport {
    overflow: hidden;
    border-radius: 16px;
    background: #e8eef0;
    aspect-ratio: 16 / 10;
}
.ev-article-slider__track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.ev-article-slider__slide {
    flex: 0 0 100%;
    margin: 0;
    position: relative;
    height: 100%;
}
.ev-article-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ev-article-slider__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.85rem 1rem;
    background: linear-gradient(transparent, rgba(30, 30, 30, 0.72));
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.35;
}
.ev-article-slider__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.ev-article-slider__nav {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid rgba(0, 130, 142, 0.35);
    border-radius: 999px;
    background: #fff;
    color: var(--ev-slider-accent);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.ev-article-slider__nav:hover {
    background: var(--ev-slider-accent);
    color: #fff;
}
.ev-article-slider__dots {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.ev-article-slider__dot {
    width: 0.55rem;
    height: 0.55rem;
    border: 0;
    border-radius: 999px;
    background: rgba(71, 72, 73, 0.28);
    cursor: pointer;
    padding: 0;
}
.ev-article-slider__dot.is-active {
    background: var(--ev-slider-accent);
    width: 1.1rem;
}
