/*  
Theme Name: Fachverband Kinderbetreuung Graubünden
Author: Süsskind SGD
Description: Theme für den Fachverband Kinderbetreuung Graubünden
Version: 1.0 
*/

@import url("https://fonts.googleapis.com/css2?family=Sen:wght@400..800&display=swap");
/*  VARIABLES ----------------------------------  */
:root {
  /*  Farben  */
  --col-main: #fff;
  --col-text: #323232;
  --col-special-1: #ff5028;
  --col-special-2: #ff8ca0;
  --col-special-3: #f5af55;
  --col-special-4: #009182;
  --col-selection: #26568a;

  /*  Schriften */
  --ff-main: "Sen", sans-serif;
  --fs-basic: 22px;

  --fs-fliesstext: 1rem;
  --fs-h1: 3rem;
  --fs-h2: 2rem;
  --fs-h3: 1.6rem;
  --fs-h4: 1.14rem;
  --fs-h5: var(--fs-fliesstext);
  --fs-h6: var(--fs-fliesstext);

  --fs-s: 0.8rem;
  --fs-xs: 0.68rem;
  --fs-xl: 4rem;

  --fw-normal: 500;
  --fw-bold: 700;

  --ff-lineheight: 1.32rem;

  /* Breiten / Abstände */
  --con-width: 90vw;
  --con-max-width: 1320px;

  --border: 2px solid var(--col-text);

  --space-xl: 6rem;
  --space-l: 4rem;
  --space-m: 2rem;
  --space-s: 1rem;
  --space-xs: 0.5rem;
  --space-xxs: 0.1rem;

  --link-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 23' fill='none'%3E%3Cpath d='M39.0607 12.1066C39.6464 11.5208 39.6464 10.5711 39.0607 9.9853L29.5147 0.439358C28.9289 -0.146429 27.9792 -0.146429 27.3934 0.439358C26.8076 1.02514 26.8076 1.97489 27.3934 2.56068L35.8787 11.046L27.3934 19.5312C26.8076 20.117 26.8076 21.0668 27.3934 21.6526C27.9792 22.2383 28.9289 22.2383 29.5147 21.6526L39.0607 12.1066ZM0 11.046V12.546H38V11.046V9.54596H0V11.046Z' fill='black'/%3E%3C/svg%3E");
  --header-height: 240px;
  --header-height-small: 160px;
  --header-height-mobile: 100px;
}

/* BASIC STUFF ----------------------------------  */
* {
  box-sizing: border-box;
}

html,
body {
  font-size: var(--fs-basic);
  font-family: var(--ff-main);
  background-color: var(--col-main);
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--col-text);
  font-weight: var(--fw-normal);
  position: relative;
  hyphens: auto;
}

header > div,
footer > div,
main > * {
  width: var(--con-width);
  max-width: var(--con-max-width);
  margin: auto;
}

main {
  margin-top: var(--space-m);
  isolation: isolate; /* So mix blend mode is only applied in the main*/
}

::selection {
  background-color: var(--col-selection);
  color: var(--col-main);
}

/* TYPOGRAPHY ----------------------------------  */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--fw-bold);
}

h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--space-m);
  hyphens: manual;
}

h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-s);
  margin-top: var(--space-xl);
}

h3 {
  font-size: var(--fs-h3);
}
body:not(.home) h3:not(.custom-loop__title) {
  margin-bottom: var(--space-s);
  margin-top: var(--space-l);
}

h4 {
  font-size: var(--fs-h4);
  margin-bottom: var(--space-s);
  margin-top: var(--space-s);
}

h5 {
  font-size: var(--fs-h5);
}

h6 {
  font-size: var(--fs-h6);
}

a {
  color: inherit;
}

p {
  line-height: var(--ff-lineheight);
  margin: var(--space-s) auto;
}

h1 + p,
h2 + p,
h3 + p,
h4 + p,
h5 + p,
h6 + p {
  margin: 0 auto;
}

select {
  font-family: var(--ff-main);
  cursor: pointer;
  padding: var(--space-xxs);
}

@media (min-width: 1320px) {
  main > p,
  main > .wp-block-list {
    padding-right: calc(var(--con-max-width) * 0.33);
  }
}

.wp-block-list li {
  padding: var(--space-xs) 0;
  list-style: "— ";
}

main a:hover,
header a:hover,
footer a:hover,
main a:focus-visible,
header a:focus-visible,
footer a:focus-visible {
  color: var(--hover-color, currentColor);
}

/* Links arrow animation */
main a:not(p a),
.arrow > a {
  position: relative;
  padding-left: 1.5em;
  display: inline-flex;
}

main a:not(p a):before,
.arrow > a:before {
  content: var(--link-arrow);
  transition: 0.1s ease-in;
  position: absolute;
  left: 0;
  width: 1em;
}

