/* =============================================
   ARTICLE DETAIL PAGE - baivietchitiet.css
   ============================================= */

/* Hero Banner */
.article-hero {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(to bottom, #064666 0%, #0a5a80 40%, #1a7a9a 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('assets/images/blog-1.png') center/cover no-repeat;
    opacity: 0.4;
}

.article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #064666 0%, rgba(6, 70, 102, 0.7) 30%, transparent 100%);
}

.article-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.article-breadcrumb {
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #ffffff;
    letter-spacing: 0.02em;
}

/* =============================================
   ARTICLE LAYOUT (sidebar + main)
   ============================================= */
.article-layout {
    max-width: 1281px;
    margin: 0 auto;
    padding: 64px 15px 80px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 80px;
    align-items: start;
}

/* =============================================
   LEFT SIDEBAR
   ============================================= */
.article-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Date block */
.sidebar-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.sidebar-month {
    font-family: 'Google Sans', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #14313A;
    line-height: 1.2;
}

.sidebar-day {
    font-family: 'Google Sans', sans-serif;
    font-size: 60px;
    font-weight: 400;
    color: #14313A;
    line-height: 1;
}

/* Author block */
.sidebar-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-author-label {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #14313A;
}

.sidebar-author-name {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #3D3935;
}

/* Share block */
.sidebar-share {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-share-label {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #3D3935;
}

.sidebar-share-icons {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.share-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    color: #3D3935;
    text-decoration: none;
}

.share-icon-link:hover {
    background-color: rgba(61, 57, 53, 0.08);
}

/* =============================================
   MAIN ARTICLE
   ============================================= */
.article-main {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 920px;
}

/* Title */
.article-title {
    font-family: 'Google Sans', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: #14313A;
    line-height: 1.25;
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-tag {
    font-family: 'Google Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #828282;
    padding: 6px 14px;
    border-radius: 10px;
    line-height: 1.4;
}

.tag-green {
    background-color: #BCEBDA;
}

.tag-pink {
    background-color: #FDF1F0;
}

.tag-blue {
    background-color: #EFF5FE;
}

/* Author/Meta row */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(20, 49, 58, 0.1);
}

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

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

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #14313A;
}

.author-date {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(61, 57, 53, 0.67);
}

.article-meta-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #3D3935;
}

.meta-share-icon:hover {
    background-color: rgba(61, 57, 53, 0.08);
}

/* =============================================
   ARTICLE BODY
   ============================================= */
.article-body {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.article-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.section-heading {
    font-family: 'Google Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #7A7A7A;
    line-height: 1.4;
}

.section-paragraph {
    font-family: 'Google Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #7A7A7A;
    line-height: 1.7;
    text-align: justify;
}

.section-italic {
    font-style: italic;
    font-family: 'Times New Roman', serif;
}

.section-list {
    padding-left: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style-type: disc;
}

.section-list li {
    font-family: 'Google Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #7A7A7A;
    line-height: 1.7;
    text-align: justify;
}

/* Image blocks */
.article-image-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 738px;
}

.article-image {
    width: 100%;
    aspect-ratio: 1199 / 800;
    object-fit: cover;
    border-radius: 4px;
}

.article-caption {
    font-family: 'Google Sans', 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 400;
    font-style: italic;
    color: #7A7A7A;
    text-align: justify;
    line-height: 1.6;
}
/* =============================================
   TABLE OF CONTENTS (TOC) - PREMIUM UPGRADE
   ============================================= */
