/* style/news.css */

/* Custom Colors */
:root {
    --color-primary: #11A84E; /* Main color */
    --color-secondary: #22C768; /* Auxiliary color */
    --color-button-gradient-start: #2AD16F;
    --color-button-gradient-end: #13994A;
    --color-card-bg: #11271B;
    --color-background: #08160F;
    --color-text-main: #F2FFF6;
    --color-text-secondary: #A7D9B8;
    --color-border: #2E7A4E;
    --color-glow: #57E38D;
    --color-gold: #F2C14E;
    --color-divider: #1E3A2A;
    --color-deep-green: #0A4B2C;
}

/* Base styles for the page content */
.page-news {
    background-color: var(--color-background); /* Dark background */
    color: var(--color-text-main); /* Light text for dark background */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Container for content sections */
.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Section titles */
.page-news__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: var(--color-text-main);
    line-height: 1.2;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Section descriptions */
.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-text-secondary);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles header offset */
    background-color: var(--color-deep-green); /* A slightly different dark green for the hero background */
    overflow: hidden; /* Ensure no overflow */
}

.page-news__hero-image {
    width: 100%;
    max-width: 1200px; /* Constrain image width */
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px; /* Space between image and content */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-news__hero-content {
    text-align: center;
    max-width: 900px;
    color: var(--color-text-main);
    z-index: 1;
}

.page-news__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive H1 font size */
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-gold); /* Using gold for main title for prominence */
    line-height: 1.2;
}

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

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

/* 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;
    cursor: pointer;
    box-sizing: border-box; /* Crucial for button responsiveness */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-news__btn-primary {
    background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--color-button-gradient-start);
    border: 2px solid var(--color-button-gradient-start);
}

.page-news__btn-secondary:hover {
    background-color: var(--color-button-gradient-start);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 80px 0;
    background-color: var(--color-background);
}

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

.page-news__news-card {
    background-color: var(--color-card-bg); /* Dark card background */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--color-text-main); /* Light text for dark card */
    border: 1px solid var(--color-border);
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__card-image {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__card-content {
    padding: 25px;
}

.page-news__card-title {
    font-size: 1.5em;
    margin-bottom: 10px;
    line-height: 1.3;
    min-height: 3.9em; /* Ensure consistent height for titles across cards */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--color-text-main);
}

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

.page-news__card-title a:hover {
    color: var(--color-secondary); /* Hover effect */
}

.page-news__card-date {
    font-size: 0.9em;
    color: var(--color-text-secondary);
    margin-bottom: 15px;
    display: block;
}

.page-news__card-excerpt {
    font-size: 1em;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
    min-height: 4.8em; /* Ensure consistent height for excerpts */
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-news__read-more {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.page-news__view-all {
    text-align: center;
    margin-top: 40px;
}

/* Dark Section styling for contrast */
.page-news__dark-section {
    background-color: var(--color-deep-green); /* Deeper green for contrast */
    padding: 80px 0;
}

.page-news__dark-section .page-news__section-title {
    color: var(--color-text-main); /* Ensure light text on dark background */
}

.page-news__dark-section .page-news__section-description {
    color: var(--color-text-secondary); /* Ensure light text on dark background */
}

/* Industry Insights Section */
.page-news__industry-insights-section {
    padding: 80px 0;
}

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

.page-news__insight-card {
    background-color: var(--color-card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.page-news__insight-title {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: var(--color-gold); /* Gold for titles */
}

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

/* Boss55 Updates Section */
.page-news__boss55-updates-section {
    padding: 80px 0;
    background-color: var(--color-background);
}

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

.page-news__update-item {
    background-color: var(--color-card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.page-news__update-title {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: var(--color-gold);
}

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

/* Promotions Section */
.page-news__promotions-section {
    padding: 80px 0;
}

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

.page-news__promo-card {
    background-color: var(--color-card-bg);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.page-news__promo-title {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: var(--color-gold);
}

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

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

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

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

.page-news__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    color: var(--color-text-main);
    background-color: var(--color-card-bg);
    border-bottom: 1px solid var(--color-divider);
    list-style: none; /* Remove default marker */
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-news__faq-question {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-news__faq-qtext {
    color: var(--color-text-main);
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--color-secondary);
    transition: transform 0.3s ease;
}

.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg); /* Rotate plus to cross */
}

.page-news__faq-answer {
    padding: 15px 25px 20px;
    font-size: 1em;
    color: var(--color-text-secondary);
}

/* CTA Section */
.page-news__cta-section {
    padding: 80px 0;
    text-align: center;
}

.page-news__cta-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
    margin: 40px auto;
    display: block;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-news__cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
    width: 100%; /* Ensure container takes full width */
    max-width: 500px; /* Limit max width for button group */
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    overflow: hidden;
}

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

@media (max-width: 768px) {
    .page-news__container,
    .page-news__hero-section,
    .page-news__latest-news-section,
    .page-news__industry-insights-section,
    .page-news__boss55-updates-section,
    .page-news__promotions-section,
    .page-news__faq-section,
    .page-news__cta-section {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
        padding-bottom: 40px !important;
    }

    .page-news__main-title {
        font-size: 2em; /* Smaller H1 for mobile */
    }

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

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

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-news__news-grid,
    .page-news__insights-grid,
    .page-news__update-grid,
    .page-news__promo-grid {
        grid-template-columns: 1fr;
    }

    .page-news__card-image,
    .page-news__cta-image,
    .page-news img { /* General image rule for mobile */
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .page-news__card-title {
        font-size: 1.3em;
        min-height: auto; /* Allow height to adjust */
        -webkit-line-clamp: unset; /* Remove line clamp on mobile if needed */
    }

    .page-news__card-excerpt {
        min-height: auto; /* Allow height to adjust */
        -webkit-line-clamp: unset; /* Remove line clamp on mobile if needed */
    }

    .page-news__faq-item summary {
        font-size: 1.1em;
        padding: 15px 20px;
    }

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

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

/* Ensure all images and video elements are responsive */
.page-news img,
.page-news video {
    max-width: 100%;
    height: auto;
    display: block;
    box-sizing: border-box;
}

/* Video specific styles, if any video were included */
.page-news__video-container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
}

.page-news__video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}