/* style/news-platform-announcements.css */

/* --- Base Styles --- */
.page-news-platform-announcements {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light body background */
    background-color: var(--secondary-color); /* Assuming body background is light */
}

.page-news-platform-announcements__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-news-platform-announcements__section {
    padding: 60px 0;
    margin-bottom: 20px;
}

.page-news-platform-announcements__section-title {
    font-size: 36px;
    color: #017439; /* Brand color for titles */
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-news-platform-announcements__paragraph {
    font-size: 18px;
    text-align: justify;
    margin-bottom: 20px;
}

.page-news-platform-announcements__paragraph a {
    color: #017439;
    text-decoration: none;
    font-weight: bold;
}

.page-news-platform-announcements__paragraph a:hover {
    text-decoration: underline;
}

/* --- Hero Section --- */
.page-news-platform-announcements__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background-color: #f0f0f0; /* Light background for hero section */
}

.page-news-platform-announcements__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-news-platform-announcements__hero-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 30px;
}

.page-news-platform-announcements__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.page-news-platform-announcements__hero-title {
    font-size: 48px;
    color: #017439;
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 800;
}

.page-news-platform-announcements__hero-description {
    font-size: 20px;
    color: #555555;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news-platform-announcements__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #017439; /* Primary color */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 116, 57, 0.3);
}

.page-news-platform-announcements__cta-button:hover {
    background: #005a2e; /* Darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 116, 57, 0.4);
}

