:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --accent: #4895ef;
  --dark: #212529;
  --light: #f8f9fa;
  --success: #4cc9f0;
  --gradient: linear-gradient(135deg, var(--primary), var(--secondary));
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--dark);
  line-height: 1.7;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  padding: 10px 0;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--primary) !important;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.2rem;
  color: var(--dark) !important;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--primary) !important;
}

.hero-section {
  padding: 100px 0 50px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.carousel-item img {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel-control-prev, .carousel-control-next {
  width: 40px;
  height: 40px;
  background-color: rgba(67, 97, 238, 0.8);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
}

.carousel-control-prev {
  left: -20px;
}

.carousel-control-next {
  right: -20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
}

.section-title {
  position: relative;
  margin-bottom: 50px;
  text-align: center;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

.feature-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  margin-bottom: 30px;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-card .card-body {
  padding: 30px;
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 20px;
}

/* PERBAIKAN UNTUK PROGRAM CARD */
.program-card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  margin-bottom: 30px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Image Container for Portrait - DIPERBAIKI */
.image-container.portrait {
  width: 100%;
  height: auto; /* Biarkan mengikuti rasio gambar asli */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.image-container.portrait img {
  width: 100%;
  height: auto; /* Biarkan tinggi mengikuti lebar */
  object-fit: contain; /* Tampilkan gambar penuh tanpa crop */
  object-position: center;
  transition: all 0.5s ease;
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.program-card:hover .image-container.portrait img {
  transform: scale(1.05);
}

/* PERBAIKAN CARD BODY DAN BUTTON */
.program-card .card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.program-card .card-title {
  margin-bottom: 1rem;
  min-height: 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

.program-card .card-text {
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* STYLING BUTTON - DIPERBAIKI AGAR SELALU TERLIHAT */
.program-card .btn {
  margin-top: auto;
  width: 100%;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  text-align: center;
}

.btn-primary {
  background: var(--gradient);
  border: none;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  color: white !important;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
  color: white !important;
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-3px);
}

.testimonial-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 30px;
  margin-bottom: 30px;
}

.testimonial-card .stars {
  color: #ffc107;
  margin-bottom: 15px;
}

.contact-info {
  margin-bottom: 30px;
}

.contact-info i {
  font-size: 1.5rem;
  color: var(--primary);
  margin-right: 15px;
  vertical-align: middle;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
}

footer {
  background-color: var(--dark);
  color: white;
  padding: 50px 0 20px;
}

footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

footer a:hover {
  color: white;
  text-decoration: none;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 100px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #128c7e;
}

/* Modal Styling */
.modal-content {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  border-bottom: none;
}

.list-group-item {
  border-left: none;
  border-right: none;
  padding: 0.75rem 0;
}

.btn-close {
  font-size: 0.8rem;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 80px 0 30px;
  }
  
  .section-title {
    margin-bottom: 30px;
  }
  
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .carousel-control-prev {
    left: 0;
  }
  
  .carousel-control-next {
    right: 0;
  }
  
  .image-container.portrait {
    height: auto;
  }
  
  .program-card .card-title {
    min-height: auto;
    font-size: 1rem;
  }
  
  .whatsapp-float {
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 25px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}