/* Blog (/blog, /blog/{slug}) */

.ht-blog-hero,
.ht-blog,
.ht-post-hero,
.ht-post,
.ht-post-preview {
    --ht-ink: #0f2341;
    --ht-muted: #5b6678;
    --ht-border: #e7ecf2;
    --ht-teal: var(--color-primary, #135360);
    --ht-teal-dark: var(--color-secondary, #0e404a);
    --ht-teal-light: var(--tier_teal, #27abb8);
    font-family: var(--font-primary);
}

/* ---- Listing header ---- */
.ht-blog-hero {
    padding: 72px 0 64px;
    background: linear-gradient(180deg, #eaf5f6 0%, #f6fafb 100%);
    text-align: center;
}

.ht-blog-hero__eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--ht-teal);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.ht-blog-hero h1 {
    margin: 0 0 12px;
    color: var(--ht-ink);
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
}

.ht-blog-hero p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--ht-muted);
    font-size: 17px;
    line-height: 1.6;
}

.ht-blog-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 560px;
    margin: 30px auto 0;
    padding: 6px 6px 6px 18px;
    border: 1px solid var(--ht-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 35, 65, 0.08);
}

.ht-blog-search > i {
    color: #98a2b3;
}

.ht-blog-search input {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 0;
    background: none;
    color: var(--ht-ink);
    font-size: 15px;
    outline: none;
}

.ht-blog-search button {
    width: auto;
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--ht-teal);
    color: #fff;
    font-weight: 600;
    transition: background 0.2s ease;
}

.ht-blog-search button:hover {
    background: var(--ht-teal-dark);
}

/* ---- Listing ---- */
.ht-blog {
    padding: 56px 0 96px;
}

.ht-blog-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
}

.ht-blog-categories a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--ht-border);
    border-radius: 999px;
    background: #fff;
    color: var(--ht-ink);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ht-blog-categories a span {
    color: var(--ht-muted);
    font-size: 12px;
}

.ht-blog-categories a:hover {
    border-color: var(--ht-teal-light);
    color: var(--ht-teal);
}

.ht-blog-categories a.is-active {
    border-color: var(--ht-teal);
    background: var(--ht-teal);
    color: #fff;
}

.ht-blog-categories a.is-active span {
    color: rgba(255, 255, 255, 0.75);
}

.ht-blog-results {
    margin: -12px 0 28px;
    color: var(--ht-muted);
    text-align: center;
}

.ht-blog-results a {
    color: var(--ht-teal);
    font-weight: 600;
}

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

/* ---- Post card ---- */
.ht-post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ht-border);
    border-radius: 18px;
    background: #fff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ht-post-card:hover {
    box-shadow: 0 20px 44px rgba(15, 35, 65, 0.1);
    transform: translateY(-3px);
}

.ht-post-card__media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eef4f6;
}

.ht-post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ht-post-card:hover .ht-post-card__media img {
    transform: scale(1.04);
}

.ht-post-card__placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #135360 0%, #27abb8 100%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 40px;
}

.ht-post-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 22px 24px 24px;
}

.ht-post-card__category {
    align-self: flex-start;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #eaf6f7;
    color: var(--ht-teal);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ht-post-card__title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.ht-post-card__title a {
    color: var(--ht-ink);
}

.ht-post-card__title a:hover {
    color: var(--ht-teal);
}

.ht-post-card__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 18px;
    color: var(--ht-muted);
    font-size: 15px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.ht-post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: auto 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--ht-border);
    color: var(--ht-muted);
    font-size: 13px;
}

.ht-post-card__meta i {
    margin-right: 4px;
    color: var(--ht-teal-light);
}

/* Featured (latest) post: wide, image beside text */
.ht-post-card.is-featured {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    margin-bottom: 36px;
}

.ht-post-card.is-featured .ht-post-card__media {
    aspect-ratio: auto;
    min-height: 340px;
}

.ht-post-card.is-featured .ht-post-card__body {
    justify-content: center;
    padding: 40px 44px;
}

.ht-post-card.is-featured .ht-post-card__title {
    font-size: 30px;
    letter-spacing: -0.5px;
}

.ht-post-card.is-featured .ht-post-card__excerpt {
    font-size: 16.5px;
    -webkit-line-clamp: 4;
}

