/* ==========================================================================
   blocks.css — Gutenberg core block styling in helloagain CI
   ========================================================================== */

/* ---------- Global Content Wrapper ---------- */
.ha-blog-content {
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    color: var(--ha-gray-800, rgb(38, 45, 53));
    line-height: 1.6;
}

/* ---------- Containers ---------- */
.ha-container {
    width: 100%;
    max-width: 1536px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .ha-container {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 1024px) {
    .ha-container {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

.ha-container--narrow {
    max-width: 1000px;
}

/* ---------- Single Post Hero Section ---------- */
.ha-article__hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    padding: 6rem 0 2.5rem;
    margin-top: -5rem; /* compensate for .ha-blog-content margin-top */
    overflow: hidden;
}

@media (min-width: 1280px) {
    .ha-article__hero {
        margin-top: -8rem;
    }
}

.ha-article__hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.ha-article__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(38, 45, 53, 0.85) 0%, rgba(38, 45, 53, 0.4) 60%, rgba(38, 45, 53, 0.2) 100%);
    z-index: 1;
}

.ha-article__hero-content {
    position: relative;
    z-index: 2;
}

.ha-article__hero .ha-article__title {
    color: #fff;
    margin-bottom: 0.75rem;
}

.ha-article__meta--light {
    color: rgba(255, 255, 255, 0.85);
}

.ha-article__meta--light .ha-article__meta-sep {
    color: rgba(255, 255, 255, 0.5);
}

.ha-card__badge--light {
    background-color: rgba(0, 167, 225, 0.9);
    color: #fff;
}

@media (min-width: 768px) {
    .ha-article__hero {
        min-height: 420px;
        padding: 4rem 0 3rem;
    }
}

/* ---------- Blog Hero (Archive) ---------- */
.ha-blog-hero {
    padding: 2rem 0 1.5rem;
}

.ha-blog-hero__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.5rem;
}

.ha-blog-hero__subtitle {
    font-size: 1.125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ---------- Headings (h1-h4) ---------- */
.ha-blog-content h1,
.ha-blog-content .wp-block-heading:where(h1) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1rem;
}