main a:not(p a):hover:before,
.arrow > a:hover:before {
  transform: translateX(0.2em);
}

/* and remove again for links which should not have the arrow (spearate because else it would be a huuuge statement with multiple :not() */
main ul:not(.no-list-marker) > li > a,
.mitglieder-liste a {
  padding-left: 0;
}

main ul:not(.no-list-marker) > li > a:before,
.mitglieder-liste a:before {
  content: "";
  width: 0em;
}

/* main ul:has(> li > a:only-child) {
  padding-left: 0;
}
main li:has(> a:only-child) {
  list-style: none;
} */

main ul.no-list-marker {
  padding-left: 0;
}
main ul.no-list-marker li {
  list-style: none;
}

/* BACKGROUND ELEMENTS  ----------------------------------  */
.bg-elements {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  pointer-events: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  mix-blend-mode: multiply;
  overflow: hidden;
}

.bg-elements > * {
  position: absolute;
}

.bg-elements__el1,
.bg-elements__el3 {
  left: 0;
}
.bg-elements__el2,
.bg-elements__el4 {
  right: 0;
}

.bg-elements__el1 path {
  fill: var(--col-special-1);
}
.bg-elements__el2 path {
  fill: var(--col-special-2);
}
.bg-elements__el3 path {
  fill: var(--col-special-3);
}
.bg-elements__el4 path {
  fill: var(--col-special-4);
}

/* v1 positioning */
.bg-elements__el1 {
  top: 20%;
}
.bg-elements__el2 {
  top: 30%;
}
.bg-elements__el3 {
  bottom: 0%;
}
.bg-elements__el4 {
  bottom: 20%;
}
/* v2 positioning*/
.bg-elements__v2 .bg-elements__el1 {
  top: 20%;
}
.bg-elements__v2 .bg-elements__el2 {
  top: 10%;
}

.bg-elements__v2 .bg-elements__el3 {
  bottom: 20%;
}
.bg-elements__v2 .bg-elements__el4 {
  bottom: 0%;
}

/* v3 positioning*/
.bg-elements__v3 .bg-elements__el1 {
  top: 30%;
}
.bg-elements__v3 .bg-elements__el2 {
  top: 10%;
}

.bg-elements__v3 .bg-elements__el3 {
  bottom: 20%;
}
.bg-elements__v3 .bg-elements__el4 {
  bottom: 40%;
}

/* v4 positioning*/
.bg-elements__v4 .bg-elements__el1 {
  top: 30%;
}
.bg-elements__v4 .bg-elements__el2 {
  top: 5%;
  right: -17%;
}

.bg-elements__v4 .bg-elements__el3 {
  bottom: 10%;
}
.bg-elements__v4 .bg-elements__el4 {
  bottom: 20%;
}

/* HEADER  ----------------------------------  */

header {
  --current-header-height: var(--header-height);
  height: var(--current-header-height);
  transition: height 220ms ease;

  background-color: var(--col-main);
  position: sticky;
  top: 0;
  z-index: 2;
}

header.small {
  --current-header-height: var(--header-height-small);
  display: flex;
}

header.small .header-desktop-secondary svg {
  margin-top: 10px;
}

header.small .header-desktop-secondary #header-mail {
  margin-top: calc(10px + 0.01rem);
}

/* header.small .header-desktop-secondary {
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}  */

header.small .logo img {
  height: calc(var(--header-height-small) - var(--space-s) * 2);
}

[id] {
  scroll-margin-top: calc(var(--header-height) * 1.5);
}

.header-mobile__outer {
  display: none;
}

.logo img {
  height: calc(var(--header-height) - var(--space-m) * 2);
  width: auto;
  transition: height 220ms ease;
}

.header-desktop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-l);
}

.menu {
  list-style: none;
}

.header-desktop-menu ul:not(.sub-menu) {
  display: flex;
  gap: 3em;
  justify-content: space-between;
  padding: 0;
}

.header-desktop-menu ul:not(.sub-menu) > li {
  position: relative;
}

.header-desktop-menu ul:not(.sub-menu) > li:hover .sub-menu,
.header-desktop-menu ul:not(.sub-menu) > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translateY(0);
  transition: all 180ms ease, visibility 0s;
}

.header-desktop-menu .menu > li.submenu-force-close > .sub-menu,
.header-desktop-menu .menu > li.submenu-force-close:hover > .sub-menu,
.header-desktop-menu .menu > li.submenu-force-close:focus-within > .sub-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-12px) !important;
}

.header-desktop-menu ul.sub-menu > li:hover a,
.header-desktop-menu ul.sub-menu > li:focus-within a {
  text-decoration: underline;
}

.header-desktop-menu ul:not(.sub-menu) > li > a {
  font-size: var(--fs-h4);
}

