/* ==========================================================
   Colors (default)
   ========================================================== */
:root{
  --btw-accent:#CC5200;
  --btw-secondary:#004F7C;
  --btw-bg:#ffffff;
  --btw-text:#111;
  --btw-muted:#5a5a5a;
  --btw-card:#f7f7f8;
  --btw-border: rgba(0,0,0,.08);
  --btw-radius:18px;
}

.btw-tj{ color: var(--btw-text); }
.btw-tj-wrap{ max-width: 1120px; margin: 0 auto; padding: 26px 18px; }

/* ==========================================================
   Layout: 2-column (content + sidebar)
   ========================================================== */
.btw-tj-grid-2{
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* Zorg dat de contentkolom echt de volle kolombreedte gebruikt */
.btw-tj-grid-2 > .btw-tj-content{ width: 100%; min-width: 0; }

/* Tablet en kleiner */
@media (max-width: 900px){
  .btw-tj-grid-2{ grid-template-columns: 1fr; }
}

/* Mobile: bulletproof (themes kunnen grid/flex/float overrulen) */
@media (max-width: 600px){
  .btw-tj .btw-tj-grid-2{ display: block !important; }

  .btw-tj .btw-tj-grid-2 > .btw-tj-content,
  .btw-tj .btw-tj-grid-2 > .btw-tj-aside{
    width: 100% !important;
    max-width: none !important;
    float: none !important;
    clear: both !important;
  }

  .btw-tj .btw-tj-grid-2 > .btw-tj-aside{
    margin-top: 18px !important;
  }
}

/* Theme zet soms leesbreedte (65ch). Binnen BTW TJ willen we volle breedte. */
.btw-tj.btw-tj-trip .btw-tj-content .btw-tj-prose,
.btw-tj.btw-tj-trip .btw-tj-content .btw-tj-prose p,
.btw-tj.btw-tj-trip .btw-tj-content .btw-tj-prose li,
.btw-tj.btw-tj-trip .btw-tj-content .btw-tj-prose ul,
.btw-tj.btw-tj-trip .btw-tj-content .btw-tj-prose ol,
.btw-tj.btw-tj-trip .btw-tj-content .btw-tj-prose blockquote{
  max-width: none !important;
}

.btw-tj.btw-tj-trip .btw-tj-content .btw-tj-prose p{
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.btw-tj-lead{ max-width: none; }

/* Space between stacked sidebar cards */
.btw-tj-aside .btw-tj-cardbox + .btw-tj-cardbox{ margin-top: 18px; }

/* ==========================================================
   Hero
   ========================================================== */
.btw-tj-cover{
  position:relative;
  min-height: 360px;
  background: #222;
  background-size: cover;
  background-position:center;
}
@media (max-width: 900px){ .btw-tj-cover{ min-height: 280px; } }

.btw-tj-cover__overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,.68) 100%);
  display:flex;
  align-items:flex-end;
}

.btw-tj-cover__text{
  max-width:1120px;
  width:100%;
  margin:0 auto;
  padding: 22px 18px 26px 18px;
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.btw-tj-kicker{
  font-size: 12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  opacity:.9;
}

.btw-tj-h1{
  margin:6px 0 8px 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height:1.08;
}

.btw-tj.btw-tj-country .btw-tj-cover .btw-tj-h1,
.btw-tj.btw-tj-trip .btw-tj-cover .btw-tj-h1{
  color: var(--btw-accent) !important;
}

.btw-tj-meta-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  font-size: 14px;
  opacity:.95;
}

/* Land badges altijd op nieuwe regel */
.btw-tj-meta-row .btw-tj-badge--link{
  flex-basis: 100%;
  margin-top: 6px;
}

.btw-tj-badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  background: rgba(204,82,0,.95);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing:.08em;
  color: #fff !important; 
}

.btw-tj-badge *{
  color: #fff !important;
}

/* Land badge (link) in jouw blauw */
.btw-tj-badge--link{
  background: var(--btw-secondary) !important; /* jouw blauw */
  color: #fff !important;
  border: none;
}

/* Hover iets donkerder */
.btw-tj-badge--link:hover{
  opacity: .9;
}

