/* =============================================================================
   InvestProp — homepage «بلاگ» (redesigned 2026-11-18)
   -----------------------------------------------------------------------------
   Used by `site/index/blog.blade.php`. Scoped to `.hb-blog`.

   Same family as the other homepage sections: centred eyebrow chip + title +
   lead (like .rm-head / .sc-head), a row of cards on the house surface, and
   the house button underneath. Covers keep their own 3:2 shape — the old cards
   cropped them into tall/square boxes and cut the text printed in the art.

   3 across from 992px, 2 + 1 on tablets, the shared swipe slider on phones.
   ========================================================================== */

.hb-blog {
    /* palette (dark = default), the same tokens as roadmap.css */
    --hb-primary: #007BFF;
    --hb-primary-2: #1C8AFF;
    --hb-sky: #8DC4FF;
    --hb-surface: rgba(7, 19, 35, .72);
    --hb-line: rgba(141, 196, 255, .16);
    --hb-line-2: rgba(141, 196, 255, .3);
    --hb-text: #EAF2FF;
    --hb-text-2: #C3D4EA;
    --hb-muted: #8FA5C2;
    --hb-grad: linear-gradient(94.98deg, #007BFF 4.01%, #1C8AFF 103.03%);
    --hb-glow: 0 10px 40px -12px rgba(0, 123, 255, .55);
    --hb-shadow: 0 30px 80px -46px rgba(0, 0, 0, .9);

    position: relative;
    margin-top: 96px;
    isolation: isolate;
}

html:not(.dark) .hb-blog {
    --hb-sky: #0B63D6;
    --hb-primary-2: #0B63D6;
    --hb-surface: #FFFFFF;
    --hb-line: rgba(0, 72, 153, .14);
    --hb-line-2: rgba(0, 72, 153, .26);
    --hb-text: #0A1A30;
    --hb-text-2: #2B4463;
    --hb-muted: #5D7492;
    --hb-shadow: 0 26px 60px -42px rgba(10, 40, 80, .35);
}

.hb-blog__glow {
    position: absolute;
    z-index: -1;
    top: 40px;
    inset-inline-start: 50%;
    width: min(1000px, 90%);
    height: 420px;
    translate: -50% 0;
    border-radius: 50%;
    filter: blur(140px);
    opacity: .28;
    background: radial-gradient(circle, rgba(0, 123, 255, .55), rgba(0, 123, 255, 0) 70%);
    pointer-events: none;
}

html:not(.dark) .hb-blog__glow { opacity: .12; }

/* --- header -------------------------------------------------------------- */
.hb-head {
    max-width: 760px;
    margin: 0 auto 40px;
    text-align: center;
}

.hb-head__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 14px;
    border: 1px solid var(--hb-line-2);
    border-radius: 999px;
    background: color-mix(in srgb, var(--hb-primary) 10%, transparent);
    color: var(--hb-sky);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
}

.hb-head__eyebrow i { font-size: 15px; }

.hb-head__title {
    margin: 0;
    color: var(--hb-text);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.45;
}

.hb-head__hl {
    font-weight: 800;
    background: var(--hb-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hb-head__desc {
    margin: 12px auto 0;
    max-width: 62ch;
    color: var(--hb-text-2);
    font-size: 15px;
    line-height: 2;
}

/* --- grid ------------------------------------------------------------------ */
.hb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
}

/* --- card ------------------------------------------------------------------ */
.hb-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--hb-line);
    border-radius: 20px;
    background: var(--hb-surface);
    box-shadow: var(--hb-shadow);
    overflow: hidden;
    transition: border-color .25s ease, transform .25s cubic-bezier(.22, 1, .36, 1);
}

.hb-card__media {
    display: block;
    /* the covers' own shape: nothing is cropped */
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: color-mix(in srgb, var(--hb-primary) 10%, transparent);
}

.hb-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.hb-card__cat {
    --hb-chip: var(--hb-primary);
    position: absolute;
    z-index: 2;
    top: 12px;
    inset-inline-start: 12px;
    max-width: calc(100% - 24px);
    padding: 4px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hb-chip) 88%, #000);
    color: #FFFFFF;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6);
    pointer-events: none;
}

.hb-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px 20px;
    text-align: start;
}

.hb-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--hb-muted);
    font-size: 12px;
    font-weight: 600;
}

.hb-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.hb-card__meta i { font-size: 14px; }

.hb-card__title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 800;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hb-card__title a {
    color: var(--hb-text);
    text-decoration: none;
}

/* one link, whole card clickable */
.hb-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

.hb-card__title a:focus-visible { outline: none; }
.hb-card:has(.hb-card__title a:focus-visible) {
    border-color: var(--hb-primary-2);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hb-primary) 35%, transparent), var(--hb-shadow);
}

.hb-card__desc {
    margin: 0;
    color: var(--hb-text-2);
    font-size: 13.5px;
    line-height: 1.95;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hb-card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    color: var(--hb-sky);
    font-size: 13px;
    font-weight: 800;
}

.hb-card__more i { font-size: 16px; transition: translate .25s cubic-bezier(.22, 1, .36, 1); }
html[dir="ltr"] .hb-card__more i,
html[dir="ltr"] .hb-cta i { rotate: 180deg; }

@media (hover: hover) and (pointer: fine) {
    .hb-card:hover {
        border-color: color-mix(in srgb, var(--hb-primary-2) 50%, transparent);
        transform: translateY(-4px);
    }

    .hb-card:hover .hb-card__media img { transform: scale(1.045); }
    .hb-card:hover .hb-card__more i { translate: -4px 0; }
    html[dir="ltr"] .hb-card:hover .hb-card__more i { translate: 4px 0; }
}

/* --- foot: the house button (same as .rm-cta) ------------------------------- */
.hb-foot {
    margin-top: 34px;
    text-align: center;
}

.hb-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding-inline: 26px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--hb-grad);
    box-shadow: var(--hb-glow);
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .25s ease;
}

.hb-cta:hover,
.hb-cta:focus-visible {
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 16px 46px -12px rgba(0, 123, 255, .75);
}

.hb-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(106.61deg, #FFFFFF 2.5%, rgba(255, 255, 255, 0) 18.15%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.hb-cta i { font-size: 18px; }

/* --- tablets: two across, the third card spans as a wide row ----------------- */
@media (min-width: 768px) and (max-width: 991.98px) {
    .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hb-grid > .hb-card:nth-child(3):last-child {
        grid-column: 1 / -1;
        flex-direction: row;
    }
    .hb-grid > .hb-card:nth-child(3):last-child .hb-card__media { flex: 0 0 48%; aspect-ratio: 3 / 2; }
}

@media (max-width: 991.98px) {
    .hb-blog { margin-top: 64px; }
    .hb-head { margin-bottom: 28px; }
}

/* --- phones: the shared swipe slider (m-slider.css owns the track) --------- */
@media (max-width: 767.98px) {
    .hb-grid { --ms-slide: 84%; }
    .hb-card__body { padding: 16px 16px 18px; }
    .hb-card__title { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .hb-blog *,
    .hb-blog *::after { transition: none !important; }
}
