/* --- Patagonia Pintada: photo slider + info pop-ups --- */

.pp-wrap {
  margin: 3rem auto;
  max-width: 1200px;
  padding: 0 1rem;
}

.pp-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: .75rem;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.pp-slider.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.pp-slider img {
  -webkit-user-drag: none;
  pointer-events: none;
}

.pp-slider::-webkit-scrollbar {
  height: 6px;
}

.pp-slider::-webkit-scrollbar-thumb {
  background: #a75756;
  border-radius: 3px;
}

.pp-card {
  position: relative;
  flex: 0 0 280px;
  height: 200px;
  scroll-snap-align: start;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  background: #d8cfc4;
}

.pp-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.pp-card:hover img,
.pp-card:focus img {
  transform: scale(1.05);
}

.pp-card-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem .75rem .6rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .72));
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.pp-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #d8cfc4, #d8cfc4 12px, #cfc4b7 12px, #cfc4b7 24px);
  color: #6f6357;
  font-weight: 700;
  text-align: center;
  padding: 1rem;
}

/* --- Modal --- */

.pp-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.pp-modal.open {
  display: flex;
}

.pp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
}

.pp-modal-box {
  position: relative;
  background: #fff;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.pp-modal-box img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  object-position: 50% 30%;
  display: block;
}

.pp-modal-text {
  padding: 1.5rem 2rem 2rem;
}

.pp-modal-text h4 {
  margin: 0 0 .75rem;
}

.pp-modal-text p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.pp-tags {
  font-size: .85rem;
  color: #555;
}

.pp-close {
  position: absolute;
  top: .5rem;
  right: .75rem;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  padding: 0;
  margin: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pp-close:hover {
  background: rgba(0, 0, 0, .8);
}

/* --- Maps slider (general / destination) --- */

.pp-cols::after {
  content: '';
  display: block;
  clear: both;
}

.pp-col-text {
  display: contents;
}

.pp-cols p {
  text-align: justify;
}

.pp-maps {
  position: relative;
  float: right;
  width: min(38%, 420px);
  margin: 0 0 1.5rem 2rem;
}

.pp-maps-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #f3efe9;
  aspect-ratio: 3 / 4;
  cursor: zoom-in;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.pp-map-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .3s ease;
}

.pp-map-slide.active {
  opacity: 1;
}

.pp-map-dots {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: .75rem;
}

.pp-map-dot {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  width: 10px;
  height: 10px;
  min-width: 10px;
  border-radius: 50%;
  background: #cfc4b7;
  cursor: pointer;
}

.pp-map-dot.active {
  background: #a75756;
}

/* --- Map lightbox (click to enlarge) --- */

.pp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, .85);
  cursor: zoom-out;
}

.pp-lightbox.open {
  display: flex;
}

.pp-lightbox img {
  max-width: 95vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.pp-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.pp-lightbox-nav:hover {
  background: rgba(0, 0, 0, .85);
}

.pp-lightbox-prev {
  left: 1.5rem;
}

.pp-lightbox-next {
  right: 1.5rem;
}

.pp-cols .pp-map-caption {
  font-style: italic;
  font-size: 13px;
  text-align: center;
  margin-top: 15px;
}

@media (max-width: 1100px) {
  .pp-maps {
    float: none;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 1.5rem;
  }
}

@media (max-width: 768px) {
  .pp-card {
    flex-basis: 220px;
    height: 160px;
  }

  .pp-modal {
    padding: 1rem;
  }

  .pp-modal-box {
    max-height: 85vh;
  }

  .pp-modal-box img {
    max-height: 40vh;
  }

  .pp-modal-text {
    padding: 1.25rem 1.25rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .pp-card {
    flex-basis: 75vw;
    height: 52vw;
  }

  .pp-map-dots {
    margin-top: .5rem;
  }
}