/* Country badges (links) — force white text in all states */
.btw-tj-badge--link,
.btw-tj-badge--link:visited,
.btw-tj-badge--link:hover,
.btw-tj-badge--link:focus,
.btw-tj-badge--link:active{
  color: #fff;
  text-decoration: none;
}
.btw-tj-badge--link:hover{ opacity: .92; }

/* ==========================================================
   Content typography
   ========================================================== */
.btw-tj-lead{
  font-size: 18px;
  color: var(--btw-muted);
  line-height:1.55;
  margin: 0 0 16px 0;
}

.btw-tj-prose{ line-height:1.75; }
.btw-tj-prose h2,
.btw-tj-prose h3{ color: var(--btw-secondary); }

.btw-tj-h2{
  font-size: 22px;
  margin: 28px 0 14px 0;
  color: var(--btw-secondary);
}

/* &#9989; Subtitel boven fotogallery */
.btw-tj-subtitle{
  margin: 28px 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--btw-secondary);
  opacity: .9;
}

/* Maak de overgang subtitle -> gallery strak */
.btw-tj-subtitle + .btw-tj-gallery{ margin-top: 6px; }

/* ==========================================================
   Cards
   ========================================================== */
.btw-tj-cardbox{
  background: var(--btw-card);
  border: 1px solid var(--btw-border);
  border-radius: var(--btw-radius);
  padding: 14px;
}

.btw-tj-cardbox__title{
  font-weight:700;
  margin-bottom:10px;
  color: var(--btw-secondary);
}

.btw-tj-cardbox__meta{
  margin-top:10px;
  color: var(--btw-muted);
  font-size: 13px;
}

/* Trips in country sidebar: force 1 column */
.btw-tj-aside .btw-tj-cards{ grid-template-columns: 1fr; }

/* Optioneel: compacter in de sidebar */
.btw-tj-aside .btw-tj-card__img{ height: 120px; }

/* ==========================================================
   Embeds
   ========================================================== */
.btw-tj-embed iframe{
  width:100%;
  height: 540px;
  border:0;
  border-radius: var(--btw-radius);
  background:#fff;
}
@media (max-width: 900px){ .btw-tj-embed iframe{ height: 420px; } }

.btw-tj-helptext{
  font-size: 12px;
  color: var(--btw-muted);
  margin: 6px 0 10px 0;
  line-height: 1.35;
}

/* Sidebar embed (Polarsteps): higher so consent button is visible */
.btw-tj-embed--compact iframe{
  height: 440px;
  min-height: 440px;
}

/* Country sidebar map */
.btw-tj-map iframe{
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--btw-radius);
  background: #fff;
}
@media (max-width: 900px){
  .btw-tj-map iframe{ height: 300px; }
}

/* ==========================================================
   Gallery
   ========================================================== */
.btw-tj-gallery{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 900px){
  .btw-tj-gallery{ grid-template-columns: repeat(2, 1fr); }
}

.btw-tj-gallery__item{
  display:block;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--btw-border);
  background:#eee;
}

.btw-tj-gallery__item img{
  width:100%;
  height: 180px;
  object-fit:cover;
  display:block;
}
@media (max-width: 900px){
  .btw-tj-gallery__item img{ height: 160px; }
}

/* &#9989; Portfolio / Alle foto's knop onder de galerij (werkt ook zonder .btw-tj wrappers) */
.btw-tj-gallery-wrap .btw-tj-portfolio{
  margin-top: 48px;        /* extra ruimte boven */
  margin-bottom: 48px;     /* extra ruimte onder */
  display: flex;
  justify-content: center; /* centreer */
}

.btw-tj-gallery-wrap .btw-tj-portfolio .btw-tj-btn{
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
}

/* ==========================================================
   Lightbox
   ========================================================== */
.btw-tj-lightbox{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.92);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 99999;
  padding: 22px;
}
.btw-tj-lightbox.is-open{ display:flex; }

.btw-tj-lightbox__img{
  max-width: min(1200px, 96vw);
  max-height: 90vh;
  border-radius: 14px;
}

