/* style/news.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --dark-text-color: #333333;
    --light-text-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --bg-color: #FFFFFF;
    --black-color: #000000;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--light-text-color); /* Default text color for dark body background */
    background-color: var(--dark-bg-1); /* Inherited from shared.css */
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: var(--light-text-color);
}

.page-news__text-block {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--light-text-color);
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensure content is not hidden by fixed header */
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    color: var(--light-text-color);
    max-width: 900px;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--light-text-color);
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: var(--light-text-color);
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
    box-sizing: border-box;
    max-width: 100%;
}

.page-news__btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: 2px solid var(--primary-color);
}

.page-news__btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.page-news__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.page-news__btn-large {
    padding: 18px 35px;
    font-size: 1.2em;
}

/* Section Styling */
.page-news__intro-section,
.page-news__categories-section,
.page-news__security-section,
.page-news__faq-section {
    padding: 80px 0;
}

.page-news__highlights-section,
.page-news__analysis-guide-section,
.page-news__community-section,
.page-news__cta-section {
    padding: 80px 0;
    background-color: var(--primary-color);
}

.page-news__light-bg .page-news__section-title,
.page-news__light-bg .page-news__text-block,
.page-news__light-bg .page-news__card-title,
.page-news__light-bg .page-news__card-text,
.page-news__light-bg .page-news__category-title,
.page-news__light-bg .page-news__category-description,
.page-news__light-bg .page-news__list-item strong,
.page-news__light-bg .page-news__list-item,
.page-news__light-bg .page-news__faq-question,
.page-news__light-bg .page-news__faq-answer {
    color: var(--dark-text-color);
}

.page-news__light-bg {
    background-color: var(--secondary-color);
}

.page-news__dark-section {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

.page-news__dark-section .page-news__section-title {
    color: var(--light-text-color);
}

.page-news__dark-section .page-news__text-block {
    color: var(--light-text-color);
}

/* Card Grid */
.page-news__card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__card {
    background-color: rgba(255, 255, 255, 0.15); /* Slightly transparent white for contrast */
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: var(--light-text-color);
}

.page-news__card-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--light-text-color);
}

.page-news__card-text {
    font-size: 1em;
    color: var(--light-text-color);
}

/* Category Grid */
.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__category-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: var(--dark-text-color);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-news__category-card:hover {
    transform: translateY(-5px);
}

.page-news__category-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.page-news__category-card h3,
.page-news__category-card p {
    padding: 0 20px;
}

.page-news__category-title {
    font-size: 1.5em;
    margin: 20px 0 10px;
    color: var(--dark-text-color);
}

.page-news__category-description {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* List Styling */
.page-news__list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.page-news__list-item {
    background-color: rgba(255, 255, 255, 0.15);
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    color: var(--light-text-color);
}

.page-news__list-item::before {
    content: '✅';
    margin-right: 10px;
    font-size: 1.2em;
}

.page-news__cta-buttons {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* FAQ Section */
.page-news__faq-list {
    margin-top: 40px;
}

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: var(--dark-text-color);
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #f0f0f0;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--dark-text-color);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to contain content */
    padding: 15px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    color: var(--dark-text-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.2em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__hero-section {
        height: 60vh;
    }

    .page-news__hero-title {
        font-size: 2em;
    }

    .page-news__hero-description {
        font-size: 1em;
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-news__text-block {
        font-size: 1em;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-news__card-grid,
    .page-news__category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__category-image {
        height: 180px;
    }

    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1.1em;
    }

    .page-news__faq-answer {
        padding: 0 20px;
    }

    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px;
    }

    /* Mobile image and video responsiveness */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__container,
    .page-news__hero-content,
    .page-news__cta-section .page-news__container,
    .page-news__highlights-section .page-news__container,
    .page-news__categories-section .page-news__container,
    .page-news__analysis-guide-section .page-news__container,
    .page-news__security-section .page-news__container,
    .page-news__community-section .page-news__container,
    .page-news__faq-section .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden;
    }
    
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important; 
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.6em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__card,
    .page-news__category-card {
        padding: 20px;
    }
    .page-news__faq-question {
        font-size: 1em;
    }
}