/* ==========================================================================
   NAOMI'S DIGITAL CASTLE - PLAYFUL CELEBRATION (V2.4.0)
   ========================================================================== */

/* Import Playful Fonts */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;800&family=Quicksand:wght@300;400;600;700&family=Cinzel:wght@700;900&display=swap');

/* --- Variables --- */
:root {
  --color-primary: #ff4d8d; /* Playful Princess Pink */
  --color-primary-dark: #d81b60;
  --color-secondary: #ffcd00; /* Playful Yellow */
  --color-accent: #f15d22; /* Bright Orange */
  --color-success: #b4d45d; /* Leafy Green */
  --color-pink-light: #fff0f5;
  --color-pink-soft: #ffe4e1; /* Misty Rose */
  --color-text: #4a1a2c; /* Darker Pinkish Gray */
  --color-bg: #fbfaea; /* Warm White */
  --color-border: #fbcfe8; /* Soft Pink Border */

  --font-heading: 'Cinzel', serif;
  --font-body: 'Quicksand', sans-serif;
  --font-accent: 'Baloo 2', cursive;

  --transition-fun: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-subtle: 0 10px 30px rgba(255, 77, 141, 0.08);
  --shadow-hover: 0 20px 40px rgba(255, 77, 141, 0.15);
  --border-radius: 40px;
}

/* --- Base --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 77, 141, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 205, 0, 0.08) 0%, transparent 40%);
  color: var(--color-text);
  line-height: 1.6;
  font-weight: 500;
  padding-top: 100px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-accent);
  color: var(--color-primary);
  font-weight: 800;
  line-height: 1.1;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fun);
  font-weight: 700;
}

a:hover {
  color: var(--color-accent);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

img[data-lightbox], video[data-lightbox], .journey-image, .hero-image-placeholder, .card-img-placeholder {
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1rem;
  text-align: center;
  color: var(--color-primary);
  text-transform: capitalize;
}

.section-subtitle {
  font-family: var(--font-accent);
  color: var(--color-accent);
  font-size: 1.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 3rem;
  display: block;
}

.divider {
  width: 100px;
  height: 8px;
  background: var(--color-secondary);
  margin: 0 auto 4rem;
  border-radius: 50px;
}

/* --- Typography Utilities --- */
.text-center { text-align: center; }
.lead-text { font-size: 1.3rem; color: #5a2e3e; max-width: 800px; margin: 0 auto; font-weight: 600; line-height: 1.6; }

.scripture-quote {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin: 3rem auto;
  position: relative;
  padding: 3rem;
  max-width: 900px;
  background: var(--color-primary);
  border-radius: 60px;
  box-shadow: 0 20px 0 var(--color-primary-dark);
  transform: rotate(-1deg);
}

/* Visibility fix for card scriptures */
.journey-scripture-quote {
  background: #ffffff !important; /* Pure white for contrast */
  color: var(--color-primary-dark) !important;
  box-shadow: 0 10px 0 var(--color-secondary) !important;
  padding: 2rem;
  font-size: 1.1rem;
  margin: 2rem 0;
  transform: none;
  border: 3px solid var(--color-primary);
}

.scripture-ref {
  display: block;
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--color-secondary);
  font-weight: 800;
  margin-top: 1.5rem;
  text-transform: uppercase;
}

.journey-scripture-quote .scripture-ref {
  color: var(--color-accent) !important;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 1.2rem 3.5rem;
  font-family: var(--font-accent);
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 100px;
  transition: var(--transition-fun);
  cursor: pointer;
  text-align: center;
  border: none;
  text-decoration: none !important;
  box-shadow: 0 10px 0 rgba(0,0,0,0.1);
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 0 #c14a1b;
}

.btn-primary:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 0 #c14a1b;
  background-color: #f37d4f;
}

.btn-outline {
  background-color: var(--color-secondary);
  color: var(--color-primary-dark);
  box-shadow: 0 8px 0 #cc9900;
}

.btn-outline:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 0 #cc9900;
  background-color: #ffe066;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 0;
  background-color: #fff;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(255, 77, 141, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-family: var(--font-accent);
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-family: var(--font-accent);
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 700;
}

.nav-link:hover {
  color: var(--color-accent);
}

.nav-donate-btn {
  padding: 0.8rem 2rem;
  font-size: 0.9rem;
  box-shadow: 0 5px 0 #cc9900;
}

/* --- Hero Section --- */
.hero {
  padding: 4rem 0 8rem;
  background: radial-gradient(circle at top right, #fff0f5, #fbfaea);
  border-radius: 0 0 100px 100px;
  margin-bottom: 4rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  text-align: left;
}

.hero-text-side {
  order: 1;
}

.hero-image-side {
  order: 2;
  position: relative;
}

.hero-label {
  color: var(--color-accent);
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 2rem;
  font-family: var(--font-heading);
}

.hero-image-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  background: var(--color-secondary);
  padding: 1.5rem;
  border-radius: 60px;
  transform: rotate(3deg);
  box-shadow: 20px 20px 0 var(--color-primary);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 40px;
}

