/* ==========================================================================
   Blog Page
   Professional blog listing page using JD Phones design tokens and patterns.
   Cards, buttons, and spacing follow the established site-wide system.
   ========================================================================== */

.blog-page {
    min-height: 100vh;
    background: var(--ink);
}

/* Breadcrumb */
.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-top: 26px;
    color: #778399;
    font-size: .7rem;
    font-weight: 650;
}

.blog-breadcrumb a {
    transition: color .2s ease;
}

.blog-breadcrumb a:hover {
    color: var(--orange);
}

.blog-breadcrumb svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.blog-breadcrumb strong {
    color: #bcc4d0;
    font-weight: 680;
}

/* Hero Section */
.blog-hero {
    margin-top: 24px;
}

.blog-hero-inner {
    padding: clamp(56px, 7vw, 86px) clamp(24px, 7vw, 86px);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 30px;
    background: var(--panel);
    box-shadow: var(--shadow);
    text-align: center;
}

.blog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--orange);
    font-size: .7rem;
    font-weight: 820;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.blog-eyebrow::before,
.blog-eyebrow::after {
    content: "";
    width: 20px;
    height: 1px;
    background: var(--orange);
}

.blog-hero h1 {
    margin: 20px 0 0;
    font-size: clamp(2.8rem, 3.8vw, 4.5rem);
    font-weight: 820;
    line-height: 1;
    letter-spacing: -.06em;
}

.blog-hero>div>p {
    max-width: 680px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: clamp(.95rem, .88rem + .25vw, 1.1rem);
    line-height: 1.7;
}

/* Search - Professional Design */
.blog-search-panel {
    max-width: 770px;
    margin: 42px auto 0;
    text-align: left;
}

.blog-search-panel>label {
    display: block;
    margin: 0 0 9px 3px;
    color: #dce1e9;
    font-size: .72rem;
    font-weight: 760;
}

.blog-search-control {
    position: relative;
}

.blog-search-control>svg {
    position: absolute;
    top: 50%;
    left: 20px;
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #758197;
    stroke-linecap: round;
    stroke-width: 1.8;
    transform: translateY(-50%);
    pointer-events: none;
}

.blog-search-control input {
    width: 100%;
    height: 62px;
    padding: 0 58px 0 55px;
    border: 1px solid #2a3955;
    border-radius: 16px;
    outline: 0;
    background: #07142c;
    color: #fff;
    font: inherit;
    font-size: .92rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.blog-search-control input::placeholder {
    color: #758197;
}

.blog-search-control input::-webkit-search-cancel-button,
.blog-search-control input::-webkit-search-decoration {
    display: none;
    -webkit-appearance: none;
}

.blog-search-control input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}

.blog-search-control input:focus {
    border-color: rgba(255, 59, 10, .6);
    box-shadow: 0 0 0 4px rgba(255, 59, 10, .1);
}

.blog-search-control button {
    position: absolute;
    top: 50%;
    right: 13px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 1px solid #2a3955;
    border-radius: 10px;
    background: #101e38;
    color: #b7c0ce;
    font-size: 1.35rem;
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.blog-search-control button:hover {
    border-color: rgba(255, 59, 10, .45);
    background: rgba(255, 59, 10, .08);
    color: var(--orange);
}

.blog-search-control button:focus-visible {
    outline: 2px solid rgba(255, 59, 10, .32);
    outline-offset: 2px;
}

.blog-search-panel>span {
    display: block;
    margin: 10px 3px 0;
    color: #778399;
    font-size: .68rem;
}

/* Category Filter */
.blog-categories {
    margin-top: 34px;
}

.category-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 11px;
    padding: 22px 28px;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 20px;
    background: var(--panel);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .14);
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 99px;
    background: transparent;
    color: #bec7d4;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 720;
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.category-chip:hover {
    border-color: rgba(255, 104, 66, .5);
    background: rgba(255, 59, 10, .08);
    color: #fff;
    transform: translateY(-1px);
}

.category-chip.is-active {
    border-color: var(--orange);
    background: var(--orange-bright);
    color: #fff;
    box-shadow: 0 9px 20px rgba(255, 59, 10, .2);
}

.chip-count {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .14);
    font-size: .68rem;
    font-weight: 800;
}

.category-chip.is-active .chip-count {
    background: rgba(255, 255, 255, .25);
}

/* Blog Grid */
.blog-content {
    padding-block: 54px 90px;
}

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

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 20px;
    background: var(--panel-light);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .16);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.blog-card[hidden] {
    display: none;
}

.blog-card-image {
    position: relative;
    aspect-ratio: 1.52;
    overflow: hidden;
    background: var(--panel);
}

.blog-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .3s ease, transform .35s ease;
}

.blog-card-image img.is-loaded {
    opacity: 1;
}

.blog-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 59, 10, .4);
    border-radius: 99px;
    background: rgba(6, 21, 50, .92);
    color: var(--orange);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.blog-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 26px;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.blog-category {
    color: var(--orange);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.blog-date {
    color: #7e8a9e;
    font-size: .72rem;
    font-weight: 650;
}

.blog-card h3 {
    margin: 0;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 770;
    line-height: 1.3;
    letter-spacing: -.02em;
}

.blog-card>div>p {
    margin: 12px 0 0;
    color: #aeb7c6;
    font-size: .84rem;
    line-height: 1.62;
}

.blog-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 20px;
    color: #fff;
    font-size: .78rem;
    font-weight: 750;
    transition: color .2s ease, gap .2s ease;
}

