/*
Theme Name: Klepon Simple
Theme URI: -
Author: Angga
Author URI: https://wa.me/6281239968797?text=Saya%20mau%20pesan%20website
Description: Untuk menampilkan hero, price calculator, portfolio, testimoni, kontak menggunakan frontend admin. Otomatis membuat page homepage, portfolio-admin, dan testimoni-admin
Version: 3.15.0
*/

:root {
  /* !important perlu -- style.css di header.php dimuat sebelum wp_head(), jadi lebih dulu dari bootstrap.min.css */
  --bs-border-color: #bbb !important;
}

body {
  overflow-x: hidden;
}

.btn {
  line-height: 20px !important;
  height: 37px !important;
}

.btn-group-sm>.btn, .btn-sm {
  height: 30px !important;
}

body>section:not(.title-section) {
  overflow: hidden;
  margin-bottom: 24px !important;
  min-height: 41px;
}

.hero-container {
  .hero-background {
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    right: 0;
    top: 50%;
    transform: translate(-0%, -50%);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: left;
    opacity: 0.35;
  }

  .hero-content {
    position: relative;
    z-index: 2;
  }

  &.bg-light .hero-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: #fff;
    opacity: 0.5;
    z-index: -1;
  }

  .hero-text {
    width: 100%;

    h1 {
      font-weight: 500;
    }
  }

  .truncate-container {
    margin-bottom: 24px;
  }
}

.hero-background-overlay {
  background: linear-gradient(to bottom, #fff 0%, transparent 70%);
}

.bg-dark .hero-background-overlay {
  background: linear-gradient(to bottom, #000 0%, transparent 70%);
}

.hero-content .truncate-container,
.onlist .truncate-container {
  .truncate-content {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.text-expanded {
  -webkit-line-clamp: unset !important;
}

section#porto-grid,
section#activity-container {
  overflow: hidden;
}

.activity.single.switch-vertical {
  display: flex;
  flex-direction: column-reverse;
}

.tiktok-embed-wrapper {
  max-width: 340px;
  margin-inline: auto;

  .tiktok-embed {
    margin: 0;
  }
}

.portfolio,
.activity,
.transport {
  min-height: 100px;

  h2 a {
    text-decoration: none;
    color: var(--bs-heading-color);
  }

  .portodesc,
  .activitydesc,
  .transportdesc {
    background-color: rgba(var(--bs-body-bg-rgb), 0.7);
  }

  .iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56%;
    overflow: hidden;
  }

  .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }

  img {
    width: 100%;
    height: auto;
    max-width: 100%;
    height: auto;
  }
}

.transport.onlist {
  aspect-ratio: 1 / 1.2;
  overflow: hidden;

  img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .transportdesc {
    z-index: 2;
  }

  .button-container {
    z-index: 3;
  }
}

.onlist .activity .truncate-content {
  -webkit-line-clamp: 3;
}

.activity {
  .iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56%;
    overflow: hidden;
  }

  .iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }
}

/* galeri media halaman single activity: filmstrip horizontal, item ke-2 dst otomatis kelihatan di layar lebar tanpa perlu next/prev */
.activity-gallery {
  position: relative;
}

.activity-gallery-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden; /* tanpa ini, browser ikut munculkan scrollbar vertical krn overflow-x: auto bikin overflow-y ikut jadi auto */
  max-height: 300px;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Edge lama */
}

.activity-gallery-strip::-webkit-scrollbar {
  display: none; /* Chrome, Safari -- scrollbar disembunyikan, scroll manual (wheel/trackpad/tombol) tetap jalan */
}

.activity-gallery-strip-item {
  flex: 0 0 auto;
  height: 300px;
}

.activity-gallery-strip-item img {
  width: auto;
  height: 300px;
  max-width: none;
  object-fit: cover;
  display: block;
}

.activity-gallery-strip-item.is-video {
  aspect-ratio: 16 / 9;
}

.activity-gallery-strip-item.is-video .iframe-container {
  width: 100%;
  height: 100%;
  padding-top: 0;
  max-width: none;
  margin-inline: 0;
}

/* di mobile, tinggi galeri diperkecil jadi 210px (dari 300px) -- lebar foto & video tetap auto/aspect-ratio mengikuti tinggi ini seperti biasa */
@media (max-width: 767.98px) {
  .activity-gallery-strip {
    max-height: 210px;
  }

  .activity-gallery-strip-item {
    height: 210px;
  }

  .activity-gallery-strip-item img {
    height: 210px;
  }
}

.blockquote-container {
  border-left: solid 6px rgb(222, 226, 230);
  margin: 0 16px 8px;
  padding: 0 8px;

  footer {
    opacity: 0.6;
  }

  footer a {
    text-decoration: none;
    color: var(--bs-body-color);
  }

  .blockquote {
    font-style: italic;
  }
}

.contact-container {
  iframe {
    max-width: 100%;
  }
}

