/* =====================================================
   /blog listing (homepage-matching design, live since 2026-10-04)
   Used only by app/Views/blog/listing.php.

   Loaded AFTER home.css: reuses the homepage's tokens and building
   blocks (.hv1 colours, .hv1-hero, .hv1-head, .hv1-cta ...), so changing
   those in home.css changes this page too, on purpose. This file only
   adds the .bl-* parts: breadcrumb, featured post over the hero edge,
   post cards. --c is the post topic's colour, set inline per card.
   ===================================================== */

/* ---------- Hero ---------- */
.bl .hv1-hero { padding: 64px 0 160px; }
.bl .hv1-hero.bl-hero-empty { padding-bottom: 96px; }

.bl-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    color: #94A3B8;
    font-size: 0.875rem;
}

.bl-crumbs li + li::before {
    content: "/";
    margin-right: 0.4rem;
    opacity: 0.5;
}

.bl-crumbs a { color: #CBD5E1; }
.bl-crumbs a:hover { color: #fff; }
.bl-crumbs [aria-current] { color: #fff; font-weight: 500; }

/* ---------- Shared meta row (topic + date) ---------- */
.bl-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.9rem;
    color: var(--hv1-muted);
    font-size: 0.82rem;
}

.bl-topic {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--c);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.bl-topic::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c);
}

.bl-new {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--hv1-text);
    color: var(--hv1-surface);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---------- Featured post ---------- */
.bl-feature-wrap {
    position: relative;
    z-index: 2;
    margin-top: -112px;
}

.bl-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--hv1-border);
    border-radius: 26px;
    background: var(--hv1-surface);
    box-shadow: var(--hv1-shadow-lg);
}

.bl-feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.75rem;
}

.bl-feature-title {
    margin: 1rem 0 0.75rem;
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.bl-feature-title a { color: var(--hv1-text); }
.bl-feature-title a:hover { color: var(--c); }

.bl-feature-excerpt {
    margin: 0 0 1.75rem;
    color: var(--hv1-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.bl-btn {
    align-self: flex-start;
    border: 0;
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    box-shadow: 0 14px 30px -14px rgba(79, 70, 229, 0.9);
    color: #fff;
}

.bl-btn:hover { color: #fff; filter: brightness(1.08); }
.bl-btn i { transition: transform 0.2s ease; }
.bl-btn:hover i { transform: translateX(4px); }

/* Right side: a drawn "document" in the topic colour. */
.bl-feature-art {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 320px;
    overflow: hidden;
    background:
        radial-gradient(360px 260px at 80% 10%, color-mix(in srgb, var(--c) 55%, transparent), transparent 70%),
        linear-gradient(160deg, #111A2E, #070D1C);
}

.bl-feature-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.22) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 80%);
            mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 80%);
}

.bl-art-doc {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    width: 210px;
    padding: 1.4rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.75);
    -webkit-backdrop-filter: blur(10px);
            backdrop-filter: blur(10px);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85);
    transform: rotate(-4deg);
    animation: hv6-float 9s ease-in-out infinite;
}

.bl-art-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 0.4rem;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #fff));
    box-shadow: 0 12px 26px -10px var(--c);
    color: #fff;
    font-size: 1.35rem;
}

.bl-art-line {
    display: block;
    height: 8px;
    border-radius: 4px;
    background: rgba(148, 163, 184, 0.28);
}

.bl-art-line-1 { width: 100%; background: rgba(226, 232, 240, 0.55); }
.bl-art-line-2 { width: 88%; }
.bl-art-line-3 { width: 94%; }
.bl-art-line-4 { width: 60%; background: color-mix(in srgb, var(--c) 60%, transparent); }

/* ---------- Post cards ---------- */
.bl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.bl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--hv1-border);
    border-radius: 22px;
    background: var(--hv1-surface);
    box-shadow: var(--hv1-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bl-card:hover,
.bl-card:focus-within {
    border-color: color-mix(in srgb, var(--c) 45%, var(--hv1-border));
    box-shadow: var(--hv1-shadow-lg);
    transform: translateY(-4px);
}

.bl-card-art {
    position: relative;
    display: grid;
    place-items: center;
    height: 132px;
    overflow: hidden;
    background:
        radial-gradient(260px 160px at 85% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
        color-mix(in srgb, var(--c) 9%, var(--hv1-surface));
}

.bl-card-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(color-mix(in srgb, var(--c) 35%, transparent) 1px, transparent 1px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000);
            mask-image: linear-gradient(90deg, transparent, #000);
}

.bl-card-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff));
    box-shadow: 0 12px 26px -10px var(--c);
    color: #fff;
    font-size: 1.4rem;
    transition: transform 0.25s ease;
}

.bl-card:hover .bl-card-icon { transform: scale(1.06) rotate(-4deg); }

.bl-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.4rem 1.5rem 1.5rem;
}

.bl-card-title {
    margin: 0.75rem 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.bl-card-title a { color: var(--hv1-text); }

/* Whole card clickable through the title link. */
.bl-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 22px;
}

.bl-card:hover .bl-card-title a { color: var(--c); }

.bl-card-excerpt {
    flex-grow: 1;
    margin: 0 0 1.25rem;
    color: var(--hv1-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.bl-card-go {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--hv1-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.bl-card-go i { transition: transform 0.2s ease; }
.bl-card:hover .bl-card-go i { transform: translateX(4px); }

/* The stretched link's focus ring goes around the whole card. */
.bl-card-title a:focus-visible { outline: none; }
.bl-card-title a:focus-visible::after { outline: 3px solid #60A5FA; outline-offset: 3px; }

/* ---------- Empty state ---------- */
.bl-empty {
    padding: 3rem 1.5rem;
    border: 1px dashed var(--hv1-border);
    border-radius: 22px;
    background: var(--hv1-surface);
    color: var(--hv1-muted);
    text-align: center;
}

.bl-empty i {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--hv1-blue);
    font-size: 1.8rem;
}

.bl-empty p { margin: 0 0 1rem; font-size: 1.05rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .bl-feature { grid-template-columns: 1fr; }
    .bl-feature-art { order: -1; min-height: 250px; }
    .bl-art-doc { width: 170px; padding: 1.1rem; gap: 0.55rem; }
    .bl-art-icon { width: 44px; height: 44px; font-size: 1.15rem; }
}

@media (max-width: 767px) {
    .bl .hv1-hero { padding: 48px 0 130px; }
    .bl-feature-wrap { margin-top: -90px; }
    .bl-feature-body { padding: 1.75rem 1.5rem; }
}

@media (max-width: 575px) {
    .bl-grid { grid-template-columns: 1fr; }
}
