/* ============================================================
   PASTOR LOLA AISIDA MEMORIAL WEBSITE — Shared Stylesheet
   ============================================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary:       #07070f;
  --bg-secondary:     #0e0e1c;
  --bg-card:          #14142a;
  --bg-card-hover:    #1a1a32;
  --accent-gold:      #c9a052;
  --accent-gold-lt:   #e5c47a;
  --accent-gold-dim:  rgba(201, 160, 82, 0.15);
  --text-primary:     #f0ebe0;
  --text-secondary:   #a09080;
  --text-muted:       #5a5560;
  --border:           #222238;
  --border-soft:      rgba(201, 160, 82, 0.2);
  --flame-core:       #fff4a0;
  --flame-mid:        #ffaa33;
  --flame-base:       #ff6600;
  --success:          #4caf88;
  --danger:           #d95555;
  --font-serif:       'Georgia', 'Times New Roman', serif;
  --font-sans:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
  --radius:           4px;
  --shadow:           0 4px 24px rgba(0,0,0,0.5);
  --transition:       0.25s ease;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-gold-lt); }
button { font-family: var(--font-sans); cursor: pointer; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  background: linear-gradient(to bottom, rgba(7,7,15,0.96) 60%, transparent);
  transition: background var(--transition), box-shadow var(--transition);
}
.nav.scrolled {
  background: rgba(7,7,15,0.97);
  box-shadow: 0 1px 30px rgba(0,0,0,0.6);
}
.nav-logo {
  font-family: var(--font-serif);
  color: var(--accent-gold);
  font-size: 0.95rem;
  line-height: 1.4;
  max-width: 220px;
  letter-spacing: 0.3px;
}
.nav-right {
  display: flex; align-items: center; gap: 1.75rem;
}
.nav-links {
  display: flex; align-items: center; gap: 1.75rem; list-style: none;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  letter-spacing: 0.4px;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}
.music-btn {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--accent-gold); border: 1px solid var(--accent-gold);
  color: #1a1408; border-radius: 50px;
  padding: 0.45rem 1rem; font-size: 0.78rem;
  letter-spacing: 0.3px; transition: all var(--transition);
  font-weight: 600; box-shadow: 0 0 10px rgba(212,175,55,0.35);
  animation: music-pulse 2.5s ease-in-out infinite;
}
.music-btn:hover { background: #e8c84a; border-color: #e8c84a; color: #1a1408; box-shadow: 0 0 16px rgba(212,175,55,0.55); }
.music-btn.playing { background: #e8c84a; border-color: #e8c84a; color: #1a1408; box-shadow: 0 0 18px rgba(212,175,55,0.6); animation: none; }
.music-icon { font-size: 1rem; }
.music-btn .music-label { display: inline !important; }
@keyframes music-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(212,175,55,0.35); }
  50% { box-shadow: 0 0 20px rgba(212,175,55,0.65); }
}
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--text-primary); font-size: 1.35rem;
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero {
  position: relative; width: 100%; height: 100vh;
  min-height: 560px; overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.4s ease;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.hero-slide.active { opacity: 1; }

/* Hero slide background images */
.hero-slide:nth-child(1) { background-image: url('images/hero-1.jpg'); }
.hero-slide:nth-child(2) { background-image: url('images/hero-2.jpg'); }
.hero-slide:nth-child(3) { background-image: url('images/hero-3.jpg'); }
.hero-slide:nth-child(4) { background-image: url('images/hero-4.jpg'); }
.hero-slide:nth-child(5) { background-image: url('images/hero-5.jpg'); }

/* Dark scrim overlay for readability */
.hero-slide::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 100%);
}

/* Placeholder label (remove when real images are added) */
.hero-slide .ph-label {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: rgba(201,160,82,0.15); border: 1px dashed rgba(201,160,82,0.45);
  color: rgba(201,160,82,0.7); font-size: 0.7rem; letter-spacing: 0.5px;
  padding: 0.3rem 0.7rem; border-radius: 3px; pointer-events: none;
  z-index: 2;
}

