/* ============================================
   WWWN UI Enhancements CSS
   Version: 2.0
   Based on PRD Section 8 Recommendations
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================ */
:root {
  /* Primary Colors */
  --color-primary: #7E3E97;
  --color-primary-light: #9B5AB4;
  --color-primary-dark: #5C2D70;
  
  /* Secondary Colors */
  --color-lavender: #CEB6D8;
  --color-lavender-light: #E8DDF0;
  
  /* New Accent Colors */
  --color-gold: #C9A227;
  --color-gold-light: #E0C05A;
  --color-deep-purple: #4A1C6B;
  --color-cream: #FFF8F0;
  
  /* Neutral Colors */
  --color-dark: #1e232b;
  --color-dark-secondary: #2a3040;
  --color-beige: #e0dad2;
  --color-white: #ffffff;
  --color-gray: #626974;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #7E3E97, #4A1C6B);
  --gradient-gold: linear-gradient(135deg, #C9A227, #E0C05A);
  --gradient-overlay: linear-gradient(180deg, rgba(30, 35, 43, 0.3) 0%, rgba(30, 35, 43, 0.7) 100%);
  
  /* Typography */
  --font-heading: 'Gilda Display', 'Cinzel', serif;
  --font-body: 'Inter', 'Montserrat', sans-serif;
  --font-script: 'Great Vibes', cursive;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 20px rgba(126, 62, 151, 0.3);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --color-bg: #1e1429;
  --color-bg-secondary: #2a1f38;
  --color-text: #f5f5f5;
  --color-text-muted: #b0a8b8;
  --color-border: #3d2e4a;
}

[data-theme="light"] {
  --color-bg: #ffffff;
  --color-bg-secondary: #f8f8f8;
  --color-text: #1e232b;
  --color-text-muted: #626974;
  --color-border: #e0dad2;
}

/* ============================================
   DARK MODE STYLES
   ============================================ */
body.dark-mode {
  background-color: var(--color-bg);
  color: var(--color-text);
}

body.dark-mode #Wrapper {
  background-color: #1e1429;
}

body.dark-mode .section {
  background-color: #1e1429;
}

body.dark-mode h1, 
body.dark-mode h2, 
body.dark-mode h3, 
body.dark-mode h4, 
body.dark-mode h5, 
body.dark-mode h6 {
  color: #f5f5f5;
}

body.dark-mode p {
  color: #b0a8b8;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 9999;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.dark-mode-toggle .icon-sun,
.dark-mode-toggle .icon-moon {
  font-size: 24px;
  color: white;
  line-height: 1;
}

/* Light mode: show moon, hide sun */
.dark-mode-toggle .icon-moon {
  display: inline-block;
}

.dark-mode-toggle .icon-sun {
  display: none;
}

/* Dark mode: show sun, hide moon */
body.dark-mode .dark-mode-toggle .icon-moon {
  display: none;
}

body.dark-mode .dark-mode-toggle .icon-sun {
  display: inline-block;
}

/* ============================================
   ENHANCED NAVIGATION
   ============================================ */
#Header {
  transition: background-color var(--transition-normal), 
              box-shadow var(--transition-normal),
              padding var(--transition-normal);
}

/* Transparent header on scroll */
.header-transparent #Top_bar {
  background-color: transparent !important;
}

.header-scrolled #Top_bar {
  background-color: rgba(255, 255, 255, 0.98) !important;
  box-shadow: var(--shadow-md);
}

body.dark-mode .header-scrolled #Top_bar {
  background-color: rgba(30, 20, 41, 0.98) !important;
}

/* Animated underline for nav items */
#menu .menu-main > li > a {
  position: relative;
  overflow: visible;
}

#menu .menu-main > li > a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal), left var(--transition-normal);
}

#menu .menu-main > li > a:hover::after,
#menu .menu-main > li.current-menu-item > a::after {
  width: 100%;
  left: 0;
}

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */
.hero-enhanced {
  position: relative;
  overflow: hidden;
}

/* Parallax effect */
.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: -1;
  will-change: transform;
}

