/* Article detail page */

.article-detail-page {
    --ad-primary: var(--primary-color, #46837E);
    --ad-hover: var(--primary-hover, #3D726D);
    --ad-soft: var(--primary-soft, rgba(70, 131, 126, 0.1));
    --ad-light: var(--primary-light, #F0F7F6);
    --ad-text: var(--text-primary, #2D3748);
    --ad-muted: var(--text-muted, #5A6B8A);
    --ad-radius: 18px;
    --ad-border: rgba(70, 131, 126, 0.12);
    --ad-shadow: 0 10px 28px rgba(70, 131, 126, 0.07);
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(70, 131, 126, 0.1), transparent 55%),
        linear-gradient(180deg, #f7fbfa 0%, #ffffff 28%);
}

.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(70, 131, 126, 0.12);
    z-index: 9999;
}

.reading-progress-fill {
    height: 100%;
    width: 0;
    background: var(--ad-primary, #46837E);
    transition: width 0.1s ease;
}

.article-detail-hero {
    padding: 1.75rem 0 2.5rem;
    border-bottom: 1px solid rgba(70, 131, 126, 0.08);
}

.article-detail-breadcrumb {
    margin-bottom: 1.5rem;
}

.article-detail-breadcrumb .breadcrumb {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--ad-border);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 100%;
    margin: 0;
    box-shadow: 0 4px 14px rgba(70, 131, 126, 0.05);
    line-height: 1.2;
}

.article-detail-breadcrumb .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    float: none;
    padding: 0;
    color: var(--ad-muted);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
}

.article-detail-breadcrumb .breadcrumb-item a {
    color: inherit;
    text-decoration: none;
}

.article-detail-breadcrumb .breadcrumb-item a:hover {
    color: var(--ad-primary);
}

.article-detail-breadcrumb .breadcrumb-item.active {
    color: var(--ad-primary);
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-detail-breadcrumb .breadcrumb-item + .breadcrumb-item {
    padding-inline-start: 0;
}

.article-detail-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    float: none;
    display: inline-flex;
    align-items: center;
    padding: 0 0.55rem;
    color: rgba(70, 131, 126, 0.4);
    font-size: 0.8rem;
    line-height: 1;
}

.article-detail-hero__content {
    max-width: 820px;
}

.article-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    background: var(--ad-soft);
    color: var(--ad-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.article-detail-hero__title {
    margin: 0 0 1.25rem;
    font-size: clamp(1.8rem, 3.4vw, 2.7rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--ad-text);
    letter-spacing: -0.02em;
}

.article-detail-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1.25rem;
    color: var(--ad-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.article-detail-hero__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.article-detail-hero__meta i {
    color: var(--ad-primary);
}

.article-detail-author-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.article-detail-author-chip img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(70, 131, 126, 0.15);
}

.article-detail-author-chip strong {
    display: block;
    color: var(--ad-text);
    font-size: 0.92rem;
    line-height: 1.2;
}

.article-detail-author-chip small {
    color: var(--ad-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.article-detail-body {
    padding: 2.5rem 0 4.5rem;
}

.article-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}

.article-detail-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.article-detail-cover {
    border-radius: var(--ad-radius);
    overflow: hidden;
    border: 1px solid var(--ad-border);
    box-shadow: var(--ad-shadow);
    background: var(--ad-light);
    aspect-ratio: 16 / 9;
}

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

.article-detail-panel {
    background: #fff;
    border: 1px solid var(--ad-border);
    border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow);
    overflow: hidden;
}

.article-detail-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--ad-border);
    background: linear-gradient(180deg, #f8fcfb, #f2f8f7);
}

.article-detail-panel__head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ad-primary);
}

.article-detail-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #111;
}

.article-detail-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--ad-border);
    background: var(--ad-light);
}

.article-detail-stats > div {
    text-align: center;
}

.article-detail-stats strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ad-primary);
    line-height: 1.2;
}