.ha-blog-content h2,
.ha-blog-content .wp-block-heading:where(h2) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.ha-blog-content h3,
.ha-blog-content .wp-block-heading:where(h3) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.25;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.ha-blog-content h4,
.ha-blog-content .wp-block-heading:where(h4) {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    line-height: 1.3;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ---------- Paragraphs ---------- */
.ha-blog-content p,
.ha-blog-content .wp-block-paragraph {
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1.25rem;
}

/* ---------- Links ---------- */
.ha-blog-content .ha-article__content a,
.ha-blog-content .ha-page__content a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.ha-blog-content .ha-article__content a:hover,
.ha-blog-content .ha-page__content a:hover {
    color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* ---------- Lists (ul, ol) ---------- */
.ha-blog-content ul:not([class]),
.ha-blog-content .wp-block-list:where(ul) {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.ha-blog-content ol:not([class]),
.ha-blog-content .wp-block-list:where(ol) {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.ha-blog-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.ha-blog-content li::marker {
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

/* ---------- Blockquote ---------- */
.ha-blog-content blockquote,
.ha-blog-content .wp-block-quote {
    border-left: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    background-color: rgba(204, 237, 249, 0.15);
    border-radius: 0 0.5rem 0.5rem 0;
}

.ha-blog-content .wp-block-quote p {
    margin-bottom: 0.5rem;
}

.ha-blog-content .wp-block-quote p:last-child {
    margin-bottom: 0;
}

.ha-blog-content .wp-block-quote cite,
.ha-blog-content .wp-block-quote .wp-block-quote__citation {
    display: block;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-top: 0.75rem;
}

/* ---------- Pullquote ---------- */
.ha-blog-content .wp-block-pullquote {
    border-top: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    border-bottom: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    border-left: none;
    border-right: none;
    padding: 2rem 0;
    margin: 2rem 0;
    text-align: center;
}

.ha-blog-content .wp-block-pullquote blockquote {
    border-left: none;
    background: none;
    padding: 0;
    margin: 0;
}

.ha-blog-content .wp-block-pullquote p {
    font-size: 1.5rem;
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 300;
    font-style: italic;
    line-height: 1.4;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.ha-blog-content .wp-block-pullquote cite {
    font-size: 0.875rem;
    font-style: normal;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ---------- Separator / HR ---------- */
.ha-blog-content hr,
.ha-blog-content .wp-block-separator {
    border: none;
    border-top: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    margin: 2rem 0;
}

.ha-blog-content .wp-block-separator.is-style-wide {
    border-top-width: 2px;
}

.ha-blog-content .wp-block-separator.is-style-dots {
    border: none;
    text-align: center;
    line-height: 1;
}

.ha-blog-content .wp-block-separator.is-style-dots::before {
    content: "\00b7 \00b7 \00b7";
    font-size: 1.5rem;
    letter-spacing: 1rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ha-wide custom style */
.ha-blog-content .wp-block-separator.is-style-ha-wide {
    border-top-width: 2px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Image ---------- */
.ha-blog-content .wp-block-image {
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-image img {
    border-radius: 0.75rem;
    height: auto;
    max-width: 100%;
}

.ha-blog-content .wp-block-image.is-style-ha-rounded img {
    border-radius: 1rem;
}

.ha-blog-content .wp-block-image figcaption {
    font-size: 0.8125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* ---------- Gallery ---------- */
.ha-blog-content .wp-block-gallery {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-gallery.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ha-blog-content .wp-block-gallery.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ha-blog-content .wp-block-gallery.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 640px) {
    .ha-blog-content .wp-block-gallery.columns-3,
    .ha-blog-content .wp-block-gallery.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ha-blog-content .wp-block-gallery .wp-block-image {
    margin: 0;
}

.ha-blog-content .wp-block-gallery .wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Table ---------- */
.ha-blog-content .wp-block-table {
    margin: 1.5rem 0;
    overflow-x: auto;
}

.ha-blog-content .wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.ha-blog-content .wp-block-table th {
    background-color: var(--ha-gray-200, rgb(230, 232, 235));
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
}

.ha-blog-content .wp-block-table td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
}

.ha-blog-content .wp-block-table tbody tr:nth-child(even) {
    background-color: rgba(230, 232, 235, 0.25);
}

/* ---------- Columns ---------- */
.ha-blog-content .wp-block-columns {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
}

@media (max-width: 768px) {
    .ha-blog-content .wp-block-columns {
        flex-direction: column;
        gap: 1rem;
    }
}

.ha-blog-content .wp-block-column {
    flex: 1;
}

/* ---------- Video ---------- */
.ha-blog-content .wp-block-video,
.ha-blog-content .wp-block-embed {
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-video video {
    max-width: 100%;
    border-radius: 0.75rem;
}

.ha-blog-content .wp-block-embed .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
}

.ha-blog-content .wp-block-embed .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ---------- Cover ---------- */
.ha-blog-content .wp-block-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 2rem;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: var(--ha-gray-800, rgb(38, 45, 53));
}

.ha-blog-content .wp-block-cover .wp-block-cover__background,
.ha-blog-content .wp-block-cover .has-background-dim {
    position: absolute;
    inset: 0;
    background-color: rgba(38, 45, 53, 0.5);
}

.ha-blog-content .wp-block-cover .wp-block-cover__inner-container {
    position: relative;
    z-index: 1;
    color: var(--ha-white, #ffffff);
    text-align: center;
}

.ha-blog-content .wp-block-cover .wp-block-cover__inner-container h2,
.ha-blog-content .wp-block-cover .wp-block-cover__inner-container h3,
.ha-blog-content .wp-block-cover .wp-block-cover__inner-container p {
    color: var(--ha-white, #ffffff);
}

/* ---------- Code Block ---------- */
.ha-blog-content pre,
.ha-blog-content .wp-block-code {
    background-color: rgba(230, 232, 235, 0.35);
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.ha-blog-content pre code,
.ha-blog-content .wp-block-code code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    background: none;
    padding: 0;
    border-radius: 0;
}

.ha-blog-content :not(pre) > code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875rem;
    background-color: rgba(230, 232, 235, 0.4);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

/* ---------- Buttons ---------- */
.ha-blog-content .wp-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.ha-blog-content .wp-block-button .wp-block-button__link,
.ha-blog-content .wp-block-button .wp-element-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.5rem;
    border-radius: 1.5rem;
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
    border: 2px solid transparent;
}

.ha-blog-content .wp-block-button .wp-block-button__link:hover,
.ha-blog-content .wp-block-button .wp-element-button:hover {
    background-color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* Primary style */
.ha-blog-content .wp-block-button.is-style-ha-primary .wp-block-button__link {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

.ha-blog-content .wp-block-button.is-style-ha-primary .wp-block-button__link:hover {
    background-color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* Secondary / outline style */
.ha-blog-content .wp-block-button.is-style-ha-secondary .wp-block-button__link {
    background-color: transparent;
    color: var(--ha-blue-500, rgb(0, 167, 225));
    border: 2px solid var(--ha-blue-500, rgb(0, 167, 225));
}

.ha-blog-content .wp-block-button.is-style-ha-secondary .wp-block-button__link:hover {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

/* Outline style (default WP) */
.ha-blog-content .wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    color: var(--ha-blue-500, rgb(0, 167, 225));
    border: 2px solid currentColor;
}

.ha-blog-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

/* ---------- Group Block ---------- */
.ha-blog-content .wp-block-group {
    margin: 1.5rem 0;
}

/* CTA Box pattern */
.ha-blog-content .ha-cta-box {
    background-color: var(--ha-blue-100, rgb(204, 237, 249));
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
}

.ha-blog-content .ha-cta-box h3 {
    margin-top: 0;
}

/* Info Box pattern */
.ha-blog-content .ha-info-box {
    background-color: rgba(204, 237, 249, 0.3);
    border-left: 4px solid var(--ha-blue-500, rgb(0, 167, 225));
    padding: 1.5rem;
    border-radius: 0 0.75rem 0.75rem 0;
}

.ha-blog-content .ha-info-box h4 {
    margin-top: 0;
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

/* ---------- Wide / Full Alignments ---------- */
.ha-blog-content .alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.ha-blog-content .alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ---------- Blog Hero Section ---------- */
.ha-blog-hero {
    padding: 3rem 0 2rem;
    text-align: center;
}

.ha-blog-hero__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 0.5rem;
}

.ha-blog-hero__subtitle {
    font-family: var(--ha-font-body, 'BrutalType', sans-serif);
    font-size: 1.125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    max-width: 600px;
    margin: 0 auto;
}

/* ---------- Article Layout ---------- */
.ha-article__header {
    padding: 2rem 0 1.5rem;
}

.ha-article__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.ha-article__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

.ha-article__meta-sep {
    color: var(--ha-gray-200, rgb(230, 232, 235));
}

.ha-article__author {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ha-article__avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
}

.ha-article__featured-image {
    margin-bottom: 2rem;
}

.ha-article__hero-img {
    width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.ha-article__content {
    padding-bottom: 2rem;
}

/* ---------- Author Box ---------- */
.ha-article__author-box {
    padding: 2rem 0 3rem;
    border-top: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
}

.ha-author-box {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.ha-author-box__avatar {
    width: 5rem;
    height: 5rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.ha-author-box__label {
    font-size: 0.8125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-bottom: 0.125rem;
}

.ha-author-box__name {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 0.375rem;
}

.ha-author-box__bio {
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    line-height: 1.5;
}

/* ---------- Related Posts ---------- */
.ha-related-posts {
    padding: 3rem 0;
    background-color: rgba(230, 232, 235, 0.15);
}

.ha-related-posts__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1.5rem;
}

/* ---------- Breadcrumbs ---------- */
.ha-breadcrumbs {
    max-width: 1000px;
    margin: 1.5rem auto 1.5rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

.ha-breadcrumbs a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: none;
}

.ha-breadcrumbs a:hover {
    text-decoration: underline;
}

/* ---------- Pagination ---------- */
.ha-pagination {
    padding: 2rem 0 3rem;
    text-align: center;
}

.ha-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
}

.ha-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.ha-pagination .page-numbers:hover {
    background-color: var(--ha-gray-200, rgb(230, 232, 235));
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.ha-pagination .page-numbers.current {
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
}

.ha-pagination .prev,
.ha-pagination .next {
    font-weight: 500;
}

/* ---------- No Posts ---------- */
.ha-no-posts {
    text-align: center;
    padding: 4rem 0;
    color: var(--ha-gray-600, rgb(125, 129, 134));
}

/* ---------- 404 Page ---------- */
.ha-404 {
    text-align: center;
    padding: 6rem 0;
}

.ha-404__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1rem;
}

.ha-404__text {
    font-size: 1.125rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-bottom: 2rem;
}

.ha-404__link {
    display: inline-flex;
    align-items: center;
    padding: 0.625rem 1.5rem;
    background-color: var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-white, #ffffff);
    border-radius: 1.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.ha-404__link:hover {
    background-color: var(--ha-blue-600, rgb(46, 124, 192));
}

/* ---------- Generic Page ---------- */
.ha-page {
    padding: 2rem 0 3rem;
}

.ha-page__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 1.5rem;
}

/* ---------- TOC Styling ---------- */
.ha-toc {
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0 2rem;
    background-color: rgba(230, 232, 235, 0.1);
}

.ha-toc__title {
    font-family: var(--ha-font-heading, 'Nexa', sans-serif);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    margin-bottom: 0.75rem;
}

.ha-toc__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ha-toc__list li {
    margin-bottom: 0.375rem;
}

.ha-toc__list li a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.ha-toc__list li a:hover {
    color: var(--ha-blue-600, rgb(46, 124, 192));
    text-decoration: underline;
}

.ha-toc__list li.ha-toc__item--h3 {
    padding-left: 1rem;
}

.ha-toc__list li.ha-toc__item--h3 a {
    font-size: 0.875rem;
}

/* ─── Block styles added 2026-05-27 ─────────────────────────────────── */

/* Blocksatz — briefing §1 */
.wp-block-paragraph.is-style-ha-justify {
    text-align: justify;
    hyphens: auto;
}

/* Sticky-head table — briefing §4 */
.wp-block-table.is-style-ha-sticky-head table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table.is-style-ha-sticky-head thead th {
    position: sticky;
    top: 0;
    background: var(--ha-blue-100, rgb(204, 237, 249));
    color: var(--ha-gray-800, rgb(38, 45, 53));
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--ha-blue-500, rgb(0, 167, 225));
    z-index: 1;
}

.wp-block-table.is-style-ha-sticky-head td,
.wp-block-table.is-style-ha-sticky-head th {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
}

.wp-block-table.is-style-ha-sticky-head tr:hover td {
    background: rgba(204, 237, 249, 0.25);
}

/* Large quote variant */
.wp-block-quote.is-style-ha-large {
    font-size: 1.5rem;
    line-height: 1.4;
    padding-left: 1.5rem;
    border-left-width: 6px;
}

.wp-block-quote.is-style-ha-large cite {
    font-size: 0.9375rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    font-style: normal;
}

/* ─── hab/image-text ────────────────────────────────────────────────── */

.hab-image-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin: 2rem 0;
}

.hab-image-text--right {
    direction: rtl;
}

.hab-image-text--right > * {
    direction: ltr;
}

.hab-image-text__media {
    margin: 0;
}

.hab-image-text__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
}

.hab-image-text__caption {
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin-top: 0.5rem;
    text-align: center;
}

.hab-image-text__body > :first-child {
    margin-top: 0;
}

.hab-image-text__body > :last-child {
    margin-bottom: 0;
}

.hab-image-text__placeholder {
    aspect-ratio: 16 / 10;
    background: var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    font-family: 'BrutalType', sans-serif;
}

@media (max-width: 720px) {
    .hab-image-text,
    .hab-image-text--right {
        grid-template-columns: 1fr;
        direction: ltr;
    }
}

/* ─── hab/toc (updated 2026-05-27) ────────────────────────────────── */

.hab-toc__title {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 0 0.75rem 0;
    color: var(--ha-gray-800, rgb(38, 45, 53));
    cursor: pointer;
}

.hab-toc__details {
    margin: 0;
}

.hab-toc__details summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hab-toc__details summary::-webkit-details-marker {
    display: none;
}

.hab-toc__details summary::after {
    content: "▾";
    margin-left: auto;
    font-size: 0.875rem;
    color: var(--ha-blue-500, rgb(0, 167, 225));
    transition: transform 0.2s;
}

.hab-toc__details:not([open]) summary::after {
    transform: rotate(-90deg);
}

.hab-toc__placeholder {
    color: var(--ha-gray-600, rgb(125, 129, 134));
    margin: 0;
    font-size: 0.9375rem;
}

.hab-toc__item--h4 {
    padding-left: 2rem;
}

.hab-toc__item--h4 a {
    font-size: 0.8125rem;
}

/* Auto-collapse on mobile */
@media (max-width: 720px) {
    .hab-toc--collapsible .hab-toc__details:not([open]) summary::after {
        transform: rotate(-90deg);
    }
}

/* ─── hab/cta-box ───────────────────────────────────────────────────── */

.hab-cta-box {
    margin: 2.5rem 0;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hab-cta-box--primary {
    background: var(--ha-blue-500, rgb(0, 167, 225));
    color: #fff;
}

.hab-cta-box--primary .hab-cta-box__heading,
.hab-cta-box--primary .hab-cta-box__text {
    color: #fff;
}

.hab-cta-box--secondary {
    background: #fff;
    border: 2px solid var(--ha-blue-500, rgb(0, 167, 225));
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-cta-box--subtle {
    background: var(--ha-blue-100, rgb(204, 237, 249));
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-cta-box__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
}

.hab-cta-box__text {
    margin: 0;
    max-width: 38rem;
    line-height: 1.5;
}

.hab-cta-box__button {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-family: 'BrutalType', sans-serif;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.hab-cta-box--primary .hab-cta-box__button {
    background: #fff;
    color: var(--ha-blue-500, rgb(0, 167, 225));
}

.hab-cta-box--secondary .hab-cta-box__button,
.hab-cta-box--subtle .hab-cta-box__button {
    background: var(--ha-blue-500, rgb(0, 167, 225));
    color: #fff;
}

.hab-cta-box__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ─── hab/info-box ──────────────────────────────────────────────────── */

.hab-info-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
    margin: 1.75rem 0;
    border-left-width: 4px;
    border-left-style: solid;
}

.hab-info-box--info {
    background: rgba(204, 237, 249, 0.45);
    border-left-color: var(--ha-blue-500, rgb(0, 167, 225));
}

.hab-info-box--tip {
    background: rgba(220, 245, 220, 0.6);
    border-left-color: rgb(46, 160, 67);
}

.hab-info-box--warning {
    background: rgba(255, 244, 200, 0.6);
    border-left-color: rgb(212, 152, 0);
}

.hab-info-box__icon {
    font-size: 1.5rem;
    line-height: 1.2;
}

.hab-info-box__body > :first-child {
    margin-top: 0;
}

.hab-info-box__body > :last-child {
    margin-bottom: 0;
}

.hab-info-box__heading {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.375rem 0;
}

/* ─── hab/author-box ────────────────────────────────────────────────── */

.hab-author-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--ha-gray-200, rgb(230, 232, 235));
    border-radius: 0.75rem;
    margin: 3rem 0 1rem 0;
    background: #fff;
}

.hab-author-box__avatar {
    border-radius: 9999px;
    width: 72px;
    height: 72px;
    display: block;
}

.hab-author-box__name {
    font-family: 'Nexa', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0;
    color: var(--ha-gray-800, rgb(38, 45, 53));
}

.hab-author-box__role {
    margin: 0 0 0.5rem 0;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    font-size: 0.9375rem;
}

.hab-author-box__bio {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.hab-author-box__links {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hab-author-box__links a {
    color: var(--ha-blue-500, rgb(0, 167, 225));
    text-decoration: none;
    font-size: 0.9375rem;
}

.hab-author-box__links a:hover {
    text-decoration: underline;
}

@media (max-width: 540px) {
    .hab-author-box {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hab-author-box__avatar {
        margin: 0 auto;
    }
    .hab-author-box__links {
        justify-content: center;
    }
}

/* ─── hab/video-embed ───────────────────────────────────────────────── */

.hab-video {
    margin: 2rem 0;
}

.hab-video__player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
}

.hab-video__player--direct {
    cursor: default;
}

.hab-video__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.hab-video__player:hover .hab-video__poster {
    opacity: 1;
}

.hab-video__playbtn {
    position: absolute;
    inset: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #fff;
    font-family: 'BrutalType', sans-serif;
}

.hab-video__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: rgba(0, 167, 225, 0.95);
    font-size: 1.5rem;
    padding-left: 0.3rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.hab-video__hint {
    background: rgba(0, 0, 0, 0.55);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.hab-video__consent {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.75rem;
    margin: 0;
    color: #fff;
    font-size: 0.75rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    pointer-events: none;
}

.hab-video__player iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.hab-video__caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--ha-gray-600, rgb(125, 129, 134));
    text-align: center;
}
