/* ============================================================
WERBEAUF CPT ACCORDION STYLES
Responsive Accordion for Leistungen by Category
CI Colors: #1b3d58 (primary), #4f6073 (secondary), #e8e7e2 (bg)
============================================================ */

/* ============================================================
CONTAINER
============================================================ */

.werbeauf-cpt-accordion {
    width: 100%;
    border-top: 1px solid #1b3d58 !important;
}

.werbeauf-cpt-accordion__empty {
    text-align: center;
    color: #1b3d58;
    padding: 40px 20px;
    font-size: 15px;
}

/* ============================================================
ACCORDION ITEM
============================================================ */

.werbeauf-cpt-accordion__item,
body .werbeauf-cpt-accordion__item,
#main-content .werbeauf-cpt-accordion__item {
    margin-bottom: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #1b3d58 !important;
    border-radius: 0 !important;
    overflow: hidden;
    background: transparent !important;
    box-shadow: none !important;
}


/* ============================================================
ACCORDION HEADER (Button)
============================================================ */

.werbeauf-cpt-accordion__header {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 20px 0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.werbeauf-cpt-accordion__header:hover {
    background: transparent;
}

.werbeauf-cpt-accordion__header:hover .werbeauf-cpt-accordion__title {
    color: #1b3d58;
}

.werbeauf-cpt-accordion__item.is-open .werbeauf-cpt-accordion__header {
    background: transparent;
}

.werbeauf-cpt-accordion__title {
    flex: 1;
    font-size: clamp(0.9rem, 0.8rem + 0.55vw, 1.12rem) !important;
    font-weight: 700 !important;
    color: #1b3d58 !important;
    letter-spacing: 0.03em;
    line-height: 1.3;
    margin: 0;
    transition: color 0.2s ease;
}

.werbeauf-cpt-accordion__count {
    font-size: 14px;
    font-weight: 500;
    color: #1b3d58;
    margin-right: 20px;
    opacity: 0.9;
}

.werbeauf-cpt-accordion__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #1b3d58;
    transition: transform 0.3s ease;
}

.werbeauf-cpt-accordion__item.is-open .werbeauf-cpt-accordion__icon {
    transform: rotate(180deg);
}

.werbeauf-cpt-accordion__icon svg {
    width: 20px;
    height: 20px;
}

/* ============================================================
ACCORDION CONTENT
============================================================ */

.werbeauf-cpt-accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.werbeauf-cpt-accordion__item.is-open .werbeauf-cpt-accordion__content {
    max-height: 10000px;
    transition: max-height 0.5s ease-in;
}

.werbeauf-cpt-accordion__content-inner {
    padding: 0 0 20px 0;
}

/* ============================================================
LEISTUNG ITEM
============================================================ */

.werbeauf-cpt-accordion__leistung {
    padding: 20px;
    margin-bottom: 1em;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: box-shadow 0.2s ease;
}

.werbeauf-cpt-accordion__leistung:hover {
    box-shadow: 0 4px 20px rgba(27, 61, 88, 0.08);
}

.werbeauf-cpt-accordion__leistung.has-thumbnail {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.werbeauf-cpt-accordion__leistung:first-child {
    padding-top: 20px;
}

.werbeauf-cpt-accordion__leistung:last-child {
    margin-bottom: 0;
}

/* Leistung Image */
.werbeauf-cpt-accordion__leistung-image {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
}

.werbeauf-cpt-accordion__leistung-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.werbeauf-cpt-accordion__leistung-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.werbeauf-cpt-accordion__leistung-image:hover img {
    transform: scale(1.05);
}

/* Leistung Content */
.werbeauf-cpt-accordion__leistung-content {
    flex: 1;
    min-width: 0;
}

/* Leistung Header (Title + Labels) */
.werbeauf-cpt-accordion__leistung-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 1em;
}

/* Leistung Title - High specificity to override Divi */
.werbeauf-cpt-accordion__leistung-title,
.werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-title,
body .werbeauf-cpt-accordion__leistung-title,
.et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-title {
    margin: 0 !important;
    font-size: clamp(1.1rem, 1rem + 0.3vw, 1.25rem) !important;
    font-weight: 700 !important;
    color: #1b3d58 !important;
    padding-bottom: 0 !important;
}

