/* style/news.css */

/* --- General Page Styles --- */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #FFFFFF); /* Ensure good contrast with body background */
}

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

.page-news__section-title {
    font-size: 2.5em;
    color: #26A9E0; /* Brand color for titles */
    text-align: center;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: inherit; /* Inherit color from parent section */
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust height as needed */
    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;
    filter: brightness(0.6); /* Darken image for better text contrast */
}

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Additional overlay for text readability */
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    color: #FFFFFF;
    max-width: 900px;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #FFFFFF;
    line-height: 1.2;
}

.page-news__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #F0F0F0;
}

/* --- Buttons --- */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
    background-color: #26A9E0; /* Main brand color */
    color: #FFFFFF;
    border: 2px solid #26A9E0;
    margin: 10px;
}

.page-news__btn-primary:hover {
    background-color: #1a88c7;
    border-color: #1a88c7;
}

.page-news__btn-secondary {
    background-color: #FFFFFF;
    color: #26A9E0; /* Main brand color */
    border: 2px solid #26A9E0;
    margin: 10px;
}

.page-news__btn-secondary:hover {
    background-color: #e0f2f7;
    color: #1a88c7;
    border-color: #1a88c7;
}

.page-news__hero-cta-button {
    margin-top: 20px;
}

/* --- Categories Section --- */
.page-news__categories-section {
    padding: 80px 0;
    background-color: #FFFFFF; /* Light background */
    color: #333333;
}

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

.page-news__category-card {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.page-news__card-title {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #26A9E0;
}

.page-news__card-title a {
    text-decoration: none;
    color: #26A9E0;
}

.page-news__card-title a:hover {
    text-decoration: underline;
}

.page-news__card-text {
    font-size: 1em;
    margin-bottom: 20px;
    color: #555555;
}

/* --- Featured Articles Section --- */
.page-news__featured-articles-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Dark background */
    color: #FFFFFF;
}

.page-news__featured-articles-section .page-news__section-title {
    color: #FFFFFF;
}

.page-news__featured-articles-section .page-news__section-description {
    color: #F0F0F0;
}

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

.page-news__article-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark section */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

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

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

.page-news__article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #FFFFFF;
    line-height: 1.3;
}

.page-news__article-title a {
    text-decoration: none;
    color: #FFFFFF;
}

.page-news__article-title a:hover {
    text-decoration: underline;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #F0F0F0;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* --- Video Section --- */
.page-news__video-section {
    padding: 80px 0;
    background-color: #FFFFFF;
    color: #333333;
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block; /* Ensure it takes full width */
    cursor: pointer;
}

/* --- Guides Section --- */
.page-news__guides-section {
    padding: 80px 0;
    background-color: #f0f8ff; /* Light blue background */
    color: #333333;
}

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

.page-news__guide-item {
    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__guide-item:hover {
    transform: translateY(-5px);
}

.page-news__guide-title {
    font-size: 1.6em;
    color: #26A9E0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__guide-text {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* --- FAQ Section --- */
.page-news__faq-section {
    padding: 80px 0;
    background-color: #26A9E0; /* Dark background */
    color: #FFFFFF;
}

.page-news__faq-section .page-news__section-title {
    color: #FFFFFF;
}

.page-news__faq-section .page-news__section-description {
    color: #F0F0F0;
}

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

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark section */
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    color: #FFFFFF;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.page-news__faq-title {
    margin: 0;
    color: #FFFFFF;
    font-size: 1.1em;
}

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

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg); /* Change + to X or - */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #F0F0F0;
    font-size: 0.95em;
}

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

.page-news__faq-answer p {
    margin: 0;
    color: #F0F0F0;
}

/* --- CTA Section --- */
.page-news__cta-section {
    padding: 80px 0;
    background-color: #FFFFFF;
    color: #333333;
    text-align: center;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__articles-grid,
    .page-news__categories-grid,
    .page-news__guides-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__hero-section {
        height: 500px;
        padding-top: var(--header-offset, 120px) !important; /* Important for mobile */
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-news__container {
        padding: 0 15px; /* Adjust padding for mobile */
    }

    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__article-card,
    .page-news__category-card,
    .page-news__guide-item,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden;
    }

    /* Mobile video responsiveness */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__video-wrapper {
        padding-bottom: 75% !important; /* Adjust aspect ratio for mobile if needed, e.g., 4:3 */
    }
    .page-news__video-section {
        padding-top: var(--header-offset, 120px) !important;
    }

    /* Mobile button responsiveness */
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 10px 0 !important;
    }
    .page-news__cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 10px 20px 20px 20px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-section {
        height: 400px;
    }
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
}