/* =====================
   PLACES PAGE
   ===================== */
.row { display: flex; gap: 10px; margin-bottom: 12px; }

main.container {
  max-width: 1400px;
  width: calc(100% - 40px);
}

/* Independent masonry columns, built in JS (see placesColumnCount() /
   renderPlacesPage() in app.js): each card is appended once into whichever
   .cards-col is currently shortest, and stays there. That's different from
   both CSS column-count (which rebalances -- and reshuffles cards -- every
   time any card's height changes) and a plain CSS grid (whose row height
   is the tallest cell in that row, leaving empty space under an expanded
   card's shorter row-neighbours). Here, opening/closing a card only ever
   changes heights inside its own column. */
#cards,
.cards {
  display: flex;
  align-items: flex-start;
  gap: 56px;
  width: min(100%, 1080px);
  margin: 0 auto;
}

.cards-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#cards .card,
.cards .card {
  max-width: none;
  width: 100%;
  margin: 0;
}

.card {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,0.46);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 35px rgba(60,50,40,0.12);
}

.place-card {
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.place-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.75);
}

.place-card.is-collapsed .cardImageWrap,
.place-card.is-collapsed .cardDesc,
.place-card.is-collapsed > .btn.small {
  display: none !important;
}

.cardToggle {
  width: 100%;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cardArrow {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,0.38);
  color: #8f3f45;
  font-size: 20px;
  line-height: 1;
  transition: transform .18s ease;
}

.place-card.is-open .cardArrow {
  transform: rotate(180deg);
}

.cardTitle {
  font-family: "El Messiri", sans-serif;
  font-weight: 700;
  margin-bottom: 6px;
  color: #2f2f2f;
  text-shadow: 0 1px 2px rgba(255,255,255,0.55);
}

.cardType {
  opacity: .85;
  font-size: 14px;
  margin-bottom: 6px;
  color: #2f2f2f;
  text-shadow: 0 1px 2px rgba(255,255,255,0.55);
}

.cardDesc {
  font-size: 14px;
  color: #2f2f2f;
  text-shadow: 0 1px 2px rgba(255,255,255,0.55);
}

.card .btn,
.card button {
  color: #2f2f2f;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.28);
}

.cardImageWrap {
  margin: 10px 0;
  border-radius: 14px;
  overflow: hidden;
}

.cardImageWrap img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.videoQualitySelect {
  position: absolute;
  bottom: 8px;
  inset-inline-end: 8px;
  z-index: 3;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E") no-repeat center / 16px 16px;
  color: transparent;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-align: center;
}

.videoQualitySelect::-ms-expand {
  display: none;
}

/* =====================
   CARD SLIDER
   ===================== */
.cardSlider {
  position: relative;
  width: 100%;
  height: 170px;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
}

.cardSlider img[data-slide] {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: none;
  transition: transform .35s ease, filter .35s ease;
  cursor: zoom-in;
}

.cardSlider img.active { display: block; }

.cardSlider img[data-slide]:hover {
  transform: scale(1.04);
  filter: brightness(1.05);
}

.cardSlider .sliderEmpty {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border: 1px dashed rgba(255,255,255,0.35);
  border-radius: 16px;
}

.cardSlider .sliderEmptyText {
  font-size: 13px;
  opacity: .85;
  color: #2f2f2f;
  text-shadow: 0 1px 2px rgba(255,255,255,0.55);
}

.cardSlider .sliderBtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(255,255,255,0.75);
  color: #2f2f2f;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
  z-index: 3;
}

.cardSlider .sliderBtn:hover  { background: rgba(255,255,255,0.95); }
.cardSlider .sliderBtn.prev   { left: 10px; }
.cardSlider .sliderBtn.next   { right: 10px; }

.cardSlider .sliderDots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 7px;
  z-index: 3;
}

.cardSlider .sliderDot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.cardSlider .sliderDot.active {
  background: rgba(255,255,255,1);
  transform: scale(1.2);
}

.imageInfoBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  z-index: 4;
  transition: background .2s ease, transform .2s ease;
}

.imageInfoBtn:hover {
  background: rgba(0,0,0,0.75);
  transform: scale(1.1);
}

/* =====================
   LIGHTBOX
   ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightboxInner {
  position: relative;
  width: 95vw;
  height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightboxInner img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 18px;
}

#lightboxImg {
  cursor: zoom-in;
  transition: transform .25s ease;
  transform-origin: center center;
}

#lightboxImg.isZoomed {
  transform: scale(1.65);
  cursor: zoom-out;
}

#lightboxSource {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: background .2s ease;
}

#lightboxSource:hover { background: rgba(0,0,0,0.85); }

.lbNav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  z-index: 10000;
}

.lbNav.prev  { left: 20px; }
.lbNav.next  { right: 20px; }
.lbNav:hover { background: rgba(0,0,0,0.85); }

.lbClose {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lbClose:hover { background: rgba(0,0,0,0.85); }


.cardSlider .slideCredit {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 3;
  display: none;
  max-width: calc(100% - 16px);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
