/* ============================================================
   WEDDING INVITATION - STYLE SHEET
   Based on Cinelove Template thiep-cuoi-47
   ============================================================ */

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #964B00;
  --primary-light: #C17A3A;
  --primary-dark: #633000;
  --accent-gold: #C08A42;
  --bg-road: #FFF7ED;
  --page-background: #ffffff;
  --card-bg: #ffffff;
  --text-dark: #3F2A1E;
  --text-muted: #725A4B;
  --pink-light: #FFF0E1;
  --pink-accent: #D39A62;
  --heart-color: #C17A3A;
  --calendar-header: #633000;
  --calendar-accent: #964B00;
  --calendar-line: #E9D8C6;
  --section-gutter: clamp(16px, 5vw, 24px);
  --invitation-max-width: 480px;

  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Cormorant Infant', serif;
  --font-display: 'Cormorant Infant', serif;
  --font-sans: 'Cormorant Infant', serif;
  --font-numeric: 'Cormorant Infant', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: #ffffff;
  color: var(--text-dark);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ==================== FLOATING HEARTS BG ==================== */
.floating-hearts {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  color: var(--heart-color);
  opacity: 0.6;
  animation: floatHeart linear infinite;
  font-size: 14px;
}

@keyframes floatHeart {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% { opacity: 0.7; }
  90% { opacity: 0.5; }
  100% {
    transform: translateY(-10vh) rotate(360deg) scale(0.5);
    opacity: 0;
  }
}

/* ==================== PETAL RAIN ==================== */
.petal-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
  display: none;
}

.petal-rain.active { display: block; }

.rose-petal {
  position: absolute;
  top: -24px;
  border-radius: 2px 90% 2px 90%;
  opacity: 0;
  box-shadow: inset -2px -2px 3px rgba(100, 20, 35, 0.16);
  animation: rosePetalFall linear forwards;
}

@keyframes rosePetalFall {
  0% { transform: translate3d(0, -24px, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.9; }
  100% { transform: translate3d(var(--petal-drift), 110vh, 0) rotate(var(--petal-spin)); opacity: 0; }
}

/* ==================== INVITATION CARD WRAPPER ==================== */
.invitation-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--invitation-max-width);
  margin: 0 auto;
  background-color: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(70, 34, 37, 0.06);
}

/* ==================== MUSIC BUTTON ==================== */
.music-btn {
  position: fixed;
  top: 16px;
  right: max(16px, calc((100vw - 480px) / 2 + 16px));
  z-index: 1000;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--primary-dark);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary-dark) 35%, transparent);
}

.music-btn:hover { transform: scale(1.1); }

.music-btn.playing {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==================== COVER / HERO SECTION ==================== */
.cover-section {
  position: relative;
  height: 100vh;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1a1a1a;
  touch-action: none;
}

.cover-section.is-swiping { user-select: none; }

.cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 45%,
    rgba(255, 255, 255, 0.3) 70%,
    rgba(255, 255, 255, 0.9) 88%,
    rgba(255, 255, 255, 1) 100%
  );
}

/* Family-specific ceremony title */
.cover-invitation-copy {
  position: absolute;
  top: 13%;
  left: 0;
  width: 100%;
  z-index: 3;
  padding: 0 20px;
  text-align: center;
  animation: fadeInUp 1s ease 0.5s both;
}

.cover-ceremony-title {
  font-family: var(--font-script);
  font-size: 76px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--primary);
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.82);
}

.cover-couple-label {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 5px;
  color: var(--text-dark);
}

.cover-copy-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 190px;
  margin: 18px auto;
  color: var(--primary);
  font-size: 14px;
}

.cover-copy-divider::before,
.cover-copy-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--primary-dark) 35%, transparent);
}

.cover-opening-copy {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--text-dark);
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.8);
}

.cover-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px 32px;
  margin-top: auto;
}

.cover-swipe-hint {
  font-family: var(--font-serif);
  font-size: 16px;
  color: white;
  text-shadow: 0 1px 8px rgba(50, 28, 28, 0.65);
  animation: fadeInUp 0.8s ease 1s both;
}

.cover-open-btn {
  display: grid;
  place-items: center;
  width: 54px;
  height: 48px;
  margin-top: 4px;
  padding: 0;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  animation: fadeInUp 0.8s ease 1.2s both;
}

.cover-open-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
  border-radius: 8px;
}

