/*
 * Copyright 2021 FIZ Karlsruhe - Leibniz-Institut fuer Informationsinfrastruktur GmbH
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.grid-container {
  height: fit-content;
  margin-bottom: 13px;
  display: grid;
  grid-template-columns: auto auto auto;
}

.grid-container .journal-element {
  position: relative;
  float: left;
  margin-bottom: 13px;
  cursor: pointer;
}

.journal-element .text-section .field--name-node-title,
.journal-element .text-section .field--name-node-title a {
  text-decoration: none !important;
}

.journal-element:hover .text-section .field--name-node-title,
.journal-element:hover .text-section .field--name-node-title a {
  text-decoration: underline !important;
  color: #a5003b;
}

.journal-element .form-group {
  margin-bottom: 0;
}

.grid-container .journal-element.side-block {
  width: 210px;
  height: 210px;
}

.grid-container #person-text-link .image-journal img {
  object-fit: cover;
  width: 100%;
}

.grid-container .journal-element.central-block {
  width: 400px;
  margin-right: 13px;
  margin-left: 13px;
}

.image-journal .media-image-media {
  width: 210px;
  height: 210px;
}

.image-journal .media-image-media img {
  margin: 0;
}

.image-journal .view-mode-rectangular-large-image {
  width: 400px;
}

.journal-element .text-section {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #e8eae9;
  opacity: 0.8;
  height: 50px;
  padding: 0 5px;
  overflow: hidden;
}

.journal-element .text-section .field--name-field-category,
.journal-element .text-section .overview-exhibition {
  font-size: 14px;
  font-weight: bold;
  line-height: 16px;
  text-transform: uppercase;
  color: #a5003b;
}

.journal-element .text-section .field--name-node-title {
  font-size: 14px;
  font-weight: bold;
  line-height: 16px;
}

.static-content h1.page-title {
  line-height: 1.3em;
}

.static-content .views-element-container .page-nav-result {
  color: #3e3a37;
}

.static-content .views-element-container .page-nav-result:hover {
  color: #a5003b;
}

.static-content .is-promoted p img {
  margin: 0 3px 0 0;
}

.static-content .is-promoted p img:last-of-type {
  margin: 0 10px 0 0;
}

.static-content .view-archiv-archive .field--name-node-post-date {
  font-size: 14px;
  line-height: 10px;
}

.static-content .page-info-nav ul {
  padding-left: 0;
  margin-left: 0;
}

.static-content .article-full .field--name-node-post-date {
  font-size: 14px;
}

.static-content .article-full .field--name-node-title .title {
  line-height: 1.3em;
  margin: 10px 0;
}

.content-container .static-marginal section:not(:first-child) {
  border-top: solid 2px #efebe8;
}

.static-marginal .block {
  padding-bottom: 15px;
}

.static-marginal .views-element-container {
  padding-bottom: 0;
}

.static-marginal .block-title {
  font-weight: bold;
  margin: 0 0 10px 0;
  font-size: 18px;
}

.static-marginal .views-label {
  font-weight: bold;
  margin: 0 0 5px 0;
  font-size: 0.875em;
}

.static-marginal .left-image .media-image-media img {
  margin: 0 5px 0 0;
  width: 80px;
}

.static-marginal .right-text {
  height: 80px;
  overflow: hidden;
}

.static-marginal .right-text .field--name-node-title .title {
  margin: 0 0 5px 0;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 0.700em;
}

.static-marginal .block-ddb-also-interest .right-text .field--name-node-title .title {
  margin: 0;
  white-space: normal;
  max-width: 100%;
  overflow: unset;
  text-overflow: initial;
  line-height: 16px;
  font-size: 14px;
}

.static-marginal .block-ddb-also-interest .right-text .field--name-node-title .title:hover {
  text-decoration: underline;
}

.static-marginal .block-ddb-also-interest a {
  text-decoration: none !important;
}

.static-marginal .right-text .field--name-field-category {
  font-size: 14px;
  line-height: 16px;
  text-transform: uppercase;
  color: #a5003b;
}

.static-marginal .right-text .field--name-field-category:hover {
  text-decoration: underline;
}

.static-marginal .right-text .field--type-text-with-summary {
  font-size: 0.875em;
  line-height: 1em;
  overflow: hidden;
  height: 56px;
}

.static-marginal .view-events .views-field-field-start-date,
.static-marginal .view-events .views-field-field-end-date {
  display: inline-block;
}

.static-marginal .view-events .views-field-operations {
  margin-top: 20px;
}

.static-marginal .view-events .views-field-operations a {
  text-decoration: none !important;
}

.static-marginal .views-exposed-form .control-label {
  font-family: Calibri, Arial, sans-serif;
  font-weight: bold;
  margin: 0 0 10px 0;
  font-size: 18px;
}

.static-marginal .views-exposed-form .form-item-search {
  width: 100%;
  margin-bottom: 0;
  vertical-align: baseline;
  display: inline-block;
}

.static-marginal .views-exposed-form .form-item-search input {
  width: 100%;
  height: 25px;
  padding-right: 25px;
}

.static-marginal .views-exposed-form .form-actions {
  vertical-align: baseline;
}

.static-marginal .views-exposed-form .form-actions button {
  width: 25px;
  border: none;
  font-family: Calibri, Arial, sans-serif;
  font-size: 0.938em;
  font-weight: bold;
  height: 25px;
  line-height: 25px;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
  overflow: hidden;
  background: none;
  margin: 0;
  border-radius: 0;
}

.static-marginal .views-exposed-form .form-actions button:before {
  display: inline-block;
  content: url("../img/search.png");
  margin: -150px 0 0 0;
}

.static-marginal .views-exposed-form .form-actions button:hover:before {
  margin: -200px 0 0 0;
}

.static-marginal .views-exposed-form .form-inline {
  position: relative;
}

.static-marginal .views-exposed-form .form-inline .form-actions {
  position: absolute;
  right: 0;
  bottom: 0;
  margin-bottom: 0;
}

/* Responsiveness */

