/* 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 */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__text-block {
  font-size: 1.1em;
  line-height: 1.8;
  margin-bottom: 20px;
  color: #A7D9B8; /* Text Secondary */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 60px;
  background-color: #0A4B2C; /* Deep Green for hero background */
}

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

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text contrast */
  min-height: 200px; /* Ensure minimum size */
}

.page-blog__hero-content {
  position: relative;
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -150px; /* Pull content up over the bottom of the image for visual flow */
  background: linear-gradient(0deg, rgba(8,22,15,1) 0%, rgba(8,22,15,0.8) 50%, rgba(8,22,15,0.0) 100%); /* Gradient for better text readability over image */
  padding-top: 150px;
}

.page-blog__main-title {
  font-size: clamp(2.5em, 4vw, 3.5em);
  font-weight: 900;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

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

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 0 15px #57E38D; /* Glow */
}

.page-blog__btn-secondary {
  background: transparent;
  color: #2AD16F; /* Button color */
  border: 2px solid #2AD16F; /* Button color */
}

.page-blog__btn-secondary:hover {
  background: #2AD16F;
  color: #08160F; /* Background */
  box-shadow: 0 0 15px rgba(42, 209, 111, 0.5);
}

/* Intro Section */
.page-blog__intro-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
  text-align: center;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background-color: #08160F; /* Background */
}

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

.page-blog__post-card.page-blog__card {
  background-color: #11271B; /* Card BG */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
  display: flex;
  flex-direction: column;
}

.page-blog__post-card.page-blog__card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 20px #57E38D; /* Glow */
}

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

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

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

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

.page-blog__post-title a:hover {
  color: #2AD16F;
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

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

.page-blog__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #22C768; /* Auxiliary color */
  color: #08160F; /* Background */
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more-btn:hover {
  background-color: #11A84E; /* Main color */
  color: #F2FFF6; /* Text Main */
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: #0A4B2C; /* Deep Green */
}

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

.page-blog__category-card.page-blog__card {
  background-color: #11271B; /* Card BG */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  text-decoration: none;
  color: #F2FFF6; /* Text Main */
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__category-card.page-blog__card:hover {
  transform: translateY(-5px);
  background-color: #1E3A2A; /* Divider */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px #57E38D; /* Glow */
}

.page-blog__category-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 10px;
  color: #F2FFF6; /* Text Main */
}

.page-blog__category-description {
  font-size: 0.95em;
  color: #A7D9B8; /* Text Secondary */
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #08160F; /* Background */
}

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

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

.page-blog__faq-item.page-blog__card[open] {
  background-color: #1E3A2A; /* Divider for open state */
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #F2FFF6; /* Text Main */
  cursor: pointer;
  list-style: none; /* Remove default marker for details/summary */
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-question:hover {
  background-color: rgba(46, 122, 78, 0.2); /* Border color with opacity */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #2AD16F;
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: #A7D9B8; /* Text Secondary */
}

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

/* CTA Section */
.page-blog__cta-section {
  padding: 60px 0;
  background-color: #0A4B2C; /* Deep Green */
  text-align: center;
}

.page-blog__cta-section .page-blog__container.page-blog__card {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  padding: 40px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -100px;
    padding-top: 100px;
  }
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__post-image {
    height: 200px;
  }
}

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

  .page-blog__hero-content {
    margin-top: -50px; /* Adjust for smaller screens */
    padding-top: 50px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
    max-width: 90%;
  }

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

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 1em;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 0 auto; /* Center buttons */
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__post-card.page-blog__card,
  .page-blog__category-card.page-blog__card,
  .page-blog__faq-item.page-blog__card {
    padding: 0;
    margin-left: 15px;
    margin-right: 15px;
    box-sizing: border-box !important;
    width: calc(100% - 30px) !important;
    max-width: calc(100% - 30px) !important;
  }

  .page-blog__post-image {
    min-height: 200px !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px;
  }
  
  .page-blog__hero-section {
    padding-bottom: 40px;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    padding-left: 10px;
    padding-right: 10px;
  }
  .page-blog__section-title {
    font-size: 1.6em;
  }
  .page-blog__cta-section .page-blog__container.page-blog__card {
    padding: 30px 20px;
  }
}