/**
 * @file
 * Header styling for Manna Holdings branding.
 * Manna logo on the left, municipality logo on the right.
 */

/* Hide the initial header section completely */
.site-header__initial {
  display: none !important;
  visibility: hidden !important;
}

/* Header - remove blue, reduce height, add bottom border */
.site-header {
  background-color: #fff !important;
  border-bottom: 2px solid #ddd !important;
  min-height: auto !important;
  height: 85px !important;
}

/* Remove blue gradient and reduce height from site-branding */
.site-branding {
  background: #fff !important;
  background-image: none !important;
  min-height: auto !important;
  height: auto !important;
  padding: 0.5rem 1rem !important;
  width: 100% !important;
  flex-grow: 1 !important;
}

/* Remove blue from ALL header elements */
.site-header,
.site-header__fixable,
.site-header [data-drupal-selector="site-header-fixable"],
.block-olivero-site-branding,
.site-header .site-branding,
.site-header__inner {
  background-color: #fff !important;
  background: #fff !important;
  background-image: none !important;
  min-height: auto !important;
  height: auto !important;
}

/* Reduce inner padding */
.site-header__inner {
  padding: 0 !important;
}

/* Make container full width and flex */
.container.site-header__inner__container {
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

/* The header region (wraps the branding block) must fill available space */
.site-header .layout-container,
.site-header .region-header,
.site-header [class*="region--header"],
#header .region,
.site-header__inner__container > *:first-child {
  flex-grow: 1 !important;
  width: 100% !important;
}

/* The block wrapper must also be full width */
.block-olivero-site-branding,
.block-system-branding-block,
[data-drupal-selector="branding"] {
  width: 100% !important;
}

.site-branding__inner {
  height: auto !important;
  padding: 0.25rem 0 !important;
}

/* Reset any min-height on header children */
.site-header *,
.site-branding * {
  min-height: unset !important;
}

/* Override Olivero's color variables for header */
.site-header,
.site-header * {
  --color-sitename: #333;
  --color-sitebranding-bg: #fff;
  --site-header-height-wide: auto;
  --header-height-wide-when-fixed: auto;
}

/* --- Two-logo header layout --- */
.site-branding__inner.header-logos {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0.25rem 1.5rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Main Manna logo (left) */
.site-branding__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-branding__logo .manna-header-logo {
  max-height: 60px;
  width: auto;
  height: auto;
}

/* Municipality logo (right) — floats to the far right */
.municipality-header-logo {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.municipality-header-logo__img {
  max-height: 55px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Site branding adjustments */
.site-branding__inner {
  gap: 1rem;
}

/* Navigation link colors - ensure readable on white background */
.primary-nav__menu-link,
.primary-nav__menu-link:visited {
  color: #333;
}

.primary-nav__menu-link:hover,
.primary-nav__menu-link:focus {
  color: #000;
}

/* Mobile menu button */
.mobile-nav-button {
  background-color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .site-branding__logo .manna-header-logo {
    max-height: 50px;
  }

  .municipality-header-logo__img {
    max-height: 45px;
  }

  .site-header__inner {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }

  .site-branding__inner.header-logos {
    padding: 0.25rem 1rem !important;
  }
}

@media (max-width: 480px) {
  .site-branding__logo .manna-header-logo {
    max-height: 40px;
  }

  .municipality-header-logo__img {
    max-height: 35px;
  }
}
