/* --- containers: full-bleed wrapper + constrained inner --- */
.section-fullwidth {
  width: 100%;
}

.section-default {
  max-width: 1200px;         /* adjust to taste: 1100–1280 are common */
  margin: 0 auto;
  padding: 0 20px;           /* side padding for small screens */
  box-sizing: border-box;
}


.header-container {
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | intro | nav */
  align-items: center;
  gap: 20px;
  /* width/max-width/margin/padding now live on .section-default */
}

.logo img {
  max-height: 200px;
  height: auto;
  width: auto;
}

.intro {
  text-align: center;
  max-width: 60em; /* keeps text readable on xl screens */
  margin: 0 auto;
}


/* Standardmäßig Hamburger-Menü anzeigen */
.hamburger-icon {
  display: block;
  cursor: pointer;
  font-size: 24px;
  position: absolute;
  top: 10px;
  right: 20px;
  z-index: 3;
  background: transparent;
  border: 1px solid transparent;
}
.hamburger-icon:hover {
  background-color: #EFC815 !important;
}

/* Standardmäßig Menü ausblenden */
.menu {
  display: none;
  position: absolute;
  top: 56px;
  right: 20px;
  left: 20px;
  flex-direction: column;
  background: #f8f8f8;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 2;
}

/* Menü anzeigen, wenn aktiv */
.menu.active {
  display: flex;
}

.menu ul {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu ul li {
  display: block;
  margin: 0;
  text-align: center;
}

.circle-wrapper {
  position: relative;
  width: 60%;
  max-width: 900px;
  margin: clamp(40px, 8vh, 120px) auto 200px auto; /* top margin scales with viewport */
}
.circles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Default order for desktop */
.circle-item {
    order: 1; /* Default order */
}

.background-image {
  width: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.flip-circle {
  position: absolute;
  top: 36%;
  left: 41%;
  transform: rotate(var(--angle)) translate(0, -220px) rotate(calc(var(--angle) * -1));
  transform-origin: center center;
  z-index: 2;
}

.flip-inner {
  width: 180px;
  height: 130px;
  border-radius: 50%;
  perspective: 1000px;
  cursor: pointer;
  position: relative;
}

.front, .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: clamp(0.7rem, 1.2vw, 0.9rem);
  line-height: 1.2;
  padding: 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.6s;
}

.front { font-size: 1rem; font-weight: bold; transform: rotateY(0deg); }
.back  { transform: rotateY(180deg); top: 0; left: 0; font-size: clamp(0.6rem, 1.2vw, 0.9rem); }
.flip-inner:hover .front, .flip-inner:focus .front { transform: rotateY(180deg); }
.flip-inner:hover .back,  .flip-inner:focus .back  { transform: rotateY(360deg); }

@media (max-width: 767px) {
  /* header collapses to single column */
  .header-container {
    grid-template-columns: 1fr;
  align-items: first baseline; /* aligns first line of text in all three cells */
  }
  .logo img {
    max-height: 100px; /* keep reasonable size on mobile */
  }

  .hamburger-icon {
    display: block;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 3;
    background: transparent;
    border: 0;
  }

  .menu {
    display: none;
    position: absolute;
    top: 56px;        /* below the button */
    right: 20px;
    left: 20px;
    flex-direction: column;
    background: #f8f8f8;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    z-index: 2;
  }

  .menu.active { display: flex; }

  .menu ul {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .menu ul li {
    display: block;
    margin: 0;
    text-align: center;
  }

  /* circle: stacked fallback for small screens */
  .background-image {
    display: none; /* remove conflicting duplicate declarations */
  }

  .circle-wrapper {
    width: 100%;
    max-width: 480px;
    margin: 30px auto 60px auto;
  }

  .circle-item {
    width: calc(50% - 16px); /* Adjust the width to fit two items per line, accounting for margins */
    margin: 8px; /* Adjust margins as needed */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    order: 0; /* Reset order for mobile */
  }

    /* Define the new order for mobile */
    .circle-item:nth-child(1) { order: 1; }
    .circle-item:nth-child(2) { order: 2; }
    .circle-item:nth-child(3) { order: 4; }
    .circle-item:nth-child(4) { order: 5; }
    .circle-item:nth-child(5) { order: 4; }
    .circle-item:nth-child(6) { order: 1; }

  /* put items in a neat grid instead of absolute radial */
  .flip-circle {
    position: static;
    transform: none;
    margin: 8px;
    display: inline-block;
  }

  .flip-inner {
    width: 160px;
    height: 120px;
  }

  .front, .back {
    font-size: 0.85rem;
    padding: 10px;
  }
    .grid-dual {
    display: block;     /* cancel any grid/flex rows */
  }

  .grid-dual .media {
    margin: 0 0 12px 0; /* space under the image */
  }

  .grid-dual .media img {
    display: block;
    width: 100%;
    height: auto;
  }

  .grid-dual .content {
    margin: 0;          /* no side margins */
  }
}

@media (min-width: 1024px) {
  .circle-wrapper {
    margin-top: calc(clamp(40px, 8vh, 120px) + 100px);
  }

  .header .section-default.header-container {
  display: grid;
  grid-template-columns: 200px 1fr 200px; /* logo fixed, intro flex, menu auto width */
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 20px;

  box-sizing: border-box;
  }

  /* Logo column */
  .header .logo {
    place-self: start start;    /* top-left of its cell */
  }
  .header .logo img {
    max-height: 200px;
    height: auto;
    width: auto;
  }

  /* Intro (fixed readable width, centered inside its column) */
  .header .intro {
    justify-self: center;
    text-align: center;
    margin: 0;
    margin-top: 50px;
    max-width: 700px;
    padding-inline: 12px;
    font-size: 1.1em ;      /* tiny buffer from columns */
    font-weight: 500;
  }

  /* Menu column: force to the far right, single line */
  .header .menu {
    place-self: start end;
    justify-content: flex-end;
    width: auto;
    margin-top: 1.6em;
  }
  .bla {

  }
  
  .news-item .content p {
    margin-block-start: 0; /* Entfernt den oberen Rand des Absatzes */
    margin-top: 0;
    padding-top: 0.5rem;
  }
}


