/* ============================================================
   LUXURY WEDDING INVITATION — style.css
   Mobile-first, elegant cream/gold/white palette
   ============================================================ */

/* ── Arabic Font Stack ── */
[lang="ar"], [lang="ar"] * {
  font-family: 'Cairo', 'Lateef', sans-serif !important;
}
[lang="ar"] .section-title,
[lang="ar"] .final-names,
[lang="ar"] .opening-names {
  font-family: 'Lateef', 'Cairo', serif !important;
}

/* ── CSS Custom Properties ── */
:root {
  --gold:        #c9a96e;
  --gold-light:  #e8d5a3;
  --gold-dark:   #a07840;
  --cream:       #fdf8f0;
  --cream-dark:  #f5ede0;
  --beige:       #e8ddd0;
  --brown:       #6b4f3a;
  --text-dark:   #2c1810;
  --text-mid:    #5a4030;
  --text-light:  #9e8070;
  --white:       #ffffff;

  --font-script: 'Great Vibes', cursive;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-light:  'Cormorant Garamond', serif;
  --font-sans:   'Montserrat', sans-serif;

  --transition:  0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --radius:      4px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--cream);
  color: var(--text-dark);
  font-family: var(--font-light);
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* ── Utility: Gold Divider ── */
.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 0;
  width: 180px;
}

.gold-divider::before,
.gold-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
}

.gold-divider::after {
  background: linear-gradient(to left, transparent, var(--gold));
}

.gold-divider::before {
  content: '◆';
  flex: none;
  font-size: 8px;
  color: var(--gold);
  width: auto;
  height: auto;
  background: none;
  line-height: 1;
}

/* Override: two lines around diamond */
.gold-divider {
  position: relative;
}

/* ── Section Shared Styles ── */
section {
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  padding: 60px 24px 40px;
}

.section-pre {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-script);
  font-size: clamp(2.4rem, 8vw, 4rem);
  color: var(--text-dark);
  font-weight: 400;
  line-height: 1.1;
}

/* ============================================================
   MUSIC BUTTON
   ============================================================ */
.music-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(253, 248, 240, 0.92);
  backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(201, 169, 110, 0.25);
}

.music-btn:hover {
  background: var(--gold);
  color: var(--white);
  transform: scale(1.08);
}

.music-icon {
  font-size: 1.1rem;
  color: var(--gold);
  transition: color 0.3s;
}

.music-btn:hover .music-icon {
  color: var(--white);
}

.music-btn.muted .music-icon::after {
  content: '✕';
  font-size: 0.6rem;
  position: absolute;
  top: 6px;
  right: 6px;
  color: var(--gold-dark);
}

/* ============================================================
   SECTION 1 — OPENING SCREEN
   ============================================================ */
#opening-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Subtle texture background */
#opening-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(201,169,110,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(201,169,110,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ── Door Frame ── */
.door-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: stretch;
}

/* ── Doors ── */
.door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(160deg, #f8f1e4 0%, #ede3d0 50%, #e0d3be 100%);
  z-index: 10;
  transition: transform 1.6s cubic-bezier(0.77, 0, 0.175, 1),
              opacity  0.4s ease 1.4s;
  will-change: transform;
  box-shadow: inset 0 0 60px rgba(160,120,60,0.12);
}

.door-left  { left: 0; }
.door-right { right: 0; }

/* Slide doors out sideways */
.door-left.open  { transform: translateX(-100%); opacity: 0; }
.door-right.open { transform: translateX(100%);  opacity: 0; }

/* Door inner decoration */
.door-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(201,169,110,0.4);
  margin: 0;
}

/* Door ornamental corners */
.door-ornament {
  position: absolute;
  width: 36px;
  height: 36px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.6;
}

.door-ornament.top-left     { top: 20px; left: 20px;  border-width: 1px 0 0 1px; }
.door-ornament.top-right    { top: 20px; right: 20px; border-width: 1px 1px 0 0; }
.door-ornament.bottom-left  { bottom: 20px; left: 20px;  border-width: 0 0 1px 1px; }
.door-ornament.bottom-right { bottom: 20px; right: 20px; border-width: 0 1px 1px 0; }

