/* KSQ 2026 concept - landing page, scoped to body.home. */

body.home {
  --land-ink: #fff;
  --land-radius: 4px;
}

/* 1. The hero only takes the height its content needs. */
body.home .banner { height: auto; }

body.home .container-top,
body.home .banner .container-top {
  height: auto;
  min-height: 0;
  padding-bottom: .5rem;
}

body.home .banner-img { background-image: none; }

/* The row that holds the four widgets keeps no top gap of its own. */
body.home .row.page-section { margin-top: 0; padding-top: 0; }

/* Empty white card: the supplied media has no 2021 folder, so that image is broken.
   Give the card a face instead of a white void. */
body.home .widget-1.bg-white {
  background: linear-gradient(150deg, #0b3f74 0%, #04203d 100%);
}

/* 2. Cards are clickable. Each card already holds one link (the cover, the artist photo,
   the "Mehr"), so stretch that link over the whole card instead of adding a second target.
   The video card is left alone: an overlay would swallow the player's own controls. */
body.home .widget-1,
body.home .widget-2,
body.home .widget-3 {
  position: relative;
  cursor: pointer;
}

body.home .widget-1 a::after,
body.home .widget-2 a::after,
body.home .widget-3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

/* The ring follows the card, so keyboard focus is visible on the whole target. */
body.home .widget-1 a:focus-visible::after,
body.home .widget-2 a:focus-visible::after,
body.home .widget-3 a:focus-visible::after {
  outline: 2px solid #fff;
  outline-offset: -3px;
}

/* 3. Cards: no stroke, no stacking shadows. */
body.home .widget-1,
body.home .widget-2,
body.home .widget-3,
body.home .widget-4 {
  box-shadow: none;
  border: 0;
  border-radius: var(--land-radius);
  overflow: hidden;
}

body.home .page-section { padding-top: 0; }

/* The tilt is decoration; drop it when motion is reduced. */
@media (prefers-reduced-motion: reduce) {
  body.home .js-tilt-card {
    transform: none !important;
    transition: none !important;
  }

}

/* 4. Card posts (ksq_card). A card is one link with the title on a real gradient ground. */
.ksq-cards .ksq-card {
  display: block;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: var(--land-radius);
  text-decoration: none;
  color: inherit;
}

.ksq-cards .ksq-card:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* The parent sheet's `.container.content img { height: auto }` outranks a two-class selector, so the
   card image states the element and three classes to keep its height. */
.ksq-cards .ksq-card img.ksq-card__img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ksq-cards .ksq-card__title {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  /* Top padding makes room for the fade to finish above the text, so the scrim is already
     opaque where the letters sit instead of depending on how dark the picture is. */
  padding: 1.7rem 1rem .7rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: .01em;
  background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .80) 60%, rgba(0, 0, 0, 0) 100%);
}

/* A card with no image is a label tile, not a hole. */
.ksq-cards .ksq-card--empty {
  background: linear-gradient(135deg, #0a3f6b 0%, #003363 100%);
}

.ksq-cards .ksq-card--empty .ksq-card__title {
  inset: 50% 0 auto 0;
  transform: translateY(-50%);
  padding: 0 1.2rem;
  text-align: center;
  background: none;
}

.ksq-cards .ksq-card--wide {
  min-height: 220px;
}

.ksq-cards .ksq-card--wide .ksq-card__title {
  font-size: 1.15rem;
}

/* 5. Shapes. The parent theme's box utilities make height with a padded ::before, which leaves the
   card without a definite height, so the picture's height: 100% resolves to auto and the image is
   cropped from the top instead of filling the box. A card uses aspect-ratio and a definite height. */
.ksq-cards .ksq-card::before,
.ksq-cards .ksq-card__media::before {
  content: none;
}

.ksq-cards .box-square { aspect-ratio: 1 / 1; }
.ksq-cards .box-4-3 { aspect-ratio: 4 / 3; }
.ksq-cards .box-16-9 { aspect-ratio: 16 / 9; }
.ksq-cards .box-3-2 { aspect-ratio: 3 / 2; }
.ksq-cards .box-21-9 { aspect-ratio: 21 / 9; }
.ksq-cards .box-3-4 { aspect-ratio: 3 / 4; }
.ksq-cards .box-2-3 { aspect-ratio: 2 / 3; }
.ksq-cards .box-9-16 { aspect-ratio: 9 / 16; }

/* Natural: the picture sets the height and the title still sits on its lower edge. */
.ksq-cards .ksq-card.box-auto .ksq-card__img {
  position: static;
  height: auto;
}

.ksq-cards .ksq-card--empty.box-auto {
  min-height: 220px;
}

/* 6. A card with content: picture area on top, title and content underneath. */
.ksq-cards .ksq-card__media {
  display: block;
}

.ksq-cards .ksq-card--body {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #f1f4f8;
  color: #16222e;
}

.ksq-cards .ksq-card--body .ksq-card__body {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1rem 1.1rem 1.15rem;
}

.ksq-cards .ksq-card--body .ksq-card__title {
  position: static;
  inset: auto;
  padding: 0;
  background: none;
  color: #0a3f6b;
  font-size: 1.05rem;
  line-height: 1.3;
  text-decoration: none;
}

.ksq-cards .ksq-card--body .ksq-card__title:hover,
.ksq-cards .ksq-card--body .ksq-card__title:focus-visible {
  text-decoration: underline;
}

.ksq-cards .ksq-card__text {
  font-size: .95rem;
  line-height: 1.5;
}

.ksq-cards .ksq-card__text > :last-child {
  margin-bottom: 0;
}

.ksq-cards .ksq-card__text a {
  text-decoration: underline;
}

.ksq-cards .ksq-card__text img,
.ksq-cards .ksq-card__text iframe {
  max-width: 100%;
}

/* A card's video arrives inside two 16:9 wrappers: Bootstrap's embed-responsive band and the
   embed-video-thumbnail plugin's ikn-evt-container, which stacked and made the card exactly double
   height. The iframe is the box now, so one ratio holds no matter which wrapper the embed brings. */
.ksq-cards .ksq-card__text iframe {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}

.ksq-cards .ksq-card__text .embed-responsive::before {
  content: none;
}

.ksq-cards .ksq-card__text .ikn-evt-container {
  position: static;
  height: auto;
  padding: 0;
}

