/* AWE mobile layer, shared by every page. Phones and small tablets only (<=768px).
   Loaded after each page's own <style>, so it only adjusts what phones need:
   1. more screen space   2. 44px tap targets   3. readable text   6. swipe rows instead of tall stacks */

.float-bubbles .fb-toggle { display: none; }

@media (max-width: 768px) {

  /* ── 1. Screen space: header + sticky CTA slide away while scrolling down ── */
  #navbar {
    transition: height 0.4s ease, background 0.4s ease, box-shadow 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  }
  body.awe-bars-hidden #navbar { transform: translateY(-100%); }
  body.awe-bars-hidden:has(#mob-menu.open) #navbar,
  #navbar:focus-within { transform: none; }

  .sticky-cta { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease; }
  body.awe-bars-hidden .sticky-cta { transform: translateY(110%); }

  /* Menu icon: 2px lines, burgundy on the cream bar; cream with a soft dark edge while the
     header is see-through over a photo (contact.html's header is always solid: .awe-nav-solid) */
  #hamburger span { height: 2px !important; border-radius: 2px; background: #722F37 !important; }
  #navbar:not(.scrolled):not(.awe-nav-solid) #hamburger span {
    background: #F5F0EB !important;
    box-shadow: 0 0 0 0.5px rgba(20, 10, 12, 0.35), 0 1px 4px rgba(20, 10, 12, 0.6);
  }
  #hamburger.is-open .hb-top { transform: translateY(8px) rotate(45deg); }
  #hamburger.is-open .hb-bot { transform: translateY(-8px) rotate(-45deg); }

  /* reisprogramma: day tabs move up into the space the header leaves */
  body.awe-bars-hidden .day-nav { top: 0 !important; }

  /* Floating buttons: one toggle that opens Instagram, TikTok and contact */
  .float-bubbles {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    right: 16px !important;
    gap: 10px !important;
    pointer-events: none !important;
  }
  .float-bubbles .fb-toggle { pointer-events: auto !important; }
  .float-bubbles.fb-ready > .float-bubble:not(.fb-toggle) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important;
    transform: translateY(16px) scale(0.6);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, visibility 0s linear 0.4s;
  }
  .float-bubbles.fb-open > .float-bubble:not(.fb-toggle) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important;
    transform: none;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--fb-i, 0) * 45ms), opacity 0.25s ease calc(var(--fb-i, 0) * 45ms), visibility 0s;
  }
  .float-bubbles .fb-toggle {
    display: flex;
    width: 50px !important;
    height: 50px !important;
    padding: 0;
    cursor: pointer;
    background: #C9A96E;
    color: #4A1A20;
    border: 1.5px solid #722F37;
    box-shadow: 0 14px 32px -10px rgba(74, 26, 32, 0.55), 0 4px 10px -4px rgba(20, 10, 12, 0.3);
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  .float-bubbles .fb-toggle:hover { background: #C9A96E; color: #4A1A20; transform: none; }
  .float-bubbles .fb-toggle:active { transform: scale(0.92); }
  .float-bubbles .fb-toggle:focus-visible { outline: 2px solid #C9A96E; outline-offset: 4px; }
  .fb-toggle svg {
    position: absolute;
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  }
  .fb-toggle .fb-ico-close { opacity: 0; transform: rotate(-90deg) scale(0.5); }
  .fb-open .fb-toggle .fb-ico-open { opacity: 0; transform: rotate(90deg) scale(0.5); }
  .fb-open .fb-toggle .fb-ico-close { opacity: 1; transform: none; }

  /* ── 2. Tap targets: at least 44px ── */
  footer a {
    display: flex !important;
    align-items: center;
    min-height: 44px;
  }
  footer a:has(> svg),
  footer a.social-icon {
    justify-content: center;
    min-width: 44px;
  }
  footer div:has(> a:not(.social-icon):not(:has(> svg))) { row-gap: 0 !important; }
  footer div:has(> a:not(.social-icon):not(:has(> svg))) > span {
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  /* inline links: bigger hit area without moving the layout */
  .breadcrumb a,
  a.breadcrumb,
  .contacts-row a {
    display: inline-block;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    margin-top: -12px !important;
    margin-bottom: -12px !important;
  }
  .breadcrumb a,
  a.breadcrumb {
    padding-left: 6px !important;
    padding-right: 6px !important;
    margin-left: -6px !important;
    margin-right: -6px !important;
  }

  .chip,
  .g-more-btn,
  .mob-lang-btn { min-height: 44px; min-width: 44px; }
  .day-nav a { min-height: 44px; display: inline-flex !important; align-items: center; }
  .jm-bp-close { width: 44px !important; height: 44px !important; }

  /* ── 3. Readable text: labels at least 12px, body copy at least 15px ──
     (anything else still under 12px is raised by js/mobile.js) */
  .label,
  .hero-eyebrow,
  .intro-eyebrow,
  .page-header-eyebrow,
  p.eyebrow,
  .breadcrumb,
  a.breadcrumb,
  .hero-scroll-cue,
  [style*="font-size:9px"],
  [style*="font-size: 9px"],
  [style*="font-size:10px"],
  [style*="font-size: 10px"],
  [style*="font-size:10.5px"],
  [style*="font-size: 10.5px"],
  [style*="font-size:11px"],
  [style*="font-size: 11px"],
  [style*="font-size:11.5px"],
  [style*="font-size: 11.5px"] { font-size: 12px !important; }
  .page-header-eyebrow { letter-spacing: 1.5px !important; white-space: nowrap; }

  .hiw-more-body,
  .exp-desc,
  .feat-desc,
  .region-desc,
  .val-card p,
  .g-grid-wrap p,
  .ziel-grid [style*="font-size:12.5px"],
  .team-grid p[style*="font-size:14px"] { font-size: 15px !important; }
  .dest-card-desc { font-size: 16px !important; }

  /* ── 6. Shorter pages: secondary card stacks become swipe rows ── */
  .day-preview-grid,
  .gallery-grid,
  .ziel-grid,
  .team-grid,
  .feat-grid,
  .g6,
  .other-grid:has(> :nth-child(3)) {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: auto !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 4px 20px 12px !important;
  }
  .day-preview-grid::-webkit-scrollbar,
  .gallery-grid::-webkit-scrollbar,
  .ziel-grid::-webkit-scrollbar,
  .team-grid::-webkit-scrollbar,
  .feat-grid::-webkit-scrollbar,
  .g6::-webkit-scrollbar,
  .other-grid::-webkit-scrollbar { display: none; }

  .day-preview-grid > *,
  .gallery-grid > *,
  .ziel-grid > *,
  .team-grid > *,
  .feat-grid > *,
  .g6 > *,
  .other-grid:has(> :nth-child(3)) > * {
    flex: 0 0 82% !important;
    max-width: none !important;
    min-width: 0;
    scroll-snap-align: start;
  }
  .gallery-grid > .gi,
  .g6 > .gi { height: 240px !important; }
}
