/* Shared cards and carousel for blog lists and marketing pages. */

/* ---------------------------------------------- Karte */
.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}
.blog-card-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-tertiary);
}
.blog-card-thumb img {
    width: 100%;
    /* The legacy stylesheet applies `article img { height:auto !important; }`.
       Keep card thumbnails inside their fixed aspect-ratio frame nonetheless. */
    height: 100% !important;
    object-fit: cover;
    transition: transform .4s;
}
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }
.blog-card-body {
    padding: 1.1rem 1.2rem 1.3rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .78rem;
    color: var(--text-tertiary);
}
.blog-card-cat {
    color: var(--primary-light);
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.blog-card-cat:hover { text-decoration: underline; }
.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.blog-card-title a { color: var(--text); text-decoration: none; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.55;
    margin: 0;
}
.blog-card-more {
    margin-top: auto;
    color: var(--primary);
    font-weight: 600;
    font-size: .85rem;
    text-decoration: none;
    align-self: flex-start;
}
.blog-card-more:hover { gap: .4rem; text-decoration: underline; }

/* ============================================================
   Blog-Area (wiederverwendbar: Startseite / City / Country)
   ============================================================ */
.blog-area { overflow: hidden; }
/* Die Standard-Containerbreite der App ist für drei Karten gedacht. Für vier
   lesbare Karten auf großen Displays darf dieser Abschnitt breiter werden. */
.blog-area .container { width: min(1320px, calc(100% - 48px)); }
.blog-slider { position: relative; margin-top: 1.5rem; }
.blog-slider-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scroll-padding-inline: 1px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: .25rem 1px .7rem;
}
.blog-slider-track::-webkit-scrollbar { display: none; }
.blog-slider-track .blog-card {
    flex: 0 0 calc((100% - 3.75rem) / 4);
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.blog-slider-control {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border, rgba(255,255,255,.16));
    border-radius: 50%;
    background: var(--card, #111827);
    color: var(--text, #fff);
    box-shadow: 0 8px 22px rgba(0,0,0,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(-50%);
    transition: opacity .2s, background .2s, color .2s, transform .2s;
}
.blog-slider-prev { left: -22px; }
.blog-slider-next { right: -22px; }
.blog-slider-control svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.blog-slider-control:hover:not(:disabled) { background: var(--primary, #ff2d6b); color: #fff; transform: translateY(-50%) scale(1.06); }
.blog-slider-control:disabled { opacity: 0; pointer-events: none; }
.blog-slider-status { display: none; }

@media (max-width: 1099px) {
    .blog-area .container { width: min(960px, calc(100% - 40px)); }
    .blog-slider-track .blog-card { flex-basis: calc((100% - 1.25rem) / 2); }
    .blog-slider-prev { left: -18px; }
    .blog-slider-next { right: -18px; }
}

@media (max-width: 699px) {
    .blog-card { border-radius: 14px; }
    .blog-card-thumb { aspect-ratio: 16 / 9; }
    .blog-card-body { padding: 1rem 1rem 1.15rem; }
    .blog-card-title { font-size: 1.05rem; }
    .blog-card-excerpt { font-size: .88rem; }

    .blog-area .container { width: 100%; padding-left: 20px; padding-right: 20px; }
    .blog-slider-track {
        gap: 1rem;
        margin-right: -20px;
        padding-right: 20px;
        scroll-padding-left: 0;
    }
    /* Eine große Karte mit sichtbarem Anschnitt der nächsten Karte zeigt klar,
       dass horizontal gewischt werden kann. */
    .blog-slider-track .blog-card { flex-basis: min(84vw, 360px); }
    .blog-slider-control { width: 38px; height: 38px; top: 43%; }
    .blog-slider-prev { left: 5px; }
    .blog-slider-next { right: -1px; }
    .blog-slider-status {
        display: block;
        margin: .1rem 0 0;
        text-align: center;
        font-size: .82rem;
        font-weight: 700;
        color: var(--text-secondary, #9CA3AF);
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-slider-track { scroll-behavior: auto; }
    .blog-slider-control, .blog-card { transition: none; }
}

.blog-area-cta { text-align: center; margin-top: 2rem; }
