/* ============================================================
   Memorial Quotes — Main Stylesheet
   Design: Peace-themed · Soft blues, lavender, ivory, warm whites
   ============================================================ */

/* ── CSS Custom Properties ────────────────────────────────── */
:root {
  /* Brand palette */
  --color-sky:        #e8f4fd;
  --color-sky-mid:    #c5e3f7;
  --color-blue:       #4a90d9;
  --color-blue-dark:  #2c6faa;
  --color-lavender:   #b8a9d4;
  --color-lavender-light: #ede9f8;
  --color-purple:     #7c5cbf;
  --color-purple-dark:#5a3f96;
  --color-ivory:      #faf8f5;
  --color-white:      #ffffff;
  --color-gold:       #c9a84c;
  --color-gold-light: #f0e0a0;
  --color-sage:       #8aab8a;

  /* Neutrals */
  --color-text:       #2d2d3e;
  --color-text-muted: #6b6b7d;
  --color-text-light: #9898a8;
  --color-border:     #e4e2ed;
  --color-bg:         #f7f6fc;
  --color-surface:    #ffffff;

  /* Status */
  --color-success:    #4caf87;
  --color-warning:    #e8a93b;
  --color-error:      #e05a5a;
  --color-info:       #4a90d9;

  /* Typography */
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-1:   4px;
  --space-2:   8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* Radii */
  --radius-sm:  6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(76,60,120,.08), 0 1px 2px rgba(76,60,120,.04);
  --shadow-md:  0 4px 16px rgba(76,60,120,.10), 0 2px 6px rgba(76,60,120,.06);
  --shadow-lg:  0 12px 40px rgba(76,60,120,.14), 0 4px 12px rgba(76,60,120,.08);
  --shadow-glow:0 0 40px rgba(124,92,191,.20);

  /* Transitions */
  --transition: .22s cubic-bezier(.4,0,.2,1);

  /* Layout */
  --container-max: 1200px;
  --navbar-h: 72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: var(--color-purple); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-purple-dark); }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--color-text);
}

ul[role="list"] { list-style: none; }

/* ── Accessibility ────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-purple);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  z-index: 9999;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-2); }

/* ── Container ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 500;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
  line-height: 1.4;
  text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--color-blue); outline-offset: 2px; }

.btn--primary {
  background: linear-gradient(135deg, var(--color-purple), var(--color-blue));
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,92,191,.35);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(124,92,191,.45);
  color: #fff;
}
.btn--secondary {
  background: var(--color-lavender-light);
  color: var(--color-purple-dark);
  border-color: var(--color-lavender);
}
.btn--secondary:hover { background: var(--color-lavender); color: var(--color-purple-dark); }

.btn--outline {
  background: transparent;
  border-color: var(--color-purple);
  color: var(--color-purple);
}
.btn--outline:hover { background: var(--color-purple); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
}
.btn--ghost:hover { background: var(--color-border); color: var(--color-text); }

.btn--gold {
  background: linear-gradient(135deg, var(--color-gold), #e8c56a);
  color: #fff;
  border-color: transparent;
}
.btn--gold:hover { filter: brightness(1.05); color: #fff; }

.btn--sm  { padding: 7px 16px; font-size: .82rem; }
.btn--lg  { padding: 14px 32px; font-size: 1rem; }
.btn--full { width: 100%; justify-content: center; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--navbar-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.navbar__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--space-5);
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-purple-dark);
  flex-shrink: 0;
}
.navbar__logo:hover { color: var(--color-purple); }
.logo-icon { font-size: 1.1rem; color: var(--color-gold); }

.navbar__links {
  display: flex;
  list-style: none;
  gap: var(--space-1);
  margin: 0 auto;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--color-purple);
  background: var(--color-lavender-light);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.lang-switcher { display: flex; gap: 2px; }
.lang-btn {
  padding: 5px 9px;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.lang-btn:hover, .lang-btn--active {
  background: var(--color-lavender-light);
  color: var(--color-purple);
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}
.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 2px;
  transition: all var(--transition);
}
.navbar__hamburger.open span:nth-child(1) { transform: rotate(45deg) translateY(9px); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: rotate(-45deg) translateY(-9px); }

/* ── Flash Messages ───────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  font-size: .9rem;
  font-weight: 500;
  animation: slideDown .3s ease;
}
.flash--success { background: #e8f8f2; color: #237559; border-bottom: 2px solid var(--color-success); }
.flash--error   { background: #fceaea; color: #8b2222; border-bottom: 2px solid var(--color-error); }
.flash--info    { background: #e8f4fd; color: #1c5a8a; border-bottom: 2px solid var(--color-info); }
.flash--warning { background: #fef8e8; color: #7a5500; border-bottom: 2px solid var(--color-warning); }
.flash__close { background: none; border: none; cursor: pointer; font-size: 1.25rem; opacity: .6; padding: 0 var(--space-2); }
.flash__close:hover { opacity: 1; }

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(184,169,212,.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(74,144,217,.20) 0%, transparent 55%),
    linear-gradient(160deg, #f7f6fc 0%, #ede9f8 40%, #e8f4fd 100%);
}
.hero__particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero__particle {
  position: absolute;
  border-radius: 50%;
  animation: float linear infinite;
  opacity: 0;
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-10) var(--space-5);
  max-width: 820px;
  margin: 0 auto;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-lavender-light);
  border: 1px solid var(--color-lavender);
  color: var(--color-purple);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
.hero__title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}
.hero__title em { font-style: italic; color: var(--color-purple); }
.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto var(--space-7);
  font-weight: 300;
}
.hero__cta {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}
.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-top: var(--space-9);
  flex-wrap: wrap;
}
.hero__stat-value {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-purple);
  display: block;
  line-height: 1;
}
.hero__stat-label {
  font-size: .85rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ── Candle decoration ────────────────────────────────────── */