/* Gradient overlay for better text readability */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-overlay);
  z-index: 1;
}

/* Animated text reveal */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  animation: textReveal 0.8s ease forwards;
}

@keyframes textReveal {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.text-reveal span:nth-child(1) { animation-delay: 0.1s; }
.text-reveal span:nth-child(2) { animation-delay: 0.2s; }
.text-reveal span:nth-child(3) { animation-delay: 0.3s; }
.text-reveal span:nth-child(4) { animation-delay: 0.4s; }
.text-reveal span:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */
.btn-enhanced {
  position: relative;
  overflow: hidden;
  padding: 14px 32px;
  border-radius: var(--radius-xl);
  font-family: var(--font-heading);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.btn-primary-enhanced {
  background: var(--gradient-primary);
  color: white;
  border: none;
}

.btn-primary-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary-enhanced {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary-enhanced:hover {
  background: var(--color-primary);
  color: white;
}

.btn-gold {
  background: var(--gradient-gold);
  color: var(--color-dark);
  border: none;
}

/* Ripple effect */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::before {
  width: 300px;
  height: 300px;
}

/* ============================================
   STATISTICS COUNTER SECTION
   ============================================ */
.stats-section {
  background: var(--gradient-primary);
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></svg>');
  background-size: 100px 100px;
  opacity: 0.5;
}

.stat-item {
  text-align: center;
  padding: var(--spacing-md);
  position: relative;
  z-index: 1;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: white;
  line-height: 1;
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.stat-icon {
  font-size: 2.5rem;
  color: var(--color-gold);
  margin-bottom: var(--spacing-sm);
}

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */
.testimonials-section {
  background-color: var(--color-cream);
  padding: var(--spacing-xl) 0;
}

body.dark-mode .testimonials-section {
  background-color: #2a1f38;
}

.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
}

body.dark-mode .testimonial-card {
  background: #3d2e4a;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.testimonial-card::before {
  content: '"';
  font-family: var(--font-script);
  font-size: 6rem;
  color: var(--color-lavender);
  position: absolute;
  top: 10px;
  left: 30px;
  line-height: 1;
}

.testimonial-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid var(--color-lavender);
  margin-bottom: var(--spacing-sm);
}

.testimonial-text {
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-dark);
  margin-bottom: var(--spacing-md);
}

body.dark-mode .testimonial-text {
  color: #f5f5f5;
}

.testimonial-author {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.testimonial-location {
  font-size: 0.9rem;
  color: var(--color-gray);
}

/* ============================================
   GALLERY ENHANCEMENTS
   ============================================ */
/* Filter Buttons */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.filter-btn {
  padding: 10px 24px;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-primary);
  color: white;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  transform: translateY(100%);
  transition: transform var(--transition-normal);
}

.gallery-item:hover .gallery-item-overlay {
  transform: translateY(0);
}

.gallery-item-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
}

.gallery-item-date {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ============================================
   FLOATING WHATSAPP BUTTON
   ============================================ */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: white;
}

.whatsapp-float .tooltip {
  position: absolute;
  right: 70px;
  background: var(--color-dark);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.whatsapp-float:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */
.form-enhanced .form-group {
  position: relative;
  margin-bottom: var(--spacing-md);
}

.form-enhanced input,
.form-enhanced textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  background: white;
}

body.dark-mode .form-enhanced input,
body.dark-mode .form-enhanced textarea {
  background: #2a1f38;
  border-color: #3d2e4a;
  color: #f5f5f5;
}

.form-enhanced input:focus,
.form-enhanced textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(126, 62, 151, 0.1);
}

/* Floating Labels */
.floating-label {
  position: relative;
}

.floating-label label {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: var(--color-gray);
  pointer-events: none;
  transition: all var(--transition-normal);
  background: white;
  padding: 0 4px;
}

body.dark-mode .floating-label label {
  background: #2a1f38;
}

