/* ═══════════════════════════════════════════════════════════════════════════
   Ohne !important — nachgemessen, nicht geraten
   6 Stück standen hier; wirksam waren die an den Pfeiltasten.
   ═══════════════════════════════════════════════════════════════════════════ */

/* =============================================================================
   HDM Testimonial
   ============================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────────────────────── */
.hdm-testi {
    --hdm-star:        #fbbf24;
    --hdm-dot-off:     rgba(0, 0, 0, 0.18);
    --hdm-arrow-hover: #7c3aed;

    position: relative;
    /* no default background — transparent unless set via Elementor Style tab */
    border-radius: 24px;
    padding: 48px 48px 36px;
    overflow: hidden;
    cursor: grab;
}
.hdm-testi.is-dragging {
    cursor: grabbing;
    user-select: none;
}
.hdm-testi-prev,
.hdm-testi-next,
.hdm-testi-dot {
    cursor: pointer;
}

/* ── Headline ─────────────────────────────────────────────────────────────────── */
.hdm-testi-headline {
    color: #1a1a2e;
    margin: 0 0 32px;
    padding: 0;
    text-transform: none;
}

/* ── Slides ───────────────────────────────────────────────────────────────────── */
.hdm-testi-slide {
    display: none;
}
.hdm-testi-slide.active {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 32px;
    align-items: stretch;    /* equal height — both columns same height */
    animation: hdmTestiIn 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes hdmTestiIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Left: Main Image ─────────────────────────────────────────────────────────── */
.hdm-testi-left {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;   /* prevent grid blowout */
}

.hdm-testi-img-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    flex: 1;               /* fills full column height = same as card */
    min-height: 280px;     /* floor so it never collapses */
    background: #e5e7eb;
}
.hdm-testi-img-wrap > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}
.hdm-testi-img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
}

