/* ===========================================
   NEWS DETAIL PAGE STYLES
   =========================================== */

.page-news-detail {
    background-color: #F8F8F8;
}

/* ===========================================
   HERO SECTION
   =========================================== */

.news-detail-hero {
    position: relative;
    min-height: auto; height: min(620px, calc(90vh - var(--header-height)));
    overflow: hidden;
    background: linear-gradient(to bottom, #FCE300 calc(50vh - var(--header-height)), #F8F8F8 calc(50vh - var(--header-height)));
}

.news-detail-hero-bg {
    position: absolute;
    top: 0;
    left: 90px;
    right: 90px;
    width: auto;
    height: 100%;
}

.news-detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-detail-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.news-detail-hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: stretch;
    margin-left: 0;
}

.news-detail-hero-content {
    max-width: 862px;
    padding-left: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 60px;
    padding-bottom: 40px;
}

.news-detail-date {
    font-size: 16px;
    line-height: 16px;
    color: #fff;
    margin-bottom: 16px;
}

.news-detail-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 56px;
    color: #fff;
    margin-bottom: 24px;
}

.news-detail-tags {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.news-detail-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    font-size: 14px;
    line-height: 14px;
    color: #FCE300;
}

/* ===========================================
   BREADCRUMB SECTION
   =========================================== */

.news-detail-breadcrumb {
    padding: 30px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb a {
    font-size: 14px;
    line-height: 14px;
    color: #878787;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #3F3F3F;
}

.breadcrumb-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.breadcrumb-current {
    font-size: 14px;
    line-height: 14px;
    color: #000;
}

/* ===========================================
   CONTENT SECTION
   =========================================== */

.news-detail-content {
    padding: 0px 0 80px;
}

.news-detail-layout {
    display: flex;
    gap: 60px;
    max-width: 1400px;
}

/* ----------- Article ----------- */
.news-detail-article {
    flex: 0 0 calc(100% - 400px);

    position: relative;
}

/* Share Box on Hero */
.news-detail-share-hero {
    position: absolute;
    top: -280px;
    right: -290px;
    display: none;
}

.news-detail-share-hero .share-label {
    display: block;
    font-size: 14px;
    line-height: 14px;
    color: #F8F8F8;
    margin-bottom: 8px;
}

.news-detail-share-hero .share-icons {
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.6);
    padding: 16px;
    border-radius: 8px;
}

.news-detail-share-hero .share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.news-detail-share-hero .share-icon svg path {
    fill: #909090;
    transition: fill 0.2s;
}

.news-detail-share-hero .share-icon:hover svg path {
    fill: #FCE300;
}

/* Article Heading */
.article-heading {
    font-size: 32px;
    font-weight: 400;
    line-height: 40px;
    color: #3F3F3F;
    margin-bottom: 24px;
}

/* Article Text */
.article-text {
    font-size: 16px;
    font-weight: 300;
    line-height: 24px;
    color: #878787;
    margin-bottom: 32px;
}

