/* ──────────────────────────────────────────────────────────────────────────
   Vesak Lumata – Main Stylesheet
   Theme: Deep indigo night sky · Gold lantern light · Lotus white
────────────────────────────────────────────────────────────────────────── */

/* ─── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --clr-bg:        #0d0a1e;
  --clr-bg2:       #130e2b;
  --clr-surface:   #1c1535;
  --clr-surface2:  #251c48;
  --clr-gold:      #f5c842;
  --clr-gold-lt:   #fde98a;
  --clr-gold-dk:   #c9a020;
  --clr-accent:    #e85d7e;
  --clr-accent2:   #9b59b6;
  --clr-text:      #e8e0f5;
  --clr-text-muted:#9e96b8;
  --clr-border:    #2e2354;
  --clr-white:     #ffffff;

  --ff-heading: 'Cinzel', serif;
  --ff-body:    'Lato', sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;

  --shadow-glow: 0 0 24px rgba(245, 200, 66, 0.25);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.45);
  --transition: 0.25s ease;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--clr-gold); text-decoration: none; }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--ff-heading); line-height: 1.2; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-xl);
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--clr-gold);
  color: #1a1008;
  border-color: var(--clr-gold);
}
.btn-primary:hover {
  background: var(--clr-gold-lt);
  border-color: var(--clr-gold-lt);
  box-shadow: 0 0 20px rgba(245,200,66,0.5);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  color: var(--clr-gold);
  border-color: var(--clr-gold);
}
.btn-outline:hover {
  background: rgba(245,200,66,0.1);
  box-shadow: 0 0 16px rgba(245,200,66,0.3);
  transform: translateY(-2px);
}
.btn-outline-sm {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--clr-gold);
  color: var(--clr-gold);
  background: transparent;
  transition: all var(--transition);
}
.btn-outline-sm:hover {
  background: rgba(245,200,66,0.1);
}
.btn-full { width: 100%; justify-content: center; }
.btn-danger {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn-success {
  background: #2ecc71;
  color: #fff;
  border-color: #2ecc71;
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn-warning {
  background: #f39c12;
  color: #fff;
  border-color: #f39c12;
  padding: 6px 14px;
  font-size: 0.85rem;
}
.btn-sm { padding: 6px 16px; font-size: 0.85rem; }

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,10,30,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--clr-border);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-heading);
  font-size: 1.3rem;
  color: var(--clr-gold);
  font-weight: 700;
}
.lantern-icon { font-size: 1.5rem; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--clr-text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--clr-gold); }
.nav-admin {
  color: var(--clr-gold-dk) !important;
  border: 1px solid var(--clr-gold-dk);
  padding: 4px 14px;
  border-radius: var(--radius-xl);
}
.nav-admin:hover { background: rgba(245,200,66,0.08) !important; }
.nav-toggle { display: none; background: none; border: none; color: var(--clr-text); font-size: 1.5rem; cursor: pointer; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 40%, #1a1060 0%, #0d0a1e 70%);
  padding: 100px 24px 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f5c842' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1.5'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-lanterns {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lantern {
  position: absolute;
  font-size: 2.5rem;
  animation: float 6s ease-in-out infinite;
  opacity: 0.6;
}
.l1 { top: 15%; left: 10%; animation-delay: 0s; font-size: 2rem; }
.l2 { top: 20%; right: 12%; animation-delay: 1s; font-size: 3rem; }
.l3 { top: 60%; left: 5%; animation-delay: 2s; font-size: 1.8rem; }
.l4 { top: 65%; right: 8%; animation-delay: 1.5s; font-size: 2.5rem; }
.l5 { top: 35%; left: 50%; animation-delay: 0.8s; font-size: 1.5rem; margin-left: -300px; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--clr-white);
  text-shadow: 0 0 40px rgba(245,200,66,0.4);
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 30%, var(--clr-gold-lt) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-tagline {
  font-size: 1.25rem;
  color: var(--clr-text-muted);
  margin-bottom: 40px;
  font-weight: 300;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-lotus {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 5rem;
  opacity: 0.12;
  pointer-events: none;
}
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-dot {
  width: 6px;
  height: 6px;
  background: var(--clr-gold);
  border-radius: 50%;
  animation: bounce 1.5s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(10px); opacity: 0.4; }
}

/* ─── Section Commons ────────────────────────────────────────────────────── */
.gallery-section, .submit-section {
  padding: 100px 0;
}
.gallery-section { background: var(--clr-bg2); }
.submit-section  { background: var(--clr-bg); }

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--clr-white);
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--clr-text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* ─── Gallery ────────────────────────────────────────────────────────────── */
.gallery-filters {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 24px;
  border-radius: var(--radius-xl);
  border: 2px solid var(--clr-border);
  background: transparent;
  color: var(--clr-text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: rgba(245,200,66,0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.gallery-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--clr-text-muted);
}
.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--clr-text-muted);
}
.gallery-empty p { font-size: 1.1rem; margin-top: 12px; }