.article-detail-stats span {
    color: var(--ad-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.article-detail-content,
.article-content {
    padding: 1.5rem 1.4rem 1.6rem;
    color: var(--ad-text);
    font-size: 1.05rem;
    line-height: 1.9;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--ad-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
}

.article-content h2 {
    font-size: 1.45rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid rgba(70, 131, 126, 0.15);
}

.article-content h3 {
    font-size: 1.2rem;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content p:last-child {
    margin-bottom: 0;
}

.article-content blockquote {
    margin: 1.75rem 0;
    padding: 1.15rem 1.25rem;
    border-inline-start: 4px solid var(--ad-primary);
    border-radius: 0 14px 14px 0;
    background: var(--ad-light);
    color: var(--ad-muted);
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 1.5rem 0;
    box-shadow: var(--ad-shadow);
}

.article-content ul,
.article-content ol {
    margin: 1.25rem 0;
    padding-inline-start: 1.4rem;
}

.article-content li {
    margin-bottom: 0.45rem;
}

.article-detail-tags,
.article-detail-share {
    padding: 1.25rem 1.4rem 1.4rem;
    border-top: 1px solid var(--ad-border);
}

.article-detail-tags h3,
.article-detail-share h3 {
    margin: 0 0 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ad-primary);
}

.article-detail-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-detail-tags__list span {
    display: inline-flex;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--ad-light);
    border: 1px solid var(--ad-border);
    color: var(--ad-text);
    font-size: 0.82rem;
    font-weight: 600;
}

.article-detail-share__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.article-detail-share__btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ad-border);
    background: #fff;
    color: var(--ad-primary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.article-detail-share__btn:hover {
    background: var(--ad-primary);
    border-color: var(--ad-primary);
    color: #fff;
    transform: translateY(-2px);
}

.article-detail-aside__sticky {
    position: sticky;
    top: 6.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.article-detail-author {
    background: #fff;
    border: 1px solid var(--ad-border);
    border-radius: var(--ad-radius);
    box-shadow: var(--ad-shadow);
    padding: 1.5rem 1.25rem;
    text-align: center;
}

.article-detail-author__avatar {
    display: inline-block;
    margin-bottom: 0.85rem;
}

.article-detail-author__avatar img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 22px rgba(70, 131, 126, 0.18);
}

.article-detail-author__name {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--ad-primary);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
}

.article-detail-author__name:hover {
    color: var(--ad-hover);
}

.article-detail-author__role,
.article-detail-author__degree {
    margin: 0;
    color: var(--ad-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

.article-detail-author__degree {
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.article-detail-author__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.15rem 0 1.2rem;
}

.article-detail-author__stats strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ad-primary);
}

.article-detail-author__stats span {
    color: var(--ad-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.article-detail-author__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    background: var(--ad-primary);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(70, 131, 126, 0.25);
    transition: background 0.2s ease, transform 0.2s ease;
}

.article-detail-author__cta:hover {
    background: var(--ad-hover);
    color: #fff;
    transform: translateY(-1px);
}

.article-detail-categories {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
}

.article-detail-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ad-text);
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.article-detail-categories a:hover {
    background: var(--ad-light);
    color: var(--ad-primary);
}

.article-detail-categories span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.article-detail-categories i {
    color: var(--ad-primary);
}

.article-detail-categories em {
    font-style: normal;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--ad-soft);
    color: var(--ad-primary);
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.article-detail-recent {
    list-style: none;
    margin: 0;
    padding: 0.4rem;
}

.article-detail-recent a {
    display: flex;
    gap: 0.75rem;
    padding: 0.7rem;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.article-detail-recent a:hover {
    background: var(--ad-light);
}

.article-detail-recent img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ad-light);
}

.article-detail-recent h3 {
    margin: 0 0 0.3rem;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--ad-text);
}

.article-detail-recent time {
    color: var(--ad-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .article-detail-layout {
        grid-template-columns: 1fr;
    }

    .article-detail-aside__sticky {
        position: static;
    }

    .article-detail-body {
        padding-top: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .article-detail-hero {
        padding-top: 1.25rem;
    }

    .article-detail-content,
    .article-content {
        padding: 1.2rem 1.05rem 1.3rem;
        font-size: 1rem;
    }

    .article-detail-stats {
        padding: 1rem;
    }
}