.header-desktop-menu .sub-menu {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-s);

  background: var(--col-main);
  padding: var(--space-s);

  margin-left: calc(var(--space-s) * -1);

  position: absolute;
  top: 100%;
  left: 0;

  width: max-content;
  min-width: var(--space-l);
  z-index: 2;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(-12px);
  transition: all 180ms ease;
}

.header-desktop-menu .sub-menu a {
  text-decoration: none;
  font-size: var(--fs-s);
}

.header-desktop-secondary {
  display: flex;
  gap: var(--space-s);
}

.header-desktop-secondary svg {
  height: 0.85rem;
  margin-top: 40px;
  transition: transform 220ms ease;
}

.header-desktop-secondary #header-mail {
  height: 0.78rem;
  margin-top: calc(40px + 0.035rem);
  margin-right: 0.15rem;
}

.header-desktop-secondary a {
  text-decoration: none;
}

/* FOOTER  ----------------------------------  */

footer {
  margin-top: var(--space-l);
  background: var(--col-main);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  gap: var(--space-s);
  justify-content: space-between;
  font-size: var(--fs-xs);
  padding: var(--space-m) 0;
}

.footer-content > div {
  max-width: calc(var(--con-max-width) / 4);
}

footer h3 {
  font-size: var(--fs-fliesstext);
  margin-bottom: var(--space-xs);
  margin-top: 0 !important;
}

footer .wp-block-image img {
  width: 150px;
}

/* CUSTOM LOOP  ----------------------------------  */

.custom-loop {
  display: grid;
  gap: 4rem;
}

.custom-loop.columns-2 {
  grid-template-columns: 1fr 1fr;
}

.custom-loop.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.custom-loop__item {
  border-top: var(--border);
  border-bottom: var(--border);
  padding: var(--space-xs) 0 var(--space-m) 0;
}

.custom-loop__title {
  font-size: var(--fs-fliesstext);
}

.custom-loop__date,
.custom-loop__content,
.custom-loop__links {
  font-size: var(--fs-s);
}

.custom-loop__links {
  display: flex;
  flex-direction: column;
}

.custom-loop__links a {
  padding-bottom: var(--space-xs);
}

.custom-loop__grid {
  display: flex;
  justify-content: space-between;
}

.jobs-liste__logo {
  width: 50%;
  max-width: 150px;
  height: auto;
}

.jobs-liste__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.custom-loop__meta.custom-loop__member {
  font-size: var(--fs-s);
  margin-top: -1em;
}

/* MILESTONE SLIDER  ----------------------------------  */

.milestones-slider {
  overflow: hidden;
  position: relative;
  border-top: var(--border);
  border-bottom: var(--border);
  padding: var(--space-s) 0;
  width: 100%;
}

.milestones-slider__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.milestones-slider__label {
  font-weight: var(--fw-bold);
}

.milestones-slider__next {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: transparent;
  transition: transform 0.12s ease-in;
}

.milestones-slider__next:hover {
  transform: translateX(0.3em);
}

.milestones-slider__track {
  display: flex;
  width: 100%;
  transform: translateX(0);
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.milestones-slider__slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.milestones-slider__year {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
}

.milestones-slider__text {
  font-size: 22px;
  line-height: 1.25;
  max-width: 46ch;
}

.milestones-slider__text p {
  margin: 0;
}

/* HOME  ----------------------------------  */

.home h1 {
  padding-right: 20%;
  font-size: var(--fs-h2);
}

.home-links {
  margin-bottom: var(--space-l);
  display: flex;
  justify-content: end;
}

/* TEAM  ----------------------------------  */
.team .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-m);
}

.team .wp-block-media-text {
  position: relative;
  display: block;
}
.team .wp-block-media-text:hover .wp-block-media-text__content {
  opacity: 1;
}

.team .wp-block-media-text__content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--col-special-3);
  opacity: 0;
  transition: all 0.5s ease;
}

.team figure,
.team figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* MITGLIEDER LISTE  ----------------------------------  */

.mitglieder-liste__table {
  width: 100%;
  border-collapse: collapse;
}

.mitglieder-liste__table tr {
  padding: var(--space-xs);
  border-top: var(--border);
  border-bottom: var(--border);
}

.mitglieder-liste__table td {
  padding: var(--space-xs);
  padding-left: 0;
}

.mitglieder-liste__td--group {
  font-weight: var(--fw-bold);
}

.mitglieder-liste__td--group > a {
  text-decoration: none;
}

.mitglieder-liste__td--plz {
  min-width: 4em;
}

.mitglieder-liste__td--url {
  max-width: 19rem;
  word-break: break-all;
}

.mitglieder-liste__filters {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
}

