:root {
  --primary-color: #1a6340;     /* Deeper green */
  --secondary-color: #ffc107;    /* More vibrant yellow */
  --light-primary: #e6f2ee;
  --light-secondary: #fff8e1;
  --dark-primary: #0e3e25;
  --dark-secondary: #ff9800;
  --text-color: #333;
  --light-text: #f8f9fa;
  --accent-color: #ff5722;      /* New accent for highlights */
  --gradient-start: #1a6340;
  --gradient-end: #2e8b57;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: #f8f9fa;
  color: var(--text-color);
}

/* Enhanced Navbar */
.navbar {
  background-color: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.navbar-brand:hover {
  color: var(--dark-primary);
}

.logo {
  max-height: 55px;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  margin-right: 12px;
}

.navbar-brand:hover .logo {
  transform: scale(1.1) rotate(5deg);
}

/* Dramatic Hero Section */
.hero-section {
  background: radial-gradient(ellipse at bottom, var(--light-primary) 0%, var(--light-secondary) 100%);
  min-height: 90vh;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('images/pattern.png');
  opacity: 0.06;
  animation: patternFloat 30s infinite linear;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  background: linear-gradient(to top, rgba(248, 249, 250, 0.8), transparent);
  pointer-events: none;
}

@keyframes patternFloat {
  0% { background-position: 0 0; }
  100% { background-position: 100px 100px; }
}

/* Improved Headline */
.cd-headline {
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 2.5rem;
  position: relative;
  font-size: 2.8rem;
  letter-spacing: -0.5px;
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
}

.cd-headline::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.cd-words-wrapper b {
  color: var(--dark-primary);
  font-weight: 900;
}

/* Elegant Search Container */
.search-container {
  margin: 3rem auto;
  max-width: 500px;
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.search-container input {
  width: 100%;
  padding: 20px 30px;
  border: 2px solid transparent;
  border-radius: 50px;
  font-size: 16px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  background-color: white;
  outline: none;
  transform: translateZ(0);
}

.search-container input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
  transform: translateY(-5px) translateZ(20px);
}

.search-container::before {
  content: '\F4A5'; /* Bootstrap icon search code */
  font-family: bootstrap-icons !important;
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 20px;
  opacity: 0.8;
  pointer-events: none;
  transition: all 0.3s ease;
}

.search-container:hover::before {
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

/* Fancy Button */
.custom-btn {
  background: linear-gradient(45deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  padding: 16px 45px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 10px 30px rgba(46, 139, 87, 0.4);
  transform: translateY(0);
}

.custom-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--secondary-color), var(--dark-secondary));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
}

.custom-btn:hover {
  color: white;
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(46, 139, 87, 0.5);
}

.custom-btn:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.custom-btn:active {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(46, 139, 87, 0.4);
}

.custom-btn span {
  position: relative;
  z-index: 2;
}

/* Improved Result Boxes */
.result-success {
  background: linear-gradient(145deg, white, #f7f9f8);
  border-left: 6px solid var(--primary-color);
  padding: 35px;
  border-radius: 16px;
  margin: 40px auto;
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 20px 40px rgba(46, 139, 87, 0.15), 0 0 0 1px rgba(46, 139, 87, 0.05);
  max-width: 600px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.result-success h4 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-left: 35px;
  font-size: 1.4rem;
}

.result-success h4::before {
  content: '\F270'; /* Bootstrap icon check-circle-fill */
  font-family: bootstrap-icons !important;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-color);
  font-size: 24px;
}

.result-error {
  background: linear-gradient(145deg, white, #f9f8f7);
  border-left: 6px solid var(--secondary-color);
  padding: 35px;
  border-radius: 16px;
  margin: 40px auto;
  animation: fadeInUp 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 20px 40px rgba(255, 215, 0, 0.15), 0 0 0 1px rgba(255, 215, 0, 0.05);
  max-width: 600px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.result-error h4 {
  color: var(--dark-secondary);
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-left: 35px;
  font-size: 1.4rem;
}

.result-error h4::before {
  content: '\F33A'; /* Bootstrap icon info-circle-fill */
  font-family: bootstrap-icons !important;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-color);
  font-size: 24px;
}

.highlight {
  background: linear-gradient(120deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 193, 7, 0.3) 100%);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--secondary-color);
  opacity: 0.5;
}

.event-info {
  background-color: var(--light-primary);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  border: 1px dashed var(--primary-color);
  position: relative;
  overflow: hidden;
}

.event-info::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
  opacity: 0.05;
  border-radius: 50%;
  transform: translate(50%, -50%);
}

.event-info p strong {
  color: var(--dark-primary);
}

.event-info i {
  color: var(--primary-color);
  opacity: 0.9;
}

/* Enhanced Footer */
.site-footer {
  background: linear-gradient(to bottom, #fdfdfd, #f8f9fa);
  padding: 70px 0 50px;
  box-shadow: 0 -4px 30px rgba(0,0,0,0.05);
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--primary-color));
}

.site-footer-title {
  color: var(--primary-color);
  font-weight: 700;
  position: relative;
  padding-bottom: 18px;
  font-size: 1.3rem;
}

.site-footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.footer-menu-item {
  list-style: none;
  padding: 12px 0;
  text-align: center;
}

.footer-menu-link {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 8px 20px;
  border-radius: 30px;
  font-weight: 500;
}

.footer-menu-link:hover {
  color: var(--primary-color);
  background-color: var(--light-primary);
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(46, 139, 87, 0.15);
}

.footer-menu-link-icon {
  color: var(--secondary-color);
  transition: all 0.3s ease;
}

.footer-menu-link:hover .footer-menu-link-icon {
  transform: scale(1.2);
}

.site-footer-link {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  padding: 5px 0;
  display: inline-block;
}

.site-footer-link:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.site-footer-link i {
  transition: all 0.3s ease;
}

.site-footer-link:hover i {
  transform: scale(1.2);
}

.social-icon {
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.social-icon-item {
  list-style: none;
}

.social-icon-link {
  width: 50px;
  height: 50px;
  background-color: var(--light-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 20px;
  position: relative;
  overflow: hidden;
}

.social-icon-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.social-icon-link i {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.social-icon-link:hover {
  transform: translateY(-8px) rotate(10deg);
  box-shadow: 0 10px 20px rgba(46, 139, 87, 0.3);
}

.social-icon-link:hover::before {
  opacity: 1;
}

.social-icon-link:hover i {
  color: white;
  transform: scale(1.2);
}

/* Animations */
@keyframes fadeInUp {
  from { 
      opacity: 0; 
      transform: translateY(30px); 
  }
  to { 
      opacity: 1; 
      transform: translateY(0); 
  }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Not Found Message */
#not-found {
  color: var(--primary-color);
  font-weight: 500;
  display: block;
  padding: 10px;
  margin-top: 10px;
  animation: fadeIn 0.5s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section {
      min-height: 80vh;
      padding: 50px 0;
  }
  
  .cd-headline {
      font-size: 2.2rem;
  }
  
  .search-container input {
      padding: 16px 25px;
  }
  
  .custom-btn {
      padding: 14px 35px;
  }
  
  .result-success,
  .result-error {
      padding: 25px;
  }
}

/* Floating Animation for Hero Content */
.hero-section .container {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Improve form error message */
#form-nim .error-message {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  display: block;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% {transform: translateX(0);}
  10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
  20%, 40%, 60%, 80% {transform: translateX(5px);}
}