/* =====================================================
   Learn With Us: listing + single article
   ===================================================== */
.hbk-learn-page {
    --l-dark: #171738;
    --l-yellow: #EEC643;
    --l-green: #17B890;
    --l-bg: #f7f4e6;
    --l-card: #ffffff;
    --l-muted: #5d5b6b;
    --l-line: rgba(23, 23, 56, .12);
    background: var(--l-bg);
    color: var(--l-dark);
    padding: 70px 0 100px;
}

/* ---------- Listing header ---------- */
.hbk-learn-head {
    max-width: 720px;
    margin: 0 auto 36px;
    text-align: center;
}

.hbk-learn-head__kicker {
    margin: 0 0 8px;
    color: #9a7a10;
    font: 600 13px/1 "Poppins", sans-serif;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hbk-learn-head__title {
    margin: 0 0 12px;
    font: 700 clamp(26px, 3.4vw, 38px)/1.2 "Poppins", sans-serif;
    color: var(--l-dark);
}

.hbk-learn-head__lead {
    margin: 0;
    color: var(--l-muted);
    font-size: 18px;
    line-height: 1.6;
}

/* ---------- Toolbar: filters + search ---------- */
.hbk-learn-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-top: 10px;
    scroll-margin-top: 110px;
}

.hbk-learn-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.hbk-learn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid var(--l-line);
    border-radius: 999px;
    background: #fff;
    color: var(--l-dark);
    font: 500 14px/1 "Poppins", sans-serif;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}

.hbk-learn-filter span {
    min-width: 20px;
    padding: 3px 6px;
    border-radius: 999px;
    background: rgba(23, 23, 56, .07);
    font-size: 11px;
    text-align: center;
}

.hbk-learn-filter:hover {
    border-color: var(--l-dark);
    color: var(--l-dark);
    text-decoration: none;
}

.hbk-learn-filter.is-active {
    background: var(--l-dark);
    border-color: var(--l-dark);
    color: #fff;
}

.hbk-learn-filter.is-active span {
    background: var(--l-yellow);
    color: var(--l-dark);
}

.hbk-learn-search {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 360px;
    border: 1px solid var(--l-line);
    border-radius: 999px;
    background: #fff;
    overflow: hidden;
}

.hbk-learn-search:focus-within {
    border-color: var(--l-dark);
    box-shadow: 0 0 0 3px rgba(238, 198, 67, .45);
}

.hbk-learn-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 10px 4px 10px 18px;
    font-size: 15px;
    color: var(--l-dark);
    outline: none;
}

.hbk-learn-search button {
    border: 0;
    background: transparent;
    padding: 10px 16px;
    color: var(--l-dark);
    cursor: pointer;
}

.hbk-learn-status,
.hbk-learn-status__desc {
    text-align: center;
}

.hbk-learn-status {
    margin: 0 0 6px;
    color: var(--l-muted);
    font-size: 15px;
}

.hbk-learn-status a {
    color: var(--l-dark);
    text-decoration: underline;
}

.hbk-learn-status__desc {
    margin: 0 0 6px;
    color: var(--l-muted);
    font-style: italic;
}

/* ---------- Card grid ---------- */
.hbk-learn-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin-top: 22px;
}

.hbk-learn-card {
    display: flex;
    flex-direction: column;
    background: var(--l-card);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(23, 23, 56, .05), 0 8px 24px rgba(23, 23, 56, .06);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease;
}

.hbk-learn-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 2px 4px rgba(23, 23, 56, .06), 0 16px 36px rgba(23, 23, 56, .12);
}

.hbk-learn-card__img {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e8e3cc;
}

.hbk-learn-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.hbk-learn-card:hover .hbk-learn-card__img img {
    transform: scale(1.04);
}

.hbk-learn-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 22px 24px;
}

.hbk-learn-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--l-muted);
}

