/* style/index-latest-news.css */

:root {
  --jl7-primary-color: #F2C14E;
  --jl7-secondary-color: #FFD36B;
  --jl7-card-bg: #111111;
  --jl7-background-color: #0A0A0A;
  --jl7-text-main: #FFF6D6;
  --jl7-border-color: #3A2A12;
  --jl7-glow-color: #FFD36B;
}

.page-index-latest-news {
  background-color: var(--jl7-background-color);
  color: var(--jl7-text-main);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

.page-index-latest-news__hero-section {
  background: linear-gradient(135deg, var(--jl7-primary-color), var(--jl7-secondary-color));
  position: relative;
  padding-top: var(--header-offset, 120px); /* Desktop padding-top */
  padding-bottom: 40px;
}

.page-index-latest-news__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-index-latest-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 20px;
}

.page-index-latest-news__hero-content {
  text-align: center;
  max-width: 800px;
}

.page-index-latest-news__hero-title {
  font-size: clamp(2em, 3.5vw, 3.5em); /* Responsive font size for H1 */
  color: var(--jl7-text-main);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.page-index-latest-news__hero-description {
  font-size: 1.1em;
  color: var(--jl7-text-main);
  margin-bottom: 30px;
}

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

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

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

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

.page-index-latest-news__news-card {
  background-color: var(--jl7-card-bg);
  border: 1px solid var(--jl7-border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--jl7-text-main);
}

.page-index-latest-news__news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-index-latest-news__news-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-index-latest-news__news-card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-index-latest-news__news-card-link {
  color: var(--jl7-primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-index-latest-news__news-card-link:hover {
  color: var(--jl7-secondary-color);
}

.page-index-latest-news__news-card-date {
  font-size: 0.9em;
  color: #aaa;
  margin-bottom: 15px;
}

.page-index-latest-news__news-card-excerpt {
  font-size: 1em;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-index-latest-news__read-more-btn {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-latest-news__read-more-btn:hover {
  background: linear-gradient(180deg, #FFE082 0%, #E8B33D 100%);
  transform: translateY(-2px);
}

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

.page-index-latest-news__view-all-btn {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background 0.3s ease, transform 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-latest-news__view-all-btn:hover {
  background: linear-gradient(180deg, #FFE082 0%, #E8B33D 100%);
  transform: translateY(-2px);
}

.page-index-latest-news__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  text-align: center;
}

.page-index-latest-news__category-card {
  background-color: var(--jl7-card-bg);
  border: 1px solid var(--jl7-border-color);
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
  color: var(--jl7-text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-index-latest-news__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.page-index-latest-news__category-icon {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 15px;
  display: block;
}

.page-index-latest-news__category-name {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--jl7-primary-color);
}

.page-index-latest-news__why-jl7-news-section {
  background-color: var(--jl7-card-bg);
  padding: 60px 0;
  border-top: 1px solid var(--jl7-border-color);
}

.page-index-latest-news__content-wrapper {
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

.page-index-latest-news__text-content {
  flex: 1;
  min-width: 300px;
  color: var(--jl7-text-main);
}

.page-index-latest-news__text-content p {
  margin-bottom: 15px;
  font-size: 1.05em;
}

.page-index-latest-news__cta-btn {
  display: inline-block;
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  margin-top: 20px;
  transition: background 0.3s ease, transform 0.2s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-index-latest-news__cta-btn:hover {
  background: linear-gradient(180deg, #FFE082 0%, #E8B33D 100%);
  transform: translateY(-2px);
}

.page-index-latest-news__cta-image {
  flex: 1;
  min-width: 300px;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

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

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

.page-index-latest-news__faq-item {
  background-color: var(--jl7-card-bg);
  border: 1px solid var(--jl7-border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-index-latest-news__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background-color: var(--jl7-card-bg);
  color: var(--jl7-primary-color);
  font-weight: bold;
  font-size: 1.2em;
  transition: background-color 0.3s ease;
}

.page-index-latest-news__faq-question:hover {
  background-color: rgba(var(--jl7-primary-color), 0.1);
}

.page-index-latest-news__faq-title {
  margin: 0;
  color: var(--jl7-primary-color);
  font-size: 1em; /* Relative to parent .faq-question */
}

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

.page-index-latest-news__faq-item.active .page-index-latest-news__faq-toggle {
  transform: rotate(45deg);
}

.page-index-latest-news__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--jl7-text-main);
}

.page-index-latest-news__faq-item.active .page-index-latest-news__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 20px;
}

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

.page-index-latest-news__faq-answer a {
  color: var(--jl7-secondary-color);
  text-decoration: underline;
}

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-index-latest-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-index-latest-news__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-index-latest-news__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
  }

  .page-index-latest-news__container {
    padding: 30px 15px;
  }

  .page-index-latest-news__section-title {
    font-size: 2em;
  }

  .page-index-latest-news__section-description {
    font-size: 1em;
  }

  .page-index-latest-news__news-grid {
    grid-template-columns: 1fr;
  }

  .page-index-latest-news__news-card-image {
    height: 180px;
  }

  .page-index-latest-news__news-card-title {
    font-size: 1.3em;
  }

  .page-index-latest-news__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .page-index-latest-news__category-icon {
    width: 150px;
    height: 150px;
  }

  .page-index-latest-news__content-wrapper {
    flex-direction: column;
  }

  .page-index-latest-news__cta-image {
    order: -1; /* Image appears before text on mobile */
    margin-bottom: 20px;
  }

  .page-index-latest-news__faq-question {
    font-size: 1.1em;
    padding: 15px;
  }

  /* Mobile image responsiveness */
  .page-index-latest-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
  }

  .page-index-latest-news__section,
  .page-index-latest-news__card,
  .page-index-latest-news__container,
  .page-index-latest-news__content-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile button responsiveness */
  .page-index-latest-news__cta-button,
  .page-index-latest-news__btn-primary,
  .page-index-latest-news__btn-secondary,
  .page-index-latest-news a[class*="button"],
  .page-index-latest-news 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-index-latest-news__cta-buttons,
  .page-index-latest-news__button-group,
  .page-index-latest-news__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;
  }
}

/* Color contrast safety for text on specific backgrounds */
.page-index-latest-news__dark-bg {
  color: var(--jl7-text-main);
  background-color: var(--jl7-card-bg);
}

.page-index-latest-news__hero-section {
  color: var(--jl7-text-main);
}

.page-index-latest-news__text-content {
  color: var(--jl7-text-main);
}

.page-index-latest-news__text-content p {
  color: var(--jl7-text-main);
}

.page-index-latest-news__faq-answer {
  color: var(--jl7-text-main);
}