.article-toc {
    background: #FFFFFF;
    border: none;
    border-left: 4px solid #19D08E; /* Saltech Brand Green */
    border-radius: 0 16px 16px 0;
    padding: 32px;
    margin-bottom: 48px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 10px 40px rgba(20, 49, 58, 0.05); /* Soft, brand-tinted shadow */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-toc:hover {
    box-shadow: 0 15px 50px rgba(20, 49, 58, 0.08);
}

.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.toc-header span {
    font-family: 'Google Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #14313A;
    letter-spacing: -0.01em;
}

.toc-header .header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toc-header svg {
    color: #14313A;
    opacity: 0.8;
}

.toc-chevron {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-toc.expanded {
    padding-bottom: 32px;
}

.article-toc.expanded .toc-chevron {
    transform: rotate(180deg);
}

.article-toc.expanded .toc-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(20, 49, 58, 0.05);
}

.toc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-toc.expanded .toc-content {
    max-height: 2500px;
}

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

.toc-item {
    margin-bottom: 8px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.toc-item:last-child {
    margin-bottom: 0;
}

.toc-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.toc-link-wrapper:hover {
    background-color: rgba(25, 208, 142, 0.05);
}

.toc-item a {
    font-family: 'Google Sans', sans-serif;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.6;
    display: block;
    width: 100%;
}

/* Typography Hierarchy */
.toc-level-2 a {
    font-size: 17px;
    font-weight: 600;
    color: #14313A;
}

.toc-level-3 a {
    font-size: 16px;
    font-weight: 400;
    color: #3D3935;
    padding-left: 24px;
}

.toc-level-4 a {
    font-size: 15px;
    font-weight: 400;
    color: #828282;
    padding-left: 48px;
}

.toc-item a:hover {
    color: #19D08E;
    transform: translateX(4px);
}

.toc-expand {
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BDBDBD;
    transition: all 0.3s ease;
}

.toc-expand:hover {
    color: #19D08E;
}

.toc-expand.active {
    transform: rotate(180deg);
}

/* Smooth scroll Adjustment */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* More offset for header + breathing room */
}

@media (max-width: 768px) {
    .article-toc {
        padding: 24px;
        margin-bottom: 32px;
        border-radius: 0 12px 12px 0;
    }
    .toc-header span {
        font-size: 19px;
    }
    .toc-level-2 a { font-size: 16px; }
    .toc-level-3 a { font-size: 15px; }
}

/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet — max-width: 1024px */
@media (max-width: 1024px) {
    .article-hero {
        height: 380px;
    }

    .article-layout {
        grid-template-columns: 140px 1fr;
        gap: 48px;
        padding: 48px 24px 64px;
    }

    .article-title {
        font-size: 32px;
    }

    .article-main {
        gap: 24px;
    }

    .section-heading,
    .section-paragraph,
    .section-list li,
    .article-caption {
        font-size: 18px;
    }

    .sidebar-day {
        font-size: 52px;
    }
}

/* Mobile — max-width: 768px */
@media (max-width: 768px) {
    .article-hero {
        height: 260px;
    }

    .article-breadcrumb {
        font-size: 13px;
        padding: 0 16px;
    }

    .article-layout {
        grid-template-columns: 1fr;
        padding: 28px 16px 40px;
        gap: 0;
    }

    /* Sidebar nằm ngang, ẩn trên mobile (info đã có ở article-meta) */
    .article-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 20px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(20, 49, 58, 0.08);
        margin-bottom: 24px;
    }

    .sidebar-date {
        flex-direction: row;
        align-items: baseline;
        gap: 6px;
    }

    .sidebar-day {
        font-size: 40px;
    }

    .sidebar-month {
        font-size: 18px;
    }

    .sidebar-share-icons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Main article */
    .article-main {
        max-width: 100%;
        gap: 20px;
    }

    .article-title {
        font-size: 24px;
        line-height: 1.3;
    }

    /* Meta row: stack tác giả + share */
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-bottom: 16px;
    }

    .article-meta-share {
        gap: 8px;
    }

    /* Body content */
    .article-body {
        gap: 32px;
    }

    .section-heading,
    .section-paragraph,
    .section-list li,
    .article-caption {
        font-size: 16px;
    }

    .article-image-block {
        max-width: 100%;
    }
}

/* Small phones — max-width: 480px */
@media (max-width: 480px) {
    .article-hero {
        height: 200px;
    }

    .article-breadcrumb {
        font-size: 12px;
    }

    .article-layout {
        padding: 20px 12px 32px;
    }

    .article-sidebar {
        gap: 14px;
        padding-bottom: 16px;
        margin-bottom: 18px;
    }

    .sidebar-day {
        font-size: 34px;
    }

    .sidebar-month {
        font-size: 16px;
    }

    .article-title {
        font-size: 20px;
    }

    .article-body {
        gap: 24px;
    }

    .section-heading {
        font-size: 15px;
    }

    .section-paragraph,
    .section-list li,
    .article-caption {
        font-size: 15px;
    }

    .author-name,
    .author-date {
        font-size: 13px;
    }

    .author-avatar {
        width: 34px;
        height: 34px;
    }
}


/* =============================================
   Discover More Section [05]
   ============================================= */
.discover-section {
    padding: 80px 0 100px;
}

.discover-inner {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.discover-label {
    flex: 0 0 311px;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    color: #a4a4a4;
    font-family: var(--font-family);
    font-weight: 400;
}

.discover-label-num,
.discover-label-text {
    line-height: normal;
}

.discover-cards {
    flex: 1;
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.discover-card {
    width: 305px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.discover-card-image {
    width: 305px;
    height: 177px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    margin-bottom: 21px;
}

.discover-card--active .discover-card-image {
    border-color: #00ffa3;
    box-shadow: 0 4px 13.3px 0 rgba(0, 255, 163, 0.16);
}

.discover-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.discover-card:hover .discover-card-image img {
    transform: scale(1.05);
}

.discover-card:hover .discover-card-title {
    background: var(--gradient, linear-gradient(90deg, #19D08E 0%, #26FFB1 100%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.discover-card-text {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.discover-card-cat {
    font-size: 20px;
    font-family: var(--font-family);
    font-weight: 400;
    color: #064666;
    line-height: normal;
}

.discover-card:not(.discover-card--active) .discover-card-cat {
    color: #2f2f2f;
}

.discover-card-title {
    font-size: 20px;
    font-family: var(--font-family);
    font-weight: 700;
    color: #064666;
    line-height: normal;
}

.discover-card:not(.discover-card--active) .discover-card-title {
    color: #2f2f2f;
}

/* =============================================
   RESPONSIVE - Discover Section
   ============================================= */

@media (max-width: 1024px) {
    .discover-section {
        padding: 56px 0 64px;
    }

    .discover-inner {
        flex-direction: column;
        gap: 20px;
    }

    .discover-label {
        flex: none;
        width: 100%;
    }

    .discover-cards {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .discover-card {
        width: calc(50% - 8px);
    }

    .discover-card-image {
        width: 100%;
        height: auto;
        aspect-ratio: 305 / 177;
    }

    .discover-card-cat,
    .discover-card-title {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .discover-section {
        padding: 36px 0 48px;
    }

    .discover-cards {
        flex-direction: column;
        gap: 20px;
    }

    .discover-card {
        width: 100%;
    }

    .discover-card-image {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        margin-bottom: 14px;
    }

    .discover-card-cat,
    .discover-card-title {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .discover-section {
        padding: 28px 0 36px;
    }

    .discover-card-cat,
    .discover-card-title {
        font-size: 14px;
    }

    .discover-label {
        font-size: 14px;
    }
}