/* ==========================================
   PT MODERNLAND REALTY - NEWS DETAIL PAGE STYLES
   ========================================== */

/* === NEWS DETAIL SECTION === */
.news-detail-section {
    width: 100%;
    min-height: 100vh;
    padding: 80px 0 120px 0;
    background-color: #fafafa;
}

.news-detail-container {
    max-width: 1296px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    align-items: start;
}

/* === ARTICLE WRAPPER === */
.article-wrapper {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* === ARTICLE HEADER === */
.article-header {
    margin-bottom: 2.5rem;
}

.article-category-wrapper {
    margin-bottom: 1.5rem;
}

.article-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
}

.article-category-csr {
    background: #16a34a;
    color: white;
}
.article-category-corporate {
    background: #2563eb;
    color: white;
}
.article-category-e-magz {
    background: #dc2626;
    color: white;
}

.article-title {
    font-family: "Poppins", sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #000;
    margin: 0 0 1.5rem 0;
}

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #f4f4f5;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: #71717a;
}

.meta-icon {
    width: 20px;
    height: 20px;
    color: #a1a1aa;
}
.meta-separator {
    color: #d4d4d8;
    font-weight: 300;
}

/* === ARTICLE IMAGE === */
.article-image-wrapper {
    margin: 0 0 3rem 0;
    border-radius: 12px;
    overflow: hidden;
}

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

.image-caption {
    margin-top: 1rem;
    font-size: 0.875rem;
    font-style: italic;
    color: #71717a;
    text-align: center;
}

/* === ARTICLE CONTENT === */
.article-content {
    font-family: "Poppins", sans-serif;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #27272a;
    margin-bottom: 3rem;
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    color: #000;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.875rem;
    line-height: 1.3;
}
.article-content h3 {
    font-size: 1.5rem;
    line-height: 1.4;
}
.article-content h4 {
    font-size: 1.25rem;
    line-height: 1.5;
}

.article-content strong {
    font-weight: 600;
    color: #000;
}

.article-content a {
    color: #dc2626;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-content a:hover {
    color: #b91c1c;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid #dc2626;
    background: #fef2f2;
    font-style: italic;
    color: #52525b;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

/* === ARTICLE TAGS === */
.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    border-top: 2px solid #f4f4f5;
    border-bottom: 2px solid #f4f4f5;
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #52525b;
}

.tags-icon {
    width: 20px;
    height: 20px;
    color: #a1a1aa;
}

.tags-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-item {
    display: inline-block;
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #52525b;
    background: #f4f4f5;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-2px);
}

/* === ARTICLE ACTIONS === */
.article-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back,
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-back {
    background: white;
    color: #000;
    border: 2px solid #e4e4e7;
}

