/* ========================================
   ImageBadge Content Element
   Bild mit positionierbarer Badge-Box
   ======================================== */

/* Container */
.imagebadge-container {
    --badge-offset: 2rem;
    --badge-offset-mobile: 1rem;
    --badge-bg-white: #ffffff;
    --badge-bg-dark: #013859;
    --badge-bg-primary: #eb3e4a;
    --badge-text-dark: #013859;
    --badge-text-light: #ffffff;
    --badge-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --badge-radius: 1rem;
}

.imagebadge-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
}

/* ========================================
   Bild Styles
   ======================================== */
.imagebadge-image {
    width: 100%;
    overflow: hidden;
}

.imagebadge-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

/* Hover Zoom Effekt */
.imagebadge--hover-zoom .imagebadge-wrapper:hover .imagebadge-img {
    transform: scale(1.05);
}

/* Parallax Container */
.imagebadge--parallax .imagebadge-image {
    overflow: hidden;
}

.imagebadge--parallax .imagebadge-img {
    will-change: transform;
}

/* ========================================
   Badge Box Styles
   ======================================== */
.imagebadge-badge {
    position: absolute;
    z-index: 10;
    padding: 1.5rem 2rem;
    border-radius: var(--badge-radius);
    box-shadow: var(--badge-shadow);
    min-width: 140px;
    text-align: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.imagebadge-badge__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.imagebadge-badge__number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.imagebadge-badge__text {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.3;
}

/* ========================================
   Badge Style Varianten
   ======================================== */

/* Weiss */
.imagebadge-badge--white {
    background-color: var(--badge-bg-white);
    color: var(--badge-text-dark);
}

/* Dunkel */
.imagebadge-badge--dark {
    background-color: var(--badge-bg-dark);
    color: var(--badge-text-light);
}

/* Primary (Rot) */
.imagebadge-badge--primary {
    background-color: var(--badge-bg-primary);
    color: var(--badge-text-light);
}

/* Transparent */
.imagebadge-badge--transparent {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--badge-text-dark);
}

/* ========================================
   Badge Positionen (9 Positionen)
   ======================================== */

/* Oben Links */
.imagebadge-badge--top-left {
    top: var(--badge-offset);
    left: var(--badge-offset);
}

/* Oben Mitte */
.imagebadge-badge--top-center {
    top: var(--badge-offset);
    left: 50%;
    transform: translateX(-50%);
}

/* Oben Rechts */
.imagebadge-badge--top-right {
    top: var(--badge-offset);
    right: var(--badge-offset);
}

/* Mitte Links */
.imagebadge-badge--middle-left {
    top: 50%;
    left: var(--badge-offset);
    transform: translateY(-50%);
}

/* Mitte */
.imagebadge-badge--middle-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mitte Rechts */
.imagebadge-badge--middle-right {
    top: 50%;
    right: var(--badge-offset);
    transform: translateY(-50%);
}

/* Unten Links */
.imagebadge-badge--bottom-left {
    bottom: var(--badge-offset);
    left: var(--badge-offset);
}

/* Unten Mitte */
.imagebadge-badge--bottom-center {
    bottom: var(--badge-offset);
    left: 50%;
    transform: translateX(-50%);
}

/* Unten Rechts */
.imagebadge-badge--bottom-right {
    bottom: var(--badge-offset);
    right: var(--badge-offset);
}

/* ========================================
   Badge Animation (Fade In)
   ======================================== */
.imagebadge-badge--animate {
    opacity: 0;
    transform: translateY(20px);
}

.imagebadge-badge--animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Spezielle Transforms fuer animierte zentrierte Badges */
.imagebadge-badge--animate.imagebadge-badge--top-center.is-visible,
.imagebadge-badge--animate.imagebadge-badge--bottom-center.is-visible {
    transform: translateX(-50%) translateY(0);
}

.imagebadge-badge--animate.imagebadge-badge--middle-left.is-visible,
.imagebadge-badge--animate.imagebadge-badge--middle-right.is-visible {
    transform: translateY(-50%);
}

.imagebadge-badge--animate.imagebadge-badge--middle-center.is-visible {
    transform: translate(-50%, -50%);
}

/* ========================================
   Responsive Anpassungen
   ======================================== */
@media (max-width: 767px) {
    .imagebadge-container {
        --badge-offset: var(--badge-offset-mobile);
    }

    .imagebadge-badge {
        padding: 1rem 1.25rem;
        min-width: 100px;
    }

    .imagebadge-badge__number {
        font-size: 1.75rem;
    }

    .imagebadge-badge__text {
        font-size: 0.75rem;
    }
}

@media (max-width: 575px) {
    .imagebadge-badge {
        padding: 0.75rem 1rem;
        min-width: 80px;
        border-radius: 0.75rem;
    }

    .imagebadge-badge__number {
        font-size: 1.5rem;
    }

    .imagebadge-badge__text {
        font-size: 0.7rem;
    }
}

/* ========================================
   Hover Effekte
   ======================================== */
.imagebadge-wrapper:hover .imagebadge-badge {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Parallax spezifische Styles
   ======================================== */
.imagebadge--parallax .imagebadge-wrapper {
    overflow: visible;
}

.imagebadge--parallax .imagebadge-image {
    overflow: hidden;
    border-radius: 0.5rem;
}
