/**
 * Blog Insights – Editorial Layout (Hero, Featured, Chips, Drawer, Newsletter)
 * Jan Hofer Tennisschule
 */

/* —— Hero —— */
#hero-blog.blog-hero {
    position: relative;
    min-height: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding-top: 4.5rem;
    padding-bottom: 1.25rem;
}

@media (min-width: 768px) {
    #hero-blog.blog-hero {
        min-height: 62vh;
        align-items: center;
        padding-top: 5rem;
        padding-bottom: 3rem;
    }
}

.blog-hero__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.blog-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    filter: brightness(1.05) saturate(1.08);
}

.blog-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        165deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.28) 45%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.blog-hero__accent {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 200, 81, 0.22) 0%, transparent 55%);
    pointer-events: none;
}

.blog-hero__panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
    padding: 1rem 1.1rem 1.15rem;
    text-align: center;
    border-radius: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(8, 12, 18, 0.52);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow:
        0 24px 48px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    color: #fff;
}

@media (min-width: 768px) {
    .blog-hero__panel {
        max-width: 46rem;
        padding: 2rem 2.4rem 2.15rem;
        border-radius: 1.5rem;
    }
}

.blog-hero__eyebrow {
    display: inline-block;
    margin-bottom: 0.55rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    border-radius: 9999px;
    border: 1px solid rgba(134, 239, 172, 0.45);
    background: rgba(0, 200, 81, 0.22);
}

@media (min-width: 768px) {
    .blog-hero__eyebrow {
        margin-bottom: 0.85rem;
        padding: 0.35rem 0.85rem;
        font-size: 0.6875rem;
        letter-spacing: 0.14em;
    }
}

.blog-hero__title {
    margin: 0 0 0.55rem;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
}

@media (min-width: 480px) {
    .blog-hero__title {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .blog-hero__title {
        margin-bottom: 0.85rem;
        font-size: clamp(1.85rem, 3.2vw, 2.75rem);
        line-height: 1.12;
    }
}

.blog-hero__title span {
    color: #4ade80;
}

.blog-hero__lead {
    margin: 0 0 0.95rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

@media (min-width: 768px) {
    .blog-hero__lead {
        margin-bottom: 1.25rem;
        font-size: 1.05rem;
        line-height: 1.55;
    }
}

.blog-hero__links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
}

@media (min-width: 480px) {
    .blog-hero__links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.65rem;
    }
}

.blog-hero__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.6rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

@media (min-width: 480px) {
    .blog-hero__link {
        width: auto;
        padding: 0.65rem 1.25rem;
        font-size: 0.875rem;
    }
}

.blog-hero__link--primary {
    background: #00c851;
    color: #fff;
}

.blog-hero__link--primary:hover {
    background: #00a041;
}

.blog-hero__link--ghost {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
}

.blog-hero__link--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* —— Filter chips —— */
.blog-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    justify-content: flex-start;
    margin: 0 -1rem 1.5rem;
    padding: 0.15rem 1rem 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.blog-chips::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .blog-chips {
        flex-wrap: wrap;
        justify-content: center;
        margin: 0 0 2rem;
        padding: 0;
        overflow: visible;
    }
}

.blog-chip {
    appearance: none;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

@media (min-width: 768px) {
    .blog-chip {
        font-size: 0.8125rem;
        padding: 0.45rem 0.95rem;
    }
}

.blog-chip:hover {
    border-color: rgba(0, 200, 81, 0.45);
    color: #00a041;
}

.blog-chip.is-active {
    background: #00c851;
    border-color: #00c851;
    color: #fff;
}

.blog-chip:focus-visible {
    outline: 3px solid rgba(0, 200, 81, 0.4);
    outline-offset: 2px;
}

/* —— Featured —— */
.blog-featured {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    min-height: 0;
}

@media (min-width: 900px) {
    .blog-featured {
        grid-template-columns: 1.35fr 1fr;
        min-height: 22rem;
    }
}

.blog-featured__media {
    position: relative;
    min-height: 14rem;
}

@media (min-width: 900px) {
    .blog-featured__media {
        min-height: 100%;
    }
}

.blog-featured__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    inset: 0;
}

.blog-featured__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 55%);
    pointer-events: none;
}

.blog-featured__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 1.35rem 1.75rem;
    color: #fff;
    background: linear-gradient(160deg, #111827 0%, #0f172a 60%, #0b1220 100%);
}

@media (min-width: 900px) {
    .blog-featured__body {
        padding: 2.25rem 2rem;
    }
}

.blog-featured__badge {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 0.85rem;
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    background: rgba(0, 200, 81, 0.18);
    border: 1px solid rgba(134, 239, 172, 0.4);
    color: #86efac;
}

