/* Layout */
.content-page .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.moments-content {
  width: 100%;
  max-width: 900px;
  text-align: left;
}

.moments-content .page-intro {
  margin-bottom: 1rem;
}

/* Grid */
.moments-section {
  margin-top: 0.5rem;
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.moment-card {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.moment-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.moment-card-image-wrapper {
  position: relative;
  padding-top: 60%;
  overflow: hidden;
}

.moment-card-image-wrapper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.moment-card-body {
  padding: 0.85rem 0.9rem 2.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.moment-card-title {
  font-family: var(--font-family-heading);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.moment-card-meta {
  font-size: 0.85rem;
  color: var(--muted-text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.moment-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.moment-card-description {
  font-size: 0.9rem;
  color: #4b5563;
  margin-top: 0.3rem;
}

/* Chip pinned bottom-left */
.moment-card-actions {
  position: absolute;
  left: 0.9rem;
  bottom: 0.75rem;
  margin-top: 0;
  display: flex;
  justify-content: flex-start;
}

.moment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background-color: var(--light-color);
  color: var(--secondary-color);
  font-size: 0.82rem;
  font-weight: 500;
}

.moment-chip i {
  font-size: 0.75rem;
}

/* Album & image modals */
.album-modal,
.image-zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.album-modal[aria-hidden="false"],
.image-zoom-modal[aria-hidden="false"] {
  display: flex;
}

.album-modal-inner {
  background-color: #ffffff;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.35);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.album-modal-close,
.image-zoom-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  border: none;
  background: transparent;
  color: #4b5563;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.album-modal-close:hover,
.image-zoom-close:hover {
  color: #111827;
}

#album-modal-title {
  font-family: var(--font-family-heading);
  font-size: 1.4rem;
  margin: 0 2.2rem 0.2rem 0;
}

#album-modal-description {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin: 0 2.2rem 0.8rem 0;
}

.album-modal-images {
  overflow-y: auto;
  padding-right: 0.4rem;
}

/* ===== Album carousel ===== */
.album-carousel {
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  gap: 0.6rem;
  align-items: center;
}

.album-carousel-stage {
  position: relative; 
  background: #0b0f1a;
  border-radius: 12px;
  overflow: hidden;
  height: min(58vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
}


#album-carousel-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* contain = no cropping */
  display: block;
  cursor: zoom-in;
}

.album-carousel-nav {
  height: 44px;
  width: 44px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.08);
  color: #111827;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.album-carousel-nav:hover {
  background: rgba(15, 23, 42, 0.14);
}

/* Thumbnails strip */
.album-carousel-thumbs-wrap {
  margin-top: 0.85rem;
  overflow: hidden;
}

.album-carousel-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0.1rem;
  scroll-behavior: smooth;
}

.album-carousel-thumbs::-webkit-scrollbar {
  height: 10px;
}
.album-carousel-thumbs::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.album-thumb {
  flex: 0 0 auto;
  width: 92px;
  height: 62px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #111827;
}

.album-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.95;
}

.album-thumb.is-active {
  border-color: var(--secondary-color);
}

.album-thumb.is-active img {
  opacity: 1;
}

/* ===== Image zoom ===== */
.image-zoom-inner {
  background-color: #000;
  padding: 0.5rem;
  border-radius: 12px;
  max-width: 95vw;
  max-height: 95vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#image-zoom-img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
}

/* Nav arrows inside zoom */
.image-zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-zoom-prev { left: 10px; }
.image-zoom-next { right: 10px; }

.image-zoom-nav:hover {
  background: rgba(0,0,0,0.65);
}

/* Ensure zoom arrows + close are above the image */
.image-zoom-close,
.image-zoom-nav {
  z-index: 5;
}

#image-zoom-img {
  position: relative;
  z-index: 1;
}

.image-zoom-close {
  color: #e5e7eb;
}

.image-counter {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  z-index: 6;          /* above image + arrows */
  pointer-events: none; /* don't block clicks */
}

.image-counter--zoom {
  top: 12px;
  left: 12px;
}


/* Needed so the album counter (absolute) positions relative to the stage */
.album-carousel-stage {
  position: relative;
}

/* Counter badge */
.image-counter {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  z-index: 9999;        /* force above everything */
  pointer-events: none; /* don't block clicks */
}

.image-counter--zoom {
  top: 12px;
  left: 12px;
}
