/* ============================================================
   Memorial Site for Lucinda Pena Martinez
   A warm, elegant design in rose, cream, and gold
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --color-bg:         #FDF8F3;
  --color-bg-alt:     #F7EDE6;
  --color-bg-dark:    #1C1520;
  --color-cream:      #FFF9F5;
  --color-rose:       #C4918A;
  --color-rose-light: #E8CEC8;
  --color-rose-pale:  #F3E1DC;
  --color-blush:      #F0D5CE;
  --color-gold:       #B8956A;
  --color-gold-light: #D4BB96;
  --color-mauve:      #8B6B73;
  --color-mauve-deep: #6B4B55;
  --color-text:       #3A2E34;
  --color-text-light: #7A6B72;
  --color-text-muted: #A8959C;
  --color-white:      #FFFFFF;
  --color-border:     #E8D8D2;

  --font-display:  'Playfair Display', Georgia, serif;
  --font-elegant:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Lato', 'Helvetica Neue', Arial, sans-serif;

  --shadow-sm:   0 1px 3px rgba(60,40,50,0.06);
  --shadow-md:   0 4px 12px rgba(60,40,50,0.08);
  --shadow-lg:   0 8px 30px rgba(60,40,50,0.12);
  --shadow-glow: 0 0 20px rgba(196,145,138,0.3);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  30px;

  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

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

a {
  color: var(--color-rose);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-mauve); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden { display: none !important; }

.required { color: var(--color-rose); }
.optional { color: var(--color-text-muted); font-weight: 300; font-size: 0.85em; }

/* --- Floating Petals --- */
#petals-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  background: radial-gradient(ellipse at center, var(--color-rose-light) 0%, var(--color-blush) 60%, transparent 100%);
  border-radius: 50% 0 50% 0;
  opacity: 0;
  animation: petalFall linear forwards;
  pointer-events: none;
}

@keyframes petalFall {
  0%   { opacity: 0; transform: translateX(0) rotate(0deg) scale(0.8); }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateX(var(--drift)) rotate(var(--spin)) scale(0.4); top: 105vh; }
}

/* --- Navigation --- */
#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}

#main-nav.scrolled {
  background: rgba(253,248,243,0.95);
  backdrop-filter: blur(10px);
  padding: 10px 0;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--font-elegant);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-white);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

#main-nav.scrolled .nav-name { color: var(--color-mauve-deep); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
}

#main-nav.scrolled .nav-links a { color: var(--color-text-light); }
#main-nav.scrolled .nav-links a:hover { color: var(--color-rose); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-gold-light);
  transition: width var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

#main-nav.scrolled .nav-links a::after { background: var(--color-rose); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: var(--transition);
}

#main-nav.scrolled .nav-toggle span { background: var(--color-text); }

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--color-white);
  padding: 5px 12px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: 16px;
  text-transform: uppercase;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.4);
}

#main-nav.scrolled .lang-toggle {
  background: var(--color-rose-pale);
  border-color: var(--color-rose-light);
  color: var(--color-mauve-deep);
}

#main-nav.scrolled .lang-toggle:hover {
  background: var(--color-blush);
}

/* --- Hero --- */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(145deg, #2C1E28 0%, #4A2E3E 30%, #6B4B55 60%, #8B6B73 100%);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(196,145,138,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(184,149,106,0.1) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 24px;
  max-width: 800px;
}

.hero-prelude {
  font-family: var(--font-elegant);
  font-size: 1.3rem;
  font-weight: 300;
  font-style: italic;
  color: var(--color-gold-light);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  color: var(--color-white);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

.hero-dates {
  font-family: var(--font-elegant);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--color-rose-light);
  letter-spacing: 0.15em;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
}

.date-separator {
  margin: 0 16px;
  color: var(--color-gold-light);
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-light), transparent);
  margin: 0 auto 28px;
  opacity: 0;
  animation: fadeInUp 1s ease 1.1s forwards;
}

.hero-quote {
  font-family: var(--font-elegant);
  font-size: 1.25rem;
  font-weight: 300;
  font-style: italic;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
  max-width: 550px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeInUp 1s ease 1.3s forwards;
}

.hero-scroll {
  display: inline-block;
  margin-top: 48px;
  color: rgba(255,255,255,0.5);
  animation: fadeInUp 1s ease 1.6s forwards, gentleBounce 2.5s ease-in-out 2.5s infinite;
  opacity: 0;
  transition: color var(--transition);
}
.hero-scroll:hover { color: var(--color-gold-light); }

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

@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* --- Section Styles --- */
section {
  padding: 100px 0;
}

section:nth-child(odd) {
  background-color: var(--color-bg);
}

section:nth-child(even) {
  background-color: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-rose-pale);
  color: var(--color-mauve);
  margin-bottom: 16px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--color-mauve-deep);
  margin-bottom: 12px;
}

.section-line {
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-rose-light), var(--color-gold-light));
  margin: 0 auto 16px;
  border-radius: 1px;
}

.section-subtitle {
  font-family: var(--font-elegant);
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--color-text-light);
  font-style: italic;
}

