/* FAQ topic layout (image + content 50/50, mobile stacked)
   Expected markup from faq.php: .faq-topics > .faq-topic
*/

.faq-topics{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.faq-topic{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 20px;
  margin: 0 0 18px 0;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  background: #fff;
}

/* Left: image */
.faq-topic__media{
  width: 100%;
}

.faq-topic__img{
  width: 100%;
  aspect-ratio: 1 / 1;      /* force square */
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(0,0,0,.10);
}

.faq-topic__img--placeholder{
  background: linear-gradient(135deg, rgba(0,0,0,.06), rgba(0,0,0,.02));
}

/* Right: content */
.faq-topic__title{
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.faq-topic__desc{
  margin: 0 0 14px 0;
  opacity: .85;
}

.faq-qa__item{
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,.08);
}

.faq-qa__item:first-child{
  border-top: 0;
  padding-top: 0;
}

.faq-qa__q{
  margin: 0 0 6px 0;
}

.faq-qa__a{
  margin: 0;
}

/* Ensure editor content inside answers doesn't explode the layout */
.faq-qa__a p{ margin: 0 0 10px 0; }
.faq-qa__a p:last-child{ margin-bottom: 0; }
.faq-qa__a ul, .faq-qa__a ol{ margin: 0 0 10px 18px; }
.faq-qa__a img{ max-width: 100%; height: auto; }

/* Responsive: stack on mobile */
@media (max-width: 768px){
  .faq-topic{
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
}

/* GRID: zwei Themen nebeneinander */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin: 32px 0;
}

/* EIN THEMENBLOCK */
.faq-topic {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}

/* HEADER: Bild + Titel */
.faq-topic-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

/* BILD: klein & quadratisch */
.faq-topic-image-wrap {
  width: 64px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.1);
}

.faq-topic-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* TITEL */
.faq-topic-title {
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  word-break: break-word;
}

/* FRAGEN & ANTWORTEN */
.faq-item {
  margin-bottom: 14px;
}

.faq-question {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.faq-answer {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #444;
}

.faq-answer p {
  margin: 0 0 8px;
}

/* MOBILE: alles untereinander */
@media (max-width: 768px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-topic-header {
    align-items: flex-start;
  }
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin: 32px 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.faq-topic {
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}

.faq-topic-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  max-width: 100%;
}

.faq-topic-image-wrap {
  width: 80px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  max-width: 80px;
}

.faq-answer,
.faq-question {
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.faq-topic-title {
  min-width: 0;
}

@media (max-width: 768px) {

  /* Themen-Header vertikal statt horizontal */
  .faq-topic-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Bild mittig */
  .faq-topic-image-wrap {
    margin: 0 auto 10px;
  }

  /* Titel unter dem Bild, normal umbrechen */
  .faq-topic-title {
    text-align: center;
    max-width: 100%;
    word-break: normal;
    overflow-wrap: break-word;
  }

}

