/*****************************************************************************************************
* Postloops Module: Smartbox CSS
******************************************************************************************************/

/*
Grid Containers
---------------------------------------------------------------------------------------------------- */

/* Containers: Default
--------------------------------------------- */

.bub-loop.smartbox {
  align-items: flex-start;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
}


/*
Grid Columns
---------------------------------------------------------------------------------------------------- */

/* Columns and Rows: wp-Post, cpt-Event and cpt-Content
--------------------------------------------- */

/* The blog, the events and the contents instead of masonry grids of cards
   (user, 2026-10-21; the contents 2026-10-23). Each item is a grid of its
   own, in which the header's parts take their places (elements below). On
   hover the title is underlined. */

:is(.blog.archive, .archive-bub_event, .archive-bub_content) .bub-loop.smartbox .entry {
  display: grid;
  grid-template-rows: auto auto 1fr;
}

:is(.blog.archive, .archive-bub_event, .archive-bub_content) .bub-loop.smartbox .entry-header {
  display: contents;
}

:is(.blog.archive, .archive-bub_event, .archive-bub_content) .bub-loop.smartbox .entry-footer {
  display: none;
}

:is(.blog.archive, .archive-bub_event, .archive-bub_content) .bub-loop.smartbox .entry:hover .entry-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

/* The blog: the first post of the page across both columns, the others in
   two columns with hairlines; one column up to 1000px. The contents the same,
   without a larger first one. */

:is(.blog.archive, .archive-bub_content) .bub-loop.smartbox {
  align-items: stretch;
  column-gap: 3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 2rem;
}

:is(.blog.archive, .archive-bub_content) .bub-loop.smartbox .entry {
  border-bottom: 1px solid var(--body-background-dk2);
  column-gap: 1.5rem;
  grid-template-columns: 7rem minmax(0, 1fr);
  padding: 1.75rem 0;
}

.blog.archive .bub-loop.smartbox .entry:first-child {
  border-top: 1px solid var(--body-background-dk2);
  column-gap: 3rem;
  grid-column: 1 / -1;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 2rem 0;
}

/* The events: one per row between hairlines, as the blog and the front
   page's event list (user, 2026-10-22, trial G; before, every other row in
   the small tint). On phones the date stands above the town (elements
   below). */

.archive-bub_event .bub-loop.smartbox {
  display: block;
  margin: 0 0 2rem;
}

.archive-bub_event .bub-loop.smartbox .entry {
  border-bottom: 1px solid var(--body-background-dk2);
  column-gap: 3rem;
  grid-template-columns: 10rem minmax(0, 1fr) 4.5rem;
  padding: 1.5rem 0;
}

.archive-bub_event .bub-loop.smartbox .entry:first-child {
  border-top: 1px solid var(--body-background-dk2);
}

