/* =====================================================================
   /blog — "featured + recent" hero and product cards.
   Loaded only by livewire/pages/blog-index.blade.php, and only rendered on
   the first page of the unfiltered listing. Every class is kh-* prefixed
   so nothing here touches the theme's blog-area-2 / blog-box rules.
   ===================================================================== */
   ========================================================================= */
.kh-hero,
.kh-cards-area {
    --kh-card: #1a1a1c;
    --kh-card-hover: #202023;
    --kh-line: rgba(255, 255, 255, 0.07);
    --kh-line-strong: rgba(255, 255, 255, 0.14);
    --kh-muted: #9a9aa1;
    --kh-soft: #c9c9cf;
    --kh-radius: 22px;
    --kh-radius-sm: 14px;
}

/* ---------- shared bits ---------- */
.kh-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: var(--kh-muted);
}

.kh-eyebrow--split {
    justify-content: space-between;
}

.kh-eyebrow--center {
    justify-content: center;
}

.kh-eyebrow-dot,
.kh-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--theme);
    box-shadow: 0 0 0 4px rgba(255, 106, 58, 0.18);
    flex: 0 0 auto;
}

.kh-eyebrow-link {
    color: var(--kh-soft);
    border-bottom: 1px solid var(--kh-line-strong);
    transition: color .25s, border-color .25s;
}

.kh-eyebrow-link:hover {
    color: var(--theme);
    border-color: var(--theme);
}

.kh-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--kh-muted);
}

.kh-meta-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
}

.kh-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.kh-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1.5;
    white-space: nowrap;
    border: 1px solid transparent;
}

.kh-pill--orange { color: #ff9a76; background: rgba(255, 106, 58, .12);  border-color: rgba(255, 106, 58, .18); }
.kh-pill--amber  { color: #f5c86a; background: rgba(245, 200, 106, .10); border-color: rgba(245, 200, 106, .16); }
.kh-pill--green  { color: #6fdca5; background: rgba(54, 199, 129, .11);  border-color: rgba(54, 199, 129, .17); }
.kh-pill--pink   { color: #f59ac0; background: rgba(236, 92, 150, .11);  border-color: rgba(236, 92, 150, .17); }
.kh-pill--violet { color: #b9a6ff; background: rgba(139, 112, 255, .13); border-color: rgba(139, 112, 255, .19); }

/* Diagonal arrow — points up-left so it reads as "go" in RTL. */
.kh-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--kh-muted);
    border: 1px solid transparent;
    transition: color .3s, background-color .3s, border-color .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
}

/* Generated artwork used when a post / product has no image. */
.kh-art {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: rgba(255, 255, 255, .92);
    background-color: #222;
}

.kh-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 75%);
    -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 75%);
}

.kh-art > * {
    position: relative;
}

