/* Dream Holiday — app layer.
   Phone and tablet only (<= 1024px): bottom tab bar, compact sticky
   header, bigger touch targets and app-style cards. Desktop keeps the
   website layout, so nothing here applies above 1024px. */

:root{
  --ab-h:64px;
  --ab-safe:env(safe-area-inset-bottom, 0px);
}

/* standalone (installed) app: no browser chrome, use the safe areas */
@media (display-mode: standalone){
  .topbar{display:none}
  body{padding-top:env(safe-area-inset-top, 0px)}
}

@media (max-width:1024px){

  /* ---------- page frame ---------- */
  body{padding-bottom:calc(var(--ab-h) + var(--ab-safe) + 8px)}
  .container{padding-left:16px;padding-right:16px}
  html{scroll-padding-top:76px}

  /* ---------- top bar: only what is useful on a phone ---------- */
  .topbar{font-size:.74rem}
  .topbar .tb-left a:nth-child(2),
  .topbar .tb-right .tb-dir,
  .topbar .tb-right a[href*="facebook"],
  .topbar .tb-right a[href*="instagram"],
  .topbar .tb-right a[href*="linkedin"]{display:none}

  /* ---------- header: compact, sticky, hides when scrolling down --- */
  .site-header{position:sticky;top:0;z-index:60;
    transition:transform .25s var(--ease)}
  html.hdr-hide .site-header{transform:translateY(-110%)}
  .site-header .hdr-card{padding:8px 12px;border-radius:0 0 18px 18px}
  .site-header .logo img{width:150px;height:auto}
  .site-header .hdr-acts{display:flex;gap:8px}
  .site-header .hdr-acts .hdr-locate{display:none}
  .site-header .header-cta{padding:9px 14px}
  .nav-toggle{min-width:44px;min-height:44px}

  /* ---------- touch targets ---------- */
  .btn,.nav a,.appbar a,.appbar button{min-height:44px}
  .btn-sm{min-height:40px}
  .btn-block{width:100%;justify-content:center}

  /* ---------- app-style cards ---------- */
  .card,.tier,.rv-card,.blog-card,.dest-card{border-radius:18px}
  section{scroll-margin-top:76px}

  /* ---------- bottom tab bar ---------- */
  .appbar{position:fixed;left:0;right:0;bottom:0;z-index:70;
    display:grid;grid-template-columns:repeat(5,1fr);
    align-items:stretch;
    padding:6px 4px calc(6px + var(--ab-safe));
    background:rgba(255,255,255,.92);
    backdrop-filter:saturate(180%) blur(14px);
    -webkit-backdrop-filter:saturate(180%) blur(14px);
    border-top:1px solid var(--line);
    box-shadow:0 -8px 28px -18px rgba(17,8,85,.5)}
  .ab-item{display:flex;flex-direction:column;align-items:center;
    justify-content:center;gap:3px;border:0;background:none;
    padding:6px 2px;font:inherit;font-size:.68rem;font-weight:500;
    color:var(--muted);cursor:pointer;border-radius:14px;
    text-decoration:none;-webkit-tap-highlight-color:transparent;
    transition:color .18s var(--ease),background .18s var(--ease)}
  .ab-item:active{background:var(--brand-50);transform:scale(.97)}
  .ab-ico{display:grid;place-items:center;width:30px;height:30px;
    border-radius:10px;transition:background .2s var(--ease)}
  .ab-ico svg{width:22px;height:22px}
  .ab-lab{line-height:1}
  .ab-item.is-on{color:var(--brand)}
  .ab-item.is-on .ab-ico{background:var(--brand-50)}
  .ab-item.is-on .ab-lab{font-weight:700}

  /* ---------- "More" sheet ---------- */
  .ab-sheet{position:fixed;inset:0;z-index:90;background:rgba(10,6,40,.5);
    backdrop-filter:blur(2px);display:flex;align-items:flex-end;
    animation:absFade .2s ease-out}
  .ab-sheet[hidden]{display:none}
  .abs-box{width:100%;max-height:86vh;display:flex;flex-direction:column;
    background:var(--surface);border-radius:22px 22px 0 0;
    padding:10px 16px calc(18px + var(--ab-safe));
    animation:absUp .26s var(--ease)}
  .abs-grab{width:42px;height:4px;border-radius:99px;background:var(--line);
    margin:2px auto 10px}
  .abs-head{display:flex;align-items:center;justify-content:space-between;
    margin-bottom:6px}
  .abs-head b{font-family:var(--font-head);font-size:1.05rem;
    color:var(--brand)}
  .abs-x{border:0;background:var(--brand-50);color:var(--brand);
    width:36px;height:36px;border-radius:50%;cursor:pointer;
    font-size:1rem}
  .abs-scroll{overflow:auto;-webkit-overflow-scrolling:touch}
  .abs-h{margin:14px 0 8px;font-size:.78rem;letter-spacing:.06em;
    text-transform:uppercase;color:var(--muted);font-family:var(--font-body)}
  .abs-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
  .abs-link{display:flex;flex-direction:column;align-items:center;
    gap:6px;padding:14px 6px;border-radius:16px;background:var(--page);
    border:1px solid var(--line);color:var(--brand);font-size:.78rem;
    font-weight:500;text-align:center;min-height:86px;
    justify-content:center}
  .abs-link:active{transform:scale(.97);background:var(--brand-50)}
  .abs-link.is-on{border-color:var(--brand-100);background:var(--brand-50)}
  .abs-ico{display:grid;place-items:center}
  .abs-acts{display:grid;gap:10px;margin-top:18px}
  html.abs-open,html.abs-open body{overflow:hidden}
  @keyframes absUp{from{transform:translateY(100%)}to{transform:none}}
  @keyframes absFade{from{opacity:0}to{opacity:1}}

  /* ---------- floating buttons sit above the bar ---------- */
  .whatsapp-float{bottom:calc(var(--ab-h) + var(--ab-safe) + 14px);
    right:14px;z-index:65}
  .dha{bottom:calc(var(--ab-h) + var(--ab-safe) + 14px) !important}
  .dha-fab{z-index:65}
  html.abs-open .whatsapp-float,html.abs-open .dha{display:none}

  /* ---------- footer: lighter on a phone ---------- */
  .site-footer{margin-bottom:0}
  .foot-grid{gap:22px}
}