@media screen and (max-width: 1000px) {

  :is(.blog.archive, .archive-bub_content) .bub-loop.smartbox {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 600px) {

  :is(.blog.archive, .archive-bub_content) .bub-loop.smartbox .entry,
  .blog.archive .bub-loop.smartbox .entry:first-child {
    column-gap: 1rem;
    grid-template-columns: 5rem minmax(0, 1fr);
  }

  .archive-bub_event .bub-loop.smartbox .entry {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
  }
}


/* Columns: cpt-Product 
--------------------------------------------- */

/* 3 Columns */

.archive-bub_product .bub-loop.smartbox {
  margin: -10px;
}

.archive-bub_product .bub-loop.smartbox .entry {
  margin: 10px;
  width: calc(33.333% - 20px);
}

@media screen and (max-width: 1000px) {

  /* 2 Columns */

  .archive-bub_product .bub-loop.smartbox .entry {
    width: calc(50% - 20px);
  }
}

@media screen and (max-width: 650px) {

  /* 1 Column */

  .archive-bub_product .bub-loop.smartbox .entry {
    max-width: 600px;
    position: static !important;
    width: 100%;
  }
}


/* Columns: cpt-Party
--------------------------------------------- */

/* 4 Columns, 32px apart and rows 30px apart, as the title archive's
   (postloops-imagebox.css; user, 2026-10-21; before, 20px both). */

.archive-bub_party .bub-loop.smartbox {
  margin: -10px -16px;
}

.archive-bub_party .bub-loop.smartbox .entry {
  margin: 10px 16px 1.25rem;
  width: calc(25% - 32px);
}

@media screen and (max-width: 1000px) {

  /* 3 Columns */

  .archive-bub_party .bub-loop.smartbox .entry {
    width: calc(33.333% - 32px);
  }
}

@media screen and (max-width: 650px) {

  /* 2 Columns, on phones too */

  .archive-bub_party .bub-loop.smartbox .entry {
    width: calc(50% - 32px);
  }
}


/*
Grid Elements
---------------------------------------------------------------------------------------------------- */

/* Elements: Default
--------------------------------------------- */

/* Full Element: on the page's background, without a card, as the title
archive's covers (postloops-imagebox.css; user, 2026-10-21; before, a white
card with a shadow and 20px padding). Items with text stand 2.5rem apart
(columns above). */

.bub-loop.smartbox .entry {
  display: flex;
  flex-flow: column nowrap;
  vertical-align: top;
}

/* Entry Header */

.bub-loop.smartbox .entry-header {
  flex: 0 0 auto; /* ie 11 */
  margin: 0;
  position: relative;
}

/* Featured Image */

.bub-loop.smartbox .featimg {
  margin: 0;
}

/* Images are fitted, never cropped: the whole image on a light tint of the
dark green, in a box of at most 340px or of the ratio a post type sets
below, so the items of the blog and events line up (user, 2026-10-21;
without the box they looked unstyled). People show their photo at its own
ratio instead (below). */

.bub-loop.smartbox .featimg__image {
  background: var(--body-background-sh1);
  height: auto;
  margin: 0;
  max-height: 340px;
  object-fit: contain;
  width: 100%;
}

/* Entry Title, at 600 as the headings and at 1.0625rem as the titles of the
contents' archive and the names in the sections (user, 2026-10-21:
consistency); its link takes the weight, since text.css sets links to
normal. */

.bub-loop.smartbox .entry-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.375rem;
  text-align: left;
}

.bub-loop.smartbox .entry-title a {
  font-weight: inherit;
}

/* Entry Meta */

.bub-loop.smartbox .entry-meta {
  font-size: 13px;
  margin: 0;
}

.bub-loop.smartbox .entry-meta a:not(:hover) {
  color: inherit;
}

/* Entry Content */

.bub-loop.smartbox .entry-content {
  flex: 0 0 auto; /* ie 11 */
}

.bub-loop.smartbox .entry-content p:last-child {
  margin-bottom: 0;
}

/* "Mehr" as the small tinted boxes in capitals of the sections, such as
"Zur Seite" (design-general.css; user, 2026-10-21; before, an underlined
link on the right). */

.bub-loop.smartbox .more-link {
  display: table;
  margin: 0.75rem 0 0;
}

