/* style/blog.css */

/* Color Variables */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --card-bg: #11271B;
  --bg-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

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

/* Shared container for content sections */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section Titles */
.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 30px;
  letter-spacing: 1px;
  line-height: 1.2;
}

/* Section Text */
.page-blog__section-text {
  font-size: 1.1em;
  color: var(--text-secondary);
  text-align: justify;
  margin-bottom: 20px;
}

.page-blog__text-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-blog__text-link:hover {
  text-decoration: underline;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body handles header offset, small top padding for aesthetic */
  background-color: var(--bg-color);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and content */
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__hero-title {
  font-size: clamp(2.2em, 5vw, 3.5em);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: 1px;
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-cta-button {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 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.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-blog__hero-cta-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

/* Introduction Section */
.page-blog__introduction-section {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  margin-top: 40px;
}

/* Featured Articles Section */
.page-blog__featured-articles {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-blog__article-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 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 10px;
}

.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(--primary-color);
}

.page-blog__card-excerpt {
  font-size: 0.95em;
  color: var(--text-secondary);
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-flex;
  align-items: center;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-blog__read-more:hover {
  color: var(--secondary-color);
}

.page-blog__arrow {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.page-blog__read-more:hover .page-blog__arrow {
  transform: translateX(5px);
}

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

.page-blog__view-all-button {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
}

.page-blog__view-all-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

/* Categories Section */
.page-blog__categories-section {
  background-color: var(--bg-color);
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-blog__category-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

/* Ensure images in cards are not too small */
.page-blog__category-card .page-blog__card-image {
  height: 200px; /* Minimum height for category images */
}

/* Latest News Section */
.page-blog__latest-news {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--card-bg);
  border-radius: 12px;
  margin-top: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-blog__faq-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.page-blog__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--divider-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
  background-color: var(--card-bg);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: var(--deep-green);
  color: #F2FFF6; /* text-main */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  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;
  font-size: 1em;
  color: var(--text-secondary);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Adjust as needed for content */
  padding-top: 10px;
}

/* Call to Action Section */
.page-blog__cta-section {
  position: relative;
  background-color: var(--bg-color);
  padding: 60px 20px;
  text-align: center;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 40px;
}

.page-blog__cta-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  z-index: 0;
}

.page-blog__cta-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: clamp(2em, 4vw, 3em);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 1.1em;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__btn-primary {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 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.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: clamp(2em, 4.5vw, 3em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__article-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
  .page-blog__hero-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }
  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 25px;
  }
  .page-blog__hero-cta-button,
  .page-blog__btn-primary,
  .page-blog__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: 12px 20px;
    font-size: 1em;
  }
  .page-blog__container {
    padding: 30px 15px;
  }
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 25px;
  }
  .page-blog__section-text {
    font-size: 0.95em;
  }
  .page-blog__article-grid,
  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__card-image {
    height: 200px;
  }
  .page-blog__card-title {
    font-size: 1.2em;
  }
  .page-blog__card-excerpt {
    font-size: 0.9em;
  }
  .page-blog__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
    font-size: 0.95em;
  }
  .page-blog__cta-title {
    font-size: 1.8em;
  }
  .page-blog__cta-description {
    font-size: 1em;
  }
  
  /* Mobile image responsiveness */
  .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-image-wrapper,
  .page-blog__article-card,
  .page-blog__category-card,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  /* Ensure no filter is applied to images */
  .page-blog img { filter: none !important; }
}

@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;
  }
}