/* style/news.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --dark-text-color: #333333;
    --light-text-color: #FFFFFF;
    --background-color: #FFFFFF;
    --login-button-color: #EA7C07;
    --border-color: #e0e0e0;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark-text-color);
    background-color: var(--background-color);
}

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

.page-news__section {
    padding: 40px 0;
    margin-bottom: 20px;
}

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

.page-news__section-description {
    font-size: 1.1em;
    color: var(--dark-text-color);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

/* Hero Section */
.page-news__hero-section {
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--background-color);
    color: var(--dark-text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-news__hero-section .page-news__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* Ensure main content width */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

.page-news__hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__main-title {
    font-size: clamp(2em, 4vw, 3.2em);
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
}

.page-news__description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--dark-text-color);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.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%);
    transform: translateY(-2px);
}

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

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

/* News Categories Section */
.page-news__news-categories .page-news__section-description {
    margin-bottom: 60px;
}

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

.page-news__category-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
}

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

.page-news__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 15px;
}

.page-news__card-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin: 0 20px 10px 20px;
    min-height: 48px; /* Ensure consistent height for titles */
}

.page-news__card-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-title a:hover {
    color: darken(var(--primary-color), 10%);
}

.page-news__card-text {
    font-size: 1em;
    color: var(--dark-text-color);
    padding: 0 20px;
    margin-bottom: 20px;
    flex-grow: 1;
}

.page-news__read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    margin-top: auto;
    padding: 0 20px;
}

.page-news__read-more:hover {
    text-decoration: underline;
}

.page-news__arrow {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.page-news__read-more:hover .page-news__arrow {
    transform: translateX(5px);
}

/* Benefits Section */
.page-news__benefits-section {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}

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

.page-news__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-news__benefit-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    transition: background-color 0.3s ease;
}

.page-news__benefit-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.page-news__benefit-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
}

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

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

/* Access Guide Section */
.page-news__access-guide .page-news__section-description {
    margin-bottom: 60px;
}

.page-news__guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: center;
}

.page-news__guide-item {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.page-news__guide-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 20px auto;
}

.page-news__guide-title {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-news__guide-text {
    font-size: 1em;
    color: var(--dark-text-color);
    flex-grow: 1;
}

.page-news__guide-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

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

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

/* FAQ Section */
.page-news__faq-section {
    background-color: var(--background-color);
    color: var(--dark-text-color);
}

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

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

.page-news__faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    color: var(--primary-color);
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

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

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

.page-news__faq-qtext {
    flex-grow: 1;
    pointer-events: none; /* Prevent text from interfering with summary click */
}

.page-news__faq-toggle {
    font-size: 1.5em;
    margin-left: 10px;
    transition: transform 0.3s ease;
    pointer-events: none; /* Prevent toggle icon from interfering with summary click */
}

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

.page-news__faq-answer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--dark-text-color);
    font-size: 1em;
}

/* Conclusion Section */
.page-news__conclusion-section {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
}

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

.page-news__conclusion-section .page-news__cta-button {
    margin-top: 30px;
}

/* --- Mobile Responsive Styles (max-width: 768px) --- */
@media (max-width: 768px) {
    .page-news__container {
        padding: 15px;
    }

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

    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    /* Hero Section */
    .page-news__hero-section {
        padding-top: 10px !important; /* Small top padding for mobile */
    }

    .page-news__hero-section .page-news__container {
        flex-direction: column;
        text-align: center;
    }

    .page-news__hero-image {
        max-height: 400px;
        object-fit: contain; /* Ensure image is fully visible, not cropped */
        aspect-ratio: unset; /* Remove fixed aspect ratio for mobile */
        margin-bottom: 20px;
    }

    .page-news__main-title {
        font-size: 1.8em;
    }

    .page-news__description {
        font-size: 1em;
    }

    /* Buttons in general */
    .page-news__cta-button,
    .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;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 10px;
    }

    .page-news__cta-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* News Categories Section */
    .page-news__category-grid {
        grid-template-columns: 1fr;
    }

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

    .page-news__card-title {
        font-size: 1.3em;
    }

    /* Benefits Section */
    .page-news__benefits-grid {
        grid-template-columns: 1fr;
    }

    .page-news__benefit-title {
        font-size: 1.5em;
    }

    /* Access Guide Section */
    .page-news__guide-steps {
        grid-template-columns: 1fr;
    }

    .page-news__guide-title {
        font-size: 1.3em;
    }

    /* General images and containers */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__category-card,
    .page-news__benefit-item,
    .page-news__guide-item,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* FAQ Section */
    .page-news__faq-item summary {
        font-size: 1em;
        padding: 15px;
    }

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

    .page-news__faq-toggle {
        font-size: 1.3em;
    }
}

/* Mobile Responsive Styles (max-width: 1024px) - Often similar to 768px, but ensuring tablet layouts are also covered */
@media (max-width: 1024px) {
    .page-news__container {
        padding: 20px;
    }

    .page-news__section-title {
        font-size: 2.2em;
    }

    .page-news__section-description {
        font-size: 1.05em;
    }

    .page-news__hero-image {
        max-height: 500px;
    }

    .page-news__main-title {
        font-size: clamp(2em, 4vw, 2.8em);
    }

    .page-news__description {
        font-size: 1.1em;
    }

    .page-news__category-grid,
    .page-news__benefits-grid,
    .page-news__guide-steps {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .page-news__card-image {
        height: 190px;
    }

    .page-news__card-title {
        font-size: 1.4em;
    }

    .page-news__benefit-title {
        font-size: 1.6em;
    }

    .page-news__guide-title {
        font-size: 1.4em;
    }

    .page-news__cta-buttons {
        flex-wrap: wrap;
        gap: 15px;
    }

    .page-news__btn-secondary {
        margin-left: 0;
    }

    /* Ensure images and containers are responsive */
    .page-news img {
        max-width: 100%;
        height: auto;
    }

    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__category-card,
    .page-news__benefit-item,
    .page-news__guide-item,
    .page-news__faq-item {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
}