.blog-link svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--orange);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .2s ease, transform .2s ease;
}

.blog-link:hover {
    color: var(--orange);
}

.blog-link:hover svg {
    stroke: var(--orange);
    transform: translateX(3px);
}

/* Hover Effect */
@media (hover: hover) and (pointer: fine) {
    .blog-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 59, 10, .38);
        box-shadow: 0 20px 42px rgba(0, 0, 0, .24), 0 0 0 1px rgba(255, 59, 10, .1);
    }

    .blog-card:hover .blog-card-image img {
        transform: scale(1.05);
    }
}

/* No Results */
.blog-no-results {
    padding: 80px 24px;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 24px;
    background: var(--panel);
    text-align: center;
}

.blog-no-results[hidden] {
    display: none;
}

.blog-no-results>span {
    display: grid;
    width: 54px;
    height: 54px;
    margin-inline: auto;
    place-items: center;
    border: 1px solid rgba(255, 59, 10, .4);
    border-radius: 50%;
    background: #0b1931;
    color: var(--orange);
    font-size: 1.35rem;
    font-weight: 800;
}

.blog-no-results h2 {
    margin: 20px 0 0;
    font-size: 1.75rem;
    font-weight: 780;
}

.blog-no-results p {
    max-width: 420px;
    margin: 12px auto 0;
    color: var(--muted);
    font-size: .92rem;
}

.blog-no-results .button {
    margin-top: 26px;
}

/* CTA Section */
.blog-cta {
    padding-bottom: 90px;
}

.blog-cta-inner {
    padding: clamp(44px, 6vw, 68px) clamp(34px, 6vw, 58px);
    border: 1px solid rgba(255, 59, 10, .2);
    border-radius: 26px;
    background: var(--panel);
    box-shadow: var(--shadow);
    text-align: center;
}

.blog-cta-inner h2 {
    margin: 0;
    font-size: clamp(2rem, 1.55rem + 1.45vw, 3.2rem);
    font-weight: 810;
    line-height: 1.08;
    letter-spacing: -.045em;
}

.blog-cta-inner p {
    max-width: 640px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: .94rem;
    line-height: 1.65;
}

.blog-cta-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 32px;
}

.blog-cta-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 200px;
}

.blog-cta-actions .button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.blog-cta-actions .button-dark {
    border-color: #263653;
    background: #07142c;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
}

.blog-cta-actions .button-dark:hover {
    border-color: #334665;
    background: #0b1a36;
}

/* Responsive Design */
@media (max-width: 1120px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 860px) {
    .category-filter {
        padding: 18px;
    }
}

@media (max-width: 620px) {
    .blog-breadcrumb {
        gap: 7px;
        padding-top: 18px;
        font-size: .64rem;
    }

    .blog-hero-inner {
        margin-top: 16px;
        padding: 44px 20px 28px;
        border-radius: 22px;
    }

    .blog-hero h1 {
        margin-top: 18px;
        font-size: clamp(2.5rem, 13vw, 3.45rem);
    }

    .blog-hero>div>p {
        margin-top: 18px;
        font-size: .88rem;
        line-height: 1.62;
    }

    .blog-eyebrow {
        font-size: .6rem;
    }

    .blog-eyebrow::before,
    .blog-eyebrow::after {
        width: 12px;
    }

    .blog-search-panel {
        margin-top: 28px;
    }

    .blog-search-panel>label {
        margin-bottom: 7px;
        font-size: .68rem;
    }

    .blog-search-control input {
        height: 56px;
        padding: 0 54px 0 49px;
        font-size: .84rem;
    }

    .blog-search-control>svg {
        left: 17px;
        width: 19px;
        height: 19px;
    }

    .blog-search-control button {
        right: 10px;
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }

    .blog-search-panel>span {
        margin-top: 8px;
        font-size: .64rem;
    }

    .blog-categories {
        margin-top: 24px;
    }

    .category-filter {
        padding: 16px;
        border-radius: 16px;
    }

    .category-chip {
        min-height: 34px;
        padding: 0 13px;
        font-size: .72rem;
    }

    .chip-count {
        min-width: 18px;
        height: 18px;
        font-size: .64rem;
    }

    .blog-content {
        padding-block: 34px 76px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .blog-card-content {
        padding: 22px;
    }

    .blog-card h3 {
        font-size: 1.05rem;
    }

    .blog-card>div>p {
        font-size: .82rem;
    }

    .blog-no-results {
        padding: 60px 20px;
        border-radius: 18px;
    }

    .blog-no-results>span {
        width: 54px;
        height: 54px;
        font-size: 1.4rem;
    }

    .blog-no-results h2 {
        font-size: 1.5rem;
    }

    .blog-cta {
        padding-bottom: 76px;
    }

    .blog-cta-inner {
        padding: 34px 22px;
        border-radius: 20px;
    }

    .blog-cta-inner h2 {
        font-size: clamp(1.8rem, 10vw, 2.4rem);
    }

    .blog-cta-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 26px;
    }

    .blog-cta-actions .button {
        width: 100%;
        min-width: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .blog-card,
    .blog-card-image img {
        transition: none;
        transform: none !important;
    }
}