/**
 * News Page - Newspaper Style (v2 - Phase 1)
 * HungLoc Property Template
 */

/* ========================================
   SECTION NAV
   ======================================== */
.section-nav {
    background: var(--white);
    border-bottom: 1px solid #e5e5e5;
}

.section-nav > .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.section-nav-list li a {
    display: block;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    min-height: 48px;
    box-sizing: border-box;
}

.section-nav-list li a:hover,
.section-nav-list li a.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.section-nav-search {
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: stretch;
    gap: 0;
    height: 38px;
}

.search-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 20px 0 0 20px;
    font-size: 13px;
    width: 180px;
    height: 100%;
    box-sizing: border-box;
}

.search-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.search-form button {
    padding: 8px 14px;
    background: var(--gold);
    border: none;
    border-radius: 0 20px 20px 0;
    color: white;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .section-nav-search {
        display: none;
    }
}

@media (max-width: 768px) {
    .section-nav > .container {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .section-nav-list {
        justify-content: flex-start;
    }
    
    .section-nav-list li a {
        padding: 14px 12px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .section-nav-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        scroll-padding-left: 16px;
    }
    
    .section-nav-list li a {
        padding: 14px 12px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .section-nav-list li a::after {
        display: none;
    }
}

/* ========================================
   MAIN LAYOUT
   ======================================== */
.page-content {
    background: #f8f9fa;
    padding: 24px 0 40px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: static;
}

@media (min-width: 993px) {
    .sidebar-column {
        position: sticky;
        top: 90px;
        align-self: flex-start;
    }
}

@media (max-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-column {
        order: -1;
    }
}

/* ========================================
   LEAD ARTICLE
   ======================================== */
.lead-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lead-article-image {
    position: relative;
    height: 420px;
    overflow: hidden;
}

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

.news-card-category-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
}

.news-card-category-label a {
    background: var(--gold);
    color: white;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lead-article-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lead-title {
    font-size: 28px;
    line-height: 1.25;
    margin-bottom: 14px;
}

.lead-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.lead-title a:hover {
    color: var(--gold);
}

.lead-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.lead-meta .author {
    color: var(--gold);
    font-weight: 600;
}

.lead-meta .separator {
    margin: 0 10px;
    color: #ddd;
}

.lead-meta .read-time i {
    margin-right: 4px;
}

.lead-summary {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 18px;
}

.lead-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.btn-read-more {
    color: var(--gold);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-read-more i {
    margin-left: 6px;
    transition: transform 0.2s;
}

.btn-read-more:hover i {
    transform: translateX(4px);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}

.article-share button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.article-share button:hover {
    background: var(--gold);
    color: white;
}

@media (max-width: 992px) {
    .lead-article {
        grid-template-columns: 1fr;
    }
    
    .lead-article-image {
        height: 280px;
    }
    
    .lead-title {
        font-size: 24px;
    }
}

/* ========================================
   SUB LEADS
   ======================================== */
.sub-leads {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.sub-article {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.sub-article-image {
    position: relative;
    height: 130px;
    overflow: hidden;
}

.sub-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sub-article:hover .sub-article-image img {
    transform: scale(1.05);
}

.sub-article-image .article-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gold);
    color: white;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
}

.sub-article-content {
    padding: 12px;
}

.sub-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.sub-meta a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.sub-article h3 {
    font-size: 15px;
    line-height: 1.4;
}

.sub-article h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.sub-article h3 a:hover {
    color: var(--gold);
}

@media (max-width: 768px) {
    .sub-leads {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   LATEST NEWS LIST
   ======================================== */
.latest-news-section,
.articles-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.section-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

.news-list {
    display: flex;
    flex-direction: column;
}

.news-list-item {
    display: flex;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-time {
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    min-width: 48px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(198, 168, 124, 0.12);
    border-radius: 4px;
    text-align: center;
}

.news-list-content h4 {
    font-size: 15px;
    line-height: 1.4;
    margin-top: 4px;
}

.news-list-content h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.news-list-content h4 a:hover {
    color: var(--gold);
}

/* ========================================
   ARTICLES GRID
   ======================================== */
.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-card-item {
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.news-card-thumb {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.thumb-date {
    position: absolute;
    bottom: 0;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
}

.news-card-body {
    padding: 12px;
    background: #fafafa;
}

.news-card-cat {
    font-size: 11px;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
}

.news-card-body h4 {
    font-size: 15px;
    line-height: 1.35;
    margin: 8px 0;
}

.news-card-body h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.news-card-body h4 a:hover {
    color: var(--gold);
}

.news-card-body p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-footer {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

.news-card-footer i {
    margin-right: 4px;
}

@media (max-width: 992px) {
    .news-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .news-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   PAGINATION
   ======================================== */
.content-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-btn {
    min-width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--gold);
    color: var(--gold);
}

.page-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: white;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #999;
}

/* ========================================
   WIDGETS
   ======================================== */
.widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--gold);
}

/* Market Widget */
.market-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.market-row:last-child {
    border-bottom: none;
}

.row-label {
    font-size: 13px;
    color: #666;
}

.row-value {
    font-weight: 600;
    color: var(--primary-color);
}

.row-change {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
}

.row-change.up {
    background: #e8f5e9;
    color: #2e7d32;
}

.row-change.down {
    background: #ffebee;
    color: #c62828;
}

/* Most Read Widget */
.most-read-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.most-read-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
    counter-increment: list-counter;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.most-read-list li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    width: 22px;
}

.most-read-list li a {
    display: block;
    padding-left: 28px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--primary-color);
    text-decoration: none;
    flex: 1;
}

.most-read-list li a:hover {
    color: var(--gold);
}

.view-count {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.view-count i {
    margin-right: 4px;
}

/* New Posts Widget - Tin moi */
.new-posts-widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.new-posts-widget .widget-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.new-posts-widget .widget-title i {
    color: var(--gold);
}

.new-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.new-post-item {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.new-post-thumb {
    width: 60px;
    height: 45px;
    min-width: 60px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5f5;
}

.new-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.new-post-content {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

.new-post-content a {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin: 0;
}

.new-post-content a:hover {
    color: var(--gold);
}

.new-post-time {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

@media (max-width: 576px) {
    .new-post-thumb {
        width: 50px;
        height: 38px;
        min-width: 50px;
    }
    
    .new-post-content a {
        font-size: 12px;
    }
}

/* Newsletter Widget */
.widget-newsletter p {
    font-size: 14px;
    color: #666;
    margin-bottom: 14px;
}

.newsletter-form input {
    width: 100%;
    max-width: 100%;
    /* padding: 12px 14px; */
    border: 1px solid #ddd;
    border-radius: 4px;
    /* margin-bottom: 10px; */
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-submit {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    background: var(--gold);
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s;
}

.btn-submit:hover {
    background: #b8966a;
}

/* Ads Widget */
.widget-ads {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.ads-placeholder {
    color: #bbb;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Force remove sticky on mobile */
@media (max-width: 992px) {
    .sidebar-column {
        position: static !important;
    }
}