/* style/tin-tuc.css */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #ffffff;
    --bg-dark: #017439;
    --btn-register-bg: #C30808;
    --btn-login-bg: #C30808;
    --btn-font-color: #FFFF00;
}

.page-tin-tuc {
    font-family: 'Arial', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

.page-tin-tuc__section-title {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.2;
}

.page-tin-tuc__text-block {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 20px;
    color: var(--text-dark);
}

/* Hero Section */
.page-tin-tuc__hero-section {
    padding-top: 10px; /* Small top padding as body handles header offset */
    padding-bottom: 60px;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-tin-tuc__hero-container {
    max-width: 1170px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    padding: 0 16px;
}

.page-tin-tuc__hero-content {
    flex: 1 1 50%;
    min-width: 300px;
    order: 2; /* Content after image on desktop */
}

.page-tin-tuc__hero-image-wrapper {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
    order: 1; /* Image first on desktop */
}

.page-tin-tuc__hero-title {
    font-size: clamp(32px, 4.5vw, 56px);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-tin-tuc__hero-description {
    font-size: 19px;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-light);
}

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

/* Intro Section */
.page-tin-tuc__intro-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

/* News List Section */
.page-tin-tuc__news-list-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.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: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-tin-tuc__news-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.page-tin-tuc__news-image {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    object-fit: cover;
    display: block;
}

.page-tin-tuc__news-content {
    padding: 20px;
}

.page-tin-tuc__news-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.page-tin-tuc__news-card:hover .page-tin-tuc__news-title {
    color: #005f2c; /* Slightly darker green on hover */
}

.page-tin-tuc__news-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-tin-tuc__news-date {
    font-size: 14px;
    color: #777;
    display: block;
}

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

.page-tin-tuc__view-all-btn {
    display: inline-block;
    padding: 14px 28px;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-tin-tuc__view-all-btn:hover {
    background-color: #005f2c;
    transform: translateY(-2px);
}

/* CTA Section */
.page-tin-tuc__cta-section {
    padding: 80px 0;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.page-tin-tuc__cta-content-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.page-tin-tuc__cta-text-content {
    flex: 1 1 50%;
    min-width: 300px;
}

.page-tin-tuc__cta-section .page-tin-tuc__section-title {
    color: var(--text-light);
    text-align: left;
    margin-bottom: 25px;
}

.page-tin-tuc__cta-section .page-tin-tuc__text-block {
    color: var(--text-light);
    font-size: 18px;
    margin-bottom: 30px;
}

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

.page-tin-tuc__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-tin-tuc__btn-primary {
    background-color: var(--btn-register-bg); /* #C30808 */
    color: var(--btn-font-color); /* #FFFF00 */
    border: 2px solid var(--btn-register-bg);
}

.page-tin-tuc__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
    transform: translateY(-2px);
}

.page-tin-tuc__btn-secondary {
    background-color: transparent;
    color: var(--btn-font-color); /* #FFFF00 */
    border: 2px solid var(--btn-font-color); /* #FFFF00 */
}

.page-tin-tuc__btn-secondary:hover {
    background-color: rgba(255, 255, 0, 0.1);
    transform: translateY(-2px);
}

.page-tin-tuc__cta-image-wrapper {
    flex: 1 1 40%;
    min-width: 300px;
    text-align: center;
}

.page-tin-tuc__cta-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-tin-tuc__faq-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

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

.page-tin-tuc__faq-item {
    background-color: var(--secondary-color);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-tin-tuc__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none;
    position: relative;
    transition: background-color 0.3s ease;
}

.page-tin-tuc__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-tin-tuc__faq-item summary:hover {
    background-color: #f5f5f5;
}

.page-tin-tuc__faq-qtext {
    flex-grow: 1;
    padding-right: 15px;
}

.page-tin-tuc__faq-toggle {
    font-size: 24px;
    line-height: 1;
    width: 24px;
    text-align: center;
}

.page-tin-tuc__faq-answer {
    padding: 0 20px 20px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-tin-tuc__hero-title {
        font-size: clamp(30px, 4.5vw, 50px);
    }
    .page-tin-tuc__hero-description {
        font-size: 17px;
    }
    .page-tin-tuc__news-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .page-tin-tuc__container {
        padding: 15px;
    }

    .page-tin-tuc__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .page-tin-tuc__text-block {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Hero Section */
    .page-tin-tuc__hero-section {
        padding-top: 10px !important; /* Ensure small padding */
        padding-bottom: 40px;
    }

    .page-tin-tuc__hero-container {
        flex-direction: column;
        gap: 30px;
        padding: 0 15px;
    }

    .page-tin-tuc__hero-content {
        order: 1; /* Content first on mobile */
        text-align: center;
    }

    .page-tin-tuc__hero-image-wrapper {
        order: 2; /* Image second on mobile */
    }

    .page-tin-tuc__hero-title {
        font-size: 36px;
        text-align: center;
    }

    .page-tin-tuc__hero-description {
        font-size: 16px;
        text-align: center;
    }

    .page-tin-tuc__hero-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Intro Section */
    .page-tin-tuc__intro-section {
        padding: 40px 0;
    }

    /* News List Section */
    .page-tin-tuc__news-list-section {
        padding: 40px 0;
    }

    .page-tin-tuc__news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-tin-tuc__news-card {
        margin: 0 15px;
    }

    .page-tin-tuc__news-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    .page-tin-tuc__news-title {
        font-size: 20px;
    }

    .page-tin-tuc__news-excerpt {
        font-size: 15px;
        -webkit-line-clamp: 5;
    }

    .page-tin-tuc__view-all-btn {
        max-width: 100% !important;
        width: calc(100% - 30px) !important;
        padding: 12px 20px;
        font-size: 16px;
        margin: 0 15px;
        box-sizing: border-box;
    }

    /* CTA Section */
    .page-tin-tuc__cta-section {
        padding: 50px 0;
    }

    .page-tin-tuc__cta-content-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .page-tin-tuc__cta-text-content {
        text-align: center;
    }

    .page-tin-tuc__cta-section .page-tin-tuc__section-title {
        text-align: center;
        font-size: 28px;
    }

    .page-tin-tuc__cta-section .page-tin-tuc__text-block {
        font-size: 16px;
    }

    .page-tin-tuc__cta-buttons {
        flex-direction: column;
        align-items: center;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 15px;
        box-sizing: border-box !important;
    }

    .page-tin-tuc__cta-button {
        max-width: 100% !important;
        width: 100% !important;
        padding: 14px 20px;
        font-size: 16px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-tin-tuc__cta-image-wrapper {
        padding: 0 15px;
    }

    .page-tin-tuc__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* FAQ Section */
    .page-tin-tuc__faq-section {
        padding: 40px 0;
    }

    .page-tin-tuc__faq-item {
        margin: 0 15px 15px;
    }

    .page-tin-tuc__faq-item summary {
        font-size: 16px;
        padding: 15px;
    }

    .page-tin-tuc__faq-answer {
        font-size: 15px;
        padding: 0 15px 15px;
    }

    /* General image and button overrides for mobile */
    .page-tin-tuc img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    .page-tin-tuc__section,
    .page-tin-tuc__card,
    .page-tin-tuc__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-tin-tuc__cta-button,
    .page-tin-tuc__btn-primary,
    .page-tin-tuc__btn-secondary,
    .page-tin-tuc a[class*="button"],
    .page-tin-tuc a[class*="btn"] {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      white-space: normal !important;
      word-wrap: break-word !important;
      padding-left: 15px;
      padding-right: 15px;
    }
    
    .page-tin-tuc__cta-buttons,
    .page-tin-tuc__button-group,
    .page-tin-tuc__btn-container {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
      flex-wrap: wrap !important;
      gap: 10px;
      display: flex;
      flex-direction: column; /* Ensure vertical stacking on mobile */
    }
}