/* Door panel inset */
.door-panel {
  position: absolute;
  inset: 60px 16px;
  border: 1px solid rgba(201,169,110,0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 40px;
}

/* Door handle ring */
.door-ring {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  opacity: 0.7;
}

.door-left  .door-ring { margin-left: auto; margin-right: 4px; }
.door-right .door-ring { margin-right: auto; margin-left: 4px; }

/* Arch at top of door frame */
.arch-decoration {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100vw);
  z-index: 25;
  pointer-events: none;
}

/* ── Opening Content (centered over doors) ── */
.opening-content {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  pointer-events: none; /* clicks pass through to button only */
  /* Subtle vignette so text pops against door */
  background: radial-gradient(ellipse at center,
    rgba(253,248,240,0.55) 0%,
    transparent 70%
  );
}

.opening-pre {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 20px;
  opacity: 0.85;
}

.opening-names {
  font-family: var(--font-script);
  font-size: clamp(3rem, 14vw, 5.5rem);
  color: var(--text-dark);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 8px;
}

.opening-names .amp {
  font-family: var(--font-serif);
  font-size: 0.45em;
  font-style: italic;
  color: var(--gold);
  display: block;
  margin: 4px 0;
}

.opening-date {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--text-mid);
  margin-top: 6px;
  margin-bottom: 24px;
}

/* Divider ornament */
.divider-ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.divider-ornament span {
  display: block;
  width: 50px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.divider-ornament svg {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

/* ── Open Invitation Button ── */
.open-btn {
  pointer-events: all;
  cursor: pointer;
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 16px 38px;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease, transform 0.3s ease;
}

.open-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.open-btn:hover::before  { transform: scaleX(1); }
.open-btn:hover          { color: var(--white); }
.open-btn:active         { transform: scale(0.97); }

.open-btn span {
  position: relative;
  z-index: 1;
}

/* ============================================================
   PETALS (shared)
   ============================================================ */
.petals-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.petal {
  position: absolute;
  top: -30px;
  font-size: clamp(10px, 2vw, 18px);
  opacity: 0;
  animation: petalFall linear infinite;
  user-select: none;
}

@keyframes petalFall {
  0%   { opacity: 0; transform: translateY(-20px) rotate(0deg); }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(110vh) rotate(720deg) translateX(40px); }
}

/* ============================================================
   SECTION 2 — HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /*
    PLACEHOLDER: when no hero-bg.jpg is found, shows a gradient.
    Replace with your actual couple photo.
  */
  background-color: #2c1810;
  background-image:
    url('images/hero-bg.jpg'),
    linear-gradient(160deg, #2c1810 0%, #4a2e1a 40%, #3a2218 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 10, 5, 0.3) 0%,
    rgba(20, 10, 5, 0.55) 50%,
    rgba(20, 10, 5, 0.75) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 24px;
  max-width: 600px;
  margin: 0 auto;
  color: var(--cream);
}

.hero-top-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s 0.5s forwards;
}

.hero-top-ornament .line {
  display: block;
  width: 50px;
  height: 1px;
  background: var(--gold-light);
  opacity: 0.6;
}

.hero-top-ornament .diamond {
  color: var(--gold-light);
  font-size: 10px;
  opacity: 0.9;
}

.hero-pre {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}

.hero-names {
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 1.2s 0.9s forwards;
}

.name-bride,
.name-groom {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(3.5rem, 14vw, 7rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.05;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}

.hero-and {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 4vw, 1.6rem);
  color: var(--gold-light);
  margin: 4px 0;
  letter-spacing: 0.1em;
}

.hero-request {
  font-family: var(--font-light);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-weight: 300;
  font-style: italic;
  color: rgba(253,248,240,0.85);
  line-height: 1.8;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 1s 1.1s forwards;
}

.hero-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 60px;
  opacity: 0;
  animation: fadeUp 1s 1.3s forwards;
}

.hero-date-day {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.hero-date-full {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  color: var(--white);
  font-style: italic;
}

.hero-date-year {
  font-family: var(--font-light);
  font-size: 0.85rem;
  color: rgba(253,248,240,0.7);
  letter-spacing: 0.1em;
}

/* Scroll hint */
.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
  animation: fadeUp 1s 1.6s forwards;
}

.hero-scroll-hint span {
  font-family: var(--font-sans);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.7;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--gold-light), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* Shared reveal animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTION 3 — COUNTDOWN
   ============================================================ */
#countdown {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding-bottom: 70px;
  position: relative;
}

#countdown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

