/* style/news.css */

/* Root variables if needed, though most are in shared.css */
:root {
    --primary-color: #26A9E0;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #FFFFFF;
    --bg-light: #f8f8f8;
    --border-color: #e0e0e0;
    --button-login: #EA7C07;
    --button-login-hover: #D37006;
}

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Assuming body is light, use dark text */
    background-color: var(--bg-light); /* Light background for the main content area */
}

/* --- Hero Section --- */
.page-news__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    /* body padding-top handles header offset, this is for aesthetic spacing */
    padding-top: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a8cc4 100%);
    color: var(--text-light);
    overflow: hidden; /* Ensure image doesn't spill */
}

.page-news__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Important for flex items */
}

.page-news__hero-image {
    width: 100%;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.page-news__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    margin-top: -80px; /* Overlap slightly for visual appeal */
    background: rgba(0, 0, 0, 0.3); /* Semi-transparent background for text readability */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-news__hero-content h1 {
    font-size: clamp(2em, 4vw, 3.2em); /* Use clamp for H1 */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-content p {
    font-size: clamp(1em, 1.5vw, 1.2em);
    margin-bottom: 25px;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--button-login); /* Use specific login color for CTA */
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: none;
}

.page-news__cta-button:hover {
    background: var(--button-login-hover); 
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* --- General Section Styling --- */
.page-news__section {
    padding: 60px 20px;
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
}

.page-news__section:last-of-type {
    border-bottom: none;
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-news__section-title {
    font-size: clamp(1.8em, 3vw, 2.8em);
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-news__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--button-login);
    border-radius: 2px;
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: var(--text-dark);
}

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

.page-news__news-grid--featured {
    grid-template-columns: 2fr 1fr 1fr; /* Large card + two small */
}

.page-news__news-card {
    background: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

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

.page-news__news-card--large img {
    height: 350px; /* Larger image for featured card */
}

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

.page-news__card-title {
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-news__card-title a:hover {
    color: var(--button-login);
}

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

.page-news__card-description {
    font-size: 1em;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1; /* Push read more to bottom */
}

.page-news__read-more {
    display: inline-block;
    color: var(--button-login);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

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

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

/* --- FAQ Section --- */
.page-news__faq-section {
    background-color: var(--bg-light);
}

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

details.page-news__faq-item summary.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    transition: background-color 0.3s ease;
    color: var(--text-dark);
}

details.page-news__faq-item summary.page-news__faq-question::-webkit-details-marker {
    display: none;
}

details.page-news__faq-item summary.page-news__faq-question:hover {
    background: #f5f5f5;
}

.page-news__faq-qtext {
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    color: var(--primary-color);
}

.page-news__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    flex-shrink: 0;
    margin-left: 15px;
    width: 30px;
    text-align: center;
    transition: transform 0.3s ease;
}

details.page-news__faq-item[open] .page-news__faq-toggle {
    transform: rotate(45deg);
}

details.page-news__faq-item .page-news__faq-answer {
    padding: 0 25px 25px;
    background: #f9f9f9;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    color: #555;
    font-size: 1em;
}

.page-news__faq-answer p {
    margin: 0;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .page-news__news-grid--featured {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Stack on smaller screens */
    }
}

@media (max-width: 768px) {
    .page-news__hero-section {
        padding-top: 10px !important; /* body padding-top handles header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-news__hero-image img {
        border-radius: 4px;
        height: 250px; /* Adjust height for mobile */
    }

    .page-news__hero-content {
        margin-top: -60px; /* Adjust overlap */
        padding: 15px;
    }

    .page-news__hero-content h1 {
        font-size: 1.8em;
    }

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

    .page-news__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

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

    .page-news__section-title {
        font-size: 2em;
        margin-bottom: 30px;
    }

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

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

    .page-news__news-card img {
        height: 200px; /* Adjust height for mobile */
    }

    .page-news__news-card--large img {
        height: 250px; /* Adjust height for mobile */
    }

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

    .page-news__card-title {
        font-size: 1.3em;
    }

    .page-news__card-meta {
        font-size: 0.85em;
    }

    .page-news__card-description {
        font-size: 0.95em;
    }

    details.page-news__faq-item summary.page-news__faq-question {
        padding: 15px 20px;
    }

    .page-news__faq-qtext {
        font-size: 1em;
    }

    .page-news__faq-toggle {
        font-size: 24px;
        width: 24px;
    }

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

    /* Responsive image overrides */
    .page-news img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-news__section,
    .page-news__container,
    .page-news__news-card,
    .page-news__hero-container,
    .page-news__hero-content,
    .page-news__view-all {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 15px;
      padding-right: 15px;
    }

    /* Button specific responsive rules */
    .page-news__cta-button,
    .page-news__read-more {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
}