.hero__candle {
  position: absolute;
  right: 8%;
  bottom: 10%;
  width: 80px;
  opacity: .7;
  animation: candleFlicker 3s ease-in-out infinite;
}
@keyframes candleFlicker {
  0%, 100% { transform: scale(1) rotate(-.5deg); }
  50%       { transform: scale(1.03) rotate(.5deg); }
}

/* ── Section titles ───────────────────────────────────────── */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: var(--space-2);
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: var(--space-7);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.section-label {
  display: block;
  text-align: center;
  text-transform: uppercase;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--color-purple);
  margin-bottom: var(--space-3);
}

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: var(--space-9) 0; }
.section--ivory { background: var(--color-ivory); }
.section--lavender { background: var(--color-lavender-light); }
.section--sky { background: var(--color-sky); }

/* ── Memorial Cards ───────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-5);
}
.memorial-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
}
.memorial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.memorial-card__cover {
  height: 160px;
  background: linear-gradient(135deg, var(--color-lavender-light), var(--color-sky-mid));
  position: relative;
  overflow: hidden;
}
.memorial-card__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.memorial-card__cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.35));
}
.memorial-card__avatar {
  position: absolute;
  bottom: -32px;
  left: var(--space-5);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #fff;
  object-fit: cover;
  background: var(--color-lavender);
  box-shadow: var(--shadow-md);
}
.memorial-card__body {
  padding: var(--space-7) var(--space-5) var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.memorial-card__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.memorial-card__dates {
  font-size: .82rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}
.memorial-card__excerpt {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.memorial-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}
.memorial-card__meta {
  display: flex;
  gap: var(--space-4);
  font-size: .8rem;
  color: var(--color-text-muted);
}
.memorial-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Quote Cards (wall) ───────────────────────────────────── */
.quotes-grid {
  columns: 3;
  column-gap: var(--space-5);
}
.quote-card {
  break-inside: avoid;
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
  position: relative;
}
.quote-card:hover { box-shadow: var(--shadow-md); }
.quote-card__featured {
  border-left: 3px solid var(--color-gold);
}
.quote-card__mark {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  color: var(--color-lavender);
  line-height: .6;
  margin-bottom: var(--space-3);
  display: block;
}
.quote-card__text {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.quote-card__author {
  font-size: .82rem;
  font-weight: 600;
  color: var(--color-purple);
}
.quote-card__memorial {
  font-size: .78rem;
  color: var(--color-text-muted);
}
.quote-card__badge {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: var(--color-gold-light);
  color: var(--color-gold);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Memorial Detail Page ─────────────────────────────────── */
.memorial-hero {
  position: relative;
  height: 380px;
  background: linear-gradient(135deg, var(--color-lavender-light), var(--color-sky-mid));
  overflow: hidden;
}
.memorial-hero__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.memorial-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,.55) 100%);
}
.memorial-hero__info {
  position: absolute;
  bottom: var(--space-7);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  width: 100%;
  padding: 0 var(--space-5);
}
.memorial-hero__avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  margin: 0 auto var(--space-4);
  box-shadow: var(--shadow-lg);
  background: var(--color-lavender);
}
.memorial-hero__name {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  margin-bottom: var(--space-2);
}
.memorial-hero__dates {
  font-size: 1rem;
  opacity: .9;
  letter-spacing: .04em;
}
.memorial-hero__epitaph {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  opacity: .85;
  margin-top: var(--space-3);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.memorial-body { padding: var(--space-8) 0; }
.memorial-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-7);
  align-items: start;
}
.memorial-main { min-width: 0; }
.memorial-sidebar { position: sticky; top: calc(var(--navbar-h) + var(--space-5)); }

