/* style/tin-tuc.css */

/* Custom properties for colors (if not already in shared.css) */
:root {
    --primary-color: #113B7A;
    --secondary-color: #1D5FD1;
    --card-bg: #10233F;
    --text-main: #F3F8FF;
    --text-secondary: #AFC4E8;
    --border-color: #244D84;
    --glow: #4FA8FF;
    --gold: #F2C14E;
    --divider: #1B3357;
    --deep-navy: #08162B;
}

/* Base styles for the page-tin-tuc */
.page-tin-tuc {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main, #F3F8FF); /* Light text on dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
    padding-bottom: 40px;
}

/* Container for content sections */
.page-tin-tuc__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Hero Section */
.page-tin-tuc__hero-section {
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px;
    text-align: center;
    background: linear-gradient(180deg, var(--deep-navy, #08162B) 0%, rgba(8, 22, 43, 0.8) 100%);
    position: relative;
    overflow: hidden;
}

.page-tin-tuc__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive font size */
    color: var(--text-main, #F3F8FF);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-tin-tuc__description {
    font-size: 1.15rem;
    color: var(--text-secondary, #AFC4E8);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-tin-tuc__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-tin-tuc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 100%; /* Ensure button fits container */
    box-sizing: border-box; /* Include padding and border in the element's total width */
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words */
    text-align: center;
}

.page-tin-tuc__btn--primary {
    background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    color: #ffffff;
    border: 2px solid transparent;
}

.page-tin-tuc__btn--primary:hover {
    background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(43, 115, 246, 0.4);
}

.page-tin-tuc__btn--secondary {
    background: var(--card-bg, #10233F);
    color: var(--text-main, #F3F8FF);
    border: 2px solid var(--border-color, #244D84);
}

.page-tin-tuc__btn--secondary:hover {
    background: var(--border-color, #244D84);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(36, 77, 132, 0.4);
}

/* General Section Title */
.page-tin-tuc__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: var(--text-main, #F3F8FF);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    line-height: 1.3;
}

/* Latest News Introduction */
.page-tin-tuc__latest-news-intro {
    padding: 60px 0;
    background-color: var(--card-bg, #10233F); /* Dark background for this section */
    border-bottom: 1px solid var(--divider, #1B3357);
}

.page-tin-tuc__latest-news-intro p {
    font-size: 1.05rem;
    color: var(--text-secondary, #AFC4E8);
    max-width: 900px;
    margin: 0 auto 20px auto;
    text-align: justify;
}
.page-tin-tuc__latest-news-intro p:last-of-type {
    margin-bottom: 0;
}

/* News Grid Section */
.page-tin-tuc__news-grid-section {
    padding: 60px 0;
}

.page-tin-tuc__articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-tin-tuc__article-card {
    background-color: var(--card-bg, #10233F);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-tin-tuc__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.page-tin-tuc__article-figure {
    margin: 0;
    line-height: 0;
    flex-shrink: 0;
}

.page-tin-tuc__article-figure img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px; /* Enforce min-size for images */
}

.page-tin-tuc__article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-tin-tuc__article-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-tin-tuc__article-title a {
    color: var(--text-main, #F3F8FF);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-tin-tuc__article-title a:hover {
    color: var(--glow, #4FA8FF);
}

.page-tin-tuc__article-date {
    font-size: 0.9rem;
    color: var(--text-secondary, #AFC4E8);
    margin-bottom: 15px;
    display: block;
}

.page-tin-tuc__article-excerpt {
    font-size: 1rem;
    color: var(--text-secondary, #AFC4E8);
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-tin-tuc__read-more-link {
    display: inline-block;
    color: var(--glow, #4FA8FF);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-tin-tuc__read-more-link:hover {
    text-decoration: underline;
    color: #ffffff;
}

/* Pagination */
.page-tin-tuc__pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-tin-tuc__pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: var(--card-bg, #10233F);
    color: var(--text-secondary, #AFC4E8);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #244D84);
}

.page-tin-tuc__pagination-link:hover,
.page-tin-tuc__pagination-link--active {
    background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(43, 115, 246, 0.3);
}

/* In-depth Article Section */
.page-tin-tuc__in-depth-article {
    padding: 60px 0;
    background-color: var(--deep-navy, #08162B);
}

.page-tin-tuc__article-wrap {
    max-width: 900px; /* Slightly narrower for long-form content */
    margin: 0 auto;
    padding: 0 20px;
}

.page-tin-tuc__in-depth-article p {
    font-size: 1.05rem;
    color: var(--text-secondary, #AFC4E8);
    margin-bottom: 20px;
    text-align: justify;
}

.page-tin-tuc__article-sub-title {
    font-size: 1.8rem;
    color: var(--text-main, #F3F8FF);
    font-weight: 600;
    margin: 40px 0 25px 0;
    line-height: 1.3;
}

.page-tin-tuc__in-depth-article figure {
    margin: 30px 0;
    text-align: center;
}

.page-tin-tuc__in-depth-article figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto;
    min-height: 200px; /* Enforce min-size for images */
}

.page-tin-tuc__conclusion {
    margin-top: 50px;
    text-align: center;
}

.page-tin-tuc__conclusion p {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 30px;
    color: var(--text-main, #F3F8FF);
}

/* Promo Banner Section */
.page-tin-tuc__promo-banner {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(90deg, var(--primary-color, #113B7A) 0%, var(--secondary-color, #1D5FD1) 100%);
    border-top: 1px solid var(--divider, #1B3357);
}

.page-tin-tuc__promo-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-tin-tuc__promo-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* Responsive styles */
@media (max-width: 1024px) {
    .page-tin-tuc__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .page-tin-tuc__description {
        font-size: 1.1rem;
    }
    .page-tin-tuc__section-title {
        font-size: clamp(1.6rem, 4vw, 2.5rem);
    }
}