/* ============================================================
   HERBAL BLOG TEMPLATES — STYLESHEET
   Designed for Hello Elementor child theme
   ============================================================ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
    --hbt-cream:       #f5f0e8;
    --hbt-cream-card:  #ffffff;
    --hbt-forest:      #2d4a2d;
    --hbt-sage:        #6b8f5e;
    --hbt-sage-light:  #8aab7a;
    --hbt-olive:       #4a6741;
    --hbt-text:        #2c2c2c;
    --hbt-muted:       #6b6b6b;
    --hbt-border:      #e2ddd4;
    --hbt-eyebrow:     #8aab7a;
    --hbt-radius:      12px;
    --hbt-radius-sm:   8px;
    --hbt-shadow:      0 2px 12px rgba(0,0,0,.07);
    --hbt-shadow-hover:0 8px 30px rgba(0,0,0,.12);
    --hbt-font-serif:  'Playfair Display', 'Georgia', serif;
    --hbt-font-body:   'Inter', 'Helvetica Neue', Arial, sans-serif;
    --hbt-container:   1200px;
    --hbt-gap:         28px;
}

/* ── GOOGLE FONTS IMPORT ────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ── BASE RESETS ────────────────────────────────────────── */
#hbt-archive,
#hbt-single {
    background-color: var(--hbt-cream);
    font-family: var(--hbt-font-body);
    color: var(--hbt-text);
    min-height: 60vh;
}

.hbt-container {
    max-width: var(--hbt-container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── SHARED ELEMENTS ─────────────────────────────────────── */
.hbt-leaf-icon {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
}
.hbt-leaf-icon.small { font-size: 0.85rem; }

.hbt-divider-line {
    display: inline-block;
    width: 60px;
    height: 1px;
    background: var(--hbt-sage);
    vertical-align: middle;
    margin: 0 10px;
}

/* ══════════════════════════════════════════════════════════
   ARCHIVE PAGE
══════════════════════════════════════════════════════════ */

/* ── HERO ────────────────────────────────────────────────── */
.hbt-archive__hero {
    text-align: center;
    padding: 64px 24px 40px;
    background: var(--hbt-cream);
}

.hbt-archive__eyebrow {
    font-family: var(--hbt-font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--hbt-eyebrow);
    margin: 0 0 12px;
}

.hbt-archive__heading {
    font-family: var(--hbt-font-serif);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 400;
    color: var(--hbt-forest);
    line-height: 1.15;
    margin: 0 0 16px;
}

.hbt-archive__divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 20px;
}

.hbt-archive__desc {
    font-size: 1rem;
    color: var(--hbt-muted);
    line-height: 1.7;
    max-width: 520px;
    margin: 0 auto;
}

/* ── FILTERS ─────────────────────────────────────────────── */
.hbt-archive__filters {
    background: var(--hbt-cream);
    padding: 0 0 32px;
    border-bottom: 1px solid var(--hbt-border);
}

.hbt-filter-wrap {
    max-width: var(--hbt-container);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.hbt-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.hbt-tab {
    background: none;
    border: none;
    font-family: var(--hbt-font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--hbt-muted);
    padding: 6px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}

.hbt-tab:hover,
.hbt-tab:focus-visible {
    color: var(--hbt-forest);
    outline: none;
}

.hbt-tab.is-active {
    color: var(--hbt-forest);
    border-bottom-color: var(--hbt-sage);
    font-weight: 600;
}

.hbt-search-wrap {
    position: relative;
    flex-shrink: 0;
}

.hbt-search {
    font-family: var(--hbt-font-body);
    font-size: 0.875rem;
    border: 1px solid var(--hbt-border);
    border-radius: 40px;
    padding: 8px 36px 8px 16px;
    background: #fff;
    color: var(--hbt-text);
    width: 200px;
    transition: border-color .2s, width .3s;
    outline: none;
}

.hbt-search:focus {
    border-color: var(--hbt-sage);
    width: 240px;
}

.hbt-search::placeholder { color: #aaa; }

.hbt-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

/* ── GRID ────────────────────────────────────────────────── */
.hbt-archive__grid-wrap {
    padding: 48px 0 72px;
}

.hbt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hbt-gap);
    margin-bottom: 48px;
}

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

/* ── CARD ─────────────────────────────────────────────────── */
.hbt-card {
    background: var(--hbt-cream-card);
    border-radius: var(--hbt-radius);
    overflow: hidden;
    box-shadow: var(--hbt-shadow);
    display: flex;
    flex-direction: column;
    transition: box-shadow .25s, transform .25s;
}

.hbt-card:hover {
    box-shadow: var(--hbt-shadow-hover);
    transform: translateY(-3px);
}

.hbt-card__thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.hbt-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.hbt-card:hover .hbt-card__img {
    transform: scale(1.04);
}

.hbt-card__img--fallback {
    width: 100%;
    height: 100%;
    background: #e8ede4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hbt-fallback-icon { font-size: 2.5rem; }

.hbt-card__body {
    padding: 22px 22px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hbt-card__cat {
    font-family: var(--hbt-font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hbt-sage);
    text-decoration: none;
    margin-bottom: 10px;
    display: block;
}

.hbt-card__cat:hover { color: var(--hbt-olive); }

.hbt-card__title {
    font-family: var(--hbt-font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 10px;
    color: var(--hbt-forest);
}

.hbt-card__title a {
    text-decoration: none;
    color: inherit;
}
.hbt-card__title a:hover { color: var(--hbt-sage); }

.hbt-card__excerpt {
    font-size: 0.875rem;
    color: var(--hbt-muted);
    line-height: 1.6;
    margin: 0 0 18px;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.hbt-card__read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hbt-sage);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .2s, gap .2s;
}

.hbt-card__read-more:hover {
    color: var(--hbt-forest);
    gap: 8px;
}

.hbt-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--hbt-muted);
    padding: 60px 0;
    font-size: 1rem;
}

/* ── PAGINATION ──────────────────────────────────────────── */
.hbt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hbt-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--hbt-border);
    background: #fff;
    font-family: var(--hbt-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hbt-muted);
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hbt-page-btn:hover {
    border-color: var(--hbt-sage);
    color: var(--hbt-forest);
}

