/* =========================================================
   Accommodation pages – shared stylesheet (hotel-* classes)
   ---------------------------------------------------------
   Scope:
   - Hotels + other accommodation CPTs using the same markup
   - GeneratePress wrappers reset to keep sticky reliable
   - Left sidebar (sticky on desktop) with:
     1) TOC (auto from H2’s in content)
     2) Info box (CTA + pills + share)
   ---------------------------------------------------------
   Design goals:
   - Clean, modern, readable
   - TOC stays compact (never pushes the info box too far down)
   - Mobile-friendly (TOC collapsible; sidebar not sticky)
   ========================================================= */


/* ---------------------------------------------------------
   0) GeneratePress wrapper resets (single accommodation only)
   Sticky breaks when any parent has overflow/transform
--------------------------------------------------------- */

body.single-hotel #page,
body.single-hotel #content,
body.single-hotel #primary,
body.single-hotel .site-content,
body.single-hotel .content-area,
body.single-hotel .inside-article,
body.single-hotel article.hotel-single,
body.single-vakantiepark #page,
body.single-vakantiepark #content,
body.single-vakantiepark #primary,
body.single-vakantiepark .site-content,
body.single-vakantiepark .content-area,
body.single-vakantiepark .inside-article,
body.single-vakantiepark article.hotel-single,
body.single-camping #page,
body.single-camping #content,
body.single-camping #primary,
body.single-camping .site-content,
body.single-camping .content-area,
body.single-camping .inside-article,
body.single-camping article.hotel-single,
body.single-vakantiehuisje #page,
body.single-vakantiehuisje #content,
body.single-vakantiehuisje #primary,
body.single-vakantiehuisje .site-content,
body.single-vakantiehuisje .content-area,
body.single-vakantiehuisje .inside-article,
body.single-vakantiehuisje article.hotel-single,
body.single-vakantiewoning #page,
body.single-vakantiewoning #content,
body.single-vakantiewoning #primary,
body.single-vakantiewoning .site-content,
body.single-vakantiewoning .content-area,
body.single-vakantiewoning .inside-article,
body.single-vakantiewoning article.hotel-single {
  overflow: visible !important;
  transform: none !important;
  filter: none !important;
  perspective: none !important;
}


/* ---------------------------------------------------------
   1) Media (hero / gallery)
--------------------------------------------------------- */

.hotel-media {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hotel-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hotel-media__hero {
  height: clamp(300px, 45vw, 520px);
  overflow: hidden;
  border-radius: 18px;
}

.hotel-media__grid {
  display: grid;
  gap: 14px;
}

.hotel-media__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hotel-media__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.hotel-media__item {
  height: clamp(220px, 28vw, 420px);
  overflow: hidden;
  border-radius: 18px;
}


/* ---------------------------------------------------------
   2) Shell + breadcrumb
--------------------------------------------------------- */

.hotel-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.hotel-breadcrumb {
  margin: 0 0 1rem;
  font-size: .9rem;
  color: var(--muted);
}

.hotel-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.hotel-breadcrumb a:hover {
  text-decoration: underline;
}


/* ---------------------------------------------------------
   3) Header (titel/locatie/intro)
--------------------------------------------------------- */

.hotel-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title location"
    "intro intro";
  gap: .75rem 2rem;
  align-items: start;
  margin: 1rem 0 2rem;
}

.hotel-title {
  grid-area: title;
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 900;
}

.hotel-location {
  grid-area: location;
  margin: .45rem 0 0;
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
}

.hotel-intro {
  grid-area: intro;
  margin: .25rem 0 0;
  width: 100%;
  font-size: 1.1rem;
  line-height: 1.7;
}


/* ---------------------------------------------------------
   4) Layout: LEFT sidebar + RIGHT content
--------------------------------------------------------- */

.hotel-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.hotel-content { min-width: 0; }
.hotel-body { max-width: 78ch; }


/* ---------------------------------------------------------
   5) Sticky sidebar wrapper (desktop)
--------------------------------------------------------- */

body.single-hotel .hotel-sidebar,
body.single-vakantiepark .hotel-sidebar,
body.single-camping .hotel-sidebar,
body.single-vakantiehuisje .hotel-sidebar,
body.single-vakantiewoning .hotel-sidebar {
  position: sticky !important;
  top: 90px !important;
  margin-top: -12px;
  align-self: start;
  height: fit-content;
  overflow: visible;
}