.ht-post-card.is-featured .ht-post-card__meta {
    margin-top: 6px;
}

/* Empty state and pagination */
.ht-blog-empty {
    max-width: 520px;
    margin: 0 auto;
    padding: 60px 24px;
    border: 1px dashed #cfd8e0;
    border-radius: 18px;
    text-align: center;
}

.ht-blog-empty > i {
    color: var(--ht-teal-light);
    font-size: 40px;
}

.ht-blog-empty h2 {
    margin: 16px 0 8px;
    color: var(--ht-ink);
    font-size: 24px;
    font-weight: 700;
}

.ht-blog-empty p {
    margin: 0 0 20px;
    color: var(--ht-muted);
}

.ht-blog-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.ht-blog-pagination a {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ht-border);
    border-radius: 10px;
    background: #fff;
    color: var(--ht-ink);
    font-weight: 600;
}

.ht-blog-pagination a:hover {
    border-color: var(--ht-teal-light);
    color: var(--ht-teal);
}

.ht-blog-pagination a.is-active {
    border-color: var(--ht-teal);
    background: var(--ht-teal);
    color: #fff;
}

/* ---- Single post ---- */
.ht-post-preview {
    padding: 10px 16px;
    background: #fff7e6;
    color: #8a5a00;
    font-size: 14px;
    text-align: center;
}

.ht-post-hero {
    padding: 64px 0 40px;
    background: linear-gradient(180deg, #eaf5f6 0%, #fff 100%);
}

.ht-post-hero .container {
    max-width: 860px;
}

.ht-post-hero__crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.ht-post-hero__crumbs a {
    color: var(--ht-teal);
}

.ht-post-hero__crumbs i {
    color: #98a2b3;
    font-size: 10px;
}

.ht-post-hero h1 {
    margin: 0 0 24px;
    color: var(--ht-ink);
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
}

.ht-post-hero__meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ht-post-hero__meta strong,
.ht-post-hero__meta small {
    display: block;
}

.ht-post-hero__meta strong {
    color: var(--ht-ink);
    font-size: 15px;
}

.ht-post-hero__meta small {
    color: var(--ht-muted);
    font-size: 13.5px;
}

.ht-post-hero__avatar {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ht-teal);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.ht-post {
    padding: 8px 0 72px;
}

.ht-post .container {
    max-width: 960px;
}

.ht-post__cover {
    display: block;
    width: 100%;
    max-height: 520px;
    margin: 0 auto 44px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 24px 60px rgba(15, 35, 65, 0.12);
}

.ht-post__body {
    max-width: 760px;
    font-size: 17.5px;
    line-height: 1.85;
}

.ht-post__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 760px;
    margin: 48px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--ht-border);
}

.ht-post-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ht-post-share span {
    margin-right: 6px;
    color: var(--ht-ink);
    font-size: 14px;
    font-weight: 600;
}

.ht-post-share a,
.ht-post-share button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ht-border);
    border-radius: 50%;
    background: #fff;
    color: var(--ht-teal);
    transition: all 0.2s ease;
}

.ht-post-share a:hover,
.ht-post-share button:hover {
    border-color: var(--ht-teal);
    background: var(--ht-teal);
    color: #fff;
}

.ht-post__back {
    color: var(--ht-teal);
    font-weight: 600;
}

.ht-blog--related {
    padding-top: 64px;
    background: #f6f9fb;
}

.ht-blog-related__title {
    margin: 0 0 28px;
    color: var(--ht-ink);
    font-size: 30px;
    font-weight: 800;
    text-align: center;
}

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

@media (max-width: 991px) {
    .ht-post-card.is-featured {
        grid-template-columns: 1fr;
    }

    .ht-post-card.is-featured .ht-post-card__media {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .ht-post-card.is-featured .ht-post-card__body {
        padding: 26px 28px 28px;
    }

    .ht-post-hero h1 {
        font-size: 36px;
    }
}

@media (max-width: 767px) {
    .ht-blog-grid {
        grid-template-columns: 1fr;
    }

    .ht-blog-hero h1 {
        font-size: 36px;
    }

    .ht-post-hero h1 {
        font-size: 30px;
    }

    .ht-post__body {
        font-size: 16.5px;
    }

    .ht-post-card.is-featured .ht-post-card__title {
        font-size: 24px;
    }
}