.hbt-page-btn.is-active {
    background: var(--hbt-forest);
    border-color: var(--hbt-forest);
    color: #fff;
    font-weight: 600;
}

.hbt-page-next {
    background: none;
    border: none;
    font-family: var(--hbt-font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hbt-sage);
    cursor: pointer;
    padding: 8px 12px;
    transition: color .2s;
}
.hbt-page-next:hover { color: var(--hbt-forest); }
.hbt-page-next:disabled { opacity: 0.4; pointer-events: none; }

/* Loading state */
.hbt-grid.is-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity .2s;
}


/* ══════════════════════════════════════════════════════════
   SINGLE POST
══════════════════════════════════════════════════════════ */

.hbt-single {
    padding-bottom: 80px;
}

/* ── BREADCRUMB ──────────────────────────────────────────── */
.hbt-breadcrumb {
    padding: 20px 24px;
    max-width: var(--hbt-container);
    margin: 0 auto;
    font-size: 0.825rem;
    color: var(--hbt-muted);
}

.hbt-breadcrumb a {
    color: var(--hbt-muted);
    text-decoration: none;
}
.hbt-breadcrumb a:hover { color: var(--hbt-sage); }

/* ── TWO-COLUMN LAYOUT ───────────────────────────────────── */
.hbt-single__layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
    padding-top: 8px;
}

