/* =============================================
   HMF Recruitment Banner – Frontend Styles
   ============================================= */

/* === BANNER BASE === */
.hmf-rb {
    position: relative;
    /* z-index wird inline vom Backend gesetzt */
    width: 100%;
    overflow: hidden;
    background: var(--hmf-rb-bg, #a11531);
    color: var(--hmf-rb-text, #ffffff);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hidden state */
.hmf-rb--hidden {
    transform: translateY(-100%);
    opacity: 0;
    margin-top: -50px;
    pointer-events: none;
}

/* Mobile hidden */
.hmf-rb[data-hide-mobile="1"] {
    /* JS handles this */
}

/* === SHIMMER OVERLAY === */
.hmf-rb__shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent 0%, 
        rgba(255,255,255,0.06) 25%,
        rgba(255,255,255,0.12) 50%, 
        rgba(255,255,255,0.06) 75%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.hmf-rb--shimmer .hmf-rb__shimmer {
    animation: hmfRbShimmer 4s ease-in-out infinite;
}

@keyframes hmfRbShimmer {
    0%   { left: -100%; }
    50%  { left: 150%; }
    100% { left: 150%; }
}

/* === PULSE ANIMATION === */
.hmf-rb--pulse {
    animation: hmfRbPulse 3s ease-in-out infinite;
}

@keyframes hmfRbPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
    50%      { box-shadow: 0 2px 20px rgba(161,21,49,0.35); }
}

/* === INNER CONTAINER === */
.hmf-rb__inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 20px;
    gap: 12px;
}

/* === CONTENT FLEX === */
.hmf-rb__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* === ICON === */
.hmf-rb__icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transition: transform 0.3s ease, background 0.3s ease;
}

.hmf-rb:hover .hmf-rb__icon-wrap {
    transform: scale(1.1);
    background: rgba(255,255,255,0.22);
}

.hmf-rb__icon {
    display: block;
}

/* === TEXT === */
.hmf-rb__text {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--hmf-rb-text, #ffffff);
}

/* === CTA BUTTON === */
.hmf-rb__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: var(--hmf-rb-accent, #ffffff);
    color: var(--hmf-rb-bg, #a11531);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease,
                background 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hmf-rb__btn:hover,
.hmf-rb__btn:focus-visible {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    text-decoration: none;
    color: var(--hmf-rb-bg, #a11531);
}

.hmf-rb__btn:active {
    transform: translateY(0) scale(0.98);
}

/* Button arrow micro-animation */
.hmf-rb__btn-arrow {
    transition: transform 0.25s ease;
}

.hmf-rb__btn:hover .hmf-rb__btn-arrow {
    transform: translateX(3px);
}

/* Focus visible styling (accessibility) */
.hmf-rb__btn:focus-visible {
    outline: 2px solid var(--hmf-rb-text, #ffffff);
    outline-offset: 3px;
}

/* === CLOSE BUTTON === */
.hmf-rb__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    margin-left: 4px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: var(--hmf-rb-text, #ffffff);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hmf-rb__close:hover {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.hmf-rb__close:focus-visible {
    outline: 2px solid var(--hmf-rb-text, #ffffff);
    outline-offset: 2px;
}

.hmf-rb__close svg {
    display: block;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .hmf-rb__inner {
        padding: 8px 14px;
        gap: 8px;
    }

    .hmf-rb__content {
        gap: 8px;
        justify-content: center;
        text-align: center;
    }

    .hmf-rb__text {
        font-size: 12px;
        line-height: 1.35;
    }

    .hmf-rb__btn {
        font-size: 11px;
        padding: 5px 14px;
    }

    .hmf-rb__icon-wrap {
        width: 26px;
        height: 26px;
    }

    .hmf-rb__icon-wrap svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .hmf-rb__icon-wrap {
        display: none;
    }

    .hmf-rb__text {
        font-size: 11px;
    }
}

/* =============================================
   PRINT: Hide banner
   ============================================= */
@media print {
    .hmf-rb {
        display: none !important;
    }
}

/* =============================================
   REDUCED MOTION (Accessibility)
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .hmf-rb,
    .hmf-rb__shimmer,
    .hmf-rb__btn,
    .hmf-rb__icon-wrap,
    .hmf-rb__close,
    .hmf-rb__btn-arrow {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
