/* Blog index hero, category/tag archive heading, grid, pagination and search.
 * Blog index hero is separate; the other archive components keep their styles.
 */

/* Wide archive sizing is confined to blog listings, never product pages or article text. */
.ytk-blog-archive-page {
    --ytk-layout-max: var(--ytk-blog-layout-max, 1480px);
    --ytk-layout-cut: var(--ytk-blog-layout-cut, 96px);
}

/* BLOG INDEX HERO — white space, no gradient; category/tag heroes stay separate. */
.ytk-blog-index-hero {
    position: relative;
    overflow: hidden;
    padding: 76px 0 88px;
    background: #ffffff;
    color: var(--ytk-ink);
    text-align: left;
}

.ytk-blog-index-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -230px;
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: #eef3f8;
    pointer-events: none;
}

.ytk-blog-index-hero-inner {
    position: relative;
    z-index: 1;
    width: calc(100% - var(--ytk-layout-cut));
    max-width: var(--ytk-layout-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    align-items: center;
    gap: 80px;
}

.ytk-blog-index-hero h1 {
    max-width: 740px;
    margin: 0;
    color: var(--ytk-ink);
    font-size: var(--ytk-blog-heading-size);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: var(--ytk-detail-h1-spacing);
}

.ytk-blog-index-hero p {
    max-width: 680px;
    margin: 16px 0 0;
    color: var(--ytk-body-copy);
    font-size: 19px;
    line-height: var(--ytk-product-copy-line-height);
    font-weight: var(--ytk-product-copy-weight);
}

.ytk-blog-explore-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    margin-top: 28px;
    padding: 0 28px;
    border-radius: 999px;
    background: #0071eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}

.ytk-blog-explore-button:hover {
    background: #005dc4;
    color: #ffffff;
    text-decoration: none;
}

.ytk-blog-explore-button:focus-visible {
    outline: 2px solid #8ca0bb;
    outline-offset: 4px;
}

.ytk-blog-index-hero-visual {
    width: 100%;
    max-width: 600px;
    justify-self: end;
    overflow: hidden;
    border-radius: 24px;
}

.ytk-blog-index-hero-visual img {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
}

#blog-articles {
    scroll-margin-top: calc(var(--ytk-blog-header-height, 120px) + var(--ytk-blog-sticky-top, 0px) + 24px);
}

@media (prefers-reduced-motion: no-preference) {
    html:has(.ytk-blog-index-hero) { scroll-behavior: smooth; }
}

@media (max-width: 1050px) {
    .ytk-blog-explore-button { min-height: 48px; padding: 0 22px; font-size: 15px; }
}

@media (max-width: 820px) {
    .ytk-blog-index-hero { padding: 44px 0 56px; }
    .ytk-blog-index-hero-inner { grid-template-columns: 1fr; gap: 0; }
    .ytk-blog-index-hero h1 { max-width: 600px; font-size: var(--ytk-blog-heading-size); }
    .ytk-blog-index-hero p { max-width: 600px; margin-top: 14px; }
    .ytk-blog-index-hero-visual { display: none; }
    .ytk-blog-index-hero::after { right: -190px; bottom: -220px; width: 360px; height: 360px; }
    .ytk-blog-explore-button { margin-top: 20px; }
}

@media (max-width: 680px) {
    .ytk-blog-index-hero p { font-size: 17px; }
    .ytk-blog-explore-button { min-height: 44px; padding: 0 18px; font-size: 14px; }
}

/* CATEGORY / TAG ARCHIVE HERO — still used by category.php and tag.php */

.ytk-blog-archive-hero {
    position: relative;
    width: 100%;
    padding: 86px 0 72px;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 10%, rgba(2,79,77,0.20), transparent 34%),
        linear-gradient(135deg, #071018 0%, var(--ytk-ink) 100%);
    color: #ffffff;
}

.ytk-blog-archive-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -180px;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    background: rgba(8,122,116,0.16);
}

.ytk-blog-archive-hero-inner {
    position: relative;
    z-index: 2;
    width: calc(100% - var(--ytk-layout-cut));
    max-width: var(--ytk-layout-max);
    margin: 0 auto;
}

.ytk-blog-archive-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    font-size: 13px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.76);
}

.ytk-blog-archive-kicker span {
    color: #00af87;
    font-size: 22px;
    line-height: 0;
}

.ytk-blog-archive-hero h1 {
    max-width: 1120px;
    margin: 0 0 24px;
    font-size: clamp(46px, 5.2vw, 68px);
    line-height: 0.98;
    letter-spacing: -2.3px;
    font-weight: 900;
}

.ytk-blog-archive-hero h1 span {
    color: #00af87;
}

.ytk-blog-archive-hero p {
    max-width: 780px;
    margin: 0;
    font-size: 20px;
    line-height: 1.65;
    font-weight: 500;
    color: rgba(255,255,255,0.78);
}

.ytk-blog-archive-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.ytk-blog-archive-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.86);
    font-size: 13px;
    font-weight: 800;
}