/* Slide content */
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 0 1.5rem;
  max-width: 780px;
  animation: heroFadeUp 1.8s ease forwards;
  opacity: 0;
}
.hero-slide.active .hero-content { animation: heroFadeUp 1.8s ease forwards; }

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

.hero-eyebrow {
  font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent-gold); margin-bottom: 1.25rem; opacity: 0.85;
}
.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  color: #fff; line-height: 1.15; margin-bottom: 0.85rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
}
.hero-dates {
  font-family: var(--font-serif);
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  color: var(--accent-gold); letter-spacing: 2px;
  margin-bottom: 1.5rem; opacity: 0.9;
}
.hero-tagline {
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: rgba(240,235,224,0.75); font-style: italic;
  max-width: 480px; margin: 0 auto 2.25rem;
  line-height: 1.7;
}
.hero-cta-row {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  flex-wrap: wrap;
}

/* Slider controls */
.hero-prev, .hero-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10; background: rgba(201,160,82,0.12);
  border: 1px solid rgba(201,160,82,0.3); color: var(--accent-gold);
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.hero-prev { left: 1.25rem; }
.hero-next { right: 1.25rem; }
.hero-prev:hover, .hero-next:hover {
  background: rgba(201,160,82,0.25); border-color: var(--accent-gold);
}

/* Slider dots */
.hero-dots {
  position: absolute; bottom: 1.75rem; left: 50%;
  transform: translateX(-50%); z-index: 10;
  display: flex; gap: 0.55rem;
}
.hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(201,160,82,0.3); border: none;
  transition: all var(--transition); cursor: pointer;
}
.hero-dot.active {
  background: var(--accent-gold);
  transform: scale(1.25);
  box-shadow: 0 0 8px rgba(201,160,82,0.5);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute; bottom: 1.75rem; right: 2rem; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: rgba(201,160,82,0.5); font-size: 0.65rem; letter-spacing: 1px;
  text-transform: uppercase; animation: bounce 2s infinite;
}
.hero-scroll span { font-size: 1rem; }
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ============================================================
   BIO SECTION
   ============================================================ */
.bio-section {
  padding: 5.5rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.bio-icon {
  font-size: 2.5rem; margin-bottom: 1.5rem; opacity: 0.6;
}
.bio-section h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--accent-gold); margin-bottom: 0.5rem;
}
.bio-divider {
  width: 50px; height: 1px; background: var(--accent-gold);
  margin: 0.85rem auto 1.75rem; opacity: 0.5;
}
.bio-text {
  max-width: 660px; margin: 0 auto;
  color: var(--text-secondary); font-size: 1rem; line-height: 1.85;
}
.bio-verse {
  max-width: 500px; margin: 2rem auto 0;
  font-family: var(--font-serif);
  font-style: italic; color: rgba(201,160,82,0.7);
  font-size: 0.95rem; line-height: 1.8;
  border-left: 2px solid rgba(201,160,82,0.3);
  padding-left: 1.25rem; text-align: left;
}
.bio-verse cite {
  display: block; margin-top: 0.5rem;
  font-size: 0.8rem; font-style: normal;
  color: var(--text-muted);
}

/* ============================================================
   CANDLES SECTION
   ============================================================ */
.candles-section {
  padding: 5.5rem 2rem;
  text-align: center;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--accent-gold);
  margin-bottom: 0.5rem; letter-spacing: 0.5px;
}
.section-divider {
  width: 50px; height: 1px; background: var(--accent-gold);
  margin: 0.85rem auto 0.75rem; opacity: 0.5;
}
.section-subtitle {
  color: var(--text-secondary); font-size: 0.9rem;
  max-width: 420px; margin: 0 auto 3rem;
}

