/* === Basis reset en structuur === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  line-height: 1.5;
  color: #333;
}

/* === Typography (based on HBM styling) === */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 1rem 0;
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 991px) {

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    letter-spacing: 0;
  }
}

h1 {
  font-size: 4rem;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  h1 {
    font-size: 3rem;
  }
}

h2 {
  font-size: 3rem;
}

@media (max-width: 479px) {
  h2 {
    font-size: 2.5rem;
    margin: 1rem 0;
  }
}

h3 {
  font-size: 2rem;
}

h4 {
  font-size: 1.5rem;
  font-weight: 400;
}

h5 {
  font-size: 1.5rem;
  color: rgb(38, 123, 41);
}

h6 {
  font-size: 1.25rem;
}

p,
li,
span {
  font-size: 1rem;
  line-height: 1.5;
  margin: 0.5rem 0;
}

a {
  color: rgb(38, 123, 41);
  transition: color 0.2s;
}

a:hover {
  color: #267b29;
}

strong {
  font-weight: 700;
}

em {
  font-style: italic;
}

ul:not(.navbar-nav) li {
  font-size: 1rem;
  margin: 0.5rem 0;
}

.subheader {
  font-size: 2rem;
  font-weight: 400;
  margin: 0;
}

@media (max-width: 479px) {
  .subheader {
    font-size: 1.25rem;
  }
}

blockquote {
  max-width: 44rem;
  border-left: 0.75rem solid rgb(38, 123, 41);
  padding-left: 1rem;
  margin: 2rem 0;
}

blockquote p {
  font-size: 2rem;
  line-height: 1.2;
  color: rgb(38, 123, 41);
}

@media (max-width: 575px) {
  blockquote p {
    font-size: 1.1rem;
  }
}

/* === Links === */
a {
  text-decoration: none;
  color: inherit;
}

#desktopNav a,
#menuOverlay a {
  text-decoration: none;
}

/* === Branding === */
#branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#branding #logo {
  height: 4rem
}

#interreg-logo {
  height: 150px;
  width: auto;
  object-fit: contain;
  position: absolute;
  right: 20px;
  top: 0px;
  background-color: rgb(244, 244, 244);
  box-shadow: .4275rem .6875rem .75rem rgba(0, 0, 0, .098);
  z-index: 1100;
}

@media (max-width: 768px) {
  #interreg-logo {
    height: 32px;
    max-width: 100px;
  }

  #branding {
    flex-wrap: wrap;
  }

  .logo-link {
    gap: 0.5rem;
  }
}

@media (max-width: 479px) {
  #interreg-logo {
    height: 28px;
    max-width: 80px;
  }
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.logo-link:hover {
  opacity: 0.8;
}

/* === Header === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 180px;
  /* Make space for Interreg logo */
}

#hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #000;
  margin-left: auto;
}

#desktopNav {
  display: none;
  gap: 1rem;
  margin-right: 310px;
}

@media (min-width: 769px) {
  #desktopNav {
    display: flex;
  }

  #hamburger {
    display: none;
  }
}

@media (max-width: 768px) {
  header {
    justify-content: space-between;
    align-items: center;
  }

  #hamburger {
    order: 3;
    margin-left: auto;
    margin-right: 0;
  }

  #branding {
    order: 1;
    flex: 1;
  }

  .header-controls {
    order: 2;
    margin-right: 0;
  }
}

#desktopNav a {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

#desktopNav a:hover {
  background: rgba(38, 123, 41, 0.1);
  color: rgb(38, 123, 41);
}

#desktopNav a.active {
  background: rgb(38, 123, 41);
  color: #fff;
}

#menuOverlay {
  padding-top: 4rem;
  /* Make room for close button */
}

#menuOverlay a {
  display: block;
  margin: 1rem 0;
  font-size: 1.2rem;
}

#menuOverlay a:hover {
  color: rgb(38, 123, 41);
}

#menuOverlay a.active {
  font-weight: bold;
  color: rgb(38, 123, 41);
}

/* === Overlay panels === */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: 0.3s;
  overflow: auto;
  z-index: 9000;
  padding: 2rem;
}

#menuOverlay.open {
  transform: translateX(0);
}

#filterOverlay {
  transform: translateX(-100%);
  z-index: 9000;
}

#filterOverlay.open {
  transform: translateX(0);
}

/* === Buttons === */
button {
  cursor: pointer;
  border-radius: 4px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  padding: 0.25rem;
  transition: border-color 0.2s;
}

.search-container:focus-within {
  border-color: rgb(38, 123, 41);
}

