/* style/news.css */

/* Base styles for the news page */
.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default text color for light backgrounds */
    background-color: #f8f8f8; /* Light background for the page */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

.page-news__section {
    padding: 60px 0;
    margin-bottom: 20px;
}

.page-news__dark-bg {
    background-color: #26A9E0; /* Primary brand color */
    color: #ffffff;
}

.page-news__light-bg {
    background-color: #ffffff;
    color: #333333;
}

.page-news__section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: inherit; /* Inherit color from parent section */
}

.page-news__section-description {
    font-size: 18px;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: inherit; /* Inherit color from parent section */
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 60px; /* Adjusted padding as top is handled by --header-offset */
    overflow: hidden;
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Ensure content is above any potential background effects */
}

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.page-news__main-heading {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #ffffff;
    line-height: 1.2;
}

.page-news__sub-heading {
    font-size: 20px;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button - Primary */
.page-news__cta-button,
.page-news__btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: #EA7C07; /* Login color for primary action */
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

/* Secondary Button */
.page-news__btn-secondary {
    display: inline-block;
    padding: 10px 25px;
    background: #ffffff;
    color: #26A9E0; /* Primary brand color for text */
    text-decoration: none;
    border: 2px solid #26A9E0;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-news__btn-secondary:hover {
    background: #26A9E0;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Articles Grid */
.page-news__articles-grid,
.page-news__promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

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

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

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

.page-news__article-image,
.page-news__promo-image {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__article-title,
.page-news__promo-title {
    font-size: 22px;
    font-weight: bold;
    padding: 15px 20px 10px;
    margin: 0;
    color: #26A9E0; /* Primary brand color for titles */
}

.page-news__article-excerpt,
.page-news__promo-excerpt {
    font-size: 16px;
    padding: 0 20px 15px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__read-more {
    margin: 0 20px 20px;
    align-self: flex-start; /* Align button to start */
}

/* Articles List */
.page-news__articles-list {
    margin-top: 40px;
}

.page-news__list-item {
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.page-news__list-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333333;
    padding: 15px;
}

.page-news__list-image {
    width: 200px; /* Minimum size 200x200 */
    height: 112px; /* Maintain aspect ratio for 800x450 */
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
    flex-shrink: 0;
}

.page-news__list-content {
    flex-grow: 1;
}

.page-news__list-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #26A9E0;
}

.page-news__list-excerpt {
    font-size: 15px;
    margin: 0;
    color: #555555;
}

/* Floating Buttons */
.page-news__floating-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-news__floating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-width: 120px; /* Ensure button is not too small */
}

.page-news__floating-register {
    background-color: #EA7C07; /* Login color */
}

.page-news__floating-register:hover {
    background-color: #d66f06;
    transform: translateY(-2px);
}

.page-news__floating-login {
    background-color: #26A9E0; /* Primary brand color */
}

.page-news__floating-login:hover {
    background-color: #1f8ec4;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__section-title {
        font-size: 30px;
    }

    .page-news__main-heading {
        font-size: 40px;
    }

    .page-news__sub-heading {
        font-size: 18px;
    }

    .page-news__articles-grid,
    .page-news__promo-grid {
        gap: 20px;
    }

    .page-news__article-title,
    .page-news__promo-title {
        font-size: 20px;
    }

    .page-news__list-item {
        flex-direction: column;
        text-align: center;
    }

    .page-news__list-link {
        flex-direction: column;
        align-items: center;
    }

    .page-news__list-image {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        height: auto; /* Allow height to adjust */
        max-width: 400px; /* Limit max width on tablets */
    }
}

@media (max-width: 768px) {
    .page-news {
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__section {
        padding: 40px 0;
    }

    .page-news__section-title {
        font-size: 26px;
        margin-bottom: 15px;
    }

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

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

    .page-news__main-heading {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-news__sub-heading {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-news__cta-button,
    .page-news__btn-primary,
    .page-news__btn-secondary,
    .page-news a[class*="button"],
    .page-news a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    .page-news__cta-buttons,
    .page-news__button-group,
    .page-news__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }
    
    .page-news__articles-grid,
    .page-news__promo-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-news__article-card,
    .page-news__promo-card {
        margin-bottom: 15px;
    }

    .page-news__article-image,
    .page-news__promo-image {
        height: 180px;
    }

    .page-news__article-title,
    .page-news__promo-title {
        font-size: 18px;
        padding: 12px 15px 8px;
    }

    .page-news__article-excerpt,
    .page-news__promo-excerpt {
        font-size: 14px;
        padding: 0 15px 12px;
    }

    .page-news__list-link {
        padding: 10px;
    }

    .page-news__list-image {
        width: 100% !important; /* Force full width on mobile */
        height: auto !important;
        max-width: 100% !important;
        margin-bottom: 10px;
    }

    .page-news__list-title {
        font-size: 18px;
    }

    .page-news__list-excerpt {
        font-size: 14px;
    }

    /* Images within content area must be at least 200px if not full width */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Floating buttons for mobile */
    .page-news__floating-buttons {
        flex-direction: row;
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        bottom: 15px;
        justify-content: space-around;
        gap: 10px;
    }

    .page-news__floating-button {
        flex: 1;
        min-width: unset;
        padding: 10px 15px;
        font-size: 15px;
    }
}

/* Ensure all images maintain original color */
.page-news img {
    filter: none !important; /* Absolutely no filters */
}