.blog-featured__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.blog-featured__teaser {
    margin: 0 0 1.35rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.blog-featured__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    border-radius: 9999px;
    background: #00c851;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.blog-featured__cta:hover {
    background: #00a041;
}

.blog-featured.is-hidden {
    display: none;
}

/* —— Grid cards —— */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

@media (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.75rem;
    }
}

.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.blog-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
    border-color: rgba(0, 200, 81, 0.25);
    transform: translateY(-2px);
}

.blog-card.is-hidden {
    display: none;
}

.blog-card__media {
    position: relative;
    height: 11rem;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.04);
}

.blog-card__badge {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.95);
    color: #00a041;
    border: 1px solid rgba(0, 200, 81, 0.4);
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.blog-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 1.15rem 1.15rem 1.25rem;
}

.blog-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 700;
    color: #111827;
    min-height: 2.7em;
}

.blog-card__teaser {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.55;
    flex: 1 1 auto;
}

.blog-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    color: #00a041;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
}

.blog-card__cta:hover {
    text-decoration: underline;
}

.blog-card__cta:focus-visible {
    outline: 3px solid rgba(0, 200, 81, 0.4);
    outline-offset: 3px;
    border-radius: 4px;
}

.blog-empty {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.blog-empty.is-visible {
    display: block;
}

/* —— Article bodies (hidden sources for drawer) —— */
.blog-article-source {
    display: none !important;
}

/* —— Drawer —— */
.blog-drawer {
    position: fixed;
    inset: 0;
    z-index: 80;
    pointer-events: none;
    visibility: hidden;
}

.blog-drawer[hidden] {
    display: none !important;
}

.blog-drawer.is-open {
    display: block !important;
    pointer-events: auto;
    visibility: visible;
}

.blog-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.blog-drawer.is-open .blog-drawer__backdrop {
    opacity: 1;
}

.blog-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(100%, 34rem);
    background: #fff;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-drawer.is-open .blog-drawer__panel {
    transform: translateX(0);
}

@media (max-width: 639px) {
    .blog-drawer__panel {
        width: 100%;
        border-radius: 1rem 1rem 0 0;
        top: auto;
        bottom: 0;
        height: min(92vh, 100%);
        transform: translateY(100%);
    }

    .blog-drawer.is-open .blog-drawer__panel {
        transform: translateY(0);
    }
}

.blog-drawer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.blog-drawer__meta {
    min-width: 0;
}

.blog-drawer__badge {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding: 0.15rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9999px;
    color: #00a041;
    border: 1px solid rgba(0, 200, 81, 0.4);
    background: rgba(0, 200, 81, 0.08);
}

.blog-drawer__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.3;
    color: #111827;
}

.blog-drawer__close {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    color: #111827;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.blog-drawer__close:hover {
    background: #f3f4f6;
}

.blog-drawer__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.blog-drawer__body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.85rem;
}

.blog-drawer__body h4 {
    font-size: 0.95rem;
    font-weight: 650;
    color: #1f2937;
    margin: 0 0 0.4rem;
}

.blog-drawer__body p,
.blog-drawer__body li {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #4b5563;
}

.blog-drawer__foot {
    padding: 1rem 1.25rem 1.35rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    background: #fafafa;
}

.blog-drawer__cta {
    display: none;
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: 9999px;
    background: #00c851;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.blog-drawer__cta.is-visible {
    display: block;
}

.blog-drawer__cta:hover {
    background: #00a041;
}

body.blog-drawer-open {
    overflow: hidden;
}

/* —— Newsletter bridge —— */
.blog-newsletter {
    position: relative;
    margin-top: 2rem;
    padding: 3.5rem 1rem 4.5rem;
    background: linear-gradient(135deg, #e8fceb 0%, #00c851 70%);
}

.blog-newsletter__card {
    max-width: 36rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 1.75rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 16px 40px rgba(0, 100, 40, 0.18);
    transform: translateY(1.75rem);
}

.blog-newsletter__title {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    font-weight: 800;
    color: #111827;
}

.blog-newsletter__text {
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

.blog-newsletter__form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

@media (min-width: 520px) {
    .blog-newsletter__form {
        flex-direction: row;
    }
}

.blog-newsletter__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.85rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    font-size: 0.95rem;
    color: #111827;
    background: #fff;
}

.blog-newsletter__input:focus {
    outline: 3px solid rgba(0, 200, 81, 0.35);
    outline-offset: 1px;
}

.blog-newsletter__submit {
    padding: 0.85rem 1.35rem;
    border-radius: 9999px;
    border: none;
    background: #111827;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.blog-newsletter__submit:hover {
    background: #000;
}

.blog-newsletter + footer {
    padding-top: 4.5rem;
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card__img,
    .blog-drawer__backdrop,
    .blog-drawer__panel,
    .blog-newsletter__card {
        transition: none !important;
        transform: none !important;
    }
}
