/* ========================================
   MENTAL HEALTH PORTAL - PREMIUM DESIGN
   Ultra Modern, Aesthetic, Professional
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Sora:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Premium Color Palette */
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --primary-light: #a78bfa;
  --secondary: #ec4899;
  --secondary-light: #f9a8d4;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --success: #10b981;
  --warning: #f59e0b;
  
  /* Sophisticated Neutrals */
  --bg-primary: #fefefe;
  --bg-secondary: #ffffff;
  --bg-dark: #0f172a;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.18);
  
  /* Premium Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 40px -5px rgba(0, 0, 0, 0.12), 0 10px 15px -3px rgba(0, 0, 0, 0.08);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow-purple: 0 0 30px rgba(124, 58, 237, 0.3);
  --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.3);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
  --radius-3xl: 2rem;
  --radius-full: 9999px;
}

/* ========================================
   RESET & BASE
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: #fafafa;
  background-image: 
    radial-gradient(at 0% 0%, rgba(124, 58, 237, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(236, 72, 153, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(167, 139, 250, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ========================================
   HERO SECTION - PREMIUM SLIDER
   ======================================== */

#hero {
  position: relative;
  margin-bottom: 4rem;
  z-index: 1;
}

#heroCarousel {
  border-radius: 0 0 3rem 3rem;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  position: relative;
}

#heroCarousel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  z-index: 1;
  pointer-events: none;
}

#heroCarousel .carousel-item {
  position: relative;
}

#heroCarousel .carousel-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

#heroCarousel .carousel-item img {
  filter: brightness(0.75) saturate(1.2);
  transition: transform 12s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#heroCarousel .carousel-item.active img {
  animation: slowZoom 12s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slowZoom {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.15) rotate(1deg); }
}

.carousel-caption {
  background: none;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4rem 2rem 3rem;
  z-index: 2;
  text-align: center;
}

.carousel-caption h1,
.carousel-caption h2 {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInScale 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.carousel-caption p {
  font-size: 1.15rem;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.95);
  max-width: 700px;
  margin: 0 auto;
  animation: fadeInScale 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.carousel-control-prev,
.carousel-control-next {
  width: 60px;
  height: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 3;
}

#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next {
  opacity: 1;
}

.carousel-control-prev {
  left: 2rem;
}

.carousel-control-next {
  right: 2rem;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

main.container {
  animation: fadeInContainer 0.8s ease-out;
}

@keyframes fadeInContainer {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   SECTION STYLING
   ======================================== */

section {
  scroll-margin-top: 100px;
  margin-bottom: var(--space-2xl);
  animation: sectionFadeIn 0.6s ease-out;
  animation-fill-mode: both;
}

section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section > div > h3.h4 {
  font-family: 'Sora', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

section > div > h3.h4::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
}

section > div > p.text-muted {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 500;
}

/* ========================================
   PREMIUM CARDS
   ======================================== */

.card {
  position: relative;
  border: none;
  background: var(--bg-secondary);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  border: 1px solid var(--border);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
  border-color: rgba(124, 58, 237, 0.2);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover::after {
  opacity: 1;
}

.card-img-top {
  border-radius: var(--radius-lg);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  object-fit: cover;
}

.card:hover .card-img-top {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(1.1) saturate(1.2);
}

.card-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.875rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.card:hover .card-title {
  color: var(--primary);
}

.card-body {
  padding: 1.75rem;
  position: relative;
  z-index: 1;
}

.card-text,
.text-muted {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ========================================
   PREMIUM BUTTONS
   ======================================== */

.btn {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4), var(--shadow-glow-purple);
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  position: relative;
  z-index: 1;
}

.btn-outline-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.btn-outline-primary:hover {
  color: white;
  border-color: var(--primary-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3);
}

.btn-outline-primary:hover::after {
  opacity: 1;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* ===== Quotes Section Override ===== */
#quotes {
  background: transparent;
}



/* ========================================
   ARTIKEL SECTION
   ======================================== */

#artikel .row {
  gap: 1.5rem 0;
}

#artikel .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#artikel .card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

#artikel .mt-auto {
  margin-top: auto !important;
}

/* ========================================
   VIDEO SECTION - 3D EFFECTS
   ======================================== */

#video .card {
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
  transform-style: preserve-3d;
  perspective: 1000px;
}

#video .ratio {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

#video .ratio::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#video .card:hover .ratio {
  box-shadow: var(--shadow-2xl);
  transform: translateZ(20px);
}

#video .card:hover .ratio::after {
  opacity: 1;
}

#video iframe {
  border: none;
  display: block;
}

/* ========================================
   QUIZ SECTION - PLAYFUL DESIGN
   ======================================== */

#kuis .card {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border-left: 5px solid var(--warning);
  position: relative;
  overflow: visible;
}

#kuis .card::before {
  background: linear-gradient(90deg, var(--warning) 0%, var(--secondary) 100%);
}

#kuis .card:hover {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left-width: 8px;
  box-shadow: var(--shadow-xl), 0 0 30px rgba(245, 158, 11, 0.3);
}