/* Candle grid */
.candle-display {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: center; gap: 1.5rem;
  min-height: 120px;
  width: 100%; max-width: 720px;
  margin: 2rem auto 2rem;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
}
.candle-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  animation: candleAppear 0.6s ease forwards;
}
@keyframes candleAppear {
  from { opacity: 0; transform: scale(0.6) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Candle SVG structure via CSS */
.candle-wrap {
  display: flex; flex-direction: column; align-items: center;
  width: 28px;
}
.candle-flame {
  width: 10px; height: 18px;
  background: radial-gradient(ellipse at 50% 80%, var(--flame-core) 0%, var(--flame-mid) 45%, var(--flame-base) 80%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 6px 2px rgba(255,170,50,0.5), 0 0 12px 4px rgba(255,120,0,0.3);
  animation: flicker 1.8s ease-in-out infinite alternate;
  transform-origin: bottom center;
}
.candle-wick {
  width: 1.5px; height: 6px; background: #555; margin-top: -1px;
}
.candle-body {
  width: 14px; height: 42px;
  background: linear-gradient(to bottom, #f5f0e8 0%, #e8e0d0 40%, #d0c8b8 100%);
  border-radius: 2px 2px 1px 1px;
}
.candle-drip {
  width: 14px; height: 5px;
  background: rgba(240,235,228,0.4);
  border-radius: 0 0 4px 4px;
}
.candle-name {
  font-size: 0.58rem; color: var(--text-muted);
  max-width: 56px; text-align: center;
  word-break: break-word; line-height: 1.3;
  margin-top: 0.2rem;
}

@keyframes flicker {
  0%   { transform: scaleX(1) scaleY(1) rotate(-1deg); opacity: 0.95; }
  25%  { transform: scaleX(0.92) scaleY(1.05) rotate(1deg); opacity: 1; }
  50%  { transform: scaleX(1.04) scaleY(0.96) rotate(-0.5deg); opacity: 0.9; }
  75%  { transform: scaleX(0.96) scaleY(1.04) rotate(1.5deg); opacity: 1; }
  100% { transform: scaleX(1.02) scaleY(1.02) rotate(-1deg); opacity: 0.95; }
}

.candle-count-display-old {
  color: var(--text-secondary); font-size: 0.88rem;
  margin-bottom: 2rem; letter-spacing: 0.3px;
}
.candle-count-display strong {
  color: var(--accent-gold); font-size: 1.1rem;
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
  padding: 5.5rem 2rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.gallery-section .section-title,
.gallery-section .section-divider,
.gallery-section .section-subtitle {
  text-align: center;
}
.gallery-slider-wrap {
  position: relative; max-width: 860px; margin: 0 auto;
  overflow: hidden; border-radius: var(--radius);
}
.gallery-track {
  display: flex; transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.gallery-slide {
  flex: 0 0 100%; min-width: 0;
  height: 420px; position: relative; overflow: hidden;
}
.gallery-slide img {
  width: 100%; height: 100%; object-fit: cover;
}
/* Gallery placeholder */
.gallery-slide .gallery-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.75rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-soft);
  color: var(--text-muted); font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.gallery-slide .gallery-ph .ph-icon { font-size: 2.5rem; opacity: 0.4; }
.gallery-slide .gallery-ph p { font-size: 0.78rem; }

.gallery-slide .gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: rgba(255,255,255,0.85); font-size: 0.82rem;
  padding: 1.5rem 1.25rem 0.9rem; text-align: center;
  font-style: italic;
}
.gallery-prev, .gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 5; background: rgba(7,7,15,0.65);
  border: 1px solid rgba(201,160,82,0.3); color: var(--accent-gold);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 1rem; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.gallery-prev { left: 0.75rem; }
.gallery-next { right: 0.75rem; }
.gallery-prev:hover, .gallery-next:hover {
  background: rgba(201,160,82,0.2); border-color: var(--accent-gold);
}
.gallery-dots {
  display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.25rem;
}
.gallery-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); border: none; cursor: pointer;
  transition: all var(--transition);
}
.gallery-dot.active {
  background: var(--accent-gold); transform: scale(1.3);
}

/* ============================================================
   CONDOLENCE PREVIEW (home page)
   ============================================================ */
.messages-preview-section {
  padding: 5.5rem 2rem; text-align: center;
}
.messages-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem; max-width: 900px; margin: 0 auto 2.5rem;
}
.message-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1rem;
  text-align: left; transition: border-color var(--transition), background var(--transition);
}
.message-card:hover { background: var(--bg-card-hover); border-color: var(--border-soft); }
.message-card .mc-name {
  font-size: 0.8rem; color: var(--accent-gold);
  letter-spacing: 0.3px; margin-bottom: 0.5rem;
  font-weight: 600;
}
.message-card .mc-text {
  font-size: 0.88rem; color: var(--text-secondary);
  line-height: 1.7; font-style: italic;
}
.message-card .mc-date {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 0.65rem;
}
.no-messages {
  color: var(--text-muted); font-size: 0.9rem;
  font-style: italic; padding: 2rem 0;
  grid-column: 1 / -1;
}

