/* style/tin-tuc.css */

/* --- General Styles --- */
.page-tin-tuc {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light body background */
    background-color: #ffffff; /* Assuming --secondary-color is white */
}

.page-tin-tuc__container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 16px;
    box-sizing: border-box;
}

.page-tin-tuc__section-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #017439;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-tin-tuc__section-title--white {
    color: #ffffff;
}

.page-tin-tuc__section-description {
    font-size: 1.1em;
    color: #555555;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Buttons --- */
.page-tin-tuc__btn-primary,
.page-tin-tuc__btn-secondary,
.page-tin-tuc__read-more-btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-align: center;
    box-sizing: border-box; /* Ensure padding doesn't push width */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-tin-tuc__btn-primary {
    background-color: #017439;
    color: #ffffff;
    border: 2px solid #017439;
}

.page-tin-tuc__btn-primary:hover {
    background-color: #005f2c;
    border-color: #005f2c;
}

.page-tin-tuc__btn-secondary {
    background-color: #ffffff;
    color: #017439;
    border: 2px solid #017439;
}

.page-tin-tuc__btn-secondary:hover {
    background-color: #e0e0e0;
    color: #017439;
}

.page-tin-tuc__read-more-btn {
    background-color: #017439;
    color: #ffffff;
    border: 1px solid #017439;
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 5px;
}

.page-tin-tuc__read-more-btn:hover {
    background-color: #005f2c;
    border-color: #005f2c;
}

/* Custom colors for Register/Login buttons (with contrast fix) */
.page-tin-tuc__btn-register {
    background-color: #C30808; /* Red */
    border-color: #C30808;
    color: #ffffff; /* White text for contrast */
}
.page-tin-tuc__btn-register:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-tin-tuc__btn-login {
    background-color: #C30808; /* Red */
    border-color: #C30808;
    color: #ffffff; /* White text for contrast */
}
.page-tin-tuc__btn-login:hover {
    background-color: #a00606;
    border-color: #a00606;
}


/* --- Hero Section --- */
.page-tin-tuc__hero-section {
    padding-top: 10px; /* Assuming shared.css handles body padding-top */
    padding-bottom: 60px;
    background-color: #f8f8f8;
}

.page-tin-tuc__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px 16px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-tin-tuc__hero-content {
    flex: 1 1 45%;
    min-width: 300px;
    text-align: left;
}

.page-tin-tuc__main-title {
    font-size: 2.8em;
    font-weight: 700;
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
    max-width: 600px; /* Prevent excessively long lines */
}

.page-tin-tuc__hero-description {
    font-size: 1.1em;
    color: #555555;
    margin-bottom: 30px;
    max-width: 550px;
}

.page-tin-tuc__cta-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Allow buttons to wrap */
}

.page-tin-tuc__hero-image {
    flex: 1 1 45%;
    min-width: 300px;
    text-align: center;
}

.page-tin-tuc__hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* --- News List Section --- */
.page-tin-tuc__news-list-section {
    padding: 60px 0;
    background-color: #ffffff; /* Light background for news */
}

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

.page-tin-tuc__news-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-tin-tuc__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-tin-tuc__news-thumbnail {
    width: 100%;
    height: 220px; /* Fixed height for thumbnails */
    overflow: hidden;
}

.page-tin-tuc__news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.page-tin-tuc__news-card:hover .page-tin-tuc__news-thumbnail img {
    transform: scale(1.05);
}

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

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

.page-tin-tuc__news-title a {
    color: #017439;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-tin-tuc__news-title a:hover {
    color: #005f2c;
}

.page-tin-tuc__news-meta {
    font-size: 0.9em;
    color: #888888;
    margin-bottom: 15px;
}

.page-tin-tuc__news-excerpt {
    font-size: 1em;
    color: #666666;
    margin-bottom: 20px;
    flex-grow: 1; /* Push read more button to bottom */
}

.page-tin-tuc__view-all-news {
    text-align: center;
    margin-top: 50px;
}


/* --- FAQ Section --- */
.page-tin-tuc__faq-section {
    padding: 60px 0;
    background-color: #017439; /* Dark background */
    color: #ffffff; /* White text */
}

.page-tin-tuc__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-tin-tuc__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-tin-tuc__faq-item summary {
    list-style: none; /* Hide default marker */
    cursor: pointer;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.page-tin-tuc__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit */
}

