/* ==========================================================================
   ✨ Elwafa Center Modern UX/UI Enhancements Styling
   ========================================================================== */

/* 1. Global Scroll Animations (Intersection Observer)
   ========================================================================== */
.reveal-on-scroll {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform, opacity;
}

/* Slide Up Effect */
.reveal-on-scroll.slide-up {
  transform: translateY(40px);
}

/* Fade In Effect */
.reveal-on-scroll.fade-in {
  transform: none;
}

/* Slight Zoom In Effect */
.reveal-on-scroll.zoom-in {
  transform: scale(0.95) translateY(20px);
}

/* Active Class triggered by Intersection Observer */
.reveal-on-scroll.revealed {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* Ensure child elements trigger sequentially if staggered */
.reveal-container {
  display: flex;
}

/* 2. Modern Testimonial Slider / Carousel
   ========================================================================== */
.modern-testimonial-slider {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 30px auto;
  overflow: hidden;
  padding: 10px;
}

.testimonial-cards-container {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.modern-testimonial-card {
  min-width: 100%;
  box-sizing: border-box;
  padding: 45px 40px;
  background: #ffffff;
  border: 1px solid rgba(9, 107, 104, 0.06);
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(9, 107, 104, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
  transform: scale(0.97) translateZ(0);
  opacity: 0.1;
  backface-visibility: hidden;
}

.modern-testimonial-card.active {
  transform: scale(1) translateZ(0);
  opacity: 1;
}

.testimonial-quote-icon {
  position: absolute;
  top: 15px;
  right: 35px;
  font-size: 85px;
  color: rgba(9, 107, 104, 0.04);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.testimonial-text {
  font-size: 16px;
  line-height: 1.8;
  color: #374151; /* Charcoal gray for premium readability */
  margin-bottom: 30px;
  font-weight: 400;
  text-align: center;
  font-family: 'Hind', sans-serif;
}

.testimonial-author-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: auto;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #D4AF37; /* Gold accent border */
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.testimonial-author-name {
  font-size: 17px;
  font-weight: 700;
  color: #096b68; /* Brand navbar green */
  margin: 0 0 4px 0;
  font-family: 'Montserrat', sans-serif;
}

.testimonial-author-title {
  font-size: 13px;
  color: #6B7280; /* Soft secondary text */
  margin: 0;
  font-weight: 500;
  font-family: 'Hind', sans-serif;
}

/* Arrows Styling */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFF;
  border: 1px solid rgba(9, 107, 104, 0.1);
  color: #096b68;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.slider-arrow svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.slider-arrow:hover {
  background: #096b68;
  color: #FFF;
  border-color: #096b68;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(9, 107, 104, 0.15);
}

.prev-arrow {
  left: 10px;
}

.next-arrow {
  right: 10px;
}

/* Navigation Dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(9, 107, 104, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-dot.active {
  background: #096b68;
  width: 24px;
  border-radius: 4px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .modern-testimonial-card {
    padding: 30px 20px;
  }
  
  .testimonial-text {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
  }
  
  .slider-arrow {
    display: none; /* Swipe works on mobile, hiding arrows for cleaner interface */
  }
  
  .testimonial-avatar {
    width: 50px;
    height: 50px;
  }
  
  .testimonial-author-name {
    font-size: 15px;
  }
  
  .testimonial-author-title {
    font-size: 11px;
  }
}

/* 3. Modern Gallery Filtering System
   ========================================================================== */
.elementor-gallery-item {
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.elementor-gallery-item.gallery-hidden {
  opacity: 0 !important;
  transform: scale(0.8) translateY(20px) !important;
  pointer-events: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: none !important;
}

/* Flex layout toggle when filtering is active to override absolute grid positioning */
.elementor-gallery__container.is-filtered {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-start !important;
  align-content: flex-start !important;
  height: auto !important;
  min-height: unset !important;
  padding: 10px 0 !important;
}

.elementor-gallery__container.is-filtered .elementor-gallery-item:not(.gallery-hidden) {
  display: block !important;
  width: calc(16.66% - 10px) !important; /* 6 columns corresponding to original */
  margin: 5px !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
}

@media (max-width: 1024px) {
  .elementor-gallery__container.is-filtered .elementor-gallery-item:not(.gallery-hidden) {
    width: calc(25% - 10px) !important; /* 4 columns on tablets */
  }
}

@media (max-width: 768px) {
  .elementor-gallery__container.is-filtered .elementor-gallery-item:not(.gallery-hidden) {
    width: calc(50% - 10px) !important; /* 2 columns on mobile */
  }
}

/* 4. Center Align Testimonials when Avatar is Empty
   ========================================================================== */
.testimonial-author-profile.no-avatar {
  flex-direction: column !important;
  text-align: center !important;
}

.testimonial-author-profile.no-avatar .testimonial-meta {
  align-items: center !important;
  text-align: center !important;
}

/* 5. Live Search Results CSS
   ========================================================================== */
.search-results-overlay {
  display: none;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 320px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  margin: 20px auto 0 auto;
  padding: 12px;
  z-index: 10002;
  text-align: left;
  border: 1px solid rgba(9, 107, 104, 0.1);
}

.search-results-overlay.has-results {
  display: flex;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none !important;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: #f9fafb;
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.search-result-item:hover {
  background: rgba(9, 107, 104, 0.04);
  border-color: rgba(9, 107, 104, 0.1);
}

.search-result-title {
  font-size: 15px;
  font-weight: 700;
  color: #096b68 !important;
  margin: 0 0 4px 0 !important;
  font-family: 'Montserrat', sans-serif;
}

.search-result-desc {
  font-size: 12px;
  color: #4b5563 !important;
  margin: 0 !important;
  line-height: 1.5;
  font-family: 'Hind', sans-serif;
}

.search-no-results {
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  font-family: 'Hind', sans-serif;
}

/* Beautiful custom scrollbar for results list */
.search-results-overlay::-webkit-scrollbar {
  width: 6px;
}
.search-results-overlay::-webkit-scrollbar-track {
  background: transparent;
}
.search-results-overlay::-webkit-scrollbar-thumb {
  background: rgba(9, 107, 104, 0.2);
  border-radius: 3px;
}
.search-results-overlay::-webkit-scrollbar-thumb:hover {
  background: rgba(9, 107, 104, 0.4);
}

/* 6. Global Full-Screen Search Modal Layout Styles (Cross-Page Compatibility)
   ========================================================================== */
.elementor-search-form__container {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.92) !important; /* Elegant dark fallback */
  z-index: 99999 !important;
  justify-content: center !important;
  align-items: center !important;
  flex-direction: column !important;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  pointer-events: none;
}

.elementor-search-form__container.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Close button inside full screen */
.elementor-search-form__container .dialog-close-button {
  position: absolute !important;
  top: 40px !important;
  right: 40px !important;
  font-size: 36px !important;
  color: #ffffff !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  width: 48px !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
  opacity: 0.7;
}

.elementor-search-form__container .dialog-close-button:hover {
  transform: rotate(90deg) scale(1.15) !important;
  opacity: 1 !important;
}

.elementor-search-form__container .dialog-close-button svg {
  width: 32px !important;
  height: 32px !important;
  fill: #ffffff !important;
}

/* Fullscreen search form adjustments */
.elementor-search-form__container form {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 650px !important;
  margin: 0 auto !important;
}

.elementor-search-form__container .elementor-search-form__input {
  width: 90% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid #096b68 !important; /* Highlights with brand emerald green */
  color: #ffffff !important;
  font-size: 32px !important;
  text-align: center !important;
  padding: 12px 0 !important;
  outline: none !important;
  font-family: 'Montserrat', sans-serif !important;
  margin-top: 60px !important;
  transition: border-color 0.25s ease !important;
}

.elementor-search-form__container .elementor-search-form__input:focus {
  border-bottom-color: #D4AF37 !important; /* Highlight with brand gold when focused */
}

.elementor-search-form__container .elementor-search-form__input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

@media (max-width: 768px) {
  .elementor-search-form__container .elementor-search-form__input {
    font-size: 24px !important;
  }
  .elementor-search-form__container .dialog-close-button {
    top: 20px !important;
    right: 20px !important;
  }
}

/* 7. Search Content Type Badges Styling
   ========================================================================== */
.search-result-header {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 0 6px 0 !important;
  flex-wrap: wrap !important;
}

.search-result-badge {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  font-family: 'Montserrat', sans-serif !important;
  display: inline-block !important;
  line-height: 1.2 !important;
}

.search-result-badge.badge-halaman {
  background-color: #e0f2fe !important;
  color: #0369a1 !important;
}

.search-result-badge.badge-program {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}

.search-result-badge.badge-artikel {
  background-color: #fef3c7 !important;
  color: #b45309 !important;
}

.search-result-badge.badge-berita {
  background-color: #f3e8ff !important;
  color: #6b21a8 !important;
}


/* ==========================================================================
   🔍 Premium Custom Full-Screen Search Modal
   ========================================================================== */
.elwafa-search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 53, 51, 0.98); /* Luxury dark teal backdrop matching brand #096b68 */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.elwafa-search-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.elwafa-search-modal-content {
  width: 90%;
  max-width: 750px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 25px;
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.elwafa-search-modal-overlay.active .elwafa-search-modal-content {
  transform: translateY(0);
}

.elwafa-search-close-btn {
  position: absolute;
  top: -80px;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #ffffff;
}

.elwafa-search-close-btn:hover {
  background: #e2b43b; /* Gold brand color */
  transform: rotate(90deg) scale(1.1);
  color: #000000;
}

.elwafa-search-close-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.elwafa-search-form-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.elwafa-search-input {
  width: 100% !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 3px solid rgba(255, 255, 255, 0.15) !important;
  padding: 15px 0 !important;
  font-size: 32px !important;
  font-family: 'Outfit', 'Inter', 'Montserrat', sans-serif !important;
  color: #ffffff !important;
  outline: none !important;
  text-align: center !important;
  transition: border-color 0.3s ease !important;
}

.elwafa-search-input:focus {
  border-bottom-color: #e2b43b !important; /* Premium brand gold focal line */
}

.elwafa-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}

.elwafa-search-results {
  max-height: 55vh;
  overflow-y: auto;
  margin-top: 15px;
  padding-right: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.elwafa-search-result-item {
  display: block !important;
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 18px 24px !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  border-left: 4px solid #e2b43b !important;
  transition: all 0.25s ease !important;
}

.elwafa-search-result-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  transform: translateX(6px) !important;
}

.elwafa-search-result-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 6px !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.elwafa-search-result-title {
  color: #ffffff !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  font-family: 'Outfit', 'Inter', 'Montserrat', sans-serif !important;
}

.elwafa-search-result-badge {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  padding: 4px 10px !important;
  border-radius: 20px !important;
  letter-spacing: 0.5px !important;
  font-family: 'Outfit', 'Inter', sans-serif !important;
}

.elwafa-search-result-desc {
  color: rgba(255, 255, 255, 0.7) !important;
  font-size: 14px !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  font-family: 'Outfit', 'Inter', sans-serif !important;
}

.elwafa-badge-halaman {
  background: rgba(52, 152, 219, 0.2) !important;
  color: #5dade2 !important;
}

.elwafa-badge-program {
  background: rgba(46, 204, 113, 0.2) !important;
  color: #58d68d !important;
}

.elwafa-badge-artikel {
  background: rgba(243, 156, 18, 0.2) !important;
  color: #f5b041 !important;
}

.elwafa-badge-berita {
  background: rgba(155, 89, 182, 0.2) !important;
  color: #af7ac5 !important;
}

.elwafa-search-results::-webkit-scrollbar {
  width: 6px;
}

.elwafa-search-results::-webkit-scrollbar-track {
  background: transparent;
}

.elwafa-search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.elwafa-search-results::-webkit-scrollbar-thumb:hover {
  background: #e2b43b;
}

.elwafa-search-no-results {
  text-align: center !important;
  padding: 40px 20px !important;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 16px !important;
  font-family: 'Outfit', 'Inter', sans-serif !important;
}





