html { overflow-x: hidden; }
img, svg, video { max-width: 100%; }


body::before { pointer-events: none; }

@media (hover: none) {
  .card:hover img,
  .gallery-card:hover img,
  .hover-scale:hover {
    transform: none;
    filter: none;
  }
  .gallery-card:hover::after { opacity: 0; }
}

@media (max-width: 991.98px) {
  header.masthead .masthead-subheading {
    font-size: 1.5rem;
    line-height: 1.6rem;
  }
  header.masthead .masthead-heading {
    font-size: 2.4rem;
    line-height: 3rem;
  }
}

/
@media (max-width: 767.98px) {

  p { text-align: left; }           

  section.py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }
  .container.my-4 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    padding-left: 0;
    padding-right: 0;
  }

  #mainNav { padding: 0.4rem 0; }
  #mainNav .container {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  #mainNav a img {
    height: 34px;
    width: auto;
    margin: 0 !important;
  }
  #mainNav .vr { display: none; }
  #mainNav .switch {
    font-size: 14px;                 
    margin-right: 0 !important;
  }


  header.masthead {
    padding-top: 6.5rem;
    padding-bottom: 3.5rem;
    background-size: cover;          
  }
  header.masthead .masthead-subheading {
    font-size: 1.05rem;
    line-height: 1.5rem;
    margin-bottom: 0.75rem;
  }
  header.masthead .masthead-heading {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-bottom: 1.5rem;
    word-break: break-word;
  }
  header.masthead .btn {
    width: 100%;
    max-width: 320px;
    padding: 0.75rem 1rem !important;
  }

 
  #menu .col-md-3 {
    flex: 0 0 auto;
    width: 50%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #menu .py-5 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  #menu svg { width: 52px; height: 52px; }
  #menu .element-title { font-size: 1.05rem; }
  #menu p { font-size: 0.85rem; text-align: center; }

  /* ---------- Section Destinasi ---------- */
  .hero-custom {
    display: block;                  
    min-height: auto;
  }
  #kategori #content,
  #kategori .container { width: 100%; }
  .section-title { font-size: 1.6rem; }

  /* Search & filter */
  #kategori .d-flex.flex-wrap.align-items-end.justify-content-between {
    flex-direction: column;
    align-items: stretch !important;
  }
  #kategori .d-flex.flex-wrap.align-items-end.justify-content-between > .d-flex {
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
  }
  #searchBox,
  #categoryFilter {
    width: 100%;
    min-height: 44px;
    font-size: 16px;                 
  }

  #destinasiGrid { --bs-gutter-y: 1rem; }
  #destinasiGrid .card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
  }
  #destinasiGrid .card > img {
    width: 100%;
    object-fit: cover;
  }
  #destinasiGrid .btn-like {
    min-width: 40px;
    min-height: 40px;
  }
  

  /* Pagination */
  #destinasiGrid .pagination,
  #destinasiGrid .pagination-wrapper {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }
  .pagination-btn {
    min-width: 40px;
    min-height: 40px;
  }

  /* ---------- Gallery ---------- */
  /* 3 foto per slide: 1 besar di atas + 2 kecil di bawah */
  #galleryCarousel .row.g-4 {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }
  #galleryCarousel .col-md-4 {
    flex: 0 0 auto;
    width: 50%;
  }
  #galleryCarousel .col-md-4:first-child { width: 100%; }
  #galleryCarousel .col-md-4:first-child .gallery-card {
    aspect-ratio: 16 / 10;
  }
  #galleryCarousel .gallery-card { border-radius: 12px; }

  #galleryCarousel .carousel-control-prev,
  #galleryCarousel .carousel-control-next {
    width: auto;
    padding: 0 0.25rem;
    opacity: 0.9;
  }
  #galleryCarousel .carousel-control-prev-icon,
  #galleryCarousel .carousel-control-next-icon {
    padding: 0.6rem !important;      
    background-size: 55%;
  }
}

@media (max-width: 400px) {
  header.masthead .masthead-heading {
    font-size: 1.3rem;
    line-height: 1.8rem;
  }
  .section-title { font-size: 1.4rem; }
  #menu .col-md-3 { width: 100%; }
}

@media (max-width: 767.98px) {
    header.masthead {
        background-image: url("../images/logo1.1.png");
        background-size: cover;
        background-position: center;
    }
}