:root {
  --primary-color: #1c5daa;
  --secondary-color: #f8a01c;
  --light-color: #f0f7ff;
  --dark-color: #333;
  --font-family-primary: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-family-heading: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ===== BASE STYLES ===== */
body {
  font-family: var(--font-family-primary);
  background-color: #f9f9f9;
  line-height: 1.6;
  color: var(--dark-color);
  overflow-x: hidden;
}

/* ===== NAVBAR STYLES ===== */
.navbar {
  background: var(--primary-color) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
  z-index: 1030;
  transition: var(--transition);
}

.navbar-brand img {
  border-radius: 4px;
  height: 50px;
  transition: var(--transition);
}

.navbar-brand img:hover {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  color: white !important;
  padding: 8px 15px !important;
  border-radius: var(--border-radius);
  margin: 0 2px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--secondary-color);
}

/* Dropdown styling */
.dropdown-menu {
  background-color: white;
  border: 1px solid var(--primary-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  padding: 10px;
  margin-top: 8px;
  z-index: 1050;
}

.dropdown-item {
  color: var(--dark-color) !important;
  transition: var(--transition);
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 500;
}

.dropdown-item:hover {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  transform: translateX(5px);
}

.btn-outline-light {
  background-color: white;
  color: var(--primary-color);
  border-radius: 30px;
  padding: 8px 20px;
  font-weight: 600;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-outline-light:hover {
  background-color: var(--secondary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-color: white;
  color: var(--primary-color) !important;
}

/* Navbar Mobile Styles */
@media (max-width: 768px) {
  .navbar {
    padding: 8px 0;
  }

  .navbar-brand img {
    height: 40px;
  }

  .navbar-nav .nav-link {
    font-size: 0.9rem;
    text-align: center;
    padding: 10px !important;
    margin: 2px 0;
  }

  .btn-outline-light {
    padding: 6px 15px;
    font-size: 0.9rem;
    width: 100%;
    margin-top: 10px;
  }

  .dropdown-menu {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.95);
    margin-top: 5px;
  }
}

/* ===== FOOTER STYLES ===== */
footer {
  background: var(--primary-color) !important;
  color: #ffffff !important;
  padding-top: 50px;
  position: relative;
  font-family: var(--font-family-primary);
}

/* Reset semua warna teks di footer menjadi putih */
footer,
footer * {
  color: #ffffff !important;
}

.footer-content {
  padding: 10px 0;
}

/* COPYRIGHT SECTION */
.footer-copyright {
  font-size: 0.9rem;
  opacity: 0.9;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  margin-top: 30px;
  background: var(--primary-color) !important;
  color: #ffffff !important;
}

.social-icons a {
  transition: var(--transition);
  display: inline-block;
  color: #ffffff !important;
  margin-right: 15px;
  font-size: 1.3rem;
}

.social-icons a:hover {
  transform: translateY(-3px);
  color: var(--secondary-color) !important;
}

.footer-info-section {
  margin-bottom: 25px;
}

.footer-info-section h5 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  font-weight: 600;
  color: #ffffff !important;
  position: relative;
  padding-bottom: 10px;
  font-family: var(--font-family-heading);
}

.footer-info-section h5::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary-color);
}

.footer-info-section p {
  margin-bottom: 10px;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.95;
  color: #ffffff !important;
}

.footer-info-section strong {
  color: var(--secondary-color) !important;
  font-weight: 600;
}

.footer-info-section i {
  color: var(--secondary-color) !important;
  margin-right: 10px;
  width: 20px;
}

/* ===== MAP STYLES ===== */
.mini-map {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 15px;
  margin-top: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  height: 200px;
  overflow: hidden;
  transition: var(--transition);
}

.mini-map:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.2);
}

#footer-map,
#footer-map-mobile {
  height: 100%;
  width: 100%;
  border-radius: 5px;
  font-family: var(--font-family-primary);
}

/* Leaflet Map Customization */
.leaflet-container {
  background: rgba(255, 255, 255, 0.1) !important;
  font-family: var(--font-family-primary) !important;
  border-radius: 5px;
}

.leaflet-popup-content-wrapper {
  background: var(--primary-color);
  color: white;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content {
  font-family: var(--font-family-primary);
  font-size: 0.9rem;
  margin: 12px 15px;
}

.leaflet-popup-tip {
  background: var(--primary-color);
}

.leaflet-control-zoom a {
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
  font-family: var(--font-family-primary) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--secondary-color) !important;
}

.leaflet-marker-icon {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.map-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--secondary-color) !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  font-family: var(--font-family-primary);
}

.map-link:hover {
  text-decoration: underline;
  color: #ffffff !important;
}

/* Quick links in footer */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.95) !important;
  text-decoration: none;
  transition: var(--transition);
  display: block;
  padding: 8px 0;
  font-size: 1rem;
  font-family: var(--font-family-primary);
}

.footer-links a:hover {
  color: var(--secondary-color) !important;
  padding-left: 10px;
  transform: translateX(5px);
}

