/* style/news.css */

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

.page-news {
    padding-top: var(--header-offset, 120px); /* Ensures content is below fixed header */
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.page-news__section-spacing {
    padding: 60px 0;
}

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

/* Hero Section */
.page-news__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 80px 20px;
}

.page-news__hero-content {
    max-width: 900px;
    margin-bottom: 40px;
}

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

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 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;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

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

.page-news__btn-primary:hover {
    background-color: darken(var(--login-color), 10%);
    border-color: darken(var(--login-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(--text-light);
}

/* Section Titles */
.page-news__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.page-news__section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--login-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: #555;
}

/* Articles Grid */
.page-news__articles-grid,
.page-news__analysis-grid,
.page-news__promos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.page-news__article-card,
.page-news__analysis-card,
.page-news__promo-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__article-card:hover,
.page-news__analysis-card:hover,
.page-news__promo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-news__article-image {
    width: 100%;
    height: 220px;
    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.4em;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

.page-news__article-title a:hover {
    color: var(--login-color);
}

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

.page-news__read-more-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    align-self: flex-start;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__read-more-btn:hover {
    background-color: darken(var(--primary-color), 10%);
}

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

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

.page-news__dark-section .page-news__section-description {
    color: rgba(255, 255, 255, 0.9);
}

.page-news__dark-section .page-news__article-card,
.page-news__dark-section .page-news__analysis-card {
    background-color: rgba(255, 255, 255, 0.1);
}

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

.page-news__dark-section .page-news__article-excerpt {
    color: rgba(255, 255, 255, 0.8);
}

.page-news__dark-section .page-news__read-more-btn {
    background-color: var(--login-color);
    color: var(--text-light);
}

.page-news__dark-section .page-news__read-more-btn:hover {
    background-color: darken(var(--login-color), 10%);
}

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

.page-news__faq-item {
    background-color: var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.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: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
}

.page-news__faq-item:last-child .page-news__faq-question {
    border-bottom: none;
}

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

.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: #555;
    font-size: 0.95em;
}

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

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

.page-news__faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Bottom CTA */
.page-news__cta-bottom {
    text-align: center;
    padding: 80px 20px;
}

.page-news__cta-bottom .page-news__section-title {
    color: var(--text-light);
}

.page-news__cta-bottom .page-news__section-description {
    color: rgba(255, 255, 255, 0.9);
}

.page-news__cta-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-news__cta-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

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

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

@media (max-width: 768px) {
    .page-news {
        padding-top: var(--header-offset, 120px) !important;
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__hero-section {
        padding: 60px 20px;
    }

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

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0;
        margin-bottom: 15px;
        padding: 12px 25px;
        font-size: 1em;
    }

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

    .page-news__section-spacing {
        padding: 40px 0;
    }

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

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

    .page-news__articles-grid,
    .page-news__analysis-grid,
    .page-news__promos-grid {
        grid-template-columns: 1fr;
    }

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

    .page-news__article-content {
        padding: 20px;
    }

    .page-news__article-title {
        font-size: 1.2em;
    }

    .page-news__faq-question {
        padding: 18px 20px;
        font-size: 1em;
    }

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

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

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

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

    /* Ensure all images are responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Ensure all image containers are responsive */
    .page-news__hero-image-wrapper,
    .page-news__article-card,
    .page-news__analysis-card,
    .page-news__promo-card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    .page-news__faq-list {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Specific override for hero section padding for mobile */
    .page-news__hero-section {
        padding-left: 15px;
        padding-right: 15px;
    }

}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }

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

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