/* ========================================
   Globale Farbdefinitionen mit CSS-Variablen
   ======================================== */

:root {
  --primary-color: #12A33B;             /* Hauptfarbe */
  --primary-dark: #0D6925;              /* dunkler für Hover, Aktives */
  --primary-light: #1DDB51;             /* heller für Tags o.Ä. */
  --background-color: #DEDEDE;          /* Seitenhintergrund */
  --footer-background: #12A33B;         /* Footer & Account-Leiste */
  --text-on-primary: #ffffff;           /* Weißer Text auf Farbflächen */
  --text-muted: rgba(255, 255, 255, 0.7); /* abgeschwächter Text */
}

/* =====================================================
   Account-Masthead (oberste Leiste)
   ===================================================== */

.account-masthead {
  background-color: var(--footer-background);
}

.account-masthead .account ul li a {
  color: var(--text-muted);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.account-masthead .account ul li a:hover {
  color: var(--text-on-primary);
  background-color: var(--primary-dark);
}

.account-masthead .account .notifications a span {
  background-color: var(--primary-dark);
}

/* =====================================================
   Haupt-Masthead / Navigation CKAN 2.10.8 (Bootstrap 5)
   ===================================================== */

header.masthead {
  background-color: var(--primary-color);
  color: var(--text-on-primary);
}

header.masthead .navbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

header.masthead .header-image {
  display: flex;
  align-items: center;
  margin-right: 1rem;
}

header.masthead .logo img {
  max-height: 48px;
}

header.masthead .main-navbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

header.masthead .navbar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: 1rem !important;
  margin-bottom: 0 !important;
  gap: 0.5rem;
  flex-wrap: nowrap !important;
}

header.masthead .navbar-nav li {
  list-style: none;
}

header.masthead .navbar-nav li a {
  color: var(--text-on-primary) !important;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

header.masthead .navbar-nav li a:hover,
header.masthead .navbar-nav li.active a {
  background-color: var(--primary-dark) !important;
  color: var(--text-on-primary) !important;
}

/* Suchfeld (rechts im Header) */
header.masthead .site-search {
  display: flex;
  align-items: center;
  margin-left: auto !important;
  gap: 0.25rem;
}

header.masthead .site-search input {
  border-radius: 4px;
  border: none;
  padding: 0.3rem 0.6rem;
}

header.masthead .site-search button {
  background-color: var(--primary-dark);
  color: var(--text-on-primary);
  border: none;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
}

header.masthead .site-search button:hover {
  background-color: var(--primary-light);
}

/* =====================================================
   Seiteninhalt / Boxen / Startseite
   ===================================================== */

body {
  background-color: var(--background-color);
}

/* Boxen */
.box {
  box-shadow: none;
  border: none;
}

.homepage .module-search {
  color: rgb(68, 68, 68);
  background-color:  var(--primary-light);
}

/* Startseite: Suchmodul */
.homepage .module-search .module-content {
  color: rgb(68, 68, 68);
  background-color:  var(--footer-background);
}

/* Startseite: Tags */
.homepage .module-search .tags {
  background-color: var(--primary-light);
}

/* Linie zwischen Inhaltsbereichen */
.homepage [role="main"] {
  border-top: 1px solid rgb(204, 204, 204);
}


/* =====================================================
   Footer
   ===================================================== */

.site-footer {
  background-color: var(--footer-background);
  color: var(--text-muted);
  padding: 2rem 0;
}

.site-footer a {
  color: var(--text-on-primary);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer label,
.site-footer small {
  color: var(--text-on-primary);
}

/* =====================================================
   FOOTER Fix – kompatibel mit CKAN 2.10.8 (Bootstrap 5)
   ===================================================== */

/* Allgemeine Footer-Hintergründe */
footer,
footer.site-footer,
footer.footer,
.site-footer {
  background-color: var(--footer-background) !important;
  color: var(--text-on-primary) !important;
  padding: 2rem 0;
}

/* Links im Footer */
footer a,
.site-footer a {
  color: var(--text-on-primary) !important;
  text-decoration: none;
}

footer a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

/* Kleinere Texte / Labels */
footer small,
footer label,
.site-footer small,
.site-footer label {
  color: var(--text-on-primary) !important;
  opacity: 0.9;
}

/* Bootstrap-Container-Anpassungen */
footer .container,
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

/* Footer-Links nebeneinander */
footer .footer-links ul,
.site-footer .footer-links ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  gap: 1rem;
}

