/*
 * Editorial-Hub — News-/Magazin-Uebersicht (Pioneer-Style).
 * Klassen-Praefix: ehnes-hub*
 * Wird nur enqueued auf Seiten mit dem Editorial-Hub-Widget.
 */

:root {
    --hub-accent: #21bf61;
    --hub-text: #0c2b15;
    --hub-muted: #5a5a5a;
    --hub-border: rgba(0, 0, 0, 0.08);
    --hub-radius: 14px;
    --hub-radius-sm: 10px;
    --hub-gap: clamp(20px, 2.5vw, 32px);
}

.ehnes-hub {
    --hub-cols: 3;
    width: 100%;
    color: var(--hub-text);
}

/* ============================ Hero ============================ */

.ehnes-hub__hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
    margin-bottom: clamp(40px, 5vw, 72px);
    padding-bottom: clamp(32px, 4vw, 48px);
    border-bottom: 1px solid var(--hub-border);
}

.ehnes-hub__hero-media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--hub-radius);
    background: #f0f0f0;
}
.ehnes-hub__hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.ehnes-hub__hero:hover .ehnes-hub__hero-media img {
    transform: scale(1.03);
}

.ehnes-hub__hero-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ehnes-hub__hero-eyebrow {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--hub-accent);
}
.ehnes-hub__hero-cat {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hub-text);
    align-self: flex-start;
}
.ehnes-hub__hero-title {
    font-family: 'Fraunces', Sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 3.5vw, 52px);
    line-height: 1.1;
    margin: 0;
}
.ehnes-hub__hero-title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-size: 0 1px;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}
.ehnes-hub__hero-title a:hover {
    background-size: 100% 1px;
}
.ehnes-hub__hero-excerpt {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 300;
    font-size: clamp(15px, 1.2vw, 18px);
    line-height: 1.6;
    color: var(--hub-text);
    margin: 0;
}
.ehnes-hub__hero-meta {
    font-size: 13px;
    color: var(--hub-muted);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.ehnes-hub__hero-sep {
    opacity: 0.5;
}
.ehnes-hub__hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--hub-accent);
    color: #fff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    align-self: flex-start;
    margin-top: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ehnes-hub__hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(33, 191, 97, 0.25);
}
.ehnes-hub__hero-cta svg {
    transition: transform 0.2s ease;
}
.ehnes-hub__hero-cta:hover svg {
    transform: translateX(2px);
}

@media (max-width: 767px) {
    .ehnes-hub__hero {
        grid-template-columns: 1fr;
    }
    .ehnes-hub__hero-media {
        aspect-ratio: 16 / 9;
    }
}

/* ============================ Controls (Search + Filter) ============================ */

.ehnes-hub__controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: clamp(24px, 3vw, 40px);
}

.ehnes-hub__search {
    position: relative;
    width: 100%;
    max-width: 520px;
}
.ehnes-hub__search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hub-muted);
    pointer-events: none;
}
.ehnes-hub__search-input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    background: #fff;
    border: 1px solid var(--hub-border);
    border-radius: 999px;
    font-size: 15px;
    color: var(--hub-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
}
.ehnes-hub__search-input::-webkit-search-cancel-button { display: none; }
.ehnes-hub__search-input:focus {
    outline: none;
    border-color: var(--hub-accent);
    box-shadow: 0 0 0 3px rgba(33, 191, 97, 0.15);
}
.ehnes-hub__search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.05);
    border: 0;
    border-radius: 50%;
    color: var(--hub-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ehnes-hub__search-clear:hover {
    background: rgba(0, 0, 0, 0.1);
}

.ehnes-hub__filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.ehnes-hub__filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--hub-border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--hub-text);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.ehnes-hub__filter-pill:hover {
    border-color: var(--hub-accent);
}
.ehnes-hub__filter-pill.is-active {
    background: var(--hub-accent);
    border-color: var(--hub-accent);
    color: #fff;
}
.ehnes-hub__filter-pill.is-active .ehnes-hub__filter-count {
    color: rgba(255, 255, 255, 0.7);
}
.ehnes-hub__filter-count {
    font-size: 11px;
    color: var(--hub-muted);
    font-weight: 400;
}

