/* Blog Detail Styles (Inspired by Jaysearch) */

/* Layout & Containers */
.post-header-wrap {
    padding: 100px 0 60px 0;
    background: #f0efed;
}

.post-header-wrap .container {
    max-width: 1000px !important;
}

.post-main-content {
    background-color: #ffffff;
    padding: 40px 0 20px;
}

/* Breadcrumbs */
.post-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin-bottom: 24px;
    font-size: 13px;
    color: #3f3f3f;
    text-transform: uppercase;
}

.post-breadcrumbs li a {
    color: #585858;
    text-decoration: none;
}

.post-breadcrumbs li::after {
    content: '/';
    margin-left: 8px;
    color: #ccc;
}

.post-breadcrumbs li:last-child::after {
    content: '';
}

/* Post Header Content */
.post-title {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    color: #111111;
    margin: 0 0 24px 0;
}

.post-excerpt {
    font-size: 18px;
    line-height: 1.6;
    color: #4b4b4b;
    margin-bottom: 32px;
}

.post-meta-line {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #696969;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #ebebeb;
    width: 100%;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-target-audience {
    font-size: 14px;
    color: #757575;
    line-height: 1.5;
}

.post-target-audience b {
    color: #585858;
}

/* Post Body Content */
.post-featured-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 40px;
}

/* Content styles moved to frontend/content.css */

/* Post cards (used on blog index, category, author) */
.post-card {
    border: 1px solid #efeff3;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.post-img-container {
    position: relative;
    background: #f5f5f7;
}

.post-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.post-cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(17, 17, 17, 0.85);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

.post-card-body {
    padding: 16px 16px 18px;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 8px;
    color: #111111;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.post-card-summary {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #666666;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* Category page — hero + trio + feed */
.category-hero {
    padding: 56px 0 36px;
}

.category-hero-panel {
    background: #f0efed;
    border-radius: 28px;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.category-hero-visual {
    background-image: url(/storage/uploads/media/1775798521_imagecat.png);
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    right: 0;
    width: 48%;
    height: 100%;
}


/* Hero Visual Alignment Fix */

@media (max-width: 991px) {
    .category-hero-visual {
        position: relative;
        bottom: 0;
        width: 100%;
        height: 320px;
        border-radius: 20px;
    }

    .category-hero-panel {
        padding: 2.5rem 1.5rem;
    }
}

.category-hero__breadcrumbs {
    margin-bottom: 14px;
}


.category-hero__title {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 700;
    margin: 0 0 16px;
    color: #111;
    line-height: 1.15;
    max-width: 920px;
}

.category-hero__lead {
    font-size: 1.05rem;
    color: #4b4b4b;
    line-height: 1.65;
    margin: 0 0 20px;
    max-width: 720px;
}

.category-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 18px;
}

.category-hero__cta-main {
    display: inline-block;
    background: #111111;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.category-hero__cta-main i {
    vertical-align: -0.1em;
}

.category-hero__stat {
    color: #666;
    font-size: 0.92rem;
    font-weight: 500;
}

.category-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 6px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    color: #2a2a2a;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.category-chip:hover {
    color: #111;
}

.category-chip.is-active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
    box-shadow: none;
}

.category-chip__count {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.72;
}

.category-chip.is-active .category-chip__count {
    opacity: 0.85;
}

.category-page {
    margin-top: 28px;
    padding-bottom: 5rem;
}

.category-trio {
    scroll-margin-top: 96px;
    margin-bottom: 3rem;
}

.category-trio-card {
    position: relative;
    border-radius: 24px;
    padding: 1.45rem 1.35rem;
    min-height: 280px;
    height: 100%;
    overflow: hidden;
}

.category-trio-card__inner {
    position: relative;
    height: 100%;
}

.category-trio-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
}

.category-trio-card__link--block {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.category-trio-card--dark {
    background: #353535;
    color: #fff;
}

.category-trio-card--dark .category-trio-card__meta {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.category-trio-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgb(255, 255, 255);
    color: #363636;
    margin-bottom: 12px;
}

.category-trio-card--dark .category-trio-card__badge {
    background: rgb(238, 238, 238);
}

.category-trio-card__badge--dark {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

.category-trio-card__icon-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #c3cfd9, #e2e8f0);
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    z-index: 2;
    pointer-events: none;
}

.category-trio-card__icon-btn--dark {
    background: #111;
    color: #fff;
}

.category-trio-card__icon-btn--muted {
    background: #f5f5f5;
    color: #444;
}

.category-trio-card__icon-btn--disabled {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.45);
}