.mitglieder-liste__filter {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--fs-xs);
  font-family: var(--ff-main);
  font-weight: var(--fw-bold);
}

.mitglieder-liste__filter:hover,
.mitglieder-liste__filter.is-active {
  text-decoration: underline;
}

.mitglieder-liste__secondary-filters {
  margin-bottom: var(--space-m);
}

.mitglieder-liste__secondary-filters label {
  margin-right: var(--space-s);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  padding-left: 6px;
}

.mitglieder-liste__secondary-filters select {
  font-size: var(--fs-xs);
}

.mitglieder-liste__no-results {
  display: none;
}

.mitglieder-liste__no-results.visible {
  display: block;
}

.mitglieder-liste__row.hidden,
.mitglieder-liste__group-row.hidden {
  display: none;
}

@media (max-width: 1425px) {
  .header-desktop-menu ul:not(.sub-menu) > li > a {
    font-size: var(--fs-fliesstext);
  }
  .header-desktop-menu ul:not(.sub-menu) {
    gap: 1em;
  }
  .header-desktop {
    gap: 0;
  }
}

@media (max-width: 1080px) {
  :root {
    --fs-basic: 20px;
    --fs-h1: 2rem;
    --fs-h2: 1.7rem;
    --fs-h3: 1.4rem;
  }
  /* MOBILE HEADER  ----------------------------------  */
  .header-desktop__outer {
    display: none;
  }

  header {
    background-color: transparent;
    height: 0;
  }

  .header-mobile__outer {
    background-color: var(--col-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 5;
    margin: 0;
    height: var(--header-height-mobile);
    width: 100%;
    padding: 0 calc((100vw - var(--con-width)) / 2);
  }

  .header-mobile__logo {
    width: calc(var(--header-height-mobile) * 1.5);
    height: calc(var(--header-height-mobile) * 0.8);
  }

  .burger-menu {
    width: var(--space-m);
    height: fit-content;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 7;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
  }

  .burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 0.25em 0;
    background: var(--col-text);
    border-radius: 100vw;
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
  }

  .burger-menu.is-active span:nth-child(1) {
    transform: translateY(0.6em) rotate(45deg);
  }
  .burger-menu.is-active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.is-active span:nth-child(3) {
    transform: translateY(-0.6em) rotate(-45deg);
  }

  .overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;

    position: fixed;
    inset: 0;
    z-index: 6;
    background-color: var(--col-main);
    display: flex;
    justify-content: center;
    overflow: auto;
  }

  #overlay {
    background-color: var(--bg-color, var(--col-main));
  }

  .overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
  }

  body.menu-open {
    overflow: hidden;
  }

  .overlay nav {
    max-width: var(--con-width);
    margin: var(--header-height-mobile) auto;
  }

  .overlay-menu > div > ul {
    padding-bottom: var(--header-height-mobile);
  }

  .overlay ul {
    padding-left: 0;
    list-style: none;
  }

  .overlay a {
    text-decoration: none;
  }

  .overlay .menu-item-has-children > a {
    font-size: var(--fs-h3);
    padding: 0.3em 0;
    display: inline-block;
    text-decoration: underline;
  }

  .overlay .menu-item-has-children {
    margin-bottom: var(--space-m);
  }

  .overlay li {
    padding: 0.3em 0;
  }

  /* OTHER STYLING  ----------------------------------  */
  main {
    margin-top: calc(var(--header-height-mobile) * 1.5);
  }

  .custom-loop.columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    hyphens: auto;
  }

  .home h1 {
    padding-right: 0;
  }

  h2 {
    margin-top: var(--space-l);
  }

  .custom-loop.columns-2,
  .custom-loop.columns-3 {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    font-size: var(--fs-s);
  }

  .team .wp-block-group__inner-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .mitglieder-liste__row {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
  }

  .mitglieder-liste__table tr {
    padding-left: 0;
    border-bottom: 0;
  }

  .mitglieder-liste__table td {
    padding: 0.1em;
  }

  .mitglieder-liste__td--name {
    grid-area: 1 / 1 / 2 / 3;
  }

  .mitglieder-liste__td--url {
    grid-area: 3 / 1 / 4 / 3;
  }

  .mitglieder-liste__td--url {
    max-width: 100%;
  }
  .mitglieder-liste__td--name {
    white-space: normal;
    min-width: 200px;
  }

  .mitglieder-liste__secondary-filters {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .mitglieder-liste__secondary-filters label {
    display: flex;
    gap: var(--space-xs);
    margin-right: 0;
  }

  .mitglieder-liste__secondary-filters label select {
    flex: 1;
  }
}

@media (max-width: 450px) {
  .team .wp-block-group__inner-container {
    grid-template-columns: 1fr;
  }
  .mitglieder-liste__secondary-filters label {
    flex-direction: column;
  }
}
