/**
 * Text Block Styles
 * 
 * Flexible text block with optional gallery or shortcode
 * Supports 3 layouts: text-only, text+images, text+shortcode
 */

/* Text Content */
.text-block-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.text-block-content.texttop {
  justify-content: start;
}
.text-block-content.textcenter {
  justify-content: center;
}
.text-block-content.textend {
  justify-content: end;
}


.text-block-content.mitzitat{
  padding:50px 0;
}

.text-block-content.mitbild{
  padding:75px;
  padding-right:125px;
}

.text-block-content.mitbild.gespiegelt{
  padding:75px;
  padding-left:125px;
}

.text-content {
  margin-bottom: 2rem;
}

.text-content ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.text-content ol {
  padding-left: 1.5rem;
  list-style: decimal;
}

.text-content ul li,
.text-content ol li {
  margin-bottom: 0.5rem;
}

/* Link List (Buttons) */
.link-list {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.link-list-item {
  position: relative;
  padding-bottom: 1rem;
}

.link-list-item:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 2px;
  background-color: var(--bs-gray-200, #e9ecef);
  border-radius: 2px;
}

.link-list-link {
  font-size: 1rem;
  font-weight: 600;
  font-style: italic;
  text-transform: uppercase;
  text-decoration: none;
  color: currentColor;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.link-list-link:hover {
  color: var(--brand-secondary-color, var(--bs-primary, #0d6efd));
}

.link-list-link::after {
  content: '→';
  font-style: normal;
  font-weight: 400;
}

/* Image Gallery */
.text-block-gallery {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 400px;
  gap: 1.25rem;
  margin: 0;
}

/* Single image (1 image) */
.text-block-gallery.gallery-count-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  align-items:center;
}

.text-block-gallery.gallery-count-1 .img-1 {
  grid-column: 1;
  grid-row: 1;
}

/* Two images layout */
.text-block-gallery.gallery-count-2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr 1fr;
}

.text-block-gallery.gallery-count-2 .img-1 {
  grid-column: 1 / -1;
  grid-row: 1;
}

.text-block-gallery.gallery-count-2 .img-2 {
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Three or four images layout (advanced grid) */
.text-block-gallery.gallery-count-3,
.text-block-gallery.gallery-count-4 {
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
}

/* 3+ images: Large hero image */
.text-block-gallery .img-1 {
  grid-column: 1 / span 8;
  grid-row: 1 / span 5;
}

/* 3+ images: Bottom right small */
.text-block-gallery .img-2 {
  grid-column: 6 / span 3;
  grid-row: 6 / span 3;
}

/* Image 3: Bottom left small */
.text-block-gallery .img-3 {
  grid-column: 1 / span 3;
  grid-row: 6 / span 3;
}

/* Image 4: Bottom center (only if 4 images) */
.text-block-gallery .img-4 {
  grid-column: 4 / span 2;
  grid-row: 6 / span 3;
}

/* All gallery images */
.text-block-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

/* Shortcode Content */
.text-block-shortcode {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 2rem;
  background-color: var(--bs-light, #f8f9fa);
  border-radius: var(--bs-border-radius-lg, 0.5rem);
}

.text-block-picture .bild{padding:0;}


.text-block-zitat .zitat{display:block;width:75%;text-align:center;font-size:200%;font-weight:800;line-height:1.2;margin:0 auto 10px;}
.text-block-zitat .name{display:block;width:100%;text-align:center;font-size:100%;font-weight:400;}

.text-block-picture .mitbild .icon{max-width:200px;}
.text-block-picture .paddingzero{padding:0;}


/* Abweichungen */

#willkommen{margin:0;padding-top:2.5rem;}

#anwendung .text-block-content.mitbild{padding-top:0;padding-left:0;}


/* Responsive Adjustments */


@media (max-width: 991px) {
  .text-block-gallery {
    min-height: 300px;
  }
  
  .text-block-shortcode {
    min-height: 200px;
    padding: 1.5rem;
  }

  .text-block-content.mitbild{
    padding:15px 0;
  }
  .text-block-content.mitbild.gespiegelt{
    padding:15px 0;
  }
  .text-block-picture .paddingzero{
    padding:0 15px;
  }
}

@media (max-width: 767px) {
  .text-block-gallery.gallery-count-3,
  .text-block-gallery.gallery-count-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    min-height: auto;
  }
  
  .text-block-gallery .img-1,
  .text-block-gallery .img-2,
  .text-block-gallery .img-3,
  .text-block-gallery .img-4 {
    grid-column: span 1;
    grid-row: auto;
    aspect-ratio: 4/3;
  }
  
  .link-list {
    gap: 1rem;
  }
  
  .link-list-item {
    padding-bottom: 0.75rem;
  }

  .text-block-zitat .zitat{
    font-size: 150%;
    width:100%;
  }

}