/* ── Trusted Clients Pill ─────────────────────────────────────────────────────── */
.hdm-testi-clients {
    position: relative;
    align-self: center;          /* center horizontally in the flex column */
    margin-top: -24px;           /* pull up so it overlaps the bottom edge of the image */
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 8px 10px 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    max-width: calc(100% - 24px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
}

.hdm-testi-clients-label {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1;
    flex-shrink: 0;
}

.hdm-testi-client-thumbs {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.hdm-testi-client-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    margin-left: -8px;
    user-select: none;
    -webkit-user-drag: none;
}
.hdm-testi-client-thumb:first-child {
    margin-left: 0;
}

/* "+" button after avatars */
.hdm-testi-clients-plus {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    margin-left: -8px;
    line-height: 1;
    user-select: none;
}

/* ── Right: Card ──────────────────────────────────────────────────────────────── */
.hdm-testi-right {
    display: flex;
    flex-direction: column;
    min-width: 0;   /* prevent grid blowout */
}

.hdm-testi-card {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    border-radius: 20px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

/* Card top: icon left, stars right */
.hdm-testi-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.hdm-testi-icon {
    line-height: 0;
    flex-shrink: 0;
}
.hdm-testi-icon i {
    font-size: 40px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1;
}
.hdm-testi-icon svg {
    width: 40px;
    height: 40px;
    fill: rgba(255, 255, 255, 0.45);
}

/* Stars */
.hdm-testi-stars {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.hdm-testi-star {
    position: relative;
    display: inline-block;
    font-size: 20px;
    line-height: 1;
    color: rgba(0, 0, 0, 0.15); /* empty / base color */
}
.hdm-testi-star.full {
    color: var(--hdm-star, #fbbf24);
}
/* Half star: base shows empty (right side), ::before shows filled left half */
.hdm-testi-star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    font-size: inherit;
    line-height: inherit;
    color: var(--hdm-star, #fbbf24);
    clip-path: inset(0 50% 0 0);
}

/* Text */
.hdm-testi-text {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.75;
    margin: 0;
    flex: 1;
}

/* Author */
.hdm-testi-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.hdm-testi-author-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    user-select: none;
    -webkit-user-drag: none;
}
.hdm-testi-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.hdm-testi-author-name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hdm-testi-author-role {
    display: block;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Navigation Controls ──────────────────────────────────────────────────────── */
.hdm-testi-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;   /* dots left, arrows right */
    gap: 16px;
    margin-top: 24px;
}

/* Dots — small circles that expand to a pill when active */
.hdm-testi-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Dots are <span> elements — zero browser-default interference */
.hdm-testi-dot {
    display: inline-block;
    position: relative;
    overflow: hidden;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hdm-dot-off, rgba(0, 0, 0, 0.18));
    cursor: pointer;
    flex-shrink: 0;
    transition: width 300ms cubic-bezier(0.23, 1, 0.32, 1),
                border-radius 300ms cubic-bezier(0.23, 1, 0.32, 1),
                background 300ms ease;
}
.hdm-testi-dot.active {
    width: 28px;
    border-radius: 8px;
    background: #7c3aed; /* Elementor Group_Control_Background overrides this */
}
/* Autoplay progress fill — slides left-to-right over --hdm-ap-speed duration */
.hdm-testi-dot.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    animation: hdmDotFill var(--hdm-ap-speed, 0s) linear forwards;
}
@keyframes hdmDotFill {
    to { left: 0; }
}
/* Pause the fill animation on hover when pause-hover is active */
.hdm-testi.hdm-pause-hover:hover .hdm-testi-dot.active::after {
    animation-play-state: paused;
}
.hdm-testi-dot:focus-visible {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Arrow buttons — flache Icons, kein Kreis */
.hdm-testi-arrows {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

/* Zwei Regeln statt einer, und die Teilung ist Absicht.

   STARK (mit Vorfahre, 0,2,0): genau die fünf Eigenschaften, die vorher
   !important trugen. Sie müssen `.elementor-kit-24 button` (0,1,1)
   schlagen, sonst werden aus den schlichten Pfeilen zwei blaue Pillen mit
   84 px Radius und rosa Rahmen.

   SCHWACH (eine Klasse): alles andere. Bei `padding` und `line-height`
   gewinnt heute das Kit — die Pfeile sind dadurch 44 statt 36 Pixel gross.
   Das ist nicht die Absicht des Widgets, aber der Zustand deiner Seite, und
   diese Umstellung soll daran nichts ändern. */
.hdm-testi-arrows .hdm-testi-prev,
.hdm-testi-arrows .hdm-testi-next {
    min-height: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.hdm-testi-prev,
.hdm-testi-next {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    line-height: 0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: transform 140ms cubic-bezier(0.23, 1, 0.32, 1);
}
.hdm-testi-prev:hover svg,
.hdm-testi-next:hover svg {
    stroke: var(--hdm-arrow-hover, #7c3aed);
    opacity: 1;
}
.hdm-testi-prev:active,
.hdm-testi-next:active {
    transform: scale(0.88);
}
.hdm-testi-prev svg,
.hdm-testi-next svg {
    width: 22px;
    height: 22px;
    stroke: #1a1a2e;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 200ms ease, opacity 200ms ease;
    display: block;
    flex-shrink: 0;
    opacity: 0.35;
}
.hdm-testi-prev svg { transform: none; }
.hdm-testi-next svg { transform: none; }
.hdm-testi-prev:focus-visible,
.hdm-testi-next:focus-visible {
    outline: 2px solid var(--hdm-dot-on, #7c3aed);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ── Responsive ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hdm-testi {
        padding: 32px 32px 24px;
    }
    .hdm-testi-slide.active {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hdm-testi-img-wrap {
        flex: none;         /* don't stretch; let aspect-ratio control height */
        aspect-ratio: 16 / 7;
        min-height: 0;
        max-height: 280px;
        width: 100%;
    }
    .hdm-testi-card {
        padding: 28px;
        gap: 16px;
    }
}
@media (max-width: 600px) {
    .hdm-testi {
        padding: 24px 20px 20px;
        border-radius: 16px;
    }
    .hdm-testi-card {
        padding: 24px 20px;
    }
    .hdm-testi-text {
        font-size: 15px;
    }
    .hdm-testi-img-wrap {
        aspect-ratio: 16 / 9;
        max-height: 200px;
    }
    /* Larger touch targets on mobile */
    .hdm-testi-prev,
    .hdm-testi-next {
        width: 44px;
        height: 44px;
    }
    .hdm-testi-prev svg,
    .hdm-testi-next svg {
        width: 24px;
        height: 24px;
        opacity: 0.5;
    }
}

/* ── Reduced Motion ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .hdm-testi-slide.active {
        animation: none;
    }
    .hdm-testi-dot,
    .hdm-testi-prev,
    .hdm-testi-next {
        transition: none;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   Das Kit setzt `.elementor-kit-24 h1..h4 { text-transform: capitalize }` —
   (0,1,1), geladen vor uns. `.hdm-testi-headline` allein ist (0,1,0) und
   verliert: Aus „Was unsere Kunden sagen" wird „Was Unsere Kunden Sagen".
   Hier stand frueher ein `!important`; mit dem Vorfahren genuegt (0,2,0).
   ══════════════════════════════════════════════════════════════════════════ */
.hdm-testi .hdm-testi-headline { text-transform: none; }

/* ── Gleiche Höhe, Aufklappen, Kundenlogo, Projektlink (4.6.0, AP 22) ─────────── */
.hdm-testi--gleich .hdm-testi-text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--testi-zeilen, 5);
    overflow: hidden;
    flex: none;
    min-height: calc(var(--testi-zeilen, 5) * 1lh);
}
.hdm-testi--gleich .hdm-testi-text.offen {
    display: block;
    -webkit-line-clamp: unset;
}
.hdm-testi-mehr {
    align-self: flex-start;
    margin-top: -8px;
    padding: 8px 14px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    transition: background 0.2s ease;
}
.hdm-testi-mehr:hover { background: rgba(255, 255, 255, 0.26); }
.hdm-testi-mehr[hidden] { display: none; }
.hdm-testi-logo {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 7px 14px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 22px -14px rgba(0, 0, 0, 0.45);
}
.hdm-testi-logo img {
    display: block;
    height: 34px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}
.hdm-testi-projekt {
    margin-left: auto;
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 99px;
    background: #fff;
    color: #0a1628;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.25s ease;
}
.hdm-testi-projekt:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.5); color: #0a1628; }
@media (max-width: 600px) {
    .hdm-testi-author { flex-wrap: wrap; }
    .hdm-testi-projekt { margin-left: 0; }
}

/* ── Gleiche Höhe, wirklich (4.6.7): Alle Folien liegen in derselben Rasterzelle, die Höhe richtet sich nach der
   längsten Stimme. Vorher bekam nur die aktive Folie Platz, der Abschnitt sprang beim Blättern. ── */
.hdm-testi--gleich { display: grid; grid-template-columns: minmax(0, 1fr); }
.hdm-testi--gleich > .hdm-testi-headline { grid-row: 1; }
.hdm-testi--gleich > .hdm-testi-slide { grid-row: 2; grid-column: 1; display: grid; grid-template-columns: 5fr 7fr; gap: 32px; align-items: stretch; visibility: hidden; opacity: 0; pointer-events: none; }
.hdm-testi--gleich > .hdm-testi-slide.active { visibility: visible; opacity: 1; pointer-events: auto; }
.hdm-testi--gleich > .hdm-testi-controls { grid-row: 3; }
/* Eine fremde Regel gibt Bildern „transition: .3s“ (alle Eigenschaften); damit lief auch die geerbte Sichtbarkeit mit und
   blieb in Hintergrund-Tabs auf „hidden“ stehen. Sichtbarkeit nie animieren. */
.hdm-testi--gleich > .hdm-testi-slide img { transition-property: transform, opacity, filter; }
/* Einspaltig: der Platz der längsten Stimme geht an den Text, nicht ans Bild; sonst sprang das Bild beim Blättern (4.7.7) */
@media (max-width: 900px) { .hdm-testi--gleich > .hdm-testi-slide { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; gap: 20px; } }

/* Vorformulierte Stimme ohne Freigabe: nur für Angemeldete sichtbar, deutlich markiert */
.hdm-testi-entwurf { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: #fff4d6; color: #7a5200; font-weight: 700; font-size: 12px; line-height: 1.2; letter-spacing: 0; text-transform: none; box-shadow: inset 0 0 0 1px #f0c35a; }
.hdm-testi-slide--entwurf .hdm-testi-card { outline: 2px dashed #f0c35a; outline-offset: -2px; }

