/* 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 background */
    background: #F5F7FA; /* Background color from custom palette */
}

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

.page-news__section-title {
    font-size: 32px;
    font-weight: bold;
    color: #E53935; /* Main brand color */
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    padding-top: 10px; /* Small fixed top padding */
    margin-bottom: 40px;
    overflow: hidden; /* Ensure no image overflow */
}

.page-news__hero-image-wrapper {
    width: 100%;
    overflow: hidden;
}

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

.page-news__hero-content {
    text-align: center;
    padding: 40px 20px;
    background: #FFFFFF; /* Card background color */
    border-bottom: 1px solid #E0E0E0; /* Border color */
    margin-bottom: 20px;
}

.page-news__main-title {
    font-size: clamp(28px, 4vw, 48px); /* Clamp for responsive H1 */
    font-weight: 700;
    color: #E53935;
    margin-bottom: 20px;
    line-height: 1.2;
}

.page-news__intro-text {
    font-size: 18px;
    color: #333333;
    max-width: 800px;
    margin: 0 auto 30px;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%); /* Button gradient */
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box; /* Button responsive */
    white-space: normal; /* Button responsive */
    word-wrap: break-word; /* Button responsive */
    border: none;
    cursor: pointer;
}

.page-news__cta-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Articles Section */
.page-news__articles-section {
    padding: 40px 0;
}

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

.page-news__article-card {
    background: #FFFFFF; /* Card background color */
    border: 1px solid #E0E0E0; /* Border color */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

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

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

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

.page-news__article-title {
    font-size: 20px;
    font-weight: 600;
    color: #E53935; /* Main brand color */
    margin-bottom: 10px;
    line-height: 1.3;
}

.page-news__article-date {
    font-size: 14px;
    color: #666666;
    margin-bottom: 15px;
    display: block;
}

.page-news__article-excerpt {
    font-size: 16px;
    color: #333333;
    margin-bottom: 15px;
}

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

.page-news__view-all-button {
    display: inline-block;
    padding: 12px 25px;
    background: #E53935; /* Main brand color */
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    max-width: 100%; /* Button responsive */
    box-sizing: border-box; /* Button responsive */
    white-space: normal; /* Button responsive */
    word-wrap: break-word; /* Button responsive */
}

.page-news__view-all-button:hover {
    background-color: #FF5A4F; /* Auxiliary color on hover */
}

/* FAQ Section */
.page-news__faq-section {
    padding: 40px 0 60px;
    background: #F5F7FA; /* Background color from custom palette */
}

details.page-news__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #E0E0E0; /* Border color */
  overflow: hidden;
  background: #FFFFFF; /* Card background color */
}
details.page-news__faq-item summary.page-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #333333; /* Text Main color */
}
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: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Text Main color */
}
.page-news__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #E53935; /* Main brand color */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-news__faq-item .page-news__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #333333; /* Text Main color */
}
details.page-news__faq-item .page-news__faq-answer p {
    margin: 0;
}


/* Responsive styles */
@media (max-width: 1024px) {
    .page-news__articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 15px;
        max-width: 100% !important; /* Ensure container is full width on mobile */
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Hero section */
    .page-news__hero-section {
        padding-top: 10px !important; /* Small fixed top padding, important for mobile */
        margin-bottom: 30px;
    }

    .page-news__hero-content {
        padding: 30px 15px;
    }

    .page-news__main-title {
        font-size: 28px; /* Adjusted font size for mobile H1 */
        margin-bottom: 15px;
    }

    .page-news__intro-text {
        font-size: 16px;
        margin-bottom: 20px;
    }

    /* Buttons responsive (page-news__cta-button, page-news__view-all-button) */
    .page-news__cta-button,
    .page-news__view-all-button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px; /* Add padding to prevent text touching edges */
        padding-right: 15px;
    }

    /* Articles section */
    .page-news__section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

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

    .page-news__article-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Lighter shadow for mobile */
    }

    .page-news__article-image {
        height: 180px; /* Adjusted image height for mobile cards */
    }

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

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

    /* Generic image responsive for content area */
    .page-news img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
    }
    
    .page-news__articles-section,
    .page-news__faq-section {
      max-width: 100% !important;
      width: 100% !important;
      box-sizing: border-box !important;
      padding-left: 0; /* Container handles padding */
      padding-right: 0;
    }

    /* FAQ section */
    details.page-news__faq-item summary.page-news__faq-question {
      padding: 15px;
    }
    .page-news__faq-qtext {
      font-size: 16px;
    }
    .page-news__faq-toggle {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    details.page-news__faq-item .page-news__faq-answer {
      padding: 0 15px 15px;
    }
}