/* Custom CSS untuk animasi dan styling tambahan */
:root {
  --primary-light: #e6f3ff;
  --primary: #4a90e2;
  --primary-dark: #2c6cb0;
  --accent: #ff6b6b;
  --text-light: #333333;
  --text-dark: #e2e8f0;
  --bg-light: #f8fafc;
  --bg-dark: #1a202c;
  --card-light: #ffffff;
  --card-dark: #2d3748;
  --nav-light: #4a90e2;
  --nav-dark: #1a202c;
  --footer-light: #2c6cb0;
  --footer-dark: #171923;
}

.light-mode {
  --primary-color: var(--primary-light);
  --secondary-color: var(--primary);
  --accent-color: var(--accent);
  --text-color: var(--text-light);
  --bg-color: var(--bg-light);
  --card-color: var(--card-light);
  --nav-color: var(--nav-light);
  --footer-color: var(--footer-light);
}

.dark-mode {
  --primary-color: #1a202c;
  --secondary-color: #2d3748;
  --accent-color: #fc8181;
  --text-color: var(--text-dark);
  --bg-color: var(--bg-dark);
  --card-color: var(--card-dark);
  --nav-color: var(--nav-dark);
  --footer-color: var(--footer-dark);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s ease;
  overflow-x: hidden;
}

