/*
 * XALOS Production Atomic - responsive stability layer.
 * Loaded after main.css. It changes presentation only and never hides desktop content.
 */

@media (max-width:1024px) {
  html,
  body,
  body.xalos-theme {
    width:100%;
    max-width:100%;
    overflow-x:hidden !important;
  }

  body.xalos-theme *,
  body.xalos-theme *::before,
  body.xalos-theme *::after { box-sizing:border-box; }

  body.xalos-theme main,
  body.xalos-theme .xalos-main,
  body.xalos-theme .xalos-page,
  body.xalos-theme .xalos-site-footer,
  body.xalos-theme .entry-content {
    width:100%;
    max-width:100%;
    min-width:0;
  }

  body.xalos-theme main *,
  body.xalos-theme .xalos-site-footer * { min-width:0; }

  body.xalos-theme img,
  body.xalos-theme video,
  body.xalos-theme iframe,
  body.xalos-theme embed,
  body.xalos-theme object { max-width:100%; }

  body.xalos-theme img { height:auto; }

  body.xalos-theme p,
  body.xalos-theme h1,
  body.xalos-theme h2,
  body.xalos-theme h3,
  body.xalos-theme h4,
  body.xalos-theme li,
  body.xalos-theme a { overflow-wrap:break-word; }

  body.xalos-theme .xalos-reveal {
    opacity:1 !important;
    transform:none !important;
  }

  body.xalos-theme .xalos-auto-events-track,
  body.xalos-theme .xalos-carousel-track { will-change:auto !important; }

  body.xalos-theme .xalos-hero-actions,
  body.xalos-theme.xalos-menu-open::after {
    -webkit-backdrop-filter:none !important;
    backdrop-filter:none !important;
  }

  body.xalos-theme .xalos-container,
  body.xalos-theme .xalos-content-shell {
    width:min(calc(100% - 28px),1180px) !important;
    max-width:100% !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}

@media (max-width:860px) {
  body.xalos-theme .xalos-site-header {
    width:100%;
    background:#090909 !important;
  }

  body.xalos-theme .xalos-header-inner {
    position:relative !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:100% !important;
    height:72px !important;
    padding:0 14px !important;
    margin:0 !important;
    gap:0 !important;
  }

  body.xalos-theme .xalos-brand {
    position:absolute !important;
    top:50% !important;
    left:50% !important;
    transform:translate(-50%,-50%) !important;
    z-index:1003 !important;
    margin:0 !important;
    max-width:56vw !important;
  }

  body.xalos-theme .xalos-brand a,
  body.xalos-theme .xalos-brand .custom-logo-link {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
  }

  body.xalos-theme .xalos-brand img,
  body.xalos-theme .xalos-brand .custom-logo {
    display:block !important;
    width:min(var(--xalos-logo-width),145px) !important;
    max-width:100% !important;
    max-height:46px !important;
    object-fit:contain !important;
    margin:0 auto !important;
  }

  body.xalos-theme .xalos-menu-toggle {
    display:block !important;
    position:absolute !important;
    top:50% !important;
    right:12px !important;
    transform:translateY(-50%) !important;
    z-index:1005 !important;
    margin:0 !important;
    padding:9px !important;
  }

  body.xalos-theme .xalos-primary-nav {
    position:fixed !important;
    top:72px !important;
    right:0 !important;
    left:auto !important;
    width:min(88vw,370px) !important;
    height:calc(100vh - 72px) !important;
    height:calc(100svh - 72px) !important;
    max-height:none !important;
    padding:22px 22px 36px !important;
    background:#080808 !important;
    border-top:1px solid rgba(217,170,51,.24) !important;
    border-left:1px solid rgba(217,170,51,.18) !important;
    transform:translateX(105%) !important;
    opacity:1 !important;
    visibility:visible !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch;
    z-index:1002 !important;
  }

  body.xalos-theme .xalos-primary-nav.is-open { transform:translateX(0) !important; }

  body.xalos-theme .xalos-menu {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    width:100% !important;
    gap:0 !important;
  }

  body.xalos-theme .xalos-menu li,
  body.xalos-theme .xalos-menu a { width:100% !important; }

  body.xalos-theme .xalos-menu a {
    display:flex !important;
    align-items:center !important;
    min-height:48px !important;
    padding:13px 2px !important;
  }

  body.admin-bar.xalos-theme .xalos-primary-nav {
    top:118px !important;
    height:calc(100vh - 118px) !important;
    height:calc(100svh - 118px) !important;
  }

  /* Never hide content available on desktop. */
  body.xalos-theme .xalos-hero-actions {
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
    position:relative !important;
    z-index:10 !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    width:min(calc(100% - 28px),365px) !important;
    max-width:365px !important;
    height:auto !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 auto !important;
    padding:12px 15px !important;
    overflow:visible !important;
    transform:none !important;
    background:rgba(0,0,0,.78) !important;
  }

  body.xalos-theme .xalos-hero-actions p {
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    margin:0 0 7px !important;
    font-size:10px !important;
    line-height:1.25 !important;
    text-align:center !important;
  }

  body.xalos-theme .xalos-hero-actions .wp-block-buttons {
    display:flex !important;
    visibility:visible !important;
    opacity:1 !important;
    justify-content:center !important;
    align-items:center !important;
    flex-wrap:wrap !important;
    width:100% !important;
    gap:7px !important;
  }

  body.xalos-theme .xalos-hero-actions .wp-block-button {
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    margin:0 !important;
  }

  body.xalos-theme .xalos-hero-actions .wp-block-button__link {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    min-height:34px !important;
    padding:.55em .9em !important;
    font-size:9px !important;
    line-height:1.15 !important;
    white-space:nowrap !important;
  }

  body.xalos-theme .xalos-hero {
    position:relative !important;
    display:flex !important;
    height:auto !important;
    min-height:470px !important;
    overflow:hidden !important;
  }

  body.xalos-theme .xalos-hero .wp-block-cover__inner-container {
    position:relative !important;
    z-index:4 !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:flex-end !important;
    width:100% !important;
    min-height:inherit !important;
    height:auto !important;
    padding:20px 12px 24px !important;
    overflow:visible !important;
  }

  body.xalos-theme .xalos-hero .wp-block-cover__image-background {
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    max-width:none !important;
    object-fit:cover !important;
    object-position:center !important;
  }

  body.xalos-theme .xalos-events-blog-layout,
  body.xalos-theme .xalos-single-event-body { grid-template-columns:1fr !important; }

  body.xalos-theme .xalos-events-sidebar { position:static !important; }
}

@media (max-width:600px) {
  body.xalos-theme .wp-block-columns {
    flex-direction:column !important;
    flex-wrap:nowrap !important;
  }

  body.xalos-theme .wp-block-columns > .wp-block-column {
    flex:1 1 100% !important;
    width:100% !important;
    max-width:100% !important;
  }

  body.xalos-theme .xalos-hero { min-height:455px !important; }

  body.xalos-theme .xalos-auto-events-carousel {
    width:100% !important;
    max-width:100% !important;
    padding:0 10px !important;
    overflow:hidden !important;
  }

  body.xalos-theme .xalos-auto-events-viewport {
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x pan-y;
  }

  body.xalos-theme .xalos-auto-events-viewport::-webkit-scrollbar { display:none; }

  body.xalos-theme .xalos-auto-event-card {
    flex:0 0 min(74vw,290px) !important;
    width:min(74vw,290px) !important;
    min-width:min(74vw,290px) !important;
    max-width:min(74vw,290px) !important;
  }

  body.xalos-theme .xalos-auto-events-carousel .xalos-auto-arrow { display:none !important; }

  body.xalos-theme .xalos-events-list-item {
    grid-template-columns:1fr !important;
    width:100% !important;
    min-height:0 !important;
  }

  body.xalos-theme .xalos-events-list-image {
    width:100% !important;
    min-height:0 !important;
    aspect-ratio:4/3 !important;
  }

  body.xalos-theme .xalos-events-list-copy {
    width:100% !important;
    padding:20px !important;
  }

  body.xalos-theme .xalos-events-sidebar-list { grid-template-columns:1fr !important; }

  body.xalos-theme .xalos-single-event-poster {
    width:min(82vw,350px) !important;
    max-width:100% !important;
    margin:0 auto !important;
  }

  body.xalos-theme .xalos-single-event-meta { grid-template-columns:1fr !important; }

  body.xalos-theme .xalos-single-event-actions {
    display:flex !important;
    flex-direction:column !important;
    width:100% !important;
  }

  body.xalos-theme .xalos-single-event-actions .xalos-inline-button {
    width:100% !important;
    text-align:center !important;
  }

  body.xalos-theme .xalos-form { grid-template-columns:1fr !important; }
  body.xalos-theme .xalos-form .full { grid-column:auto !important; }

  body.xalos-theme .xalos-form input,
  body.xalos-theme .xalos-form select,
  body.xalos-theme .xalos-form textarea {
    width:100% !important;
    font-size:16px !important;
  }

  body.xalos-theme .xalos-site-footer .wp-block-columns {
    flex-direction:column !important;
    flex-wrap:nowrap !important;
  }

  body.xalos-theme .xalos-site-footer .wp-block-column {
    flex:1 1 100% !important;
    width:100% !important;
    max-width:100% !important;
  }
}

@media (max-width:375px) {
  body.xalos-theme .xalos-header-inner {
    height:64px !important;
    padding:0 8px !important;
  }

  body.xalos-theme .xalos-brand img,
  body.xalos-theme .xalos-brand .custom-logo {
    width:108px !important;
    max-height:38px !important;
  }

  body.xalos-theme .xalos-menu-toggle { right:5px !important; }

  body.xalos-theme .xalos-primary-nav {
    top:64px !important;
    width:94vw !important;
    height:calc(100vh - 64px) !important;
    height:calc(100svh - 64px) !important;
  }

  body.xalos-theme .xalos-hero { min-height:465px !important; }

  body.xalos-theme .xalos-hero-actions {
    width:calc(100% - 20px) !important;
    max-width:290px !important;
    padding:10px 12px !important;
  }

  body.xalos-theme .xalos-hero-actions .wp-block-buttons {
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:6px !important;
  }

  body.xalos-theme .xalos-hero-actions .wp-block-button,
  body.xalos-theme .xalos-hero-actions .wp-block-button__link { width:100% !important; }

  body.xalos-theme .xalos-auto-event-card {
    flex-basis:80vw !important;
    width:80vw !important;
    min-width:80vw !important;
    max-width:80vw !important;
  }
}

@media (hover:none) and (pointer:coarse) {
  body.xalos-theme .xalos-auto-event-overlay {
    opacity:1 !important;
    visibility:visible !important;
  }

  body.xalos-theme .xalos-service-card:hover img,
  body.xalos-theme .xalos-auto-event-card:hover,
  body.xalos-theme .xalos-auto-event-card:hover .xalos-auto-event-poster,
  body.xalos-theme .xalos-events-list-item:hover,
  body.xalos-theme .xalos-events-list-item:hover .xalos-events-list-poster { transform:none !important; }
}
