/* style/news.css */

/* Base styles for the news page, ensuring text contrast with assumed light body background */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: var(--background-color, #ffffff); /* Inherit from shared or default to white */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column; /* Image up, text down */
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 20px 60px; /* Small top padding, more bottom padding */
    background-color: #f8f8f8; /* Light background for the section */
}

.page-news__hero-image-wrapper {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
}

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

.page-news__hero-content {
    max-width: 900px;
    margin: 0 auto;
    z-index: 1; /* Ensure content is above any potential background elements */
}

.page-news__main-title {
    font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
    font-weight: 700;
    color: #26A9E0; /* Brand color for main title */
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__description {
    font-size: 1.1em;
    color: #555555;
    margin-bottom: 30px;
}

/* Articles Section */
.page-news__articles-section {
    padding: 60px 20px;
    background-color: #ffffff; /* Explicitly white background for news articles */
    color: #333333;
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px; /* Added for mobile container padding */
    padding-right: 15px; /* Added for mobile container padding */
    box-sizing: border-box;
}

.page-news__section-title {
    font-size: 2.5em;
    color: #26A9E0;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-news__section-title--light {
    color: #ffffff;
}

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

.page-news__section-description--light {
    color: #f0f0f0;
}

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

.page-news__article-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-news__article-thumbnail {
    width: 100%;
    height: 225px; /* Fixed height for consistent card appearance */
    overflow: hidden;
}

.page-news__article-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.page-news__article-card:hover .page-news__article-thumbnail img {
    transform: scale(1.05);
}

.page-news__article-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.page-news__article-title {
    font-size: 1.4em;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    flex-grow: 1; /* Allow title to take available space */
}

.page-news__article-title a {
    color: #26A9E0; /* Brand color for article titles */
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__article-title a:hover {
    color: #1a7bb7; /* Slightly darker shade on hover */
}

.page-news__article-meta {
    font-size: 0.9em;
    color: #888888;
    margin-bottom: 15px;
}

.page-news__article-excerpt {
    font-size: 1em;
    color: #555555;
    margin-bottom: 20px;
}

.page-news__read-more {
    display: inline-flex;
    align-items: center;
    color: #26A9E0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.page-news__read-more:hover {
    color: #1a7bb7;
}

.page-news__read-more span {
    margin-left: 5px;
}

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

/* Promo Section */
.page-news__promo-section {
    background-color: #26A9E0; /* Brand color as dark background */
    color: #ffffff; /* White text for contrast */
    padding: 60px 20px;
    text-align: center;
}

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

/* Buttons */
.page-news__cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    max-width: 100%; /* Ensure button doesn't overflow */
}

.page-news__btn-primary {
    background: #EA7C07; /* Login color for primary action */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

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

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

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

/* --- Responsive Design --- */

/* Mobile adaptations (max-width: 768px) */
@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__hero-section {
        padding: 10px 15px 40px;
    }

    .page-news__main-title {
        font-size: clamp(1.8em, 8vw, 2.5em); /* Adjust H1 for mobile */
    }

    .page-news__description {
        font-size: 1em;
    }

    .page-news__articles-section,
    .page-news__promo-section {
        padding: 40px 15px;
    }

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

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

    .page-news__article-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
    }

    .page-news__article-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Lighter shadow for mobile */
    }

    .page-news__article-thumbnail {
        height: 180px; /* Adjust thumbnail height for mobile */
    }

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

    .page-news__article-excerpt {
        font-size: 0.95em;
    }

    .page-news__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
    }

    .page-news__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    /* Mobile image responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important; /* Ensure images take full width of their container */
        height: auto !important;
        display: block !important;
    }

    /* Mobile video responsiveness (if any, though not explicitly in news content) */
    .page-news video,
    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__video-section,
    .page-news__video-container,
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-news__video-section {
        padding-top: 10px !important; /* Small top padding for video section on mobile */
    }

    /* Mobile container responsiveness */
    .page-news__articles-section,
    .page-news__promo-section,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Tablet adaptations (max-width: 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .page-news__article-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns for tablets */
        gap: 25px;
    }

    .page-news__main-title {
        font-size: clamp(2.2em, 4.5vw, 3em);
    }
}