/* Hero Section dengan gradiasi merah-ungu dan efek paralax */
.hero-section {
  background: linear-gradient(
      135deg,
      rgba(255, 107, 107, 0.9) 0%,
      rgba(220, 38, 38, 0.85) 40%,
      rgba(147, 51, 234, 0.8) 100%
    ),
    url("../img/bg-img.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  cursor: none;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,192C1248,192,1344,128,1392,96L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: cover;
  background-position: bottom;
  opacity: 0.7;
}

.dark-mode .hero-section {
  background: linear-gradient(
      135deg,
      rgba(185, 28, 28, 0.9) 0%,
      rgba(153, 27, 27, 0.85) 40%,
      rgba(107, 33, 168, 0.8) 100%
    ),
    url("https://images.unsplash.com/photo-1588666309990-d68f08e3d4a6?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Kecamatan Tomohon Tengah dengan kontras tinggi */
.kecamatan-title {
  background: linear-gradient(135deg, #ffffff 0%, #fef3c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.dark-mode .kecamatan-title {
  background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.map-container {
  height: 500px;
  width: 100%;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px 0 rgba(239, 68, 68, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px 0 rgba(239, 68, 68, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 2px solid white;
  color: white;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: white;
  color: #9333ea;
}

.dark-mode .btn-secondary:hover {
  color: #1a202c;
}

.nav-bg {
  background: linear-gradient(135deg, #4a90e2 0%, #9333ea 100%);
  backdrop-filter: blur(10px);
}

.card-bg {
  background-color: var(--card-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card-bg:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.section-bg {
  background-color: var(--primary-color);
  position: relative;
  overflow: hidden;
}

/* Background dengan SVG untuk section informasi */
.info-section-bg {
  position: relative;
  overflow: hidden;
}

.info-section-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%234a90e2" fill-opacity="0.1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,192C672,181,768,139,864,138.7C960,139,1056,181,1152,197.3C1248,213,1344,203,1392,197.3L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%239333ea" fill-opacity="0.05" d="M0,160L48,149.3C96,139,192,117,288,128C384,139,480,181,576,176C672,171,768,117,864,101.3C960,85,1056,107,1152,112C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: cover, cover;
  background-position: bottom, top;
  background-repeat: no-repeat;
}

.dark-mode .info-section-bg::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23fc8181" fill-opacity="0.1" d="M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,192C672,181,768,139,864,138.7C960,139,1056,181,1152,197.3C1248,213,1344,203,1392,197.3L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>'),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%237c3aed" fill-opacity="0.05" d="M0,160L48,149.3C96,139,192,117,288,128C384,139,480,181,576,176C672,171,768,117,864,101.3C960,85,1056,107,1152,112C1248,117,1344,107,1392,101.3L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
}

.footer-bg {
  background: linear-gradient(135deg, #2c6cb0 0%, #7c3aed 100%);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #4a90e2 0%, #9333ea 100%);
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, #dc2626 0%, #9333ea 100%);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.dark-mode .leaflet-popup-content-wrapper {
  background-color: var(--card-dark);
  color: var(--text-dark);
}

.dark-mode .leaflet-popup-tip {
  background-color: var(--card-dark);
}

html {
  scroll-behavior: smooth;
}

/* Floating Elements untuk efek 3D */
.floating {
  animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
  0% {
    transform: translate(0, 0px);
  }
  50% {
    transform: translate(0, -15px);
  }
  100% {
    transform: translate(0, 0px);
  }
}

.floating-delay-1 {
  animation-delay: 1s;
}

.floating-delay-2 {
  animation-delay: 2s;
}

.floating-delay-3 {
  animation-delay: 3s;
}

/* Efek paralax untuk section */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Glowing effect untuk card */
.glow-card {
  position: relative;
  overflow: hidden;
}

.glow-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  background-size: 400%;
  z-index: -1;
  filter: blur(20px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-card:hover::before {
  opacity: 1;
  animation: glowing 20s linear infinite;
}

@keyframes glowing {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* Animasi teks mengetik */
.typewriter {
  overflow: hidden;
  border-right: 0.15em solid #ef4444;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: #ef4444;
  }
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #ef4444 0%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ef4444 0%, #9333ea 100%);
  border-radius: 10px;
}

.dark-mode ::-webkit-scrollbar-track {
  background: #2d3748;
}

.dark-mode ::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #dc2626 0%, #7c3aed 100%);
}

/* Animasi serpihan kursor */
.cursor-particle {
  position: absolute;
  pointer-events: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  animation: particle-animation 1s ease-out forwards;
  z-index: 100;
}

@keyframes particle-animation {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Judul peta dengan kontras tinggi */
.map-title {
  background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark-mode .map-title {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* SOP Section */
.sop-step {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2rem;
}

.sop-step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #9333ea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.sop-step-1::before {
  content: "1";
}
.sop-step-2::before {
  content: "2";
}
.sop-step-3::before {
  content: "3";
}
.sop-step-4::before {
  content: "4";
}
.sop-step-5::before {
  content: "5";
}
/* Custom keyframes for floating logo & foto */
@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}
.hero-float {
  animation: floatY 6s ease-in-out infinite;
}
.hero-foto {
  animation: floatY 7s ease-in-out infinite;
}
/* Gradient text fade */
@keyframes gradientX {
  0%,
  100% {
    background-position: left;
  }
  50% {
    background-position: right;
  }
}
.animate-gradientX {
  background-size: 200% 100%;
  animation: gradientX 8s ease-in-out infinite;
}
/* Entrance Animations */
@keyframes fadeinDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fadeinDown {
  animation: fadeinDown 1.2s 0.1s both;
}
@keyframes fadeinUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fadeinUp {
  animation: fadeinUp 1s both;
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.animate-slideInRight {
  animation: slideInRight 1.2s both;
}
/* Abstract blobs */
@keyframes blob {
  0%,
  100% {
    border-radius: 60% 40% 42% 58% / 45% 55% 60% 40%;
  }
  33% {
    border-radius: 45% 55% 60% 40% / 60% 40% 42% 58%;
  }
  66% {
    border-radius: 56% 44% 44% 56% / 56% 44% 62% 38%;
  }
}
.animate-blob1 {
  animation: blob 12s infinite linear;
}
.animate-blob2 {
  animation: blob 8s 2s infinite linear;
}
/* Modern shadow for hero-title */
.hero-title {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.14);
}
.animate-spin-slow {
  animation: spin 4.5s linear infinite;
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