/* ============================ Grid ============================ */

.ehnes-hub__grid {
    display: grid;
    grid-template-columns: repeat(var(--hub-cols), minmax(0, 1fr));
    gap: var(--hub-gap);
    margin-bottom: clamp(32px, 4vw, 56px);
}

@media (max-width: 1023px) {
    .ehnes-hub__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .ehnes-hub__grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.ehnes-hub-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--hub-radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid var(--hub-border);
}
.ehnes-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ehnes-hub-card__link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ehnes-hub-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f5;
}
.ehnes-hub-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ehnes-hub-card:hover .ehnes-hub-card__media img {
    transform: scale(1.04);
}

.ehnes-hub-card__cat {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--hub-text);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ehnes-hub-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ehnes-hub-card__title {
    font-family: 'Fraunces', Sans-serif;
    font-weight: 400;
    font-size: clamp(18px, 1.4vw, 22px);
    line-height: 1.25;
    margin: 0;
    color: var(--hub-text);
}

.ehnes-hub-card__excerpt {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    color: var(--hub-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ehnes-hub-card__meta {
    margin: auto 0 0 0;
    padding-top: 8px;
    font-size: 12px;
    color: var(--hub-muted);
    display: flex;
    gap: 6px;
    align-items: center;
}
.ehnes-hub-card__sep { opacity: 0.5; }

.ehnes-hub-card--premium .ehnes-hub-card__cat {
    background: var(--hub-accent);
    color: #fff;
}

/* ============================ Newsletter-Card im Grid ============================ */

.ehnes-hub__newsletter {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 24px;
    background: var(--hub-text);
    color: #fff;
    border-radius: var(--hub-radius);
    border: 0;
    justify-content: center;
}
.ehnes-hub__newsletter:hover {
    transform: none;
    box-shadow: none;
}
.ehnes-hub__newsletter-eyebrow {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hub-accent);
    font-weight: 700;
}
.ehnes-hub__newsletter-title {
    font-family: 'Fraunces', Sans-serif;
    font-weight: 400;
    font-size: clamp(20px, 1.6vw, 26px);
    line-height: 1.2;
    margin: 0;
    color: inherit;
}
.ehnes-hub__newsletter-text {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}
.ehnes-hub__newsletter-form input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}
.ehnes-hub__newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.ehnes-hub__newsletter-form button[type="submit"] {
    margin-top: 8px;
    width: 100%;
    padding: 10px 16px;
    background: var(--hub-accent);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

/* ============================ Status / Empty / More ============================ */

.ehnes-hub__empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--hub-muted);
    font-size: 15px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: var(--hub-radius);
}

.ehnes-hub__status {
    text-align: center;
    color: var(--hub-muted);
    margin: 16px 0;
    font-size: 14px;
}

.ehnes-hub__more {
    display: flex;
    justify-content: center;
    margin-top: clamp(24px, 3vw, 40px);
}
.ehnes-hub__more-btn {
    padding: 14px 32px;
    background: transparent;
    border: 1.5px solid var(--hub-text);
    border-radius: 999px;
    color: var(--hub-text);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.ehnes-hub__more-btn:hover {
    background: var(--hub-text);
    color: #fff;
}
.ehnes-hub__more-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* ============================ A11y / Reduced motion ============================ */

@media (prefers-reduced-motion: reduce) {
    .ehnes-hub-card,
    .ehnes-hub__hero-media img,
    .ehnes-hub-card__media img,
    .ehnes-hub__hero-cta {
        transition: none !important;
    }
    .ehnes-hub-card:hover {
        transform: none;
    }
    .ehnes-hub__hero:hover .ehnes-hub__hero-media img,
    .ehnes-hub-card:hover .ehnes-hub-card__media img {
        transform: none;
    }
}

.ehnes-hub :focus-visible {
    outline: 2px solid var(--hub-accent);
    outline-offset: 3px;
    border-radius: 4px;
}
