html {
  scroll-behavior: smooth;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-dark);
    font-size: 0.8rem;
}

h1, h2, h3, h4 {
  margin-top: 0;
  padding-top: 2rem;
  color: var(--accent-soft1);
}

h1 {
  font-size: 2.3rem !important;
}

hr {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.gap-1{
  gap: 1rem;
}

.gap-2{
  gap: 2rem;
}

.justify-center{
  justify-content: center;
}

.justify-between{
  justify-content: space-between;
}

.justify-around{
  justify-content: space-around;
}

.justify-evenly{
  justify-content: space-evenly;
}

.align-center{
  align-items: center;
}

.align-start{
  align-items: flex-start;
}

.align-end{
  align-items: flex-end;
}

section.section {
  position: relative;
  background-color: var(--primary-bg);
  color: var(--text-dark);
}

section.section:nth-child(2){
  margin-top: 4rem;
}

section.section:nth-of-type(2n){  
  padding-inline: 0;
  background-color: var(--secondary-bg);
  background-image: var(--section-bg-svg-url);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  /* color: var(--text-light); */
  color: var(--text-dark);
}

section.section:nth-of-type(2n):not(.hero)::before{
  content: "";
  display: block;
  width: 100%;
  height: 80px;
  position: relative;
  left: 0px;
  top: -1px;
  background: var(--primary-bg);
  transform: scaleY(-1);
  -webkit-mask-image: var(--section-divider-svg-url, url('/user/themes/horizon/images/divider-1.svg'));
  mask-image: var(--section-divider-svg-url, url('/user/themes/horizon/images/divider-1.svg'));
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}

section.section:nth-of-type(2n)::after{
  padding-inline: -1rem;
  content: "";
  display: block;
  width: 100%;
  height: 80px;
  position: absolute;
  left: 0;
  bottom: -1px;
  background: var(--primary-bg);
  -webkit-mask-image: var(--section-divider-svg-url, url('/user/themes/horizon/images/divider-1.svg'));
  mask-image: var(--section-divider-svg-url, url('/user/themes/horizon/images/divider-1.svg'));
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none
}

.no-list-style {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ar-5-4{
  aspect-ratio: 5/4;
  object-fit: cover;
}

/* Button */
.btn {
  height: 3rem;
  display: inline-block;
  color: var(--text-dark);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1.5rem;
  transition: var(--transition);
  border: 2px solid var(--highlight);
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);

}

.btn.cta {
  background: var(--highlight);
  color: var(--primary-bg);
  border: none;
}

.btn.small {
  height: 2rem;
  font-size: 0.8rem;
  line-height: 1rem;
  padding: 0.4rem 1rem;
}

.btn:hover {
  transform: scale(1.01);
  border: 2.4px solid var(--highlight);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn.cta:hover {
  transform: scale(1.02);
  border: 3px solid var(--highlight);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  font-size: 1.01rem;
}

.sd-xs {
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.sd-s {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sd-m {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.sd-l {
  box-shadow: 0 11px 25px rgba(0, 0, 0, 0.6);
}

/* Input */
input {
  height: 2rem;
  display: inline-block;
  color: var(--text-dark);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  transition: var(--transition);
  border: 1px solid var(--highlight);
  cursor: pointer;
  font-size: 0.8rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

input:focus{
  outline-color: var(--highlight);
  scale: 1.03;
}

/* Header */
#header {
    z-index: 10000 !important;
}

/* #header .logo svg, #header .logo img{
  height: 3.5rem;
} */

/* Hero Section */
.hero .btn {
    background: var(--highlight);
    color: var(--primary-bg);
}

.hero-large{
  min-height: 70vh !important;
}

/*Image Fokus*/
.image-center {
  background-position: 50% 40% !important;
}


/* Text Section */
.gallery.polaroid-slider {
    display: grid;
    width: 280px;
    margin: 0 auto;
    margin-top: 3rem;
  }
  
  .gallery.polaroid-slider > img {
    grid-area: 1/1;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border: 10px solid #f2f2f2;
    border-radius: 8px;
    box-shadow: 0 0 4px rgba(0,0,0,0.44);
    z-index: 2;
    animation: 
      slide 8s infinite,
      z-order 8s infinite steps(1);
  }
  .gallery > img:last-child {
    animation-name: slide, z-order-last;
  }
  .gallery > img:nth-child(2) { animation-delay: -2s; } 
  .gallery > img:nth-child(3) { animation-delay: -4s; }
  
  @keyframes slide {
    16.67% { transform: translateX(120%)}
    33.33% { transform: translateX(0%)}
  }
  @keyframes z-order {
    16.67%,
    33.33% { z-index: 1; }
    66.33% { z-index: 2; }
  }
  @keyframes z-order-last {
    16.67%,
    33.33% { z-index: 1; }
    83.33% { z-index: 2; }
  }

/* Feature Icon */
.modular-features .frame-box
{
  padding: 0;
  padding-bottom: 4rem;;
}

.modular-features.small .columns{
  margin: 0;
}

.modular-features .feature-icon {
  color: var(--accent-soft3);
}

.modular-features .column:hover .feature-icon {
  color: var(--highlight);
}

.card .feature-icon {
  overflow: hidden;
  margin: -1rem;
  align-content: center;
}

.card .feature-icon img{
  min-width: 100%;
    opacity: 60%;
}

.feature-icon img{
  max-width: 30%;
  opacity: 20%;
}

.modular-features .column:hover .feature-icon img{
  opacity: 100%;
}

/* Gallery Section */
.modular-gallery > .container {
  padding-top: 2rem;
  padding-bottom: 4rem;
  text-align: center;
}

.gallery-bento {
  margin: 2rem auto;
  padding: 0 1rem;
}

.gallery-bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: minmax(150px, auto);
  grid-gap: 1rem;
  grid-auto-flow: dense;
}

.gallery-bento-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery-bento-item:hover {
  transform: scale(1.03);
  z-index: 2;
}

.gallery-bento-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.3s ease;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.landscape {
  grid-column: span 2;
}

.portrait {
  grid-row: span 2;
}

.zoom-icon {
  font-size: 2rem;
  color: white;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.gallery-item:hover .zoom-icon {
  transform: scale(1);
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 999;
  padding: 2rem;
}

.lightbox:target {
  display: block;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  margin: 2rem auto;
  text-align: center
}

.lightbox img {
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.close {
  position: absolute;
  right: -1rem;
  top: -1rem;
  font-size: 2rem;
  color: white;
  text-decoration: none;
}

/* Testimonial Section */
.modular-testimonial {
  padding-top: 2rem;
  padding-bottom: 4rem;
  text-align: center;
}

.testimonial-carousel {
  text-align: center;
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.testimonial-wrapper {
  position: relative;
}

.testimonial-item {
  position: absolute;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
  pointer-events: none;
  
}

.testimonial-item.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  z-index: 2;
}
.testimonial-item.slide-in-left {
  transform: translateX(-100%);
  opacity: 0;
}
.testimonial-item.slide-in-right {
  transform: translateX(100%);
  opacity: 0;
}
.testimonial-item.slide-out-left {
  transform: translateX(-100%);
  opacity: 0;
}
.testimonial-item.slide-out-right {
  transform: translateX(100%);
  opacity: 0;
}
.testimonial-text {
  margin-top: 1em;
  margin-bottom: 1em;
}
.testimonial-author {
  font-weight: bold;
  font-size: 0.8rem;
  margin-bottom: 1em;
}
.testimonial-controls {
  margin-top: 1em;
}
.testimonial-controls button {
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  margin: 0 1em;
}

/* iFrame Section */
.modular-iframe {
    padding-bottom: 8rem;
    padding-top: 2rem;
    text-align: center;
}

.iframe-container {
    position: relative;
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
}

iframe{
  width: 100%;
  height: 100%;
}

.iframe-header {
    background-color: var(--primary-bg);
    color: var(--highlight);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.iframe-logo {
    display: flex;
    align-items: center;
}

.iframe-logo img {
    height: 30px;
    margin-right: 10px;
}

.iframe-logo span {
    font-weight: 600;
    font-size: 1.2rem;
}

.iframe-frame-container {
    position: relative;
    height: 60vh;
}

.iframe-footer {
    background-color: var(--primary-bg);
    color: var(--accent-soft3);
    padding: 15px 20px;
    text-align: center;
    font-size: 0.9rem;
}

/* Contact Section*/
.modular-contact .container{
  display: flex;
  flex-direction: row;
  padding-bottom: 4rem;
  text-align: left;
  justify-content: center;
  gap: 1rem;
  align-items: center;
}

.contact-text h4 {
  text-align: left;
}

.contact-text{
  text-align: left;
}

.map{
  aspect-ratio: 1/1;
}

/* Mobile */
@media screen and (max-width: 1040px) {
  .modular-contact .container {
    flex-direction: column;
  }

  #header .logo img, #header .logo svg {
    height: 4rem;
  }

  .map.iframe-frame-container{
    height: auto;
  }
}

/* Modulear Map */

.modular-map > .container{
  padding-top: 2rem;
  padding-bottom: 4rem;
}

#map-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  margin: 0;
  margin-bottom: 1rem;
  border: 1px solid var(--accent-soft1);
}

#map-container {
  padding: 0.1rem;
  border: 1px solid var(--accent-soft1);
}

#map {
  height: 50vh;
}

/* Modulear Recent Blog */
.modular-recent-blog > .container {
  padding-top: 2rem;
  padding-bottom: 4rem;
}

#recent-blog-cards {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

/* Custom Checkbox */
.checkbox-img {
  width: 64px;
  height: 64px;;
  filter: saturate(0%);
  transition: filter 0.2s;
  cursor: pointer;
}
input[type="checkbox"]:checked + label .checkbox-img {
  filter: saturate(100%);
  scale: 1.03;
}

.filter-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s, opacity 0.3s;
}
.filter-panel.open {
  max-height: 500px; /* ausreichend groß wählen */
  opacity: 1;
}

/* Popup */

.popup {
  position: relative;
  display: flex;
  flex-direction: column;
}

.popup h5 {
  margin-top: 0;
}

.popup.lable{
  position: absolute;
  top: .1rem;
  left: .1rem;
}

/* Blog Location Item */

.tab-nav { list-style: none; display: flex; margin: 0; padding: 0; }
.tab-nav li { padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; }

.tab-nav li.active { 
  background-color: var(--primary-bg);
  border-bottom: 2px solid var(--highlight); 
  font-weight: bold; 
}

.tab-content { 
  display: none;
  padding: 20px;
}

.tab-content.active { 
  display: block; 
  background-color: var(--primary-bg);
  border-radius: .1rem;
}

/* Text Section */
.modular-text{
  padding: 0;
  padding-bottom: 4rem;;
}

.modular-text .image-default{
  scale: 0.75;
}

/* Newsletter */

  #sib-container input:-ms-input-placeholder {
    text-align: left;
    font-family: Helvetica, sans-serif;
    color: #c0ccda;
  }

  #sib-container input::placeholder {
    text-align: left;
    font-family: Helvetica, sans-serif;
    color: #c0ccda;
  }

  #sib-container textarea::placeholder {
    text-align: left;
    font-family: Helvetica, sans-serif;
    color: #c0ccda;
  }

  #sib-container a {
    text-decoration: underline;
    color: #2BB2FC;
  }

  /* Image Frame Masks */
  .rough-frame {
    mask-image: url('/user/themes/horizon/images/rough-mask-1.png');
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    mask-composite: exclude;
}

/* Comic Style */

.comic-name-title {
    display: inline-block;
    padding: 1.5rem 3rem;
    margin-bottom: 1rem;
    background-color: var(--accent-soft1);
    color: white;
    border-radius: 4px;
    box-shadow: 5px 5px 0 var(--shadow-color);
    border: 3px solid #000;
    transform: rotate(-1deg);
}

.comic-btn {
    display: inline-block;
    padding: .5rem 1.2rem;
    margin-bottom: 1rem;
    background-color: var(--highlight);
    color: var(--text-light);
    font-size: x-large;
    font-weight: 400;
    border-radius: 4px;
    box-shadow: 5px 5px 0 var(--shadow-color);
    border: 3px solid #000;
    transform: rotate(-2deg);
    transition: .2s ease-in-out;
}

.comic-btn:hover {
    transform: rotate(2deg);
    scale: 1.2;
     font-weight: 600;
}