/****************************************************************************
 * Boxed Items (Listing)
 *
 * INFO: Karten-Listing - weisses Panel, Bild oben bündig, darunter
 *       Subtitel (über dem Titel), Titel, Text und Arrow-Link.
 *
 * HTML: .listing.row.boxed_items
 *          > .columns.item
 *              > .item_inner.row
 *                  > figure.item_image
 *                  > .item_content
 *                      > .content_title            (h3 + p  ->  p wird nach oben getauscht)
 *                      > .item_content_inner
 *                      > .button-group > a.button  (wird zu Arrow-Link)
 ****************************************************************************/

/****************************************************************************
 * Grid / Abstände
 ****************************************************************************/
.boxed_items .item {
    display: flex;
    margin-bottom: 1.875rem;
}

/****************************************************************************
 * Karte
 ****************************************************************************/
.boxed_items .item_inner {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    flex-flow: column nowrap;
    background-color: #ffffff;
    border-bottom: 0.1875rem solid #E6007E;
    box-shadow: 0 0.75rem 1.75rem rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/****************************************************************************
 * Bild - randlos oben
 ****************************************************************************/
.boxed_items .item_image {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.boxed_items .item_image .data_ratio {
    transition: transform 0.4s ease;
}

/****************************************************************************
 * Inhalt
 ****************************************************************************/
.boxed_items .item_content {
    flex: 1 1 auto;
    display: flex;
    flex-flow: column nowrap;
    width: 100%;
    max-width: 100%;
    padding: 1.75rem 1.5rem 1.5rem;
}

/* Subtitel <-> Titel tauschen (Reihenfolge, Farbe unverändert) */
.boxed_items .content_title {
    display: flex;
    flex-flow: column nowrap;
    padding-bottom: 0.85rem;
}
.boxed_items .content_title > p {
    order: -1;
    margin: 0 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
}
.boxed_items .content_title > *:not(p) {
    margin: 0;
    line-height: 1.2;
}

.boxed_items .item_content_inner {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.boxed_items .item_content_inner p:last-child {
    margin-bottom: 0;
}

/****************************************************************************
 * Button -> Arrow-Link
 ****************************************************************************/
.boxed_items .button-group {
    position: relative;
    margin: 0 -1.5rem;
    padding: 1.25rem 1.5rem 0;
}
/* Underline über gesamte Kartenbreite (Hover) */
.boxed_items .button-group::before {
    content: "";
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 0;
    height: 0.125rem;
    background-color: #E6007E;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s ease;
}
.boxed_items .button-group .button,
.boxed_items .button-group .button:visited {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: #E6007E;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
}
.boxed_items .button-group .button::after {
    content: "";
    display: inline-block;
    width: 1.1em;
    height: 0.7em;
    margin-left: 0.6em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M16 0l-1.4 1.4 5.6 5.6H0v2h20.2l-5.6 5.6L16 16l8-8z'/%3E%3C/svg%3E") no-repeat 100% 50% / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Cpath d='M16 0l-1.4 1.4 5.6 5.6H0v2h20.2l-5.6 5.6L16 16l8-8z'/%3E%3C/svg%3E") no-repeat 100% 50% / contain;
    transition: transform 0.25s ease;
}
.boxed_items .button-group .button:hover,
.boxed_items .button-group .button:focus {
    background: none;
    color: #870F54;
}
.boxed_items .button-group .button:hover::after,
.boxed_items .button-group .button:focus::after {
    transform: translateX(0.25rem);
}

/****************************************************************************
 * Hover-State (ganze Karte)
 ****************************************************************************/
.boxed_items .item_inner:hover,
.boxed_items .item_inner:focus-within {
    transform: translateY(-0.625rem);
    box-shadow: 0 1.5rem 2.75rem rgba(0, 0, 0, 0.13);
}
.boxed_items .item_inner:hover .item_image .data_ratio,
.boxed_items .item_inner:focus-within .item_image .data_ratio {
    transform: scale(1.05);
}
.boxed_items .item_inner:hover .button-group::before,
.boxed_items .item_inner:focus-within .button-group::before {
    transform: scaleX(1);
}
.boxed_items .item_inner:hover .button-group .button::after,
.boxed_items .item_inner:focus-within .button-group .button::after {
    transform: translateX(0.25rem);
}

@media (prefers-reduced-motion: reduce) {
    .boxed_items .item_inner,
    .boxed_items .item_image .data_ratio,
    .boxed_items .button-group::before,
    .boxed_items .button-group .button::after {
        transition: none;
    }
    .boxed_items .item_inner:hover,
    .boxed_items .item_inner:focus-within {
        transform: none;
    }
}
