.berg-ba-card {
    width: 100%;
}

.berg-ba-media {
    position: relative;
    width: 100%;
    min-height: 360px;
    overflow: hidden;
    background: #f6f6f4;
    aspect-ratio: 0.86;
}

.berg-ba-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 180ms ease;
}

.berg-ba-image--before {
    opacity: 0;
}

.berg-ba-image--after {
    opacity: 1;
}

.berg-ba-card[data-state="before"] .berg-ba-image--before {
    opacity: 1;
}

.berg-ba-card[data-state="before"] .berg-ba-image--after {
    opacity: 0;
}

.berg-ba-meta {
    position: absolute;
    top: 12%;
    right: 8%;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #111;
}

.berg-ba-dot {
    /* Temporarily hidden until the marker treatment is finalized. */
    display: none;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 3px solid #d8ded2;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.berg-ba-copy {
    display: grid;
    gap: 2px;
    font-family: inherit;
    line-height: 1.12;
}

.berg-ba-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.berg-ba-description {
    position: relative;
    width: max-content;
    max-width: 190px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.1;
    text-decoration: none;
}

a.berg-ba-description::after {
    content: "›";
    margin-left: 6px;
    color: #8b9188;
}

.berg-ba-toggle {
    position: absolute;
    left: 50%;
    bottom: 9%;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(78%, 410px);
    min-height: 50px;
    overflow: hidden;
    border-radius: 999px;
    background: #fbf7f5;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    transform: translateX(-50%);
}

.berg-ba-toggle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #151515;
    cursor: pointer;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    padding: 0 18px;
    text-transform: uppercase;
    transition: background-color 160ms ease, color 160ms ease;
}

.berg-ba-toggle-button[aria-pressed="true"] {
    background: #657064;
    color: #fff;
}

.berg-ba-toggle-button:focus-visible {
    outline: 3px solid #c9d2c1;
    outline-offset: -3px;
}

@media (max-width: 767px) {
    .berg-ba-media {
        min-height: 420px;
        aspect-ratio: 0.78;
    }

    .berg-ba-meta {
        top: 10%;
        right: 7%;
        gap: 10px;
    }

    .berg-ba-dot {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .berg-ba-toggle {
        width: min(84%, 360px);
        min-height: 46px;
        bottom: 8%;
    }
}
