/* style/news.css */
:root {
    --primary-color: #2D3E50;
    --secondary-color: #FFD700;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #f9f9f9;
    --bg-dark: #2D3E50;
    --border-color: #e0e0e0;
}

.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light backgrounds */
    background-color: #f0f2f5; /* A slightly off-white for body background */
}

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

.page-news__hero-section {
    position: relative;
    width: 100%;
    padding: 80px 0;
    padding-top: var(--header-offset, 120px);
    text-align: center;
    background: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--secondary-color); /* Use accent color for H1 */
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #e0e0e0;
}

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

.page-news__cta-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 2px solid transparent;
}

.page-news__btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

.page-news__btn-primary:hover {
    background-color: darken(var(--secondary-color), 10%); /* This won't work in plain CSS, need to define a darker color */
    background-color: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.page-news__btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-news__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
}

.page-news__section-title--light {
    color: var(--text-light);
}

.page-news__latest-articles-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

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

.page-news__article-item {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-news__article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

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

.page-news__article-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1.3;
}

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

.page-news__article-title a:hover {
    color: var(--secondary-color);
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 15px;
}

.page-news__article-date {
    font-size: 0.85em;
    color: #999;
    display: block;
}

.page-news__view-all-cta {
    text-align: center;
}

.page-news__faq-section {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

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

.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 25px;
  opacity: 0;
  color: var(--text-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
  max-height: 2000px !important; /* Use !important to ensure priority, value large enough to contain any content */
  padding: 20px 25px !important;
  opacity: 1;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
}

.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-news__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-news__faq-question:active {
  background: #eeeeee;
}

.page-news__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-news__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--secondary-color);
  border-radius: 50%;
}

.page-news__faq-item.active .page-news__faq-toggle {
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: rotate(45deg);
}

.page-news__brand-intro-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.page-news__brand-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.page-news__brand-content p {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: #555;
}

.page-news__brand-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.page-news__feature-item {
    flex: 0 0 calc(33% - 40px);
    max-width: 280px;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background-color: var(--bg-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-news__feature-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 15px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
}

.page-news__feature-item h3 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.page-news__feature-item p {
    font-size: 0.95em;
    color: #777;
    margin-bottom: 0;
}

.page-news__join-cta {
    margin-top: 30px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__article-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

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

    .page-news__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important;
    }

    .page-news__main-title {
        font-size: 2.2em;
        padding: 0 15px;
    }

    .page-news__hero-description {
        font-size: 1em;
        padding: 0 15px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

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

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 40px;
        padding: 0 15px;
    }

    .page-news__latest-articles-section, .page-news__faq-section, .page-news__brand-intro-section {
        padding: 50px 0;
    }

    .page-news__container {
        padding: 0 15px;
    }

    .page-news__article-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .page-news__article-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

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

    .page-news__faq-item {
        margin-bottom: 10px;
    }

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

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

    .page-news__faq-toggle {
        font-size: 24px;
        width: 28px;
        height: 28px;
        margin-left: 10px;
    }
    
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px !important;
    }

    .page-news__brand-features {
        flex-direction: column;
        gap: 25px;
    }

    .page-news__feature-item {
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    /* Ensure all images are responsive in content areas */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .page-news__article-item, .page-news__feature-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__brand-intro-section .page-news__container,
    .page-news__latest-articles-section .page-news__container,
    .page-news__faq-section .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Prevent horizontal scroll */
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__article-title {
        font-size: 1.2em;
    }
    .page-news__article-image {
        height: 150px;
    }
}