/* --- Journey Layout --- */
.journey-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 4rem;
  margin-bottom: 12rem;
}

.journey-row:nth-child(even) {
  grid-template-columns: 1fr 1.2fr;
}

.journey-row:nth-child(even) .journey-media-grid { order: 2; }
.journey-row:nth-child(even) .journey-content { order: 1; }

.journey-media-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(80px, auto);
  gap: 1rem;
}

.grid-item {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-fun);
  background: var(--color-pink-light);
}

.grid-item:hover {
  transform: scale(1.03) translateY(-5px);
  z-index: 10;
  box-shadow: var(--shadow-hover);
}

/* Responsive spans */
.span-6 { grid-column: span 6; grid-row: span 4; }
.span-4 { grid-column: span 4; grid-row: span 4; }
.span-3 { grid-column: span 3; grid-row: span 3; }
.span-2 { grid-column: span 2; grid-row: span 2; }

.grid-item img, .grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(74, 26, 44, 0.8));
  color: white;
  padding: 2rem 1rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.grid-item:hover .image-caption-overlay {
  opacity: 1;
}

.journey-video, .journey-image img {
  width: 100%;
  border-radius: 40px;
}

.journey-content h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.journey-subtitle {
  color: var(--color-accent);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  display: block;
}

/* --- Guestbook --- */
.bg-light { background-color: #fff5f7; }

.guestbook-form {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 4rem;
  border-radius: 60px;
  box-shadow: 0 30px 60px rgba(255, 77, 141, 0.1);
}

.form-group {
  margin-bottom: 2rem;
  width: 100%;
}

.form-control {
  width: 100% !important;
  background: #fff5f8;
  border: 3px solid transparent;
  padding: 1.2rem;
  border-radius: 25px;
  font-family: var(--font-body);
  font-weight: 600;
  transition: var(--transition-fun);
  display: block;
  box-sizing: border-box;
}

.form-control:focus {
  background: #fff;
  border-color: var(--color-primary);
  outline: none;
}

textarea.form-control {
  min-height: 150px;
}

.comment-list-container {
  margin-top: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.comment-item {
  background: #fff;
  padding: 2rem;
  border-radius: 30px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(255, 77, 141, 0.05);
  border: 2px solid #fff5f8;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  border-bottom: 1px dashed var(--color-border);
  padding-bottom: 0.5rem;
}

.comment-author {
  font-family: var(--font-accent);
  color: var(--color-primary);
  font-weight: 800;
}

.comment-date {
  font-size: 0.9rem;
  color: #a0aec0;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-primary);
  color: #fff;
  padding: 8rem 0 4rem;
  border-radius: 100px 100px 0 0;
  text-align: center;
}

.footer-blessing-box {
  background: rgba(255,255,255,0.1);
  padding: 4rem;
  border-radius: 60px;
  margin-bottom: 3rem;
}

.footer-blessing-box p {
  font-family: var(--font-accent);
  font-size: 2.2rem;
  font-weight: 800;
}

.footer-img-container {
  max-width: 300px;
  margin: 0 auto 3rem;
}

.footer-img {
  width: 100%;
  border-radius: 50%;
  border: 10px solid var(--color-secondary);
}

.audio-credit a {
  color: #ffffff !important; /* Pure white for visibility */
  text-decoration: underline !important;
  font-weight: 800;
  background: rgba(0,0,0,0.1);
  padding: 2px 5px;
  border-radius: 5px;
}

.audio-credit a:hover {
  color: var(--color-secondary) !important;
  background: rgba(0,0,0,0.2);
}

/* --- Modals & Overlays --- */
.lightbox, .overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(25, 10, 15, 0.98);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 2rem;
}

.lightbox.active, .overlay.active { display: flex; }

.lightbox-content, .overlay-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  padding: 3rem;
  border-radius: 60px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.lightbox-content {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: -40px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 3001;
}

#lightbox-media img, #lightbox-media video, .video-placeholder video {
  max-height: 70vh;
  border-radius: 20px;
  box-shadow: 0 0 50px rgba(255, 77, 141, 0.3);
}

.video-placeholder {
  margin-bottom: 2rem;
}