/* Article Image */
.article-image {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.article-image img {
    width: 100%;
    object-fit: cover;
    display: block;
    max-height: 550px;
}

.article-image-dark {
    background: #000;
}

.article-image-dark img {
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
}

/* Share Bottom */
.article-share-bottom {
    margin-top: 60px;
}

.share-line {
    height: 1px;
    background: #E8E8E8;
    margin-bottom: 16px;
}

.share-line:last-child {
    margin-top: 16px;
    margin-bottom: 0;
}

.share-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.share-row .share-label {
    font-size: 14px;
    line-height: 14px;
    color: #909090;
}

.share-row .share-icons {
    display: flex;
    gap: 16px;
}

.share-row .share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.share-row .share-icon svg path {
    transition: fill 0.2s, stroke 0.2s;
}

.share-row .share-icon:hover svg path[fill] {
    fill: #3F3F3F;
}

.share-row .share-icon:hover svg path[stroke] {
    stroke: #3F3F3F;
}

/* ----------- Sidebar ----------- */
.news-detail-sidebar {
    flex: 1;
    max-width: 392px;
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
}

.sidebar-line {
    width: 20px;
    height: 2px;
    background: #3F3F3F;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 16px;
    color: #3F3F3F;
}

.sidebar-card {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: -27px 26px 11px 0px rgba(153, 153, 153, 0),
                -17px 17px 10px 0px rgba(153, 153, 153, 0.01),
                -10px 9px 8px 0px rgba(153, 153, 153, 0.05),
                -4px 4px 6px 0px rgba(153, 153, 153, 0.09),
                -1px 1px 3px 0px rgba(153, 153, 153, 0.1);
    max-height: 480px;
    overflow: hidden;
}

.sidebar-content {
    padding-right: 16px;
}

.sidebar-item {
    display: block;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #B4B4B4;
    margin-bottom: 24px;
    transition: color 0.2s;
    text-decoration: none;
}

.sidebar-item.active {
    color: #3F3F3F;
}

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

.sidebar-scrollbar {
    position: absolute;
    top: 32px;
    right: 16px;
    width: 4px;
    height: 120px;
    background: #D9D9D9;
    border-radius: 12px;
}

.sidebar-scrollbar-track {
    width: 100%;
    height: 40px;
    background: #3F3F3F;
    border-radius: 12px;
}

.sidebar-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
    border-radius: 0 0 12px 12px;
    pointer-events: none;
}

/* ===========================================
   RELATED ARTICLES SECTION
   =========================================== */

.news-detail-related {
    padding: 80px 0 120px;
    position: relative;
    overflow: hidden;
}

.related-bg-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 492px;
    height: 569px;
    background-image: url('../images/img-related-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    transform: scaleX(-1) scaleY(-1);
    pointer-events: none;
}

.related-header {
    margin-bottom: 48px;
    padding-left: 60px;
}

.related-line {
    display: inline-block;
    width: 20px;
    height: 2px;
    background: #3F3F3F;
    vertical-align: middle;
    margin-right: 8px;
}

.related-label {
    font-size: 16px;
    font-weight: 500;
    line-height: 16px;
    color: #3F3F3F;
}

.related-title {
    font-size: 48px;
    font-weight: 400;
    line-height: 56px;
    color: #3F3F3F;
    margin-top: 16px;
}

/* Related Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-left: 60px;
    padding-right: 60px;
}

/* News Card */
.news-detail-related .news-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: -27px 26px 11px 0px rgba(153, 153, 153, 0),
                -17px 17px 10px 0px rgba(153, 153, 153, 0.01),
                -10px 9px 8px 0px rgba(153, 153, 153, 0.05),
                -4px 4px 6px 0px rgba(153, 153, 153, 0.09),
                -1px 1px 3px 0px rgba(153, 153, 153, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.news-detail-related .news-card:hover {
    transform: translateY(-4px);
    box-shadow: -27px 30px 15px 0px rgba(153, 153, 153, 0.02),
                -17px 20px 14px 0px rgba(153, 153, 153, 0.04),
                -10px 12px 10px 0px rgba(153, 153, 153, 0.08),
                -4px 6px 8px 0px rgba(153, 153, 153, 0.12),
                -1px 2px 4px 0px rgba(153, 153, 153, 0.15);
}

.news-detail-related .news-card-image {
    width: 100%;
    aspect-ratio: 2 / 1.4;
    overflow: hidden;
}

.news-detail-related .news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s;
}

.news-detail-related .news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-detail-related .news-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 220px;
}

.news-detail-related .news-card-date {
    display: inline-block;
    padding: 4px 8px;
    background: #FCE300;
    border-radius: 4px;
    font-size: 14px;
    line-height: 14px;
    color: #3F3F3F;
    margin-bottom: 16px;
}

.news-detail-related .news-card-title {
    font-size: 20px;
    font-weight: 400;
    line-height: 26px;
    color: #3F3F3F;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-detail-related .news-card-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-top: auto;
}