.cover-arrow {
  width: 15px;
  height: 15px;
  border-right: 3px solid white;
  border-bottom: 3px solid white;
  transform: rotate(45deg);
  filter: drop-shadow(0 1px 4px rgba(50, 28, 28, 0.65));
}

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

/* ==================== MAIN CONTENT ==================== */
.main-content {
  display: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.main-content.visible {
  display: block;
  opacity: 1;
}

.main-content.opening {
  animation: revealMainContent 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes revealMainContent {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .main-content { transition: none; }
  .main-content.opening { animation: none; }
  .cover-invitation-copy,
  .cover-swipe-hint,
  .cover-open-btn,
  .cover-arrow { animation: none; }
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==================== SECTION BASE ==================== */
section {
  padding: clamp(28px, 5vw, 36px) var(--section-gutter);
  position: relative;
  background: rgba(255, 255, 255, 0.78);
}

.section-heart-divider {
  text-align: center;
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 12px;
}

/* ==================== FAMILY INFO ==================== */
.family-section {
  padding: clamp(28px, 5vw, 36px) var(--section-gutter);
  background: transparent;
}

.family-invitation {
  max-width: 432px;
  margin: 0 auto;
  padding: 34px 24px 30px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid color-mix(in srgb, var(--primary-dark) 16%, transparent);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(131, 24, 67, 0.08);
}

.family-invitation-family {
  font-family: var(--font-script);
  font-size: 42px;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 10px;
}

.family-invitation-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 14px;
  white-space: pre-line;
}

.family-invitation-ceremony {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.65;
  color: var(--text-dark);
}

.family-announcement {
  margin: 22px 0;
  padding: 20px 0;
  border-top: 1px solid color-mix(in srgb, var(--primary-dark) 16%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--primary-dark) 16%, transparent);
}

.family-announcement .section-heart-divider {
  margin-bottom: 8px;
}

.family-announcement .announcement-text {
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.family-announcement .couple-names-full {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.family-announcement .couple-names-full #fullBrideName { order: 1; }
.family-announcement .couple-names-full .amp { order: 2; }
.family-announcement .couple-names-full #fullGroomName { order: 3; }

.family-room .family-announcement .couple-names-full #fullGroomName { order: 1; }
.family-room .family-announcement .couple-names-full #fullBrideName { order: 3; }

.family-announcement .couple-names-full h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--primary);
  overflow-wrap: anywhere;
}

.family-announcement .couple-names-full .amp {
  font-size: 20px;
  color: var(--primary-light);
}

.family-invitation-honor {
  max-width: 340px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  font-style: italic;
}

/* ==================== CEREMONY DATE DISPLAY ==================== */
.ceremony-date-section {
  text-align: center;
  padding: 32px var(--section-gutter);
}

.ceremony-date-section .ceremony-heart {
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 10px;
}

.ceremony-date-section h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.ceremony-title {
  font-weight: 700;
}

.ceremony-time {
  font-family: var(--font-numeric);
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.ceremony-date-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 22px 0 10px;
}

.ceremony-date-display .month,
.ceremony-date-display .year {
  font-family: var(--font-numeric);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-dark);
}

.ceremony-date-display .day {
  font-family: var(--font-numeric);
  font-size: 68px;
  font-weight: 700;
  color: var(--primary);
  border-left: 3px solid var(--accent-gold);
  border-right: 3px solid var(--accent-gold);
  padding: 0 22px;
  line-height: 1;
}

.ceremony-lunar {
  font-size: 13px;
  color: var(--primary);
  font-style: italic;
}

.ceremony-venue {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--primary-dark) 16%, transparent);
  letter-spacing: 1px;
}

/* ==================== EVENT DETAIL CARDS ==================== */
.events-section {
  padding: 28px var(--section-gutter) 32px;
  background: #ffffff;
}

.event-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 24px 20px;
  border-radius: 14px;
  background: var(--primary-dark);
  color: white;
  text-align: center;
  box-shadow: 0 8px 24px rgba(131, 24, 67, 0.16);
}

.event-card:last-child { margin-bottom: 0; }

.event-card::before,
.event-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.event-card::before {
  top: -34px;
  right: -28px;
  width: 100px;
  height: 100px;
}

.event-card::after {
  bottom: -48px;
  left: -24px;
  width: 120px;
  height: 120px;
}

