/* TMF27: блоки главной по ТЗ 16.11.2026. Подключается после main.css (собранного), поэтому здесь — обычный CSS. */

:root {
    --tmf-violet: #5b46d8;
    --tmf-deep: #1c0f8f;
    --tmf-pink: #d42992;
    --tmf-green: #00d092;
}

/* Меню: заглушки «Спикеры» / «Ярмарка» — кнопки в стиле ссылок */
.header__nav ul li > button { font-family: inherit; font-weight: inherit; letter-spacing: inherit; cursor: pointer; background: transparent; }

/* Первый экран: новое фото без тонировки — накладываем фирменный градиент */
.intro__img::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(28, 15, 143, .55) 0%, rgba(28, 15, 143, 0) 35%),
        linear-gradient(90deg, rgba(129, 26, 232, .78) 0%, rgba(212, 41, 146, .55) 55%, rgba(212, 41, 146, .35) 100%);
    pointer-events: none;
}
.intro .logo img, .header__logo img[src$=".svg"] { width: 100%; height: auto; }

/* Вертикальное видео YouTube Shorts: 9:16, обложка без обрезки */
.tmf-video {
    position: relative;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 9 / 16;
    border-radius: var(--rs-large);
    overflow: hidden;
    background: #000;
    box-shadow: 0 24px 60px rgba(28, 15, 143, .25);
}
.tmf-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* О форуме: текст слева, видео справа */
.tmf-about {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 60px;
    align-items: start;
}
.tmf-about__text p strong { display: block; margin-bottom: 6px; color: var(--tmf-violet); }

/* Почему стоит прийти: 4 карточки */
.tmf-why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tmf-why__card { position: relative; gap: 16px; padding: 28px 24px; min-height: 100%; overflow: hidden; }
.tmf-why__num { font-size: 56px; font-weight: 700; line-height: 1; color: rgba(255, 255, 255, .22); }
.tmf-why__card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(91, 70, 216, .35); }

