/**
 * Theme Button Styles
 * 
 * This file contains all custom styles related to buttons using the UAGB 
 * button component, especially the `.standard` style variations.
 * 
 * If additional button styles or variations become too large, create a 
 * separate sub-file and name it accordingly (e.g., theme_buttons-outline.css).
 */

.is-root-container .uagb-buttons-repeater,
.uagb-buttons-repeater,
.standard .uagb-buttons-repeater {
  font-size: var(--btn-font-size);
  font-family: var(--mainfont);
  color: var(--ast-global-color-3) !important;
  border: 1px solid var(--ast-global-color-0) !important;
  font-weight: 700;
  padding: 1em 1.7em !important;
  line-height: 1.28;
}

.standard .uagb-buttons-repeater,
.standard .uagb-buttons-repeater {
  position: relative;
}

.uagb-buttons-repeater:hover,
.standard .uagb-buttons-repeater:hover,
.button:hover {
  background: transparent !important;
  border: 1px solid var(--ast-global-color-0) !important;
}

/** If BG red  */
.bg-red .button:hover {
  border: 1px solid var(--ast-global-color-3) !important;
}

.bg-red a.button.button-icon:hover::after {
  background-color: white;
  background-image: url("/wp-content/themes/astra-impuls-child/img/pfeil-links-button.svg");
}

.wp-block-uagb-container.cont-paralax-content .standard .uagb-buttons-repeater:hover {
  background-color: var(--ast-global-color-3);
}

.uagb-buttons-repeater:hover .uagb-button__link,
.standard .uagb-buttons-repeater:hover .uagb-button__link,
.button:hover {
  color: var(--ast-global-color-0);
}

/*
.standard .uagb-buttons-repeater::after {
  content: "" !important;
  display: block !important;
  width: 100%;
  height: 0.9em;
  position: absolute;
  background-color: var(--color-4);
  bottom: 0;
  z-index: 1;
  transition: all 0.5s ease 0s;
}
*/

.uagb-buttons-repeater,
.standard .uagb-buttons-repeater {
  z-index: 9;
  position: relative;
  transition: all 0.5s ease-in-out !important;
}

.wp-block-uagb-container.buttons-block {
  margin-top: calc(var(--gap-m) * 2);
  flex-wrap: wrap;
  gap: var(--gap-s);
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: row;
}

.buttons-block>.wp-block-uagb-buttons {
  width: fit-content !important;
}

.uagb-button__link,
.standard .uagb-button__link {
  z-index: 9;
  display: inline-flex;
  gap: var(--gap-s);
  transition: all 0.5s ease-in-out;
  align-items: center;
  font-size: var(--btn-font-size);
  font-weight: 700;
}

.uagb-button__link::after,
.standard .uagb-button__link::after {
  content: "";
  display: block;
  background-color: #fff;
  width: 1.429em;
  height: 1.429em;
  -webkit-mask: url("/wp-content/themes/astra-impuls-child/img/pfeil-links-button.svg") no-repeat center / contain;
  mask: url("/wp-content/themes/astra-impuls-child/img/pfeil-links-button.svg") no-repeat center / contain;
  transition: background-color 0.3s ease;
  font-size: var(--btn-font-size);
}

.uagb-buttons-repeater:hover .uagb-button__link::after,
.standard .uagb-buttons-repeater:hover .uagb-button__link::after {
  background-color: var(--ast-global-color-0);
}

.wp-block-uagb-buttons .uagb-buttons__wrap {
  flex-wrap: wrap;
}

/**Button Konfigurieren*/
.wp-block-uagb-buttons-child.wp-block-button.btn-konfigurator .uagb-button__link:after {
  -webkit-mask: url("/wp-content/themes/astra-impuls-child/img/icon-konfigurieren.svg") no-repeat center / contain;
  mask: url("/wp-content/themes/astra-impuls-child/img/icon-konfigurieren.svg") no-repeat center / contain;
}

/* INTERNAL LINKS USED ON DIFFERENT CONTAINERS */

.arrow-link a {
  font-family: var(--headlinefont) !important;
  font-size: var(--h6-font-size) !important;
  color: var(--ast-global-color-0) !important;
  font-style: italic !important;
  font-weight: 400 !important;
  line-height: 1.24 !important;
  text-decoration: none !important;

  display: flex;
  align-items: center;
  gap: clamp(4px, 0.159rem + 0.32vw, 8px);
  width: fit-content;
}

.arrow-link a::after {
  content: "";
  display: inline-block;
  width: clamp(12px, 0.568rem + 0.63vw, 20px);
  aspect-ratio: 1/1;
  background-image: url(/wp-content/themes/astra-impuls-child/img/arrow-links.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
}

.button.inverted {
  background-color: white;
  color: var(--ast-global-color-0);
}

a.button.inverted.button-icon::after {
  background: url(/wp-content/themes/astra-impuls-child/img/img/pfeil-links-button-red.svg) no-repeat center / contain;
}

/* HOVER EFFECTS */
/* Underline */
#menu-footer-menu a,
.arrow-link a,
#header-icons .textwidget a {
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  transition: border-bottom-color 0.3s ease;
}

#menu-footer-menu a:hover,
.arrow-link a:hover,
.img-quer:hover .arrow-link a,
.img-hoch:hover .arrow-link a,
#header-icons .textwidget a:hover {
  border-bottom-color: currentColor;
}

/* IMG Scale on Hover */
.cont-imgs-wrapper>.wp-block-uagb-container figure,
.wp-block-uagb-container:is(.img-hoch, .img-quer) figure {
  overflow: hidden;
}

.cont-imgs-wrapper>.wp-block-uagb-container figure img,
.wp-block-uagb-container:is(.img-hoch, .img-quer) figure img {
  transform: scale(1);
  transition: transform 0.3s ease-in-out;
}

.cont-imgs-wrapper>.wp-block-uagb-container:hover figure img,
:is(.img-hoch, .img-quer):hover figure img {
  transform: scale(1.03);
}

.wp-block-uagb-container.cont-info-box.bg-rund>.uagb-infobox__content-wrap:hover .uagb-ifb-content::after {
  transform: rotate(45deg);
}

.back-btn {
  margin: var(--gap-m);
  flex-direction: row-reverse;
}

#thumbnail .back-btn::after,
#special-hero .back-btn::after {
  transform: rotate(180deg);
}

#special-hero .back-btn {
  justify-self: flex-start;
}

.impmenu-active #special-hero .back-btn {
  pointer-events: none;
  display: none;
}

@media (max-width: 768px) {
  .arrow-link a::after {
    background-size: contain;
    width: 19px;
  }

  /** Auskomentiert da buttons sonst zu klein (immer em keine px values)*/
  /*
  .standard .uagb-buttons-repeater {
    padding: 5px 15px !important;
  }
*/
  .uagb-button__link::after,
  .standard .uagb-button__link::after {
    width: 0.833em;
    height: 0.833em;
  }

  .uagb-button__link,
  .standard .uagb-button__link {
    line-height: 1.5;
  }

  a.button {
    line-height: 1.15 !important;
  }
}