.event-card h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.event-card-main-title,
.event-card-time-line {
  display: block;
}

.event-card-time-line {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.35;
  text-transform: none;
}

.event-card .event-day,
.event-card .event-lunar,
.event-card .event-venue,
.event-card .event-address,
.event-card .map-btn {
  position: relative;
  z-index: 1;
}

.event-card .event-day {
  font-family: var(--font-numeric);
  font-size: 14px;
  opacity: 0.9;
}

.event-card .event-date-big {
  display: inline-block;
  margin: 8px 0 2px;
  color: var(--accent-gold);
  font-family: var(--font-numeric);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
}

.event-card .event-date-big::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: var(--accent-gold);
}

.event-card .event-date-big::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 5px;
  background: var(--accent-gold);
}

.event-card .event-date-big::before { margin-bottom: 5px; }

.event-card .event-lunar {
  font-size: 12px;
  font-style: italic;
  opacity: 0.8;
}

.event-card .event-venue {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.event-card .event-address:empty { display: none; }

.event-card .map-btn {
  margin-top: 14px;
  padding: 7px 20px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  background: transparent;
  color: white;
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.event-card .map-btn:hover {
  background: white;
  color: var(--primary-dark);
}

/* ==================== ROADMAP ILLUSTRATION ==================== */
.roadmap-section {
  text-align: center;
  padding: 0 var(--section-gutter);
  position: relative;
  overflow-x: clip;
  min-height: 420px;
}

.roadmap-container {
  position: relative;
  width: 100%;
  height: 360px;
}

/* Nhà Gái marker - top right */
.road-marker-nha-gai {
  position: absolute;
  top: 0;
  right: 10px;
  text-align: center;
  z-index: 5;
}

.road-marker-nha-gai .house-icon,
.road-marker-nha-trai .house-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 2px;
}

.road-marker-nha-gai .marker-label,
.road-marker-nha-trai .marker-label {
  font-family: var(--font-script);
  font-size: 26px;
  color: var(--primary);
  display: block;
}

.road-badge {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 5px 14px;
  border-radius: 4px;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  margin-top: 4px;
}

.road-badge:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* Nhà Trai marker - bottom left */
.road-marker-nha-trai {
  position: absolute;
  bottom: 0;
  left: 10px;
  text-align: center;
  z-index: 5;
}

.family-room .road-marker-nha-gai {
  top: auto;
  right: auto;
  bottom: 0;
  left: 10px;
}

.family-room .road-marker-nha-trai {
  top: 0;
  right: 10px;
  bottom: auto;
  left: auto;
}

/* SVG Road */
.roadmap-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

/* Decorative elements */
.road-deco {
  position: absolute;
  z-index: 3;
  font-size: 14px;
  opacity: 0.7;
}

.road-car {
  position: absolute;
  z-index: 4;
  font-size: 28px;
  animation: carBounce 2s ease-in-out infinite;
}

@keyframes carBounce {
  0%, 100% { transform: translateY(0) rotate(-25deg); }
  50% { transform: translateY(-8px) rotate(-25deg); }
}

/* ==================== CALENDAR ==================== */
.calendar-section {
  padding: 24px var(--section-gutter) 30px;
  background: var(--page-background);
}

.calendar-frame {
  width: 80%;
  max-width: 360px;
  margin: 0 auto;
  background: #fffafc;
  border: 1px solid #f1dfe7;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(70, 34, 37, 0.08);
  overflow: hidden;
}

.calendar-header {
  color: var(--calendar-header);
  text-align: center;
}

.calendar-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.45;
}

.month-title {
  padding-top: 0;
  padding-bottom: 16px;
  text-align: center;
}

.calendar-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-month-name {
  font-family: var(--font-numeric);
  font-weight: 600;
  font-size: 30px;
  line-height: 1;
  color: var(--calendar-header);
}

.calendar-year {
  font-family: var(--font-numeric);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-dark);
}

.calendar-wrapper {
  padding-top: 0;
}

