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

.text.blur-bottom-right,
.text.blur-bottom-left,
.text.blur-top-right,
.text.blur-top-left{
  position: relative;
  overflow:hidden;
}
.text.blur-bottom-right:after{
    content: '';
    width: 800px;
    height: 800px;
    display: block;
    background: radial-gradient(circle,rgba(182, 247, 58, 0.5) 0%, rgba(182, 247, 58, 0) 100%);
    position: absolute;
    bottom:-40%;
    right: -7.5%;
    filter: blur(70px);
    -webkit-filter: blur(70px);
    z-index: 0;
    border-radius: 50%;
    opacity: .6;
}
.text.blur-bottom-left:after{
    content: '';
    width: 800px;
    height: 800px;
    display: block;
    background: radial-gradient(circle,rgba(182, 247, 58, 0.5) 0%, rgba(182, 247, 58, 0) 100%);
    position: absolute;
    bottom:-40%;
    left: -7.5%;
    filter: blur(70px);
    -webkit-filter: blur(70px);
    z-index: 0;
    border-radius: 50%;
    opacity: .6;
}
.text.blur-top-right:after{
    content: '';
    width: 800px;
    height: 800px;
    display: block;
    background: radial-gradient(circle,rgba(182, 247, 58, 0.5) 0%, rgba(182, 247, 58, 0) 100%);
    position: absolute;
    top:-40%;
    right: -7.5%;
    filter: blur(70px);
    -webkit-filter: blur(70px);
    z-index: 0;
    border-radius: 50%;
    opacity: .6;
}
.text.blur-top-left:after{
    content: '';
    width: 800px;
    height: 800px;
    display: block;
    background: radial-gradient(circle,rgba(182, 247, 58, 0.5) 0%, rgba(182, 247, 58, 0) 100%);
    position: absolute;
    top:-40%;
    left: -7.5%;
    filter: blur(70px);
    -webkit-filter: blur(70px);
    z-index: 0;
    border-radius: 50%;
    opacity: .6;
}

/* Main */

.text-block-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.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!important;
  flex-direction: row!important;
  flex-wrap:wrap!important;
  gap: 1.5rem!important;
}

.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;
  display:none;
}

.link-list-link {
    font-size:100%;
    color:var(--brand-primary-color);
    text-transform:uppercase;
    font-weight:900;
    background:var(--brand-secondary-color);
    padding: 0.75rem 2rem;
    border-radius: 15px;
}
.link-list-link:hover {
  background:color-mix(in srgb, var(--brand-secondary-color) 90%, black);
}
.link-list-item:nth-child(2) .link-list-link{
  color:var(--brand-secondary-color);
  border:solid 2px var(--brand-secondary-color);
  background:none;
}


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

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

.text-block-gallery.gallery-count-1 .img-1 {
  grid-column: 1;
  grid-row: 1;
  border-radius: 20px;
}

/* 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 {
  border-radius: var(--bs-border-radius, 0.375rem);
}

/* 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);
}


/* Aufzahlung Content */

.text-block-aufzahlung .item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  background:var(--brand-primary-color);
  padding:15px 25px;
  border-radius:10px;
  gap:15px;
}
.text-block-aufzahlung .item .icon img{
   transition:all 0.3s ease-in-out;
   max-width:75px;
}
.text-block-aufzahlung .item .icon-list-heading{
  font-size:100%;
  text-transform:uppercase;
  font-weight:900;
  color:var(--white);
  transition:all 0.3s ease-in-out;
}
.text-block-aufzahlung .item .icon-list-text{
  font-size:100%;
  color:var(--white);
  margin-bottom:0;
  transition:all 0.3s ease-in-out;
}
.text-block-aufzahlung .item:hover{
  background:var(--brand-secondary-color);
  transition:all 0.3s ease-in-out;
}
.text-block-aufzahlung .item:hover .icon img{
   filter: brightness(0) saturate(100%) invert(12%) sepia(19%) saturate(1597%) hue-rotate(121deg) brightness(88%) contrast(95%);
   transition:all 0.3s ease-in-out;
}
.text-block-aufzahlung .item:hover .icon-list-heading,
.text-block-aufzahlung .item:hover .icon-list-text{
  color:var(--brand-primary-color);
  transition:all 0.3s ease-in-out;
}

