/* ============================================================
   YAZAN & AYAH — WEDDING INVITATION
   Golden Petals Theme
   ============================================================ */

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

:root {
  --transition-speed: 0.5s;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  transition: background var(--transition-speed) ease, color var(--transition-speed) ease;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

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

/* ----- Shared Section Styles ----- */
section {
  padding: 4rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 400;
}

.section-label {
  text-align: center;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  font-weight: 300;
}

/* ----- Hero Shared ----- */
.hero {
  text-align: center;
  padding: 5rem 0 3rem;
  position: relative;
}

.hero-pre {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  opacity: 0.8;
}

.hero-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.name-ampersand {
  font-style: italic;
}

.hero-invite {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-date {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.date-day {
  font-weight: 700;
  line-height: 1;
}

.date-month, .date-year {
  letter-spacing: 0.1em;
}

.hero-ornament {
  margin: 1.5rem auto;
  width: 120px;
  height: 2px;
  opacity: 0.4;
}

/* ----- Countdown Shared ----- */
.countdown-section {
  text-align: center;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.countdown-number {
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}

.countdown-label {
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
}

/* ----- Story Shared ----- */
.story-content {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.story-content p {
  margin-bottom: 1rem;
}

/* ----- Details Shared ----- */
.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.detail-card {
  text-align: center;
  padding: 2rem;
  border-radius: 4px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-4px);
}

.detail-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.detail-card h3 {
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.detail-time {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.detail-location {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.detail-address {
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.5;
}

/* ----- Timeline Shared ----- */
.timeline-section {
  text-align: center;
}

.timeline {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: currentColor;
  opacity: 0.2;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  transform: translateX(-4.5px);
}

.timeline-content {
  text-align: left;
  padding-left: 1.5rem;
}

[dir="rtl"] .timeline {
  padding-left: 0;
  padding-right: 2rem;
}

[dir="rtl"] .timeline::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .timeline-marker {
  left: auto;
  right: -2rem;
  transform: translateX(4.5px);
}

[dir="rtl"] .timeline-content {
  text-align: right;
  padding-left: 0;
  padding-right: 1.5rem;
}

.timeline-time {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
  font-weight: 500;
}

.timeline-content h3 {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0.2rem 0 0.3rem;
}

.timeline-content p {
  font-size: 0.95rem;
  opacity: 0.7;
}

/* ----- Location Shared ----- */
.location-section {
  text-align: center;
}

.location-link {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border-radius: 2px;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid currentColor;
  opacity: 0.8;
}

.location-link:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ----- Parents Names ----- */
.parents-names {
  font-family: 'amoshref-thulth', 'Aref Ruqaa', 'Amiri', serif;
  font-size: 2.5rem;
  color: var(--accent);
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

/* ----- Quran Verse (Arabic only, above hero-pre) ----- */
.verse-text {
  font-family: 'amoshref-thulth', 'Aref Ruqaa', 'Amiri', serif;
  font-size: 3rem;
  color: var(--accent);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* ----- Gallery Shared ----- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.gallery-placeholder {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.85rem;
  opacity: 0.5;
  transition: transform 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.gallery-placeholder:hover {
  transform: scale(1.03);
  opacity: 0.8;
}

/* ----- RSVP Shared ----- */
.rsvp-section {
  text-align: center;
}

.rsvp-text {
  margin-bottom: 1.5rem;
  opacity: 0.8;
}

.rsvp-button {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border-radius: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  cursor: pointer;
  font-weight: 500;
}

/* ----- Footer Shared ----- */
.site-footer {
  text-align: center;
  padding: 3rem 0 2rem;
  opacity: 0.7;
  font-size: 0.9rem;
}

.footer-date { font-size: 0.8rem; opacity: 0.6; margin-top: 0.25rem; }

/* ----- Language Toggle ----- */
.lang-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(128,128,128,0.3);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  color: inherit;
  font-family: 'Amiri', 'Tajawal', serif;
  font-size: 0.85rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  opacity: 0.75;
}

.lang-toggle:hover {
  opacity: 1;
  border-color: rgba(128,128,128,0.6);
  transform: translateY(-1px);
}

/* ============================================================
   LANGUAGE-SPECIFIC OVERRIDES
   ============================================================ */
html[lang="ar"] body {
  font-family: 'Amiri', 'Tajawal', 'Cormorant Garamond', serif;
}

html[lang="ar"] .lang-toggle {
  font-family: 'Amiri', 'Tajawal', serif;
}

/* English: swap Arabic calligraphy → elegant Latin serif, balance sizes */
html[lang="en"] [data-theme="design11"] .hero-names {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 5rem;
  font-weight: 400;
  letter-spacing: 0.08em;
}

html[lang="en"] [data-theme="design11"] .parents-names {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 2rem;
  letter-spacing: 0.06em;
}

html[lang="en"] [data-theme="design11"] .parent-and {
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

html[lang="en"] [data-theme="design11"] .name-ampersand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
}

html[lang="en"] [data-theme="design11"] .date-day {
  font-family: 'Playfair Display', serif;
  font-size: 5rem;
  letter-spacing: 0.04em;
}

html[lang="en"] [data-theme="design11"] .section-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 400;
  letter-spacing: 0.1em;
}

html[lang="en"] [data-theme="design11"] .countdown-number {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
}

html[lang="en"] [data-theme="design11"] .hero-pre {
  letter-spacing: 0.04em;
}

/* ============================================================
   RTL OVERRIDES
   ============================================================ */
[dir="rtl"] .countdown-grid {
  direction: ltr;
}

[dir="rtl"] .lang-toggle {
  right: auto;
  left: 1.5rem;
}

/* ============================================================
   THEME — GOLDEN PETALS
   Natural warm hues, Arabic calligraphy names, golden petals
   ============================================================ */
[data-theme="design11"] {
  --bg: #FBF7F1;
  --text: #4A3728;
  --gold: #C8A84E;
  --gold-light: #E0CFA0;
  --card-bg: #FFFDFA;
  --accent: #A0782C;
  --petal-primary: #F2E2C4;
  --petal-secondary: #E8CFA0;
  --petal-alt-primary: #FAF0E0;
  --petal-alt-secondary: #DDC090;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  color: var(--text);
  font-family: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
}

/* Arabic calligraphy for names — Amir Moshref Thuluth */
[data-theme="design11"] .hero-names {
  font-family: 'amoshref-thulth', 'Aref Ruqaa', 'Amiri', serif;
  font-size: 6rem;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.06em;
  line-height: 1.4;
}

[data-theme="design11"] .name-ampersand {
  color: var(--accent);
  font-size: 0.6em;
  font-family: 'amoshref-thulth', 'Aref Ruqaa', 'Amiri', serif;
  font-style: normal;
}

[data-theme="design11"] .hero-pre,
[data-theme="design11"] .hero-invite {
  color: var(--text);
  opacity: 0.65;
  letter-spacing: 0.08em;
}

[data-theme="design11"] .date-day {
  font-family: 'amoshref-thulth', 'Aref Ruqaa', 'Amiri', serif;
  font-size: 5rem;
  color: var(--gold);
}

[data-theme="design11"] .date-month, [data-theme="design11"] .date-year {
  font-size: 1.5rem;
  color: var(--accent);
  font-weight: 500;
}

[data-theme="design11"] .hero-ornament {
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
  height: 1px;
  width: 200px;
}

[data-theme="design11"] .section-title {
  font-family: 'amoshref-thulth', 'Aref Ruqaa', 'Amiri', serif;
  font-size: 2.5rem;
  color: var(--accent);
  font-weight: 400;
}

[data-theme="design11"] .section-label {
  color: var(--gold);
}

[data-theme="design11"] .countdown-number {
  font-family: 'amoshref-thulth', 'Aref Ruqaa', 'Amiri', serif;
  font-size: 3rem;
  color: var(--gold);
}

[data-theme="design11"] .detail-card {
  background: var(--card-bg);
  border: 1px solid var(--gold-light);
  box-shadow: 0 2px 24px rgba(160,120,44,0.08);
  border-radius: 4px;
}

[data-theme="design11"] .detail-card:hover {
  box-shadow: 0 4px 30px rgba(160,120,44,0.15);
}

[data-theme="design11"] .gallery-placeholder {
  background: var(--card-bg);
  border: 1px dashed var(--gold-light);
}

[data-theme="design11"] .rsvp-button {
  background: var(--gold);
  color: #fff;
  border: none;
}

[data-theme="design11"] .rsvp-button:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(160,120,44,0.3);
}

/* Golden petals — warm golden/amber tones */
[data-theme="design11"] .petal {
  background: radial-gradient(ellipse at 30% 30%, #F5E6CC, #D4B87A);
  border-radius: 50% 0 50% 0;
}

[data-theme="design11"] .petal:nth-child(odd) {
  background: radial-gradient(ellipse at 30% 30%, #FAF0E0, #E0C898);
  border-radius: 0 50% 0 50%;
}

/* ============================================================
   ANIMATIONS — FALLING PETALS
   ============================================================ */
.petals-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  width: 18px;
  height: 18px;
  background: radial-gradient(ellipse at 30% 30%, #F5E6CC, #D4B87A);
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: petalFall linear infinite;
}

.petal:nth-child(odd) {
  background: radial-gradient(ellipse at 30% 30%, #FAF0E0, #E0C898);
  border-radius: 0 50% 0 50%;
}

@keyframes petalFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  5% { opacity: 0.7; }
  50% { opacity: 0.6; }
  100% {
    transform: translateY(105vh) translateX(80px) rotate(540deg) scale(0.3);
    opacity: 0;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .wrapper { padding: 1.5rem; }

  .hero-names { font-size: 2.5rem !important; gap: 0.8rem; }
  [data-theme="design11"] .hero-names { font-size: 3.2rem !important; }
  html[lang="ar"] [data-theme="design11"] .hero-names { font-size: 3.8rem !important; }

  .verse-text { font-size: 2.2rem; }
  .parents-names { font-size: 2rem; }
  html[lang="en"] .parent-name { display: block; }

  .date-day { font-size: 3.5rem !important; }

  .countdown-grid { gap: 1rem; }
  .countdown-number { font-size: 2rem !important; }
  .countdown-item { min-width: 60px; }

  .timeline { padding-left: 1.5rem; }
  .timeline-marker { left: -1.5rem; transform: translateX(-4.5px); }
  [dir="rtl"] .timeline { padding-left: 0; padding-right: 1.5rem; }
  [dir="rtl"] .timeline-marker { left: auto; right: -1.5rem; transform: translateX(4.5px); }

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

  section { padding: 2.5rem 0; }
  .hero { padding-top: 3rem; }

  [dir="rtl"] .lang-toggle {
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-names { font-size: 2rem !important; gap: 0.5rem; }
  [data-theme="design11"] .hero-names { font-size: 2.5rem !important; }
  html[lang="ar"] [data-theme="design11"] .hero-names { font-size: 3rem !important; }

  .verse-text { font-size: 1.8rem; }
  .parents-names { font-size: 1.5rem; }
  html[lang="en"] .parent-name { display: block; }

  .date-day { font-size: 2.8rem !important; }

  .gallery-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   BACKGROUND IMAGE SYSTEM
   To add a photo: set --bg-image on the theme.
   ============================================================ */
[data-theme] {
  --bg-image: none;
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .petals-container { display: none !important; }

  body { background: #fff !important; color: #000 !important; font-size: 14px; }
  .wrapper { max-width: 100%; padding: 0; }
  section { padding: 1.5rem 0; page-break-inside: avoid; }
  .rsvp-button { border: 2px solid #000 !important; color: #000 !important; background: none !important; }
}