/* --- General Intro Section --- */
.page-news-platform-announcements__general-intro {
    background-color: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news-platform-announcements__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news-platform-announcements__grid-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.page-news-platform-announcements__grid-title {
    font-size: 24px;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news-platform-announcements__grid-text {
    font-size: 16px;
    color: #555555;
}

/* --- Recent Announcements Section --- */
.page-news-platform-announcements__recent-announcements {
    background-color: #f0f8f0; /* Light green background */
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news-platform-announcements__announcement-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news-platform-announcements__announcement-item {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news-platform-announcements__announcement-item:hover {
    transform: translateY(-5px);
}

.page-news-platform-announcements__announcement-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news-platform-announcements__announcement-item h3,
.page-news-platform-announcements__announcement-item p,
.page-news-platform-announcements__announcement-item a {
    padding: 0 25px;
}

.page-news-platform-announcements__announcement-title {
    font-size: 22px;
    color: #017439;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news-platform-announcements__announcement-date {
    font-size: 14px;
    color: #888888;
    margin-bottom: 15px;
}

.page-news-platform-announcements__announcement-excerpt {
    font-size: 16px;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1; /* Allows excerpt to take available space */
}

.page-news-platform-announcements__read-more-link {
    display: inline-block;
    color: #017439;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
    padding-left: 25px;
    padding-right: 25px;
}

.page-news-platform-announcements__read-more-link:hover {
    text-decoration: underline;
}

/* --- Guide Section --- */
.page-news-platform-announcements__guide-section {
    background-color: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news-platform-announcements__channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.page-news-platform-announcements__channel-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-news-platform-announcements__channel-icon {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-news-platform-announcements__channel-title {
    font-size: 22px;
    color: #017439;
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news-platform-announcements__channel-description {
    font-size: 16px;
    color: #555555;
}

.page-news-platform-announcements__call-to-action-text {
    text-align: center;
    margin-top: 40px;
    font-size: 18px;
    font-weight: bold;
}

/* --- FAQ Section --- */
.page-news-platform-announcements__faq-section {
    background-color: #f0f8f0;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news-platform-announcements__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ容器样式 */
.page-news-platform-announcements__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-news-platform-announcements__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 25px; /* Adjust padding for consistency */
    opacity: 0;
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-news-platform-announcements__faq-item.active .page-news-platform-announcements__faq-answer {
    max-height: 2000px !important; /* 🚨 Sử dụng !important đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
    padding: 20px 25px !important; /* Adjust padding for consistency */
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

/* Vấn đề FAQ */
.page-news-platform-announcements__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px; /* Adjust padding for consistency */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-news-platform-announcements__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-news-platform-announcements__faq-question:active {
    background: #eeeeee;
}

/* Tiêu đề vấn đề FAQ */
.page-news-platform-announcements__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Ngăn chặn thẻ h3 chặn sự kiện click */
    color: #333333;
}

/* Biểu tượng chuyển đổi */
.page-news-platform-announcements__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #017439; /* Brand color for toggle */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Ngăn chặn biểu tượng chặn sự kiện click */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-news-platform-announcements__faq-item.active .page-news-platform-announcements__faq-toggle {
    color: #005a2e; /* Darker green when active */
    transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}

/* --- Conclusion Section --- */
.page-news-platform-announcements__conclusion-section {
    background-color: #017439; /* Primary brand color background */
    color: #ffffff; /* White text for dark background */
    text-align: center;
    padding-top: 80px;
    padding-bottom: 80px;
}

.page-news-platform-announcements__conclusion-section .page-news-platform-announcements__section-title {
    color: #ffffff; /* White title for dark background */
}

.page-news-platform-announcements__conclusion-section .page-news-platform-announcements__paragraph {
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news-platform-announcements__conclusion-section .page-news-platform-announcements__paragraph a {
    color: #FFFF00; /* Yellow for links on dark background */
    text-decoration: underline;
}

.page-news-platform-announcements__button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news-platform-announcements__btn-primary {
    background: #C30808; /* Custom Register/Login button color */
    color: #FFFF00; /* Custom Register/Login font color */
    border: none;
    box-shadow: 0 4px 10px rgba(195, 8, 8, 0.3);
}

.page-news-platform-announcements__btn-primary:hover {
    background: #a30606; /* Darker red on hover */
    box-shadow: 0 6px 15px rgba(195, 8, 8, 0.4);
}

.page-news-platform-announcements__btn-secondary {
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-news-platform-announcements__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news-platform-announcements__hero-title {
        font-size: 40px;
    }

    .page-news-platform-announcements__hero-description {
        font-size: 18px;
    }

    .page-news-platform-announcements__section-title {
        font-size: 32px;
    }
}

@media (max-width: 768px) {
    /* --- General Mobile Styles --- */
    .page-news-platform-announcements {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news-platform-announcements__container {
        padding: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news-platform-announcements__section {
        padding: 40px 0;
    }

    .page-news-platform-announcements__section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .page-news-platform-announcements__paragraph {
        font-size: 16px;
        text-align: left; /* Adjust for mobile readability */
    }

    /* --- Hero Section Mobile --- */
    .page-news-platform-announcements__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news-platform-announcements__hero-title {
        font-size: 32px;
    }

    .page-news-platform-announcements__hero-description {
        font-size: 16px;
    }

    .page-news-platform-announcements__hero-image {
        border-radius: 4px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* --- Images Responsive --- */
    .page-news-platform-announcements img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block; /* Ensure images behave as block elements */
    }
    
    .page-news-platform-announcements__section,
    .page-news-platform-announcements__card,
    .page-news-platform-announcements__container,
    .page-news-platform-announcements__grid,
    .page-news-platform-announcements__announcement-list,
    .page-news-platform-announcements__channels,
    .page-news-platform-announcements__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news-platform-announcements__announcement-image {
        height: 200px; /* Adjust height for mobile */
    }

    .page-news-platform-announcements__channel-icon {
        width: 100px;
        height: 100px;
    }

    /* --- Buttons Responsive --- */
    .page-news-platform-announcements__cta-button,
    .page-news-platform-announcements__btn-primary,
    .page-news-platform-announcements__btn-secondary,
    .page-news-platform-announcements a[class*="button"],
    .page-news-platform-announcements 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: 12px 20px;
        font-size: 16px;
    }

    .page-news-platform-announcements__button-group {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* --- FAQ Mobile --- */
    .page-news-platform-announcements__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-news-platform-announcements__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-news-platform-announcements__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-news-platform-announcements__faq-answer {
        padding: 0 15px;
    }
    
    .page-news-platform-announcements__faq-item.active .page-news-platform-announcements__faq-answer {
        padding: 15px !important;
    }
}