:root {
  --primary: #185a9d;
  --primary-light: #43cea2;
  --background-light: #f8fafc;
  --background-medium: #e0e7ef;
  --accent: #20bfa9;
  --text-dark: #1a1a2e;
  --text-light: #e0e0e0;
  --text-muted: #a3a3a3;
  --highlight: #ffd700;
  --white: #fff;

  --header-gradient: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 100%);
  --header-gradient-light: linear-gradient(135deg, var(--background-light) 0%, var(--background-medium) 100%);
  --section-gradient: linear-gradient(135deg, var(--background-light) 0%, var(--background-medium) 100%);
}



/* Utility Classes */
.d-none { display: none !important; }
.mt-3 { margin-top: 1rem !important; }
.ml-2 { margin-left: 0.5rem !important; }

/* ==========================
   Logo Styling
   ========================== */
.logo {
  max-width: 120px;
  margin: 0.625rem;
  transition: transform 0.3s ease;
}
.logo:hover {
  transform: scale(1.1);
}

/* ==========================
   Header Styling
   ========================== */
.header {
  background-color: var(--text-dark);
  color: var(--text-light);
  padding: 0;
  text-align: center;
}
.header-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--text-dark);
}
.header-subtitle {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-muted);
}

/* ==========================
   Footer Styling
   ========================== */
footer {
  background: var(--text-dark);
  color: var(--text-light);
  font-size: 1rem;
  padding: 1.5rem 0 0.75rem 0;
  text-align: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
  letter-spacing: 0.02em;
  animation: fadeInUp 1s;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px);}
  to { opacity: 1; transform: translateY(0);}
}
.footer-icons {
  margin-bottom: 0.5rem;
}
.footer-icons i {
  font-size: 1.3rem;
  margin: 0 0.5rem;
  color: var(--highlight);
  transition: color 0.2s;
}
.footer-icons i:hover {
  color: var(--white);
}
footer a {
  color: var(--highlight);
  text-decoration: none;
  transition: color 0.2s;
  margin: 0 0.5rem;
}
footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* ==========================
   Navbar Styling
   ========================== */
.navbar-gradient {
  background: var(--header-gradient) !important;
}
.shadow-navbar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.navbar-nav .nav-link:hover {
  color: var(--highlight) !important;
  text-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: color 0.2s;
}
.navbar-custom {
  background-color: var(--text-dark);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
  color: var(--text-light);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.navbar-brand {
  font-size: 1.25rem;
}
.navbar-custom .nav-link:hover {
  color: var(--text-muted);
}
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255, 255, 255, 1)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.navbar-brand-title {
  color: var(--white);
  font-size: 1.7rem;
}
.navbar-brand-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* ==========================
   Card Styling
   ========================== */
.card {
  border-radius: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.card-img-top {
  max-height: 100px;
  width: auto;
  display: block;
  margin: 1.25rem auto 0 auto;
  object-fit: cover;
}
.card-title {
  color: var(--text-dark);
}
.card-text {
  color: var(--text-muted);
}

/* ==========================
   Map Styling
   ========================== */
#map {
  height: 500px;
  width: 100%;
  border: 2px solid var(--text-dark);
}
.custom-map {
  height: 400px;
  margin-top: 1.25rem;
  border: 2px solid var(--primary);
  border-radius: 0.5rem;
}
.visualisation-map {
  width: 100%;
  height: 600px;
  border-radius: 1rem;
  box-shadow: 0 2px 16px rgba(24,90,157,0.08);
  border: 1px solid var(--background-medium);
}

/* ==========================
   Table Styling
   ========================== */
.table {
  background-color: var(--primary);
  color: var(--text-light);
}
.table td,
.table th {
  vertical-align: middle;
  border-color: var(--text-dark);
}
.table-hover tbody tr:hover {
  background-color: var(--text-dark);
}

/* ==========================
   Button Styling
   ========================== */
.button-gap {
  margin-left: 0.625rem;
}
.btn-primary {
  background-color: var(--primary);
  border: 1px solid var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0.3125rem;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--white);
}
.btn-primary:active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.2);
}
.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(24, 90, 157, 0.5);
}
.btn-secondary {
  background-color: var(--text-muted);
  border-color: var(--text-muted);
  color: var(--text-dark);
}
.btn-secondary:hover {
  background-color: var(--text-light);
  border-color: var(--text-light);
  color: var(--text-dark);
}

/* Toggle Button Accessibility */
.btn-toggle:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn-toggle {
  margin-left: 0.5rem;
  background: var(--background-medium);
  border: none;
  color: var(--primary);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.btn-toggle:hover {
  background: var(--primary-light);
  color: var(--white);
}

/* ==========================
   Sidebar Styling
   ========================== */
#sidebar {
  background: var(--background-light);
  padding: 1.5rem 1rem;
  max-height: 90vh;
  overflow-y: auto;
  border-right: 1px solid var(--background-medium);
  border-radius: 1rem 0 0 1rem;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
}
.sidebar-section {
  background: var(--white);
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 1rem 1rem 0.5rem 1rem;
  margin-bottom: 1.5rem;
}
.sidebar-section h5 {
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================
   Collection List Styling
   ========================== */
.collection-item {
  border: 1px solid var(--background-medium);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  background: var(--background-light);
}
.collection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: var(--background-medium);
  border-radius: 0.5rem;
  padding: 0.5rem;
}
.collection-items {
  padding-left: 0.5rem;
}
.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
}
.item i {
  cursor: pointer;
  font-size: 1.2em;
  margin-left: 0.5rem;
  color: var(--primary-light);
  transition: color 0.2s;
}
.item i.active {
  color: var(--primary);
}

/* ==========================
   Miscellaneous
   ========================== */
.custom-bg {
  background-color: var(--text-dark);
  color: var(--white);
}
.list-group-item {
  background-color: var(--background-light);
  color: var(--text-dark);
}
.list-group-item.active {
  background-color: var(--text-dark);
  color: var(--white);
}
.small-tight { /* Review if used */
  margin-bottom: 0.2rem;
  line-height: 1.2;
}
.icon-gap { /* Review if used */
  margin-right: 0.5rem;
}
.back-to-top {
  bottom: 2rem;
  right: 2rem;
  z-index: 1050;
  opacity: 0.85;
  position: fixed;
}
.header-gradient {
  background: var(--header-gradient);
}
.section-gradient {
  background: var(--section-gradient);
}
.border-light {
  border-color: var(--background-medium) !important;
}
.custom-hr {
  border-top: 2px solid var(--background-medium);
}

/* ==========================
   Responsive Adjustments
   ========================== */
@media (max-width: 576px) {
  .logo {
    max-width: 80px;
  }
  .header-title {
    font-size: 2rem;
  }
  .header-subtitle {
    font-size: 1rem;
  }
  #sidebar {
    border-radius: 0;
    max-height: none;
    padding: 1rem 0.5rem;
  }
}

.custom-header-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
    min-height: 180px;
    background: var(--header-gradient-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.custom-header-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-dark);
}

.custom-header-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    opacity: 0.75;
    font-weight: 300;
}