.search-container input {
  border: none;
  outline: none;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  background: transparent;
  min-width: 200px;
  flex: 1;
}

.search-container button {
  background: rgb(38, 123, 41);
  color: white;
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.search-container button:hover {
  background: #267b29;
}

.search-container button .search-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: white;
  margin: 1px;
}

/* Language switcher styles */
.language-switcher {
  position: relative;
  margin-right: 1rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn span {
  margin: 0;
}

.lang-btn:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  z-index: 1000;
  display: none;
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background-color 0.2s ease;
}

.lang-dropdown a:hover {
  background: #f5f5f5;
}

.lang-dropdown a:first-child {
  border-radius: 6px 6px 0 0;
}

.lang-dropdown a:last-child {
  border-radius: 0 0 6px 6px;
}

.language-selector select {
  padding: 0.5rem;
  border: 2px solid rgb(38, 123, 41);
  border-radius: 4px;
  font-size: 0.9rem;
  background: #fff;
}

.menu-language-selector {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.menu-language-selector strong {
  display: block;
  margin-bottom: 0.5rem;
  color: rgb(38, 123, 41);
}

.menu-language-selector select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid rgb(38, 123, 41);
  border-radius: 4px;
  font-size: 1rem;
  background: #fff;
  color: #333;
}

.menu-language-selector select:focus {
  outline: none;
  border-color: #267b29;
}

.mobile-interreg-logo {
  margin-top: 0px;
  padding-top: 2rem;
  text-align: center;
  border-top: 1px solid #eee;
  display: none;
}

.mobile-interreg-logo img {
  height: auto;
  width: 250px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .mobile-interreg-logo {
    display: block;
  }

  .interreg-logo {
    display: none
  }

  #menuOverlay {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 769px) and (max-width: 1600px) {
  #desktopNav {
    margin-right: 190px;
  }

  #interreg-logo {
    height: 90px;
  }
}

.map-controls {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.map-controls-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.map-controls>button,
.map-controls-row>button {
  background: rgb(38, 123, 41);
  color: #fff;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.map-controls>button:hover,
.map-controls-row>button:hover {
  background: #267b29;
}

.filter-dropdown {
  position: relative;
  display: flex;
}

.filter-dropdown>button {
  background: #fff;
  color: #000;
  border: none;
  padding: 0.75rem 0.75rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-dropdown>button:hover {
  background: rgb(233, 242, 233);
  color: rgb(38, 123, 41);
}

.filter-dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  min-width: 250px;
  margin-bottom: 0.5rem;
  z-index: 1200;
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem 0;
}

.filter-dropdown.open .filter-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-dropdown-menu li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e9ecef;
}

.filter-dropdown-menu li:last-child {
  border-bottom: none;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: #333;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-radius: 0;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
  color: #333;
}

.filter-dropdown-menu li:first-child .dropdown-item {
  border-radius: 4px 4px 0 0;
}

.filter-dropdown-menu li:last-child .dropdown-item {
  border-radius: 0 0 4px 4px;
}

.dropdown-item span {
  font-size: 0.9rem;
}

/* Mobile responsiveness for dropdown */
@media (max-width: 768px) {
  .filter-dropdown-menu {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 250px;
    z-index: 9000;
  }

  .filter-dropdown:hover .filter-dropdown-menu {
    transform: translate(-50%, -50%);
  }

  .dropdown-item {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .header-controls {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
  }

  .search-container input {
    min-width: 150px;
  }

  .search-container {
    display: none;
  }
}

#filterBtn {
  background: rgb(38, 123, 41);
  color: #fff;
  border: none;
  padding: 0.2rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#filterBtn .filter-icon,
.settings-icon,
.listmapview-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.settings-icon,
.listmapview-icon {
  color: #000;
  vertical-align: middle;
}

.filter-icon {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

#filterBtn:hover {
  background: #267b29;
}

/*@media (max-width: 768px) {*/

#applyFilters {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed !important;
  left: 1rem !important;
  bottom: 1rem !important;
  z-index: 9999 !important;
  transform: none !important;
  background: rgb(38, 123, 41) !important;
  color: #fff !important;
  border: none !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 4px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}

#applyFilters:hover {
  background: #267b29 !important;
}

/*}*/

.btn-primary,
.cta-btn,
#applyFilters {
  background: rgb(38, 123, 41);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
}

.btn-primary:hover,
.cta-btn:hover,
#applyFilters:hover {
  background: #267b29;
}

.btn-secondary {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 0.75rem 1rem;
  margin-right: 0.5rem;
  border-radius: 4px;
  font-weight: bold;
}

