/* style/resources-latest-updates.css */

:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-login: #EA7C07;
    --bg-white: #FFFFFF;
    --black: #000000;
    --dark-bg1: #1a1a1a; /* Assuming shared.css defines --dark-bg1 as a dark color */
}

.page-resources-latest-updates {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-light); /* Default text color for dark body background */
    background-color: var(--dark-bg1); /* Inherits from shared.css body background */
}

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

/* Hero Section */
.page-resources-latest-updates__hero-section {
    position: relative;
    width: 100%;
    padding: 60px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--primary-color); /* Brand color for hero */
    color: var(--text-light);
    overflow: hidden;
}

.page-resources-latest-updates__hero-section .page-resources-latest-updates__container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    text-align: left;
}

.page-resources-latest-updates__hero-content {
    flex: 1;
    z-index: 1;
}

.page-resources-latest-updates__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light);
}

.page-resources-latest-updates__hero-description {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: var(--text-light);
}

.page-resources-latest-updates__hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.page-resources-latest-updates__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.page-resources-latest-updates__cta-button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text breaking */
    box-sizing: border-box;
}

.page-resources-latest-updates__btn-primary {
    background-color: var(--button-login);
    color: var(--text-light);
    border: 2px solid var(--button-login);
}

.page-resources-latest-updates__btn-primary:hover {
    background-color: #d16b06;
    border-color: #d16b06;
    transform: translateY(-2px);
}

.page-resources-latest-updates__btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 15px;
}

.page-resources-latest-updates__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Sections */
.page-resources-latest-updates__articles-section,
.page-resources-latest-updates__cta-section,
.page-resources-latest-updates__faq-section {
    padding: 80px 0;
    background-color: var(--dark-bg1);
    color: var(--text-light);
}

.page-resources-latest-updates__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-light);
}

.page-resources-latest-updates__cta-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-light);
}

.page-resources-latest-updates__cta-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.page-resources-latest-updates__cta-buttons {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Article Grid */
.page-resources-latest-updates__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.page-resources-latest-updates__article-card {
    background-color: #2a2a2a; /* Slightly lighter dark background for cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: var(--text-light);
}

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

.page-resources-latest-updates__article-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.page-resources-latest-updates__article-content {
    padding: 25px;
}

.page-resources-latest-updates__article-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-resources-latest-updates__article-title a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources-latest-updates__article-title a:hover {
    color: var(--primary-color);
}

.page-resources-latest-updates__article-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin-bottom: 20px;
}

.page-resources-latest-updates__read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-resources-latest-updates__read-more:hover {
    text-decoration: underline;
    color: #4ac7ff;
}

.page-resources-latest-updates__load-more {
    text-align: center;
    margin-top: 40px;
}

/* FAQ Section */
.page-resources-latest-updates__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-resources-latest-updates__faq-item {
    background-color: #2a2a2a;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    color: var(--text-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-resources-latest-updates__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    outline: none;
    color: var(--text-light);
    transition: background-color 0.3s ease;
}

.page-resources-latest-updates__faq-item summary::-webkit-details-marker {
    display: none;
}

.page-resources-latest-updates__faq-item summary:hover {
    background-color: #3a3a3a;
}

.page-resources-latest-updates__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-resources-latest-updates__faq-item[open] .page-resources-latest-updates__faq-toggle {
    transform: rotate(45deg);
}

.page-resources-latest-updates__faq-answer {
    padding: 0 25px 20px;
    font-size: 1em;
    color: #cccccc;
}

/* Color Contrast Fixes */
.page-resources-latest-updates__dark-bg {
    background-color: var(--dark-bg1);
    color: var(--text-light);
}

.page-resources-latest-updates__light-bg {
    background-color: #2a2a2a; /* Using a dark grey for cards on dark body bg */
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources-latest-updates__hero-section .page-resources-latest-updates__container {
        flex-direction: column;
        text-align: center;
    }

    .page-resources-latest-updates__hero-content {
        order: 2;
    }

    .page-resources-latest-updates__hero-image-wrapper {
        order: 1;
        margin-bottom: 30px;
    }

    .page-resources-latest-updates__main-title {
        font-size: 2.5em;
    }

    .page-resources-latest-updates__section-title,
    .page-resources-latest-updates__cta-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .page-resources-latest-updates {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-resources-latest-updates__hero-section {
        padding: 40px 0;
    }

    .page-resources-latest-updates__hero-section .page-resources-latest-updates__container {
        gap: 20px;
    }

    .page-resources-latest-updates__main-title {
        font-size: 2em;
    }

    .page-resources-latest-updates__hero-description {
        font-size: 1em;
    }

    .page-resources-latest-updates__cta-button {
        padding: 12px 20px;
        font-size: 0.9em;
        margin-left: 0; /* Remove margin for stacked buttons */
    }

    .page-resources-latest-updates__btn-secondary {
        margin-top: 15px; /* Add top margin for stacked buttons */
    }

    .page-resources-latest-updates__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Add padding to prevent overflow */
    }

    .page-resources-latest-updates__articles-section,
    .page-resources-latest-updates__cta-section,
    .page-resources-latest-updates__faq-section {
        padding: 50px 0;
    }

    .page-resources-latest-updates__section-title,
    .page-resources-latest-updates__cta-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    .page-resources-latest-updates__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-resources-latest-updates__article-image {
        height: 180px;
    }

    .page-resources-latest-updates__article-title {
        font-size: 1.2em;
    }

    .page-resources-latest-updates__faq-item summary {
        font-size: 1em;
        padding: 15px 20px;
    }

    .page-resources-latest-updates__faq-answer {
        padding: 0 20px 15px;
    }

    /* Mobile image, video, button responsiveness */
    .page-resources-latest-updates img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources-latest-updates__section,
    .page-resources-latest-updates__card,
    .page-resources-latest-updates__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-resources-latest-updates__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Fixed header spacing for mobile */
    }

    /* Buttons specific mobile overrides */
    .page-resources-latest-updates__cta-button,
    .page-resources-latest-updates__btn-primary,
    .page-resources-latest-updates__btn-secondary,
    .page-resources-latest-updates a[class*="button"],
    .page-resources-latest-updates 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-left: 15px;
      padding-right: 15px;
    }
    
    .page-resources-latest-updates__cta-buttons,
    .page-resources-latest-updates__button-group,
    .page-resources-latest-updates__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;
      flex-direction: column !important; /* Stack buttons vertically on mobile */
    }
}

@media (max-width: 480px) {
    .page-resources-latest-updates__main-title {
        font-size: 1.8em;
    }

    .page-resources-latest-updates__section-title,
    .page-resources-latest-updates__cta-title {
        font-size: 1.5em;
    }

    .page-resources-latest-updates__article-content {
        padding: 15px;
    }

    .page-resources-latest-updates__article-title {
        font-size: 1.1em;
    }
}