@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html {
    scroll-behavior: smooth;
}

.blog-detail-wrapper {
    background-color: #ffffff;
    padding-top: calc(62px + 48px) !important;
    font-family: 'IBM Plex Sans Thai', sans-serif !important;
    animation: fadeIn 4s ease-out;
}

.blog-detail-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 80px;
}

.blog-related-posts-container {
    padding: 0 80px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.breadcrumb-nav a {
    color: #9EA0A5;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
}

.breadcrumb-nav .separator {
    display: flex;
    align-items: center;
    width: 24px;
    height: 24px;
    justify-content: center;
}

.breadcrumb-nav .current-page {
    font-size: 14px;
    font-weight: 600;
    line-height: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.blog-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 64px;
    color: #161616;
    margin-top: 16px;
    margin-bottom: 8px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.blog-meta [data-lucide] {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    margin-right: 8px;
}

.meta-right {
    display: flex;
    align-items: flex-start;
    gap: var(--space-24);
}

.meta-sep {
    color: #D0D5DD;
}

.main-image-area img {
    width: 100%;
    height: 476px;
    margin-bottom: 56px;
    object-fit: cover;
}

.toc-container {
    background-color: #F5F6F8;
    padding: 24px 32px;
    margin-bottom: 56px;
}

.toc-title {
    margin-bottom: 16px;
}

.toc-list {
    padding-left: 24px;
    margin: 0;
}

.toc-list li {
    margin-bottom: 12px;
}

.toc-list a {
    color: #000;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-underline-offset: auto;
}

.content-block {
    margin-bottom: 56px;
}

.content-block h2,
.content-block h3,
.content-block h4 {
    scroll-margin-top: 110px;
}

.blog-detail-wrapper ul[style*="text-align: center"],
.blog-detail-wrapper ol[style*="text-align: center"],
.blog-detail-wrapper li[style*="text-align: center"],
.blog-detail-wrapper ul[style*="text-align:center"],
.blog-detail-wrapper ol[style*="text-align:center"],
.blog-detail-wrapper li[style*="text-align:center"],
.blog-detail-wrapper ul[style*="text-align: right"],
.blog-detail-wrapper ol[style*="text-align: right"],
.blog-detail-wrapper li[style*="text-align: right"],
.blog-detail-wrapper ul[style*="text-align:right"],
.blog-detail-wrapper ol[style*="text-align:right"],
.blog-detail-wrapper li[style*="text-align:right"] {
    list-style-position: inside;
    padding-left: 0;
    padding-right: 0;
}

.image-content {
    margin-bottom: 32px;
}

.image-content img {
    width: 100%;
    height: 355px;
    display: block;
    object-fit: cover;
    object-position: center;
}

.reference-section {
    padding: 24px;
    background-color: #F5F6F8;
    margin-top: 40px;
}

.ref-title {
    margin-bottom: 16px;
}

.ref-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.ref-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
}

.ref-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #000;
    font-size: 18px;
    line-height: 1.2;
}

.ref-list a {
    color: #000;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-underline-offset: auto;
    transition: opacity 0.2s ease;
}

.ref-list a:hover {
    color: #000 !important;
    opacity: 0.7;
}

.blog-faq-block {
    margin: 48px 0;
    font-family: "IBM Plex Sans Thai", sans-serif;
    background: transparent;
    border: none;
    padding: 0;
}

.blog-faq-header {
    margin-bottom: 32px;
}

.blog-faq-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    line-height: 44px;
    color: #000000;
}

.blog-faq-description {
    font-size: 16px;
    color: #000000;
    margin-top: 8px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.blog-faq-list {
    display: block;
}

.blog-faq-item {
    background: transparent;
    border: none;
    margin-bottom: 40px;
}

.blog-faq-question {
    display: block;
    padding: 0;
    margin-bottom: 12px;
    font-size: 24px;
    font-weight: 600;
    line-height: 36px;
    color: #000000;
}

.blog-faq-answer {
    padding: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: #000;
}

.blog-faq-answer p {
    margin-bottom: 8px;
}

.blog-faq-bullets {
    margin: 12px 0 0;
    padding-left: 0;
    list-style: none;
}

.blog-faq-bullets li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 400;
    line-height: 28px;
    color: #000000;
}

