/* CSS cho trang Tin tức */

/* Đảm bảo header hoạt động đúng với hiệu ứng cuộn xuống */
.header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background-color: #FFFFFF !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    height: 140px !important;
    transition: all 0.4s ease !important;
}

/* Hiệu ứng scrolled giống header gốc */
.header.scrolled {
    height: 70px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.header.scrolled .logo-container {
    height: 50px !important;
    padding: 0 !important;
}

.header.scrolled .logo img.logo-default {
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
}

.header.scrolled .logo img.logo-scrolled {
    opacity: 1 !important;
    visibility: visible !important;
    height: 48px !important;
}

.header.scrolled .main-nav {
    height: 30px !important;
}

/* Hiệu ứng header: logo trái, menu phải khi cuộn */
.header.scrolled .header-inner {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 100% !important;
    padding: 0 40px !important;
}

.header.scrolled .logo-container {
    justify-content: flex-start !important;
    align-items: center !important;
    width: auto !important;
    min-width: 120px !important;
    border-bottom: none !important;
    background: transparent !important;
    position: relative !important;
}

/* Di chuyển header-actions ra khỏi logo-container khi header thu nhỏ */
.header.scrolled .logo-container .header-actions {
    position: absolute !important;
    right: -120px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    gap: 10px !important;
    transition: all 0.3s ease !important;
}

.header.scrolled .main-nav {
    justify-content: flex-end !important;
    width: auto !important;
    flex: 1 !important;
    border-bottom: none !important;
    background: transparent !important;
    position: relative !important;
}

/* Đảm bảo dropdown menu hoạt động tốt khi header thu nhỏ */
.header.scrolled .dropdown-menu {
    top: 100% !important;
    margin-top: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-50%) translateY(10px) !important;
    transition: all 0.3s ease !important;
    z-index: 1002 !important;
}

.header.scrolled .nav-item.dropdown:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* Responsive cho header scrolled */
@media (max-width: 991.98px) {
    .header.scrolled {
        height: 60px !important;
    }
    
    .header.scrolled .logo-container {
        height: 40px !important;
    }
    
    .header.scrolled .header-inner {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 15px !important;
    }
    
    .header.scrolled .main-nav {
        width: auto !important;
        justify-content: flex-end !important;
        border-bottom: none !important;
        background: transparent !important;
        flex: unset !important;
    }
    
    .header.scrolled .logo-container {
        width: auto !important;
        min-width: unset !important;
        justify-content: flex-start !important;
        align-items: center !important;
        border-bottom: none !important;
        background: transparent !important;
    }
    
    .header.scrolled .logo img.logo-scrolled {
        height: 40px !important;
    }
    
    /* Trên mobile, giữ header-actions ở vị trí ban đầu */
    .header.scrolled .logo-container .header-actions {
        position: static !important;
        right: auto !important;
        top: auto !important;
        transform: none !important;
    }
    
    /* Đảm bảo dropdown menu hoạt động trên mobile khi header thu nhỏ */
    .header.scrolled .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }
}

/* CSS cho trang tin tức */
.hero-section {
    background: url("../images/banner-tintuc.png") no-repeat center center;
    background-size: cover;
    padding: 250px 0 150px;
    text-align: center;
    color: white;
    position: relative;
    margin-top: 140px !important;
    min-height: 600px;
}

.hero-content {
    display: none;
}

.nav-section {
    background: white;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 80px;
    z-index: 100;
}

.news-main-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0;
    flex-wrap: wrap;
}

.news-nav-item {
    background: transparent;
    border: 2px solid #e9ecef;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-nav-item:hover {
    border-color: #8B7355;
    color: #8B7355;
    transform: translateY(-2px);
}

.news-nav-item.active {
    background: linear-gradient(135deg, #8B7355 0%, #D4C5B2 100%);
    border-color: transparent;
    color: white;
}

.sub-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 32px;
    flex-wrap: wrap;
}

.sub-nav-item {
    background: white;
    border: 2px solid #e9ecef;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sub-nav-item:hover {
    border-color: #8B7355;
    color: #8B7355;
}

.sub-nav-item.active {
    background: #8B7355;
    border-color: #8B7355;
    color: white;
}

.news-section {
    padding: 80px 0;
    background: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.news-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image {
    transform: scale(1.05);
}

.news-content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-category {
    display: inline-block;
    background: linear-gradient(135deg, #8B7355 0%, #D4C5B2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    align-self: flex-start;
}

.news-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.4;
    min-height: 56px;
}

.news-excerpt {
    color: #6c757d;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    min-height: 48px;
}

.news-full-content {
    color: #495057;
    line-height: 1.7;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: justify;
    max-height: 200px;
    overflow: hidden;
    position: relative;
    flex-grow: 1;
}

.news-full-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #f1f3f4;
}

.news-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #9ca3af;
}

.read-more {
    background: linear-gradient(135deg, #8B7355 0%, #D4C5B2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    transform: translateY(-2px);
    color: white;
}

.read-more .fa-external-link-alt {
    margin-left: 8px;
    font-size: 12px;
    opacity: 0.8;
}

.read-more:hover .fa-external-link-alt {
    opacity: 1;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 60px;
}

.pagination-btn {
    background: white;
    border: 2px solid #e9ecef;
    color: #6c757d;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
}

.pagination-btn:hover {
    border-color: #8B7355;
    color: #8B7355;
}

.pagination-btn.active {
    background: linear-gradient(135deg, #8B7355 0%, #D4C5B2 100%);
    border-color: transparent;
    color: white;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 120px 0;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #8B7355;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 120px 0;
    color: #6c757d;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.empty-state p {
    font-size: 16px;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .hero-section {
        margin-top: 70px !important;
        padding: 200px 0 100px;
        min-height: 500px;
    }
    
    .nav-section {
        top: 70px;
    }
    
    .news-main-nav {
        gap: 6px;
        padding: 20px 0;
    }
    
    .news-nav-item {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Đảm bảo header responsive */
    .header {
        height: 70px !important;
    }
    
    .header .logo-container {
        height: 40px !important;
    }
    
    .header .logo img {
        height: 40px !important;
    }
    
    .sub-nav {
        gap: 8px;
        padding: 16px 0 24px;
    }
    
    .sub-nav-item {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-content {
        padding: 24px;
    }
} 