/* ============================================================
   CONDOLENCES PAGE
   ============================================================ */
.page-hero {
  padding: 9rem 2rem 4rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  color: var(--text-primary); margin-bottom: 0.5rem;
}
.page-hero .ph-gold { color: var(--accent-gold); }
.page-hero p {
  color: var(--text-secondary); font-size: 0.95rem; max-width: 480px; margin: 0 auto;
}
.condolences-layout {
  max-width: 960px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem;
  padding: 4rem 2rem;
  align-items: start;
}
.submit-panel h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem; color: var(--accent-gold); margin-bottom: 0.5rem;
}
.submit-panel .panel-note {
  font-size: 0.82rem; color: var(--text-muted);
  margin-bottom: 1.75rem; line-height: 1.6;
}
.messages-panel h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem; color: var(--accent-gold); margin-bottom: 0.35rem;
}
.messages-panel .panel-count {
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.5rem;
}
.messages-list { display: flex; flex-direction: column; gap: 1rem; }
.message-full-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.message-full-card .mcf-name {
  font-size: 0.85rem; color: var(--accent-gold);
  font-weight: 600; margin-bottom: 0.5rem;
}
.message-full-card .mcf-text {
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.75; font-style: italic;
}
.message-full-card .mcf-meta {
  font-size: 0.72rem; color: var(--text-muted);
  margin-top: 0.65rem;
}
.form-success {
  display: none;
  background: rgba(76,175,136,0.08);
  border: 1px solid rgba(76,175,136,0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: var(--success); font-size: 0.88rem;
  margin-top: 1rem; line-height: 1.65;
}
.form-success.show { display: block; }

/* ============================================================
   ADMIN PAGE
   ============================================================ */
.admin-login-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 2rem;
}
.admin-login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem; width: 100%; max-width: 380px;
}
.admin-login-card h1 {
  font-family: var(--font-serif);
  font-size: 1.35rem; color: var(--accent-gold);
  margin-bottom: 0.35rem;
}
.admin-login-card p {
  font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.75rem;
}
.login-error {
  background: rgba(217,85,85,0.1);
  border: 1px solid rgba(217,85,85,0.3);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  color: var(--danger); font-size: 0.82rem;
  margin-bottom: 1rem; display: none;
}
.login-error.show { display: block; }
.admin-wrap {
  max-width: 940px; margin: 0 auto; padding: 8rem 2rem 4rem;
}
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2.5rem; padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 1rem;
}
.admin-header h1 {
  font-family: var(--font-serif);
  font-size: 1.5rem; color: var(--accent-gold);
}
.admin-header .ah-sub {
  font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem;
}
.admin-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 2rem; overflow-x: auto;
}
.admin-tab {
  padding: 0.65rem 1.35rem; font-size: 0.85rem;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); letter-spacing: 0.3px;
  transition: all var(--transition); white-space: nowrap;
}
.admin-tab:hover { color: var(--text-primary); }
.admin-tab.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }
.admin-tab .tab-badge {
  background: var(--accent-gold); color: #07070f;
  font-size: 0.68rem; font-weight: 700;
  padding: 0.1rem 0.42rem; border-radius: 50px;
  margin-left: 0.4rem;
}
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-msg-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1rem;
}
.admin-msg-card .amc-meta {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem;
}
.admin-msg-card .amc-name {
  font-size: 0.9rem; color: var(--text-primary); font-weight: 600;
}
.admin-msg-card .amc-date {
  font-size: 0.72rem; color: var(--text-muted);
}
.admin-msg-card .amc-text {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 1rem; font-style: italic;
}
.admin-msg-card .amc-actions {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
}
.admin-msg-card textarea {
  width: 100%; background: var(--bg-secondary);
  border: 1px solid var(--border); color: var(--text-primary);
  padding: 0.65rem 0.85rem; border-radius: 3px;
  font-size: 0.88rem; font-family: var(--font-sans);
  resize: vertical; min-height: 80px; margin-bottom: 0.75rem;
  display: none;
}
.admin-msg-card textarea:focus { outline: none; border-color: var(--accent-gold); }
.admin-msg-card textarea.editing { display: block; }
.amc-edit-actions { display: none; gap: 0.5rem; }
.amc-edit-actions.editing { display: flex; }
.admin-empty {
  text-align: center; padding: 3rem 1rem;
  color: var(--text-muted); font-size: 0.9rem; font-style: italic;
}
.admin-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; text-align: center;
}
.stat-card .stat-num {
  font-family: var(--font-serif);
  font-size: 2rem; color: var(--accent-gold); display: block; margin-bottom: 0.25rem;
}
.stat-card .stat-label {
  font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.5rem; border-radius: var(--radius);
  font-size: 0.875rem; letter-spacing: 0.3px;
  border: 1px solid transparent; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-gold); color: #07070f;
  border-color: var(--accent-gold); font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-gold-lt); border-color: var(--accent-gold-lt);
  transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,160,82,0.25);
  color: #07070f;
}
.btn-outline {
  background: transparent; color: var(--accent-gold);
  border-color: var(--accent-gold);
}
.btn-outline:hover {
  background: var(--accent-gold-dim); transform: translateY(-1px);
}
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #c04444; border-color: #c04444; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm { padding: 0.38rem 0.85rem; font-size: 0.78rem; }

