/* style/news.css */

/* Custom properties for colors - derived from brand style */
:root {
    --primary-color: #FFD700; /* Gold */
    --secondary-color: #8B0000; /* Dark Red */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark-1: #0d0d0d; /* Assuming shared.css defines --dark-bg-1 */
    --bg-dark-2: #1a1a1a;
    --bg-light-1: #f8f8f8;
    --bg-light-2: #ffffff;
    --border-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.2);
}

/* Page specific styles - all must use .page-news__ prefix */
.page-news {
    /* Assuming body background is dark from shared.css (var(--dark-bg-1)) */
    color: var(--text-light); /* Light text on dark background */
    background-color: var(--bg-dark-1); /* Ensure content background matches body or is complementary */
    font-family: 'Arial', sans-serif; /* Example font */
    line-height: 1.6;
    padding-top: 120px; /* Desktop: Adjust for fixed header */
}

/* Responsive padding-top for mobile */
@media (max-width: 768px) {
    .page-news {
        padding-top: 100px !important; /* Mobile: Adjust for fixed header */
    }
}

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

/* Hero Section */
.page-news__hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #a02020 100%);
    padding: 80px 20px;
    text-align: center;
    border-bottom: 5px solid var(--primary-color);
}

.page-news__main-title {
    font-size: 3.2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px var(--shadow-color);
}

.page-news__description {
    font-size: 1.2em;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--text-dark); /* Dark text on gold button */
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: none;
    cursor: pointer;
    max-width: 100%; /* Responsive button */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    background: #e6c200; /* Darker gold */
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-news__cta-button--secondary {
    background: var(--secondary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.page-news__cta-button--secondary:hover {
    background: #6a0000; /* Darker red */
    border-color: var(--primary-color);
}

.page-news__cta-button--large {
    padding: 18px 50px;
    font-size: 1.3em;
}

/* Articles Section */
.page-news__articles-section {
    padding: 60px 0;
    background-color: var(--bg-dark-2); /* Slightly lighter dark background */
}

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

.page-news__section-subtitle {
    font-size: 1.1em;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__article-item {
    background-color: var(--bg-dark-1);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-news__article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-news__article-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.page-news__article-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

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

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

.page-news__article-excerpt {
    font-size: 0.95em;
    color: var(--text-light);
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Limit to 4 lines */
    -webkit-box-orient: vertical;
}

.page-news__article-date {
    font-size: 0.85em;
    color: #aaaaaa;
    display: block;
    text-align: right;
}

.page-news__pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page-news__pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-dark-1);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--primary-color);
}

.page-news__pagination-link:hover {
    background-color: var(--primary-color);
    color: var(--text-dark);
}

.page-news__pagination-link--active {
    background-color: var(--primary-color);
    color: var(--text-dark);
    cursor: default;
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
    background-color: var(--bg-dark-1);
}

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

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: var(--bg-dark-2);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
    border-bottom: 1px solid transparent; /* To prevent double border when active */
}

.page-news__faq-question:hover {
    background: #2a2a2a; /* Lighter dark-bg-2 */
}

.page-news__faq-item.active .page-news__faq-question {
    border-bottom: 1px solid var(--primary-color);
    background: #1f1f1f;
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.page-news__faq-item.active .page-news__faq-toggle {
    color: var(--text-light);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background-color: var(--bg-dark-1);
    color: var(--text-light);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 2000px !important; /* Sufficiently large to accommodate content */
    padding: 20px 25px !important;
    opacity: 1;
    border-radius: 0 0 8px 8px;
}

.page-news__faq-answer p {
    margin: 0;
    font-size: 1em;
    color: var(--text-light);
}

/* Contact CTA Section */
.page-news__contact-cta-section {
    background: var(--secondary-color);
    padding: 80px 20px;
    text-align: center;
    border-top: 5px solid var(--primary-color);
}

.page-news__contact-cta-section .page-news__section-title {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.page-news__contact-cta-section .page-news__description {
    max-width: 700px;
    margin: 0 auto 40px auto;
    color: var(--text-light);
}

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

@media (max-width: 768px) {
    .page-news__hero-section {
        padding: 60px 15px;
    }
    .page-news__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-news__description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        width: 100% !important; /* Ensure full width on mobile */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-news__cta-button--large {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    .page-news__articles-section {
        padding: 40px 0;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-news__section-subtitle {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-news__article-item {
        margin: 0 15px; /* Add horizontal margin for better spacing */
    }
    .page-news__article-title {
        font-size: 1.3em;
    }
    .page-news__article-image {
        height: 180px;
    }
    .page-news__article-list {
        gap: 20px;
    }

    .page-news__faq-section {
        padding: 40px 0;
    }
    .page-news__faq-list {
        margin: 0 15px;
    }
    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question h3 {
        font-size: 1em;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        width: 25px;
        height: 25px;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px !important;
    }

    .page-news__contact-cta-section {
        padding: 60px 15px;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.6em;
    }
    .page-news__article-list {
        grid-template-columns: 1fr; /* Single column layout for very small screens */
    }
    .page-news__article-image {
        height: auto; /* Allow image height to be auto for single column */
    }
    .page-news__article-item {
        margin: 0;
    }
}

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

/* Mobile image and container overrides for safety */
@media (max-width: 768px) {
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-news__hero-section,
    .page-news__articles-section,
    .page-news__faq-section,
    .page-news__contact-cta-section {
        padding-left: 0 !important; /* Sections themselves should not have horizontal padding if container has it */
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .page-news__article-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .page-news__article-list {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-news__faq-list {
        padding-left: 15px !important;
        padding-right: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}