/*
 * BLOG UI/UX V1 (design only, marketplace-first, ads-ready): styles for the redesigned Blog index (blog-list.blade.php) and
 * article detail (blog-details.blade.php). Loaded from each of those two views' own @push('styles') - not from the shared
 * layout - since only these two page templates use it. Self-contained tokens (own --blog-* custom properties), zero load-order
 * dependency on home-sections.css or any other stylesheet, matching the same pattern already established there.
 *
 * This replaces the old generic template markup those two views used (`.popular-items`, `.landing-breadcrumb`,
 * `.details-left`/`.details-right`, `.blog-details-custom`, etc. - all classes defined in the large shared style.css). Those
 * classes are intentionally NOT removed from style.css: they are reused by other pages built on the same generic template
 * (confirmed via repo-wide grep before this ticket touched anything - see this ticket's own delivery report) - only Blog's own
 * two views stop referencing them. Broad repo-wide cleanup of style.css is explicitly out of scope for this ticket.
 *
 * Ad anchors (.blog-ad-anchor, #blog-slot-*): real, stable, always-present empty elements - never conditionally rendered - so
 * the existing, already-live Modules/Advertisement + 5balloons/laravel-smart-ads vendor package (see this ticket's own
 * advertising audit) can target them by CSS selector the moment a campaign is configured, with zero further code changes. An
 * empty element with no padding/border/min-height already renders at 0x0 - that IS the zero-space contract, not a placeholder
 * dressed up to collapse. Never give .blog-ad-anchor itself any spacing; a future injected ad gets its own.
 */
.blog-hero-section,
.blog-featured-section,
.blog-topics-section,
.blog-latest-section,
.blog-bridge-section,
.blog-article-section,
.blog-related-section,
.blog-provider-cta {
    --blog-green: #6eaa89;
    --blog-coral: #e8665d;
    --blog-coral-dark: #d5544b;
    --blog-yellow: #f2bd48;
    --blog-turquoise: #9fdfd7;
    --blog-ink: #302d2a;
    --blog-font-heading: "Exo 2", "Asap", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --blog-font-body: "Asap", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==================== shared: breadcrumb, ad anchors, section headings ==================== */

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: var(--blog-font-body);
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 18px;
}

.blog-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.blog-breadcrumb a:hover {
    color: var(--blog-coral);
    text-decoration: underline;
}

.blog-breadcrumb [aria-current="page"] {
    color: var(--blog-ink);
    font-weight: 600;
}

.blog-ad-anchor {
    display: block;
}

.blog-section-header {
    margin-bottom: 24px;
}

.blog-section-title {
    font-family: var(--blog-font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 0;
}

/* ==================== A. compact hero ==================== */

.blog-hero-section {
    padding: 32px 0 8px;
}

.blog-hero-eyebrow {
    display: block;
    font-family: var(--blog-font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blog-coral);
    margin-bottom: 8px;
}

.blog-hero-title {
    font-family: var(--blog-font-heading);
    font-size: 34px;
    font-weight: 800;
    color: var(--blog-ink);
    margin: 0 0 8px;
}

.blog-hero-subtitle {
    font-family: var(--blog-font-body);
    font-size: 16px;
    color: #57534e;
    margin: 0;
    max-width: 620px;
}

/* ==================== search (BLOG V1 FINAL UX) ==================== */

.blog-search-section {
    padding: 16px 0 8px;
}

.blog-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 480px;
    padding: 6px 8px 6px 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.1);
}

.blog-search-form > i {
    flex: 0 0 auto;
    font-size: 18px;
    color: #9c9691;
}

.blog-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: none;
    font-family: var(--blog-font-body);
    font-size: 14px;
    color: var(--blog-ink);
}

.blog-search-input::placeholder {
    color: #9c9691;
}

.blog-search-submit {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--blog-ink);
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

.blog-search-active {
    margin: 12px 0 0;
    font-family: var(--blog-font-body);
    font-size: 13px;
    color: #6b7280;
}

.blog-search-active a {
    margin-left: 8px;
    color: var(--blog-coral-dark);
    font-weight: 700;
    text-decoration: none;
}

.blog-search-active a:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .blog-search-form {
        max-width: none;
    }
}

/* ==================== B/C. featured + secondary articles ==================== */

.blog-featured-section {
    padding: 28px 0;
}

.blog-featured-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.blog-featured-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 420px;
    border-radius: 24px;
    overflow: hidden;
    text-decoration: none;
    background: var(--blog-ink);
}

.blog-featured-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-featured-card:hover .blog-featured-card__image {
    transform: scale(1.03);
}

.blog-featured-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(48, 45, 42, 0) 35%, rgba(48, 45, 42, 0.88) 100%);
}

.blog-featured-card__body {
    position: relative;
    z-index: 1;
    padding: 28px;
    color: #ffffff;
}