.nav {
  gap: 4px;
  margin-top: 16px;
  justify-content: center;

  .page-numbers {
    min-width: 30px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;

    &:hover {
      border-bottom: solid 2px rgb(33, 37, 41);
    }

    &.current {
      border-bottom: solid 2px rgb(33, 37, 41);
      opacity: 60%;
    }

    &.prev,
    &.next {
      font-weight: 500;
    }

    &.dots {
      opacity: 60%;
      font-weight: normal;
      min-width: 0;

      &:hover {
        border: none;
      }
    }
  }
}

.bg-very-light {
  background-color: rgba(var(--bs-light-rgb), 0.7);
}

.position-relative .field-btn {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 2;
  border: none;
  font-size: large;
  background: #fff;
}

.modal-fullscreen .modal-content {
  max-width: 850px;
  margin: auto;
}

gmp-place-autocomplete {
  display: block;
  width: 100%;
  --gmpx-font-family-base: inherit;
  --gmpx-font-size-base: 1rem;
}

body.admin-bar .modal {
  top: 32px;
  height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .modal {
    top: 46px;
    height: calc(100% - 46px);
  }
}

#settingMenu {
  &::after {
    display: none;
  }

  .icon-with-border {
    font-size: 2.5rem;
    color: #000;
    text-shadow:
      0 0 5px #fff,
      0 0 10px #fff,
      0 0 15px #fff;
  }
}

@media (min-width: 768px) {
  section {
    max-width: 1024px;
    margin: auto;
  }

  .hero-background-overlay {
    background: linear-gradient(to right, #fff 0%, transparent 90%);
  }

  .bg-dark .hero-background-overlay {
    background: linear-gradient(to right, #000 0%, transparent 70%);
  }

  .hero-container {
    .hero-background {
      width: 40%;
    }

    &.bg-light .hero-content::before {
      content: none;
    }

    .hero-text {
      width: 60%;
    }

    .hero-background {
      opacity: 1;
    }
  }

  .portfolio.onlist:not(.switch-vertical),
  .activity.onlist:not(.switch-vertical) {
    overflow: hidden;
    height: 430px;

    img {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
    }

    .portodesc,
    .activitydesc {
      z-index: 2;
    }

    .button-container {
      z-index: 3;
    }
  }

  .activity {
    .image-container {
      position: relative;
      width: 100%;
      padding-top: 56%;
      overflow: hidden;
    }

    .image-container img {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: auto;
      height: 100%;
      border: 0;
      max-width: none;
    }
  }

  .single .activity {
    .image-container {
      padding: 0;
    }

    .image-container img {
      height: auto;
      position: static;
      transform: none;
    }
  }
}

/* 2 pilihan radio dalam 1 border (mis. filter Tipe Sewa), kedua teks selalu kelihatan, bg geser ke opsi yang aktif.
   radius cuma di ujung kiri/kanan (bentuk stadium/pill), sisi atas-bawah tetap lurus */
.kp-segment {
  position: relative;
  display: inline-flex;
  box-sizing: border-box;
  width: max-content;
  border-radius: var(--bs-border-radius-pill, 50rem);
  /* warna border ikut style checkbox (.form-check-input): var(--bs-border-color), ikut ganti kalau theme diganti */
  border: var(--bs-border-width, 1px) solid var(--bs-border-color);
}

.kp-segment-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.kp-segment-option {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  /* lebar ngikut teks masing-masing (bukan dipaksa 50/50), thumb-nya nanti ngikut lebar asli ini juga lewat JS */
  flex: 0 0 auto;
  padding: .35rem 1.1rem;
  border-radius: var(--bs-border-radius-pill, 50rem);
  color: var(--bs-body-color);
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  margin: 0;
  transition: color .15s ease;
}

.kp-segment-thumb {
  position: absolute;
  z-index: 0;
  box-sizing: border-box;
  top: 0;
  bottom: 0;
  left: 0;
  /* left & width persisnya di-set lewat JS (samain sama posisi/lebar opsi yang lagi aktif), nempel pas ke border, gak ada gap */
  width: 0;
  border-radius: var(--bs-border-radius-pill, 50rem);
  /* samain sama style checkbox checked (.form-check-input:checked): bg --bs-primary */
  background-color: var(--bs-primary);
  transition: left .2s ease, width .2s ease;
}

/* teks opsi yang lagi aktif ikut warna checked (kontras di atas thumb) */
.kp-segment-input:checked+.kp-segment-option {
  color: var(--bs-light, #fff);
}

/* baris filter Activity (search + dropdown destinasi) di bawah judul, full width tapi dibatasi 500px */
.activity-filter-bar {
  width: 100%;
  max-width: 500px;
  margin-bottom: 1rem;
}

.activity-search-wrap {
  position: relative;
}

.activity-search-wrap .bi-search {
  position: absolute;
  top: 50%;
  left: .6rem;
  transform: translateY(-50%);
  color: var(--bs-secondary-color, #6c757d);
  font-size: 14px;
  pointer-events: none;
}

.activity-search-wrap input {
  width: 100%;
  padding-left: 1.9rem;
  padding-right: 1.9rem;
}

.activity-search-wrap .activity-search-clear {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);
  border: 0;
  background: none;
  padding: 0;
  line-height: 1;
  color: var(--bs-secondary-color, #6c757d);
  font-size: 14px;
}

.activity-destinasi-dropdown {
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  section.lead-banner-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}