/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  padding-bottom: 50px;
}

/* Section spacing */
.page-blog__section-spacing {
  padding-top: 40px;
  padding-bottom: 40px;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 60px 0; /* body already handles header offset, small top padding for visual */
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 500px;
  filter: brightness(0.7); /* Slightly darken image for text readability */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 800px;
  width: 90%;
  padding: 20px;
  z-index: 10;
  background: rgba(17, 39, 27, 0.7); /* Card BG with transparency for content */
  border-radius: 10px;
  box-sizing: border-box;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3em);
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
}

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

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button color */
  color: #F2FFF6; /* Text Main */
  border: none;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: transparent;
  color: #2AD16F; /* Brighter green for contrast */
  border: 2px solid #2AD16F; /* Border */
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background: #2AD16F;
  color: #F2FFF6;
  transform: translateY(-2px);
}

/* Section Titles */
.page-blog__section-title {
  font-size: 2.5em;
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

/* Latest Articles Grid */
.page-blog__article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-blog__article-card {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

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

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

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

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

.page-blog__article-title a {
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #57E38D; /* Glow */
}

.page-blog__article-excerpt {
  color: #A7D9B8; /* Text Secondary */
  font-size: 0.95em;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__article-date {
  font-size: 0.85em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-blog__btn-read-more {
  display: inline-block;
  padding: 8px 15px;
  background: #22C768; /* Auxiliary color */
  color: #F2FFF6;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
  align-self: flex-start;
  transition: background 0.3s ease;
}

.page-blog__btn-read-more:hover {
  background: #11A84E; /* Main color */
}

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

/* Featured Section */
.page-blog__featured-content {
  display: flex;
  gap: 30px;
  align-items: center;
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  padding: 30px;
}

.page-blog__featured-image {
  width: 50%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-blog__featured-text {
  width: 50%;
  color: #A7D9B8; /* Text Secondary */
}

.page-blog__featured-text p {
  margin-bottom: 20px;
  font-size: 1.05em;
  color: #F2FFF6;
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #F2FFF6; /* Text Main */
  background-color: #0A4B2C; /* Deep Green */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: #57E38D; /* Glow */
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

.page-blog__faq-answer {
  padding: 20px;
  color: #A7D9B8; /* Text Secondary */
  background-color: #11271B; /* Card BG */
  border-top: 1px solid #1E3A2A; /* Divider */
}

/* CTA Section */
.page-blog__cta-section {
  text-align: center;
  background-color: #0A4B2C; /* Deep Green */
  padding: 60px 20px;
  border-radius: 10px;
  margin-top: 50px;
}

.page-blog__cta-description {
  font-size: 1.2em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__featured-content {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__featured-image,
  .page-blog__featured-text {
    width: 100%;
  }

  .page-blog__hero-content {
    width: 95%;
    padding: 15px;
  }
}

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

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    position: static;
    transform: none;
    margin-top: 20px;
    background: none; /* Remove overlay background on mobile */
    border-radius: 0;
    padding: 0 15px;
  }

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    margin-left: 0;
    margin-bottom: 15px;
    padding: 15px 20px;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 0;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__article-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-blog__featured-content {
    padding: 20px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__featured-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin-bottom: 20px;
  }

  .page-blog__faq-list {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__faq-item summary {
    font-size: 1em;
    padding: 15px;
  }

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

  .page-blog__cta-section {
    padding: 40px 15px;
  }

  .page-blog__cta-description {
    font-size: 1em;
  }

  /* Ensure all images are responsive */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-articles,
  .page-blog__featured-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

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

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