/* Additional Custom Styles for Perumda Pancuran Telago */

/* Advanced 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);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Animated elements */
.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.pulse-animation {
  animation: pulse 2s infinite;
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Loading spinner */
.loading-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}

.toast {
  background: white;
  border-left: 4px solid var(--primary-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 10px;
  min-width: 300px;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left-color: #28a745;
}

.toast.error {
  border-left-color: #dc3545;
}

.toast.warning {
  border-left-color: #ffc107;
}

/* Form enhancements */
.form-floating {
  position: relative;
}

.form-floating input,
.form-floating textarea {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

.form-floating input:focus,
.form-floating textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(46, 134, 171, 0.25);
}

/* Card hover effects */
.hover-card {
  transition: all 0.3s ease;
  cursor: pointer;
}

.hover-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Progress bars */
.progress-custom {
  height: 8px;
  border-radius: 10px;
  background: #e9ecef;
  overflow: hidden;
}

.progress-bar-custom {
  height: 100%;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color)
  );
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* Modal enhancements */
.modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modal-header {
  border-bottom: 1px solid #e9ecef;
  border-radius: 15px 15px 0 0;
}

.modal-footer {
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 15px 15px;
}

/* Accordion styles */
.accordion-button {
  background: white;
  border: none;
  box-shadow: none;
  font-weight: 600;
  color: var(--dark-gray);
  border-radius: 10px !important;
}

.accordion-button:not(.collapsed) {
  background: var(--light-blue);
  color: var(--primary-color);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(46, 134, 171, 0.25);
}

.accordion-body {
  background: #f8f9fa;
  border-radius: 0 0 10px 10px;
}

/* Timeline styles */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding-left: 40px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--primary-color);
}

/* Utility classes */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.text-secondary-custom {
  color: var(--secondary-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
  background-color: var(--secondary-color) !important;
}

.bg-light-blue {
  background-color: var(--light-blue) !important;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: black;
  }

  .container {
    width: 100% !important;
    max-width: none !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --secondary-color: #800080;
    --accent-color: #ff6600;
    --dark-gray: #000000;
  }

  .btn-outline-primary {
    border-color: #000080;
    color: #000080;
  }
}

/* Reduced motion */
@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;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .dark-mode-support {
    --dark-gray: #ffffff;
    --light-gray: #2d2d2d;
    background-color: #1a1a1a;
    color: white;
  }

  .dark-mode-support .navbar {
    background: #2d2d2d !important;
  }

  .dark-mode-support .service-card,
  .dark-mode-support .news-card,
  .dark-mode-support .contact-info {
    background: #2d2d2d;
    color: white;
  }
}