/* ============================================================
   FORM
   ============================================================ */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block; font-size: 0.8rem; color: var(--text-secondary);
  margin-bottom: 0.35rem; letter-spacing: 0.3px;
}
.form-group input,
.form-group textarea {
  width: 100%; background: var(--bg-secondary);
  border: 1px solid var(--border); color: var(--text-primary);
  padding: 0.7rem 0.9rem; border-radius: var(--radius);
  font-size: 0.9rem; font-family: var(--font-sans);
  transition: border-color var(--transition); resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent-gold); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.char-count {
  text-align: right; font-size: 0.72rem;
  color: var(--text-muted); margin-top: 0.25rem;
}


/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem; margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.pg-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--accent-gold); padding: 0.55rem 1.25rem;
  border-radius: var(--radius); font-size: 0.85rem;
  cursor: pointer; transition: all var(--transition);
  letter-spacing: 0.3px;
}
.pg-btn:hover:not(:disabled) {
  background: var(--accent-gold-dim); border-color: var(--accent-gold);
}
.pg-btn:disabled {
  opacity: 0.3; cursor: not-allowed;
}
.pg-indicator {
  font-size: 0.82rem; color: var(--text-muted);
  letter-spacing: 0.5px; min-width: 90px; text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem; text-align: center;
}
.footer-name {
  font-family: var(--font-serif);
  font-size: 1.05rem; color: var(--accent-gold); margin-bottom: 0.5rem;
}
.footer-dates {
  font-size: 0.8rem; color: var(--text-muted); letter-spacing: 1px; margin-bottom: 1rem;
}
.footer-verse {
  font-style: italic; color: var(--text-muted); font-size: 0.8rem; margin-bottom: 1.5rem;
}
.footer-links {
  display: flex; justify-content: center; gap: 1.5rem;
  list-style: none; margin-bottom: 1.25rem;
}
.footer-links a { font-size: 0.8rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--accent-gold); }
.footer-copy { font-size: 0.72rem; color: var(--text-muted); opacity: 0.6; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 1.75rem; left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--bg-card); border: 1px solid var(--border-soft);
  color: var(--text-primary); padding: 0.7rem 1.4rem;
  border-radius: 50px; font-size: 0.85rem; z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap; box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }


