/* Variable definitions based on provided color scheme */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-bg: #11271B;
    --body-bg: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* Base styles for the news page */
.page-news {
    font-family: 'Arial', sans-serif;
    color: var(--text-main); /* Dark background, so light text */
    background-color: var(--body-bg); /* Inherited from shared, but for clarity */
    line-height: 1.6;
    padding-bottom: 50px;
}

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

.page-news__section-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(242, 193, 78, 0.4);
}

.page-news__section-description {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

.page-news__cta-button {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    background: var(--button-gradient);
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
    max-width: 100%; /* Ensure button doesn't overflow */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles header offset */
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-news__hero-image {
    width: 100%;
    height: 100vh; /* Full viewport height for desktop hero */
    max-height: 700px; /* Max height to prevent excessive stretching */
    object-fit: cover;
    display: block;
    filter: brightness(0.7); /* Darken image slightly for text readability */
}

.page-news__hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    max-width: 900px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.page-news__main-title {
    font-size: 56px;
    color: var(--gold-color);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 15px rgba(242, 193, 78, 0.7);
}

.page-news__hero-description {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.page-news__news-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.page-news__news-thumbnail {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

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

.page-news__news-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

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

.page-news__news-title a:hover {
    color: var(--gold-color);
}

.page-news__news-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.page-news__news-excerpt {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

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

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

.page-news__view-all-button-container {
    text-align: center;
    margin-top: 60px;
}

.page-news__view-all-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    background: var(--button-gradient);
    color: var(--text-main);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(42, 209, 111, 0.3);
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__view-all-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 209, 111, 0.5);
}

/* About Us Brief Section */
.page-news__about-us-brief-section {
    padding: 80px 0;
    background-color: var(--deep-green);
    text-align: center;
    margin-bottom: 50px;
}

.page-news__about-us-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-news__about-us-content .page-news__section-title {
    color: var(--text-main);
    text-shadow: none;
    margin-bottom: 25px;
}

.page-news__about-us-content .page-news__section-description {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 40px;
}

.page-news__about-us-cta {
    padding: 15px 35px;
    font-size: 19px;
}

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

.page-news__cta-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 60px 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.page-news__cta-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--gold-color);
    margin-bottom: 25px;
    text-shadow: 0 0 10px rgba(242, 193, 78, 0.5);
}

.page-news__cta-text {
    font-size: 19px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-news__cta-register, .page-news__cta-login {
    min-width: 200px;
}

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

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

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

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: rgba(var(--primary-color-rgb), 0.1);
}

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

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--gold-color);
  flex-shrink: 0;
  margin-left: 20px;
  width: 32px;
  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 30px 30px;
  background: var(--card-bg);
  border-radius: 0 0 12px 12px;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
}

.page-news__faq-answer p {
    margin-bottom: 15px;
}

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

.page-news__faq-answer a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-news__faq-answer a:hover {
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-image {
        height: 80vh;
        max-height: 600px;
    }

    .page-news__main-title {
        font-size: 48px;
    }

    .page-news__hero-description {
        font-size: 18px;
    }

    .page-news__news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-news__news-title {
        font-size: 20px;
    }

    .page-news__section-title {
        font-size: 32px;
    }

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

    .page-news__cta-title {
        font-size: 36px;
    }

    .page-news__cta-text {
        font-size: 18px;
    }

    details.page-news__faq-item summary.page-news__faq-question {
        padding: 18px 25px;
    }
    .page-news__faq-qtext {
        font-size: 18px;
    }
    .page-news__faq-toggle {
        font-size: 26px;
        width: 30px;
    }
    details.page-news__faq-item .page-news__faq-answer {
        padding: 0 25px 25px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section {
        padding-top: 10px; /* Still small top padding */
        margin-bottom: 40px;
    }
    
    .page-news__hero-image {
        height: 60vh;
        max-height: 450px;
        object-fit: contain; /* Ensure image fits well on smaller screens */
    }

    .page-news__hero-content {
        padding: 15px;
        transform: translate(-50%, -50%); /* Re-center */
        width: calc(100% - 30px); /* Adjust width for padding */
    }

    .page-news__main-title {
        font-size: 34px;
        margin-bottom: 15px;
    }

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

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

    .page-news__latest-news-section {
        padding: 40px 0;
    }

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

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

    .page-news__news-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 25px;
    }

    .page-news__news-thumbnail {
        height: 180px;
    }

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

    .page-news__news-title {
        font-size: 19px;
    }

    .page-news__news-excerpt {
        font-size: 15px;
    }

    .page-news__read-more-button {
        font-size: 15px;
    }

    .page-news__view-all-button-container {
        margin-top: 40px;
    }

    .page-news__view-all-button {
        padding: 10px 20px;
        font-size: 16px;
        width: 100% !important; /* Mobile button width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__about-us-brief-section {
        padding: 60px 0;
        margin-bottom: 40px;
    }

    .page-news__about-us-content .page-news__section-title {
        font-size: 26px;
    }

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

    .page-news__about-us-cta {
        padding: 12px 25px;
        font-size: 17px;
        width: 100% !important; /* Mobile button width */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__cta-section {
        padding: 40px 0;
    }

    .page-news__cta-card {
        padding: 40px 20px;
    }

    .page-news__cta-title {
        font-size: 30px;
        margin-bottom: 20px;
    }

    .page-news__cta-text {
        font-size: 17px;
        margin-bottom: 30px;
    }

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

    .page-news__cta-register, .page-news__cta-login {
        min-width: unset;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news__faq-section {
        padding: 60px 0;
    }

    .page-news__faq-list {
        margin-top: 30px;
    }

    details.page-news__faq-item summary.page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-qtext {
        font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 24px;
        margin-left: 15px;
        width: 28px;
    }
    details.page-news__faq-item .page-news__faq-answer {
        padding: 0 20px 20px;
        font-size: 15px;
    }
    /* Ensure all images are responsive */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    .page-news__section,
    .page-news__card,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    /* Mobile button container for flex-wrap */
    .page-news__cta-buttons-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-news__cta-buttons-wrapper > .page-news__cta-button {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 28px;
    }

    .page-news__hero-description {
        font-size: 15px;
    }

    .page-news__section-title {
        font-size: 24px;
    }

    .page-news__cta-title {
        font-size: 26px;
    }
}