/* ─── Shared inner container ─── */
.blog-archive-header__inner,
.blog-archive-grid__inner {
    max-width: 84.375rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.blog-archive-header {
    padding: 4.5rem 0 3rem;
}

.blog-archive-header__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

.blog-archive-header__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Eyebrow pill badge */
.blog-archive-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(184, 149, 255, 0.95);
    padding: 0.375rem 0.9375rem;
    border: 1px solid rgba(158, 107, 255, 0.3);
    border-radius: 999px;
    background: rgba(158, 107, 255, 0.08);
}

.blog-archive-header__eyebrow svg {
    color: rgba(158, 107, 255, 0.9);
}

.blog-archive-header__heading {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0;
    background: linear-gradient(105deg, #ffffff 0%, #ffffff 42%, rgba(76, 215, 196, 0.95) 60%, rgba(158, 107, 255, 0.95) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.blog-archive-header__subheading {
    font-size: clamp(0.95rem, 1.6vw, 1.125rem);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 40rem;
    margin: 0;
}

/* Wide focal search under the heading */
.blog-archive-header .blog-search-box {
    max-width: 44rem;
}

/* Sort controls */
.blog-archive-header__sort {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.625rem;
    padding: 0.3125rem;
}

.blog-archive-header__sort-btn {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    padding: 0.5rem 1.125rem;
    border-radius: 0.4375rem;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.blog-archive-header__sort-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.blog-archive-header__sort-btn--active {
    color: #fff;
    background: rgba(158, 107, 255, 0.22);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ============================================================
   SEARCH BOX  (shared: archive header + /search hero)
   ============================================================ */
.blog-search-box {
    position: relative;
    width: 100%;
    max-width: 44rem;
}

.blog-search-box__field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.875rem 1.125rem;
    border-radius: 0.875rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(17, 10, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-search-box__field:focus-within {
    border-color: rgba(158, 107, 255, 0.55);
    box-shadow:
        0 0 0 0.1875rem rgba(158, 107, 255, 0.12),
        0 0.75rem 2rem rgba(158, 107, 255, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.blog-search-box__icon {
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    transition: color 0.25s ease;
}

.blog-search-box__field:focus-within .blog-search-box__icon {
    color: rgba(158, 107, 255, 0.9);
}

.blog-search-box__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 1rem; /* 16px — below this iOS Safari auto-zooms the viewport on focus */
}

.blog-search-box__input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* Hide the native clear/decoration on search inputs for a consistent look */
.blog-search-box__input::-webkit-search-decoration,
.blog-search-box__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

/* ⌘K / Ctrl K hint badge */
.blog-search-box__hint {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.4375rem;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    white-space: nowrap;
}

/* Visually-hidden submit — keeps Enter-to-search robust and screen-reader accessible */
.blog-search-box__submit-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.blog-archive-filters__pill:focus-visible,
.blog-search-box__suggestion-link:focus-visible {
    outline: 2px solid rgba(158, 107, 255, 0.9);
    outline-offset: 2px;
}

/* Typeahead dropdown */
.blog-search-box__suggestions {
    position: absolute;
    top: calc(100% + 0.375rem);
    left: 0;
    right: 0;
    z-index: 20;
    list-style: none;
    margin: 0;
    padding: 0.25rem;
    background: rgba(17, 10, 46, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.625rem;
    box-shadow: 0 1rem 2.5rem rgba(2, 0, 14, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-height: 20rem;
    overflow-y: auto;
}

.blog-search-box__suggestion-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.4375rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.blog-search-box__suggestion-link:hover,
.blog-search-box__suggestion--active .blog-search-box__suggestion-link {
    background: rgba(158, 107, 255, 0.15);
    color: #fff;
}

.blog-search-box__suggestion-badge {
    flex: 0 0 auto;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(158, 107, 255, 0.95);
    background: rgba(158, 107, 255, 0.14);
    border: 1px solid rgba(158, 107, 255, 0.35);
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
}

.blog-search-box__suggestion-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   CATEGORY FILTER BAR
   ============================================================ */
.blog-archive-filters {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 68rem;
}

.blog-archive-filters__categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-archive-filters__item {
    display: flex;
}

.blog-archive-filters__pill {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 0.5625rem 1.125rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.blog-archive-filters__pill:hover {
    color: #fff;
    border-color: rgba(158, 107, 255, 0.3);
    background: rgba(158, 107, 255, 0.08);
}

.blog-archive-filters__pill--active {
    color: #2e1065;
    font-weight: 700;
    background: #d8ccf7;
    border-color: transparent;
    box-shadow: 0 0.375rem 1.25rem rgba(158, 107, 255, 0.28);
}

.blog-archive-filters__pill--active:hover {
    color: #2e1065;
    background: #e4dbfa;
}

/* ============================================================
   ARTICLE GRID
   ============================================================ */
.blog-archive-grid {
    padding: 0 0 5rem;
}

.blog-archive-grid__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* Search results summary */
.blog-archive-results {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.blog-archive-results__count {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(158, 107, 255, 0.9);
}

.blog-archive-results__clear {
    margin-left: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: underline;
    text-underline-offset: 0.2em;
    transition: color 0.2s ease;
}

.blog-archive-results__clear:hover,
.blog-archive-results__clear:focus-visible {
    color: #fff;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.blog-archive-pagination {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.blog-archive-pagination__range {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

.blog-pagination {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.blog-pagination__btn,
.blog-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.blog-pagination__btn:hover,
.blog-pagination__page:hover,
.blog-pagination__btn:focus-visible,
.blog-pagination__page:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.07);
    outline: 2px solid rgba(158, 107, 255, 0.6);
    outline-offset: 2px;
}

.blog-pagination__btn--disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.blog-pagination__page--active {
    color: #fff;
    background: rgba(158, 107, 255, 0.18);
    border-color: rgba(158, 107, 255, 0.45);
    cursor: default;
}

.blog-pagination__ellipsis {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8125rem;
    padding: 0 0.25rem;
    user-select: none;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.blog-archive-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5rem 1.5rem;
    gap: 1rem;
}

.blog-archive-empty__icon {
    width: 4.5rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(158, 107, 255, 0.07);
    border: 1px solid rgba(158, 107, 255, 0.15);
    color: rgba(158, 107, 255, 0.6);
    margin-bottom: 0.5rem;
}

.blog-archive-empty__heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.blog-archive-empty__text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    max-width: 22rem;
    line-height: 1.6;
}

.blog-archive-empty__link {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(76, 215, 196, 0.9);
    text-decoration: none;
    border: 1px solid rgba(76, 215, 196, 0.35);
    border-radius: 0.5rem;
    padding: 0.5rem 1.125rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-archive-empty__link:hover {
    background: rgba(76, 215, 196, 0.08);
    border-color: rgba(76, 215, 196, 0.55);
    color: rgba(76, 215, 196, 1);
}

/* ============================================================
   FEATURED CARD  (first card, spans 2 columns)
   ============================================================ */
.blog-card-featured {
    --blog-card-glow: rgba(76, 215, 196, 0.05);
    grid-column: span 2;
    position: relative;
    display: flex;
    flex-direction: row;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(17, 10, 46, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 1.25rem;
    overflow: hidden;
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    box-shadow:
        0 1.2rem 2.8rem rgba(3, 2, 12, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.065);
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Top accent glow */
.blog-card-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.75rem;
    background: linear-gradient(180deg, var(--blog-card-glow), transparent);
    pointer-events: none;
    z-index: 1;
}

.blog-card-featured:hover {
    box-shadow:
        0 2rem 5rem rgba(2, 0, 14, 0.28),
        0 0 2rem rgba(76, 215, 196, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Full-card link overlay */
.blog-card-featured__link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
}

/* ── Image side ── */
.blog-card-featured__image-wrap {
    flex: 0 0 52%;
    position: relative;
    overflow: hidden;
}

/* Bottom fade into body */
.blog-card-featured__image-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4rem;
    background: linear-gradient(to right, transparent, rgba(17, 10, 46, 0.55));
    pointer-events: none;
}

/* Colour tint overlay */
.blog-card-featured__image-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(76, 215, 196, 0.06) 0%,
        rgba(158, 107, 255, 0.1) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.blog-card-featured__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-card-featured:hover .blog-card-featured__image {
    transform: scale(1.04);
}

.blog-card-featured__tags {
    position: absolute;
    top: 0.875rem;
    left: 0.875rem;
    right: 0.875rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    z-index: 2;
}

.blog-card-featured__tag {
    border: 1px solid rgba(158, 107, 255, 0.55);
    background: linear-gradient(rgba(7, 0, 25, 0.58), rgba(7, 0, 25, 0.58)), rgba(158, 107, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.1875rem 0.625rem;
    border-radius: 999px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

/* ── Content side ── */
.blog-card-featured__body {
    flex: 1;
    padding: 2rem 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    position: relative;
    z-index: 2;
    justify-content: center;
}


.blog-card-featured__date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.38);
    margin: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}

.blog-card-featured__title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-featured__excerpt {
    font-size: 1rem;
    color: #CFC9E6;
    line-height: 1.65;
    margin: 0.25rem 0 0;
    opacity: 0.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-featured__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.blog-card-featured__read-time {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: rgba(158, 107, 255, 1);
    text-transform: uppercase;
}

.blog-card-featured__arrow {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: rgb(77, 214, 196);
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.blog-card-featured:hover .blog-card-featured__arrow {
    border-color: rgb(77, 214, 196);
    background: rgba(76, 215, 196, 0.08);
    transform: translateX(0.1875rem);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 64rem) {
    .blog-archive-grid__cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 48rem) {
    .blog-archive-header {
        padding: 2.5rem 0 1.5rem;
    }

    .blog-search-box__hint {
        display: none;
    }

    /* Stack featured card vertically on tablet */
    .blog-card-featured {
        grid-column: span 2;
        flex-direction: column;
    }

    .blog-card-featured__image-wrap {
        flex: none;
        height: 14rem;
    }

    .blog-card-featured__image-wrap::after {
        top: auto;
        right: 0;
        left: 0;
        width: auto;
        height: 3rem;
        background: linear-gradient(to bottom, transparent, rgba(17, 10, 46, 0.55));
    }

    .blog-card-featured__body {
        padding: 1.25rem 1.375rem 1.375rem;
        justify-content: flex-start;
    }

    .blog-card-featured__title {
        font-size: 1.0625rem;
    }
}

@media (max-width: 36.25rem) {
    .blog-archive-grid__cards {
        grid-template-columns: 1fr;
    }

    .blog-card-featured {
        grid-column: span 1;
    }
}
