/*!
Theme Name: ecosenda
Theme URI: http://underscores.me/
Author: Oliver Udeküll
Author URI: http://underscores.me/
Description: Description
Version: 1.0.0
Tested up to: 5.4
Requires PHP: 5.6
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: ecosenda
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned.

ecosenda is based on Underscores https://underscores.me/, (C) 2012-2020 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later.

Normalizing styles have been helped along thanks to the fine work of
Nicolas Gallagher and Jonathan Neal https://necolas.github.io/normalize.css/
*/

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100dvw;
  height: var(--sizes-header-height);
  border-bottom: var(--border);

  display: flex;
  gap: var(--padding-lg);
  justify-content: space-between;
  align-items: center;

  background-color: var(--color-bg);
  z-index: var(--z-index-top);
}

.site-header__hgroup {
  position: relative;
  padding: var(--padding-sm-semi) var(--padding);
}

.site-header__subtitle {
  position: absolute;
  padding: var(--padding-sm-semi) var(--padding);

  height: 100%;
  left: 50%;
  transform: translateX(-50%);

  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
  gap: var(--padding-xs);

  line-height: var(--font-line-height-trim) !important;
}

.site-header__subtitle ul {
  position: relative;
  width: 100%;

  display: flex;
  justify-content: center;
  gap: var(--padding-lg);
}

.nav-menu {
  height: 100%;
  /* margin-inline-start: auto; */
}

.nav-menu__list {
  position: relative;
  height: 100%;

  display: grid;
  grid-template-columns: repeat(1, max-content);
  grid-template-rows: repeat(2, 1fr);
  justify-content: end;
}

.nav-menu__list li {
  display: contents;
}

.nav-menu__list li a {
  height: 100%;
  padding: 0 var(--padding-lg);
  border-left: var(--border);
  border-bottom: var(--border);

  display: flex;
  justify-content: center;
  align-items: center;

  font-weight: var(--font-weight-bold);
}

.nav-menu__list li:last-child a {
  border-bottom: none;
}

main {
  position: relative;
  top: var(--sizes-header-height);
}

.map {
  position: relative;
  width: 100%;
  height: var(--sizes-content-height);
  overflow: hidden;
}

.map__list {
  position: relative;
  width: 100%;
  height: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.map__item {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  transition: transform 0.4s ease-out;
}

.map__city {
  display: block;
  text-decoration: none;
  color: inherit;
}

.map__city img {
  display: block;
  width: 100%;
  height: auto;
}

.map__label {
  display: block;
  margin-top: var(--padding-xs);
}

.map__item--tallinn {
  width: 15vw;
}
.map__item--kohtla-jarve {
  width: 14vw;
}
.map__item--turku {
  width: 19vw;
}
.map__item--korpo {
  width: 13vw;
}
.map__item--cologne {
  width: 22vw;
}
.map__item--the-hague {
  width: 20vw;
}

/* PAGE */

.page-container {
  position: relative;
  display: flex;
}

.page__article {
  position: sticky;
  top: var(--sizes-header-height);
  max-width: 44ch;
  min-width: 35ch;
  height: fit-content;
  min-height: var(--sizes-content-height);
  border-right: var(--border);
}

.article__header {
  position: sticky;
  top: var(--sizes-header-height);
  padding: var(--padding);
  border-bottom: var(--border);

  text-transform: uppercase;
  background-color: var(--color-bg);
  z-index: 100;
}

.article__map-wrapper {
  position: relative;
  width: 100%;
  padding: var(--padding-lg);
  padding-top: var(--padding-sm);

  display: flex;
  justify-content: center;
  align-items: center;
}

.article__map {
  width: 100%;
  max-height: var(--padding-xxl);

  object-fit: contain;
}

.article__body {
  position: relative;
  padding: var(--padding-lg) var(--padding);
}

.article__body p:not(:last-child) {
  margin-bottom: var(--sizes-paragraph-gap-body);
}

.page__gallery {
  position: relative;
  width: 100%;
  min-height: var(--sizes-content-height);
  /* flex: 1; */
}

.page__gallery-item {
  position: relative;
  width: 100%;
  height: fit-content;

  display: flex;
}

.page__gallery--single {
  position: sticky;
  top: var(--sizes-header-height);
  height: var(--sizes-content-height);
}

.page__gallery--single .page__gallery-item {
  height: var(--sizes-content-height);
}

.page__gallery--single .page__gallery-item__img {
  height: 100%;

  object-fit: cover;
}

.page__gallery-item__img {
  position: relative;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.page__aside {
  position: sticky;
  top: var(--sizes-header-height);
  height: fit-content;
  min-height: var(--sizes-content-height);
  width: fit-content;
  min-width: 25ch;
  max-width: 30ch;
  border-left: var(--border);

  display: flex;
  flex-flow: column;
}

.aside__section {
  position: relative;
  padding: var(--padding);
  border-bottom: var(--border);
}

.aside__section p:not(:last-child) {
  margin-bottom: var(--sizes-paragraph-gap-section);
}

.aside__section-nav {
  color: var(--color-primary-muted);
  font-weight: var(--font-weight-bold);
}