.hbk-learn-tag {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    background: rgba(238, 198, 67, .28);
    color: #6b5208;
    font: 600 12px/1 "Poppins", sans-serif;
    text-decoration: none;
    transition: background-color .2s;
}

.hbk-learn-tag:hover {
    background: var(--l-yellow);
    color: var(--l-dark);
    text-decoration: none;
}

.hbk-learn-card__title {
    margin: 0 0 10px;
    font: 600 19px/1.35 "Poppins", sans-serif;
}

.hbk-learn-card__title a {
    color: var(--l-dark);
    text-decoration: none;
}

/* Whole card is clickable via the title link */
.hbk-learn-card { position: relative; }
.hbk-learn-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.hbk-learn-tag { position: relative; z-index: 1; }

.hbk-learn-card__title a:focus-visible {
    outline: none;
}

.hbk-learn-card:focus-within {
    outline: 3px solid var(--l-yellow);
    outline-offset: 3px;
}

.hbk-learn-card__excerpt {
    margin: 0;
    color: var(--l-muted);
    font-size: 15px;
    line-height: 1.6;
}

/* ---------- Pagination / empty ---------- */
.hbk-learn-pagination {
    margin-top: 48px;
}

.hbk-learn-pagination ul {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hbk-learn-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--l-dark);
    text-decoration: none;
    border: 1px solid var(--l-line);
}

.hbk-learn-pagination .page-numbers.current {
    background: var(--l-dark);
    border-color: var(--l-dark);
    color: #fff;
}

.hbk-learn-empty {
    padding: 60px 0;
    text-align: center;
}

/* =====================================================
   Single article
   ===================================================== */
.hbk-learn-single {
    padding-top: 50px;
}

.hbk-article {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.hbk-article__head,
.hbk-article__content,
.hbk-article__foot {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hbk-article__back {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--l-muted);
    font-size: 15px;
    text-decoration: none;
}

.hbk-article__back:hover {
    color: var(--l-dark);
}

.hbk-article__topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.hbk-article__title {
    margin: 0 0 14px;
    font: 700 clamp(28px, 4vw, 42px)/1.18 "Poppins", sans-serif;
    color: var(--l-dark);
}

.hbk-article__lead {
    margin: 0 0 14px;
    font-size: 20px;
    line-height: 1.55;
    color: var(--l-muted);
}

.hbk-article__meta {
    display: flex;
    gap: 8px;
    margin: 0;
    color: var(--l-muted);
    font-size: 14px;
}

.hbk-article__hero {
    margin: 32px 0 40px;
}

.hbk-article__hero img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

/* Body typography */
.hbk-article__content {
    font-size: 18px;
    line-height: 1.75;
    color: #26243a;
}

.hbk-article__content > * {
    margin-top: 0;
    margin-bottom: 1.2em;
}

.hbk-article__content h2 {
    margin: 1.9em 0 .6em;
    font: 700 27px/1.3 "Poppins", sans-serif;
    color: var(--l-dark);
}

.hbk-article__content h3 {
    margin: 1.6em 0 .5em;
    font: 600 21px/1.35 "Poppins", sans-serif;
    color: var(--l-dark);
}

.hbk-article__content p,
.hbk-article__content li {
    font-size: 18px;
    line-height: 1.75;
}

.hbk-article__content ul,
.hbk-article__content ol {
    padding-left: 1.3em;
}

.hbk-article__content li {
    margin-bottom: .45em;
}

.hbk-article__content li::marker {
    color: #b8900f;
}

.hbk-article__content a {
    color: #0b6f57;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hbk-article__content strong {
    color: var(--l-dark);
}

.hbk-article__content figure.wp-block-table {
    margin: 1.6em 0;
    overflow-x: auto;
}

.hbk-article__content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.hbk-article__content th,
.hbk-article__content td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--l-line);
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
}

.hbk-article__content thead th {
    background: var(--l-dark);
    color: #fff;
    font-weight: 600;
}

.hbk-article__content tbody tr:nth-child(even) td {
    background: #fbf9f0;
}

