/* Reset */
body, h2, h3, p, span, a, button {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito Sans", sans-serif;
}

/* Banner Background */
.banner-background {
  background: linear-gradient(21.17deg, rgba(0, 51, 97, 1) 17.11%, rgba(231, 56, 18, 0) 60.2%),
              url("https://upload.wikimedia.org/wikipedia/commons/5/5b/Heinrich_Scherer%2C_Typus_Totius_Orbis_Terraquei_Geographice_Delineatus%2C_Et_Ad_Usum_Globo_Materiali_Superinducendus.jpg") center / cover no-repeat;
}

/* Teaser layout */
#teaser-image > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.teaser-image-span-bottom {
  line-height: 1.2;
  margin-bottom: 0;
}

/* Button */
#teaser-image button {
  background: black;
  color: white;
  border: none;
  padding: 0.4rem 1rem;
  margin: 0;
  cursor: pointer;
  transition: background 0.3s ease;
}
#teaser-image button:hover { background: #333; }

/* Custom Button with Icon */
.custom-button::after {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f35d";
  display: inline-block;
  margin-left: 10px;
  font-size: 15px;
  vertical-align: middle;
}
.custom-button {
  background-color: white;
  color: black;
  border: 2px double grey;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.custom-button:hover { background-color: black; color: white; }

#current-exhibition-text a {
  text-decoration: none;        
}

#current-exhibition-text a:hover,
#current-exhibition-text a:focus-visible {
  text-decoration: underline; 
}

/* ----------------------------------------
   Alle Ausstellungen – responsive layout
   ---------------------------------------- */

.alle-ausstellungen {
  display: grid;
grid-auto-columns:auto;
grid-template-columns:1fr 1fr;
  gap: 14px;
  align-items: stretch;
}


/* Card base */
.site.site-ulb-custom.custom-link {
  position: relative;
}

/* Ensure the card is a block with predictable sizing */
.site-thumbnail.site-custom {
  position: relative;
  overflow: hidden;
  border-radius: 6px; /* optional */
}

/* The thumbnail uses a background image, so give it an aspect ratio or min-height */
.site-custom-thumbnail {
  position: relative;
  background-size: cover;
  background-position: center;
  
}

/* Put the text on top of the image with a readable gradient */
.text-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;         

  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 70%);
  color: #fff;
height:10em;
  text-align: left;
}

/* Title and summary text */
.text-container span {
  display: block;
  color: white;
  font-weight: 700;
  line-height: 1.2;

  /* Scales between phones and desktop */
  font-size: clamp(1rem, 2.8vw, 1.25rem);
  text-wrap: balance; 
}

.site-summary {
  margin-top: 3rem;    
  margin-bottom: 0.2rem;
  font-size: clamp(0.85rem, 2.4vw, 1rem);
  line-height: 1.35;
  color: white;
padding-left:35px;
text-decoration:none;
}

/* Make the whole card tappable without hiding text */
.site.site-ulb-custom.custom-link > a {
  position: absolute;
  inset: 0;
  z-index: 1;              /* below the text */
  text-decoration: none;
  color: inherit;
}
.text-container { z-index: 2; } /* keep text above the overlay link */

/* Tablet */
@media (max-width: 992px) {
  .alle-ausstellungen {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
  }
  .site-custom-thumbnail {
    aspect-ratio: 4 / 3;
    min-height: 160px;
  }
}

/* Phones */
@media (max-width: 800px) {
.alle-ausstellungen {
  display: grid;
grid-auto-columns:auto;
grid-template-columns:1fr;
  gap: 14px;
  align-items: stretch;
}
}

/* Very narrow phones */
@media (max-width: 360px) {
  .alle-ausstellungen {
    grid-template-columns: 1fr;
  }
  .site-custom-thumbnail {
    min-height: 180px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-thumbnail.site-custom,
  .site-thumbnail.site-custom * {
    transition: none !important;
  }
}