/* ============================================================
   Divi Accordion via CSS-Klassen – v6.0.0
   ============================================================ */

/* --- Wrapper ----------------------------------------------- */
.cdac-wrapper {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* --- Item -------------------------------------------------- */
.cdac-item {
    border-bottom: 1px solid #e0e0e0;
}

.cdac-item:last-child {
    border-bottom: none;
}

/* --- Header-Button ----------------------------------------- */
.cdac-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    background-color: #f5f5f5;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    box-sizing: border-box;
    transition: background-color 0.25s ease, color 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.cdac-header:hover {
    filter: brightness(0.95);
}

.cdac-header:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: -2px;
}

.cdac-header.is-active {
    background-color: #0073aa;
    color: #fff;
}

.cdac-header-title {
    flex: 1;
}

.cdac-header-icon {
    flex-shrink: 0;
    margin-left: 14px;
    font-size: 1.5em;
    font-weight: 300;
    line-height: 1;
    display: inline-block;
    transition: transform 0.3s ease;
    user-select: none;
}

.cdac-header.is-active .cdac-header-icon {
    transform: rotate(45deg);
}

/* --- Body -------------------------------------------------- */
.cdac-body {
    background: #fff;
    box-sizing: border-box;
}

.cdac-body[hidden] {
    display: none !important;
}

/* --- Content-Reihen im Body --------------------------------
   Jede accordion-content Reihe behält ihr normales
   Divi-Layout (Spalten, Abstände etc.) – wir setzen nur
   die nötigsten Overrides.
   ---------------------------------------------------------- */
.cdac-body .cdac-content-row {
    width: 100% !important;
    max-width: 100% !important;
    /* Divi-Standard-Padding beibehalten – kann im Divi Builder
       pro Reihe individuell angepasst werden */
}

/* Trennlinie zwischen mehreren Content-Reihen */
.cdac-body .cdac-content-row + .cdac-content-row {
    border-top: 1px solid #f0f0f0;
}

/* Letztes Modul-Margin entfernen */
.cdac-body .et_pb_module:last-child {
    margin-bottom: 0 !important;
}

/* Bilder */
.cdac-body img {
    max-width: 100%;
    height: auto;
}

/* Titel-Modul im Header verstecken */
.accordion-title {
    display: none !important;
}

/* Animation beim Öffnen */
.cdac-body:not([hidden]) {
    animation: cdac-reveal 0.25s ease;
}

@keyframes cdac-reveal {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 767px) {
    .cdac-header {
        padding: 14px 16px;
        font-size: 15px;
    }
}