.calendar-weekdays,
.calendar-days {
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 10px;
  border: 1px solid #f0c9d7;
  border-radius: 8px;
  background: var(--pink-light);
  overflow: hidden;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-grid {
  width: 100%;
  min-width: 0;
}

.calendar-weekdays {
  min-width: 0;
}

.calendar-weekdays span {
  display: flex;
  min-width: 0;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 2px;
  border: 0;
  background: var(--pink-light);
  font-weight: 600;
  color: var(--calendar-header);
  font-family: var(--font-numeric);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.calendar-days {
  min-width: 0;
  grid-auto-rows: clamp(34px, 10vw, 42px);
}

.calendar-day {
  display: flex;
  min-width: 0;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  font-family: var(--font-numeric);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: 0.2s ease;
}

.calendar-day:hover {
  border-color: var(--pink-accent);
  background: var(--pink-light);
  transform: translateY(-1px);
}

.calendar-day.empty { color: transparent; }

.calendar-day.highlight {
  color: white;
  font-weight: 700;
}

.calendar-day.highlight .day-number {
  background: var(--calendar-accent);
  border-radius: 50%;
  width: clamp(30px, 8vw, 34px);
  height: clamp(30px, 8vw, 34px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: heartBeat 1.5s ease infinite;
}

.calendar-day.secondary .day-number {
  background: #fff4dc;
  color: var(--calendar-header);
  font-weight: 600;
  border-radius: 50%;
  width: clamp(30px, 8vw, 34px);
  height: clamp(30px, 8vw, 34px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: 1px solid color-mix(in srgb, var(--accent-gold) 70%, transparent);
  outline-offset: 1px;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .calendar-day.highlight .day-number { animation: none; }
}

/* ==================== INVITATION TEXT + PHOTO ==================== */
.invitation-text-section {
  text-align: center;
  padding: 32px var(--section-gutter);
}

.invitation-photo-wrapper {
  position: relative;
  margin-bottom: 28px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.invitation-photo-wrapper img {
  width: 100%;
}

.invitation-photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 50px 20px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  color: white;
  text-align: center;
}

.invitation-photo-overlay h3 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.invitation-photo-overlay .couple-script {
  font-family: var(--font-script);
  font-size: 24px;
}

.invitation-poem {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2;
  color: var(--text-dark);
  font-style: italic;
}

.invitation-poem p {
  margin-bottom: 2px;
}

/* ==================== COUNTDOWN ==================== */
.countdown-section {
  text-align: center;
  padding: 28px var(--section-gutter) 32px;
}

.countdown-title {
  margin: 0 0 26px;
  font-family: var(--font-display);
  font-size: clamp(22px, 6vw, 28px);
  font-weight: 400;
  line-height: 1.35;
  color: #111a3b;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  font-family: var(--font-numeric);
}

.countdown-item {
  background: var(--primary);
  color: white;
  border-radius: 12px;
  padding: 18px 8px;
  position: relative;
  overflow: hidden;
}

.countdown-item::after {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.countdown-item .number {
  font-family: var(--font-numeric);
  font-size: 34px;
  font-weight: 700;
  display: block;
  line-height: 1;
}

.countdown-item .label {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 6px;
  display: block;
  letter-spacing: 1px;
}

/* ==================== STORY SECTIONS ==================== */
.just-married-section,
.our-love-section {
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
}

.just-married-section {
  padding: 0 var(--section-gutter) 28px;
}

.just-married-copy,
.our-love-copy {
  max-width: 430px;
  margin: 0 auto 28px;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dark);
}

.just-married-photo {
  position: relative;
  overflow: hidden;
  max-width: 430px;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(63, 42, 30, 0.16);
}

.just-married-photo img {
  width: 100%;
  height: clamp(288px, 74vw, 396px);
  object-fit: cover;
  object-position: center top;
  transform: scale(1.3);
  transform-origin: 65% 60%;
}

.just-married-overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 34px 20px 12px;
  background: linear-gradient(to top, rgba(50, 28, 23, 0.64), transparent);
  color: white;
  font-family: var(--font-script);
  font-size: clamp(42px, 13vw, 66px);
  line-height: 0.72;
}

.our-love-section {
  padding: 36px var(--section-gutter) 32px;
}

.our-love-section h2 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(34px, 10vw, 44px);
  font-weight: 400;
  letter-spacing: 2px;
  color: #111a3b;
}

.our-love-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 432px;
  margin: 0 auto 18px;
  overflow: hidden;
}

.our-love-layout img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(70, 34, 37, 0.14);
}

.our-love-layout .our-love-main {
  aspect-ratio: 4 / 3;
  height: clamp(240px, 67vw, 324px);
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.2);
  transform-origin: center 70%;
}