.btw-tj-lightbox__close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.35);
  color:#fff;
  font-size: 28px;
  line-height: 1;
  cursor:pointer;
}

/* ==========================================================
   Cards grid (overview pages)
   ========================================================== */
.btw-tj-cards{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px){
  .btw-tj-cards{ grid-template-columns: 1fr; }
}

.btw-tj-card{
  display:flex;
  flex-direction:column;
  border-radius: var(--btw-radius);
  overflow:hidden;
  background: var(--btw-card);
  border: 1px solid var(--btw-border);
  text-decoration:none;
  color: inherit;
}

.btw-tj-card__img{
  height: 160px;
  background-size:cover;
  background-position:center;
}

.btw-tj-card__body{ padding: 12px 14px 14px 14px; }
.btw-tj-card__title{ font-weight: 700; margin-bottom:6px; }
.btw-tj-card__meta{ font-size: 13px; color: var(--btw-muted); }

/* ==========================================================
   Highlights grid (if used elsewhere)
   ========================================================== */
.btw-tj-highlights-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 900px){
  .btw-tj-highlights-grid{ grid-template-columns: 1fr; }
}

.btw-tj-highlight-card{
  background: var(--btw-card);
  border: 1px solid var(--btw-border);
  border-radius: var(--btw-radius);
  padding: 14px;
}

.btw-tj-highlight-card__title{
  font-weight: 800;
  color: var(--btw-secondary);
  margin-bottom:8px;
}

.btw-tj-highlight-card__text{ color: var(--btw-text); }

/* ==========================================================
   Buttons
   ========================================================== */
.btw-tj-btn{
  appearance:none;
  border: 1px solid var(--btw-border);
  background: #fff;
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:600;
}
.btw-tj-btn--link{
  display:inline-flex;
  text-decoration:none;
}

/* ==========================================================
   Flipbook
   ========================================================== */
.btw-tj-flipbook__page--left{ z-index: 2; }
.btw-tj-flipbook__page--right{ z-index: 1; }

.btw-tj-flipbook{
  position: relative;
  border: 1px solid var(--btw-border);
  border-radius: var(--btw-radius);
  background: var(--btw-card);
  padding: 14px;
}

.btw-tj-flipbook__frame{
  display:grid;
  grid-template-columns: 48px 1fr 48px;
  align-items:center;
  gap: 10px;
}

.btw-tj-flipbook__spread{
  position:relative;
  background:#111;
  border-radius: 14px;
  overflow:hidden;
  aspect-ratio: 16/10;
  min-height: 280px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.btw-tj-flipbook__page{
  position:absolute;
  inset:0;
  background-size: contain;
  background-repeat:no-repeat;
  background-position:center;
  transition: transform .45s ease, opacity .25s ease;
}

.btw-tj-flipbook__page--left{ opacity: 1; }
.btw-tj-flipbook__page--right{ opacity: 0; }

.btw-tj-flipbook__toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-top: 12px;
}
.btw-tj-flipbook__counter{ font-size: 13px; color: var(--btw-muted); }

.btw-tj-flipbook__thumbs{
  margin-top: 12px;
  display:flex;
  gap: 8px;
  overflow:auto;
  padding-bottom: 4px;
}

.btw-tj-flipbook__thumbs img{
  width: 90px;
  height: 60px;
  object-fit:cover;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor:pointer;
}
.btw-tj-flipbook__thumbs img.is-active{ border-color: var(--btw-accent); }

/* Mobile: make flipbook fit nicely */
@media (max-width: 600px){
  .btw-tj-flipbook__frame{
    grid-template-columns: 36px 1fr 36px;
    gap: 8px;
  }
  .btw-tj-flipbook__thumbs img{
    width: 70px;
    height: 46px;
  }
}

/* Fullscreen flipbook */
.btw-tj-flipbook.is-fullscreen{
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0,0,0,.92);
  border: 0;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.btw-tj-flipbook.is-fullscreen .btw-tj-flipbook__frame{
  flex: 1 1 auto;
  min-height: 0;
  align-items: center;
}

.btw-tj-flipbook.is-fullscreen .btw-tj-flipbook__spread{
  height: 100%;
  max-height: calc(100vh - 120px);
  width: 100%;
  background: #000;
  margin: 0 auto;
}