.blog-faq-bullets li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #000000;
    font-weight: bold;
}

.blog-footer {
    margin-top: 48px;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8);
    margin: 20px 0;
}

.tag-item {
    display: flex;
    padding: var(--space-4) var(--space-16);
    align-items: flex-start;
    border: 1px solid #E9ECF0;
    border-radius: 0;
    text-decoration: none;
    background-color: transparent;
    transition: all 0.2s ease;
}

.tag-item:hover {
    background-color: #184382;
    color: #ffffff;
    border-color: #184382;
    text-decoration: none;
}

.share-wrapper {
    padding-top: 10px;
    border-top: 1px solid #EAECF0;
}

.share-section {
    display: flex;
    align-items: center;
    gap: 32px;
}

.share-label {
    margin: 0;
}

.share-icons {
    display: flex;
    gap: 24px;
    align-items: center;
}

.share-link img {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0);
    transition: opacity 0.3s ease;
}

.share-link:hover img {
    opacity: 0.7;
}

.copy-link-container {
    position: relative;
    display: flex;
    align-items: center;
}

.copy-toast {
    position: absolute;
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background: #184382;
    color: white;
    padding: 8px 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.copy-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.author-section {
    display: flex;
    align-items: flex-start;
    padding: 24px;
    gap: 16px;
    background: #F5F6F8;
    margin-top: 32px;
    margin-bottom: 40px;
}

.author-avatar-container {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

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

.avatar-circle-placeholder {
    width: 40px;
    height: 40px;
    background: #8BA8C7;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.author-info-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.author-header-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.author-name-text {
    margin: 0;
}

.author-job-title {
    margin: 0;
}

.author-description {
    margin: 0 0 16px 0;
}

.author-social-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.author-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    transition: opacity 0.2s ease;
}

.author-social-link img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0);
}

.author-social-link:hover {
    opacity: 0.6;
}

.blog-button-block {
    margin: 32px 0;
}

.blog-button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.blog-button-link:hover {
    color: #ffffff;
    opacity: 0.92;
    text-decoration: none;
    transform: translateY(-1px);
}

.related-posts-section {
    background-color: #ffffff;
    padding: 80px 0;
}

.related-title-text {
    margin-bottom: 32px;
    animation: fadeInUp 1s ease-out;
}

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

.related-card {
    padding-bottom: 16px;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.related-image {
    width: 100%;
    height: 276px;
    overflow: hidden;
    margin-bottom: 16px;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.related-post-title-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    align-self: stretch;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.related-date {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.related-date svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (min-width: 768px) and (max-width: 1024px) {
    .blog-detail-container {
        padding: 0 24px !important;
    }

    .blog-detail-wrapper {
        padding-top: calc(62px + 32px) !important;
    }

    .image-content img {
        height: 355px !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    .blog-related-posts-container {
        padding: 0 24px !important;
    }
}

@media (max-width: 767.98px) {
    .blog-detail-container {
        width: 100%;
        padding: 0 16px !important;
    }

    .blog-detail-wrapper {
        padding-top: calc(62px + 24px) !important;
    }

    .blog-title {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    .blog-meta {
        display: block !important;
    }

    .meta-left {
        display: block !important;
        width: 100% !important;
        margin-bottom: 12px !important;
    }

    .meta-left span {
        display: block !important;
        margin-bottom: 4px !important;
    }

    .meta-right {
        display: flex !important;
        width: 100% !important;
        justify-content: flex-start !important;
        gap: 24px !important;
        margin-top: 12px;
    }

    .meta-sep {
        display: none !important;
    }

    .main-image-area img {
        width: 100%;
        height: 333px !important;
    }

    .image-content img {
        height: 355px !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    .toc-container {
        padding: 16px;
    }

    .blog-faq-block {
        padding: 20px 16px;
    }

    .blog-faq-question {
        padding: 16px;
        font-size: 16px;
        line-height: 24px;
    }

    .blog-faq-answer {
        padding: 0 16px 16px;
        font-size: 15px;
        line-height: 26px;
    }

    .blog-related-posts-container {
        padding: 0 16px !important;
    }

    .share-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-image img {
        height: 276px;
        object-fit: cover;
    }
}