/* Mobile fixes, site-wide (feedback 2026-11-24). Loaded on every page after slm-a11y.css. */

/* 1. The header stays at the top on phones and tablets. The inner .wd-site-header is already sticky, but its
   <header> wrapper is only as tall as the header itself, so it scrolled away: the wrapper sticks instead, and the
   headroom script's "hide on scroll down" is switched off here. The drawer, its veil and the search sheet live
   inside the header, so they share its stacking context. */
@media (max-width:1024px){
  header.crocoblocks-theme-builder-location{position:sticky;top:var(--wp-admin--admin-bar--height,0px);z-index:900}
  header.crocoblocks-theme-builder-location .wd-site-header{position:relative;top:auto;transform:none!important}
  header.crocoblocks-theme-builder-location .wd-site-header.wd-site-header-scrolled{box-shadow:0 1px 0 var(--wd-line),0 8px 24px -18px rgba(0,45,29,.35)}
  :where(h1,h2,h3,h4,[id]){scroll-margin-top:calc(var(--slm-hdr-h,64px) + 12px)}
}
@media (max-width:600px){header.crocoblocks-theme-builder-location{top:0}}

/* 2. "Plan a trip to …" / "Plan by topic" bento tiles: on phones every tile takes the full row. The wide-tile rules
   (6th of 7, 7th of 7) are more specific than the one-column rule and opened a second, narrow implicit column. */
@media (max-width:560px){
  body .slm-topics{grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:auto!important;gap:12px}
  body .slm-topics>.slm-topic,body .slm-topics>.slm-topic:nth-child(n){grid-column:1/-1!important;grid-row:auto!important;min-height:200px}
  body .slm-topics>.slm-topic:nth-child(1){min-height:240px}
  body .slm-topics>.slm-topic:nth-child(1) .slm-topic-t{font-size:30px}
}

/* 3. Footer on phones: less empty space between the blocks, and the beach photo at the bottom runs edge to edge
   with a short fade, so the page does not end in a white band. */
@media (max-width:767px){
  body .wd-site-footer .wd-newsletter{margin-bottom:28px;padding-bottom:28px}
  body .wd-site-footer .wd-footer-grid{gap:28px}
  body .wd-site-footer .slm-footer-cols{gap:20px}
  body .wd-site-footer .slm-footer-disclosure{margin-top:20px}
  body .wd-site-footer .wd-footer-bottom{margin-top:20px;padding-top:16px;padding-bottom:8px}
  body .wd-site-footer .slm-footer-scene{margin:0 calc(50% - 50vw);height:clamp(180px,52vw,260px);-webkit-mask-image:linear-gradient(to bottom,transparent 0%,var(--wd-black) 22%);mask-image:linear-gradient(to bottom,transparent 0%,var(--wd-black) 22%)}
}

/* 4. Mobile drawer: destination links as rows like the desktop mega menu (icon box, title, one line of text).
   Maldives icons on mint, Sri Lanka icons on coral, the same tints as the mega menus. */
#wd-drawer .slm-dmr{display:flex;align-items:center;justify-content:flex-start;gap:14px;padding:12px 2px;text-decoration:none}
#wd-drawer .slm-dmr .wd-icon-box{flex:none;display:grid;place-items:center;width:42px;height:42px;margin:0;border-radius:10px}
#wd-drawer .slm-dmr .wd-icon-box .wd-icon{width:22px;height:22px}
#wd-drawer .slm-dmr-t{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:3px}
#wd-drawer .slm-dmr-t strong{font-size:15.5px;font-weight:600;line-height:1.3;color:var(--wd-ink)}
#wd-drawer .slm-dmr-x{font-size:13px;line-height:1.45;color:var(--wd-muted)}
#wd-drawer .slm-dmr .slm-dmr-go{flex:none;width:18px;height:18px;opacity:.45;transition:transform .2s cubic-bezier(.23,1,.32,1),opacity .2s}
#wd-drawer .slm-dmr:active .slm-dmr-go{transform:translateX(3px);opacity:.8}
#wd-drawer .slm-dacc-maldives .slm-dmr .wd-icon-box{background:var(--wd-mint-soft)}
#wd-drawer .slm-dacc-maldives .slm-dmr .wd-icon-box .wd-icon{--wd-icon-tint:var(--wd-mint)}
#wd-drawer .slm-dacc-srilanka .slm-dmr .wd-icon-box{background:var(--wd-coral-soft)}
#wd-drawer .slm-dacc-srilanka .slm-dmr .wd-icon-box .wd-icon{--wd-icon-tint:var(--wd-coral)}
#wd-drawer .slm-dmr.is-all .slm-dmr-t strong{color:var(--wd-emerald)}