/* tablet: four across in the sheet, roomier bar */
@media (min-width:641px) and (max-width:1024px){
  .abs-grid{grid-template-columns:repeat(4,1fr)}
  .ab-item{font-size:.74rem}
  .ab-ico svg{width:24px;height:24px}
}

/* install hint shown once, above the bar */
.ab-tip{position:fixed;left:12px;right:12px;z-index:80;
  bottom:calc(var(--ab-h) + var(--ab-safe) + 12px);
  display:flex;align-items:center;gap:12px;padding:12px 14px;
  border-radius:16px;background:var(--brand);color:#fff;
  box-shadow:var(--shadow-2);font-size:.88rem;
  animation:absUp .3s var(--ease)}
.ab-tip b{display:block;font-size:.95rem}
.ab-tip .ab-tip-go{margin-left:auto;background:#fff;color:var(--brand);
  border:0;border-radius:999px;padding:9px 16px;font-weight:700;
  cursor:pointer;min-height:40px}
.ab-tip .ab-tip-x{background:none;border:0;color:rgba(255,255,255,.8);
  font-size:1.1rem;cursor:pointer;padding:4px 6px}
@media (min-width:1025px){.appbar,.ab-sheet,.ab-tip{display:none}}

@media (prefers-reduced-motion:reduce){
  .site-header,.ab-item,.abs-box,.ab-tip{transition:none;animation:none}
}

