/* style/blog.css */

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

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

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body handles header offset, this is for visual spacing */
  background-color: var(--page-blog-background);
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 675px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -100px; /* Overlap slightly for visual effect, but not over the image itself */
  position: relative;
  z-index: 1;
}

.page-blog__main-title {
  color: var(--page-blog-text-main);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__subtitle {
  color: var(--page-blog-text-secondary);
  font-size: 1.1em;
  margin-bottom: 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  min-width: 150px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--page-blog-button-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(17, 168, 78, 0.4);
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(17, 168, 78, 0.6);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--page-blog-primary-color);
  border: 2px solid var(--page-blog-primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: rgba(17, 168, 78, 0.1);
  color: var(--page-blog-primary-color);
}

/* General Section Styling */
.page-blog__section-title {
  color: var(--page-blog-text-main);
  font-size: 2.5em;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__dark-section {
  background-color: var(--page-blog-background);
  color: var(--page-blog-text-main);
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__subtitle {
  color: #333333;
}

/* Intro Section */
.page-blog__intro-section {
  padding: 60px 0;
}

.page-blog__intro-section .page-blog__text-block {
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
  color: #555555;
  font-size: 1.05em;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
}

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

.page-blog__category-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding-bottom: 25px;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__category-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__category-card .page-blog__card-title {
  color: var(--page-blog-gold-color);
  font-size: 1.6em;
  margin-bottom: 15px;
  padding: 0 15px;
}

.page-blog__category-card .page-blog__card-description {
  color: var(--page-blog-text-secondary);
  font-size: 0.95em;
  padding: 0 20px;
  margin-bottom: 25px;
  flex-grow: 1;
}

.page-blog__btn-text {
  color: var(--page-blog-primary-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
  padding: 0 20px;
}

.page-blog__btn-text:hover {
  color: var(--page-blog-glow-color);
}

.page-blog__icon-arrow {
  font-size: 1.2em;
}

/* Featured Articles Section */
.page-blog__featured-articles {
  padding: 80px 0;
}

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

.page-blog__article-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.page-blog__article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__article-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-title a {
  color: #333333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: var(--page-blog-primary-color);
}

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

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

.page-blog__btn-read-more {
  color: var(--page-blog-primary-color);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
  transition: color 0.3s ease;
}

.page-blog__btn-read-more:hover {
  color: var(--page-blog-glow-color);
}

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

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

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__faq-item {
  background-color: var(--page-blog-card-bg);
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-blog__faq-item[open] {
  background-color: var(--page-blog-deep-green);
}

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

.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  color: var(--page-blog-primary-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(--page-blog-text-secondary);
  font-size: 1em;
}

.page-blog__faq-answer p {
  margin: 0;
}

/* CTA Bottom Section */
.page-blog__cta-bottom {
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-bottom .page-blog__section-title {
  color: #333333;
}

.page-blog__cta-bottom .page-blog__subtitle {
  color: #555555;
  max-width: 800px;
  margin: 20px auto 40px auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.8em;
  }

  .page-blog__section-title {
    font-size: 2em;
  }
}

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

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    margin-top: -60px;
    padding: 30px 15px;
  }

  .page-blog__main-title {
    font-size: 2.2em;
  }

  .page-blog__subtitle {
    font-size: 1em;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__intro-section, 
  .page-blog__categories-section, 
  .page-blog__featured-articles, 
  .page-blog__faq-section, 
  .page-blog__cta-bottom {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 1.8em;
  }

  .page-blog__category-grid, .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__category-card, .page-blog__article-card {
    margin: 0 auto;
    max-width: 400px;
  }

  /* Image responsiveness for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section, .page-blog__card, .page-blog__container,
  .page-blog__hero-section, .page-blog__intro-section, .page-blog__categories-section,
  .page-blog__featured-articles, .page-blog__faq-section, .page-blog__cta-bottom,
  .page-blog__category-grid, .page-blog__article-grid, .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important;
  }

  .page-blog__hero-image-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-blog__article-content {
    padding: 15px;
  }

  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }

  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }

}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: 1.8em;
  }

  .page-blog__section-title {
    font-size: 1.5em;
  }

  .page-blog__btn-primary, .page-blog__btn-secondary {
    font-size: 0.9em;
  }
}