@media (min-width: 992px) and (max-width: 1199px) {

  .grid-container .journal-element {
    height: 168px;
    margin-bottom: 10px;
  }

  .grid-container .journal-element.side-block {
    width: 168px;
    height: 168px;
  }

  .grid-container .journal-element.central-block {
    width: 338px;
    height: 168px;
    margin-right: 10px;
    margin-left: 10px;
  }

  .image-journal .media-image-media {
    width: 168px;
    height: 168px;
  }

  .image-journal .view-mode-rectangular-large-image {
    width: 338px;
    height: 168px;
  }

  .static-marginal .block-title {
    line-height: 1.2em;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .grid-container .journal-element {
    height: 127px;
    margin-bottom: 10px;
  }

  .grid-container .journal-element.side-block {
    width: 127px;
    height: 127px;
  }

  .grid-container .journal-element.central-block {
    width: 258px;
    margin-right: 10px;
    margin-left: 10px;
  }

  .image-journal .media-image-media {
    width: 127px;
    height: 127px;
  }

  .image-journal .view-mode-rectangular-large-image {
    width: 258px;
  }

  .static-marginal .block-title {
    line-height: 1.2em;
  }

  .static-marginal .right-text {
    height: inherit;
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .static-content .node--type-panel_page .row {
    margin: 0 auto;
  }

  .static-marginal .block-title {
    margin-top: 20px;
  }

  .grid-container {
    height: auto;
    margin-bottom: 8px;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -moz-flex;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .grid-container .journal-element {
    margin-bottom: 8px;
  }

  .grid-container .journal-element.side-block {
    width: auto;
    height: auto;
    max-height: 168px;
    max-width: 168px;
    -webkit-flex-order: 2;
    order: 2;
    margin-right: 8px;
    margin-left: 0;
  }

  .grid-container .journal-element.central-block {
    width: auto;
    max-width: 344px;
    -webkit-flex-order: 1;
    order: 1;
    margin-right: 8px;
    margin-left: 0;
  }

  .image-journal .media-image-media {
    width: auto;
    height: auto;
    max-height: 168px;
    max-width: 168px;
  }

  .image-journal .view-mode-rectangular-large-image {
    width: auto;
    max-width: 344px;
  }

  /* Ad-hoc oder change to alternate central and side blocks */
  #c1 {
    order: 2;
    grid-area: g2;
  }

  #c2 {
    order: 1;
    grid-area: g1;
  }

  #c3 {
    order: 3;
    grid-area: g3;
  }

  #c4 {
    order: 5;
    grid-area: g5;
  }

  #c5 {
    order: 4;
    grid-area: g4;
  }

  #c6 {
    order: 6;
    grid-area: g6;
  }

  #c7 {
    order: 8;
    grid-area: g8;
  }

  #c8 {
    order: 7;
    grid-area: g7;
  }

  #c9 {
    order: 9;
    grid-area: g9;
  }

  #c10 {
    order: 11;
    grid-area: g11;
  }

  #c11 {
    order: 10;
    grid-area: g10;
  }

  #c12 {
    order: 12;
    grid-area: g12;
  }

  #c13 {
    order: 14;
    grid-area: g14;
  }

  #c14 {
    order: 13;
    grid-area: g13;
  }

  #c15 {
    order: 15;
    grid-area: g15;
  }
}

@media (max-width: 595px) {

  .grid-container {
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "g1 g1" "g2 g3" "g4 g4" "g5 g6" "g7 g7" "g8 g9" "g10 g10" "g11 g12" "g13 g13" "g14 g15";
    width: fit-content;
    width: -moz-fit-content;
  }
}

@media (min-width: 595px) and (max-width: 767px) {
  .grid-container #person-text-link .image-journal img {
    width: 168px !important;
    height: 168px !important;
  }
}

/* Responsiveness - end */