.btn-back:hover {
    border-color: #dc2626;
    color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.btn-share {
    background: #000;
    color: white;
}

.btn-share:hover {
    background: #27272a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* === SHARE MODAL === */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal.show {
    opacity: 1;
    visibility: visible;
}

.share-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-modal.show .share-modal-content {
    transform: scale(1);
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.share-modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.share-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-modal-close:hover {
    background: #e4e4e7;
}
.share-modal-close svg {
    width: 20px;
    height: 20px;
}

.share-modal-body {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    font-family: "Poppins", sans-serif;
    font-size: 0.9375rem;
    font-weight: 500;
    background: #f4f4f5;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-option:hover {
    background: #e4e4e7;
    transform: translateY(-2px);
}
.share-option[data-platform="facebook"]:hover {
    background: #1877f2;
    color: white;
}
.share-option[data-platform="twitter"]:hover {
    background: #1da1f2;
    color: white;
}
.share-option[data-platform="linkedin"]:hover {
    background: #0a66c2;
    color: white;
}
.share-option[data-platform="whatsapp"]:hover {
    background: #25d366;
    color: white;
}
.share-option[data-platform="copy"]:hover {
    background: #dc2626;
    color: white;
}

.share-icon {
    width: 24px;
    height: 24px;
}

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

.sidebar-section {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-family: "Poppins", sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #000;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 3px solid #dc2626;
    display: block;
}

/* ==========================================
   POPULAR NEWS CARDS
   ========================================== */
.popular-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Each item is now a full <a> link card */
.popular-news-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1.125rem 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none !important;
    color: inherit !important;
    transition:
        transform 0.25s ease,
        background 0.2s ease;
    border-radius: 8px;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.popular-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-news-item:first-child {
    padding-top: 0;
}

.popular-news-item:hover {
    transform: translateX(4px);
    background: #fafafa;
    text-decoration: none !important;
    color: inherit !important;
}

/* Thumbnail */
.popular-news-thumbnail {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f4f5;
}

.popular-news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.popular-news-item:hover .popular-news-img {
    transform: scale(1.08);
}

/* Info block */
.popular-news-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

/* Badge CSR / Corporate */
.popular-news-badge {
    display: inline-block;
    align-self: flex-start;
    padding: 0.2rem 0.6rem;
    font-family: "Poppins", sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 4px;
    color: white;
    line-height: 1.5;
}

.popular-news-badge-csr {
    background: #16a34a;
}
.popular-news-badge-corporate {
    background: #2563eb;
}

/* Title */
.popular-news-title {
    font-family: "Poppins", sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: #000 !important;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.popular-news-item:hover .popular-news-title {
    color: #dc2626 !important;
}

/* Date */
.popular-news-date {
    font-family: "Poppins", sans-serif;
    font-size: 0.75rem;
    color: #a1a1aa;
    font-weight: 400;
}

/* === RELATED NEWS (kept for future use) === */
.related-news-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.related-news-item {
    transition: transform 0.3s ease;
}
.related-news-item:hover {
    transform: translateX(8px);
}

.related-news-link {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.related-news-image-wrapper {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f4f5;
}

.related-news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-news-item:hover .related-news-image {
    transform: scale(1.1);
}

.related-news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.related-news-title {
    font-family: "Poppins", sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: #000;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.related-news-item:hover .related-news-title {
    color: #dc2626;
}
.related-news-date {
    font-size: 0.8125rem;
    color: #a1a1aa;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-wrapper {
    animation: fadeInUp 0.6s ease forwards;
}

.sidebar {
    animation: fadeInUp 0.6s ease 0.2s forwards;
    opacity: 0;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .news-detail-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .sidebar {
        position: static;
        opacity: 1;
        animation: none;
    }

    .article-title {
        font-size: 2rem;
    }
    .article-content {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .news-detail-section {
        padding: 60px 0 80px 0;
    }

    .news-detail-container {
        padding: 0 1rem;
        gap: 2rem;
    }

    .article-wrapper {
        padding: 2rem 1.5rem;
    }
    .article-title {
        font-size: 1.75rem;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .meta-separator {
        display: none;
    }
    .article-content h2 {
        font-size: 1.5rem;
    }
    .article-content h3 {
        font-size: 1.25rem;
    }

    .article-actions {
        flex-direction: column;
    }

    .btn-back,
    .btn-share {
        width: 100%;
        justify-content: center;
    }

    .share-modal-body {
        grid-template-columns: 1fr;
    }
    .sidebar-section {
        padding: 1.5rem;
    }

    .related-news-link {
        flex-direction: column;
    }

    .related-news-image-wrapper {
        width: 100%;
        height: 180px;
    }

    .popular-news-thumbnail {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.5rem;
    }
    .article-content {
        font-size: 0.9375rem;
    }
    .share-modal-content {
        padding: 1.5rem;
    }
}

/* === PRINT === */
@media print {
    .news-detail-section {
        padding: 0;
        background: white;
    }
    .article-actions,
    .sidebar,
    .share-modal {
        display: none;
    }
    .article-wrapper {
        box-shadow: none;
        padding: 0;
    }
}

/* === POPULAR NEWS NUMBER BADGE (overlay on thumbnail) === */
.popular-news-thumbnail {
    position: relative;
}

.popular-news-number {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background: #dc2626;
    color: white;
    font-family: "Poppins", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 6px 0;
    line-height: 1;
}