/* Билет: «корешок» справа с перфорацией */
.tmf-ticket {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .85fr);
    border-radius: 24px;
    filter: drop-shadow(0 30px 60px rgba(28, 15, 143, .35));
}
.tmf-ticket__main, .tmf-ticket__stub { background: #fff; padding: 40px; }
.tmf-ticket__main {
    border-radius: 24px 0 0 24px;
    -webkit-mask: radial-gradient(circle 18px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle 18px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle 18px at 100% 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle 18px at 100% 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.tmf-ticket__stub {
    display: flex; flex-direction: column; gap: 24px;
    border-radius: 0 24px 24px 0;
    border-left: 2px dashed rgba(91, 70, 216, .35);
    -webkit-mask: radial-gradient(circle 18px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle 18px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
            mask: radial-gradient(circle 18px at 0 0, transparent 98%, #000) top / 100% 51% no-repeat,
                  radial-gradient(circle 18px at 0 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.tmf-ticket__content h3 { margin-bottom: 24px; font-size: 32px; line-height: 1.2; color: var(--tmf-violet); }
.tmf-ticket__content ul { display: grid; gap: 14px; }
.tmf-ticket__content li {
    position: relative; padding-left: 40px;
    font-size: var(--fs-18); line-height: 1.4; color: var(--accent);
}
.tmf-ticket__content li::before {
    content: ""; position: absolute; left: 0; top: 0;
    width: 26px; height: 26px; border-radius: 50%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.8 12.5l-1.4 1.4 5.1 5.1L20 8.5l-1.4-1.4z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat,
                linear-gradient(135deg, var(--tmf-pink), var(--tmf-violet) 55%, var(--tmf-green));
}
.tmf-ticket__logo img { width: 100%; max-width: 260px; height: auto; }
.tmf-ticket__date { font-size: var(--fs-18); font-weight: 600; line-height: 1.4; color: var(--accent); }
.tmf-ticket__price span { display: block; font-size: 14px; color: var(--tmf-violet); }
.tmf-ticket__price strong {
    font-size: 44px; line-height: 1.1; font-weight: 700;
    background: linear-gradient(90deg, var(--tmf-pink), var(--tmf-violet));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tmf-ticket__buttons { display: grid; gap: 12px; margin-top: auto; }
.tmf-ticket__buttons .btn { min-width: 0; }

/* Секции форума: стеклянные карточки, при наведении — описание */
.tmf-sections {
    background:
        radial-gradient(60% 80% at 0% 30%, rgba(184, 52, 255, .55) 0%, rgba(184, 52, 255, 0) 70%),
        radial-gradient(50% 70% at 100% 80%, rgba(0, 120, 255, .45) 0%, rgba(0, 120, 255, 0) 70%),
        linear-gradient(135deg, #3b14d9 0%, #2410b8 50%, #1c2fe0 100%);
}
.tmf-sections__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tmf-section-card {
    position: relative; min-height: 270px; border-radius: 28px; overflow: hidden; outline: none;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: #fff; cursor: default;
}
.tmf-section-card h3, .tmf-section-card p { color: #fff; }
.tmf-section-card h3 { font-size: 30px; line-height: 1.15; font-weight: 600; }
.tmf-section-card__front, .tmf-section-card__back {
    position: absolute; inset: 0; padding: 28px; transition: opacity .35s, transform .35s;
}
.tmf-section-card__icon {
    position: absolute; right: 20px; bottom: 16px; width: 120px; height: 120px; object-fit: contain;
    -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 100%);
            mask: radial-gradient(closest-side, #000 72%, transparent 100%);
    transition: transform .35s;
}
.tmf-section-card__back {
    display: flex; flex-direction: column; gap: 14px;
    opacity: 0; transform: translateY(16px);
    background: linear-gradient(160deg, rgba(212, 41, 146, .92), rgba(91, 70, 216, .95));
}
.tmf-section-card__back h3 { font-size: 22px; }
.tmf-section-card__back p { font-size: 16px; line-height: 1.45; }
.tmf-section-card:hover .tmf-section-card__back,
.tmf-section-card:focus-within .tmf-section-card__back { opacity: 1; transform: none; }
.tmf-section-card:hover .tmf-section-card__front,
.tmf-section-card:focus-within .tmf-section-card__front { opacity: 0; }

/* Фото 2×2 (премия, «Как это было») */
.tmf-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tmf-photos__item { aspect-ratio: 3 / 2; border-radius: var(--rs-large); overflow: hidden; }
.tmf-photos__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.tmf-photos__item:hover img { transform: scale(1.05); }

.tmf-awards { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 60px; align-items: center; }
.tmf-highlights { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 30px; align-items: center; }

@media screen and (max-width: 1170px) {
    .tmf-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tmf-sections__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tmf-awards { grid-template-columns: 1fr; gap: 40px; }
    .tmf-ticket { grid-template-columns: 1fr; }
    .tmf-ticket__main { border-radius: 24px 24px 0 0; -webkit-mask: none; mask: none; }
    .tmf-ticket__stub { border-radius: 0 0 24px 24px; border-left: 0; border-top: 2px dashed rgba(91, 70, 216, .35); -webkit-mask: none; mask: none; }
}
@media screen and (max-width: 768px) {
    .tmf-about, .tmf-highlights { grid-template-columns: 1fr; gap: 30px; }
    .tmf-video { max-width: 320px; margin: 0 auto; }
    .tmf-why, .tmf-sections__grid { grid-template-columns: 1fr; }
    .tmf-section-card { min-height: 230px; }
    .tmf-section-card h3 { font-size: 24px; }
    .tmf-ticket__main, .tmf-ticket__stub { padding: 24px; }
    .tmf-ticket__content h3 { font-size: 24px; }
    .tmf-ticket__price strong { font-size: 34px; }
}
@media (hover: none) {
    /* На телефоне описание секции видно сразу под названием */
    .tmf-section-card { min-height: 0; }
    .tmf-section-card__front { position: relative; padding-bottom: 0; }
    .tmf-section-card__front .tmf-section-card__icon { position: static; display: block; width: 80px; height: 80px; margin-top: 12px; }
    .tmf-section-card__back { position: relative; opacity: 1; transform: none; background: none; padding-top: 12px; }
    .tmf-section-card__back h3 { display: none; }
    .tmf-section-card:hover .tmf-section-card__front, .tmf-section-card:focus-within .tmf-section-card__front { opacity: 1; }
}

/* Обложка вертикального видео и кнопка воспроизведения */
.tmf-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tmf-video__play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; background: rgba(0, 0, 0, .08); transition: background .3s; }
.tmf-video__play:hover { background: rgba(0, 0, 0, .25); }
.tmf-video iframe { z-index: 2; }

/* ===== Правки 18.11.2026 ===== */

/* Программа: три тезиса — карточки с градиентной рамкой и значком */
.tmf-about__text { display: grid; gap: 16px; }
.tmf-about__text > p {
    position: relative; margin: 0;
    padding: 24px 28px 24px 84px;
    border: 1.5px solid transparent; border-radius: 22px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, var(--tmf-pink), var(--tmf-violet) 55%, var(--tmf-green)) border-box;
    box-shadow: 0 14px 34px rgba(91, 70, 216, .08);
    transition: transform .35s, box-shadow .35s;
}
.tmf-about__text > p::before {
    content: ""; position: absolute; left: 24px; top: 24px;
    width: 40px; height: 40px; border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.3 7.7L22 12l-7.7 2.3L12 22l-2.3-7.7L2 12l7.7-2.3z' fill='%23fff'/%3E%3C/svg%3E") center / 20px no-repeat,
        linear-gradient(135deg, var(--tmf-pink), var(--tmf-violet) 55%, var(--tmf-green));
    box-shadow: 0 6px 16px rgba(212, 41, 146, .3);
}
.tmf-about__text > p strong {
    display: block; margin-bottom: 8px;
    font-size: 1.15em; line-height: 1.25;
    background: linear-gradient(90deg, var(--tmf-pink), var(--tmf-violet));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tmf-about__text > p:hover { transform: translateX(6px); box-shadow: 0 20px 44px rgba(91, 70, 216, .16); }

/* Кураторы и оргкомитет: карточка поднимается, фото приближается, снизу — фирменный градиент */
.user-card { transition: transform .4s; }
.user-card__img { isolation: isolate; }
.user-card__img img { transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .5s; }
.user-card__img::after {
    content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none;
    background: linear-gradient(0deg, rgba(91, 70, 216, .72) 0%, rgba(212, 41, 146, .25) 45%, rgba(212, 41, 146, 0) 75%);
    box-shadow: inset 0 0 0 2px transparent;
    opacity: 0; transition: opacity .45s;
}
.user-card__img::before { position: relative; z-index: 0; }
.user-card .text-tmp h3 { transition: color .3s; }
.user-card:hover { transform: translateY(-6px); }
.user-card:hover .user-card__img img { transform: scale(1.07); filter: saturate(1.1); }
.user-card:hover .user-card__img::after { opacity: 1; }
.user-card:hover .text-tmp h3 { color: var(--tmf-violet); }
/* «Подробнее» — на одной линии у всех карточек */
.user-card__desc { flex: 1 1 auto; }
.user-card__desc > a { margin-top: auto; }

/* Кнопки «Купить билет» в разделах — не на всю ширину */
.tmf-btn-buy { width: 100%; max-width: 340px; justify-self: center; }
.btn, a.btn, button.btn { cursor: pointer; }

/* Партнёры: логотип со ссылкой — курсор-рука и подъём при наведении */
a.card-logo { cursor: pointer; transition: transform .3s, box-shadow .3s; border-radius: var(--rs-small); }
a.card-logo:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(91, 70, 216, .15); }

/* Как это было: фото справа по высоте равны видео */
.tmf-highlights { align-items: stretch; }
.tmf-highlights .tmf-photos { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.tmf-highlights .tmf-photos__item { aspect-ratio: auto; height: 100%; }
@media screen and (max-width: 768px) {
    .tmf-highlights .tmf-photos { grid-template-rows: none; }
    .tmf-highlights .tmf-photos__item { aspect-ratio: 3 / 2; height: auto; }
    .tmf-about__text > p { padding: 20px 20px 20px 70px; }
    .tmf-about__text > p::before { left: 18px; top: 20px; width: 36px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .user-card, .user-card__img img, .tmf-about__text > p, a.card-logo { transition: none; }
}


/* Шапка на телефоне: меню и три логотипа в одну строку */
@media screen and (max-width: 768px) {
    .header__top-inner { flex-wrap: nowrap; gap: 10px; align-items: center; }
    .header__top-inner > .header__btn { flex: 0 0 auto; }
    .header__top-inner > .header__logo { flex: 1 1 0; min-width: 0; max-width: 130px; max-height: 44px; justify-content: center; }
    .header__top-inner > .header__logo img { max-height: 44px; width: auto; max-width: 100%; }
}

/* Закреплённое меню при прокрутке: фирменный градиент со стеклом, выезжает сверху */
.header__fixed-logo, .header__fixed-btn, .header__fixed-actions { display: none; }
.header.is-fixed {
    position: fixed; top: 0;
    background: linear-gradient(90deg, rgba(129, 26, 232, .9) 0%, rgba(91, 70, 216, .9) 50%, rgba(212, 41, 146, .88) 100%);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(28, 15, 143, .3);
    animation: tmfHeaderIn .45s cubic-bezier(.2, .7, .2, 1);
}
@keyframes tmfHeaderIn { from { transform: translateY(-100%); } to { transform: none; } }
section[id] { scroll-margin-top: 90px; }
@media screen and (min-width: 1171px) {
    .header.is-fixed .header__top { display: none; }
    .header.is-fixed .header__menu { padding: 12px 0; }
    .header.is-fixed .header__menu-inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
    .header.is-fixed .header__nav { width: auto; }
    .header.is-fixed .header__fixed-logo { display: flex; width: 130px; flex: 0 0 auto; }
    .header.is-fixed .header__fixed-logo img { width: 100%; height: auto; }
    .header.is-fixed .header__fixed-btn { display: inline-flex; flex: 0 0 auto; min-width: 0; padding: 12px 26px; }
    .header.is-fixed .header__fixed-actions { display: flex; align-items: center; gap: 20px; flex: 0 0 auto; }
}
@media screen and (max-width: 1170px) {
    .header.is-fixed .header__top { padding: 8px 0; border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .header.is-fixed { animation: none; } }

/* Фото в «Как это было» и премии открываются в галерее */
a.tmf-photos__item { display: block; cursor: zoom-in; }

/* Программа на телефоне: карточки-тезисы наезжают друг на друга при прокрутке (sticky-стопка) */
@media screen and (max-width: 768px) {
    .tmf-about__text { gap: 18px; padding-bottom: 24px; }
    .tmf-about__text > p {
        position: sticky; top: calc(78px + var(--stack-i, 0) * 14px); align-self: start;
        transform-origin: 50% 0; will-change: transform;
        box-shadow: 0 -6px 24px rgba(28, 15, 143, .10), 0 14px 34px rgba(91, 70, 216, .10);
    }
    .tmf-about__text > p:nth-child(1) { --stack-i: 0; }
    .tmf-about__text > p:nth-child(2) { --stack-i: 1; }
    .tmf-about__text > p:nth-child(3) { --stack-i: 2; }
    .tmf-about__text > p:nth-child(4) { --stack-i: 3; }
    .tmf-about__text > p:hover { transform: none; }
}

/* Та же стопка для «Почему стоит прийти» и секций форума (телефон) */
@media screen and (max-width: 768px) {
    .tmf-why, .tmf-sections__grid { padding-bottom: 24px; }
    .tmf-why > .tmf-why__card,
    .tmf-sections__grid > .tmf-section-card {
        position: sticky; top: calc(78px + var(--stack-i, 0) * 14px); align-self: start;
        transform-origin: 50% 0; will-change: transform;
        min-height: 0;
    }
    .tmf-why > .tmf-why__card { box-shadow: 0 -6px 24px rgba(28, 15, 143, .18), 0 14px 34px rgba(91, 70, 216, .2); }
    .tmf-why > .tmf-why__card:hover { transform: none; }
    /* стеклянная карточка секции в стопке должна быть непрозрачной, иначе просвечивают нижние */
    .tmf-sections__grid > .tmf-section-card {
        background: linear-gradient(150deg, #4a1fe0 0%, #2a12bf 55%, #2236e6 100%);
        box-shadow: 0 -8px 28px rgba(10, 4, 80, .35), 0 14px 34px rgba(10, 4, 80, .3);
        -webkit-backdrop-filter: none; backdrop-filter: none;
    }
    .tmf-why > :nth-child(1), .tmf-sections__grid > :nth-child(1) { --stack-i: 0; }
    .tmf-why > :nth-child(2), .tmf-sections__grid > :nth-child(2) { --stack-i: 1; }
    .tmf-why > :nth-child(3), .tmf-sections__grid > :nth-child(3) { --stack-i: 2; }
    .tmf-why > :nth-child(4), .tmf-sections__grid > :nth-child(4) { --stack-i: 3; }
    .tmf-sections__grid > :nth-child(5) { --stack-i: 4; }
    .tmf-sections__grid > :nth-child(6) { --stack-i: 5; }
}

/* TMF27: низ мобильного меню не уходит под «домашнюю» полоску iPhone */
.header-mob__inner { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
/* TMF27: открытое меню закреплено до низа экрана — не удлиняет страницу и закрывает её под панелью Safari (top задаёт скрипт в футере) */
.header-mob.active { position: fixed; bottom: 0; height: auto !important; }
.header.active { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important; transform: none !important; animation: none !important; }

/* TMF27: переключатель языков — глобус с выпадающим списком (как на life-style.uz), в стиле TMF27 */
.tmf-langs { position: relative; flex-direction: row; }
.tmf-langs__btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.1); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .04em; cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s, border-color .2s; }
.tmf-langs__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tmf-langs__globe { flex: 0 0 auto; }
.tmf-langs__arrow { flex: 0 0 auto; transition: transform .25s; }
.tmf-langs.is-open .tmf-langs__btn { background: #fff; border-color: #fff; color: #5b46d8; }
.tmf-langs.is-open .tmf-langs__arrow { transform: rotate(180deg); }
.tmf-langs__drop { position: absolute; top: calc(100% + 10px); right: 0; z-index: 120; min-width: 190px; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px rgba(28,15,143,.28), 0 0 0 1px rgba(91,70,216,.08); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .2s, visibility .2s; }
.tmf-langs.is-open .tmf-langs__drop { opacity: 1; visibility: visible; transform: none; }
.tmf-langs__drop::before { content: ""; position: absolute; top: -6px; right: 22px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); border-radius: 2px; }
.header__lang .tmf-langs__drop ul { display: flex; flex-direction: column; gap: 2px; }
.header__lang .tmf-langs__drop ul li { display: block; }
.header__lang .tmf-langs__drop ul li::after { content: none !important; }
.header__lang .tmf-langs__drop ul li > a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; opacity: 1; color: #231f20; font-weight: 500; font-size: 15px; transition: background .2s, color .2s; }
.tmf-langs__item img { flex: 0 0 auto; width: 24px; height: 16px; object-fit: cover; object-position: left center; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.header__lang .tmf-langs__drop ul li > a.is-active { color: #5b46d8; font-weight: 700; background: rgba(91,70,216,.08); }
.header__lang .tmf-langs__drop ul li > a.is-active::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: linear-gradient(135deg, #d42992, #811ae8); }
@media (hover: hover) {
    .tmf-langs__btn:hover { background: rgba(255,255,255,.22); border-color: #fff; }
    .tmf-langs.is-open .tmf-langs__btn:hover { background: #fff; }
    .header__lang .tmf-langs__drop ul li > a:hover { background: rgba(91,70,216,.1); color: #5b46d8; }
}
/* В закреплённом меню — компактнее */
.header.is-fixed .tmf-langs__btn { height: 40px; }
/* В мобильном меню список открывается слева */
.header-mob__head .tmf-langs__drop { left: 0; right: auto; }
.header-mob__head .tmf-langs__drop::before { left: 22px; right: auto; }