#countdown::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  padding: 0 16px;
  max-width: 600px;
  margin: 0 auto 40px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 10px;
  flex: 1;
  min-width: 60px;
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 10vw, 4.5rem);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1;
  position: relative;
}

.countdown-number::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: var(--gold);
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-top: 14px;
}

.countdown-separator {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--gold);
  font-weight: 300;
  line-height: 1;
  padding-bottom: 20px;
  flex-shrink: 0;
}

.countdown-quote {
  text-align: center;
  font-family: var(--font-light);
  font-style: italic;
  font-size: clamp(0.8rem, 2.5vw, 1rem);
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto;
  padding: 0 24px;
  line-height: 1.9;
}

/* ============================================================
   SECTION 4 — WEDDING DETAILS
   ============================================================ */
#details {
  background: var(--cream);
  padding-bottom: 70px;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.detail-card {
  background: var(--white);
  border: 1px solid rgba(201,169,110,0.25);
  padding: 40px 28px;
  text-align: center;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.detail-card::before {
  content: '';
  position: absolute;
  top: 8px; left: 8px; right: 8px; bottom: 8px;
  border: 1px solid rgba(201,169,110,0.12);
  pointer-events: none;
}

.detail-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 50px rgba(201,169,110,0.18);
}

.detail-card.featured {
  background: linear-gradient(160deg, #fdf8f0 0%, #f5ede0 100%);
  border-color: rgba(201,169,110,0.5);
}

.detail-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  opacity: 0.85;
}

.detail-title {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.detail-info {
  font-family: var(--font-serif);
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.6;
}

.detail-info.accent {
  color: var(--gold-dark);
  font-style: italic;
}

.detail-info.accent.large {
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  font-weight: 600;
}

.detail-sub {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 8px;
}

/* Map button */
.map-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 28px;
  border: 1.5px solid var(--gold);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dark);
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease;
}

.map-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.map-btn:hover::before { transform: scaleX(1); }
.map-btn:hover         { color: var(--white); }

.map-btn span {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SECTION 5 — LOVE STORY TIMELINE
   ============================================================ */
#love-story {
  background: linear-gradient(180deg, var(--cream-dark) 0%, var(--cream) 100%);
  padding-bottom: 70px;
}

.timeline {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* Central vertical line */
.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--gold) 15%, var(--gold) 85%, transparent);
  opacity: 0.5;
}

.timeline-item {
  position: relative;
  width: 45%;
  margin-bottom: 50px;
}

.timeline-item.left  { margin-right: auto; text-align: right; }
.timeline-item.right { margin-left: auto;  text-align: left; }

/* Dot on the center line */
.timeline-dot {
  position: absolute;
  top: 20px;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--gold);
  z-index: 2;
}

.timeline-item.left  .timeline-dot { right: -26%; }
.timeline-item.right .timeline-dot { left: -26%; }

.timeline-dot.last {
  background: var(--gold);
  color: var(--white);
}

.timeline-year {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 6px;
}

.timeline-heading {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.timeline-text {
  font-family: var(--font-light);
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  color: var(--text-mid);
  line-height: 1.8;
}

/* ── Mobile: stack timeline single column ── */
@media (max-width: 600px) {
  .timeline::before { left: 20px; }

  .timeline-item {
    width: calc(100% - 50px);
    margin-left: 50px !important;
    text-align: left !important;
  }

  .timeline-item.left  .timeline-dot,
  .timeline-item.right .timeline-dot {
    left: -42px !important;
    right: auto !important;
  }
}

/* ============================================================
   SECTION 6 — GALLERY
   ============================================================ */
#gallery {
  background: var(--white);
  padding-bottom: 70px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--beige);
}

/* Placeholder gradient when image is missing */
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #e8ddd0, #d4c4b0);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 24, 16, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  color: var(--white);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 8, 4, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img-wrap {
  max-width: min(90vw, 700px);
  max-height: 85vh;
  position: relative;
}

.lightbox-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid rgba(201,169,110,0.3);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(201,169,110,0.15);
  border: 1px solid rgba(201,169,110,0.4);
  color: var(--gold-light);
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gold);
  color: var(--white);
}

.lightbox-close {
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  border-radius: 50%;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 60px;
  font-size: 1.5rem;
}

.lightbox-prev { left: 8px; border-radius: 2px; }
.lightbox-next { right: 8px; border-radius: 2px; }

/* ============================================================
   SECTION 7 — FINAL
   ============================================================ */
