/*
 * Blog styles — archive grid (home.php / category.php) and single post
 * (single.php). Loaded only on those views, see functions.php.
 *
 * Every class is prefixed .hnb- (Hola Nathalie Blog) so nothing here can
 * collide with the one-page's .hn-* rules in hola-page.css.
 *
 * Color variables come from style.css :root — never redeclared here
 * (CLAUDE.md rule: later sheets would win silently).
 */

/* ---------- Page shell -------------------------------------------------- */

.hnb-page {
    max-width: 1160px;
    margin: 0 auto;
    padding: 136px 24px 80px; /* same top rail as .hn-page, clears the floating nav */
}

@media (max-width: 900px) {
    .hnb-page {
        padding-top: 106px;
    }
}

/* ---------- Breadcrumb --------------------------------------------------- */

.hnb-breadcrumb {
    font-size: 14px;
    color: var(--color-text-primary);
    text-align: center;
    margin: 0 0 24px;
}

.hnb-breadcrumb a {
    color: #B25547; /* text-size link: 4.90:1, the AA-safe coral */
    text-decoration: none;
}

.hnb-breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- Archive header: capsule title + avatars ---------------------- */

.hnb-header {
    text-align: center;
    margin-bottom: 40px;
}

/* The wrap hugs the capsule so the avatars anchor to ITS corners, outside
   the text — anchored to the page they would drift onto the title. */
.hnb-header__wrap {
    position: relative;
    display: inline-block;
}

.hnb-header__title {
    display: inline-block;
    background: var(--color-action);
    color: #FFFFFF; /* big bold text on Burnt Coral: 3.68:1 passes the 3:1 large-text bar */
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    padding: 18px 48px;
    border-radius: 9999px;
    margin: 0;
}

.hnb-header__avatar {
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-surface);
    box-shadow: 0 6px 18px rgba(22, 16, 58, 0.12);
}

.hnb-header__avatar--left {
    left: -44px;
    top: -28px;
    transform: rotate(-6deg);
}

.hnb-header__avatar--right {
    right: -44px;
    bottom: -30px;
    transform: rotate(5deg);
}

@media (max-width: 640px) {
    .hnb-header__avatar {
        width: 52px;
        height: 52px;
    }

    .hnb-header__avatar--left {
        left: -18px;
        top: -32px;
    }

    .hnb-header__avatar--right {
        right: -18px;
        bottom: -34px;
    }
}

/* ---------- Category filter pills ---------------------------------------- */

.hnb-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 8px 0 40px;
    list-style: none;
    margin: 0;
}

.hnb-filters li {
    margin: 0;
}

.hnb-filters__pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 9999px;
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.hnb-filters__pill:hover {
    background: #FFFFFF;
    color: var(--color-text-primary);
}

.hnb-filters__pill.is-active {
    background: #B25547; /* white on it: 4.90:1, AA at pill size */
    border-color: #B25547;
    color: #FFFFFF;
}

/* ---------- Article cards grid ------------------------------------------- */

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

@media (max-width: 1024px) {
    .hnb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hnb-grid {
        grid-template-columns: 1fr;
    }
}

.hnb-card {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(22, 16, 58, 0.07);
    overflow: hidden;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.hnb-card:hover {
    background: #FFFFFF;
    box-shadow: 0 14px 34px rgba(22, 16, 58, 0.13);
    transform: translateY(-3px);
}

.hnb-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hnb-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(242, 153, 74, 0.35), rgba(247, 183, 49, 0.35));
}

.hnb-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hnb-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hnb-card__placeholder img {
    width: 96px;
    height: auto;
    opacity: 0.9;
}

.hnb-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hnb-card__badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 9999px;
}

.hnb-card__body {
    padding: 18px 20px 24px;
}

.hnb-card__date {
    display: block;
    font-size: 14px;
    color: var(--color-text-primary);
    margin-bottom: 8px;
}