.floating-label textarea ~ label {
  top: 20px;
  transform: translateY(0);
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label,
.floating-label textarea:focus ~ label,
.floating-label textarea:not(:placeholder-shown) ~ label {
  top: 0;
  font-size: 0.85rem;
  color: var(--color-primary);
}

/* Validation States */
.form-enhanced .is-valid {
  border-color: #28a745 !important;
}

.form-enhanced .is-invalid {
  border-color: #dc3545 !important;
}

.validation-message {
  font-size: 0.85rem;
  margin-top: 4px;
}

.validation-message.error {
  color: #dc3545;
}

.validation-message.success {
  color: #28a745;
}

/* ============================================
   CARD ENHANCEMENTS
   ============================================ */
.card-enhanced {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

body.dark-mode .card-enhanced {
  background: #2a1f38;
}

.card-enhanced:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Flip Card for Officials */
.flip-card {
  perspective: 1000px;
  height: 400px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.flip-card-front {
  background: white;
}

.flip-card-back {
  background: var(--gradient-primary);
  color: white;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--spacing-md);
}

/* ============================================
   ANIMATIONS (AOS-like)
   ============================================ */
[data-animate] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate="fade-down"] {
  transform: translateY(-40px);
}

[data-animate="fade-left"] {
  transform: translateX(40px);
}

[data-animate="fade-right"] {
  transform: translateX(-40px);
}

[data-animate="zoom-in"] {
  transform: scale(0.9);
}

[data-animate].animated {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* Staggered animations */
[data-animate-delay="100"] { transition-delay: 0.1s; }
[data-animate-delay="200"] { transition-delay: 0.2s; }
[data-animate-delay="300"] { transition-delay: 0.3s; }
[data-animate-delay="400"] { transition-delay: 0.4s; }
[data-animate-delay="500"] { transition-delay: 0.5s; }

/* ============================================
   DECORATIVE ELEMENTS
   ============================================ */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--spacing-lg) 0;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-lavender), transparent);
  max-width: 200px;
}

.section-divider-icon {
  padding: 0 var(--spacing-md);
  color: var(--color-primary);
  font-size: 1.5rem;
}

/* Scripture Quote Styling */
.scripture-quote {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-primary);
  text-align: center;
  padding: var(--spacing-lg);
  position: relative;
}

.scripture-quote::before,
.scripture-quote::after {
  content: '"';
  font-size: 4rem;
  color: var(--color-lavender);
  position: absolute;
}

.scripture-quote::before {
  top: 0;
  left: 20px;
}

.scripture-quote::after {
  bottom: 0;
  right: 20px;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 9997;
  padding: 8px 0;
  padding-bottom: env(safe-area-inset-bottom, 8px);
}

body.dark-mode .mobile-bottom-nav {
  background: #1e1429;
}

.mobile-bottom-nav ul {
  display: flex;
  justify-content: space-around;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-bottom-nav li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-gray);
  font-size: 0.7rem;
  padding: 6px 8px;
  transition: color var(--transition-normal);
}

.mobile-bottom-nav li a i {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.mobile-bottom-nav li a:hover,
.mobile-bottom-nav li a.active {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: block;
  }
  
  body {
    padding-bottom: 70px;
  }
  
  .whatsapp-float {
    bottom: 90px;
  }
  
  .dark-mode-toggle {
    bottom: 160px;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  z-index: 10000;
  transition: top var(--transition-normal);
}

.skip-link:focus {
  top: 0;
}

/* Focus states */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 992px) {
  .stat-number {
    font-size: 3rem;
  }
  
  .testimonial-card::before {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  :root {
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
  }
  
  .gallery-filters {
    gap: var(--spacing-xs);
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .scripture-quote {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-card {
    padding: var(--spacing-md);
  }
  
  .stats-section .row {
    gap: var(--spacing-md);
  }
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */
html {
  scroll-behavior: smooth;
}

/* ============================================
   LOADING SKELETON
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-title {
  height: 2rem;
  width: 60%;
  margin-bottom: 1rem;
}

.skeleton-image {
  aspect-ratio: 16/9;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .whatsapp-float,
  .dark-mode-toggle,
  .mobile-bottom-nav,
  #Top_bar {
    display: none !important;
  }
  
  body {
    padding-bottom: 0;
  }
}