.text-block-kachel{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:15px;
  margin-bottom:50px;
}
.text-block-kachel .item {
  background:var(--green);
  padding:40px;
  border-radius:10px;
  flex:0 0 auto;
  width:calc(50% - 10px);
  position:relative;
  z-index:1;
}
.text-block-kachel .item.image-item{
  padding:0;
}
.text-block-kachel .item.image-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:10px;
}
.text-block-kachel .item .icon{
  display:flex;
  justify-content:end;
}
.text-block-kachel .item .text{
  margin-top:15px;
}
.text-block-kachel .item .text .text-heading{
  display:block;
  margin-bottom:10px;
  font-weight:900;
  color:var(--white);
  font-size:100%;
}
.text-block-kachel .item .text .text-text{
  color:var(--white);
}
.text-block-kachel .item .text .btn{
  margin-top:15px;
  text-transform: uppercase;
  font-size:85%;
  font-weight:900;
  width:100%;
}

.text-block-kachel .item:nth-child(2n+1) {
  margin:50px 0 0px !important;
}
.text-block-kachel .item:nth-child(2n-1) {
  margin:50px 0 -50px !important;
}
/* .text-block-kachel .item:nth-child(3n) {
  margin-top:-100px!important;
} */

.zusatzwrapper{
  margin-top:20px;
  width:75%;
}
.text-block-content .zusatzwrapper{
  margin-top:200px;
}
.zusatzwrapper .content{
  margin:25px 0;
}
.zusatzwrapper .image{
  display:flex;
  align-items:center;
}
.zusatzwrapper .image img{
  width:35%;
}
.zusatzwrapper .image .bildhinweis{
  width:65%;
  font-size:85%;
  font-weight:900;
  color:var(--brand-secondary-color);
  padding-left:15px;
}

.text-block-video .text-block-video{
  height:500px;
  overflow:hidden;
  border-radius:15px;
}
.text-block-video .text-block-video video,
.text-block-video .text-block-video iframe{
  display:block;
  width:100%;
  height:100%;
  border:0;
  border-radius:15px;
}
.text-block-video .text-block-video video{
  object-fit:cover;
}

/* Abweichungen */

#hero{
  padding-top:10rem!important;
  padding-bottom:10rem!important;
}

#withbadgebottom{
  padding-bottom:15rem;
  position: relative;
}
#withbadgebottom:before{
  content:'';
  display:block;
  width:315px;
  height:315px;
  background:url('../../assets/img/badge.webp');
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  position:absolute;
  bottom:0;
  left:30%;
  transform:rotate(-10deg);
  z-index: 9;
}
#withbadgetop{
  position: relative;
}
#withbadgetop:before{
  content:'';
  display:block;
  width:315px;
  height:315px;
  background:url('../../assets/img/badge.webp');
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
  position:absolute;
  top:0;
  left:5%;
  transform:rotate(-10deg) translateY(-50%);
  z-index:9;
}

.text-block-animated-icons .animated-icon.item1{
  position:absolute;
  top:10%;
  left:35%;
  /* animation: floatMove 3s ease-in-out infinite; */
}
.text-block-animated-icons .animated-icon.item2{
  position:absolute;
  top:20%;
  left:42.5%;
  /* animation: floatMove 5s ease-in-out infinite; */
}
.text-block-animated-icons .animated-icon.item3{
  position:absolute;
  top:70%;
  left:37.5%;
  /* animation: floatMove 7s ease-in-out infinite; */
}