.news-detail-related .news-card-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #3F3F3F;
    transition: background 0.2s, border-color 0.2s;
}

.news-detail-related .news-card-link:hover .news-card-link-icon {
    background: #FCE300;
    border-color: #FCE300;
}

.news-detail-related .news-card-link:hover .news-card-link-icon svg path {
    stroke: #000;
}

.news-detail-related .news-card-link-text {
    font-size: 16px;
    line-height: 16px;
    color: #3F3F3F;
}

/* Related Footer */
.related-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 48px;
    padding-right: 60px;
}

.btn-show-all {
    display: inline-flex;
    align-items: center;
    gap: 36px;
    padding: 20px 28px;
    background: #000;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-show-all span {
    font-size: 16px;
    line-height: 16px;
    color: #F8F8F8;
}

.btn-show-all:hover {
    background: #3F3F3F;
}

.btn-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

@media (max-width: 1280px) {
    .news-detail-hero-bg{
        left: 40px; right: 40px;
    }
    .news-detail-layout {
        padding-left: 0;
    }

    .breadcrumb {
        padding-left: 0;
    }

    .news-detail-hero-content {
        padding-left: 40px;
    }

    .news-detail-hero-decoration {
        left: 0;
    }

    .related-header {
        padding-left: 0;
    }

    .related-grid {
        padding-left: 0;
        padding-right: 0;
    }

    .related-footer {
        padding-right: 0;
    }

    .news-detail-share-hero {
        right: -260px;
    }
}

@media (max-width: 1100px) {
    .news-detail-layout {
        flex-direction: column;
    }

    .news-detail-article {
        flex: 1;
        max-width: 100%;
    }

    .news-detail-sidebar {
        max-width: 100%;
    }

    .news-detail-share-hero {
        position: static;
        margin-bottom: 40px;
    }

    .news-detail-share-hero .share-label {
        color: #878787;
    }

    .news-detail-share-hero .share-icons {
        background: #3F3F3F;
    }

    .sidebar-sticky {
        position: static;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-detail-hero {
        height: auto;
        min-height: 400px;
        background: linear-gradient(to bottom, #FCE300 280px, #F8F8F8 280px);
        overflow-x: hidden;
    }

    .news-detail-hero-bg {
        left: 20px;
        right: 20px;
    }

    .news-detail-hero .container {
        margin-left: 20px;
    }

    .news-detail-hero-content {
        padding-left: 24px;
        padding-right: 24px;
    }

    .news-detail-title {
        font-size: 28px;
        line-height: 36px;
    }

    .news-detail-meta {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .news-detail-breadcrumb {
        padding: 30px 0;
    }

    .article-content {
        padding: 40px 0 60px;
    }

    .article-heading {
        font-size: 22px;
        line-height: 30px;
        margin-top: 30px;
        margin-bottom: 16px;
    }

    .article-text {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .article-image {
        margin: 30px 0;
    }

    .related-section {
        padding: 40px 0;
    }

    .related-title {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 30px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .related-card-image img {
        height: 150px;
    }

    .related-card-body {
        padding: 16px;
    }

    .related-card-title {
        font-size: 14px;
    }

    .btn-show-all {
        width: 100%;
        justify-content: center;
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .news-detail-hero {
        min-height: 350px;
        background: linear-gradient(to bottom, #FCE300 240px, #F8F8F8 240px);
    }

    .news-detail-hero-bg {
        left: 16px;
        right: 16px;
    }

    .news-detail-hero .container {
        margin-left: 16px;
    }

    .news-detail-hero-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .news-detail-title {
        font-size: 24px;
        line-height: 32px;
    }

    .article-content {
        padding: 30px 0 40px;
    }

    .article-heading {
        font-size: 20px;
        line-height: 28px;
    }

    .article-text {
        font-size: 14px;
    }

    .related-title {
        font-size: 24px;
        line-height: 32px;
    }

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

    .related-card-image img {
        height: 180px;
    }
}
