/* ==========================================================================
   MAHUBE TUMELO PROJECTS - OBITUARY & MEMORIAL TRIBUTE DESIGN SYSTEM
   Signature Colors: Gold, Obsidian Black & Royal Purple
   ========================================================================== */

:root {
  --bg-obsidian: #08070c;
  --bg-card: #12101b;
  --bg-card-hover: #1a1726;
  --bg-glass: rgba(18, 16, 27, 0.85);
  
  --gold-primary: #d4af37;
  --gold-light: #f9e79f;
  --gold-dark: #aa771c;
  --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
  --gold-glow: 0 0 25px rgba(212, 175, 55, 0.35);
  
  --purple-royal: #4a154b;
  --purple-accent: #7b1fa2;
  --purple-deep: #1e092b;
  --purple-glow: 0 0 35px rgba(123, 31, 162, 0.4);
  
  --text-main: #f3f0f7;
  --text-muted: #b3a9c2;
  --text-gold: #e5c158;
  
  --border-gold: 1px solid rgba(212, 175, 55, 0.3);
  --border-gold-bright: 1px solid rgba(212, 175, 55, 0.8);
  
  --font-heading: 'Cinzel', serif;
  --font-serif: 'Cormorant Garamond', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Canvas Background */
#gold-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Utility Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Header & Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 7, 12, 0.9);
  backdrop-filter: blur(15px);
  border-bottom: var(--border-gold);
  padding: 0.85rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  display: block;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.audio-btn {
  background: rgba(74, 21, 75, 0.4);
  border: var(--border-gold);
  color: var(--gold-light);
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.audio-btn:hover {
  background: var(--purple-royal);
  box-shadow: var(--gold-glow);
  transform: translateY(-2px);
}

.audio-btn.playing {
  border-color: #22c55e;
  color: #86efac;
}

.audio-btn.playing i {
  animation: pulse-music 1.5s infinite ease-in-out;
}

@keyframes pulse-music {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}

/* Hero Section */
.hero-section {
  padding: 4rem 0 3rem;
  text-align: center;
  position: relative;
}

.hero-banner {
  background: radial-gradient(circle at top center, rgba(123, 31, 162, 0.25) 0%, rgba(18, 16, 27, 0.8) 70%);
  border: var(--border-gold);
  border-radius: 20px;
  padding: 3.5rem 2rem;
  box-shadow: var(--purple-glow), 0 20px 50px rgba(0,0,0,0.7);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.ribbon-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--text-gold);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/* Audio Autoplay Toast Notification */
.audio-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 990;
  background: rgba(18, 16, 27, 0.95);
  border: var(--border-gold-bright);
  box-shadow: var(--purple-glow), 0 10px 30px rgba(0,0,0,0.8);
  border-radius: 40px;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--gold-light);
  font-size: 0.85rem;
  backdrop-filter: blur(10px);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.audio-toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast-btn {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: var(--gold-glow);
  transition: var(--transition-smooth);
}

.toast-btn:hover {
  transform: scale(1.05);
}

.fa-spin-slow {
  animation: fa-spin 6s infinite linear;
}

/* Luxury Hero Carousel / Slider */
.hero-slider-container {
  max-width: 680px;
  margin: 1.5rem auto 2.5rem;
  position: relative;
}

.hero-slider-frame {
  position: relative;
  width: 100%;
  height: 380px;
  border-radius: 20px;
  padding: 6px;
  background: var(--gold-gradient);
  box-shadow: var(--gold-glow), var(--purple-glow), 0 15px 40px rgba(0,0,0,0.8);
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-slider-frame {
    height: 280px;
  }
}

.slider-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.4);
  z-index: 10;
}

.slider-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold-gradient);
  box-shadow: 0 0 10px #ffd700;
  transition: width 0.1s linear;
}

