/* Warm, celebratory palette: serif headings on the public site */
body > main h1,
body > main h2,
body > main h3,
body > header h2,
.memorial-hero-name,
.slider-wrap header h2 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0.005em;
}

.memorial-hero-name {
  font-weight: 700;
}

.gallery-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Memorial hero */
.memorial-hero {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 2fr;
  gap: 2.5rem;
  align-items: center;
  margin: 1rem -1rem 3rem;
  padding: 3rem 1.5rem;
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(254, 215, 170, 0.18) 0%,
    rgba(254, 215, 170, 0.04) 100%
  );
}

@media (prefers-color-scheme: dark) {
  .memorial-hero {
    background: linear-gradient(
      180deg,
      rgba(180, 83, 9, 0.16) 0%,
      rgba(180, 83, 9, 0.04) 100%
    );
  }
}

@media (max-width: 720px) {
  .memorial-hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }
}

.memorial-hero-photo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  justify-self: center;
}

.memorial-hero-name {
  margin: 0 0 0.25rem;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.memorial-hero-dates {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.memorial-hero-tagline {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  opacity: 0.85;
}

.memorial-hero-bio p {
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

.memorial-speeches-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--pico-primary, #f59e0b);
  color: var(--pico-primary-inverse, #fff);
  text-decoration: none;
  font-weight: 600;
  transition: filter 0.2s ease;
}

.memorial-speeches-button:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

/* Splide slider on the home page */
.slider-wrap {
  margin: 2rem 0 3rem;
}

.splide__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.splide__slide {
  opacity: 0.6;
}

.splide__slide.is-active {
  opacity: 1;
}

.splide__slide div {
  padding: calc(var(--pico-spacing) * 0.5) 0;
  color: var(--pico-muted-color);
  text-align: center;
}

.thumbnails {
  display: flex;
  margin: 1rem auto 0;
  padding: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.thumbnail {
  width: 70px;
  height: 70px;
  overflow: hidden;
  list-style: none;
  margin: 0 0.2rem;
  cursor: pointer;
  opacity: 0.4;
  border-radius: 6px;
  transition: opacity 0.2s ease;
}

.thumbnail.is-active {
  opacity: 1;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Slideshow trigger button (gallery-controls) */
.slideshow-trigger {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: inherit;
  padding: 0.25rem 0.5rem;
}

.slideshow-trigger:hover {
  text-decoration: underline;
}

/* Full-screen slideshow dialog */
.slideshow-dialog {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.96);
  color: white;
}

.slideshow-dialog::backdrop {
  background: rgba(0, 0, 0, 0.96);
}

.slideshow-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.slideshow-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.slideshow-dialog .swiper {
  width: 100%;
  height: 100%;
}

.slideshow-dialog .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-dialog .swiper-slide img,
.slideshow-dialog .swiper-slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.slideshow-dialog .swiper-button-next,
.slideshow-dialog .swiper-button-prev {
  color: white;
}

.slideshow-dialog .swiper-pagination-bullet {
  background: white;
}

/* Guestbook (public) */
.guestbook-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guestbook-entry {
  padding: 1rem 0;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

.guestbook-entry:last-child {
  border-bottom: none;
}

.guestbook-entry header {
  margin-bottom: 0.5rem;
}

/* Guestbook (admin) */
.admin-guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-guestbook-entry {
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--pico-muted-border-color);
  background: var(--pico-card-background-color);
}

.admin-guestbook-entry.is-pending {
  border-left: 4px solid var(--pico-primary);
}

.admin-guestbook-entry.is-approved {
  border-left: 4px solid #4ade80;
}

.admin-guestbook-badge {
  display: inline-block;
  margin-left: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--pico-muted-border-color);
  vertical-align: middle;
}

.admin-guestbook-entry.is-approved .admin-guestbook-badge {
  background: rgba(74, 222, 128, 0.18);
  color: #166534;
}

.admin-guestbook-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Gallery grid styles */
.galleries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  box-sizing: border-box;
}

.gallery-card {
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 28px rgba(180, 83, 9, 0.18);
}

.gallery-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--pico-card-background-color);
}

.gallery-name {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.breadcrumbs {
  top: -3rem;
  position: relative;
  display: block;
  padding-left: 1rem;
}

.bi {
  padding-right: 5px;
}

/* Gallery view styles */
.back-link {
  display: inline-block;
  margin: 1rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.back-link:hover {
  text-decoration: underline;
}

.gallery-info {
  margin: 1rem 0 2.5rem;
}

.gallery-title {
  margin-bottom: 0;
}

.gallery-tags {
  margin-left: 0.5rem;
}

.gallery-description {
  margin: 1rem 0;
}

/* new mansory css   */

#mansory-wraper {
  margin: 0 auto;
  box-sizing: border-box;
}

#masonry-container {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}
.masonry-item {
  position: relative; /* IMPORTANT FOR LAZY LOADING XDD */
}

.masonry-item.after-layout {
  position: absolute;
}

.masonry-item-content {
  position: relative;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}
.masonry-item a {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 0px;
  display: block;
  margin-bottom: 100%; /* IMPORTANT FOR LAZY LOADING XDD */
}

.masonry-item.after-layout div a {
  margin-bottom: 0; /* IMPORTANT FOR LAZY LOADING XDD */
}

.masonry-item a:has(img.loaded) {
  height: 100%; /* IMPORTANT FOR LAZY LOADING XDD */
}

.masonry-item img {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.masonry-item img.loaded {
  opacity: 1;
}

.masonry-item .masonry-video {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  background: #000;
}
.placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    110deg,
    var(--pico-muted-border-color, #ececec) 30%,
    var(--pico-form-element-background-color, #f5f5f5) 50%,
    var(--pico-muted-border-color, #ececec) 60%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