.text-block-productwrapper{
  padding:50px;
  border-radius:15px;
  background:var(--green);
}
.text-block-productwrapper .headline{
  color:var(--white);
  font-size:250%;
  font-weight:900;
  line-height:1.2;
  text-transform:uppercase;
}
.text-block-productwrapper .topline,
.text-block-productwrapper .inhalt{
  color:var(--white);
  line-height:1.8;
}
.text-block-productwrapper .price{
  color:var(--white);
  font-size:250%;
  display:block;
  padding-top:15px;
  margin-top:35px;
  border-top:solid 1px var(--white);
}
.text-block-productwrapper .pricehint{
  color:var(--white);
}

.text-block-productwrapper .btn.light{
  color:var(--brand-secondary-color);
  border:solid 2px var(--brand-secondary-color);
  background:none;
  font-size:100%;
  font-weight:900;
  padding:0.75rem 2rem;
  text-transform:uppercase;
  border-radius:15px;
  margin-top:25px;
}

@keyframes floatMove {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-6px, -4px);
  }
  50% {
    transform: translate(5px, 3px);
  }
  75% {
    transform: translate(-3px, 5px);
  }
  100% {
    transform: translate(0, 0);
  }
}



/* Responsive Adjustments */

@media (min-width: 1921px) {
  #withbadgebottom::before{
    left:35%;
    width: 275px;
    height: 275px;
  }
}

@media (max-width: 1480px) {
  #withbadgebottom{
    padding-bottom:10rem;
  }
  #withbadgebottom::before{
    width:225px;
    height:225px;
  }
  .text-block-kachel .item{
    padding:25px;
  }
  .text-block-gallery{
    min-height: 300px;
  }
  .text-block-productwrapper .headline{
    font-size:225%;
  }
}
@media(max-width:1199px){
  #withbadgebottom::before{
    left:25%;
  }
  .text-block-productwrapper{
    padding:20px;
  }
  .text-block-productwrapper .headline{
    font-size:200%;
  }
}

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

  #hero{
    padding-top:7.5rem!important;
    padding-bottom:2.5rem!important;
  }
  .text-block-animated-icons .animated-icon.item1{
    top:1.5%;
    left:15%;
  }
  .text-block-animated-icons .animated-icon.item2{
    top:5%;
    left:75%;
  }
  .text-block-animated-icons .animated-icon.item3{
    top:35%;
    left:80%;
  }

  #withbadgebottom{
    padding-bottom:2.5rem;
  }
  #withbadgebottom::before{
    width:175px;
    height:175px;
    top:0px;
    right:15px;
    left:unset;
    bottom:unset;
  }
  .text-block-content .zusatzwrapper{
    margin:25px 0;
  }
}

@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;
  }
}
@media (max-width: 575px) {

  #withbadgebottom::before{
    width:100px;
    height:100px;
    top:-50px;
  }

  #hero{
    padding-top:2.5rem!important;
    padding-bottom:2.5rem!important;
  }
  .text-block-animated-icons{
    display:none;
  }
  .link-list-link{
    font-size:90%;
    padding:0.75rem;
    border-radius:10px;
  }
  .text-block-kachel .item{
    width:100%;
    margin: 0!important;
  }
  .text-block-kachel .item:nth-child(2){
    margin-top:0!important;
  }
  .text-block-kachel .item:nth-child(3){
    margin-top:0!important;
  }
  .text-block-kachel .item:nth-child(2n-1), 
  .text-block-kachel .item:nth-child(2n+1){
    margin:0!important;
  }
  .text-block-productwrapper .topline{
    font-size:95%;
  }
}
@media (max-width: 400px) {
  .link-list-link{
    font-size:85%;
  }
  .text-block-productwrapper .topline{
    font-size:80%;
  }
  .text-block-productwrapper .headline{
    font-size:175%;
  }
  .text-block-productwrapper .btn.light{
    max-width:100%;
    font-size:90%;
  }
}
