/* ============================================================
   shared.css — Thiệp Cưới Hiệp & Tuyết
   Dùng chung cho tất cả các file thiệp
   ============================================================ */

/* Variables */
:root {
  --gold:       #c9a96e;
  --gold-light: #e8d5b0;
  --gold-dark:  #9a7a4a;
  --cream:      #faf6f0;
  --brown:      #3d2b1f;
}

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  { background: var(--cream); color: var(--brown); font-family: 'Josefin Sans', sans-serif; overflow-x: hidden; }

/* ── Music Button ─────────────────────────────────────────── */
#musicBtn {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(201,169,110,0.9); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25); transition: background 0.3s;
}
#musicBtn:hover { background: var(--gold-dark); }
#musicBtn svg   { width: 20px; height: 20px; fill: white; }

/* ── Hero ─────────────────────────────────────────────────── */
#hero { position: relative; height: 100vh; min-height: 600px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-slides { position: absolute; inset: 0; }
.hero-slide  { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease-in-out; }
.hero-slide.active { opacity: 1; }
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(30,15,5,0.35), rgba(30,15,5,0.55)); }

.hero-content {
  position: relative; z-index: 2; text-align: center;
  padding: 40px 50px; width: 90%; max-width: 560px;
  background: rgba(20,10,5,0.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(201,169,110,0.25); border-radius: 4px;
  animation: fadeUp 1.6s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-label     { font-weight: 100; letter-spacing: 0.4em; font-size: clamp(10px,2vw,13px); color: var(--gold-light); text-transform: uppercase; margin-bottom: 16px; }
.hero-names     { font-family: 'Great Vibes', cursive; font-size: clamp(36px,8vw,80px); color: #fff; line-height: 1; text-shadow: 0 2px 30px rgba(0,0,0,0.4); white-space: nowrap; }
.hero-ampersand { display: block; font-size: 0.55em; color: var(--gold-light); margin: -10px 0; }
.hero-divider   { width: 80px; height: 1px; background: var(--gold-light); margin: 16px auto; opacity: 0.7; }
.hero-date      { margin-top: 28px; font-weight: 300; letter-spacing: 0.3em; font-size: clamp(13px,3vw,18px); color: var(--gold-light); }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: bounce 2s infinite; }
.scroll-hint span { display: block; width: 1px; height: 40px; background: rgba(255,255,255,0.4); }
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}

/* ── Sections ─────────────────────────────────────────────── */
section           { padding: clamp(60px,10vw,100px) clamp(20px,6vw,80px); max-width: 900px; margin: 0 auto; }
.ornament         { text-align: center; font-size: 28px; color: var(--gold); margin: 8px 0; }
.section-title    { font-family: 'Cormorant Garamond', serif; font-size: clamp(26px,5vw,42px); font-weight: 300; text-align: center; letter-spacing: 0.05em; color: var(--brown); margin-bottom: 8px; }
.section-subtitle { text-align: center; font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; color: var(--gold); margin-bottom: 40px; }
.separator        { display: flex; align-items: center; gap: 16px; padding: 0 clamp(20px,6vw,80px); max-width: 900px; margin: 0 auto; }
.separator-line   { flex: 1; height: 1px; background: var(--gold-light); }
.separator-icon   { color: var(--gold); font-size: 16px; }

/* ── Family ───────────────────────────────────────────────── */
.family-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: start; margin-top: 20px; }
@media (max-width: 600px) {
  .family-grid    { grid-template-columns: 1fr; gap: 30px; }
  .family-divider { display: none; }
}
.family-card         { text-align: center; }
.family-card h3      { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(18px,3.5vw,26px); font-weight: 400; color: var(--gold-dark); margin-bottom: 14px; }
.family-card p       { font-size: 14px; line-height: 2; color: var(--brown); letter-spacing: 0.05em; }
.family-card .role   { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.family-card .person { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.2em; color: var(--gold-dark); }
.family-divider      { width: 1px; background: linear-gradient(to bottom, transparent, var(--gold), transparent); align-self: stretch; min-height: 100px; margin: 0 10px; }

/* ── Ceremony ─────────────────────────────────────────────── */
.ceremony-box { background: linear-gradient(135deg, var(--brown), #2a1a0f); border-radius: 4px; padding: clamp(40px,8vw,70px) clamp(30px,6vw,60px); text-align: center; position: relative; overflow: hidden; }
.ceremony-box::before { content: ''; position: absolute; inset: 12px; border: 1px solid rgba(201,169,110,0.3); border-radius: 2px; pointer-events: none; }
.big-date          { font-family: 'Cormorant Garamond', serif; font-size: clamp(48px,12vw,90px); font-weight: 300; color: var(--gold-light); line-height: 1; }
.big-date span     { display: block; font-size: 0.45em; letter-spacing: 0.2em; color: var(--gold); font-family: 'Josefin Sans', sans-serif; font-weight: 100; margin-bottom: 4px; }
.lunar-date        { margin-top: 10px; font-size: clamp(12px,2.5vw,16px); color: var(--gold-light); letter-spacing: 0.2em; font-family: 'Josefin Sans', sans-serif; font-weight: 100; opacity: 0.85; }
.ceremony-time     { margin-top: 24px; font-weight: 300; letter-spacing: 0.4em; font-size: clamp(13px,3vw,18px); color: var(--gold-light); text-transform: uppercase; }
.ceremony-divider  { width: 60px; height: 1px; background: rgba(201,169,110,0.4); margin: 20px auto; }
.ceremony-location { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: clamp(16px,3vw,22px); color: rgba(255,255,255,0.8); }

/* ── Map ──────────────────────────────────────────────────── */
.map-wrapper        { border-radius: 4px; overflow: hidden; box-shadow: 0 8px 40px rgba(61,43,31,0.15); border: 1px solid var(--gold-light); }
.map-wrapper iframe { width: 100%; height: 380px; border: 0; display: block; }
.map-center         { text-align: center; margin-top: 20px; }
.map-link           { display: inline-block; padding: 12px 32px; border: 1px solid var(--gold); color: var(--gold-dark); text-decoration: none; font-size: 11px; letter-spacing: 0.35em; text-transform: uppercase; transition: all 0.3s; }
.map-link:hover     { background: var(--gold); color: white; }

/* ── Footer ───────────────────────────────────────────────── */
footer        { background: var(--brown); color: var(--gold-light); text-align: center; padding: 50px 20px; }
.footer-names { font-family: 'Great Vibes', cursive; font-size: clamp(28px,7vw,60px); color: var(--gold); line-height: 1.2; white-space: nowrap; }
footer p      { margin-top: 14px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.6; }

/* ── Utilities ────────────────────────────────────────────── */
#heartsCanvas   { position: fixed; inset: 0; pointer-events: none; z-index: 999; }
.reveal         { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Timeline ─────────────────────────────────────────────── */
.timeline-tabs { display: flex; justify-content: center; gap: 0; margin-bottom: 40px; }
.timeline-tab {
  padding: 12px 36px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  border: 1px solid var(--gold); cursor: pointer; background: transparent;
  color: var(--gold-dark); font-family: 'Josefin Sans', sans-serif; transition: all 0.3s;
}
.timeline-tab:first-child { border-right: none; }
.timeline-tab.active { background: var(--gold); color: white; }
.timeline-tab:hover:not(.active) { background: var(--gold-light); }

.timeline-panel { display: none; }
.timeline-panel.active { display: block; }

.timeline { position: relative; padding: 10px 0; }
.timeline::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  transform: translateX(-50%);
}
@media (max-width: 600px) {
  .timeline::before { left: 20px; }
  .timeline-tab { padding: 10px 18px; font-size: 10px; letter-spacing: 0.2em; }
}

.timeline-item { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 36px; position: relative; }
.timeline-item:nth-child(odd)  { flex-direction: row; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
@media (max-width: 600px) {
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) { flex-direction: row; padding-left: 48px; }
}

.timeline-dot {
  position: absolute; left: 50%; top: 6px; width: 14px; height: 14px;
  background: var(--gold); border: 3px solid var(--cream); border-radius: 50%;
  transform: translateX(-50%); z-index: 1; flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--gold);
}
@media (max-width: 600px) { .timeline-dot { left: 20px; transform: translateX(-50%); } }

.timeline-content {
  width: calc(50% - 30px); background: white;
  border: 1px solid var(--gold-light); border-radius: 4px;
  padding: 18px 22px; box-shadow: 0 4px 20px rgba(61,43,31,0.07);
}
.timeline-item:nth-child(odd)  .timeline-content { margin-right: auto; text-align: right; }
.timeline-item:nth-child(even) .timeline-content { margin-left:  auto; text-align: left; }
@media (max-width: 600px) { .timeline-content { width: 100%; text-align: left !important; } }

.tl-time  { font-size: 11px; letter-spacing: 0.3em; color: var(--gold); text-transform: uppercase; margin-bottom: 4px; }
.tl-title { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-weight: 600; color: var(--brown); margin-bottom: 4px; }
.tl-desc  { font-size: 13px; color: #7a6050; line-height: 1.6; }

.timeline-day-label {
  text-align: center; font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: clamp(15px,3vw,20px); color: var(--gold-dark); margin-bottom: 32px;
  letter-spacing: 0.08em;
}

/* ── QR / Mừng Cưới ──────────────────────────────────────── */
.qr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 10px; }
@media (max-width: 500px) { .qr-grid { grid-template-columns: 1fr; gap: 24px; } }
.qr-card {
  text-align: center; border: 1px solid var(--gold-light); border-radius: 4px;
  padding: 28px 20px; background: white; box-shadow: 0 4px 20px rgba(61,43,31,0.07);
}
.qr-card img       { width: 100%; max-width: 200px; height: auto; border-radius: 2px; display: block; margin: 0 auto 16px; cursor: zoom-in; transition: transform 0.2s, box-shadow 0.2s; }
.qr-card img:hover { transform: scale(1.03); box-shadow: 0 6px 24px rgba(61,43,31,0.18); }
.qr-name  { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 22px; color: var(--gold-dark); margin-bottom: 6px; }
.qr-label { font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--gold); }
.qr-bank  { margin-top: 10px; font-size: 13px; letter-spacing: 0.08em; color: var(--brown); font-family: 'Josefin Sans', sans-serif; }
.qr-note  { margin-top: 24px; font-size: 13px; color: #9a7a6a; text-align: center; letter-spacing: 0.05em; line-height: 1.8; }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.85); align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img  { max-width: 90vw; max-height: 90vh; border-radius: 6px; box-shadow: 0 8px 60px rgba(0,0,0,0.6); animation: zoomIn 0.25s ease; }
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  color: white; font-size: 36px; cursor: pointer; line-height: 1;
  opacity: 0.8; transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(201,169,110,0.75); border: none; color: white;
  width: 44px; height: 44px; border-radius: 50%; font-size: 22px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 10001;
}
.lb-nav:hover  { background: var(--gold-dark); }
.lb-nav.lb-prev { left: 16px; }
.lb-nav.lb-next { right: 16px; }
.lb-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 12px; letter-spacing: 0.2em;
  font-family: 'Josefin Sans', sans-serif;
}

/* ── Album Grid ───────────────────────────────────────────── */
.album-grid { columns: 3; column-gap: 10px; }
@media (max-width: 600px) { .album-grid { columns: 2; column-gap: 8px; } }
.album-grid-item {
  break-inside: avoid; margin-bottom: 10px;
  cursor: zoom-in; overflow: hidden; border-radius: 3px;
  border: 1px solid var(--gold-light);
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
@media (max-width: 600px) { .album-grid-item { margin-bottom: 8px; } }
.album-grid-item:hover { transform: scale(1.02); box-shadow: 0 4px 20px rgba(61,43,31,0.2); }
.album-grid-item img   { width: 100%; height: auto; display: block; }
