/* ==========================================================================
   Equal-Height Card Layout (Divi 5)
   ==========================================================================
   Usage: Klasse "alant-cards-equal" als Attribute auf die Row in Divi legen.
   Button-Styling (Breite, Farben) wird per Free-Form CSS am Button geregelt.

   Divi 5 rendert die Klasse per JavaScript (client-side).
   ========================================================================== */

/* 1. Row: Columns auf gleiche Hoehe strecken */
.alant-cards-equal {
    align-items: stretch !important;
}

/* 2. Aeussere Column: Flex-Column, volle Hoehe */
.alant-cards-equal > .et_pb_column {
    display: flex !important;
    flex-direction: column !important;
}

/* 3. Group: Flex-Column, fuellt die Column-Hoehe */
.alant-cards-equal > .et_pb_column > .et_pb_group {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

/* 4. Nested Row: Flex-Column, fuellt die Group-Hoehe */
.alant-cards-equal > .et_pb_column > .et_pb_group > .et_pb_row {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

/* 5. Letzte nested Column (Button): nach unten druecken */
.alant-cards-equal > .et_pb_column > .et_pb_group > .et_pb_row > .et_pb_column:last-child {
    margin-top: auto !important;
}

/* 6. Falls Button in separater nested Row: diese nach unten druecken */
.alant-cards-equal > .et_pb_column > .et_pb_group > .et_pb_row:last-child:not(:first-child) {
    margin-top: auto !important;
}

/* 7. Button-Wrapper: block + volle Breite */
.alant-cards-equal .et_pb_button_module_wrapper {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin-top: auto !important;
}