.btn-secondary:hover {
  background: #000;
  color: #fff;
}

#selectAll,
#selectNone,
#resetAllFilters {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 0.75rem 1rem;
  margin-right: 0.5rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

#selectAll:hover,
#selectNone:hover,
#resetAllFilters:hover {
  background: #000;
  color: #fff;
}

/* === Close icon === */
.close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 9200;
}

.close-btn:hover {
  background: #000;
}

.close-btn:hover .close-icon {
  filter: invert(1);
}

.close-icon {
  width: 16px;
  height: 16px;
  display: block;
  margin: auto;
  margin-top: 9px;
}

/* === Container for content pages === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
}

/* === Content page layouts === */
.info-page,
.about-page,
.contact-page {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Noise hindrance popup styles */
.noise-popup h3 {
  color: #2c3e50;
  margin: 0 0 10px 0;
  font-size: 16px;
  font-weight: bold;
}

.noise-popup p {
  margin: 5px 0;
  font-size: 14px;
}

.noise-popup small {
  color: #666;
  font-style: italic;
}

/* Legend for noise hindrance */
.noise-legend {
  background: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid #ccc;
  font-family: Arial, sans-serif;
}

.noise-legend h4 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 14px;
  font-weight: bold;
}

.noise-legend-item {
  display: flex;
  align-items: center;
  margin: 5px 0;
  font-size: 12px;
}

.noise-legend-color {
  width: 20px;
  height: 15px;
  margin-right: 8px;
  border: 1px solid #333;
}

/* Contact Modal Styling */
.contact-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.contact-modal {
  background: white;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.contact-modal-header {
  padding: 20px 20px 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.contact-modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #1f2937;
}

.contact-modal-header p {
  margin: 0;
  color: #16944d;
  font-size: 14px;
  line-height: 1.4;
}

.contact-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}

.contact-modal-close:hover {
  color: #374151;
}

.contact-modal-body {
  padding: 20px;
}

.contact-form-group {
  margin-bottom: 14px;
}

.contact-form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: #374151;
  font-size: 13px;
}

.contact-form-group .required {
  color: #dc2626;
}

.contact-form-group input,
.contact-form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: #16944d;
  box-shadow: 0 0 0 3px rgba(22, 148, 77, 0.1);
}

.contact-form-group textarea {
  min-height: 60px;
  resize: vertical;
}

.contact-form-group small {
  display: block;
  margin-top: 2px;
  color: #6b7280;
  font-size: 11px;
}