#kuis .card-title {
  color: #92400e;
}

#kuis .btn-outline-primary {
  border-color: var(--warning);
  color: #92400e;
}

#kuis .btn-outline-primary::after {
  background: linear-gradient(135deg, var(--warning) 0%, #f59e0b 100%);
}

#kuis .btn-outline-primary:hover {
  border-color: var(--warning);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

/* ========================================
   CHATBOT - GLASSMORPHISM
   ======================================== */

#chatbot {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: var(--radius-3xl);
  padding: 4rem 2rem;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-2xl), var(--shadow-glow-purple);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#chatbot::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  animation: pulseGlow 4s ease-in-out infinite;
}

#chatbot::after {
  content: '💬';
  position: absolute;
  font-size: 12rem;
  opacity: 0.08;
  top: 50%;
  right: 5%;
  transform: translateY(-50%) rotate(-15deg);
  animation: floatBubble 8s ease-in-out infinite;
  filter: blur(2px);
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }
}

@keyframes floatBubble {
  0%, 100% {
    transform: translateY(-50%) rotate(-15deg);
  }
  50% {
    transform: translateY(-55%) rotate(-10deg);
  }
}

#chatbot h3.h4 {
  color: white;
  font-size: 2.75rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

#chatbot h3.h4::after {
  background: white;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.4);
}

#chatbot p.text-muted {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.2rem;
  font-weight: 500;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

#chatbot .btn-primary {
  background: white;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.125rem;
  padding: 1rem 3rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

#chatbot .btn-primary:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* ========================================
   KONSULTAN - PREMIUM CARDS
   ======================================== */

#konsultan .card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#konsultan .card:hover {
  background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
  border-color: var(--primary-light);
  transform: translateY(-12px) scale(1.05);
  box-shadow: var(--shadow-xl), var(--shadow-glow-purple);
}

#konsultan img.rounded-circle {
  border: 4px solid var(--primary-light);
  box-shadow: var(--shadow-lg);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

#konsultan .card::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 50%;
  filter: blur(20px);
}

#konsultan .card:hover::before {
  opacity: 0.6;
}

#konsultan .card:hover img.rounded-circle {
  transform: scale(1.15) rotate(5deg);
  border-color: var(--primary);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(124, 58, 237, 0.4);
}

#konsultan h5.fw-semibold {
  font-family: 'Sora', sans-serif;
   color: #696FC7; /* ubah di sini */
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

#konsultan .card:hover h5.fw-semibold {
  color: var(--primary);
}

#konsultan p.small {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

#konsultan .btn-outline-primary {
  margin-top: 1rem;
  font-size: 0.9rem;
  padding: 0.625rem 1.75rem;
}

/* ========================================
   STATISTIK - ANIMATED COUNTER
   ======================================== */

#statistik .card {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: none;
  position: relative;
  overflow: hidden;
  padding: 3rem 2rem;
}

#statistik .card::before {
  content: '📊';
  position: absolute;
  font-size: 15rem;
  opacity: 0.08;
  top: 50%;
  right: -3rem;
  transform: translateY(-50%) rotate(-10deg);
  animation: floatStats 6s ease-in-out infinite;
}

@keyframes floatStats {
  0%, 100% {
    transform: translateY(-50%) rotate(-10deg);
  }
  50% {
    transform: translateY(-55%) rotate(-5deg);
  }
}

#statistik h3.display-6 {
  font-family: 'Sora', sans-serif;
  color: var(--primary);
  font-weight: 800;
  font-size: 4.5rem;
  margin-bottom: 0.75rem;
  text-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  letter-spacing: -0.03em;
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#statistik p.text-muted {
  color: var(--text-primary) !important;
  font-size: 1.25rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* ========================================
   FOOTER - ELEGANT
   ======================================== */

footer {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  margin-top: 6rem;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 20px -5px rgba(0, 0, 0, 0.05);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
}

footer small {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ========================================
   MODAL - PREMIUM
   ======================================== */

.modal-content {
  border: none;
  box-shadow: var(--shadow-2xl);
  border-radius: var(--radius-3xl);
  overflow: hidden;
  border: 1px solid var(--border);
}

.modal-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

#contentModalFrame {
  border: none;
  width: 100%;
  height: 75vh;
  background: white;
  display: block;
}

.modal-header::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  animation: pulseGlow 3s ease-in-out infinite;
}

.modal-title {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.btn-close:hover {
  opacity: 1;
  transform: rotate(90deg) scale(1.1);
}

.modal-body {
  padding: 0;
  background: var(--bg-primary);
}

#contentModalFrame {
  border: none;
  width: 100%;
  height: 75vh;
  background: white;
  display: block;
}

.modal.fade .modal-dialog {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-dialog {
  transform: scale(1);
}

/* ========================================
   HOVER EFFECTS & UTILITIES
   ======================================== */

.hover-shadow {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-shadow:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow {
  box-shadow: 0 0 20px currentColor;
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--bg-primary);
}

/* ========================================
   LOADING STATES
   ======================================== */

.loading {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 100;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   MICRO INTERACTIONS
   ======================================== */

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    left: 100%;
  }
}