.category-trio-card__title {
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.28;
    margin: 0 0 10px;
    padding-right: 3rem;
}

.category-trio-card--dark .category-trio-card__title {
    color: #fff;
}

.category-trio-card__title--on-accent {
    color: #141414;
    font-size: 1.18rem;
}

.category-trio-card__excerpt {
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0;
}

.category-trio-card--dark .category-trio-card__excerpt {
    color: rgba(255, 255, 255, 0.72);
}

.category-trio-card__excerpt--on-accent {
    color: rgba(0, 0, 0, 0.68);
}

.category-trio-card__excerpt--no-margin {
    margin: 0;
}

.category-trio-card--accent {
    background: linear-gradient(150deg, #f8f7f4 0%, #f8f7f4 42%, #f8f7f4 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.category-trio-card__meta--on-accent {
    color: rgba(0, 0, 0, 0.48);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 10px;
}

.category-trio-card__sub-link {
    display: block;
    margin-top: 6px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #111;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.category-trio-card__sub-link:hover {
    color: #111;
}

.category-trio-card--story {
    display: flex;
    flex-direction: column;
    background: #eceef0;
    border: 1px solid #e2e2e8;
}

.category-trio-card__story-link {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2a2a2a;
    text-decoration: none;
    margin-bottom: 10px;
    display: inline-block;
}

.category-trio-card__story-link:hover {
    color: #2a2a2a;
}

.category-trio-card__story-text {
    font-size: 0.94rem;
    line-height: 1.65;
    color: #444;
    margin: 0 0 0.5rem;
    flex: 1;
}

.category-trio-card__author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.category-trio-card__author-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ddd, #d1d1d1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #333;
    flex-shrink: 0;
}

.category-trio-card__author-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #111;
}

.category-trio-card__author-role {
    font-size: 0.78rem;
    color: #777;
}

.category-feed-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 1.25rem;
    padding-top: 4px;
    scroll-margin-top: 88px;
}

.category-feed-heading__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #111;
}

.category-feed-heading__page {
    font-size: 0.82rem;
    color: #86868b;
    margin: 0;
}

.category-feed-card {
    height: 100%;
    background: #ffffff;
    border: 1px solid #efeff3;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}


.category-feed-card__title-link {
    text-decoration: none;
    color: inherit;
}

.category-feed-card__meta {
    color: #86868b;
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.category-feed-card__meta span {
    margin: 0 6px;
}

.category-feed-card__title {
    color: #111111;
    font-size: 1.2rem;
    line-height: 1.35;
    font-weight: 700;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.category-feed-card__summary {
    color: #666666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
}

.category-feed-card__author {
    margin-top: auto;
    padding-top: 10px;
    color: #444;
    font-size: 0.88rem;
    font-weight: 600;
}

.category-feed-empty {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #efeff3;
    padding: 2rem;
    color: #666;
    text-align: center;
}

.category-no-more-posts {
    display: block;
    width: 100%;
    text-align: center;
    color: #86868b;
    font-size: 0.92rem;
    padding: 20px 0;
    font-style: italic;
}

.category-load-more-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.category-load-more-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid #333333;
    color: #333333;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.category-load-more-btn:hover {
    background: transparent;
    color: #111;
}

.category-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .category-hero {
        padding: 32px 0 24px;
    }

    .category-hero-panel {
        padding: 1.5rem 1.25rem;
        border-radius: 22px;
    }

    .category-hero-visual {
        display: none;
    }

    .category-trio-card {
        min-height: 0;
        border-radius: 20px;
    }

    .category-trio-card__title {
        font-size: 1.15rem;
    }

    .category-hero__actions {
        gap: 8px;
    }

    .category-hero__actions .btn {
        width: 100%;
    }

    /* Cho nút full width trên mobile nếu muốn, hoặc bỏ dòng này */
}

@media (max-width: 576px) {
    .post-img {
        height: 180px;
    }
}

/* Sidebars (Table of Contents & Author) */
.post-sidebar-left,
.post-sidebar-right {
    position: sticky;
    top: 100px;
    height: fit-content;
    z-index: 10;
}

.post-sidebar-left {
    padding-right: 10px;
}



.post-share-section {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.share-label {
    font-size: 15px;
    font-weight: 500;
    color: #424242;
}

.post-social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    color: #ffffff !important;
    font-size: 1.1rem;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    opacity: 0.85;
}

.social-link.facebook {
    background-color: #0a6dee;
}

.social-link.linkedin {
    background-color: #0077B5;
}

.social-link.twitter {
    background-color: #575757;
}

.social-link.email {
    background-color: #444444;
}

.toc-wrapper {
    padding-top: 0;
}

.toc-heading {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    color: #000000;
}

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

.toc-link {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #606060 !important;
    text-decoration: none;
    line-height: 1.5;
    padding: 8px 16px;
    border-left: 2px solid transparent;
    margin-bottom: 2px;
}

.toc-link:hover {
    color: #000000;
    background-color: #f0f0f0;
}

.toc-link.active {
    border-left: 2px solid #252525;
    background: #f0f0f0;
    color: #252525 !important;
}

.sidebar-card {
    margin-bottom: 50px;
}

.sidebar-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #111111;
    margin-bottom: 15px;
    display: block;
}