.our-love-pair {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.our-love-pair img {
  aspect-ratio: 3 / 4;
}

.our-love-copy {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.5;
}

/* ==================== PHOTO GALLERY ==================== */
.gallery-section {
  padding: 36px var(--section-gutter);
}

.gallery-section .section-title {
  text-align: center;
  margin-bottom: 24px;
}

.gallery-section .section-title h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--text-dark);
  line-height: 1;
}

.gallery-section .section-title .sub-script {
  font-family: var(--font-script);
  font-size: 22px;
  color: var(--primary);
  display: block;
  margin: 2px 0;
}

.gallery-section .section-title .sub-display {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--text-dark);
  line-height: 1;
}

/* Swiper overrides */
.gallery-swiper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  margin-bottom: 12px;
}

.gallery-swiper .swiper-slide img {
  width: 100%;
  height: min(90vw, 420px);
  object-fit: cover;
  object-position: center 25%;
  background: var(--bg-road);
}

.gallery-swiper .swiper-button-prev,
.gallery-swiper .swiper-button-next {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-swiper .swiper-button-prev::after,
.gallery-swiper .swiper-button-next::after {
  font-size: 14px;
  color: var(--text-dark);
  font-weight: 700;
}

.gallery-thumbs-swiper {
  margin-top: 8px;
}

.gallery-thumbs-swiper .swiper-slide {
  width: 70px !important;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s;
  opacity: 0.6;
  transition: all 0.3s;
}

.gallery-thumbs-swiper .swiper-slide-thumb-active {
  border-color: var(--primary);
  opacity: 1;
}

.gallery-thumbs-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== THANK YOU ==================== */
.gratitude-section {
  text-align: center;
  padding: 36px var(--section-gutter) 44px;
  background: rgba(255, 255, 255, 0.82);
}

.gratitude-content {
  max-width: 390px;
  margin: 0 auto;
}

.gratitude-content h2 {
  font-family: var(--font-script);
  font-size: 40px;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 16px;
}

.gratitude-content p {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.gratitude-content .gratitude-signoff {
  margin: 22px 0 0;
  font-family: var(--font-script);
  font-size: 32px;
  color: var(--primary);
}

/* ==================== TOAST NOTIFICATION ==================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: white;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--primary-dark) 30%, transparent);
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Small phones */
@media (max-width: 360px) {
  .cover-ceremony-title {
    font-size: 62px;
  }

  .ceremony-date-display .day {
    font-size: 54px;
    padding: 0 16px;
  }

  .ceremony-date-display .month,
  .ceremony-date-display .year {
    font-size: 16px;
  }

  .countdown-item .number {
    font-size: 28px;
  }

}

/* Standard mobile - no shadow */
@media (max-width: 480px) {
  .invitation-wrapper {
    max-width: 100%;
    box-shadow: none;
  }
}

/* Tablet */
@media (min-width: 481px) and (max-width: 768px) {
  body {
    padding: 0;
  }

  .invitation-wrapper {
    max-width: 480px;
    margin: 0 auto;
  }
}

/* Desktop */
@media (min-width: 769px) {
  body {
    padding: 20px 0;
  }

  .invitation-wrapper {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
  }

  .cover-section {
    border-radius: 16px 16px 0 0;
  }

}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .cover-section {
    height: 100vh;
    height: 100svh;
    min-height: min(400px, 100svh);
  }

  .cover-invitation-copy {
    top: 8%;
  }

  .cover-ceremony-title {
    font-size: 58px;
  }

  .cover-content {
    padding-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .cover-invitation-copy { top: 12%; }
  .cover-ceremony-title { font-size: clamp(58px, 18vw, 68px); }
  .cover-couple-label { font-size: 12px; }

  .family-invitation {
    padding-inline: clamp(16px, 5vw, 22px);
  }

  .ceremony-date-display {
    gap: clamp(8px, 3vw, 14px);
  }

  .ceremony-date-display .day {
    padding-inline: clamp(10px, 3.5vw, 16px);
    font-size: clamp(50px, 16vw, 64px);
  }

  .ceremony-date-display .month,
  .ceremony-date-display .year {
    font-size: clamp(15px, 4.5vw, 19px);
  }

  .countdown-grid {
    gap: clamp(4px, 1.8vw, 8px);
  }

  .countdown-item {
    padding-inline: 4px;
  }

  .countdown-item .number {
    font-size: clamp(24px, 8vw, 32px);
  }
}