/* Leistung Title Link - High specificity to override Divi */
.werbeauf-cpt-accordion__leistung-title a,
.werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-title a,
body .werbeauf-cpt-accordion__leistung-title a,
.et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-title a {
    color: #1b3d58 !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.werbeauf-cpt-accordion__leistung-title a:hover,
.werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-title a:hover,
body .werbeauf-cpt-accordion__leistung-title a:hover,
.et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-title a:hover {
    color: #4f6073 !important;
}

/* Gender Labels */
.werbeauf-cpt-accordion__labels {
    display: flex;
    gap: 7px;
}

.werbeauf-cpt-accordion__label {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 3px;
}

.werbeauf-cpt-accordion__label--maenner {
    background: #F0F4F8;
    color: #1b3d58;
}

.werbeauf-cpt-accordion__label--frauen {
    background: #FDF2F0;
    color: #1b3d58;
}

/* Leistung Excerpt - High specificity to override Divi */
.werbeauf-cpt-accordion__leistung-excerpt,
.werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-excerpt,
body .werbeauf-cpt-accordion__leistung-excerpt,
.et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-excerpt {
    margin: 0 0 1em !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #1b3d58 !important;
}

/* Leistung Button - High specificity to override Divi */
.werbeauf-cpt-accordion__leistung-btn,
.werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-btn,
body .werbeauf-cpt-accordion__leistung-btn,
.et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .8em 2.1em;
    line-height: 1.4em;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none !important;
    background: #1b3d58 !important;
    border: 2px solid #1b3d58 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.werbeauf-cpt-accordion__leistung-btn:hover,
.werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-btn:hover,
body .werbeauf-cpt-accordion__leistung-btn:hover,
.et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-btn:hover {
    background: transparent !important;
    color: #1b3d58 !important;
}

/* ============================================================
RESPONSIVE: Tablet (max-width: 980px)
============================================================ */

@media (max-width: 980px) {
    .werbeauf-cpt-accordion__title {
        font-size: 1.03rem !important;
    }

    .werbeauf-cpt-accordion__count {
        font-size: 13px;
        margin-right: 15px;
    }

    .werbeauf-cpt-accordion__leistung-image {
        width: 110px;
        height: 110px;
    }

    .werbeauf-cpt-accordion__leistung-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .werbeauf-cpt-accordion__leistung-title,
    .werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-title,
    .et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-title {
        font-size: 1.05rem !important;
    }

    .werbeauf-cpt-accordion__label {
        padding: 1px 7px;
        font-size: 9px;
    }

    .werbeauf-cpt-accordion__leistung-excerpt {
        font-size: 14px;
    }

    .werbeauf-cpt-accordion__leistung-btn {
        font-size: 11px;
    }
}

/* ============================================================
RESPONSIVE: Smartphone (max-width: 767px)
============================================================ */

@media (max-width: 767px) {
    .werbeauf-cpt-accordion__title {
        font-size: 1.01rem !important;
    }

    .werbeauf-cpt-accordion__count {
        font-size: 12px;
    }

    .werbeauf-cpt-accordion__leistung-title,
    .werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-title,
    .et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-title {
        font-size: 1rem !important;
    }

    .werbeauf-cpt-accordion__label {
        padding: 0px 6px;
        font-size: 8px;
    }

    .werbeauf-cpt-accordion__leistung-excerpt {
        font-size: 13px;
    }

    .werbeauf-cpt-accordion__leistung-btn {
        font-size: 10px;
    }
}

/* ============================================================
RESPONSIVE: Custom (max-width: 550px)
============================================================ */

@media (max-width: 550px) {
    .werbeauf-cpt-accordion__title {
        font-size: 0.95rem !important;
    }

    .werbeauf-cpt-accordion__count {
        margin-right: 10px;
    }

    .werbeauf-cpt-accordion__leistung-title,
    .werbeauf-cpt-accordion .werbeauf-cpt-accordion__leistung-title,
    .et-db #et-boc .et-l .werbeauf-cpt-accordion__leistung-title {
        font-size: 0.95rem !important;
    }

    .werbeauf-cpt-accordion__icon {
        width: 20px;
        height: 20px;
    }

    .werbeauf-cpt-accordion__icon svg {
        width: 15px;
        height: 15px;
    }

    .werbeauf-cpt-accordion__leistung.has-thumbnail {
        flex-direction: column;
    }

    .werbeauf-cpt-accordion__leistung-image {
        width: 100%;
        height: 180px;
    }

    .werbeauf-cpt-accordion__leistung-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
ARCHIV STYLES (Flat List - nur Leistungen, keine Kategorien)
Archiv erbt ALLE Styles vom normalen Accordion.
Nur der Container-border wird entfernt.
============================================================ */

/* Archiv Container: Kein border-top */
.werbeauf-cpt-archiv,
.werbeauf-cpt-accordion.werbeauf-cpt-archiv {
    border-top: none !important;
}

/* Archiv Items Container */
.werbeauf-cpt-archiv__items {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

/* Archiv Leistung Cards: margin-bottom anpassen (gap Ã¼bernimmt) */
.werbeauf-cpt-archiv .werbeauf-cpt-accordion__leistung {
    margin-bottom: 0;
}