/* style/news.css */

:root {
  --primary-color: #C91F17;
  --secondary-color: #E53935;
  --button-gradient: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%);
  --card-bg: #D32F2F;
  --background-color: #B71C1C;
  --text-main-color: #FFF5E1;
  --border-color: #F2B544;
  --glow-color: #FFCC66;
  --gold-color: #F4D34D;
  --deep-red-color: #7A0E0E;
}

.page-news {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color); /* Default text color for the page */
  background-color: var(--background-color); /* Default background color for the page */
}

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

/* Hero Section */
.page-news__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 40px;
  text-align: center;
  background-color: var(--deep-red-color); /* Darker background for hero */
  position: relative;
  overflow: hidden;
}

.page-news__hero-image-wrapper {
  position: relative;
  width: 100%;
  max-height: 500px; /* Limit height for aesthetic */
  overflow: hidden;
  margin-bottom: 20px;
}

.page-news__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.8); /* Slightly dim the image for text contrast */
}

.page-news__hero-content {
  position: relative;
  z-index: 10;
  padding: 0 20px;
  max-width: 900px;
  margin: 0 auto;
}

.page-news__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  color: var(--text-main-color);
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-news__hero-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Buttons in Hero */
.page-news__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-news__btn-primary,
.page-news__btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow long words to break */
  max-width: 100%; /* Ensure button adapts to container */
  box-sizing: border-box;
}

.page-news__btn-primary {
  background: var(--button-gradient);
  color: var(--deep-red-color); /* Ensure text is readable on gold gradient */
  border: none;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.page-news__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
  opacity: 0.9;
}

.page-news__btn-secondary {
  background: transparent;
  color: var(--text-main-color);
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(201, 31, 23, 0.4);
}

.page-news__btn-secondary:hover {
  transform: translateY(-3px);
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(201, 31, 23, 0.6);
}

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

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

.page-news__section-description {
  font-size: 1.1em;
  color: #f0f0f0;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

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

.page-news__news-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  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.5);
}

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

.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-bottom: 10px;
  line-height: 1.3;
}

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

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

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

.page-news__card-excerpt {
  font-size: 1em;
  color: #e0e0e0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-news__read-more {
  display: inline-block;
  color: var(--gold-color);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid var(--gold-color);
  padding-bottom: 3px;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.page-news__read-more:hover {
  color: var(--text-main-color);
  border-color: var(--text-main-color);
}

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

/* CTA Section */
.page-news__cta-section {
  background-color: var(--primary-color);
  padding: 80px 0;
  text-align: center;
}

.page-news__cta-title {
  font-size: 2.8em;
  color: var(--text-main-color);
  margin-bottom: 20px;
  font-weight: 700;
}

.page-news__cta-description {
  font-size: 1.2em;
  color: #f8f8f8;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-news__hero-section {
    padding-bottom: 30px;
  }
  .page-news__main-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }
  .page-news__hero-description {
    font-size: 1em;
  }
  .page-news__section-title {
    font-size: 2em;
  }
  .page-news__section-description {
    font-size: 1em;
  }
  .page-news__news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
  .page-news__cta-title {
    font-size: 2.2em;
  }
  .page-news__cta-description {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  /* HERO 主图区域 */
  .page-news__hero-section {
    padding-top: 10px !important; /* Small top padding, body handles --header-offset */
    padding-bottom: 20px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-news__hero-image-wrapper {
    max-height: 300px;
  }
  .page-news__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
    margin-bottom: 10px;
  }
  .page-news__hero-description {
    font-size: 0.95em;
    margin-bottom: 20px;
  }
  .page-news__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  /* 产品展示图区域 (Not explicitly present, but general grid applies) */
  .page-news__news-grid {
    grid-template-columns: 1fr; /* Single column layout for news cards */
    gap: 25px;
  }
  .page-news__latest-news-section .page-news__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 通用图片与容器 */
  .page-news img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-news__hero-image {
    height: auto !important;
  }
  .page-news__news-image {
    height: 200px !important; /* Adjust height for mobile news cards */
  }
  .page-news__container,
  .page-news__news-card,
  .page-news__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 按钮与按钮容器 */
  .page-news__btn-primary,
  .page-news__btn-secondary,
  .page-news a[class*="button"],
  .page-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-news__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    flex-wrap: wrap !important; /* Ensure buttons wrap */
    gap: 10px;
  }
  .page-news__view-all .page-news__btn-primary {
    width: auto !important; /* Allow 'Xem Tất Cả Tin Tức' button to size naturally */
    max-width: 80% !important; 
    margin: 0 auto;
    display: block;
  }

  /* 其他内容模块 */
  .page-news__section-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }
  .page-news__section-description {
    font-size: 0.9em;
    margin-bottom: 30px;
  }
  .page-news__news-card {
    margin-bottom: 0;
  }
  .page-news__card-title {
    font-size: 1.3em;
  }
  .page-news__card-meta {
    font-size: 0.85em;
  }
  .page-news__card-excerpt {
    font-size: 0.95em;
  }
  .page-news__cta-section {
    padding: 50px 15px;
  }
  .page-news__cta-title {
    font-size: 2em;
  }
  .page-news__cta-description {
    font-size: 1em;
  }
}

/* Color Contrast Adjustments */
/* The primary page background is B71C1C (Deep Red), which is dark. */
/* Therefore, text should be light (FFF5E1) by default, which is already set. */
/* Card background is D32F2F (Red), which is also dark. */
/* Button text color for primary button is Deep Red (7A0E0E) on gold gradient, which should have good contrast. */
/* Secondary button text is FFF5E1 on transparent/primary color, which should also have good contrast. */

/* Ensure specific text elements have good contrast */
.page-news p,
.page-news li,
.page-news__card-excerpt {
  color: #e0e0e0; /* Slightly lighter for readability on dark backgrounds */
}

.page-news__main-title,
.page-news__hero-description,
.page-news__section-title,
.page-news__section-description,
.page-news__card-title a,
.page-news__card-meta,
.page-news__cta-title,
.page-news__cta-description {
  color: var(--text-main-color); /* FFF5E1 */
}

.page-news__read-more {
  color: var(--gold-color); /* F4D34D */
}