.hbk-article__content figcaption {
    font-size: 14px;
    color: var(--l-muted);
}

/* "Key takeaways" box: a Group block with class hbk-takeaways */
.hbk-article__content .hbk-takeaways {
    margin: 0 0 2em;
    padding: 22px 26px;
    border-left: 5px solid var(--l-yellow);
    border-radius: 0 10px 10px 0;
    background: #fff;
    box-shadow: 0 6px 20px rgba(23, 23, 56, .06);
}

.hbk-article__content .hbk-takeaways > :first-child:not(.wp-block-group__inner-container),
.hbk-article__content .hbk-takeaways > .wp-block-group__inner-container > :first-child {
    margin-top: 0;
    font: 700 15px/1.3 "Poppins", sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8a6b07;
}

.hbk-article__content .hbk-takeaways ul {
    margin: 0;
}

.hbk-article__content .hbk-takeaways li:last-child {
    margin-bottom: 0;
}

/* "Tip"/"Caution" callouts: Group block with class hbk-note or hbk-note is-warning */
.hbk-article__content .hbk-note {
    padding: 18px 22px;
    border-radius: 10px;
    background: rgba(23, 184, 144, .1);
    border: 1px solid rgba(23, 184, 144, .35);
}

.hbk-article__content .hbk-note.is-warning {
    background: rgba(238, 66, 102, .07);
    border-color: rgba(238, 66, 102, .35);
}

.hbk-article__content .hbk-note > :last-child,
.hbk-article__content .hbk-note > .wp-block-group__inner-container > :last-child {
    margin-bottom: 0;
}

/* Sources list */
.hbk-article__content .hbk-sources {
    margin-top: 2.4em;
    padding-top: 1.2em;
    border-top: 1px solid var(--l-line);
}

.hbk-article__content .hbk-sources h2 {
    margin-top: 0;
    font-size: 18px;
}

.hbk-article__content .hbk-sources li,
.hbk-article__content .hbk-sources p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--l-muted);
}

/* Footer CTA */
.hbk-article__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 48px;
    padding: 24px 28px;
    border-radius: 12px;
    background: var(--l-dark);
    color: #fff;
}

.hbk-article__foot p {
    margin: 0;
    font-size: 17px;
}

.hbk-article__cta {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 999px;
    background: var(--l-yellow);
    color: var(--l-dark);
    font: 600 15px/1 "Poppins", sans-serif;
    text-decoration: none;
    transition: transform .2s;
}

.hbk-article__cta:hover {
    color: var(--l-dark);
    text-decoration: none;
    transform: translateY(-2px);
}

/* Related */
.hbk-learn-related {
    margin-top: 80px;
}

.hbk-learn-related h2 {
    margin: 0;
    font: 700 28px/1.2 "Poppins", sans-serif;
    color: var(--l-dark);
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .hbk-learn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}

@media (max-width: 767px) {
    .hbk-learn-page { padding: 44px 0 70px; }
    .hbk-learn-toolbar { align-items: stretch; }
    .hbk-learn-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        margin: 0 -15px;
        padding: 2px 15px 6px;
        scrollbar-width: none;
    }
    .hbk-learn-filters::-webkit-scrollbar { display: none; }
    .hbk-learn-filter { flex: 0 0 auto; }
    .hbk-learn-search { flex: 1 1 auto; }
    .hbk-learn-grid { grid-template-columns: 1fr; }
    .hbk-article__content,
    .hbk-article__content p,
    .hbk-article__content li { font-size: 17px; }
    .hbk-article__lead { font-size: 18px; }
    .hbk-article__hero { margin: 24px -16px 30px; }
    .hbk-article__hero img { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hbk-learn-card,
    .hbk-learn-card__img img { transition: none; }
    .hbk-learn-card:hover { transform: none; }
}

