/* Responsive tablet/mobile layout and mobile navigation styles. */
/* Match menu and image bands to the inner page frame (container minus side padding) */
:root {
  --yabane-inner-frame-width: calc(var(--yabane-frame-width) - 30px);
}

.global-nav,
.page-header,
.home .yabane-hero {
  width: var(--yabane-inner-frame-width) !important;
  max-width: var(--yabane-inner-frame-width) !important;
}

#site-header-container .global-nav {
  flex: 0 0 var(--yabane-inner-frame-width) !important;
}

/* Mobile single-column layout fix */
@media (max-width: 767px) {
  .site-body-container.container,
  #site-header-container.site-header-container.container,
  .global-nav,
  .page-header,
  .home .yabane-hero {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .page .main-section.main-section--col--two,
  .single-club .main-section.main-section--col--two,
  .yabane-news-page .main-section.main-section--col--two,
  .single-club .main-section,
  .page-template-page-club .main-section {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  .page .sub-section.sub-section--col--two,
  .single-club .sub-section.sub-section--col--two,
  .yabane-news-page .sub-section.sub-section--col--two,
  .sub-section,
  .yabane-news-sidebar,
  .yabane-club-sidebar,
  .yabane-inline-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    margin-top: 20px !important;
  }

  .sub-section .widget,
  .yabane-news-sidebar .widget,
  .yabane-club-sidebar .widget,
  .yabane-inline-sidebar .widget,
  .yabane-club-sidebar-inner {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  .page .entry-body,
  .single .entry-body {
    font-size: 1rem !important;
    line-height: 1.9 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .page .entry-body p,
  .single .entry-body p,
  .page .entry-body li,
  .single .entry-body li {
    font-size: 1rem !important;
    line-height: 1.9 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
}

/* iPad / tablet nav fixes */
@media (min-width: 768px) and (max-width: 1024px) {
  body:not(.yabane-view-mobile) .global-nav {
    display: block !important;
  }

  body:not(.yabane-view-mobile) #vk-mobile-nav-menu-btn,
  body:not(.yabane-view-mobile) .vk-mobile-nav-menu-btn,
  body:not(.yabane-view-mobile) #vk-mobile-nav,
  body:not(.yabane-view-mobile) .vk-mobile-nav {
    display: none !important;
  }

  body:not(.yabane-view-mobile) .global-nav .acc-btn {
    display: none !important;
  }

  body:not(.yabane-view-mobile) .global-nav .vk-menu-acc .menu-parent > li > a,
  body:not(.yabane-view-mobile) .global-nav .global-nav-list > li > a {
    display: flex !important;
    width: 100% !important;
    justify-content: center;
    align-items: center;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item {
    flex: 1 1 20% !important;
  }

  body:not(.yabane-view-mobile) .global-nav-list > li.current-menu-item > a,
  body:not(.yabane-view-mobile) .global-nav-list > li.current_page_item > a,
  body:not(.yabane-view-mobile) .global-nav-list > li.current-menu-ancestor > a,
  body:not(.yabane-view-mobile) .global-nav-list > li.current-page-ancestor > a,
  body:not(.yabane-view-mobile) .global-nav-list > li.current_page_ancestor > a,
  body:not(.yabane-view-mobile) .global-nav-list > li.current-menu-parent > a,
  body:not(.yabane-view-mobile) .global-nav-list > li.current-page-parent > a,
  body:not(.yabane-view-mobile) .global-nav-list > li.current_page_parent > a {
    background: linear-gradient(180deg, #2398e4 0%, #137fd0 48%, #0a6ab8 100%) !important;
  }
}

@media (max-width: 991.98px) {
  body.yabane-view-desktop .global-nav,
  body.device-pc .global-nav {
    display: block !important;
  }
}

/* narrow-width global nav stacks vertically */
@media (max-width: 767px) {
  body:not(.yabane-view-mobile) .global-nav .nav,
  body:not(.yabane-view-mobile) .global-nav-list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item,
  body:not(.yabane-view-mobile) .global-nav-list > li {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item + .menu-item::before,
  body:not(.yabane-view-mobile) .global-nav-list > li + li::before {
    display: none !important;
  }

  body:not(.yabane-view-mobile) .global-nav-list > li > a {
    width: 100% !important;
    min-height: 42px !important;
  }
}

/* narrow-width desktop-style layout: stacked global nav, matching hero/header widths, submenu above imagery */
@media (max-width: 767px) {
  body:not(.yabane-view-mobile) {
    --yabane-stacked-band-width: calc(100vw - 52px);
  }

  body:not(.yabane-view-mobile) #vk-mobile-nav-menu-btn,
  body:not(.yabane-view-mobile) .vk-mobile-nav-menu-btn,
  body:not(.yabane-view-mobile) #vk-mobile-nav,
  body:not(.yabane-view-mobile) .vk-mobile-nav {
    display: none !important;
  }

  body:not(.yabane-view-mobile) .yabane-home-section,
  body:not(.yabane-view-mobile) .home .yabane-home-section,
  body:not(.yabane-view-mobile) .yabane-home-entry,
  body:not(.yabane-view-mobile) .yabane-home-entry .entry-body {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body:not(.yabane-view-mobile) .global-nav,
  body:not(.yabane-view-mobile) #site-header-container .global-nav,
  body:not(.yabane-view-mobile) .page-header {
    width: var(--yabane-stacked-band-width) !important;
    max-width: var(--yabane-stacked-band-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  body:not(.yabane-view-mobile) .home .yabane-hero {
    width: var(--yabane-stacked-band-width) !important;
    max-width: var(--yabane-stacked-band-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    flex: none !important;
    overflow: hidden !important;
    position: relative !important;
    z-index: 1 !important;
  }

  body:not(.yabane-view-mobile) .home .yabane-hero img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  body:not(.yabane-view-mobile) #site-header-container .global-nav {
    flex: 0 0 var(--yabane-stacked-band-width) !important;
  }

  body:not(.yabane-view-mobile) .global-nav,
  body:not(.yabane-view-mobile) #site-header-container .global-nav {
    display: block !important;
    position: relative !important;
    z-index: 4000 !important;
    overflow: visible !important;
  }

  body:not(.yabane-view-mobile) .global-nav.yabane-global-nav-fixed {
    width: var(--yabane-stacked-band-width) !important;
    max-width: var(--yabane-stacked-band-width) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
  }

  body:not(.yabane-view-mobile) .global-nav .nav,
  body:not(.yabane-view-mobile) .global-nav-list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item,
  body:not(.yabane-view-mobile) .global-nav-list > li {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item + .menu-item::before,
  body:not(.yabane-view-mobile) .global-nav-list > li + li::before {
    display: none !important;
  }

  body:not(.yabane-view-mobile) .global-nav-list > li > a {
    width: 100% !important;
    min-height: 42px !important;
  }

  body:not(.yabane-view-mobile) .global-nav-list > li.menu-item-has-children > a,
  body:not(.yabane-view-mobile) .global-nav .vk-menu-acc li.menu-item-has-children > a {
    padding-right: 0 !important;
  }

  body:not(.yabane-view-mobile) .global-nav-name {
    width: 100% !important;
    text-align: center !important;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item-has-children,
  body:not(.yabane-view-mobile) .global-nav-list > li.menu-item-has-children {
    z-index: 4001 !important;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item-has-children > .sub-menu,
  body:not(.yabane-view-mobile) .global-nav-list > li.menu-item-has-children > ul.sub-menu {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
    z-index: 5005 !important;
  }

  body:not(.yabane-view-mobile) .global-nav .menu-item-has-children > .sub-menu > li > a {
    padding-left: 32px !important;
  }

  body:not(.yabane-view-mobile) .yabane-hero,
  body:not(.yabane-view-mobile) .page-header,
  body:not(.yabane-view-mobile) .page-header .page-header-inner.container {
    position: relative !important;
    z-index: 1 !important;
  }

  body.yabane-global-nav-active #site-header {
    padding-bottom: 0 !important;
  }
}

/* keep sidebars beside content until global nav switches to stacked layout */
@media (min-width: 768px) and (max-width: 991.98px) {
  .page .main-section.main-section--col--two,
  .single-club .main-section.main-section--col--two,
  .yabane-news-page .main-section.main-section--col--two,
  .single-club .main-section,
  .page-template-page-club .main-section {
    width: calc(100% - var(--yabane-sidebar-width) - 24px) !important;
    max-width: calc(100% - var(--yabane-sidebar-width) - 24px) !important;
    flex: 0 0 calc(100% - var(--yabane-sidebar-width) - 24px) !important;
    margin-bottom: 0 !important;
  }

  .page .sub-section.sub-section--col--two,
  .single-club .sub-section.sub-section--col--two,
  .yabane-news-page .sub-section.sub-section--col--two,
  .sub-section,
  .yabane-news-sidebar,
  .yabane-club-sidebar,
  .yabane-inline-sidebar,
  .single-club .sub-section--col--two,
  .page-template-page-club .sub-section--col--two {
    width: var(--yabane-sidebar-width) !important;
    max-width: var(--yabane-sidebar-width) !important;
    flex: 0 0 var(--yabane-sidebar-width) !important;
    margin-top: 0 !important;
  }

  .yabane-club-sidebar-inner,
  .yabane-news-sidebar,
  .yabane-inline-sidebar {
    margin-top: 0 !important;
    padding-left: 0 !important;
  }
}

/* Compact news labels on narrow layouts */
@media (max-width: 767px) {
  body:not(.yabane-view-desktop) .yabane-news-item {
    grid-template-columns: max-content minmax(0, 1fr) !important;
    column-gap: 10px !important;
    row-gap: 4px !important;
    align-items: center !important;
  }

  body:not(.yabane-view-desktop) .yabane-news-item time {
    grid-column: 1 / -1 !important;
  }

  body:not(.yabane-view-desktop) .yabane-news-category {
    grid-column: 1 / 2 !important;
    grid-row: 2 !important;
    display: inline-flex !important;
    width: auto !important;
    min-width: 78px;
    max-width: max-content;
    justify-content: center;
    justify-self: start;
  }

  body:not(.yabane-view-desktop) .yabane-news-title-wrap {
    grid-column: 2 / 3 !important;
    grid-row: 2 !important;
    display: flex !important;
    align-items: center;
    min-width: 0;
  }
}

/* Keep the news more-link on the heading row in narrow layouts */
@media (max-width: 767px) {
  body:not(.yabane-view-desktop) .yabane-news-section .yabane-section-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content;
    align-items: end;
    column-gap: 12px;
  }

  body:not(.yabane-view-desktop) .yabane-news-section .yabane-section-title {
    margin: 0 !important;
  }

  body:not(.yabane-view-desktop) .yabane-news-section .yabane-more-link {
    margin: 0 !important;
    justify-self: end;
  }
}

.yabane-mobile-header-nav,
.yabane-side-menu-toggle {
  display: none;
}

/* Actual phones use a dedicated Mobile Header Navigation block; the folded button remains for the side/off-canvas menu. */
@media (max-width: 767px) {
  body.device-mobile .global-nav,
  body.device-mobile #site-header-container .global-nav,
  body.yabane-actual-mobile .global-nav,
  body.yabane-actual-mobile #site-header-container .global-nav,
  body.yabane-view-mobile .global-nav,
  body.yabane-view-mobile #site-header-container .global-nav {
    display: none !important;
  }

  body.device-mobile .yabane-mobile-header-nav,
  body.yabane-actual-mobile .yabane-mobile-header-nav,
  body.yabane-view-mobile .yabane-mobile-header-nav {
    display: block !important;
    width: calc(100vw - 52px) !important;
    max-width: calc(100vw - 52px) !important;
    margin: 10px auto 0 !important;
    overflow: hidden;
    border: 1px solid rgba(15, 114, 177, 0.88);
    border-radius: 4px;
    background: linear-gradient(180deg, #59b9f2 0%, #2fa4e7 48%, #1b95dc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), inset 0 -1px 0 rgba(0, 88, 141, 0.14), 0 1px 3px rgba(0, 0, 0, 0.14);
    box-sizing: border-box;
  }

  body.device-mobile .yabane-mobile-header-nav-list,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list,
  body.yabane-view-mobile .yabane-mobile-header-nav-list {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  body.device-mobile .yabane-mobile-header-nav-list > li,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li {
    width: 100%;
    margin: 0;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  body.device-mobile .yabane-mobile-header-nav-list > li:first-child,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li:first-child,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li:first-child {
    border-top: 0;
  }

  body.device-mobile .yabane-mobile-header-nav-list > li > a,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li > a,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    width: 100%;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(180deg, #59b9f2 0%, #2fa4e7 48%, #1b95dc 100%);
    text-shadow: 0 -1px 0 rgba(0, 72, 121, 0.25);
  }

  body.device-mobile .yabane-mobile-header-nav-list > li.current-menu-item > a,
  body.device-mobile .yabane-mobile-header-nav-list > li.current_page_item > a,
  body.device-mobile .yabane-mobile-header-nav-list > li.current-menu-ancestor > a,
  body.device-mobile .yabane-mobile-header-nav-list > li.current-page-ancestor > a,
  body.device-mobile .yabane-mobile-header-nav-list > li > a:hover,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li.current-menu-item > a,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li.current_page_item > a,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li.current-menu-ancestor > a,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li.current-page-ancestor > a,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list > li > a:hover,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li.current-menu-item > a,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li.current_page_item > a,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li.current-menu-ancestor > a,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li.current-page-ancestor > a,
  body.yabane-view-mobile .yabane-mobile-header-nav-list > li > a:hover {
    background: linear-gradient(180deg, #2398e4 0%, #137fd0 48%, #0a6ab8 100%);
  }

  body.device-mobile .yabane-mobile-header-nav-list .sub-menu,
  body.device-mobile .yabane-mobile-header-nav-list .acc-btn,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list .sub-menu,
  body.yabane-actual-mobile .yabane-mobile-header-nav-list .acc-btn,
  body.yabane-view-mobile .yabane-mobile-header-nav-list .sub-menu,
  body.yabane-view-mobile .yabane-mobile-header-nav-list .acc-btn {
    display: none !important;
  }

  body.device-mobile #vk-mobile-nav-menu-btn,
  body.device-mobile .vk-mobile-nav-menu-btn,
  body.device-mobile #vk-mobile-nav,
  body.device-mobile .vk-mobile-nav,
  body.yabane-actual-mobile #vk-mobile-nav-menu-btn,
  body.yabane-actual-mobile .vk-mobile-nav-menu-btn,
  body.yabane-actual-mobile #vk-mobile-nav,
  body.yabane-actual-mobile .vk-mobile-nav,
  body.yabane-view-mobile #vk-mobile-nav-menu-btn,
  body.yabane-view-mobile .vk-mobile-nav-menu-btn,
  body.yabane-view-mobile #vk-mobile-nav,
  body.yabane-view-mobile .vk-mobile-nav {
    display: none !important;
  }

  body.device-mobile .yabane-side-menu-toggle,
  body.yabane-actual-mobile .yabane-side-menu-toggle,
  body.yabane-view-mobile .yabane-side-menu-toggle {
    display: block !important;
    position: fixed;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #333;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    z-index: 5000;
    overflow: hidden;
    text-indent: -9999px;
  }

  body.admin-bar.device-mobile .yabane-side-menu-toggle,
  body.admin-bar.yabane-actual-mobile .yabane-side-menu-toggle,
  body.admin-bar.yabane-view-mobile .yabane-side-menu-toggle {
    top: 51px;
  }

  body.device-mobile .yabane-side-menu-toggle::before,
  body.yabane-actual-mobile .yabane-side-menu-toggle::before,
  body.yabane-view-mobile .yabane-side-menu-toggle::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    width: 18px;
    height: 2px;
    background: #333;
    box-shadow: 0 7px 0 #333, 0 14px 0 #333;
    text-indent: 0;
  }

  body.yabane-side-menu-open .yabane-side-menu-toggle::before {
    content: "×";
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    box-shadow: none;
    color: #333;
    font-size: 26px;
    line-height: 32px;
    text-align: center;
  }

  body.device-mobile .sub-section,
  body.device-mobile .yabane-inline-sidebar,
  body.device-mobile .yabane-news-sidebar,
  body.device-mobile .yabane-club-sidebar,
  body.yabane-actual-mobile .sub-section,
  body.yabane-actual-mobile .yabane-inline-sidebar,
  body.yabane-actual-mobile .yabane-news-sidebar,
  body.yabane-actual-mobile .yabane-club-sidebar,
  body.yabane-view-mobile .sub-section,
  body.yabane-view-mobile .yabane-inline-sidebar,
  body.yabane-view-mobile .yabane-news-sidebar,
  body.yabane-view-mobile .yabane-club-sidebar {
    display: none !important;
  }

  body.yabane-side-menu-open .sub-section,
  body.yabane-side-menu-open .yabane-inline-sidebar,
  body.yabane-side-menu-open .yabane-news-sidebar,
  body.yabane-side-menu-open .yabane-club-sidebar {
    display: block !important;
    position: fixed !important;
    top: 54px;
    right: 8px;
    bottom: 8px;
    width: min(82vw, 320px) !important;
    max-width: min(82vw, 320px) !important;
    height: auto !important;
    margin: 0 !important;
    padding: 16px !important;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    z-index: 4900;
    box-sizing: border-box;
  }

  body.admin-bar.yabane-side-menu-open .sub-section,
  body.admin-bar.yabane-side-menu-open .yabane-inline-sidebar,
  body.admin-bar.yabane-side-menu-open .yabane-news-sidebar,
  body.admin-bar.yabane-side-menu-open .yabane-club-sidebar {
    top: 97px;
  }

  body.device-mobile.yabane-global-nav-active #site-header,
  body.yabane-actual-mobile.yabane-global-nav-active #site-header,
  body.yabane-view-mobile.yabane-global-nav-active #site-header {
    padding-bottom: 0 !important;
  }
}