@media (prefers-color-scheme:dark){
  @media (max-width:1024px){
    .appbar{background:rgba(20,14,48,.92);border-top-color:#2a2550}
  }
}

/* ---------- "Try our app" card, hanging under the logo ---------- */
.logo-wrap{position:relative;display:flex;align-items:center}
.get-app{position:absolute;top:calc(100% + 8px);left:0;z-index:55;
  width:max-content;max-width:calc(100vw - 28px);flex-wrap:nowrap;
  display:flex;align-items:center;gap:10px;padding:7px 9px;
  border:1px solid var(--brand-100);border-radius:14px;
  background:var(--surface);box-shadow:var(--shadow-2);cursor:pointer;
  font:inherit;text-align:left;animation:gaDrop .5s var(--ease) both;
  transform-origin:24px -8px}
.get-app::before{content:"";position:absolute;left:24px;top:-7px;
  width:2px;height:8px;background:var(--brand-100)}
.get-app[hidden]{display:none}
.ga-ico{display:grid;place-items:center;width:34px;height:34px;
  border-radius:10px;background:var(--brand-50);flex:none}
.ga-ico img{width:22px;height:22px;border-radius:6px}
.ga-txt{min-width:0}
.ga-txt b{display:block;font-size:.82rem;color:var(--brand);
  line-height:1.2;white-space:nowrap}
.ga-txt small{display:block;font-size:.68rem;color:var(--muted);
  white-space:nowrap}
.ga-go{flex:none;padding:7px 12px;border-radius:999px;
  background:var(--accent);color:#fff;font-size:.76rem;font-weight:700;
  white-space:nowrap}
@media (max-width:400px){
  .get-app{gap:8px;padding:6px 8px}
  .ga-ico{width:28px;height:28px}
  .ga-ico img{width:18px;height:18px}
  .ga-txt small{display:none}
  .ga-go{padding:6px 10px;font-size:.72rem}
}
.ga-steps{margin:10px 0 0;padding-left:22px;line-height:1.8}
.ga-steps b{color:var(--brand)}
@keyframes gaDrop{
  0%{opacity:0;transform:rotate(-6deg) translateY(-10px)}
  60%{opacity:1;transform:rotate(3deg) translateY(2px)}
  100%{opacity:1;transform:none}
}
@media (min-width:1025px){.get-app{display:none}}
@media (prefers-reduced-motion:reduce){.get-app{animation:none}}

/* ---------- home page, app style (phone + tablet) ---------- */
.apph{display:none}
@media (max-width:1024px){
  .apph{display:block;padding:18px 0 4px}
  .apph-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
  .apph-tile{display:flex;flex-direction:column;align-items:center;
    gap:7px;padding:12px 4px;border-radius:16px;background:var(--surface);
    border:1px solid var(--line);box-shadow:var(--shadow-1);
    font-size:.74rem;font-weight:600;color:var(--brand);text-align:center;
    min-height:84px;justify-content:center}
  .apph-tile:active{transform:scale(.96)}
  .apph-ico{display:grid;place-items:center;width:42px;height:42px;
    border-radius:13px}
  .apph-ico svg{width:24px;height:24px}
  .s-sky{background:#E6F1FF;color:#1D4FB8}
  .s-coral{background:#FFE9E9;color:#C0272D}
  .s-mint{background:#E2F6EC;color:#12704A}
  .s-sun{background:#FFF3DA;color:#8A5A00}
  .s-lav{background:#EFEBFF;color:#4430E0}

  .apph-head{display:flex;align-items:center;justify-content:space-between;
    margin:24px 0 10px}
  .apph-head h2{margin:0;font-size:1.05rem}
  .apph-head a,.apph-clear{font-size:.82rem;color:var(--brand-500);
    background:none;border:0;cursor:pointer;font-weight:600;padding:4px}

  .apph-chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;
    scrollbar-width:none;-webkit-overflow-scrolling:touch}
  .apph-chips::-webkit-scrollbar{display:none}
  .apph-chip{flex:none;display:inline-flex;align-items:center;gap:6px;
    padding:9px 14px;border-radius:999px;background:var(--brand-50);
    border:1px solid var(--brand-100);color:var(--brand);
    font-size:.82rem;font-weight:500;white-space:nowrap;min-height:40px}

  .apph-rail{display:flex;gap:12px;overflow-x:auto;padding:2px 2px 8px;
    scroll-snap-type:x mandatory;scrollbar-width:none;
    -webkit-overflow-scrolling:touch}
  .apph-rail::-webkit-scrollbar{display:none}
  .apph-card{flex:none;width:63vw;max-width:260px;scroll-snap-align:start;
    display:flex;flex-direction:column;gap:4px;padding:8px;
    border-radius:18px;background:var(--surface);border:1px solid
    var(--line);box-shadow:var(--shadow-1);color:var(--ink)}
  .apph-card:active{transform:scale(.98)}
  .apph-img{position:relative;display:block;border-radius:13px;
    overflow:hidden;aspect-ratio:16/11;background:var(--brand-50)}
  .apph-img img{width:100%;height:100%;object-fit:cover;display:block}
  .apph-tag{position:absolute;left:8px;bottom:8px;padding:4px 9px;
    border-radius:999px;background:rgba(17,8,85,.82);color:#fff;
    font-size:.68rem;font-style:normal;font-weight:600}
  .apph-card b{font-size:.9rem;color:var(--brand);line-height:1.3;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
    overflow:hidden}
  .apph-card small{color:var(--muted);font-size:.76rem;
    display:flex;align-items:center;gap:4px}
  .apph-price{margin-top:2px;font-size:.78rem;color:var(--muted)}
  .apph-price b{display:inline;font-size:.95rem;color:var(--accent)}

  .apph-help{display:flex;align-items:center;gap:12px;flex-wrap:wrap;
    margin-top:22px;padding:14px 16px;border-radius:18px;
    background:linear-gradient(135deg,var(--brand),var(--brand-700));
    color:#fff}
  .apph-help b{display:block;font-size:.95rem}
  .apph-help small{opacity:.8;font-size:.8rem}
  .apph-help-acts{display:flex;gap:8px;margin-left:auto}
  .apph-help .btn-outline{border-color:rgba(255,255,255,.5);color:#fff}
  .apph-help .btn-primary{background:#fff;color:var(--brand);
    border-color:#fff}

  /* the website's own hero stays, just tighter on a phone */
  .hero-home{min-height:auto}
}

@media (max-width:1024px){
  /* language moves to the footer and the chat panel */
  .topbar .tb-lang{display:none}

  /* top bar: phone number on top, location chip centred below */
  .topbar .container{flex-direction:column;align-items:center;
    justify-content:center;gap:6px}
  .tb-left,.tb-right{width:100%;justify-content:center;
    align-items:center;gap:6px}
  .topbar a.tb-geo{margin:0 auto}
  .topbar .tb-right span{display:inline}
  .tb-geo-off{display:inline}

  /* login button stays in the header, always reachable */
  .site-header .hdr-acts{display:flex;gap:8px;margin-left:auto}
  .site-header .header-cta{padding:10px 14px;font-size:.84rem;
    white-space:nowrap}
  .nav .nav-only-mobile[href="/login/"]{display:none}
}
@media (max-width:420px){
  .site-header .header-cta span{display:none}
  .site-header .header-cta{padding:10px 12px}
}