.btw-tj-flipbook.is-fullscreen .btw-tj-flipbook__thumbs{
  display: none !important;
}

.btw-tj-flipbook.is-fullscreen .btw-tj-flipbook__toolbar{
  flex: 0 0 auto;
  margin-top: 10px;
}

.btw-tj-flipbook__close{
  position:absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.55);
  color:#fff;
  font-size: 28px;
  line-height: 1;
  cursor:pointer;
  z-index: 10;
  display: none;
}
.btw-tj-flipbook.is-fullscreen .btw-tj-flipbook__close{ display:block; }

@media (max-width: 900px) and (orientation: landscape){
  .btw-tj-flipbook.is-fullscreen{ padding: 8px; }
  .btw-tj-flipbook.is-fullscreen .btw-tj-flipbook__spread{
    max-height: calc(100vh - 90px);
  }
}

/* ==========================================================
   Hero tone modifiers
   ========================================================== */
.btw-tj-cover--dark .btw-tj-cover__overlay{
  background:linear-gradient(180deg, rgba(0,79,124,.35), rgba(0,0,0,.55));
}
.btw-tj-cover--light .btw-tj-cover__overlay{
  background:linear-gradient(180deg, rgba(255,255,255,.15), rgba(0,0,0,.35));
}
.btw-tj-cover--light .btw-tj-cover__content{ color:#0b1b24; }
.btw-tj-cover--light .btw-tj-kicker{ color:#0b1b24; opacity:.85; }
.btw-tj-cover--country .btw-tj-h1{ color: var(--btw-accent); }

/* ==========================================================
   Trips table shortcode: [travel_trips]
   ========================================================== */
.btw-tj-trips-table-wrap {
  width: 100%;
}

.btw-tj-trips-table__tools {
  margin: 0 0 10px 0;
}

.btw-tj-trips-table__search {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
}

.btw-tj-trips-table__scroll {
  overflow-x: auto;
}

.btw-tj-trips-table {
  width: 100%;
  border-collapse: collapse;
}

.btw-tj-trips-table th,
.btw-tj-trips-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  vertical-align: top;
}

.btw-tj-trips-table th {
  user-select: none;
}

.btw-tj-trips-table-wrap[data-btw-trips-sort="1"] .btw-tj-trips-table th {
  cursor: pointer;
}

.btw-tj-trips-table__country + .btw-tj-trips-table__country {
  margin-top: 4px;
}

.btw-tj-trips-table__empty {
  padding: 10px 0;
}

.btw-tj-trips-table thead th {
  background-color: #CC5200;
  color: #ffffff !important;
}

.btw-tj-trips-table thead th * {
  color: #ffffff !important;
}

.btw-tj-trips-table thead th:hover {
  background-color: #b54700; /* iets donkerder oranje */
}

/* ==========================================================
   FIX: cards inside Gutenberg Columns (wp-block-columns)
   Prevent "smalle strook" / shrink behavior
   ========================================================== */

/* In columns: ensure the cards wrapper actually takes the column width */
.wp-block-columns .btw-tj-cards{
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important; /* in kolommen altijd 1 card per rij */
}

/* In columns: ensure the card itself expands to full width */
.wp-block-columns .btw-tj-cards > .btw-tj-card{
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  align-self: stretch !important;
}

/* Some themes set anchors to inline/inline-block in columns */
.wp-block-columns .btw-tj-cards > a.btw-tj-card{
  display: flex !important;
}

/* Make sure inner blocks don't collapse */
.wp-block-columns .btw-tj-card__img,
.wp-block-columns .btw-tj-card__body{
  width: 100% !important;
}

/* Lightbox: always full viewport */
.btw-tj-lightbox{
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  z-index: 999999 !important;
}

.btw-tj-lightbox__close{
  position: fixed;              /* was absolute */
  top: 24px;                    /* iets meer ruimte */
  right: 24px;                  /* iets meer ruimte */
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.45);
  color:#fff;
  font-size: 28px;
  line-height: 1;
  cursor:pointer;
  z-index: 1000000;             /* boven afbeelding */
}