@media (max-width: 1024px) {
    .hbt-single__layout {
        grid-template-columns: 1fr 260px;
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .hbt-single__layout {
        grid-template-columns: 1fr;
    }
    .hbt-single__sidebar {
        order: -1;
    }
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
.hbt-single__hero-img {
    border-radius: var(--hbt-radius);
    overflow: hidden;
    margin-bottom: 28px;
    aspect-ratio: 16/9;
}

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

.hbt-single__header {
    margin-bottom: 32px;
}

.hbt-single__cat {
    font-family: var(--hbt-font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hbt-sage);
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
}
.hbt-single__cat:hover { color: var(--hbt-olive); }

.hbt-single__title {
    font-family: var(--hbt-font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 400;
    color: var(--hbt-forest);
    line-height: 1.25;
    margin: 0 0 16px;
}

.hbt-single__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.825rem;
    color: var(--hbt-muted);
    margin-bottom: 20px;
}

.hbt-single__meta-icon {
    display: flex;
    align-items: center;
    color: var(--hbt-sage);
}

.hbt-single__meta-sep { color: #ccc; }

.hbt-single__divider {
    text-align: left;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--hbt-border);
    padding-bottom: 24px;
}

/* ── POST CONTENT ────────────────────────────────────────── */
.hbt-single__content {
    font-family: var(--hbt-font-body);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--hbt-text);
}

.hbt-single__content p {
    margin: 0 0 1.4em;
}

.hbt-single__content h2,
.hbt-single__content h3 {
    font-family: var(--hbt-font-serif);
    color: var(--hbt-forest);
    margin: 2em 0 0.7em;
}

.hbt-single__content ul,
.hbt-single__content ol {
    padding-left: 1.5em;
    margin: 0 0 1.4em;
}

/* Numbered list items with green circles — matching design */
.hbt-single__content ol {
    list-style: none;
    padding-left: 0;
    counter-reset: hbt-counter;
}

.hbt-single__content ol li {
    counter-increment: hbt-counter;
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--hbt-border);
}

.hbt-single__content ol li:last-child {
    border-bottom: none;
}

.hbt-single__content ol li::before {
    content: counter(hbt-counter);
    background: var(--hbt-forest);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.hbt-single__content ol li h3,
.hbt-single__content ol li strong {
    font-family: var(--hbt-font-serif);
    font-size: 1.05rem;
    color: var(--hbt-sage);
    font-weight: 400;
    font-style: italic;
    display: block;
    margin-bottom: 4px;
}

.hbt-single__content blockquote {
    border-left: 3px solid var(--hbt-sage);
    margin: 2em 0;
    padding: 1em 1.5em;
    color: var(--hbt-muted);
    font-style: italic;
    background: rgba(107, 143, 94, .06);
    border-radius: 0 var(--hbt-radius-sm) var(--hbt-radius-sm) 0;
}

.hbt-single__content a {
    color: var(--hbt-sage);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.hbt-single__content a:hover { color: var(--hbt-forest); }

/* Tags */
.hbt-single__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--hbt-border);
}

.hbt-tag {
    display: inline-block;
    background: rgba(107, 143, 94, .12);
    color: var(--hbt-olive);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 5px 12px;
    border-radius: 40px;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.hbt-tag:hover {
    background: var(--hbt-sage);
    color: #fff;
}

/* ── SIDEBAR WIDGETS ─────────────────────────────────────── */
.hbt-single__sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 24px;
}

.hbt-widget {
    background: #fff;
    border-radius: var(--hbt-radius);
    box-shadow: var(--hbt-shadow);
    padding: 28px 24px;
}

.hbt-widget__heading {
    font-family: var(--hbt-font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hbt-sage);
    text-align: center;
    margin: 0 0 20px;
    font-style: italic;
}

/* Author */
.hbt-author {
    text-align: center;
}