/* ── Dedicated mobile music button ── */
.music-btn-mobile {
  display: none;
}
@media (max-width: 768px) {
  .music-btn-mobile {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; padding: 0.75rem 1rem;
    background: var(--accent-gold); border: none;
    color: #1a1408; font-size: 0.9rem; font-weight: 700;
    letter-spacing: 0.5px; cursor: pointer;
    animation: music-pulse-mobile 2.5s ease-in-out infinite;
    position: relative; z-index: 899;
  }
  .music-btn-mobile.playing {
    background: #e8c84a; animation: none;
  }
  .music-btn-mobile .music-icon { font-size: 1.1rem; }
  /* Hide desktop music button on mobile */
  .music-btn { display: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav { padding: 0.85rem 1.25rem; flex-wrap: wrap; gap: 0; }
  .nav-toggle { display: block; }
  .nav-right .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(7,7,15,0.98); flex-direction: column;
    padding: 1rem 1.5rem 1.5rem; gap: 0.85rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-right .nav-links.open { display: flex; }
  /* music button — full width bar below nav on mobile */
  .music-btn {
    order: 10;
    width: 100%;
    justify-content: center;
    border-radius: 0;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    border-top: 1px solid rgba(212,175,55,0.2);
    border-left: none; border-right: none; border-bottom: none;
    box-shadow: none;
    animation: music-pulse-mobile 2.5s ease-in-out infinite;
  }
  @keyframes music-pulse-mobile {
    0%, 100% { background: var(--accent-gold); }
    50% { background: #e8c84a; }
  }

  .hero-prev, .hero-next { width: 34px; height: 34px; font-size: 0.9rem; }
  .hero-prev { left: 0.75rem; }
  .hero-next { right: 0.75rem; }

  .condolences-layout {
    grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 1.25rem;
  }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }

  .gallery-slide { height: 260px; }

  .messages-preview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .admin-stats { grid-template-columns: 1fr; }
  .hero-scroll { display: none; }
}

/* ============================================================
   v2.0 ADDITIONS
   ============================================================ */

/* ── Candle limit indicator ── */
.candle-limit-note {
  font-size: 0.78rem; color: var(--text-muted);
  margin-top: 0.5rem; letter-spacing: 0.2px;
}
.candle-limit-note.at-limit { color: var(--accent-gold); }
.candle-btn-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
#lightCandleBtn:disabled {
  opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}