.section-header-light h2 { color: var(--color-cream); }
.section-header-light .section-icon { background: rgba(255,255,255,0.1); color: var(--color-gold-light); }
.section-line-light { background: linear-gradient(90deg, rgba(255,255,255,0.2), var(--color-gold-light), rgba(255,255,255,0.2)); }
.section-subtitle-light { color: rgba(255,255,255,0.7); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- About Section --- */
.about-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 50px;
  align-items: start;
}

.about-portrait {
  position: sticky;
  top: 100px;
}

.about-portrait img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.portrait-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--color-rose-pale);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-mauve);
  gap: 12px;
  border: 2px dashed var(--color-rose-light);
}

.portrait-placeholder p {
  font-family: var(--font-elegant);
  font-size: 1rem;
  font-style: italic;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 20px;
  color: var(--color-text);
}

.about-text .about-placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

.about-details {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--color-border);
}

.about-details h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-mauve-deep);
  margin-bottom: 12px;
}

/* --- Photo Gallery --- */
.gallery-actions {
  text-align: center;
  margin-bottom: 36px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.photo-grid-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: var(--color-rose-pale);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.photo-grid-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.photo-grid-item:hover img {
  transform: scale(1.05);
}

.photo-grid-item .photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(44,30,40,0.5), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.photo-grid-item:hover .photo-overlay { opacity: 1; }

.photo-overlay span {
  color: var(--color-white);
  font-family: var(--font-elegant);
  font-size: 0.95rem;
  font-style: italic;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}

.gallery-empty svg {
  color: var(--color-rose-light);
  margin-bottom: 16px;
}

.gallery-empty p { margin-bottom: 8px; }
.gallery-empty .small { font-size: 0.85rem; }
.gallery-empty code {
  background: var(--color-rose-pale);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.82rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-mauve) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(196,145,138,0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 22px rgba(196,145,138,0.45);
  transform: translateY(-2px);
}

.btn-candle {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(184,149,106,0.3);
  font-size: 1rem;
  padding: 16px 36px;
}

.btn-candle:hover {
  box-shadow: 0 6px 22px rgba(184,149,106,0.45);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-mauve);
  border: 1px solid var(--color-rose-light);
}

.btn-ghost:hover {
  background: var(--color-rose-pale);
}

.load-more {
  display: block;
  margin: 36px auto 0;
}

/* --- Candle Section --- */
#candles {
  position: relative;
  background: var(--color-bg-dark);
  overflow: hidden;
}

.candles-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(184,149,106,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 30%, rgba(196,145,138,0.06) 0%, transparent 50%);
}

.candle-display {
  text-align: center;
  position: relative;
  z-index: 1;
}

.candle-count {
  font-family: var(--font-elegant);
  font-size: 1.3rem;
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
}

#candle-number {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--color-gold-light);
  font-weight: 400;
}

.candle-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  min-height: 60px;
}

.candle-icon {
  position: relative;
  width: 24px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.candle-icon .wick {
  width: 2px;
  height: 6px;
  background: #555;
  border-radius: 1px;
}

.candle-icon .flame {
  width: 8px;
  height: 14px;
  background: radial-gradient(ellipse at 50% 80%, #FFD700, #FFA500 40%, #FF6B35 70%, transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flicker 1.5s ease-in-out infinite alternate;
  margin-bottom: -2px;
  filter: blur(0.3px);
  position: relative;
}

.candle-icon .flame::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, rgba(255,200,50,0.3), transparent 70%);
  border-radius: 50%;
}

.candle-icon .wax {
  width: 10px;
  height: 22px;
  background: linear-gradient(180deg, #F5E6D0, #EDD9C0);
  border-radius: 2px 2px 3px 3px;
}

@keyframes flicker {
  0%   { transform: scale(1) rotate(-1deg); opacity: 1; }
  25%  { transform: scale(1.05) rotate(1deg); opacity: 0.9; }
  50%  { transform: scale(0.95) rotate(-0.5deg); opacity: 1; }
  75%  { transform: scale(1.02) rotate(1.5deg); opacity: 0.85; }
  100% { transform: scale(1) rotate(-1deg); opacity: 0.95; }
}

.candle-form {
  margin-top: 24px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.candle-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.07);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}

.candle-form input::placeholder { color: rgba(255,255,255,0.35); }
.candle-form input:focus { outline: none; border-color: var(--color-gold-light); }

.candle-form-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.candle-form-actions .btn-ghost {
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.2);
}

/* --- Forms --- */
.tribute-form {
  max-width: 680px;
  margin: 0 auto 50px;
  background: var(--color-white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-mauve);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-cream);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-rose);
  box-shadow: 0 0 0 3px rgba(196,145,138,0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-status {
  margin-top: 12px;
  font-size: 0.9rem;
  text-align: center;
}

.form-status.success { color: #5B8A5B; }
.form-status.error { color: #B85050; }

/* --- Tribute Cards --- */
.tribute-list {
  max-width: 780px;
  margin: 0 auto;
}

.tribute-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--color-rose-light);
  transition: box-shadow var(--transition);
}

.tribute-card:hover {
  box-shadow: var(--shadow-md);
}

.tribute-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tribute-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-rose-pale), var(--color-blush));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-mauve);
  flex-shrink: 0;
}