/* Classic themes wrap Group block content in an inner container */
.hbk-article__content .wp-block-group__inner-container > * {
    margin-top: 0;
    margin-bottom: 1em;
}
.hbk-article__content .wp-block-group__inner-container > :last-child {
    margin-bottom: 0;
}
.hbk-article__content .hbk-sources .wp-block-group__inner-container > :first-child {
    font: 600 16px/1.3 "Poppins", sans-serif;
    color: var(--l-dark);
}

/* The theme resets list styles globally; restore them inside articles */
.hbk-article__content ul {
    list-style: disc;
}
.hbk-article__content ol {
    list-style: decimal;
}
.hbk-article__content ol > li::marker {
    font-weight: 700;
}
.hbk-article__content ul > li,
.hbk-article__content ol > li {
    list-style: inherit;
}

/* Tables: natural column widths, scroll sideways on small screens */
.hbk-article__content table,
.hbk-article__content table.has-fixed-layout {
    table-layout: auto;
}
.hbk-article__content th,
.hbk-article__content td {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: manual;
}
.hbk-article__content figure.wp-block-table {
    -webkit-overflow-scrolling: touch;
}

.hbk-learn-pagination {
    display: flex;
    justify-content: center;
}
.hbk-learn-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    width: auto;
}

@media (max-width: 767px) {
    .hbk-article__content table { min-width: 620px; font-size: 15px; }
    .hbk-article__content th,
    .hbk-article__content td { padding: 10px 12px; }
    .hbk-article__content figure.wp-block-table {
        margin-left: -16px;
        margin-right: -16px;
        padding: 0 16px;
    }
}
/* Beat core's ".wp-block-table .has-fixed-layout td { word-break: break-word }" */
.hbk-article__content .wp-block-table .has-fixed-layout td,
.hbk-article__content .wp-block-table .has-fixed-layout th {
    word-break: normal;
}

/* ---------- In-article PDF reader (.hbk-pdf) ---------- */
.hbk-article__content .hbk-pdf {
    margin: 2em 0;
    border: 1px solid var(--l-line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--l-card);
    box-shadow: 0 18px 40px -24px rgba(23, 23, 56, .35);
}
.hbk-pdf__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    background: var(--l-dark);
    color: #fff;
}
.hbk-pdf__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 46px;
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    background: var(--l-yellow);
    color: var(--l-dark);
    font-size: 19px;
}
.hbk-pdf__info { flex: 1 1 220px; min-width: 0; line-height: 1.35; }
.hbk-pdf__title { display: block; font-weight: 700; font-size: 16px; color: #fff; }
.hbk-pdf__meta { display: block; font-size: 13px; color: rgba(255, 255, 255, .7); }
.hbk-pdf__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hbk-article__content .hbk-pdf__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    transition: background .2s, color .2s, border-color .2s;
}
.hbk-article__content .hbk-pdf__btn:hover,
.hbk-article__content .hbk-pdf__btn:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; }
.hbk-article__content .hbk-pdf__btn--primary { background: var(--l-yellow); border-color: var(--l-yellow); color: var(--l-dark); }
.hbk-article__content .hbk-pdf__btn--primary:hover,
.hbk-article__content .hbk-pdf__btn--primary:focus-visible { background: #f5d76b; color: var(--l-dark); }
.hbk-pdf__frame {
    display: block;
    width: 100%;
    height: min(82vh, 900px);
    border: 0;
    background: #525659;
}
.hbk-pdf__mobile { display: none; }

@media (max-width: 767px) {
    .hbk-article__content .hbk-pdf { margin-left: -4px; margin-right: -4px; }
    /* Phone browsers can't show PDFs inline reliably: offer open/download instead. */
    .hbk-pdf__frame { display: none; }
    .hbk-pdf__mobile {
        display: block;
        margin: 0;
        padding: 16px 18px;
        font-size: 15px;
        line-height: 1.55;
        color: var(--l-muted);
    }
    .hbk-pdf__actions { width: 100%; }
    .hbk-article__content .hbk-pdf__btn { flex: 1 1 auto; justify-content: center; }
}
