/* ========================================================
   6. GALLERY SECTION (2x2 GRID & LIGHTBOX) — BLUE THEME
   ======================================================== */
#gallery {
  position: relative;
  padding: 16px 0 0;
  text-align: center;
}

.gallery-flower-tl {
  position: absolute;
  top: -25px;
  left: -25px;
  width: clamp(100px, 22vw, 140px);
  height: auto;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 6px 14px rgba(40, 75, 110, 0.15));
}

.gallery-flower-br {
  position: absolute;
  bottom: -20px;
  right: -25px;
  width: clamp(100px, 22vw, 140px);
  height: auto;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 6px 14px rgba(40, 75, 110, 0.15));
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary-navy);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section-subtitle {
  font-family: var(--font-subtitle);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #4a6c8e;
  text-transform: uppercase;
  line-height: 1.5;
}

/* 2x2 Photo Grid */
.gallery-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px auto 20px;
  max-width: min(440px, 88vw);
}

.gallery-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(40, 75, 110, 0.14), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 3.5px solid #ffffff;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background: #eaf2f8;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Float animation kích hoạt nhẹ nhàng sau khi xuất hiện */
.reveal-section.visible .gallery-card:nth-child(1) {
  animation: galleryCardFloat 8s ease-in-out 2.2s infinite;
}

.reveal-section.visible .gallery-card:nth-child(2) {
  animation: galleryCardFloat 8s ease-in-out 2.5s infinite;
}

.reveal-section.visible .gallery-card:nth-child(3) {
  animation: galleryCardFloat 8s ease-in-out 2.8s infinite;
}

.reveal-section.visible .gallery-card:nth-child(4) {
  animation: galleryCardFloat 8s ease-in-out 3.1s infinite;
}

.reveal-section.visible .gallery-card:nth-child(5) {
  animation: galleryCardFloat 8s ease-in-out 3.4s infinite;
}

.reveal-section.visible .gallery-card:nth-child(6) {
  animation: galleryCardFloat 8s ease-in-out 3.7s infinite;
}

/* Float animation cho gallery cards */
@keyframes galleryCardFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-6px) rotate(-0.5deg);
  }
  50% {
    transform: translateY(-10px) rotate(0deg);
  }
  75% {
    transform: translateY(-6px) rotate(0.5deg);
  }
}

.gallery-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 18px 38px rgba(40, 75, 110, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
  animation-play-state: paused;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.3s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* Ảnh số 4: Không làm mờ, hiển thị rõ ảnh, chỉ có số +2 thanh lịch */
.gallery-card-more img {
  opacity: 0.88;
  filter: none !important;
}

.gallery-more-badge {
  position: absolute;
  inset: 0;
  background: rgba(14, 32, 54, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 5.4vw, 2.85rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(10, 25, 45, 0.85), 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: background 0.3s ease;
  pointer-events: none;
}

.gallery-more-badge .plus-symbol,
.gallery-more-badge small {
  font-size: 0.48em;
  font-weight: 600;
  vertical-align: 0.24em;
  margin-right: 2px;
  opacity: 0.95;
  display: inline-block;
  line-height: 1;
}

.gallery-more-badge span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.gallery-card-more:hover .gallery-more-badge {
  background: rgba(14, 32, 54, 0.32);
}

.gallery-card-more:hover .gallery-more-badge span {
  transform: scale(1.12);
}

.gallery-quote-box {
  text-align: center;
  padding: 6px 12px 0;
  max-width: 620px;
  margin: 0 auto;
}

.gallery-quote-box .card-heart-divider {
  margin: 6px auto 0;
}

.gallery-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.8rem, 2.5vw, 1.05rem);
  color: #23466a;
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto 6px;
  text-wrap: balance;
}

.gallery-quote .quote-line-1,
.gallery-quote .quote-line-2 {
  display: block;
}

.gallery-signature {
  font-family: var(--font-script);
  font-size: clamp(2rem, 6.2vw, 3.4rem);
  font-weight: 400;
  color: var(--primary-navy);
  line-height: 1.15;
  margin: 4px 0 8px;
  text-shadow: 0 1px 2px rgba(22, 52, 86, 0.08);
  white-space: nowrap;
}