/* ---------------------------------------------------------
   6) TOC (auto from H2’s)
   - Compact, warm background, map-pin markers
   - List has a max-height (scrolls) so the info box stays visible
--------------------------------------------------------- */

.hotel-toc {
  margin: 0 0 .9rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, .06);
  background: #fff9f3;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .10);
  overflow: hidden;
}

.hotel-toc__inner {
  padding: 1.05rem 1.15rem;
}

.hotel-toc__title {
position: sticky;
top: 0;
background: #fff9f3;
padding-bottom: .4rem;
z-index: 1;
}

.hotel-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;

  display: grid;
  gap: .35rem;

  max-height: clamp(180px, 28vh, 360px);
  overflow: auto;
  padding-right: 6px;
}

.hotel-toc__list a {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: .65rem;

  padding: .48rem .55rem;
  border-radius: 14px;

  text-decoration: none;
  color: inherit;

  font-weight: 600;
  opacity: .86;
}

.hotel-toc__list a:hover {
  opacity: 1;
  background: rgba(0, 0, 0, .04);
}

.hotel-toc__list a.is-active {
  opacity: 1;
  background: rgba(0, 0, 0, .05);
}

/* Map pin marker (CSS-only) */
.hotel-toc__dot {
  position: relative;
  width: 14px;
  height: 14px;
  margin-top: .28rem;

  background: rgba(0,0,0,.22);
  border-radius: 999px 999px 999px 0;
  transform: rotate(-45deg);
}

.hotel-toc__dot::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: #fff9f3;
  border-radius: 999px;
}

/* Active pin uses brand color */
.hotel-toc__list a.is-active .hotel-toc__dot {
  background: var(--aoo-brand, #e11d48);
}

.hotel-toc__list a.is-active .hotel-toc__dot::before {
  background: #fff9f3;
}

/* Hide when empty */
.hotel-toc.is-hidden { display: none; }

/* Mobile toggle button (collapsible TOC) */
.hotel-toc__toggle {
  display: none;
  width: 100%;
  text-align: left;

  border: 0;
  background: transparent;

  padding: 1.05rem 1.15rem;

  font-weight: 800;
  font-size: .95rem;
  cursor: pointer;

  color: #111827;
}

.hotel-toc__toggle span {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
}

.hotel-toc__chev {
  margin-left: auto;
  opacity: .6;
  transform: rotate(0deg);
  transition: transform .18s ease;
}

.hotel-toc.is-open .hotel-toc__chev { transform: rotate(180deg); }

/* subtle scrollbar (optional) */
.hotel-toc__list::-webkit-scrollbar { width: 10px; }
.hotel-toc__list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.10);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}


/* ---------------------------------------------------------
   7) Info box (sticky card)
--------------------------------------------------------- */

.hotel-info-box--sticky {
  position: relative;
  padding: 1.6rem;
  border-radius: 20px;
  background: #fff9f3;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .12);
}

.hotel-price {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 .35rem;
}

.hotel-address,
.hotel-phone {
  margin: 0 0 .75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* CTA: layout only; styling in components/buttons.css */
.hotel-info-box--sticky .aoo-cta {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: .25rem;
  padding: 1rem 1rem;
  font-size: 1.05rem;
  border-radius: 14px;
}


/* ---------------------------------------------------------
   8) Pills (kenmerken)
--------------------------------------------------------- */

.hotel-info-box--sticky .hotel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.hotel-info-box--sticky .hotel-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .12);
  background: rgba(0, 0, 0, .04);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.hotel-pill--location {
  background: #eef4ff;
  border: 1px solid #cfdcff;
  color: #1f3a8a;
}

.hotel-pill--facility {
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.12);
  color: inherit;
}

.hotel-pill--type {
  background: #eefaf1;
  border: 1px solid #cfe9d6;
  color: #14532d;
}


/* ---------------------------------------------------------
   9) Share block (WP Social Links)
--------------------------------------------------------- */