.tribute-meta {
  flex: 1;
}

.tribute-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-mauve-deep);
}

.tribute-relation {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.tribute-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.tribute-message {
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--color-text);
  white-space: pre-wrap;
}

/* Memory cards variation */
.memory-cards .tribute-card {
  border-left-color: var(--color-gold-light);
}

.memory-title {
  font-family: var(--font-elegant);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-mauve-deep);
  margin-bottom: 8px;
  font-style: italic;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(20,15,20,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.7);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
  z-index: 3;
}
.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3rem;
  color: rgba(255,255,255,0.6);
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px;
  transition: color var(--transition);
  z-index: 3;
}
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  margin-top: 12px;
  font-family: var(--font-elegant);
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
  text-align: center;
}

/* --- Slideshow Overlay --- */
.slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: #000;
  display: flex;
  flex-direction: column;
}

.slideshow-photos {
  position: absolute;
  inset: 0;
}

.slideshow-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.slideshow-slide.active {
  opacity: 1;
}

/* Ken Burns animations */
@keyframes kenBurns1 { from { transform: scale(1) translate(0,0); } to { transform: scale(1.15) translate(-2%, -1%); } }
@keyframes kenBurns2 { from { transform: scale(1.15) translate(-2%, -1%); } to { transform: scale(1) translate(1%, 1%); } }
@keyframes kenBurns3 { from { transform: scale(1) translate(0,0); } to { transform: scale(1.12) translate(2%, -2%); } }
@keyframes kenBurns4 { from { transform: scale(1.1) translate(1%,1%); } to { transform: scale(1) translate(-1%, 0%); } }

.slideshow-slide.kb-1 { animation: kenBurns1 8s ease-in-out forwards; }
.slideshow-slide.kb-2 { animation: kenBurns2 8s ease-in-out forwards; }
.slideshow-slide.kb-3 { animation: kenBurns3 8s ease-in-out forwards; }
.slideshow-slide.kb-4 { animation: kenBurns4 8s ease-in-out forwards; }

.slideshow-caption {
  position: absolute;
  bottom: 100px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-elegant);
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  padding: 0 24px;
  z-index: 3;
}

.slideshow-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 3;
}

.ss-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.4);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
}

.ss-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

.ss-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.4);
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 3;
  backdrop-filter: blur(4px);
}

.ss-close:hover { background: rgba(255,255,255,0.15); color: #fff; }

.slideshow-counter {
  position: absolute;
  top: 24px;
  left: 24px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  z-index: 3;
}

/* Slideshow Music Player */
.slideshow-music {
  position: absolute;
  bottom: 40px;
  right: 24px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  z-index: 3;
  min-width: 240px;
}

.music-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

#music-track-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.music-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.music-volume {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  outline: none;
  margin-left: 4px;
}

.music-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold-light);
  cursor: pointer;
}

.music-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold-light);
  cursor: pointer;
  border: none;
}

/* --- Footer --- */
#footer {
  background: var(--color-bg-dark);
  padding: 60px 0;
  text-align: center;
}

.footer-content {
  max-width: 500px;
  margin: 0 auto;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-cream);
  margin-bottom: 8px;
}

.footer-rest {
  font-family: var(--font-elegant);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--color-gold-light);
  margin-bottom: 24px;
}

.footer-divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto 24px;
}

.footer-note {
  font-size: 0.85rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.4);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(253,248,243,0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--shadow-md);
  }

  .nav-links.open { display: flex; }
  .nav-links a { color: var(--color-text) !important; }
  .nav-toggle { display: flex; }

  .lang-toggle { margin-left: 0; position: absolute; right: 60px; top: 50%; transform: translateY(-50%); }

  .about-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-portrait {
    position: static;
    max-width: 220px;
    margin: 0 auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tribute-form {
    padding: 24px 20px;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  section { padding: 70px 0; }
  .section-header { margin-bottom: 36px; }
  .section-header h2 { font-size: 1.8rem; }

  .slideshow-music {
    bottom: auto;
    top: 20px;
    right: 70px;
    min-width: 200px;
  }

  .slideshow-controls {
    bottom: 30px;
  }
}

@media (max-width: 480px) {
  .hero-name { font-size: 2rem; }
  .hero-prelude { font-size: 1.1rem; }
  .hero-quote { font-size: 1.05rem; }

  .slideshow-music {
    right: 12px;
    min-width: 180px;
    padding: 8px 12px;
  }
}

/* --- Print --- */
@media print {
  #main-nav,
  .hero-scroll,
  #petals-container,
  .slideshow-overlay,
  .lightbox,
  .btn,
  form,
  .gallery-actions { display: none !important; }

  section { padding: 30px 0; page-break-inside: avoid; }
  body { background: white; color: black; }
  .tribute-card { box-shadow: none; border: 1px solid #ddd; }
}