#final {
  min-height: 90vh;
  background: linear-gradient(160deg, #2c1810 0%, #4a2e1a 40%, #3a2218 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow */
#final::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201,169,110,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.final-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 80px 28px;
  max-width: 600px;
  margin: 0 auto;
  color: var(--cream);
}

.rings-icon {
  width: 100px;
  margin: 0 auto 30px;
  opacity: 0.75;
}

.final-pre {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
  opacity: 0.8;
}

.final-names {
  font-family: var(--font-script);
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 12px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.final-date {
  font-family: var(--font-serif);
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  letter-spacing: 0.3em;
  color: var(--gold-light);
  margin-bottom: 28px;
}

.final-message {
  font-family: var(--font-light);
  font-size: clamp(0.88rem, 2.5vw, 1.05rem);
  font-style: italic;
  color: rgba(253,248,240,0.8);
  line-height: 2;
  margin: 28px 0;
}

.final-quote {
  margin: 28px 0;
  padding: 20px 28px;
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
}

.final-quote p {
  font-family: var(--font-light);
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  font-style: italic;
  color: var(--gold-light);
  line-height: 1.8;
}

.final-signature {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: var(--gold-light);
  margin-top: 30px;
  opacity: 0.85;
}

/* ============================================================
   SCROLL REVEAL (class added by JS)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ============================================================
   RESPONSIVE — TABLET (600px+)
   ============================================================ */
@media (min-width: 600px) {
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-card.featured {
    grid-column: 1 / -1;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   RESPONSIVE — DESKTOP (900px+)
   ============================================================ */
@media (min-width: 900px) {
  .details-grid {
    grid-template-columns: 1fr 1.2fr;
    max-width: 660px;
  }

  .detail-card.featured {
    grid-column: auto;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
}

/* ============================================================
   SECTION 8 — LEAVE A MESSAGE
   ============================================================ */
#messages {
  background: var(--cream);
  padding-bottom: 80px;
  position: relative;
}

#messages::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* ── Form Wrapper ── */
.msg-form-wrap {
  max-width: 620px;
  margin: 0 auto 50px;
  padding: 0 20px;
}

.msg-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.msg-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.msg-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.msg-label {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.msg-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--white);
  border: 1.5px solid rgba(201, 169, 110, 0.3);
  border-radius: 2px;
  font-family: var(--font-light);
  font-size: 1rem;
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  -webkit-appearance: none;
}

.msg-input::placeholder {
  color: var(--text-light);
  font-style: italic;
  font-size: 0.9rem;
}

.msg-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.12);
}

.msg-input.error {
  border-color: #c0392b;
}

.msg-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.7;
}

.msg-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 18px;
}

/* Validation error text */
.msg-error {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  color: #c0392b;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.msg-error.visible {
  opacity: 1;
}

/* Character counter */
.msg-char-count {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  color: var(--text-light);
  text-align: right;
  letter-spacing: 0.05em;
  margin-left: auto;
}

.msg-char-count.near-limit {
  color: var(--gold-dark);
}

/* ── Send Button ── */
.msg-send-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 38px;
  background: var(--text-dark);
  border: 1.5px solid var(--text-dark);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease, transform 0.2s ease;
  border-radius: 2px;
}

.msg-send-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.msg-send-btn:hover::before  { transform: translateX(0); }
.msg-send-btn:hover          { border-color: var(--gold); }
.msg-send-btn:active         { transform: scale(0.97); }

.btn-label, .btn-icon {
  position: relative;
  z-index: 1;
}

.btn-icon {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.msg-send-btn:hover .btn-icon {
  transform: translateX(3px);
}

/* Sent state */
.msg-send-btn.sent {
  background: #2ecc71;
  border-color: #2ecc71;
  pointer-events: none;
}

.msg-send-btn.sent::before { display: none; }

.msg-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Send Error ── */
.msg-send-error {
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #c0392b;
}

/* ── Messages Feed ── */
.msg-feed {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Message Card ── */
.msg-card {
  background: var(--white);
  border: 1px solid rgba(201, 169, 110, 0.2);
  border-radius: 4px;
  padding: 20px 22px;
  box-shadow: 0 2px 16px rgba(44, 24, 16, 0.06);
  display: flex;
  gap: 14px;
  align-items: flex-start;

  /* Slide-in animation */
  animation: cardSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Avatar circle with initial */
.msg-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0;
}

.msg-card-body {
  flex: 1;
  min-width: 0;
}

.msg-card-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.msg-card-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
}

.msg-card-time {
  font-family: var(--font-sans);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--text-light);
  text-transform: uppercase;
}