.blog-featured-card__topic {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(2px);
    font-family: var(--blog-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.blog-featured-card__title {
    font-family: var(--blog-font-heading);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 10px;
}

.blog-featured-card__excerpt {
    font-family: var(--blog-font-body);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-featured-card__meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--blog-font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.blog-featured-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-family: var(--blog-font-body);
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.blog-secondary-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-secondary-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
    text-decoration: none;
    flex: 1 1 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-secondary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.1);
}

.blog-secondary-card__image {
    flex: 0 0 auto;
    width: 84px;
    height: 84px;
    border-radius: 14px;
    object-fit: cover;
}

.blog-secondary-card__body {
    min-width: 0;
}

.blog-secondary-card__topic {
    display: block;
    font-family: var(--blog-font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--blog-coral);
    margin-bottom: 4px;
}

.blog-secondary-card__title {
    font-family: var(--blog-font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .blog-featured-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .blog-secondary-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .blog-secondary-card {
        flex: 1 1 calc(50% - 8px);
    }
}

@media (max-width: 575.98px) {
    .blog-featured-card {
        min-height: 320px;
    }

    .blog-secondary-card {
        flex: 1 1 100%;
    }
}

/* ==================== D. topic navigation ==================== */

.blog-topics-section {
    padding: 8px 0 28px;
}

.blog-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-topic-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.1);
    font-family: var(--blog-font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--blog-ink);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-topic-pill:hover {
    border-color: var(--blog-coral);
    color: var(--blog-coral-dark);
    text-decoration: none;
}

.blog-topic-pill.is-active {
    background: var(--blog-ink);
    border-color: var(--blog-ink);
    color: #ffffff;
}

@media (max-width: 575.98px) {
    .blog-topics {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        margin: 0 -4px;
        padding-left: 4px;
        padding-right: 4px;
    }
}

/* ==================== E. latest articles grid + card + pagination ==================== */

.blog-latest-section {
    padding: 12px 0 44px;
}

.blog-latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.06);
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.05);
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(17, 24, 39, 0.1);
    text-decoration: none;
}

.blog-card__image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.blog-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.blog-card__topic {
    display: inline-block;
    font-family: var(--blog-font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--blog-coral);
    margin-bottom: 8px;
}

.blog-card__title {
    font-family: var(--blog-font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-family: var(--blog-font-body);
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--blog-font-body);
    font-size: 12px;
    color: #9c9691;
}

.blog-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--blog-ink);
}

.blog-no-results {
    text-align: center;
    padding: 48px 0;
    font-family: var(--blog-font-body);
    color: #6b7280;
}

/* §9: the zero-search-matches variant (title + hint + reset) reuses the same .blog-no-results outer padding/centering -
   deliberately compact, not a giant empty state. */
.blog-no-results__title {
    font-family: var(--blog-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 0 0 8px;
}

.blog-no-results__hint {
    font-size: 14px;
    margin: 0 0 16px;
}

.blog-no-results__reset {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: var(--blog-coral-dark);
    text-decoration: none;
}

.blog-no-results__reset:hover {
    text-decoration: underline;
}

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 32px;
    font-family: var(--blog-font-body);
    font-size: 14px;
}

.blog-pagination__link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(17, 24, 39, 0.1);
    color: var(--blog-ink);
    font-weight: 700;
    text-decoration: none;
}

.blog-pagination__link:hover {
    border-color: var(--blog-coral);
    color: var(--blog-coral-dark);
    text-decoration: none;
}

.blog-pagination__link.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.blog-pagination__status {
    color: #6b7280;
}

@media (max-width: 991.98px) {
    .blog-latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .blog-latest-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ==================== marketplace bridge (shared: index + detail) ==================== */

.blog-bridge-section {
    padding: 12px 0 40px;
}

.blog-bridge-panel {
    border-radius: 24px;
    background: rgba(159, 223, 215, 0.12);
    padding: 28px 32px;
    text-align: center;
}

.blog-bridge-title {
    font-family: var(--blog-font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 0 0 18px;
}

.blog-bridge-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.blog-bridge-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    font-family: var(--blog-font-body);
    font-size: 14px;
    font-weight: 700;
    color: var(--blog-ink);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-bridge-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(17, 24, 39, 0.1);
    color: var(--blog-ink);
    text-decoration: none;
}

.blog-bridge-link i {
    color: var(--blog-green);
    font-size: 18px;
}

@media (max-width: 575.98px) {
    .blog-bridge-panel {
        padding: 24px 20px;
    }

    .blog-bridge-links {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-bridge-link {
        justify-content: center;
    }
}

/* ==================== article detail ==================== */

.blog-article-section {
    padding: 32px 0 8px;
}

.blog-article-section--comments {
    padding: 0 0 48px;
}

/* ARTICLE DETAIL POLISH: ONE reading-width system for the whole article - breadcrumb, topic, H1, meta, image, body, tags,
   internal hook, feedback widget, and the comments/reply blocks are all inside this single wrapper now, instead of six
   separate rules each repeating their own `max-width: 780px` with no centering. That missing `margin: 0 auto` (not the
   width value) was the real bug staging reported ("hugs left side with huge right whitespace") - a 780/800px column with
   no auto margins sits flush against the LEFT edge of the (much wider) .container, leaving all the extra space on the
   right instead of split evenly. */
.blog-article-reading {
    max-width: 800px;
    margin: 0 auto;
}

.blog-article-topic {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(232, 102, 93, 0.12);
    font-family: var(--blog-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--blog-coral-dark);
    margin-bottom: 14px;
}

.blog-article-title {
    font-family: var(--blog-font-heading);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--blog-ink);
    margin: 0 0 18px;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    margin-bottom: 28px;
    font-family: var(--blog-font-body);
    font-size: 14px;
    color: #57534e;
}

.blog-article-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--blog-ink);
}