/* LOGO STYLES */
.footer-logo {
  margin-bottom: 20px;
  max-width: 200px;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Desktop Styles - Logo di kiri */
@media (min-width: 769px) {
  .footer-desktop {
    display: block;
  }

  .footer-mobile {
    display: none;
  }

  .footer-logo {
    margin-left: 0;
    margin-right: 0;
    display: block;
  }
}

/* Accordion untuk footer mobile */
.footer-accordion {
  margin-bottom: 20px;
}

.footer-accordion .accordion-item {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  margin-bottom: 10px;
}

.footer-accordion .accordion-button {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #ffffff !important;
  border: none;
  border-radius: var(--border-radius);
  padding: 15px 20px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: none !important;
  font-family: var(--font-family-heading);
}

.footer-accordion .accordion-button:not(.collapsed) {
  background: rgba(255, 255, 255, 0.25) !important;
  color: var(--secondary-color) !important;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.footer-accordion .accordion-button::after {
  filter: brightness(0) invert(1);
}

.footer-accordion .accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
}

.footer-accordion .accordion-body {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 20px;
  color: #ffffff !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-family-primary);
}

.footer-accordion .accordion-body a,
.footer-accordion .accordion-body p,
.footer-accordion .accordion-body h6 {
  color: #ffffff !important;
}

.footer-accordion .footer-links a {
  color: rgba(255, 255, 255, 0.95) !important;
  padding: 6px 0;
}

.footer-accordion .footer-links a:hover {
  color: var(--secondary-color) !important;
  padding-left: 8px;
}

/* Penyesuaian grid untuk footer */
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid .col-lg-3,
.footer-grid .col-lg-2,
.footer-grid .col-lg-4 {
  flex: 1;
  min-width: 0;
}

/* Penyesuaian untuk tampilan yang lebih rapat */
@media (min-width: 992px) {
  .footer-grid {
    gap: 15px;
  }

  .footer-grid .col-lg-2 {
    flex: 0 0 18%;
  }

  .footer-grid .col-lg-4 {
    flex: 0 0 30%;
  }

  .footer-grid .col-lg-3 {
    flex: 0 0 22%;
  }
}

/* Untuk layar lebih kecil */
@media (max-width: 992px) {
  .footer-grid {
    gap: 20px;
  }

  .footer-grid .col-lg-2,
  .footer-grid .col-lg-4,
  .footer-grid .col-lg-3 {
    flex: 0 0 48%;
    margin-bottom: 25px;
  }
}

/* Footer Mobile Styles */
@media (max-width: 768px) {
  footer {
    padding-top: 40px;
    background: var(--primary-color) !important;
  }

  .footer-info-section {
    text-align: left;
    margin-bottom: 25px;
  }

  .footer-info-section h5::after {
    left: 0;
    transform: none;
    width: 35px;
  }

  .footer-logo {
    margin: 0 0 20px 0 !important;
    display: block;
    max-width: 180px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
  }

  .social-icons {
    text-align: left;
    margin-top: 20px;
  }

  .social-icons a {
    margin: 0 12px 0 0;
    font-size: 1.5rem;
  }

  .footer-links {
    text-align: left;
  }

  .footer-links a {
    color: #ffffff !important;
    font-size: 1rem;
  }

  .footer-links a:hover {
    padding-left: 10px;
    transform: translateX(5px);
    color: var(--secondary-color) !important;
  }

  .mini-map {
    margin: 15px 0;
    max-width: 100%;
    height: 180px;
  }

  .footer-copyright {
    font-size: 0.9rem;
    padding: 25px 15px;
    background: var(--primary-color) !important;
    margin-top: 20px;
  }

  .footer-desktop {
    display: none;
  }

  .footer-mobile {
    display: block;
  }

  .footer-accordion {
    margin-top: 25px;
  }

  .footer-accordion .accordion-button {
    font-size: 1.05rem;
    padding: 18px 20px;
  }

  .footer-accordion .accordion-body {
    font-size: 0.95rem;
    padding: 25px 20px;
  }

  #footer-map-mobile {
    height: 180px !important;
  }

  .footer-grid .col-lg-3,
  .footer-grid .col-lg-2,
  .footer-grid .col-lg-4 {
    flex: 100%;
    min-width: 100%;
    margin-right: 0;
    margin-bottom: 30px;
  }

  .footer-mobile .footer-info-section p,
  .footer-mobile .footer-info-section h5 {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

/* ===== MAIN CONTENT STYLES ===== */
.main-content {
  min-height: calc(100vh - 200px);
  padding-top: 80px;
  font-family: var(--font-family-primary);
}

/* ===== TYPOGRAPHY ENHANCEMENTS ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-heading);
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 576px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .section-container {
    padding: 30px 0 !important;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #0d4a8a;
    --secondary-color: #e69500;
  }
}

/* ===== FINAL FIXES ===== */
footer,
footer *:not(.bi):not(.fa):not(i) {
  color: #ffffff !important;
}

footer a,
footer p,
footer h5,
footer h6,
footer li,
footer span,
footer div {
  color: #ffffff !important;
}

footer a:hover {
  color: var(--secondary-color) !important;
}

footer p,
footer .footer-description {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.footer-copyright {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