.hbt-author__avatar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.hbt-author__avatar {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover;
    border: 3px solid var(--hbt-cream);
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

.hbt-author__name {
    font-family: var(--hbt-font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--hbt-forest);
    margin: 0 0 4px;
}

.hbt-author__title {
    font-size: 0.75rem;
    color: var(--hbt-sage);
    margin: 0 0 12px;
}

.hbt-author__bio {
    font-size: 0.825rem;
    color: var(--hbt-muted);
    line-height: 1.6;
    margin: 0 0 14px;
}

.hbt-author__sig {
    font-family: 'Dancing Script', cursive, var(--hbt-font-serif);
    font-size: 1.4rem;
    color: var(--hbt-forest);
    margin: 0;
    font-style: italic;
}

/* Categories list */
.hbt-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hbt-cat-list__item {
    border-bottom: 1px solid var(--hbt-border);
}
.hbt-cat-list__item:last-child { border-bottom: none; }

.hbt-cat-list__link {
    display: block;
    padding: 11px 4px;
    font-size: 0.9rem;
    color: var(--hbt-text);
    text-decoration: none;
    transition: color .2s, padding-left .2s;
}

.hbt-cat-list__link:hover,
.hbt-cat-list__link.is-current {
    color: var(--hbt-sage);
    padding-left: 8px;
}

/* Info box */
.hbt-info-box {
    text-align: center;
    background: var(--hbt-cream);
    border: none;
    box-shadow: none;
    padding: 32px 24px;
}

.hbt-info-box__icon {
    font-size: 2rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.hbt-info-box__quote {
    font-family: var(--hbt-font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--hbt-sage);
    line-height: 1.6;
    margin: 0 0 16px;
    border: none;
    padding: 0;
    text-align: center;
}

.hbt-info-box__leaf {
    font-size: 1rem;
    opacity: 0.4;
}

/* ── RELATED ARTICLES ─────────────────────────────────────── */
.hbt-related {
    background: var(--hbt-cream);
    padding: 64px 0 80px;
    margin-top: 60px;
    border-top: 1px solid var(--hbt-border);
}

.hbt-related__heading {
    font-family: var(--hbt-font-serif);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 400;
    color: var(--hbt-forest);
    text-align: center;
    margin: 0 0 12px;
}

.hbt-related__divider {
    text-align: center;
    margin-bottom: 40px;
}

.hbt-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--hbt-gap);
}

@media (max-width: 768px) {
    .hbt-related__grid { grid-template-columns: 1fr; }
}

.hbt-related__card {
    background: #fff;
    border-radius: var(--hbt-radius);
    overflow: hidden;
    box-shadow: var(--hbt-shadow);
    transition: box-shadow .25s, transform .25s;
}

.hbt-related__card:hover {
    box-shadow: var(--hbt-shadow-hover);
    transform: translateY(-3px);
}

.hbt-related__thumb {
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.hbt-related__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}

.hbt-related__card:hover .hbt-related__thumb img {
    transform: scale(1.04);
}

.hbt-related__thumb-fallback {
    width: 100%;
    height: 100%;
    background: #e8ede4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.hbt-related__body {
    padding: 18px 18px 22px;
}

.hbt-related__cat {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hbt-sage);
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}
.hbt-related__cat:hover { color: var(--hbt-olive); }

.hbt-related__title {
    font-family: var(--hbt-font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 12px;
    color: var(--hbt-forest);
}

.hbt-related__title a {
    text-decoration: none;
    color: inherit;
}
.hbt-related__title a:hover { color: var(--hbt-sage); }

.hbt-related__link {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--hbt-sage);
    text-decoration: none;
    transition: color .2s;
}
.hbt-related__link:hover { color: var(--hbt-forest); }


/* ── RESPONSIVE TWEAKS ───────────────────────────────────── */
@media (max-width: 768px) {
    .hbt-archive__hero { padding: 40px 16px 28px; }
    .hbt-archive__filters { padding-bottom: 20px; }
    .hbt-filter-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
    .hbt-tabs { gap: 2px; }
    .hbt-tab { font-size: 0.8rem; padding: 5px 10px; }
    .hbt-search { width: 100%; }
    .hbt-search-wrap { width: 100%; }
    .hbt-archive__grid-wrap { padding: 32px 0 48px; }
    .hbt-container { padding: 0 16px; }

    .hbt-single__sidebar { position: static; }
    .hbt-breadcrumb { padding: 16px; }
    .hbt-related { padding: 40px 0 52px; margin-top: 40px; }
}

@media (max-width: 480px) {
    .hbt-grid { gap: 16px; }
    .hbt-card__body { padding: 16px 16px 20px; }
    .hbt-single__title { font-size: 1.7rem; }
}

/* ── ACCESSIBILITY ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .hbt-card,
    .hbt-card__img,
    .hbt-related__card,
    .hbt-related__thumb img {
        transition: none;
    }
}

.hbt-tab:focus-visible,
.hbt-page-btn:focus-visible,
.hbt-page-next:focus-visible {
    outline: 2px solid var(--hbt-sage);
    outline-offset: 2px;
}
