/* WP Akkordeon – Ingas Akkordeon */

.wpa-accordion {
    background-color: #d5e8d0;
    padding: 20px 0 20px 30px;
    box-sizing: border-box;
}

/* ── Item ── */
.wpa-item {
    border-bottom: 1px solid #a3c49a;
}

.wpa-item:first-child {
    border-top: 1px solid #a3c49a;
}

/* ── Header (toggle button) ── */
.wpa-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px 15px 16px 0;
    margin: 0;
    border: none;
    background: none;
    background-color: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    text-align: left;
    outline: none;
    transition: color 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.wpa-item-header:hover,
.wpa-item-header:focus,
.wpa-item-header:active {
    background: none;
    background-color: transparent;
    outline: none;
    box-shadow: none;
}

.wpa-item-header:focus-visible {
    outline: 2px solid #4a7c42;
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Icon (+/−) ── */
.wpa-item-icon {
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    width: 1em;
    text-align: center;
    user-select: none;
    transition: color 0.2s;
}

.wpa-item .wpa-icon-minus { display: none; }
.wpa-item .wpa-icon-plus  { display: inline; }
.wpa-item.wpa-active .wpa-icon-minus { display: inline; }
.wpa-item.wpa-active .wpa-icon-plus  { display: none; }

/* ── Title in header ── */
.wpa-item-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Body (expandable area) ── */
.wpa-item-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.wpa-item-body.wpa-body-closed,
.wpa-item-body[hidden] {
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden;
    display: block;
}

.wpa-item-body[hidden] {
    display: block;
}

.wpa-item-body.wpa-body-open,
.wpa-item.wpa-active .wpa-item-body {
    max-height: 2000px;
    opacity: 1;
    overflow: visible;
}

/* ── Body inner (two-column layout on desktop) ── */
.wpa-item-body-inner {
    overflow: hidden;
    min-height: 0;
    display: flex;
    align-items: stretch;
}

/* ── Left column: text content ── */
.wpa-body-content {
    flex: 0 0 60%;
    max-width: 60%;
    padding: 40px 40px 40px 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

/* Text */
.wpa-body-text {
    font-size: 15px;
    line-height: 1.7;
    color: #555555;
}

.wpa-body-text p:first-child { margin-top: 0; }
.wpa-body-text p:last-child  { margin-bottom: 0; }

/* ── Right column: image ── */
.wpa-body-image {
    flex: 1 1 0%;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.wpa-body-image img {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
    object-position: center center;
}

/* If no image, let text take full width */
.wpa-item-body-inner:not(:has(.wpa-body-image)) .wpa-body-content {
    flex: 1 1 100%;
    max-width: 100%;
    padding-right: 30px;
}

/* ══════════════════════════════════════════════
   Responsive – Tablet
   ══════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .wpa-body-content {
        flex: 0 0 55%;
        max-width: 55%;
        padding: 30px 30px 30px 0;
    }
}

/* ══════════════════════════════════════════════
   Responsive – Mobil
   ══════════════════════════════════════════════ */
@media (max-width: 767px) {

    /* Container: gleichmäßiges Padding rundum */
    .wpa-accordion {
        padding: 12px 16px !important;
    }

    /* Header volle Breite, kein Versatz */
    .wpa-item-header {
        padding: 14px 0;
        gap: 8px;
    }

    /* Spalten untereinander statt nebeneinander */
    .wpa-item-body-inner {
        flex-direction: column;
    }

    /* Text: volle Breite, sauberes Padding */
    .wpa-body-content,
    .wpa-item-body-inner:not(:has(.wpa-body-image)) .wpa-body-content {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 10px 0 20px 0 !important;
        box-sizing: border-box;
    }

    .wpa-body-text {
        font-size: 15px;
        line-height: 1.65;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Bild: volle Breite minus kleiner Rand, zentriert */
    .wpa-body-image {
        position: relative;
        flex: none;
        width: calc(100% - 8px);
        margin: 0 auto 12px auto;
        min-height: 220px;
        border-radius: 6px;
        overflow: hidden;
    }

    .wpa-body-image img {
        border-radius: 6px;
    }
}

/* ── Lightbox link reset ── */
.wpa-body-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.wpa-body-image a img {
    cursor: pointer;
}