.pulse-border {
  position: relative;
}

.pulse-border::after {
  content: '';
  position: absolute;
  inset: -4px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: inherit;
  opacity: 0;
  z-index: -1;
  animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

/* ========================================
   BADGE & TAGS
   ======================================== */

.badge {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.badge-secondary {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
  color: white;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
  section > div > h3.h4 {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 2rem;
    --space-2xl: 3rem;
  }
  
  section > div > h3.h4 {
    font-size: 1.75rem;
  }
  
  section > div > h3.h4::after {
    width: 60px;
    height: 4px;
    bottom: -10px;
  }
  
  .carousel-caption {
    padding: 2rem 1rem 1.5rem;
  }
  
  .carousel-caption h1 {
    font-size: 1.75rem;
  }
  
  .carousel-caption h2 {
    font-size: 1.5rem;
  }
  
  .carousel-caption p {
    font-size: 0.95rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .card-title {
    font-size: 1.125rem;
  }
  
  #chatbot {
    padding: 3rem 1.5rem;
  }
  
  #chatbot h3.h4 {
    font-size: 2rem;
  }
  
  #chatbot p.text-muted {
    font-size: 1rem;
  }
  
  #chatbot::after {
    font-size: 8rem;
    right: -2rem;
  }
  
  #statistik h3.display-6 {
    font-size: 3rem;
  }
  
  #statistik p.text-muted {
    font-size: 1rem;
  }
  
  .btn {
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 50px;
    height: 50px;
  }
  
  .carousel-control-prev {
    left: 1rem;
  }
  
  .carousel-control-next {
    right: 1rem;
  }
}

@media (max-width: 576px) {
  #heroCarousel {
    border-radius: 0 0 1.5rem 1.5rem;
  }
  
  section {
    margin-bottom: var(--space-xl);
  }
  
  section > div > h3.h4 {
    font-size: 1.5rem;
  }
  
  section > div > p.text-muted {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .card {
    border-radius: var(--radius-xl);
  }
  
  .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8rem;
  }
  
  #chatbot {
    padding: 2.5rem 1rem;
    border-radius: var(--radius-2xl);
  }
  
  #chatbot h3.h4 {
    font-size: 1.75rem;
  }
  
  #chatbot .btn-primary {
    font-size: 1rem;
    padding: 0.875rem 2rem;
  }
  
  #statistik .card {
    padding: 2rem 1rem;
  }
  
  #statistik h3.display-6 {
    font-size: 2.5rem;
  }
  
  #konsultan img.rounded-circle {
    width: 80px !important;
    height: 80px !important;
  }
  
  footer {
    margin-top: 4rem;
    padding: 2rem 0;
  }
  
  .modal-header {
    padding: 1.5rem;
  }
  
  .modal-title {
    font-size: 1.25rem;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  body {
    background: white;
  }
  
  .carousel-control-prev,
  .carousel-control-next,
  .btn,
  footer,
  .modal {
    display: none !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    page-break-inside: avoid;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.btn:focus,
.card:focus,
a:focus,
button:focus {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2);
}

.btn:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ========================================
   DARK MODE SUPPORT (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.1);
  }
  
  body {
    background: #0f172a;
    color: var(--text-primary);
  }
  
  .card {
    background: var(--bg-secondary);
    border-color: var(--border);
  }
  
  footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  }
}

/* ========================================
   ANIMATION DELAYS FOR STAGGER EFFECT
   ======================================== */

.row > [class*='col']:nth-child(1) .card { animation-delay: 0.1s; }
.row > [class*='col']:nth-child(2) .card { animation-delay: 0.2s; }
.row > [class*='col']:nth-child(3) .card { animation-delay: 0.3s; }
.row > [class*='col']:nth-child(4) .card { animation-delay: 0.4s; }
.row > [class*='col']:nth-child(5) .card { animation-delay: 0.5s; }
.row > [class*='col']:nth-child(6) .card { animation-delay: 0.6s; }

.card {
  animation: cardFadeIn 0.6s ease-out backwards;
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========================================
   SPECIAL EFFECTS
   ======================================== */

.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Fix modal freeze (Bootstrap + background-attachment fixed conflict) */
body.modal-open {
  background: #fafafa !important; /* fallback plain background */
  background-attachment: scroll !important;
}


body.modal-open main {
  pointer-events: auto;
  filter: blur(0);
  transition: none;
}


/* === Bootstrap Modal Fix (Tailwind-compatible) === */
.modal-backdrop.show {
  opacity: 0.5 !important;
}

.modal.show .modal-dialog {
  display: block !important;
  transform: scale(1);
  transition: all 0.3s ease;
}

body.modal-open {
  overflow: hidden !important;
  background-attachment: scroll !important;
}

#reviewModal {
  z-index: 1060 !important;
  pointer-events: auto !important;
}
.modal-backdrop {
  z-index: 1050 !important;
}

#chatbotModal {
  z-index: 1070 !important;
}

