/* style/blog.css */
/* Colors from custom palette */
:root {
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green-color: #0A4B2C;
}

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  color: var(--text-main); /* Light text on dark body background */
  background-color: var(--background-color); /* Body background is handled by shared.css var(--background) */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column; /* Image first, then content */
  align-items: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom padding */
  background-color: var(--deep-green-color);
  position: relative;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1920px;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  z-index: 1;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--gold-color);
  margin-bottom: 20px;
}

.page-blog__hero-description {
  font-size: 1.15em;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background: var(--button-gradient);
  color: #ffffff; /* White text for primary button */
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-secondary {
  background: none;
  color: var(--glow-color);
  border: 2px solid var(--glow-color);
}

.page-blog__btn-secondary:hover {
  background: rgba(87, 227, 141, 0.1);
  color: #ffffff;
}

/* Section Titles and Descriptions */
.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--gold-color);
  text-align: center;
  margin-bottom: 20px;
  padding-top: 40px;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

/* Highlight text */
.page-blog .highlight {
  color: var(--glow-color);
  font-weight: bold;
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

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

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

.page-blog__article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

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

.page-blog__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__card-title a:hover {
  color: var(--glow-color);
}

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

.page-blog__card-description {
  font-size: 1em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.page-blog__read-more-link {
  color: var(--glow-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  position: relative;
}

.page-blog__read-more-link::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background-color: var(--glow-color);
  bottom: -3px;
  left: 0;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.page-blog__read-more-link:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: var(--deep-green-color);
}

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  text-align: center;
}

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

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: rgba(var(--glow-color-rgb), 0.1);
}

.page-blog__category-image {
  width: 100%;
  max-width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.page-blog__category-name {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--glow-color);
}

/* Guides & Tips Section */
.page-blog__guides-tips-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

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

.page-blog__guide-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.page-blog__guide-card:hover {
  transform: translateY(-5px);
}

.page-blog__guide-title {
  font-size: 1.3em;
  margin-bottom: 15px;
  line-height: 1.3;
}

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

.page-blog__guide-title a:hover {
  color: var(--glow-color);
}

.page-blog__guide-text {
  color: var(--text-secondary);
  font-size: 1em;
  margin-bottom: 20px;
}

/* News Section */
.page-blog__news-section {
  padding: 60px 0;
  background-color: var(--deep-green-color);
}

.page-blog__news-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.page-blog__news-item {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__news-title {
  font-size: 1.3em;
  margin-bottom: 8px;
}

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

.page-blog__news-title a:hover {
  color: var(--glow-color);
}

.page-blog__news-meta {
  font-size: 0.9em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.page-blog__news-text {
  color: var(--text-secondary);
  font-size: 1em;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--background-color);
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  background-color: var(--card-bg);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.page-blog__faq-item:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-weight: bold;
  color: var(--text-main);
  font-size: 1.15em;
  user-select: none;
  list-style: none; /* For <summary> tag */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For <summary> tag */
}

.page-blog__faq-qtext {
  flex-grow: 1;
  color: var(--text-main);
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow-color);
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  color: var(--text-secondary);
  font-size: 1em;
  line-height: 1.7;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--deep-green-color) 0%, var(--background-color) 100%);
  text-align: center;
}

.page-blog__cta-title {
  font-size: 2.8em;
  font-weight: bold;
  color: var(--gold-color);
  margin-bottom: 25px;
}

.page-blog__cta-description {
  font-size: 1.2em;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 2.8em;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
  .page-blog__articles-grid,
  .page-blog__categories-grid,
  .page-blog__guides-grid {
    gap: 20px;
  }
  .page-blog__article-image {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-blog__hero-section {
    padding: 10px 0 40px 0;
  }
  .page-blog__hero-title {
    font-size: 2em;
    margin-bottom: 15px;
  }
  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }
  .page-blog__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    padding: 0 15px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    padding-top: 30px;
  }
  .page-blog__section-description {
    font-size: 0.95em;
    margin-bottom: 30px;
  }
  .page-blog__articles-grid,
  .page-blog__categories-grid,
  .page-blog__guides-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__article-image {
    height: 200px;
  }
  .page-blog__article-card, .page-blog__category-card, .page-blog__guide-card, .page-blog__news-item {
    padding: 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-left: auto; /* Center cards if grid has less than full width */
    margin-right: auto;
  }
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__hero-image-wrapper, .page-blog__article-card, .page-blog__category-card, .page-blog__guide-card, .page-blog__news-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .page-blog__cta-title {
    font-size: 1.8em;
  }
  .page-blog__cta-description {
    font-size: 1em;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }
  .page-blog__faq-question {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 1.8em;
  }
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__cta-title {
    font-size: 1.6em;
  }
  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    padding: 0 10px;
  }
}