/* ARCHIVE CONTENT */

.ytk-blog-archive-content {
    width: 100%;
    padding: 90px 0 120px;
    background: #ffffff;
}

.ytk-blog-archive-content-inner {
    padding: 72px 0 96px;
    width: calc(100% - var(--ytk-layout-cut));
    max-width: var(--ytk-layout-max);
    margin: 0 auto;
}

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

/* PAGINATION — only page buttons are styled, never their nested icon spans. */
.ytk-blog-pagination {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #e1e6ec;
}

.ytk-blog-pagination:not(:has(.nav-links)) { display: none; }

.ytk-blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ytk-blog-pagination .nav-links > .page-numbers {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 48px;
    height: 48px;
    padding: 0 12px;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    background: #ffffff;
    color: var(--ytk-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.ytk-blog-pagination .nav-links > .prev,
.ytk-blog-pagination .nav-links > .next { gap: 6px; padding: 0 14px; }
.ytk-blog-pagination .ytk-icon { font-size: 20px; }

.ytk-blog-pagination .nav-links > a:hover {
    background: #eef3f8;
    border-color: #b8c4d3;
    color: var(--ytk-ink);
}

.ytk-blog-pagination .nav-links > .current {
    background: var(--ytk-ink);
    border-color: var(--ytk-ink);
    color: #ffffff;
    font-weight: 800;
}

.ytk-blog-pagination .nav-links > .dots { border: 0; background: transparent; min-width: 28px; padding: 0; color: #63687a; }
.ytk-blog-pagination .nav-links > a:focus-visible { outline: 2px solid #8ca0bb; outline-offset: 3px; }

@media (max-width: 480px) {
    .ytk-blog-pagination { margin-top: 32px; padding-top: 24px; }
    .ytk-blog-pagination .nav-links { gap: 6px; }
    .ytk-blog-pagination .nav-links > .page-numbers { min-width: 44px; height: 44px; font-size: 13px; }
    .ytk-blog-pagination .nav-links > .prev,
    .ytk-blog-pagination .nav-links > .next { padding: 0 10px; }
}


/* EMPTY / SEARCH */

.ytk-blog-empty {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px;
    border-radius: 34px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid rgba(var(--ytk-ink-rgb),0.08);
}

.ytk-blog-empty h2 {
    margin: 0 0 14px;
    font-size: 42px;
    line-height: 1.05;
    letter-spacing: -2px;
    font-weight: 900;
}

.ytk-blog-empty h2 span {
    color: #024f4d;
}

.ytk-blog-empty p {
    margin: 0 0 24px;
    color: rgba(var(--ytk-ink-rgb),0.66);
    font-size: 16px;
    line-height: 1.7;
    font-weight: 500;
}

.ytk-blog-empty a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: #024f4d;
    color: #ffffff;
    text-decoration: none;
    font-weight: var(--ytk-button-font-weight);
    font-size: var(--ytk-button-font-size);
}

.ytk-blog-search-form {
    display: flex;
    gap: 12px;
    max-width: 680px;
    margin-top: 34px;
}

.ytk-blog-search-form input {
    width: 100%;
    height: 58px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    color: #ffffff;
    padding: 0 22px;
    font-size: 15px;
    font-weight: 700;
    outline: none;
}

.ytk-blog-search-form input::placeholder {
    color: rgba(255,255,255,0.58);
}

.ytk-blog-search-form button {
    height: 58px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: #024f4d;
    color: #ffffff;
    font-size: var(--ytk-button-font-size);
    font-weight: var(--ytk-button-font-weight);
    cursor: pointer;
}

@media (max-width: 1200px) {
    .ytk-blog-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

    .ytk-blog-archive-hero h1 {
        letter-spacing: -3px;
    }
}

@media (max-width: 820px) {
    .ytk-blog-archive-hero-inner,
    .ytk-blog-archive-content-inner {
        width: calc(100% - var(--ytk-layout-cut));
    }
}

@media (max-width: 760px) {
    .ytk-blog-archive-hero {
            padding-top: 76px;
            padding-bottom: 62px;
        }

    .ytk-blog-archive-hero h1 {
        font-size: 48px;
            letter-spacing: -2.4px;
    }

    .ytk-blog-archive-hero p {
        font-size: 16px;
    }

    .ytk-blog-archive-content {
            padding-top: 46px;
            padding-bottom: 80px;
        }

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

    .ytk-blog-search-form {
            flex-direction: column;
        }

    .ytk-blog-search-form button {
            width: 100%;
        }
}

@media (max-width: 480px) {
    .ytk-blog-archive-hero-inner,
    .ytk-blog-archive-content-inner {
        width: calc(100% - var(--ytk-layout-cut));
    }
}

/* MATERIAL SYMBOLS ROUNDED — BLOG ICON ALIGNMENT */
.ytk-blog-archive-kicker .ytk-icon {
    color: #00af87;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
}

.ytk-blog-pagination .ytk-icon {
    vertical-align: -0.12em;
}
