/*
 * HOGENT-inspired CKAN theme
 * Based on HOGENT's published brand principles:
 * - Montserrat for branded typography
 * - black/white as primary brand colors
 * - one accent color per medium
 * - strong, left-aligned typography
 *
 * Accent chosen here: #16B0A5 (one of HOGENT's published colors).
 * Change --hogent-accent once to recolor the entire theme.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;800&display=swap');

:root {
  --hogent-black: #000000;
  --hogent-white: #ffffff;
  --hogent-accent: #16B0A5;
  --hogent-grey-100: #f5f5f3;
  --hogent-grey-200: #e7e7e3;
  --hogent-grey-600: #5f5f5a;
  --hogent-radius: 0;
  --hogent-max-width: 1240px;
}

html,
body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--hogent-black);
  background: var(--hogent-white);
}

body,
p,
li,
input,
textarea,
select,
button {
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6,
.heading,
.page-heading,
.module-heading {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hogent-black);
  text-align: left;
}

h1,
.page-heading {
  line-height: 1.05;
}

a {
  color: var(--hogent-black);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--hogent-black);
  text-decoration-color: var(--hogent-accent);
}

/* Header */
.account-masthead {
  background: var(--hogent-black);
  color: var(--hogent-white);
}

.account-masthead .account ul li a,
.account-masthead .account ul li a:hover,
.account-masthead .account ul li a:focus {
  color: var(--hogent-white);
}

.masthead {
  background: var(--hogent-white);
  color: var(--hogent-black);
  border-bottom: 5px solid var(--hogent-accent);
  box-shadow: none;
}

.masthead .container,
.account-masthead .container,
.site-footer .container,
[role='main'] > .container {
  max-width: var(--hogent-max-width);
}

.masthead .site-search input {
  border: 2px solid var(--hogent-black);
  border-radius: var(--hogent-radius);
}

.masthead .navigation .nav-pills li a,
.masthead .navigation .nav-link {
  color: var(--hogent-black);
  font-weight: 800;
  border-radius: 0;
  text-transform: lowercase;
}

.masthead .navigation .nav-pills li.active a,
.masthead .navigation .nav-pills li a:hover,
.masthead .navigation .nav-link.active,
.masthead .navigation .nav-link:hover {
  color: var(--hogent-black);
  background: var(--hogent-accent);
}

/* Logo: configure ckan.site_logo to point to /images/hogent-logo.svg */
.masthead .logo img {
  max-height: 58px;
  width: auto;
}

/* Main page */
[role='main'],
.main {
  background: var(--hogent-white);
}

.hero {
  background: var(--hogent-grey-100);
  border-bottom: 1px solid var(--hogent-grey-200);
}

.hero .module-content,
.hero .module-content.box {
  background: transparent;
}

/* Cards / modules */
.box,
.module,
.wrapper,
.media-grid,
.dataset-item,
.organization-item,
.group-item {
  border-radius: var(--hogent-radius) !important;
  box-shadow: none !important;
}

.box,
.module,
.wrapper {
  border-color: var(--hogent-grey-200);
}

.module-heading {
  background: var(--hogent-grey-100);
  border-color: var(--hogent-grey-200);
}

.dataset-item,
.media-item {
  border-bottom-color: var(--hogent-grey-200);
}

.dataset-heading a,
.media-heading a {
  font-weight: 800;
}

/* Buttons */
.btn {
  border-radius: var(--hogent-radius);
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  box-shadow: none;
}

.btn-primary,
.btn-success {
  background: var(--hogent-black);
  border-color: var(--hogent-black);
  color: var(--hogent-white);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
  background: var(--hogent-accent);
  border-color: var(--hogent-accent);
  color: var(--hogent-black);
}

/* Form controls */
.form-control,
input,
textarea,
select {
  border-radius: var(--hogent-radius) !important;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--hogent-black);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--hogent-accent) 35%, transparent);
}

/* Tags and labels */
.tag,
.badge,
.label {
  border-radius: 0 !important;
}

.tag:hover,
.tag:focus {
  background: var(--hogent-accent);
  border-color: var(--hogent-accent);
  color: var(--hogent-black);
}

/* Breadcrumb / pagination */
.breadcrumb a,
.pagination a,
.page-link {
  color: var(--hogent-black);
}

.pagination .active a,
.page-item.active .page-link {
  background: var(--hogent-black);
  border-color: var(--hogent-black);
  color: var(--hogent-white);
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
  background: var(--hogent-black);
  color: var(--hogent-white);
  border-top: 8px solid var(--hogent-accent);
}