.photo-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--clr-surface);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  aspect-ratio: 4/3;
}
.photo-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 20px rgba(245,200,66,0.15);
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.photo-card:hover img { transform: scale(1.05); }
.photo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,10,30,0.9) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.photo-card:hover .photo-card-overlay { opacity: 1; }
.photo-card-overlay h3 {
  font-size: 0.95rem;
  color: var(--clr-white);
  margin-bottom: 4px;
}
.photo-card-overlay p {
  font-size: 0.8rem;
  color: var(--clr-gold);
}

.gallery-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 50px;
}
.page-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--clr-border);
  background: transparent;
  color: var(--clr-text-muted);
  cursor: pointer;
  font-weight: 700;
  transition: all var(--transition);
}
.page-btn.active, .page-btn:hover {
  border-color: var(--clr-gold);
  color: var(--clr-gold);
  background: rgba(245,200,66,0.08);
}

/* ─── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--clr-border);
  border-top-color: var(--clr-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Submit Form ────────────────────────────────────────────────────────── */
.submit-wrapper {
  max-width: 680px;
  margin: 0 auto;
}
.submit-form {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: 48px;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-md);
  background: var(--clr-surface2);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
}
.drop-zone.drag-over {
  border-color: var(--clr-gold);
  background: rgba(245,200,66,0.06);
  box-shadow: 0 0 20px rgba(245,200,66,0.2);
}
.drop-zone-inner { text-align: center; padding: 32px; }
.drop-icon { font-size: 3rem; margin-bottom: 12px; }
.drop-text { font-size: 1rem; color: var(--clr-text); margin-bottom: 4px; }
.drop-sub { font-size: 0.85rem; color: var(--clr-text-muted); margin-bottom: 16px; }
.drop-preview { width: 100%; height: 220px; }
.drop-preview img { width: 100%; height: 100%; object-fit: contain; }
.remove-preview {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  border: none;
  color: var(--clr-white);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.remove-preview:hover { background: #e74c3c; }

.field-hint {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin-bottom: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clr-text);
}
.form-group label .required { color: var(--clr-accent); }
.form-group label .opt { color: var(--clr-text-muted); font-weight: 400; font-size: 0.8rem; }
.form-group input, .form-group textarea, .form-group select {
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-text);
  padding: 12px 16px;
  font-size: 1rem;
  font-family: var(--ff-body);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none;
  border-color: var(--clr-gold);
  box-shadow: 0 0 0 3px rgba(245,200,66,0.15);
}
.form-group input::placeholder { color: var(--clr-text-muted); }

.form-alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.form-alert.success {
  background: rgba(46,204,113,0.12);
  border: 1px solid #2ecc71;
  color: #2ecc71;
}
.form-alert.error {
  background: rgba(231,76,60,0.12);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  padding: 60px 24px;
  text-align: center;
}
.footer-container { max-width: 600px; margin: 0 auto; }
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--ff-heading);
  font-size: 1.4rem;
  color: var(--clr-gold);
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-text {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.7;
}
.footer-copy { font-size: 0.85rem; color: var(--clr-border); }

/* ─── Lightbox ───────────────────────────────────────────────────────────── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 900;
  display: none;
  cursor: zoom-out;
}
.lightbox-overlay.active { display: block; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 901;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox[style*="display:none"] { display: none !important; }

.lightbox-content {
  position: relative;
  max-width: 900px;
  width: 100%;
  animation: zoomIn 0.2s ease;
}
@keyframes zoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-content img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.lightbox-caption {
  text-align: center;
  margin-top: 16px;
  color: var(--clr-text);
}
.lightbox-caption h3 { font-size: 1.1rem; margin-bottom: 4px; }
.lightbox-caption p { font-size: 0.85rem; color: var(--clr-text-muted); }

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--clr-white);
  cursor: pointer;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}
.lightbox-close {
  top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.2rem;
}
.lightbox-prev, .lightbox-next {
  top: 50%; transform: translateY(-50%);
  width: 50px; height: 50px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(245,200,66,0.2);
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--clr-surface2);
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-card);
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.toast-success { border-color: #2ecc71; color: #2ecc71; }
.toast.toast-error   { border-color: #e74c3c; color: #e74c3c; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--clr-bg2);
    border-bottom: 1px solid var(--clr-border);
    padding: 20px 24px;
    gap: 20px;
  }
  .nav-toggle { display: block; }

  .hero-actions { flex-direction: column; align-items: center; }
  .form-row { grid-template-columns: 1fr; }
  .submit-form { padding: 28px 20px; }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

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