/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Light text on dark body background */
    background-color: transparent; /* Body background is handled by shared.css */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    background: linear-gradient(135deg, #017439, #0a0a0a);
    min-height: 600px;
    overflow: hidden;
    color: #ffffff;
}

.page-news__hero-content {
    max-width: 700px;
    text-align: center;
    z-index: 1;
    position: relative;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-news__hero-title {
    font-size: 2.8em;
    margin-bottom: 20px;
    color: #FFFF00; /* Highlighted text color */
    line-height: 1.2;
}

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

.page-news__hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.page-news__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.page-news__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: brightness(0.7); /* Darken image for better text contrast */
}

/* General button styles */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    max-width: 100%; /* Ensure responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow long words to break */
}

.page-news__btn-primary {
    background-color: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid #C30808;
}

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

.page-news__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-news__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

.page-news__btn-text {
    color: #FFFF00;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__btn-text:hover {
    color: #017439;
}


/* General section styles */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 20px;
    color: #FFFF00;
}

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

/* Featured News Section */
.page-news__featured-news-section {
    background-color: #0a0a0a; /* Dark background as per body */
    padding: 60px 0;
    color: #ffffff; /* Light text */
}

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

.page-news__news-card {
    background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-news__news-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

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

.page-news__news-card-title {
    font-size: 1.4em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-news__news-card-title a {
    color: #FFFF00; /* Link color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__news-card-title a:hover {
    color: #017439;
}

.page-news__news-card-text {
    font-size: 0.95em;
    color: #f0f0f0;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Guides Section */
.page-news__guides-section {
    background-color: #017439; /* Brand color background */
    padding: 60px 0;
    color: #ffffff; /* Light text */
}

.page-news__light-text {
    color: #ffffff;
}

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

.page-news__guide-card {
    background-color: rgba(0, 0, 0, 0.2); /* Darker background for contrast */
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.page-news__guide-card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #FFFF00;
}

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

/* Safety Section */
.page-news__safety-section {
    background-color: #0a0a0a; /* Dark background */
    padding: 60px 0;
    color: #ffffff; /* Light text */
}

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

.page-news__safety-item {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__safety-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 5px;
}

.page-news__safety-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #FFFF00;
}

.page-news__safety-text {
    font-size: 1em;
    color: #f0f0f0;
}

/* FAQ Section */
.page-news__faq-section {
    background-color: #1a1a1a; /* Slightly lighter dark background */
    padding: 60px 0;
    color: #ffffff; /* Light text */
}

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

.page-news__faq-item {
    background-color: rgba(255, 255, 255, 0.08);
    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;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

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

.page-news__faq-question-text {
    font-size: 1.2em;
    margin: 0;
    color: #ffffff;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFFF00;
    transition: transform 0.3s ease;
}

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

.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: 1em;
}

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

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

/* Call to Action Section */
.page-news__cta-section {
    background: linear-gradient(to right, #017439, #0a0a0a);
    padding: 80px 20px;
    text-align: center;
    color: #ffffff;
}

.page-news__cta-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.page-news__cta-content {
    max-width: 800px;
}

.page-news__cta-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #FFFF00;
}

.page-news__cta-description {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: #f0f0f0;
}

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

.page-news__cta-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}


/* Responsive styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__cta-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        flex-direction: column;
        text-align: center;
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-news__hero-content {
        padding: 15px;
    }

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

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

    .page-news__hero-actions {
        flex-direction: column;
        gap: 15px;
    }

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

    .page-news__container {
        padding: 20px 15px;
    }

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

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

    .page-news__news-grid,
    .page-news__guide-grid,
    .page-news__safety-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__news-card-image,
    .page-news__safety-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

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

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

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

    .page-news__faq-question-text {
        font-size: 1em;
    }

    .page-news__faq-question {
        padding: 15px 20px;
    }

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

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

    .page-news__cta-section {
        padding: 50px 15px;
    }

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

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

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

    .page-news__cta-image {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Ensure all image containers are responsive */
    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__news-card,
    .page-news__guide-card,
    .page-news__safety-item,
    .page-news__faq-item,
    .page-news__cta-container,
    .page-news__hero-image-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }

    /* Specific padding for sections in mobile to prevent content touching edges */
    .page-news__featured-news-section .page-news__container,
    .page-news__guides-section .page-news__container,
    .page-news__safety-section .page-news__container,
    .page-news__faq-section .page-news__container,
    .page-news__cta-section .page-news__container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

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