.author-info {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.author-avatar-wrapper {
    flex-shrink: 0;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f5f5f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    font-size: 1.5rem;
}

.author-name {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 5px 0;
    color: var(--color-brand-primary);
}

.author-bio {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
    margin: 0;
}

.sidebar-text {
    font-size: 1rem;
    color: #2c2c2c;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Related Posts Section */
.related-section {
    padding: 20px 0;
    background-color: #ffffff;
}

.related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

/* Related posts list (personal blog: simple, no effects/shadow) */
.related-viewport {
    overflow: hidden;
    /* no scroll */
}

.related-track {
    display: flex;
    gap: 14px;
    transform: translateX(0);
    transition: transform 220ms ease;
}

.related-item {
    padding: 14px 16px;
    border: 1px solid #efeff3;
    border-radius: 10px;
    background: #ffffff;
    flex: 0 0 calc((100% - (14px * 2)) / 3);
    background: #f7f6f3;
}

.related-item:first-child {
    border-color: #efeff3;
}

.related-nav {
    display: inline-flex;
    gap: 6px;
}

.related-nav__btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #efeff3;
    background: #ffffff;
    color: #111111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.related-nav__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.related-title {
    display: inline-block;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.35;
    color: #111111;
    text-decoration: none;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.related-meta {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #777777;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.related-meta__sep {
    color: #b6b6bc;
}

.related-summary {
    margin: 6px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #666666;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

@media (max-width: 576px) {
    .related-item {
        padding: 12px 14px;
    }

    .related-item {
        flex-basis: 100%;
    }
}

@media (max-width: 992px) {
    .related-item {
        flex-basis: calc((100% - 14px) / 2);
    }

    /* 2 items per view */
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .post-title {
        font-size: 2.8rem;
    }
}

@media (max-width: 991px) {

    .post-sidebar-left,
    .post-sidebar-right {
        position: static;
        margin-bottom: 40px;
    }
}

/* Sidebar Lead Form Styles (Refactor) */
.sidebar-consult {
    background: #f1f1f1;
    border: 1px solid #e2e2e7;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 50px;
}

.sidebar-consult__title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 12px;
}

.sidebar-consult__desc {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 20px;
}

.sidebar-consult__alert {
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

.sidebar-consult__alert--success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.sidebar-consult__alert--error {
    background: #fdecea;
    color: #d32f2f;
    border: 1px solid #f9bdbb;
}

.sidebar-consult__group {
    margin-bottom: 18px;
}

.sidebar-consult__label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.sidebar-consult__input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e2e7;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    color: #111;
    transition: all 0.2s ease;
}

.sidebar-consult__input:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.sidebar-consult__error {
    font-size: 12px;
    color: #d32f2f;
    margin-top: 5px;
}

.sidebar-consult__submit {
    width: 100%;
    background: #3b3b3b;
    color: #fff;
    border: none;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}