.kh-art--theme  { background: radial-gradient(120% 90% at 80% 10%, #ff8a5e 0%, #c4401a 45%, #2a1610 100%); }
.kh-art--orange { background: radial-gradient(120% 90% at 80% 10%, #ff8a5e 0%, #b9431f 50%, #26140f 100%); }
.kh-art--amber  { background: radial-gradient(120% 90% at 80% 10%, #f7cf74 0%, #a8761d 50%, #231a0b 100%); }
.kh-art--green  { background: radial-gradient(120% 90% at 80% 10%, #59d99b 0%, #1d7f55 50%, #0e1f17 100%); }
.kh-art--pink   { background: radial-gradient(120% 90% at 80% 10%, #f58ab6 0%, #a83568 50%, #241019 100%); }
.kh-art--violet { background: radial-gradient(120% 90% at 80% 10%, #a995ff 0%, #5a3fd0 50%, #15112a 100%); }

.kh-art-label {
    font-size: 15px;
    line-height: 1.5;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ---------- hero ---------- */
.kh-hero {
    padding-bottom: 20px;
}

.kh-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.kh-hero-grid--solo {
    grid-template-columns: minmax(0, 1fr);
}

.kh-hero-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kh-feature-card {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: var(--kh-radius);
    background: var(--kh-card);
    border: 1px solid var(--kh-line);
}

.kh-feature-media {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--kh-radius-sm);
    overflow: hidden;
    background: #0c0c0d;
}

.kh-feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.kh-media-chip {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #fff;
    background: rgba(17, 17, 17, .45);
    border: 1px solid rgba(255, 255, 255, .14);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.kh-feature-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 12px 10px;
    flex: 1 1 auto;
}

body.body-digital-agency .kh-hero-title {
    margin: 0;
    font-size: clamp(24px, 2.3vw, 40px);
    line-height: 1.5;
    font-weight: 700;
    letter-spacing: 0;
    color: #fff;
}

.kh-hero-title a {
    color: inherit;
}

.kh-hero-title a:hover {
    color: var(--theme);
}

.kh-accent {
    color: var(--theme);
}

body.body-digital-agency .kh-hero-text {
    margin: 0;
    font-size: 17px;
    line-height: 1.85;
    color: var(--kh-soft);
    max-width: 52ch;
}

.kh-feature-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.kh-cta {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
}

.kh-hero .rr-btn.kh-btn {
    margin: 0;
    padding: 16px 28px;
    font-size: 16px;
    white-space: nowrap;
}

.kh-hero .rr-btn.kh-btn--primary {
    background-color: var(--theme);
    border-color: var(--theme);
    color: #fff;
}

.kh-hero .rr-btn.kh-btn--ghost {
    background-color: transparent;
    border-color: var(--kh-line-strong);
    color: #fff;
}

/* The theme colours the inner text spans, and its hover fill (::before)
   is near-black — invisible on this page. Fill with white instead. */
.kh-hero .rr-btn.kh-btn .btn-wrap .text-one {
    color: #fff;
}

.kh-hero .rr-btn.kh-btn::before {
    background-color: #fff;
}

.kh-hero .rr-btn.kh-btn:hover .btn-wrap .text-two,
.kh-hero .rr-btn.kh-btn:focus .btn-wrap .text-two {
    color: #111;
}

.kh-hero .rr-btn.kh-btn:hover {
    border-color: #fff;
}

/* Latest posts */
.kh-recent-list {
    flex: 1 1 auto;
    display: grid;
    grid-auto-rows: 1fr;
    gap: 14px;
}

.kh-mini-card {
    position: relative;
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 12px;
    border-radius: var(--kh-radius);
    background: var(--kh-card);
    border: 1px solid var(--kh-line);
    color: inherit;
    transition: background-color .3s, border-color .3s, transform .35s cubic-bezier(.2, .8, .2, 1);
}

.kh-mini-thumb {
    height: 100%;
    min-height: 120px;
    border-radius: var(--kh-radius-sm);
    overflow: hidden;
    background: #0c0c0d;
}

.kh-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.kh-mini-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
    min-width: 0;
}

body.body-digital-agency .kh-mini-title {
    margin: 0;
    font-size: 16.5px;
    line-height: 1.65;
    font-weight: 600;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kh-mini-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
    color: var(--kh-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- product cards ---------- */
.kh-cards-area {
    padding: 80px 0 100px;
}

.kh-cards-header {
    text-align: center;
    margin-bottom: 44px;
}

.kh-cards-header .kh-eyebrow {
    margin-bottom: 12px;
}

body.body-digital-agency .kh-cards-title {
    margin: 0;
    font-size: clamp(26px, 2.6vw, 42px);
    line-height: 1.5;
    font-weight: 700;
    color: #fff;
}

.kh-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.kh-card {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: var(--kh-radius);
    background: var(--kh-card);
    border: 1px solid var(--kh-line);
    color: inherit;
    transition: background-color .3s, border-color .3s, transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
}

.kh-card-media {
    aspect-ratio: 3 / 2;
    border-radius: var(--kh-radius-sm);
    overflow: hidden;
    background: #0c0c0d;
}

.kh-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}

.kh-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 8px 8px;
}

.kh-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

body.body-digital-agency .kh-card-title {
    margin: 0;
    font-size: 19px;
    line-height: 1.6;
    font-weight: 600;
    color: #fff;
}

.kh-card-text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--kh-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kh-card-foot {
    margin-top: auto;
    padding-top: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.kh-card-note {
    font-size: 13px;
    color: var(--kh-muted);
}

.kh-cards-more {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.kh-more-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid var(--kh-line-strong);
    color: #fff;
    font-size: 15px;
    transition: border-color .3s, background-color .3s, color .3s;
}

.kh-more-link svg {
    transition: transform .3s;
}

.kh-more-link:hover {
    color: #fff;
    background: var(--theme);
    border-color: var(--theme);
}

.kh-more-link:hover svg {
    transform: translateX(-4px);
}

/* ---------- hover states (pointer devices) ---------- */
@media (hover: hover) {
    .kh-mini-card:hover,
    .kh-card:hover {
        background: var(--kh-card-hover);
        border-color: var(--kh-line-strong);
        transform: translateY(-3px);
    }

    .kh-card:hover {
        box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .7);
    }

    .kh-mini-card:hover .kh-mini-thumb img,
    .kh-card:hover .kh-card-media img {
        transform: scale(1.05);
    }

    .kh-mini-card:hover .kh-arrow,
    .kh-card:hover .kh-arrow {
        color: #fff;
        background: var(--theme);
        border-color: var(--theme);
        transform: translate(-2px, -2px);
    }

    .kh-mini-card:hover .kh-mini-title,
    .kh-card:hover .kh-card-title {
        color: #fff;
    }
}

.kh-mini-card:focus-visible,
.kh-card:focus-visible {
    outline: 2px solid var(--theme);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .kh-mini-card,
    .kh-card,
    .kh-arrow,
    .kh-mini-thumb img,
    .kh-card-media img {
        transition: none;
    }
}

/* ---------- responsive ---------- */
@media only screen and (max-width: 1399px) {
    .kh-mini-card {
        grid-template-columns: 34% minmax(0, 1fr) auto;
    }

    .kh-hero .kh-feature-foot {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media only screen and (max-width: 1199px) {
    .kh-hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .kh-hero-col--recent {
        margin-top: 16px;
    }

    .kh-recent-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    /* Stacked: thumb on top, text below, arrow in the corner. */
    .kh-mini-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .kh-mini-thumb {
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .kh-mini-card .kh-arrow {
        position: absolute;
        top: 20px;
        left: 20px;
        color: #fff;
        background: rgba(17, 17, 17, .5);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }

    .kh-hero .kh-feature-foot {
        flex-direction: row;
        align-items: center;
    }

    .kh-cards-area {
        padding-top: 60px;
    }

    .kh-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Two columns: the third card would sit alone — hide it. */
    .kh-cards-grid .kh-card:nth-child(3) {
        display: none;
    }
}

@media only screen and (max-width: 767px) {
    .kh-recent-list {
        grid-template-columns: minmax(0, 1fr);
    }

    /* Phones: back to compact horizontal rows. */
    .kh-mini-card {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        padding: 10px;
        border-radius: 18px;
    }

    .kh-mini-thumb {
        aspect-ratio: auto;
        height: 100%;
        min-height: 96px;
    }

    .kh-mini-card .kh-arrow {
        display: none;
    }

    .kh-mini-card .kh-meta {
        flex-wrap: nowrap;
        white-space: nowrap;
        overflow: hidden;
        font-size: 12px;
    }

    body.body-digital-agency .kh-mini-title {
        font-size: 15px;
    }

    .kh-mini-text {
        -webkit-line-clamp: 1;
        font-size: 13px;
    }

    .kh-feature-card {
        padding: 8px;
        border-radius: 18px;
    }

    .kh-feature-body {
        padding: 18px 8px 8px;
    }

    body.body-digital-agency .kh-hero-text {
        font-size: 15.5px;
    }

    .kh-hero .kh-feature-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .kh-cta .rr-btn.kh-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 15px 16px;
        font-size: 15px;
    }

    .kh-cards-area {
        padding: 64px 0 24px;
    }

    .kh-cards-header {
        margin-bottom: 28px;
    }

    .kh-cards-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .kh-cards-grid .kh-card:nth-child(3) {
        display: flex;
    }

    .kh-media-chip {
        top: 10px;
        right: 10px;
        font-size: 11.5px;
        padding: 4px 11px;
    }
}