.msg-card-text {
  font-family: var(--font-light);
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.75;
  word-break: break-word;
}

/* Divider between form and feed when there are messages */
.msg-feed-divider {
  max-width: 620px;
  margin: 0 auto 28px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.msg-feed-divider span {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.msg-feed-divider::before,
.msg-feed-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201,169,110,0.4));
}

.msg-feed-divider::after {
  background: linear-gradient(to left, transparent, rgba(201,169,110,0.4));
}

/* Empty state */
.msg-empty {
  text-align: center;
  padding: 30px 0 10px;
  font-family: var(--font-light);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher {
  position: fixed;
  top: 16px;
  right: 20px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(253, 248, 240, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(201, 169, 110, 0.4);
  border-radius: 30px;
  padding: 6px 14px;
  box-shadow: 0 4px 20px rgba(44, 24, 16, 0.12);
  transition: box-shadow 0.3s ease;
}

.lang-switcher:hover {
  box-shadow: 0 6px 28px rgba(201, 169, 110, 0.25);
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-light);
  padding: 3px 8px;
  border-radius: 20px;
  transition: color 0.3s ease, background 0.3s ease;
  line-height: 1;
}

.lang-btn.active {
  color: var(--white);
  background: var(--gold);
}

.lang-btn:hover:not(.active) {
  color: var(--gold-dark);
}

.lang-sep {
  color: rgba(201, 169, 110, 0.5);
  font-size: 0.7rem;
  line-height: 1;
  user-select: none;
}

/* Mirror switcher position in RTL */
[dir="rtl"] .lang-switcher {
  right: auto;
  left: 20px;
}

/* Mirror music button in RTL */
[dir="rtl"] .music-btn {
  right: auto;
  left: 24px;
}

/* ============================================================
   RTL OVERRIDES
   ============================================================ */

/* Gallery title slightly larger in Arabic */
[dir="rtl"] #gallery .section-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

/* Timeline — swap left/right sides in RTL */
[dir="rtl"] .timeline::before {
  left: auto;
  right: 50%;
  transform: translateX(50%);
}

[dir="rtl"] .timeline-item.left {
  margin-right: 0;
  margin-left: auto;
  text-align: left;
}

[dir="rtl"] .timeline-item.right {
  margin-left: 0;
  margin-right: auto;
  text-align: right;
}

[dir="rtl"] .timeline-item.left  .timeline-dot { right: auto; left: -26%; }
[dir="rtl"] .timeline-item.right .timeline-dot { left: auto;  right: -26%; }

/* Mobile timeline RTL */
@media (max-width: 600px) {
  [dir="rtl"] .timeline::before { right: 20px; left: auto; }
  [dir="rtl"] .timeline-item {
    margin-right: 50px !important;
    margin-left: 0 !important;
    text-align: right !important;
  }
  [dir="rtl"] .timeline-item .timeline-dot {
    right: -42px !important;
    left: auto !important;
  }
}

/* Message form RTL */
[dir="rtl"] .msg-send-btn { align-self: flex-end; }
[dir="rtl"] .msg-meta-row { flex-direction: row-reverse; }
[dir="rtl"] .msg-card-header { flex-direction: row-reverse; }
[dir="rtl"] .msg-char-count { margin-left: 0; margin-right: auto; }

/* Detail cards text in RTL */
[dir="rtl"] .detail-title,
[dir="rtl"] .detail-info,
[dir="rtl"] .detail-sub {
  text-align: center;
}

/* Hero scroll hint */
[dir="rtl"] .hero-scroll-hint {
  align-items: center;
}

/* Gold divider keeps centered */
[dir="rtl"] .gold-divider {
  direction: ltr;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   FOOTER — POWERED BY MONAASBA
   ============================================================ */
#site-footer {
  background: var(--cream);
  padding: 22px 20px 28px;
  text-align: center;
}

.footer-credit {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
}

.footer-credit a {
  color: var(--gold-dark);
  font-weight: 500;
  border-bottom: 1px solid rgba(160, 120, 64, 0.4);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.footer-credit a:hover {
  color: var(--gold);
  border-color: var(--gold);
}
