/* style/news.css */

/* Base Styles for News Page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #f8f9fa; /* A very light background for the overall page content */
}

/* Fixed Header Offset - applied to the first main content block */
/* This ensures the content starts below the fixed header */
.page-news__hero-section {
    padding-top: var(--header-offset, 120px);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #26A9E0, #1a7bbd); /* Brand color gradient */
    color: #ffffff; /* Light text for dark background */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 450px; /* Minimum height for hero section */
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.3; /* Slightly transparent to allow text to stand out */
}

.page-news__hero-section .page-news__container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 20px;
}

.page-news__main-title {
    font-size: 2.8em;
    margin-bottom: 15px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-news__intro-text {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #f0f0f0;
}

.page-news__cta-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.page-news__btn-primary {
    background-color: #EA7C07; /* Login button color */
    color: #ffffff;
    border: 2px solid transparent;
}

.page-news__btn-primary:hover {
    background-color: #d16e06;
}

.page-news__btn-secondary {
    background-color: #ffffff;
    color: #26A9E0; /* Brand primary color */
    border: 2px solid #26A9E0;
}

.page-news__btn-secondary:hover {
    background-color: #f0f0f0;
    color: #1a7bbd;
}

/* Content Area */
.page-news__content-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    background-color: #ffffff; /* White background for main content for contrast */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-top: -50px; /* Overlap with hero for visual flow */
    position: relative;
    z-index: 2;
}

.page-news__container {
    width: 100%;
    margin: 0 auto;
    max-width: 1160px; /* Inner max width */
}

.page-news__section {
    margin-bottom: 60px;
    padding: 30px 0;
}

.page-news__section-title {
    font-size: 2em;
    color: #26A9E0; /* Brand primary color */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #EA7C07; /* Login color for accent */
    border-radius: 2px;
}

/* Article Grid */
.page-news__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.page-news__article-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 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: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    min-height: 60px; /* Ensure consistent title height */
}

.page-news__article-title a {
    color: #26A9E0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #1a7bbd;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1; /* Allows excerpt to take available space */
}

.page-news__read-more-link {
    display: inline-block;
    color: #EA7C07;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    margin-top: auto; /* Pushes to bottom */
}

.page-news__read-more-link:hover {
    color: #d16e06;
    text-decoration: underline;
}

/* Why Choose Section */
.page-news__feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-news__feature-item {
    padding: 25px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

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

.page-news__feature-icon {
    width: 100%; /* Ensure image fills container */
    height: 200px; /* Fixed height for icons/images */
    object-fit: contain; /* Contain the image within the box */
    margin-bottom: 20px;
    border-radius: 5px;
}

.page-news__feature-heading {
    font-size: 1.4em;
    color: #26A9E0;
    margin-bottom: 10px;
}

.page-news__feature-text {
    color: #555555;
    font-size: 0.95em;
}

/* How to Use Section */
.page-news__description {
    text-align: center;
    font-size: 1.1em;
    color: #444444;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__list {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.page-news__list-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    background-color: #f0f8ff; /* Light blue background for list items */
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.page-news__list-icon {
    font-size: 1.5em;
    color: #26A9E0;
    margin-right: 15px;
    flex-shrink: 0;
}

.page-news__list-text {
    font-size: 1.05em;
    color: #333333;
}

/* FAQ Section */
.page-news__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__faq-item {
    background-color: #f9f9f9;
    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.15em;
    font-weight: bold;
    color: #333333;
    cursor: pointer;
    background-color: #eaf6ff; /* Lighter blue for question background */
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
    list-style: none; /* Remove default marker for summary */
}

.page-news__faq-item[open] > .page-news__faq-question {
    background-color: #dbeeff; /* Even lighter blue when open */
    border-bottom-color: transparent; /* Hide border when open */
}

/* Hide default details marker */
.page-news__faq-question::-webkit-details-marker {
    display: none;
}
.page-news__faq-question::marker {
    display: none;
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: #26A9E0;
}

.page-news__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    color: #555555;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0; /* Add border for visual separation */
}

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

/* Color Contrast Specific Styles */
.page-news__dark-bg {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.5em;
    }
    .page-news__intro-text {
        font-size: 1.1em;
    }
    .page-news__article-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        min-height: 350px;
        padding-left: 15px;
        padding-right: 15px;
        text-align: left; /* Align text left on mobile */
        justify-content: flex-start; /* Align content to start */
    }
    .page-news__hero-section .page-news__container {
        padding: 20px 0;
        text-align: left;
    }
    .page-news__main-title {
        font-size: 2em;
        text-align: left;
    }
    .page-news__intro-text {
        font-size: 1em;
        text-align: left;
    }
    .page-news__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-news__content-area {
        padding: 30px 15px;
        margin-top: -30px; /* Adjust overlap for mobile */
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-news__article-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__feature-grid {
        grid-template-columns: 1fr;
    }
    .page-news__list-item {
        padding: 10px 15px;
    }
    .page-news__faq-question {
        padding: 15px 20px;
        font-size: 1em;
    }
    .page-news__faq-answer {
        padding: 10px 20px 15px;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__hero-image {
        width: 100% !important;
        height: 100% !important;
    }
    /* All containing elements for images */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__article-card,
    .page-news__feature-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    /* Remove horizontal padding for elements that should span full width */
    .page-news__hero-section,
    .page-news__content-area {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .page-news__hero-section .page-news__container,
    .page-news__content-area .page-news__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}