.page-tin-tuc__faq-item summary:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-tin-tuc__faq-qtext {
    flex-grow: 1;
}

.page-tin-tuc__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    width: 20px; /* Fixed width for consistent alignment */
    text-align: center;
}

.page-tin-tuc__faq-item[open] .page-tin-tuc__faq-toggle {
    content: "−"; /* Change to minus when open (JS will handle this) */
}

.page-tin-tuc__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #f0f0f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-tin-tuc__faq-item[open] .page-tin-tuc__faq-answer {
    max-height: 500px; /* Sufficiently large to show content */
    padding-top: 10px;
    transition: max-height 0.5s ease-in, padding 0.5s ease-in;
}

.page-tin-tuc__faq-answer p {
    margin: 0;
}

/* --- Promo CTA Section --- */
.page-tin-tuc__promo-cta-section {
    padding: 80px 0;
    background-color: #f8f8f8;
    text-align: center;
}

.page-tin-tuc__promo-cta-content {
    max-width: 800px;
}

.page-tin-tuc__promo-title {
    font-size: 2.2em;
    font-weight: 700;
    color: #017439;
    margin-bottom: 20px;
}

.page-tin-tuc__promo-description {
    font-size: 1.1em;
    color: #555555;
    margin-bottom: 40px;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
    .page-tin-tuc__main-title {
        font-size: 2.4em;
    }
    .page-tin-tuc__section-title {
        font-size: 2.2em;
    }
    .page-tin-tuc__promo-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    /* General Mobile Adjustments */
    .page-tin-tuc {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-tin-tuc__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden; /* Prevent content overflow */
    }

    /* HERO Section */
    .page-tin-tuc__hero-section {
        padding-top: 10px !important; /* Specific top padding */
        padding-bottom: 40px;
    }
    .page-tin-tuc__hero-container {
        flex-direction: column;
        padding: 30px 15px;
        gap: 30px;
    }
    .page-tin-tuc__hero-content {
        flex: 1 1 100%;
        text-align: center;
    }
    .page-tin-tuc__main-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-tin-tuc__hero-description {
        font-size: 1em;
        margin-bottom: 25px;
    }
    .page-tin-tuc__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%; /* Ensure button container takes full width */
    }
    .page-tin-tuc__hero-image {
        flex: 1 1 100%;
        order: -1; /* Image above text on mobile */
    }
    .page-tin-tuc__hero-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* News List Section */
    .page-tin-tuc__news-list-section {
        padding: 40px 0;
    }
    .page-tin-tuc__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-tin-tuc__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-tin-tuc__news-grid {
        grid-template-columns: 1fr; /* Single column layout */
        gap: 20px;
    }
    .page-tin-tuc__news-card {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }
    .page-tin-tuc__news-thumbnail {
        height: 180px; /* Adjust thumbnail height for mobile */
    }
    .page-tin-tuc__news-thumbnail img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-tin-tuc__news-title {
        font-size: 1.2em;
    }
    .page-tin-tuc__news-excerpt {
        font-size: 0.95em;
    }
    .page-tin-tuc__view-all-news {
        margin-top: 30px;
    }
    .page-tin-tuc__view-all-news .page-tin-tuc__btn-primary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }


    /* FAQ Section */
    .page-tin-tuc__faq-section {
        padding: 40px 0;
    }
    .page-tin-tuc__faq-item summary {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-tin-tuc__faq-toggle {
        font-size: 1.2em;
    }
    .page-tin-tuc__faq-answer {
        padding: 0 20px 15px;
        font-size: 0.95em;
    }

    /* Promo CTA Section */
    .page-tin-tuc__promo-cta-section {
        padding: 50px 0;
    }
    .page-tin-tuc__promo-title {
        font-size: 1.8em;
    }
    .page-tin-tuc__promo-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-tin-tuc__promo-cta-section .page-tin-tuc__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        width: 100%; /* Ensure button container takes full width */
    }
    .page-tin-tuc__promo-cta-section .page-tin-tuc__cta-buttons .page-tin-tuc__btn-primary,
    .page-tin-tuc__promo-cta-section .page-tin-tuc__cta-buttons .page-tin-tuc__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Universal Image Responsive */
    .page-tin-tuc img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
}