#lightbox-caption {
  color: #fff;
  font-family: var(--font-accent);
  font-size: 1.2rem;
  margin: 1.5rem 0;
  text-align: center;
  font-weight: 600;
  background: rgba(216, 27, 96, 0.6);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.overlay-thankyou {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.overlay-msg, .overlay-email-info {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* Gallery Selector Styles */
.gallery-selector {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background: rgba(255,255,255,0.1);
  border-radius: 30px;
  overflow-x: auto;
  max-width: 90vw;
  scrollbar-width: none;
}

.gallery-selector::-webkit-scrollbar { display: none; }

.gallery-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 15px;
  cursor: pointer;
  opacity: 0.6;
  transition: var(--transition-fun);
  border: 3px solid transparent;
  flex-shrink: 0;
}

.gallery-thumb:hover, .gallery-thumb.active {
  opacity: 1;
  transform: scale(1.1);
  border-color: var(--color-secondary);
}

.image-caption {
  font-size: 0.85rem;
  color: #5a2e3e;
  margin-top: 1rem;
  font-weight: 700;
  text-align: center;
  font-style: italic;
}

.site-footer .image-caption {
  color: #fff;
}

/* Floating Buttons */
.music-control, .scroll-btn {
  position: fixed;
  bottom: 2rem;
  z-index: 1001;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #fff;
  border: 4px solid var(--color-secondary);
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(255, 77, 141, 0.4);
  transition: var(--transition-fun);
  font-size: 1.8rem;
  visibility: visible !important;
  opacity: 1 !important;
}

.music-control:hover, .scroll-btn:hover { transform: scale(1.1) rotate(5deg); background-color: var(--color-primary-dark); }
.music-control { right: 2rem; }
.scroll-btn { left: 2rem; }
.scroll-btn.at-bottom { transform: rotate(180deg); }

/* --- Sparkle Background Effect --- */
.sparkle-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
  background: transparent !important;
}

.sparkle {
  position: absolute;
  width: var(--size, 20px);
  height: calc(var(--size, 20px) * 1.3);
  background-color: var(--color);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  opacity: 0;
  animation: balloon-float var(--duration, 10s) ease-in-out infinite;
  box-shadow: inset -5px -5px 15px rgba(0,0,0,0.2), 0 0 35px var(--color); /* Ultra vibrant glow */
}

.sparkle::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 1.5px;
  height: 25px;
  background: rgba(0,0,0,0.3);
  transform: translateX(-50%);
}

@keyframes balloon-float {
  0% { transform: translateY(120vh) translateX(0) rotate(0deg) scale(0); opacity: 0; }
  10% { opacity: 1; transform: translateY(100vh) translateX(25px) rotate(10deg) scale(1); }
  50% { opacity: 1; transform: translateY(30vh) translateX(-50px) rotate(-15deg) scale(1.4); }
  90% { opacity: 0.9; }
  100% { transform: translateY(-50vh) translateX(60px) rotate(25deg) scale(1.1); opacity: 0; }
}

/* --- Kiosk --- */
.kiosk-navbar { padding: 1.5rem 0; }
.kiosk-nav-container { display: flex; justify-content: space-between; align-items: center; }
.kiosk-nav-left { display: flex; align-items: center; gap: 2rem; }
.donate-header { text-align: center; padding: 4rem 0; background: radial-gradient(circle at center, #fff0f5, #fbfaea); }
.kiosk-header-title { font-size: 4rem; margin-top: 1rem; }
.currency-toggle { margin-top: 2rem; display: flex; justify-content: center; gap: 1rem; }
.currency-btn { padding: 1rem 2.5rem; font-family: var(--font-accent); font-size: 1.1rem; font-weight: 800; border-radius: 50px; border: 3px solid var(--color-border); background: #fff; cursor: pointer; transition: var(--transition-fun); }
.currency-btn.active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); box-shadow: 0 10px 20px rgba(255, 77, 141, 0.3); }
.donation-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 3rem; margin-top: 4rem; }
.donation-card { background: #fff; padding: 3rem; border-radius: 60px; box-shadow: 0 30px 60px rgba(255, 77, 141, 0.1); text-align: center; transition: var(--transition-fun); border: 4px solid #fff5f8; }
.card-img-placeholder { width: 100%; aspect-ratio: 4/3; margin-bottom: 2rem; border-radius: 40px; overflow: hidden; background: var(--color-pink-light); }
.card-video, .card-img-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.preset-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.preset-btn { padding: 1rem; border-radius: 20px; border: 2px solid var(--color-border); background: #fff; font-family: var(--font-accent); font-weight: 800; cursor: pointer; transition: var(--transition-fun); }
.preset-btn.active, .preset-btn:hover { background: var(--color-pink-light); border-color: var(--color-primary); }

/* Utilities */
.reveal { opacity: 0; transform: translateY(50px); transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.gallery-cta { margin-top: 3rem; }

/* Responsive */
@media (max-width: 992px) {
  .hero-content, .journey-row { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
  .hero-image-side { order: -1; max-width: 400px; margin: 0 auto; }
  .journey-row:nth-child(even) .journey-image { order: -1; }
  .hero h1 { font-size: 3.5rem; }
  .section { padding: 4rem 0; }
}

@media (max-width: 768px) {
  body { padding-top: 80px; }
  .hero h1 { font-size: 2.8rem; }
  .guestbook-form, .overlay-content { padding: 2.5rem; border-radius: 40px; }
  .donation-cards { grid-template-columns: 1fr; }
}