.blog-article-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-article-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    color: #57534e;
    cursor: pointer;
}

.blog-article-like-btn .isax-heart.text-danger {
    color: var(--blog-coral) !important;
}

.blog-article-image {
    margin: 0 0 28px;
}

.blog-article-image img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    max-height: 440px;
}

.blog-article-body {
    font-family: var(--blog-font-body);
    font-size: 16px;
    line-height: 1.75;
    color: #3f3b38;
}

.blog-article-body h2 {
    font-family: var(--blog-font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 32px 0 14px;
}

.blog-article-body h3 {
    font-family: var(--blog-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 26px 0 12px;
}

.blog-article-body p {
    margin: 0 0 18px;
}

.blog-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 18px;
    padding-left: 22px;
}

.blog-article-body a {
    color: var(--blog-coral-dark);
    text-decoration: underline;
}

.blog-article-body table {
    width: 100%;
    margin: 0 0 18px;
    border-collapse: collapse;
}

.blog-article-body table td,
.blog-article-body table th {
    border: 1px solid rgba(17, 24, 39, 0.1);
    padding: 8px 10px;
}

.blog-article-tags {
    margin: 8px 0 32px;
}

.blog-article-tags__title {
    font-family: var(--blog-font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 0 0 10px;
}

.blog-article-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-tag-chip {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: #f4f3f1;
    font-family: var(--blog-font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--blog-ink);
}

.blog-article-internal-hook {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(159, 223, 215, 0.14);
    margin: 0 0 32px;
    font-family: var(--blog-font-body);
    font-size: 14px;
    color: var(--blog-ink);
    text-decoration: none;
}

.blog-article-internal-hook:hover {
    background: rgba(159, 223, 215, 0.22);
    color: var(--blog-ink);
    text-decoration: none;
}

.blog-article-internal-hook i {
    flex: 0 0 auto;
    font-size: 20px;
    color: #2f8479;
}

.blog-article-internal-hook strong {
    font-weight: 700;
}

/* The article's secondary blocks (helpful-vote feedback, comments, reply form) - both usages already sit inside
   .blog-article-reading, so no max-width of their own is needed here. */
.blog-article-block {
    margin: 0 0 32px;
}

.blog-article-block__title {
    font-family: var(--blog-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--blog-ink);
    margin: 0 0 14px;
}

.blog-article-feedback__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 14px;
    background: #f4f3f1;
}

@media (max-width: 575.98px) {
    .blog-article-title {
        font-size: 26px;
    }

    .blog-article-image img {
        max-height: 260px;
    }
}

/* ARTICLE DETAIL POLISH §5 (end-of-article rhythm): bridge/related/provider-CTA/comments used to step from 40px to 40px
   to 44px to an abrupt 8px right before the footer - several disconnected endings rather than one continuous close. Now a
   consistent ~28-32px module gap throughout, with a deliberately larger 48px close on the very last block
   (.blog-article-section--comments, above) before the footer. */
.blog-article-bridge-scope .blog-bridge-section {
    padding: 8px 0 28px;
}

.blog-article-bridge-scope .blog-bridge-panel {
    max-width: 800px;
    margin: 0 auto;
    padding: 22px 28px;
}

/* ==================== related articles ("Weitere Ideen für euch") ==================== */

.blog-related-section {
    padding: 0 0 32px;
}

/* ==================== provider CTA ==================== */

.blog-provider-cta {
    padding: 0 0 32px;
}

.blog-provider-cta__panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 26px 32px;
    border-radius: 20px;
    background: var(--blog-ink);
}

.blog-provider-cta__title {
    font-family: var(--blog-font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.blog-provider-cta__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    background: var(--blog-coral);
    color: #ffffff;
    font-family: var(--blog-font-body);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.blog-provider-cta__button:hover {
    background: var(--blog-coral-dark);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

@media (max-width: 575.98px) {
    .blog-provider-cta__panel {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 24px 20px;
    }
}