.site-footer a,
.site-footer label,
.site-footer small,
.site-footer p {
  color: var(--hogent-white);
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--hogent-accent);
}

/* HOGENT-style emphasis utility classes you can use in custom templates */
.hogent-kicker {
  display: inline-block;
  margin-bottom: .75rem;
  padding: .28rem .55rem;
  background: var(--hogent-accent);
  color: var(--hogent-black);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hogent-title {
  max-width: 18ch;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: .98;
  font-weight: 800;
}

.hogent-rule {
  width: 5rem;
  height: .55rem;
  margin: 1rem 0 1.5rem;
  background: var(--hogent-accent);
}

@media (max-width: 767.98px) {
  .masthead {
    border-bottom-width: 4px;
  }

  .hogent-title {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
}

/* Dataset geographic extent */
.hogent-spatial-module {
  margin-top: 2rem;
  border-top: 5px solid var(--hogent-accent);
}

.hogent-spatial-module .module-content {
  padding-top: 1.25rem;
}

.hogent-spatial-heading {
  margin-top: 0;
  margin-bottom: 1rem;
}

.hogent-spatial-map {
  width: 100%;
  height: 420px;
  border: 1px solid var(--hogent-grey-200);
  background: var(--hogent-grey-100);
}

.hogent-spatial-note {
  margin: .75rem 0 0;
  color: var(--hogent-grey-600);
  font-size: .9rem;
}

@media (max-width: 767.98px) {
  .hogent-spatial-map {
    height: 320px;
  }
}


/* -------------------------------------------------------------------------
   Leaflet 1.9.x core layout rules
   Bundled locally so the dataset extent map does not depend on an external
   Leaflet stylesheet. These positioning rules are essential: without them
   map tiles are rendered as ordinary images in the page flow.
   ------------------------------------------------------------------------- */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-container {
  overflow: hidden;
  position: relative;
  outline-offset: 1px;
  background: #ddd;
  -webkit-tap-highlight-color: transparent;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-user-drag: none;
}

.leaflet-tile::selection {
  background: transparent;
}

.leaflet-safari .leaflet-tile {
  image-rendering: -webkit-optimize-contrast;
}

.leaflet-safari .leaflet-tile-container {
  width: 1600px;
  height: 1600px;
  -webkit-transform-origin: 0 0;
}

.leaflet-marker-icon,
.leaflet-marker-shadow {
  display: block;
}

.leaflet-container .leaflet-overlay-pane svg {
  max-width: none !important;
  max-height: none !important;
}

.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  width: auto;
  padding: 0;
}

.leaflet-container.leaflet-touch-zoom {
  touch-action: pan-x pan-y;
}

.leaflet-container.leaflet-touch-drag {
  touch-action: none;
  touch-action: pinch-zoom;
}

.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
  touch-action: none;
}

.leaflet-container {
  -webkit-tap-highlight-color: transparent;
}

.leaflet-container a {
  -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}

.leaflet-tile {
  filter: inherit;
  visibility: hidden;
}

.leaflet-tile-loaded {
  visibility: inherit;
}

.leaflet-zoom-box {
  width: 0;
  height: 0;
  box-sizing: border-box;
  z-index: 800;
}

.leaflet-overlay-pane svg {
  -moz-user-select: none;
}

.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }

.leaflet-vml-shape {
  width: 1px;
  height: 1px;
}

.lvml {
  behavior: url(#default#VML);
  display: inline-block;
  position: absolute;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }

.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }

.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }

.leaflet-fade-anim .leaflet-popup {
  opacity: 0;
  transition: opacity 0.2s linear;
}

.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
  opacity: 1;
}

.leaflet-zoom-animated {
  transform-origin: 0 0;
}

svg.leaflet-zoom-animated {
  will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
  transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}

.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
  transition: none;
}

.leaflet-zoom-anim .leaflet-zoom-hide {
  visibility: hidden;
}

/* Basic attribution/control presentation; avoids icon-image dependencies. */
.leaflet-control-attribution {
  margin: 0;
  padding: 0 5px;
  background: rgba(255,255,255,.8);
  font-size: 11px;
}

.leaflet-control-attribution a {
  text-decoration: none;
}

.leaflet-control-zoom {
  border: 2px solid rgba(0,0,0,.2);
  background-clip: padding-box;
}

.leaflet-control-zoom a {
  display: block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  text-decoration: none;
  background: #fff;
  color: #000;
  font-size: 22px;
  font-weight: bold;
}

.leaflet-control-zoom a + a {
  border-top: 1px solid #ccc;
}

.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus {
  background: #f4f4f4;
}