.hnb-card__title {
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: var(--color-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Empty state & pagination ------------------------------------- */

.hnb-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: var(--color-text-primary);
}

.hnb-pagination {
    margin-top: 48px;
    text-align: center;
}

.hnb-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.hnb-pagination .page-numbers {
    display: inline-block;
    min-width: 40px;
    padding: 8px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 500;
}

.hnb-pagination .page-numbers.current {
    background: #B25547;
    color: #FFFFFF;
}

/* ---------- Single post: hero -------------------------------------------- */

.hnb-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 48px;
}

@media (max-width: 900px) {
    .hnb-hero {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.hnb-hero .hnb-breadcrumb {
    text-align: left;
    margin-bottom: 16px;
}

.hnb-hero__title {
    font-size: clamp(28px, 3.6vw, 40px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text-primary);
    margin: 0 0 16px;
}

.hnb-hero__meta {
    font-size: 14px;
    color: var(--color-text-primary);
}

.hnb-hero__media img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
}

/* ---------- Single post: layout, sidebar, article ------------------------ */

.hnb-layout {
    display: grid;
    grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .hnb-layout {
        grid-template-columns: 1fr;
    }
}

.hnb-sidebar {
    position: sticky;
    top: 120px; /* below the floating nav (32px offset + bar height) */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 900px) {
    .hnb-sidebar {
        position: static;
    }
}

.hnb-widget {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(22, 16, 58, 0.07);
    padding: 20px;
}

.hnb-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hnb-author__photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.hnb-author__text {
    font-size: 15px;
    line-height: 1.4;
    color: var(--color-text-primary);
}

.hnb-author__text strong {
    display: block;
    font-size: 17px;
}

.hnb-toc h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 12px;
}

.hnb-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hnb-toc li {
    margin: 0 0 8px;
}

.hnb-toc li.hnb-toc__sub {
    padding-left: 16px;
}

.hnb-toc a {
    font-size: 14px;
    color: var(--color-text-primary);
    text-decoration: none;
    display: block;
    padding: 2px 0 2px 10px;
    border-left: 2px solid transparent;
    transition: border-color 0.2s ease, font-weight 0.2s ease;
}

.hnb-toc a:hover {
    color: #B25547;
}

.hnb-toc a.is-active {
    border-left-color: #B25547;
    font-weight: 600;
}

@media (max-width: 900px) {
    .hnb-toc {
        display: none; /* the summary earns its keep only when it can stay on screen */
    }
}

/* CTA widget: hidden until blog.js reveals it at 40% of reading depth */

.hnb-cta {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hnb-cta.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .hnb-cta {
        opacity: 1; /* no scroll choreography without the sticky rail */
        transform: none;
    }
}

.hnb-cta h2 {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 8px;
}

.hnb-cta p {
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 14px;
}

.hnb-cta__button,
.hnb-article__cta .hnb-cta__button {
    display: inline-block;
    background: #B25547;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 9999px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.hnb-cta__button:hover {
    background: var(--color-action);
    color: var(--color-text-primary); /* mirror of the site-wide lighten-on-hover rule */
}

/* Article body: reuse the global type scale, add breathing room */

.hnb-article {
    min-width: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-primary);
}

.hnb-article h2 {
    font-size: 27px;
    margin: 40px 0 16px;
    scroll-margin-top: 120px; /* anchors land below the floating nav */
}

.hnb-article h3 {
    font-size: 21px;
    margin: 28px 0 12px;
    scroll-margin-top: 120px;
}

.hnb-article p,
.hnb-article ul,
.hnb-article ol {
    margin-bottom: 16px;
}

.hnb-article a {
    color: #B25547;
}

.hnb-article img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

.hnb-article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.hnb-article th,
.hnb-article td {
    border: 1px solid var(--color-border);
    padding: 8px 12px;
    text-align: left;
}

.hnb-article__cta {
    margin-top: 48px;
    text-align: center;
}

.hnb-article__cta-caption {
    display: block;
    font-size: 14px;
    margin-top: 10px;
    color: var(--color-text-primary);
}
