/* Mobile layout (Figma 360px) */
@media (max-width: 767px) {
    :root {
        --page-inset-top: 45px;
        --header-offset-top: var(--page-inset-top);
        --header-mobile-width: 300px;
        --header-width: min(var(--header-mobile-width), 100%);
    }

    body:has(.site-header):not(.home-page) {
        padding: var(--page-inset-top) var(--wrapper-pad) 0;
        box-sizing: border-box;
    }

    body:has(.site-header) > .header.header-main.site-header,
    .header.header-main.site-header,
    .home-hero__inner > .header.header-main.home-header,
    .site-header {
        --header-width: min(var(--header-mobile-width), 100%);
        width: var(--header-width) !important;
        max-width: var(--header-mobile-width);
        height: 60px !important;
        min-height: 60px !important;
        margin-top: 0 !important;
        margin-left: auto;
        margin-right: auto;
        border-radius: 30px;
        box-shadow: 0 0 16px rgba(0, 0, 0, 0.1) !important;
        overflow: hidden;
        box-sizing: border-box;
    }

    .site-header {
        position: relative;
        top: auto;
    }

    .header-main .wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0;
        height: 100%;
        overflow: hidden;
        box-sizing: border-box;
    }

    .header-main .header__menu {
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr) 48px;
        align-items: center;
        column-gap: 8px;
        height: 100%;
        padding: 0 12px;
        overflow: hidden;
        box-sizing: border-box;
    }

    .header-main .header__menu .menu {
        display: none !important;
    }

    /* Combined logo viewBox 147×170 — keep aspect so caption stays visible */
    .header-main .header__menu .logo,
    .header-main .header__menu .logo.yar-logo--header {
        grid-column: 1;
        grid-row: 1;
        width: 30px;
        min-width: 30px;
        max-width: 30px;
        height: 52px;
        padding-left: 0 !important;
        overflow: visible;
    }

    .header-main .header__menu .logo a {
        display: block;
        width: 30px;
        height: 52px;
        line-height: 0;
    }

    .header-main .header__menu .logo .yar-logo__img {
        display: block;
        width: 30px;
        height: 52px;
        margin: 0 !important;
        object-fit: contain;
        object-position: left center;
    }

    .header__page-title {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
        width: fit-content;
        max-width: calc(100% - 8px);
        text-align: center;
        font-size: 12px;
        font-weight: 400;
        line-height: normal;
        color: var(--color-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 0 3px;
        margin: 0;
        position: relative;
    }

    .header__page-title::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: 2px;
        background: var(--color-primary);
        border-radius: 30px;
    }

    .header__actions {
        grid-column: 3;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        min-width: 48px;
        margin-left: 0;
    }

    .header-main .burger {
        display: block !important;
        flex: 0 0 20px;
        width: 20px;
        min-width: 20px;
        height: 20px;
        min-height: 20px;
        margin: 0;
        position: relative;
        cursor: pointer;
        z-index: 2;
    }

    .header-main .burger span {
        top: 9px;
        height: 2px;
        width: 100%;
        background: #000;
        position: absolute;
        left: 0;
    }

    .header-main .burger span::before {
        top: -7px;
        height: 2px;
        width: 100%;
        background: #000;
        position: absolute;
        left: 0;
        content: "";
    }

    .header-main .burger span::after {
        top: 7px;
        height: 2px;
        width: 100%;
        background: #000;
        position: absolute;
        left: 0;
        content: "";
    }

    .header-main .header__actions .login {
        flex: 0 0 20px;
        margin: 0;
    }

    .header-main .header__actions .login img,
    .header-main .header__actions .login .account__login img {
        display: block;
        width: 20px;
        height: 20px;
        max-width: 20px !important;
        max-height: 20px !important;
    }

    /* Schedule page */
    .schedule-page {
        padding: 16px 0 40px;
    }

    .schedule-page__title {
        font-size: 40px;
        font-weight: 500;
        width: 100%;
        text-align: center;
    }

    .schedule-page__message {
        font-size: 15px;
    }

    .schedule-page__header {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-bottom: 20px;
    }

    .schedule-page__tabs {
        gap: 0;
        justify-content: center;
        width: 100%;
    }

    .schedule-page__tab {
        font-size: 30px;
        padding: 0 24px 8px;
        margin: 0;
    }

    .schedule-page__tab:not(:first-child) {
        border-left: 1px solid var(--color-primary);
    }

    .schedule-page__tab::after {
        height: 5px;
    }

    .schedule-page__day-title {
        font-size: 30px;
        font-weight: 500;
        margin-bottom: 24px;
        letter-spacing: normal;
        text-align: center;
    }

    .schedule-page__row {
        position: relative;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 20px 48px 20px 20px;
        min-height: 0;
    }

    .schedule-page__row-time {
        min-width: 0;
        font-size: 15px;
        font-weight: 500;
    }

    .schedule-page__row-title {
        font-size: 15px;
        font-weight: 400;
    }

    .schedule-page__row-venue {
        font-size: 12px;
        margin-top: 0;
    }

    .schedule-page__favorite-wrap {
        position: absolute;
        top: 20px;
        right: 20px;
        align-self: auto;
        order: unset;
    }

    .schedule-page__favorite {
        width: 30px;
        height: 30px;
    }

    .schedule-page__event-block {
        position: relative;
        padding: 20px 48px 20px 20px;
    }

    .schedule-page__event-block-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
        padding-right: 0;
    }

    .schedule-page__event-block-info {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .schedule-page__event-block-time {
        min-width: 0;
        font-size: 15px;
        font-weight: 500;
    }

    .schedule-page__event-block-title {
        font-size: 15px;
        font-weight: 400;
    }

    .schedule-page__event-block-venue {
        font-size: 12px;
        margin-top: 0;
    }

    .schedule-page__event-block-header > .schedule-page__favorite-wrap {
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .schedule-page__cards {
        gap: 16px;
    }

    .schedule-page__card {
        padding: 20px;
        min-height: 0;
    }

    body:has(.schedule-page) .schedule-page__header .schedule-page__title {
        display: none;
    }

    /* Catalog page */
    .catalog-page {
        padding: 0 0 40px;
    }

    .catalog-page .catalog-page__header {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 20px var(--wrapper-pad) 24px;
        background: #fff;
        border-radius: 30px;
        text-align: center;
        margin-bottom: 20px !important;
    }

    .catalog-page .catalog-page__title {
        font-size: 40px;
        font-weight: 500;
        letter-spacing: normal;
        width: 100%;
        text-align: start;
        padding-left: 0;
        padding-bottom: 0;
        line-height: 1.1;
    }

    .catalog-page__submit {
        width: 100%;
        max-width: none;
        height: 30px;
        min-height: 30px;
        font-size: 15px;
        font-weight: 500;
        padding: 0 16px;
        border-radius: 30px;
    }

    .catalog-page__filters {
        margin-bottom: 24px;
    }

    .catalog-page__filters-row {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 10px;
    }

    .catalog-page__dropdown-toggle {
      height: 30px;
      min-height: 30px;
      padding: 0 15px;
      font-size: 15px;
      border-width: 1px;
      border-radius: 30px;
    }

    .catalog-page__dropdown.is-open .catalog-page__dropdown-toggle {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
      border-bottom-color: transparent;
    }

    .catalog-page__header-wrapper {
        width: 100%;
    }

    .catalog-page__dropdown-label {
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .catalog-page__dropdown-chevron {
      width: 12px;
      height: 12px;
    }

    .catalog-page__dropdown-menu {
      max-height: min(280px, 50vh);
      padding: 12px 0 16px;
      border-radius: 0 0 30px 30px;
    }

    .catalog-page__dropdown--org .catalog-page__dropdown-menu {
      max-height: min(360px, 55vh);
    }

    .catalog-page__dropdown-option {
      padding: 8px 15px;
      font-size: 15px;
      line-height: 1.2;
    }

    .catalog-page__dropdown--org .catalog-page__dropdown-option {
      padding: 6px 15px;
      font-size: 12px;
      line-height: 1.2;
    }

    .catalog-page__apply {
        width: 100%;
        height: 30px;
        min-height: 30px;
        font-size: 15px;
        border-radius: 30px;
        padding: 0 16px;
    }

    .catalog-page__grid-viewport {
        position: relative;
        margin: 0 calc(-1 * var(--wrapper-pad));
        padding: 0 var(--wrapper-pad);
        overflow: hidden;
    }

    .catalog-page__grid-viewport::before,
    .catalog-page__grid-viewport::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 31px;
        z-index: 2;
        pointer-events: none;
    }

    .catalog-page__grid-viewport::before {
        left: 0;
        background: linear-gradient(90deg, #efefef 0%, rgba(239, 239, 239, 0) 100%);
    }

    .catalog-page__grid-viewport::after {
        right: 0;
        background: linear-gradient(270deg, #efefef 0%, rgba(239, 239, 239, 0) 100%);
    }

    .catalog-page__grid {
        display: grid;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: 244px;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 32px;
        padding-bottom: 4px;
        align-content: start;
    }

    .catalog-page__grid::-webkit-scrollbar {
        display: none;
    }

    .catalog-page__card {
        flex: none;
        width: 244px;
        min-height: 272px;
        padding: 15px;
        scroll-snap-align: start;
    }

    .catalog-page__card-type {
        font-size: 12px;
        margin-bottom: 12px;
    }

    .catalog-page__card-title {
        font-size: 15px;
        font-weight: 500;
        margin-bottom: 12px;
        letter-spacing: normal;
        -webkit-line-clamp: 6;
    }

    .catalog-page__card-org {
        font-size: 12px;
        margin-bottom: 16px;
    }

    .catalog-page__card-actions {
        gap: 10px;
    }

    .catalog-page__btn {
        height: 30px;
        font-size: 15px;
        border-radius: 30px;
    }

    .catalog-page__page {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    /* Concurs page */
    body:has(.concurs-page) .concurs-page {
        padding: 16px 0 40px;
    }
}