.bub-loop.smartbox .more-link a {
  background: var(--body-background-sh1);
  box-shadow: none;
  color: var(--brand1-color-def);
  display: inline-block;
  font-family: var(--caps-font-family);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
  padding: 0.45em 0.8em 0.4em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bub-loop.smartbox .more-link a:hover {
  background: var(--body-background-sh2);
  color: var(--brand1-color-def);
}


/* Elements: wp-Post and cpt-Content
--------------------------------------------- */

/* Date and categories above the title, for contents their kind
   (postloops-config.php), as the role labels of the title pages. On the left
   the image at its own ratio, without the box, or for a post without image
   its title's initial in the spot font on the small tint
   (postloops-config.php; user, 2026-10-21: not the usual default picture).
   Text lines stay at a readable length. */

:is(.blog.archive, .archive-bub_content) .bub-post-archive-meta {
  color: var(--brand1-color-def);
  font-family: var(--caps-font-family);
  font-size: 0.75rem;
  font-weight: 600;
  grid-column: 2;
  grid-row: 1;
  letter-spacing: 0.1em;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

:is(.blog.archive, .archive-bub_content) .bub-loop.smartbox .entry-title {
  grid-column: 2;
  grid-row: 2;
}

/* The text at the archives' normal size (user, 2026-10-21; smaller sizes
   were tried). */

:is(.blog.archive, .archive-bub_content) .bub-loop.smartbox .entry-content {
  grid-column: 2;
  grid-row: 3;
}

:is(.blog.archive, .archive-bub_content) :is(.bub-post-archive-meta, .entry-title, .entry-content) {
  max-width: 42rem;
}

:is(.blog.archive, .archive-bub_content) .bub-loop.smartbox :is(.featimg, .bub-post-archive-initial) {
  grid-column: 1;
  grid-row: 1 / span 3;
  margin: 0;
}

:is(.blog.archive, .archive-bub_content) .bub-loop.smartbox .featimg__image {
  background: none;
  box-shadow: var(--cover-shadow-sm); /* setup.css */
  max-height: 8rem;
  max-width: 100%;
  width: auto;
}

.bub-post-archive-initial {
  align-items: center;
  align-self: start;
  background: var(--body-background-sh1);
  color: var(--brand1-color-def);
  display: flex;
  font: var(--spot-font-def);
  font-size: 4rem;
  height: 8rem;
  justify-content: center;
  line-height: 1;
  text-transform: uppercase;
}

/* The first post larger, its title included (user, 2026-10-21), its image
   at most 16rem wide and 12rem high, so portrait, square and landscape
   images all stay moderate, and its column as wide as the image (user:
   half the width was too big). */

.blog.archive .bub-loop.smartbox .entry:first-child .featimg__image {
  box-shadow: var(--cover-shadow-def); /* setup.css */
  max-height: 12rem;
  max-width: 16rem;
}

.blog.archive .bub-loop.smartbox .entry:first-child .bub-post-archive-initial {
  font-size: 6rem;
  height: 12rem;
  width: 16rem;
}

/* The larger title only beside the two columns; in one column the first
   post's title takes the others' size (user, 2026-10-21). */

@media screen and (min-width: 1001px) {

  .blog.archive .bub-loop.smartbox .entry:first-child .entry-title {
    font-size: 1.5rem;
  }
}

@media screen and (max-width: 600px) {

  :is(.blog.archive, .archive-bub_content) .bub-loop.smartbox .entry .featimg__image,
  .blog.archive .bub-loop.smartbox .entry:first-child .featimg__image {
    box-shadow: var(--cover-shadow-sm); /* setup.css */
    max-height: 7rem;
  }

  .bub-post-archive-initial,
  .blog.archive .bub-loop.smartbox .entry:first-child .bub-post-archive-initial {
    font-size: 3rem;
    height: 6rem;
    width: auto;
  }
}


/* Elements: cpt-Event
--------------------------------------------- */

/* The date block (postloops-config.php): the date in bold green at about the
   title's size, as the front page's event list, the weekday and a year other
   than the current one below in grey. The column holds every single date and
   every range within one month on one line; each half of a range stays on
   one line, so a range across two months breaks after its dash. */

.archive-bub_event .bub-event-archive-date {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.bub-event-archive-date__date {
  color: var(--brand1-color-def);
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.bub-event-archive-date__part {
  white-space: nowrap;
}

.bub-event-archive-date__second {
  color: var(--body-color-acc);
  display: block;
  font-size: 0.9375rem;
  margin-top: 0.2rem;
}

/* The location as a small grey label above the title, as the town in the
   front page's event list, then the title and the description. The info
   line's date is hidden visually but kept for screen readers, which skip the
   date block. */

.archive-bub_event .bub-loop.smartbox .bub-event-archive-info {
  color: var(--body-color-acc);
  font-family: var(--caps-font-family);
  font-size: 0.75rem;
  grid-column: 2;
  grid-row: 1;
  letter-spacing: 0.08em;
  line-height: 1.3;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.archive-bub_event .bub-loop.smartbox .entry-title {
  grid-column: 2;
  grid-row: 2;
  margin-bottom: 0.25rem;
}

.archive-bub_event .bub-event-archive-info__date {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.archive-bub_event .bub-event-archive-info__separator {
  display: none;
}

.archive-bub_event .bub-loop.smartbox .entry-content {
  grid-column: 2;
  grid-row: 3;
}

.archive-bub_event :is(.entry-title, .bub-event-archive-info, .entry-content) {
  max-width: 42rem;
}

/* The cover of the event's title on the row's right edge. */

.bub-event-archive-cover {
  grid-column: 3;
  grid-row: 1 / span 3;
}

.bub-event-archive-cover img {
  box-shadow: var(--cover-shadow-sm); /* setup.css */
  display: block;
  height: auto;
  width: 4.5rem;
}

/* On phones one column: date and weekday on one line above the town, the
   cover left out. */

@media screen and (max-width: 600px) {

  .archive-bub_event .bub-event-archive-date {
    align-items: baseline;
    column-gap: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    grid-row: 1;
    margin: 0 0 0.5rem;
  }

  .bub-event-archive-date__date {
    font-size: 1rem;
  }

  .bub-event-archive-date__second {
    font-size: 0.875rem;
    margin: 0;
  }

  .archive-bub_event .bub-loop.smartbox .bub-event-archive-info {
    grid-column: 1;
    grid-row: 2;
  }

  .archive-bub_event .bub-loop.smartbox .entry-title {
    grid-column: 1;
    grid-row: 3;
  }

  .archive-bub_event .bub-loop.smartbox .entry-content {
    grid-column: 1;
    grid-row: 4;
  }

  .bub-event-archive-cover {
    display: none;
  }
}


/* Elements: cpt-Product
--------------------------------------------- */

/* Full Element */

.archive-bub_product .bub-loop.smartbox .entry {
  padding: 0;
}

/* Featured Image */

.archive-bub_product .bub-loop.smartbox .featimg__image {
  max-width: 100%;
  height: 240px;
  width: 100%;
}

/* Entry Title */

.archive-bub_product .bub-loop.smartbox .bub-product-archive-item-info {
  padding: 0 20px;
}

.archive-bub_product .bub-loop.smartbox .bub-product-archive-item-info a {
  text-decoration: none;
}

.archive-bub_product .bub-loop.smartbox .bub-product-archive-item-info__title {
  font-size: 1rem;
  font-weight: bold;
  margin: 12px 0 5px;
  text-align: left;
}

/* Entry Content */

.archive-bub_product .bub-loop.smartbox .entry-content {
  padding: 0 20px 20px;
}


/* Elements: cpt-Party
--------------------------------------------- */

/* Featured Image: the full width at the photo's own ratio, as the title
archive's covers (user, 2026-10-21; before, a 4:5 box). */

.archive-bub_party .bub-loop.smartbox .featimg__image {
  box-shadow: var(--cover-shadow-def); /* setup.css */
  max-height: none;
  transition: transform 200ms;
  width: 100%;
}

/* On hover the photo lifts a little, as the title archive's covers
   (postloops-imagebox.css) and the covers in the sections (object.css), so
   every list of pictures that leads to a page answers the same way (user,
   2026-10-22; before, nothing but the pointer). The hover sits on the entry,
   which does not move, so the photo cannot flicker at its edges. */

.archive-bub_party .bub-loop.smartbox .entry:hover .featimg__image {
  transform: translateY(-3px);
}

/* Entry Title: the name in the text font, as the title archive's captions
(postloops-imagebox.css; user, 2026-10-21; before, capitals on a white bar). */

.archive-bub_party .bub-loop.smartbox .entry-title {
  color: var(--body-color-def);
  font: var(--basic-font-def);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  padding: 0.75rem 0 0;
}