.contact-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.contact-btn {
  padding: 9px 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.contact-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.contact-btn-cancel:hover {
  background: #e5e7eb;
}

.contact-btn-submit {
  background: #16944d;
  color: white;
}

.contact-btn-submit:hover:not(:disabled) {
  background: #137a3f;
}

.contact-btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Thank You Modal */
.thank-you-modal {
  text-align: center;
  padding: 40px;
}

.thank-you-icon {
  width: 64px;
  height: 64px;
  background: #16944d;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}

.thank-you-modal h2 {
  margin: 0 0 12px 0;
  color: #1f2937;
}

.thank-you-modal p {
  margin: 0 0 24px 0;
  color: #6b7280;
  line-height: 1.6;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .contact-modal {
    max-height: 95vh;
  }

  .contact-modal-header {
    padding: 16px 16px 12px 16px;
  }

  .contact-modal-body {
    padding: 16px;
  }

  .contact-form-group {
    margin-bottom: 12px;
  }

  .contact-modal-footer {
    padding: 12px 16px;
    flex-direction: column;
  }

  .contact-btn {
    width: 100%;
  }
}


.info-page h1,
.about-page h1,
.contact-page h1 {
  color: rgb(38, 123, 41);
  margin-bottom: 1rem;
  text-align: center;
}

.info-page .subheader,
.about-page .subheader,
.contact-page .subheader {
  text-align: center;
  color: #666;
  margin-bottom: 3rem;
}

/* === Contact Form Styling === */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.contact-intro h2 {
  color: rgb(38, 123, 41);
  margin-bottom: 1rem;
}

.contact-options {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.contact-option {
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid rgb(38, 123, 41);
}

.contact-option h3 {
  color: rgb(38, 123, 41);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.contact-option p {
  margin: 0;
  color: #333;
}

.contact-form {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
  color: rgb(38, 123, 41);
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgb(38, 123, 41);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #e0e0e0;
  border-radius: 3px;
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
  background: rgb(38, 123, 41);
  border-color: rgb(38, 123, 41);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
}

.form-success {
  text-align: center;
  padding: 3rem 2rem;
}

.form-success h2 {
  color: rgb(38, 123, 41);
  margin-bottom: 1rem;
}

.form-success p {
  margin-bottom: 2rem;
  color: #666;
}

.contact-info {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 8px;
  margin-top: 3rem;
}

.contact-info h2 {
  color: rgb(38, 123, 41);
  margin-bottom: 1.5rem;
  text-align: center;
}

.contact-details {
  display: grid;
  gap: 1rem;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: white;
  border-radius: 6px;
}

.contact-detail strong {
  min-width: 120px;
  color: rgb(38, 123, 41);
}

.contact-detail a {
  color: rgb(38, 123, 41);
  text-decoration: none;
}

.contact-detail a:hover {
  text-decoration: underline;
}

/* === Content sections for info and about pages === */
.content-section {
  max-width: 800px;
  margin: 0 auto;
}

.content-section h2 {
  color: rgb(38, 123, 41);
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.content-section h3 {
  color: rgb(38, 123, 41);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: #333;
}

.content-section ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.content-section li {
  margin-bottom: 0.5rem;
  color: #333;
}

.content-section li strong {
  color: rgb(38, 123, 41);
}

/* === Main content layout === */
.main-content {
  display: flex;
  flex: 1;
  height: calc(100vh - 80px);
  overflow: hidden;
}

.map-container {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
}

.list-container {
  flex: 0 0 500px;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1060;
}

.list-header {
  display: flex;
  flex-direction: column;
  gap: 0rem;
  padding: 1rem;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 10;
}

.list-header .results-count {
  margin-top: 0;
}

@media (max-width: 768px) {
  .list-header {
    padding: 0.75rem;
    gap: 0.75rem;
  }
}

.list-header h2 {
  margin: 0;
  color: rgb(38, 123, 41);
  font-size: 1.5rem;
}

.list-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.results-count {
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 768px) {

  .results-count {
    position: absolute;
    right: 1rem;
  }
}

.opportunities-list,
.resultlist {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

@media (max-width: 768px) {

  .opportunities-list,
  .resultlist {
    padding: 0.75rem;
  }
}

/* === No Results Opportunity === */
.no-results-opportunity {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 2rem 0;
}

.no-results-opportunity h2 {
  color: rgb(38, 123, 41);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.no-results-opportunity p {
  color: #666;
  margin-bottom: 1.5rem;
  line-height: 1.6;
  max-width: 600px;
}

.no-results-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  display: inline-block;
  background: rgb(38, 123, 41);
  color: white;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: rgb(33, 108, 36);
  transform: translateY(-1px);
}

.text-link {
  color: rgb(38, 123, 41);
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: rgb(33, 108, 36);
}

.no-results-opportunity ul {
  text-align: left;
  max-width: 400px;
  margin: 1.5rem auto;
  padding-left: 0;
  list-style: none;
}

.no-results-opportunity li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
  color: #333;
}

.no-results-opportunity li::before {
  content: '🌱';
  position: absolute;
  left: 0;
  top: 0;
}

.contact-cta {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact-cta .btn-primary {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.contact-cta span {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

@media (max-width: 768px) {
  .no-results-opportunity {
    padding: 1.5rem;
  }

  .no-results-opportunity h2 {
    font-size: 1.25rem;
  }

  .contact-cta {
    gap: 0.75rem;
  }
}

/* === List Tabs === */
.list-tabs {
  display: flex;
  margin-bottom: 0;
  gap: 0;
}

.list-tab {
  padding: 0.5rem 1rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  margin-right: 0.5em;
}

.list-tab:hover {
  background: #e9ecef;
}

.list-tab.active {
  background: #666;
  color: white;
  border-color: #666;
}

.list-tab span {
  font-weight: 600;
  opacity: 0.8;
}

.tab-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tab-pane {
  display: none;
  flex: 1;
  overflow: hidden;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
}

/* === Experts Content === */
.experts-content {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 300px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9f7ef 100%);
  border-radius: 0 0 12px 12px;
  margin: 1rem;
  overflow-y: auto;
  flex: 1;
}

@media (max-width: 768px) {
  .experts-content {
    padding: 1rem;
    margin: 0.5rem;
    min-height: 250px;
  }
}

.experts-content h2 {
  color: rgb(38, 123, 41);
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

.experts-content p {
  color: #333;
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 500px;
  text-align: left;
}

.experts-cta {
  margin-top: 1.5rem;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.experts-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(38, 123, 41, 0.3);
}

@media (max-width: 768px) {
  .list-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .list-tab {
    flex: none;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  .experts-content {
    padding: 1.5rem;
    margin: 0.5rem;
    min-height: 250px;
  }

  .experts-content h2 {
    font-size: 1.25rem;
  }

  .experts-content p {
    font-size: 0.9rem;
  }
}

/* === Opportunity cards === */
.opportunity-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .opportunity-card {
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
  }
}

.opportunity-card:hover {
  border-color: rgb(38, 123, 41);
  box-shadow: 0 2px 8px rgba(38, 123, 41, 0.1);
  transform: translateY(-1px);
}

.opportunity-card.highlighted {
  border-color: rgb(38, 123, 41);
  background: rgba(38, 123, 41, 0.05);
  box-shadow: 0 2px 12px rgba(38, 123, 41, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: bold;
  color: rgb(38, 123, 41);
  margin: 0;
  line-height: 1.3;
}

.card-type-badge,
.type-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
  margin: 0;
}

.card-type-badge.project {
  background-color: #8bb311;
}

.card-type-badge.bedrijf {
  background-color: #164194;
}

.card-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.card-logo {
  width: 60px;
  height: 30px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.card-details {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.card-detail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.card-detail-label {
  font-weight: 600;
  color: #666;
  min-width: 70px;
}

.card-detail-value {
  color: #333;
  flex: 1;
  text-align: right;
  white-space: normal;
  word-wrap: break-word;
}

.card-description {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.card-contact-btn {
  background: rgb(38, 123, 41);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  flex: 1;
}

.card-contact-btn:hover {
  background: #267b29;
}

/* === Mobile responsiveness === */
.mobile-only {
  display: none;
}

/* Mobile-only elements should be hidden on desktop */
.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: block;
  }

  /* Larger touch targets */
  button,
  .card-contact-btn,
  .nav-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Touch feedback */
  button:active,
  .card-contact-btn:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* Smooth scrolling for mobile */
  .opportunities-list,
  .resultlist {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}


/* Hide view toggle button on desktop */
.mobile-view-toggle,
.view-toggle-btn,
.map-controls>button.view-toggle-btn,
.map-controls-row>button.view-toggle-btn {
  display: none;
}

@media (max-width: 768px) {

  /* Show view toggle button on desktop */
  .mobile-view-toggle,
  .view-toggle-btn,
  .map-controls>button.view-toggle-btn,
  .map-controls-row>button.view-toggle-btn {
    display: block;
  }

  .main-content {
    position: relative;
    height: calc(100vh - 80px);
  }

  .map-container {
    flex: 1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: transform 0.3s ease;
  }

  .list-container {
    flex: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: none;
    border-top: 2px solid rgb(38, 123, 41);
    background: #fff;
  }

  .list-container.show {
    transform: translateX(0);
  }

  .mobile-only {
    display: block;
  }

  .map-controls {
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 2200;
    width: 100%;
  }

  .map-controls-row {
    width: 100%
  }

  .filter-dropdown {
    z-index: 2300;
  }

  .filter-dropdown-menu {
    z-index: 2400;
  }

  .view-toggle-btn,
  .map-controls>button.view-toggle-btn,
  .map-controls-row>button.view-toggle-btn {
    background: white;
    color: black;
    border-radius: 4px;
    font-weight: bold;
    padding: 0.2rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  /* Hide map legend when list is shown on mobile */
  .list-container.show~.map-legend {
    display: none;
  }
}

/* === Map Legend === */
.map-legend {
  position: fixed;
  bottom: 5rem;
  left: 1rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  min-width: 150px;
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

/* Mobile legend styles */
@media (max-width: 768px) {
  .map-legend {
    bottom: -50px;
    left: -300px;
    transform: translateY(-50%);
    max-width: 200px;
    padding: 0.75rem;
  }

  .map-legend.open {
    left: 1rem;
  }

  .map-legend h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .legend-item {
    font-size: 0.75rem;
    margin: 0.25rem 0;
  }

  .legend-icon {
    width: 18px;
    height: 18px;
  }
}

/* Move legend when list is shown on desktop */
/*@media (min-width: 769px) {
  .list-container~.map-legend {
    right: 520px;
    /* Adjust based on list container width (500px + 20px margin) * /
  }

  .list-container.show~.map-legend {
    right: 520px;
  }
}
*/
/* Hide legend when list is shown on mobile */
@media (max-width: 768px) {
  .list-container.show~.map-legend {
    display: none;
  }
}

.map-legend h4 {
  margin: 0 0 0.75rem 0;
  color: rgb(38, 123, 41);
  font-size: 1rem;
  font-weight: bold;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
  font-size: 0.5rem;
  color: #333;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.legend-icon img {
  width: 100%
}

#detailPanel {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 80%;
  background: #fff;
  transition: bottom 0.3s ease;
  z-index: 2000;
  overflow-y: auto;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  border-radius: 12px 12px 0 0;
}

#detailPanel.open {
  bottom: 0;
}

.detail-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 2rem 0;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid rgb(38, 123, 41);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover:not(.disabled) {
  background: rgb(38, 123, 41);
}

.nav-btn:hover:not(.disabled) .nav-icon {
  filter: invert(1);
}

.nav-btn.disabled {
  border-color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.nav-icon {
  width: 16px;
  height: 16px;
  transition: filter 0.2s ease;
}

.nav-counter {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

.detail-content {
  padding: 3rem 2rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.detail-header h2 {
  color: rgb(38, 123, 41);
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
}

.detail-type-badge {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.detail-type-badge.project {
  background-color: #8bb311;
}

.detail-type-badge.bedrijf {
  background-color: #164194;
}

.detail-images {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.detail-logo {
  max-width: 200px;
  max-height: 80px;
  object-fit: contain;
}

.detail-image {
  max-width: 300px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.detail-description {
  margin-bottom: 2rem;
}

.detail-description h4 {
  color: rgb(38, 123, 41);
  margin-bottom: 0.5rem;
}

.detail-description p {
  line-height: 1.6;
  color: #333;
}

.detail-specs {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.detail-row {
  display: flex;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  gap: 1rem;
}

.detail-row strong {
  min-width: 140px;
  color: rgb(38, 123, 41);
  font-weight: 600;
}

.filter-link {
  color: rgb(38, 123, 41);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease;
}

.filter-link:hover {
  color: #267b29;
  text-decoration: none;
}

.detail-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  #detailPanel {
    height: 90%;
  }

  .detail-content {
    padding: 2rem 1rem 1rem;
  }

  .detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-header h2 {
    font-size: 1.5rem;
  }

  .detail-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .detail-row strong {
    min-width: auto;
  }
}

#formOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: none;
  z-index: 9300;
  padding: 2rem;
  overflow: auto;
}

#formOverlay.open {
  display: block;
}

/* === Default Markers === */
.default-marker {
  background: transparent !important;
  border: none !important;
}

.default-marker-container {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.default-marker-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* === Image Markers (unified for both photos and logos) === */
.photo-marker,
.logo-marker {
  background: transparent !important;
  border: none !important;
}

.photo-marker-container,
.logo-marker-container {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-marker-container {
  border: 3px solid rgb(139, 179, 17);
}

.logo-marker-container {
  border: 3px solid #164194;
}

.photo-marker-image,
.logo-marker-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.photo-marker-overlay,
.logo-marker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  border-radius: 50%;
}

.photo-marker-overlay {
  background: rgba(139, 179, 17, 0.1);
}

.logo-marker-overlay {
  background: rgba(22, 65, 148, 0.1);
}

.fallback-marker {
  width: 30px;
  height: 40px;
  background: rgb(139, 179, 17);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  margin: 10px;
}

/* === Marker hover label === */
.marker-hover-label {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Image marker styling */
.image-marker {
  cursor: pointer;
}

.image-marker-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-marker-container:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.image-marker-image {
  border-radius: 50%;
}

/* === Reset Confirmation Popup === */
.reset-confirmation-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.reset-confirmation-content {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.reset-confirmation-header h3 {
  margin: 0 0 1rem 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

.reset-confirmation-body p {
  margin: 0 0 1.5rem 0;
  color: #666;
  line-height: 1.5;
}

.reset-confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.reset-confirm-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.reset-confirm-btn:hover {
  background: #c82333;
}

.reset-cancel-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.reset-cancel-btn:hover {
  background: #5a6268;
}

/* === Popup navigation === */
.popup-navigation {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.popup-content .nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid rgb(38, 123, 41);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.popup-content .nav-btn:hover:not(.disabled) {
  background: rgb(38, 123, 41);
}

.popup-content .nav-btn:hover:not(.disabled) .nav-icon {
  filter: invert(1);
}

.popup-content .nav-btn.disabled {
  border-color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}

.popup-content .nav-icon {
  width: 12px;
  height: 12px;
  transition: filter 0.2s ease;
}

.popup-content .nav-counter {
  font-size: 0.8rem;
  color: #666;
  font-weight: 500;
  min-width: 50px;
  text-align: center;
}

/* Last filter notification */
.last-filter-notification {
  background: rgb(255, 255, 204);
  color: #000;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  min-width: 280px;
  animation: slideIn 0.3s ease-out;
  margin-left: 10px;
}

.last-filter-notification a {
  color: rgb(38, 123, 41);
  text-decoration: underline;
  font-weight: bold;
  margin-left: 0.25rem;
}

.last-filter-notification a:hover,
.close-notification:hover {
  text-decoration: none;
}

@media (max-width: 768px) {

  /* move the last filter notification above the filter and options button */
  .last-filter-notification {
    position: absolute;
    top: -5rem;
    left: -120px;
    box-sizing: border-box;
    padding: 0.5em 1rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 370px;
  }
}

.close-notification {
  background: none;
  border: none;
  color: rgb(38, 123, 41);
  text-decoration: underline;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}

.close-notification:hover {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map-controls-row {
  position: relative;
}

/* === Municipality popup styling === */
.municipality-popup {
  padding: 15px;
  max-width: 250px;
}

.municipality-popup h3 {
  margin: 0 0 10px 0;
  color: rgb(38, 123, 41);
  font-size: 16px;
  font-weight: bold;
}

.municipality-popup p {
  margin: 5px 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.municipality-popup hr {
  margin: 0.5rem 0;
  border: none;
  border-top: 1px solid #eee;
}

.municipality-popup small {
  color: #666;
  font-size: 0.8rem;
}

.municipality-filter-link {
  color: rgb(38, 123, 41);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.municipality-filter-link:hover {
  border-bottom-color: rgb(38, 123, 41);
  text-decoration: none;
}

/* === Filter Overlay === */
#filterOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: translateX(-100%);
  transition: 0.3s;
  overflow: auto;
  z-index: 9000;
  padding: 2rem;
}

@media (max-width: 768px) {
  #filterOverlay {
    padding: 2rem 1rem 6rem 1rem;
  }
}

#filterOverlay.open {
  transform: translateX(0);
}

#filterOverlay form {
  background: transparent;
  padding: 0;
  border-radius: 0;
  max-width: none;
  margin: 0;
  position: relative;
}

#filterOverlay h2 {
  margin-top: 0;
  color: rgb(38, 123, 41);
  font-weight: bold;
}


/* Marker badges voor gezond gebouw, netwerkpartner en expert */
.marker-badge {
  position: absolute;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.marker-badge img {
  width: 15px;
  height: 15px;
}

/* Posities voor 2 badges (huidige situatie) */
.marker-badge-partner {
  bottom: -13px;
  left: 3px;
}

.marker-badge-healthy {
  bottom: -13px;
  right: 3px;
}

.marker-badge-expert {
  bottom: -13px;
  right: 3px;
}

/* Posities voor 1 badge (alleen in het midden) */
.marker-badge-partner:only-child,
.marker-badge-healthy:only-child,
.marker-badge-expert:only-child {
  left: 15px;
  right: auto;
}

/* Posities voor 3 badges */
.default-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-partner,
.photo-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-partner,
.logo-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-partner {
  left: -7px;
}

.default-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-healthy,
.photo-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-healthy,
.logo-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-healthy {
  left: 15px;
  right: auto;
}

.default-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-expert,
.photo-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-expert,
.logo-marker-container:has(.marker-badge-partner):has(.marker-badge-healthy):has(.marker-badge-expert) .marker-badge-expert {
  right: -7px;
  left: auto;
}

/* Card badges in lijst */
.card-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.card-badge {
  width: 24px;
  height: 24px;
  padding: 4px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
}

#filterOverlay>form>div {
  margin-bottom: 1.5rem
}

/* Municipality Selection Buttons */
.municipality-selection-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.municipality-btn {
  padding: 0.75rem 1rem;
  background: white;
  color: black;
  border: 2px solid black;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: bold;
  transition: all 0.2s;
}


.municipality-btn:hover {
  background: #f0f0f0;
}

.municipality-btn:active {
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .municipality-selection-buttons {
    flex-direction: column;
    gap: 0.25rem;
  }

  .municipality-btn {
    width: 100%;
    text-align: center;
  }
}

#filterOverlay strong {
  display: block;
  margin-bottom: 0.75rem;
  color: #333;
  font-weight: bold;
  font-size: 1.1rem;
}

#filterOverlay label {
  display: inline-block;
  margin-right: 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#filterOverlay label:hover {
  background-color: #f0f8f0;
}

#filterOverlay input[type="checkbox"],
#filterOverlay input[type="radio"] {
  margin-right: 0.5rem;
}

/* === Advanced Filters Accordion === */
.advanced-filters {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-top: 1rem;
}

.advanced-filters-header {
  background: #f8f9fa;
  padding: 1rem;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  transition: background-color 0.2s;
  user-select: none;
}

.advanced-filters-header:hover {
  background: #e9ecef;
}

.advanced-filters-header a {
  color: rgb(38, 123, 41);
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.advanced-filters-header a::after {
  content: '▼';
  transition: transform 0.2s;
  font-size: 0.8rem;
}

.advanced-filters.open .advanced-filters-header a::after {
  transform: rotate(180deg);
}

.advanced-filters-content {
  display: none;
  padding: 1rem;
  border-top: 1px solid #ddd;
}

.advanced-filters.open .advanced-filters-content {
  display: block;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group:last-child {
  margin-bottom: 0;
}

/* === Saved Filters Popup === */
.saved-filters-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
}

.saved-filters-popup-content {
  background: #fff;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 70vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.saved-filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.saved-filters-header h3 {
  margin: 0;
  color: rgb(38, 123, 41);
  font-size: 1.25rem;
}

.close-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid #000;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-popup-btn:hover {
  background: #000;
}

.close-popup-btn:hover .close-icon {
  filter: invert(1);
}

.saved-filters-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.saved-filter-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.saved-filter-item:hover {
  border-color: rgb(38, 123, 41);
  background: #fff;
}

.saved-filter-item:last-child {
  margin-bottom: 0;
}

.saved-filter-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.saved-filter-name {
  font-weight: bold;
  color: rgb(38, 123, 41);
  font-size: 1rem;
}

.saved-filter-date {
  font-size: 0.875rem;
  color: #666;
}

.saved-filter-actions {
  display: flex;
  gap: 0.5rem;
}

.load-filter-btn {
  background: rgb(38, 123, 41);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.load-filter-btn:hover {
  background: #267b29;
}

.delete-filter-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.delete-filter-btn:hover {
  background: #c82333;
}

/* === Location Controls === */
.location-filter-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.location-btn {
  background: white;
  color: black;
  border: 2px solid black;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  width: auto;
  max-width: 250px;
}

.location-btn:hover {
  background: #f0f0f0;
}

.location-btn.active {
  background: #f0f0f0;
}

.clear-location-btn {
  background: #dc3545;
  max-width: 200px;
}

.clear-location-btn:hover {
  background: #c82333;
}

@media (max-width: 768px) {
  .saved-filters-popup-content {
    width: 95%;
    max-height: 80vh;
  }

  .saved-filter-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .saved-filter-actions {
    width: 100%;
    justify-content: space-between;
  }

  .load-filter-btn,
  .delete-filter-btn {
    flex: 1;
    padding: 0.75rem;
  }

  .location-filter-controls {
    gap: 0.5rem;
  }
}

/* === Layer Control Styling === */
.leaflet-control-layers label img {
  vertical-align: middle;
  margin-right: 5px;
}

/* Add responsive list/map toggle button styling */
.view-toggle-btn {
  background: #fff;
  color: #000;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 10px;
}

.view-toggle-btn:hover {
  background: rgb(233, 242, 233);
  color: rgb(38, 123, 41);
}

/* Debug Panel */
#debugButton {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: #ff5722;
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

#debugButton:hover {
  transform: scale(1.1);
  background: #f44336;
}

#debugButton.visible {
  display: flex;
}

#debugPanel {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 500px;
  max-width: calc(100vw - 40px);
  max-height: 80vh;
  background: white;
  border: 2px solid #ff5722;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#debugPanel.visible {
  display: flex;
}

#debugPanel .debug-header {
  background: #ff5722;
  color: white;
  padding: 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#debugPanel .debug-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#debugPanel .debug-content {
  padding: 15px;
  overflow-y: auto;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

#debugPanel .debug-section {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

#debugPanel .debug-section:last-child {
  border-bottom: none;
}

#debugPanel .debug-section h4 {
  margin: 0 0 10px 0;
  color: #ff5722;
  font-size: 14px;
}

#debugPanel .debug-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  line-height: 1.4;
}

#debugPanel .debug-label {
  font-weight: bold;
  color: #333;
}

#debugPanel .debug-value {
  color: #666;
  text-align: right;
  word-break: break-all;
}

#debugPanel .debug-value.success {
  color: #4CAF50;
}

#debugPanel .debug-value.error {
  color: #f44336;
}

#debugPanel .debug-value.warning {
  color: #ff9800;
}

#debugPanel .debug-refresh {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  background: #ff5722;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

#debugPanel .debug-refresh:hover {
  background: #f44336;
}

/* Footer */
footer {
  background: white;
  padding: 2rem 1rem;
  margin-top: auto;
  border-top: 1px solid #e0e0e0;
}