/* ── Popup / Overlay ── */
.popup-overlay {
  display: none; position: fixed; inset: 0; z-index: 950;
  background: rgba(0,0,0,0.8); align-items: center; justify-content: center;
  padding: 1.5rem; backdrop-filter: blur(3px);
}
.popup-overlay.open { display: flex; }
.popup-card {
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: 6px; padding: 2.25rem 2rem; width: 100%; max-width: 420px;
  position: relative; animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.popup-close {
  position: absolute; top: 0.9rem; right: 1rem;
  background: none; border: none; color: var(--text-muted);
  font-size: 1.3rem; cursor: pointer; line-height: 1;
  transition: color var(--transition);
}
.popup-close:hover { color: var(--text-primary); }
.popup-dove {
  font-size: 2rem; text-align: center; margin-bottom: 1rem;
  color: var(--accent-gold); opacity: 0.6;
}
.popup-card h2 {
  font-family: var(--font-serif); font-size: 1.3rem;
  color: var(--accent-gold); text-align: center; margin-bottom: 0.5rem;
}
.popup-card p {
  font-size: 0.85rem; color: var(--text-secondary); text-align: center;
  line-height: 1.7; margin-bottom: 1.5rem;
}
.popup-success {
  display: none; text-align: center; padding: 1rem;
  background: rgba(76,175,136,0.08); border: 1px solid rgba(76,175,136,0.25);
  border-radius: var(--radius); color: var(--success); font-size: 0.88rem;
  line-height: 1.65; margin-top: 0.75rem;
}
.popup-success.show { display: block; }

/* ── Admin 4-column stats ── */
.admin-stats-4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem;
}

/* ── Gallery Admin Grid ── */
.gallery-upload-zone {
  border: 2px dashed var(--border-soft); border-radius: var(--radius);
  padding: 2rem; text-align: center; margin-bottom: 2rem;
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
}
.gallery-upload-zone:hover, .gallery-upload-zone.drag-over {
  border-color: var(--accent-gold); background: var(--accent-gold-dim);
}
.gallery-upload-zone .uz-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.5; }
.gallery-upload-zone p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.gallery-upload-zone input[type="file"] { display: none; }

.gallery-admin-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.gallery-admin-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition);
}
.gallery-admin-item.is-hidden { opacity: 0.45; }
.gallery-admin-item:hover { border-color: var(--border-soft); }
.gai-thumb {
  position: relative; width: 100%; padding-top: 62%;
  overflow: hidden; background: var(--bg-secondary);
}
.gai-thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.gai-error {
  position: absolute; inset: 0;
  align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--text-muted); text-align: center; padding: 0.5rem;
}
.gai-badge {
  position: absolute; top: 0.4rem; left: 0.4rem;
  background: rgba(0,0,0,0.7); color: var(--text-muted);
  font-size: 0.65rem; letter-spacing: 0.5px; padding: 0.2rem 0.5rem;
  border-radius: 3px; text-transform: uppercase;
}
.gai-info {
  padding: 0.6rem 0.75rem 0; display: flex; flex-direction: column; gap: 0.15rem;
}
.gai-name { font-size: 0.78rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gai-type { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.gai-actions { padding: 0.5rem 0.75rem 0.75rem; display: flex; gap: 0.4rem; }

/* ── Subscribers Table ── */
.subscribers-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem; flex-wrap: wrap; gap: 0.75rem;
}
.subscribers-toolbar .sub-count { font-size: 0.85rem; color: var(--text-muted); }
.sub-table-wrap { overflow-x: auto; }
.sub-table {
  width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.sub-table th {
  text-align: left; padding: 0.65rem 0.85rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sub-table td {
  padding: 0.7rem 0.85rem; border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary); vertical-align: middle;
}
.sub-table tr:hover td { background: var(--bg-card-hover); }
.sub-table .td-name { color: var(--text-primary); font-weight: 500; }
.sub-table .td-email { color: var(--accent-gold); font-size: 0.82rem; }

/* ── Message sub-tabs (Live / Deleted) ── */
.msg-sub-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.msg-sub-tab {
  padding: 0.5rem 1.1rem; font-size: 0.8rem;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-muted); cursor: pointer; transition: all var(--transition);
}
.msg-sub-tab:hover { color: var(--text-primary); }
.msg-sub-tab.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); }

/* ── Responsive additions ── */
@media (max-width: 768px) {
  .admin-stats-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery-admin-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .admin-stats-4 { grid-template-columns: 1fr 1fr; }
  .gallery-admin-grid { grid-template-columns: 1fr 1fr; }
}
