/* style/news.css */

/* Variables from shared.css */
:root {
    --primary-color: #0A192F; /* Dark blue */
    --secondary-color: #FFD700; /* Gold */
    --text-light: #ffffff;
    --text-dark: #333333;
    --background-dark: #000000;
    --background-light: #f5f5f5;
    --header-offset: 120px; /* Default desktop offset, will be updated by shared.js */
}

/* Base styles for the news page */
.page-news {
    background-color: var(--background-dark); /* Body background is dark, so use dark background */
    color: var(--text-light); /* Light text for dark background */
    padding-bottom: 80px; /* General padding for the bottom of the page */
}

/* Hero Section (H1 Title + CTA) */
.page-news__hero-section {
    position: relative;
    width: 100%;
    padding: 100px 20px 80px;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    background: var(--primary-color); /* Use primary color as background */
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
}

.page-news__hero-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-news__main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.2;
    color: var(--secondary-color); /* Gold title for prominence */
}

.page-news__hero-description {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    color: var(--text-light);
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    max-width: 100%; /* Ensure button doesn't overflow */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-news__cta-button--primary {
    background: var(--secondary-color); /* Gold background */
    color: var(--primary-color); /* Dark blue text */
}

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

.page-news__cta-button--secondary {
    background: transparent;
    color: var(--secondary-color); /* Gold text */
    border: 2px solid var(--secondary-color); /* Gold border */
}

.page-news__cta-button--secondary:hover {
    background: rgba(255, 215, 0, 0.1); /* Light gold transparent background */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Blog List Section */
.page-news__blog-section {
    padding: 80px 20px;
    background-color: var(--background-dark); /* Dark background */
    color: var(--text-light);
}

.page-news__blog-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-news__blog-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.page-news__blog-intro {
    font-size: 18px;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__blog-item {
    background-color: var(--primary-color); /* Dark blue background for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-light); /* Light text for card content */
}

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

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

.page-news__blog-item-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px; /* Ensure minimum size */
    min-height: 200px; /* Ensure minimum size */
}

.page-news__blog-item-content {
    padding: 25px;
}

.page-news__blog-item-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--secondary-color); /* Gold for article titles */
}

.page-news__blog-item-excerpt {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.page-news__blog-item-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.page-news__view-more-cta {
    text-align: center;
    margin-top: 60px;
}

/* Brand Introduction Section */
.page-news__brand-section {
    padding: 80px 20px;
    background-color: #1a2a44; /* Slightly lighter dark blue for contrast */
    color: var(--text-light);
}

.page-news__brand-container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-news__brand-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: var(--secondary-color);
}

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

.page-news__brand-item {
    background-color: var(--primary-color); /* Dark blue background for brand items */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--text-light);
}

.page-news__brand-item-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.page-news__brand-item p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.page-news__brand-advantages {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-news__brand-advantages li {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.page-news__brand-advantages li::before {
    content: '✅';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary-color); /* Gold checkmark */
}

.page-news__highlight {
    color: var(--secondary-color);
}

/* FAQ Section */
.page-news__faq-section {
    padding: 80px 20px;
    background-color: var(--background-dark); /* Dark background */
    color: var(--text-light);
}

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

.page-news__faq-main-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.page-news__faq-intro {
    font-size: 18px;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-light);
}

.page-news__faq-list {
    margin-top: 30px;
}

.page-news__faq-item {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    background-color: var(--primary-color); /* Dark blue for FAQ items */
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    color: var(--text-light);
}

.page-news__faq-question:hover {
    background: #1a2a44; /* Slightly lighter dark blue on hover */
    border-color: rgba(255, 255, 255, 0.2);
}

.page-news__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event on parent */
    color: var(--secondary-color); /* Gold for FAQ questions */
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--secondary-color); /* Gold for toggle icon */
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event on parent */
    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); /* White when active */
}

.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, opacity 0.4s ease;
    padding: 0 25px;
    opacity: 0;
    background: #1a2a44; /* Lighter dark blue for answer background */
    border-radius: 0 0 10px 10px;
    color: rgba(255, 255, 255, 0.9);
}

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

.page-news__faq-answer p {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    color: inherit;
}

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

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
        padding-bottom: 60px;
    }

    .page-news__hero-section {
        padding: 80px 15px 60px;
        padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    }

    .page-news__main-title {
        font-size: 32px;
        margin-bottom: 20px;
    }

    .page-news__hero-description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }

    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__blog-section,
    .page-news__brand-section,
    .page-news__faq-section {
        padding: 60px 15px;
    }

    .page-news__blog-title,
    .page-news__brand-title,
    .page-news__faq-main-title {
        font-size: 30px;
        margin-bottom: 15px;
    }

    .page-news__blog-intro,
    .page-news__faq-intro {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .page-news__blog-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__blog-item-image {
        height: 180px;
    }

    .page-news__blog-item-content {
        padding: 20px;
    }

    .page-news__blog-item-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .page-news__blog-item-excerpt {
        font-size: 15px;
    }

    .page-news__brand-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .page-news__brand-item {
        padding: 25px;
    }

    .page-news__brand-item-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .page-news__brand-item p,
    .page-news__brand-advantages li {
        font-size: 15px;
    }

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

    .page-news__faq-question h3 {
        font-size: 16px;
        width: calc(100% - 45px); /* Adjust width to make space for toggle */
    }

    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
        margin-left: 10px;
    }

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

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

    /* Ensure all images and containers are responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    .page-news__hero-container,
    .page-news__blog-container,
    .page-news__brand-container,
    .page-news__faq-container,
    .page-news__blog-item,
    .page-news__brand-item,
    .page-news__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden !important;
    }
}

/* Ensure content area images are not too small */
.page-news img {
  min-width: 200px;
  min-height: 200px;
}