.hotel-share {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.hotel-share__title {
  margin: 0 0 .6rem;
  font-weight: 800;
  font-size: .95rem;
}

.hotel-share__hint {
  margin: .75rem 0 0;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.4;
}

.hotel-share .wp-block-social-links {
  list-style: none !important;
  padding-left: 0 !important;
  margin: .75rem 0 0 !important;

  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  justify-content: flex-start;
}

.hotel-share .wp-block-social-links li,
.hotel-share .wp-block-social-links li::marker {
  list-style: none !important;
  content: "" !important;
}

.hotel-share .wp-block-social-links li::before { content: none !important; }

.hotel-share .wp-block-social-link-anchor {
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .03);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.hotel-share .wp-block-social-link-anchor svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.hotel-share .wp-block-social-link-anchor:hover {
  color: #111827;
  background: rgba(0, 0, 0, .06);
  transform: translateY(-1px);
}


/* ---------------------------------------------------------
   10) Responsive
--------------------------------------------------------- */

@media (max-width: 980px) {

  .hotel-media__grid--2,
  .hotel-media__grid--3 {
    grid-template-columns: 1fr;
  }

  .hotel-media__item { height: 260px; }

  .hotel-layout { grid-template-columns: 1fr; }

  /* sticky off on mobile */
  body.single-hotel .hotel-sidebar,
  body.single-vakantiepark .hotel-sidebar,
  body.single-camping .hotel-sidebar,
  body.single-vakantiehuisje .hotel-sidebar,
  body.single-vakantiewoning .hotel-sidebar {
    position: static !important;
    top: auto !important;
    margin-top: 0;
  }

  .hotel-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "location"
      "intro";
  }

  .hotel-location {
    text-align: left;
    white-space: normal;
    margin-top: 0;
  }

  /* TOC becomes collapsible */
  .hotel-toc__toggle { display: block; }
  .hotel-toc__inner { display: none; padding-top: 0; }
  .hotel-toc.is-open .hotel-toc__inner { display: block; }

  .hotel-toc__list {
    max-height: clamp(180px, 34vh, 420px);
  }
}


/* ---------------------------------------------------------
   11) Dark mode tweaks (subtle)
--------------------------------------------------------- */

@media (prefers-color-scheme: dark) {

  .hotel-toc {
    position: relative;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .10);
  }

  .hotel-info-box--sticky {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .10);
  }

  .hotel-pill--facility,
  .hotel-share .wp-block-social-link-anchor {
    background: rgba(255, 255, 255, 0.08);
  }

  .hotel-toc__list a:hover,
  .hotel-toc__list a.is-active {
    background: rgba(255,255,255,.06);
  }

  .hotel-toc__toggle { color: #f9fafb; }

  .hotel-toc__dot::before { background: rgba(255,255,255,.06); }
  .hotel-toc__list a.is-active .hotel-toc__dot::before { background: rgba(255,255,255,.06); }
}


/* ---------------------------------------------------------
   12) Mobile sticky CTA bar (accommodation)
--------------------------------------------------------- */

.aoo-mobile-cta { display: none; }

@media (max-width: 980px) {

  .aoo-mobile-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;

    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px) + 10px);
    background: #ffffff;
    border-top: 1px solid rgba(0,0,0,.08);

    transform: translate3d(0, 100%, 0);
    transition: transform 200ms ease;
    pointer-events: none;
    will-change: transform;
  }

  .aoo-mobile-cta.is-visible {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  .aoo-mobile-cta .aoo-cta {
    display: block;
    width: 100%;
    text-align: center;

    min-height: 56px;
    padding: 16px 18px;
    font-size: 1.05rem;
    line-height: 1.1;

    border-radius: 14px;
  }

  body.single-hotel,
  body.single-vakantiepark,
  body.single-camping,
  body.single-vakantiehuisje,
  body.single-vakantiewoning {
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px) + 10px);
  }
}/* =========================================================
   FIX: sticky sidebar (plaats + regio) – works in flex/grid
   Sticky faalt als een parent overflow:hidden/auto heeft.
   ========================================================= */

/* 1) Zorg dat de layout ouders sticky niet blokkeren */
.hotel-shell,
.hotel-layout,
.hotel-main,
.hotel-sidebar,
.place-sidebar {
    overflow: visible !important;
}

/* 2) Sticky op de hele sidebar (beste resultaat) */
.hotel-sidebar {
    position: sticky;
    top: 110px;
    /* pas aan op jouw header hoogte */
    align-self: flex-start;
    /* nodig in flex layouts */
    height: fit-content;
}

/* 3) Extra safety: als je liever place-sidebar sticky houdt */
.place-sidebar {
    position: sticky;
    top: 110px;
    align-self: flex-start;
}

/* 4) Zorg dat sticky niet “uitrekt” door flex */
.hotel-layout {
    align-items: flex-start;
}

/* 5) Mobiel: meestal wil je geen sticky (optioneel) */
@media (max-width: 980px) {

    .hotel-sidebar,
    .place-sidebar {
        position: static;
        top: auto;
    }
}