.tribute-panel {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-5);
}
.tribute-panel__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.tribute-btns {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Candle animation */
.candle-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
}
.candle-icon::before {
  content: '🕯️';
  font-size: 1.1rem;
  animation: candleFlicker 2s ease-in-out infinite;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}
.form-label .required { color: var(--color-error); margin-left: 2px; }
.form-control {
  display: block;
  width: 100%;
  padding: 11px 16px;
  font-family: var(--font-sans);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  line-height: 1.5;
}
.form-control:focus {
  border-color: var(--color-purple);
  box-shadow: 0 0 0 3px rgba(124,92,191,.12);
}
.form-control::placeholder { color: var(--color-text-light); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-error { font-size: .82rem; color: var(--color-error); margin-top: 4px; }
.form-hint  { font-size: .82rem; color: var(--color-text-muted); margin-top: 4px; }

.form-check { display: flex; align-items: center; gap: var(--space-3); cursor: pointer; }
.form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  border-radius: 4px;
  accent-color: var(--color-purple);
  cursor: pointer;
}

/* ── Cards / Panels ───────────────────────────────────────── */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
}
.card--glow { box-shadow: var(--shadow-lg), var(--shadow-glow); }

/* ── Auth pages ───────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(184,169,212,.3), transparent),
    var(--color-bg);
  padding: var(--space-7) var(--space-5);
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-7) var(--space-7);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}
.auth-card__logo {
  text-align: center;
  margin-bottom: var(--space-6);
}
.auth-card__title {
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: var(--space-6);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) 0;
  color: var(--color-text-light);
  font-size: .82rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.auth-link-row {
  text-align: center;
  margin-top: var(--space-5);
  font-size: .875rem;
  color: var(--color-text-muted);
}

/* ── Dashboard ────────────────────────────────────────────── */
.dashboard { padding: var(--space-8) 0; }
.dashboard__header {
  margin-bottom: var(--space-7);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.dashboard__welcome {
  font-size: 1.9rem;
}
.dashboard__welcome span { color: var(--color-purple); }

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-7);
}
.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.stat-card__icon {
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}
.stat-card__value {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-purple);
}
.stat-card__label {
  font-size: .82rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Admin ────────────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - var(--navbar-h));
}
.admin-sidebar {
  background: var(--color-text);
  color: #c8c8d8;
  padding: var(--space-6) 0;
  position: sticky;
  top: var(--navbar-h);
  height: calc(100vh - var(--navbar-h));
  overflow-y: auto;
}
.admin-sidebar__brand {
  padding: 0 var(--space-5) var(--space-6);
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: var(--space-5);
}
.admin-nav { list-style: none; }
.admin-nav__item { }
.admin-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-5);
  font-size: .88rem;
  color: #b0b0c4;
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav__link:hover, .admin-nav__link.active {
  color: #fff;
  background: rgba(255,255,255,.06);
  border-left-color: var(--color-lavender);
}
.admin-content {
  padding: var(--space-6);
  background: var(--color-bg);
}
.admin-content__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.admin-content__title { font-size: 1.5rem; }

/* ── Tables ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  font-size: .88rem;
}
.table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-muted);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--color-bg); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge--success { background: #e8f8f2; color: #237559; }
.badge--warning { background: #fef8e8; color: #7a5500; }
.badge--error   { background: #fceaea; color: #8b2222; }
.badge--info    { background: #e8f4fd; color: #1c5a8a; }
.badge--default { background: var(--color-bg); color: var(--color-text-muted); }

/* ── Payment / Checkout ───────────────────────────────────── */
.checkout-card {
  max-width: 520px;
  margin: var(--space-9) auto;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-7);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}
.checkout-card__header {
  text-align: center;
  margin-bottom: var(--space-6);
}
.checkout-card__price {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--color-purple);
}
.checkout-card__currency {
  font-size: 1.4rem;
  vertical-align: super;
  margin-right: 2px;
}
#paypal-button-container { min-height: 52px; margin-top: var(--space-5); }
.payment-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: .78rem;
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}

/* ── Gallery ──────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
  gap: var(--space-3);
}
.gallery__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: transform var(--transition);
}
.gallery__item:hover { transform: scale(1.03); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-5);
  animation: fadeIn .2s ease;
}
.lightbox img { max-width: 90vw; max-height: 88vh; border-radius: var(--radius-md); }
.lightbox__close {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  background: rgba(255,255,255,.12);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,.25); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-7);
  flex-wrap: wrap;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  font-size: .88rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover     { background: var(--color-lavender-light); color: var(--color-purple); }
.page-btn--active   { background: var(--color-purple); color: #fff; border-color: transparent; }
.page-btn--disabled { opacity: .4; pointer-events: none; }

/* ── Features section (homepage) ─────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}
.feature-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
  text-align: center;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  display: block;
}
.feature-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: var(--space-3);
}
.feature-card__text {
  font-size: .9rem;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ── Testimonials ─────────────────────────────────────────── */