.hero-slider-track {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.04);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.slide-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.slide-caption-tag {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(8, 7, 12, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: var(--gold-light);
  padding: 0.4rem 1.2rem;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  box-shadow: var(--gold-glow);
}

.slider-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(8, 7, 12, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: var(--gold-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.slider-nav-btn:hover {
  background: var(--gold-primary);
  color: #000;
  box-shadow: var(--gold-glow);
  transform: translateY(-50%) scale(1.1);
}

.slider-nav-btn.prev-btn { left: 12px; }
.slider-nav-btn.next-btn { right: 12px; }

.slider-control-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(8, 7, 12, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.slider-control-btn:hover {
  background: rgba(212, 175, 55, 0.3);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 1rem;
}

.slider-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.3);
  border: 1px solid rgba(212, 175, 55, 0.5);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.slider-dots .dot.active, .slider-dots .dot:hover {
  background: var(--gold-primary);
  box-shadow: var(--gold-glow);
  transform: scale(1.3);
}

.deceased-name {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.deceased-subtitle {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-style: italic;
  color: var(--text-gold);
  margin-bottom: 1.5rem;
}

/* Tribute Card Quote Box */
.main-tribute-quote {
  max-width: 800px;
  margin: 2rem auto 2.5rem;
  background: rgba(10, 9, 15, 0.75);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
}

.main-tribute-quote::before, .main-tribute-quote::after {
  content: '“';
  font-family: var(--font-serif);
  font-size: 5rem;
  color: rgba(212, 175, 55, 0.25);
  position: absolute;
  line-height: 1;
}

.main-tribute-quote::before {
  top: -10px;
  left: 15px;
}

.main-tribute-quote::after {
  content: '”';
  bottom: -40px;
  right: 15px;
}

.quote-text-primary {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.quote-text-secondary {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--gold-light);
  font-style: italic;
  margin-bottom: 1rem;
}

.quote-author {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-gold);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Quick Action Buttons */
.action-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: 30px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.btn-gold {
  background: var(--gold-gradient);
  color: #000;
  border: none;
  box-shadow: var(--gold-glow);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
}

.btn-purple {
  background: linear-gradient(135deg, var(--purple-royal), var(--purple-accent));
  color: #fff;
  border: var(--border-gold);
  box-shadow: var(--purple-glow);
}

.btn-purple:hover {
  transform: translateY(-3px);
  filter: brightness(1.15);
}

.btn-outline {
  background: transparent;
  border: var(--border-gold);
  color: var(--gold-light);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.15);
  transform: translateY(-3px);
}

/* Section Header styling */
.section-title-wrap {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--text-main);
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 2px;
  background: var(--gold-gradient);
  margin: 0.5rem auto 0;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.5rem;
}

/* Candle Lighting Interaction */
.candle-section {
  padding: 3rem 0;
}

.candle-card {
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  position: relative;
}

.candle-stage {
  margin: 1.5rem auto;
  cursor: pointer;
  display: inline-block;
}

.candle-svg-container {
  width: 90px;
  height: 140px;
  margin: 0 auto;
  position: relative;
}

.flame {
  opacity: 0;
  transition: opacity 0.5s ease;
  transform-origin: center bottom;
}

.candle-stage.lit .flame {
  opacity: 1;
  animation: flicker 1.8s ease-in-out infinite alternate;
}

@keyframes flicker {
  0% { transform: scale(1) rotate(-1deg); filter: drop-shadow(0 0 10px #ff9800); }
  50% { transform: scale(1.08) rotate(2deg); filter: drop-shadow(0 0 20px #ffeb3b); }
  100% { transform: scale(0.95) rotate(-2deg); filter: drop-shadow(0 0 15px #ff5722); }
}

.candle-counter {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--gold-light);
  margin-top: 1rem;
}

/* Media Gallery Section */
.gallery-section {
  padding: 4rem 0;
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.tab-btn {
  background: rgba(18, 16, 27, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--text-muted);
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn:hover, .tab-btn.active {
  background: var(--purple-royal);
  color: var(--gold-light);
  border-color: var(--gold-primary);
  box-shadow: var(--gold-glow);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}

.media-card {
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.media-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-primary);
  box-shadow: var(--gold-glow);
}

.media-thumb-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #000;
}

.media-thumb-wrap img, .media-thumb-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-card:hover .media-thumb-wrap img {
  transform: scale(1.06);
}

.video-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.75);
  border: var(--border-gold);
  color: var(--gold-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.play-overlay-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background: rgba(74, 21, 75, 0.85);
  border: 2px solid var(--gold-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 1.25rem;
  box-shadow: var(--gold-glow);
  transition: var(--transition-smooth);
}

.media-card:hover .play-overlay-icon {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--gold-primary);
  color: #000;
}

.media-caption {
  padding: 1.25rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.media-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--text-gold);
  margin-bottom: 0.3rem;
}

.media-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Condolence & Guestbook Section */
.condolence-section {
  padding: 4rem 0;
}

.condolence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 900px) {
  .condolence-grid {
    grid-template-columns: 1fr;
  }
}

.form-card, .messages-card {
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-gold);
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: rgba(8, 7, 12, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: var(--gold-glow);
}

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

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Custom Scrollbar */
.messages-list::-webkit-scrollbar {
  width: 6px;
}
.messages-list::-webkit-scrollbar-thumb {
  background: var(--gold-primary);
  border-radius: 4px;
}

.message-item {
  background: rgba(10, 9, 15, 0.6);
  border-left: 3px solid var(--gold-primary);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.message-author {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-gold);
}

.message-role {
  font-size: 0.75rem;
  color: var(--purple-accent);
  background: rgba(123, 31, 162, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
}

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

.message-body {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Lightbox Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 4, 8, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-wrap {
  position: relative;
  max-width: 900px;
  width: 100%;
  background: var(--bg-card);
  border: var(--border-gold);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--purple-glow), 0 20px 50px rgba(0,0,0,0.8);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(0,0,0,0.7);
  border: var(--border-gold);
  color: var(--gold-light);
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: var(--gold-primary);
  color: #000;
}

.modal-body {
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
}

.modal-body img, .modal-body video {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.modal-footer-caption {
  padding: 1rem 1.5rem;
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  text-align: center;
}

/* Printable Memorial Card Styles */
.printable-card-overlay {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }
  .printable-card-overlay, .printable-card-overlay * {
    visibility: visible;
  }
  .printable-card-overlay {
    display: block !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff !important;
    color: #000 !important;
    padding: 2rem;
  }
  .print-card-box {
    border: 3px double #d4af37;
    padding: 2.5rem;
    text-align: center;
  }
  .print-card-box h1 {
    font-family: 'Cinzel', serif;
    font-size: 28pt;
    color: #1a1a1a;
  }
}

/* Footer Section */
.footer {
  background: #040306;
  border-top: var(--border-gold);
  padding: 3rem 0 2rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-gold);
  margin-bottom: 0.5rem;
}

.footer-info {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  margin-bottom: 2rem;
}

.footer-links a {
  color: var(--text-gold);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.copyright {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