.testimonial-strip {
  background: linear-gradient(135deg, var(--color-purple-dark), var(--color-blue-dark));
  padding: var(--space-9) 0;
  color: #fff;
  overflow: hidden;
}
.testimonial { text-align: center; max-width: 680px; margin: 0 auto; padding: 0 var(--space-5); }
.testimonial__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.55;
  margin-bottom: var(--space-5);
  opacity: .95;
}
.testimonial__author { font-size: .9rem; opacity: .7; }

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(124,92,191,.25), transparent),
    linear-gradient(135deg, var(--color-lavender-light), var(--color-sky));
  border-radius: var(--radius-xl);
  padding: var(--space-9) var(--space-7);
  text-align: center;
  margin: var(--space-9) auto;
  max-width: 760px;
  box-shadow: var(--shadow-md);
}
.cta-banner__title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: var(--space-4); }
.cta-banner__text { color: var(--color-text-muted); margin-bottom: var(--space-6); font-size: 1.05rem; }

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--color-text);
  color: #b0b0c4;
  position: relative;
  overflow: hidden;
}
.footer__glow {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 200px;
  background: radial-gradient(ellipse, rgba(124,92,191,.18), transparent);
  pointer-events: none;
}
.footer__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-8);
  padding: var(--space-9) var(--space-5) var(--space-7);
}
.footer__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: var(--space-4);
}
.footer__logo:hover { color: var(--color-lavender); }
.footer__tagline {
  font-size: .88rem;
  margin-bottom: var(--space-5);
  line-height: 1.6;
}
.footer__social { display: flex; gap: var(--space-3); }
.social-icon {
  color: #7878a4;
  transition: color var(--transition);
}
.social-icon:hover { color: #fff; }

.footer__nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.footer__heading {
  font-family: var(--font-serif);
  font-size: .95rem;
  color: #fff;
  margin-bottom: var(--space-4);
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer__col a {
  font-size: .85rem;
  color: #8888a8;
  transition: color var(--transition);
}
.footer__col a:hover { color: #fff; }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: var(--space-5) var(--space-5);
}
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.footer__bottom p { font-size: .82rem; }
.footer__bottom-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: .82rem;
}
.footer__bottom-links a { color: #8888a8; }
.footer__bottom-links a:hover { color: #fff; }
.footer__bottom-links span { opacity: .4; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes slideDown {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeUp {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes float {
  0%   { transform: translateY(100vh) scale(0); opacity: 0; }
  10%  { opacity: .6; }
  90%  { opacity: .3; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}
.animate-up    { animation: fadeUp .6s ease forwards; opacity: 0; }
.anim-delay-1  { animation-delay: .1s; }
.anim-delay-2  { animation-delay: .2s; }
.anim-delay-3  { animation-delay: .3s; }

/* ── Misc Utilities ───────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.text-purple { color: var(--color-purple); }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.gap-4 { gap: var(--space-4); }
.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--color-border); margin: var(--space-6) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Spinner */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid rgba(124,92,191,.25);
  border-top-color: var(--color-purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .memorial-layout  { grid-template-columns: 1fr; }
  .memorial-sidebar { position: static; }
  .quotes-grid      { columns: 2; }
  .admin-layout     { grid-template-columns: 1fr; }
  .admin-sidebar    { display: none; }
  .footer__inner    { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer__nav      { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --navbar-h: 64px; }
  .navbar__links { display: none; flex-direction: column; gap: 0; }
  .navbar__links.open {
    display: flex;
    position: absolute;
    top: var(--navbar-h);
    left: 0; right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: var(--space-3) 0;
    z-index: 150;
  }
  .navbar__links.open .nav-link { padding: 12px var(--space-5); border-radius: 0; }
  .navbar__hamburger { display: flex; }
  .quotes-grid { columns: 1; }
  .footer__nav { grid-template-columns: 1fr 1fr; }
  .footer__bottom-inner { flex-direction: column; text-align: center; }
  .hero__cta { flex-direction: column; align-items: center; }
  .hero__stats { gap: var(--space-5); }
  .cards-grid { grid-template-columns: 1fr; }
  .auth-card { padding: var(--space-5) var(--space-5); }
}

@media (max-width: 480px) {
  .footer__nav { grid-template-columns: 1fr; }
  .stats-row   { grid-template-columns: 1fr 1fr; }
}
