/* style/blog.css */
:root {
  --page-blog-primary-color: #017439;
  --page-blog-secondary-color: #FFFFFF;
  --page-blog-text-dark: #333333;
  --page-blog-text-light: #ffffff;
  --page-blog-bg-light: #ffffff;
  --page-blog-bg-dark: #017439;
  --page-blog-btn-register-bg: #C30808;
  --page-blog-btn-login-bg: #C30808;
  --page-blog-btn-text-yellow: #FFFF00;
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-blog-text-dark);
  background-color: var(--page-blog-bg-light);
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--page-blog-primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__section-subtitle {
  font-size: 1.2em;
  color: var(--page-blog-text-dark);
  text-align: center;
  margin-bottom: 40px;
}

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Adjusted to 10px */
  background-color: var(--page-blog-bg-light);
  position: relative;
  overflow: hidden;
}

.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; /* Desktop uses cover */
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 40px 20px;
  text-align: center;
  background-color: var(--page-blog-bg-light);
  border-radius: 8px;
  margin-top: -80px; /* Overlap slightly for visual interest */
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__hero-title {
  font-size: 2.8em;
  color: var(--page-blog-primary-color);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--page-blog-text-dark);
  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: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background-color: var(--page-blog-btn-register-bg);
  color: var(--page-blog-btn-text-yellow);
  border: 2px solid var(--page-blog-btn-register-bg);
}

.page-blog__btn-primary:hover {
  background-color: darken(var(--page-blog-btn-register-bg), 10%);
  border-color: darken(var(--page-blog-btn-register-bg), 10%);
}

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

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-secondary-color);
}

.page-blog__btn-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
}

/* Recent Posts Section */
.page-blog__recent-posts {
  padding: 60px 0;
  background-color: var(--page-blog-bg-light);
}

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

.page-blog__post-card {
  background-color: var(--page-blog-secondary-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.page-blog__post-content {
  padding: 20px;
}

.page-blog__post-title {
  font-size: 1.4em;
  color: var(--page-blog-primary-color);
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--page-blog-text-dark);
  margin-bottom: 15px;
}

.page-blog__read-more {
  color: var(--page-blog-btn-login-bg);
  font-weight: bold;
  display: inline-block;
  margin-top: 10px;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

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

/* Why Choose Us Section */
.page-blog__why-choose-us {
  padding: 80px 0;
  background-color: var(--page-blog-bg-dark);
  color: var(--page-blog-text-light);
}

.page-blog__why-choose-us .page-blog__section-title {
  color: var(--page-blog-text-light);
}

.page-blog__why-choose-us .page-blog__section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

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

.page-blog__feature-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-blog__feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
}

.page-blog__feature-title {
  font-size: 1.5em;
  color: var(--page-blog-text-light);
  margin-bottom: 15px;
}

.page-blog__feature-description {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

.page-blog__cta-buttons--center {
  margin-top: 40px;
}

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

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

.page-blog__faq-item {
  background-color: var(--page-blog-secondary-color);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  color: var(--page-blog-primary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.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 20px 20px;
  font-size: 1em;
  color: var(--page-blog-text-dark);
}

/* Join Community Section */
.page-blog__join-community {
  padding: 80px 0;
  background-color: var(--page-blog-bg-dark);
  color: var(--page-blog-text-light);
}

.page-blog__join-community .page-blog__section-title {
  color: var(--page-blog-text-light);
}

.page-blog__join-community .page-blog__section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.page-blog__join-community .page-blog__cta-buttons {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* General Image Styles for Responsiveness */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-blog__section,
.page-blog__card,
.page-blog__container,
.page-blog__cta-buttons,
.page-blog__button-group,
.page-blog__btn-container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 2.2em;
  }

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

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

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

  .page-blog__section-subtitle {
    font-size: 1.1em;
  }
}

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

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

  /* Hero Section */
  .page-blog__hero-section {
    flex-direction: column;
    padding-top: 10px !important; /* Ensure minimal top padding */
  }

  .page-blog__hero-image-wrapper {
    max-height: none;
    aspect-ratio: unset; /* Remove fixed aspect ratio */
  }

  .page-blog__hero-image {
    object-fit: contain !important; /* Mobile hero image uses contain */
    max-height: 300px;
  }

  .page-blog__hero-content {
    margin-top: 20px; /* Adjust margin for mobile */
    padding: 20px 15px;
    box-shadow: none;
  }

  .page-blog__hero-title {
    font-size: 1.8em;
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }

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

  /* Buttons */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .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;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column; /* Ensure vertical stacking for buttons */
  }

  /* Recent Posts Section */
  .page-blog__recent-posts {
    padding: 40px 0;
  }

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

  .page-blog__post-image {
    height: 180px;
  }

  .page-blog__post-title {
    font-size: 1.2em;
  }

  .page-blog__post-excerpt {
    font-size: 0.95em;
  }

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

  .page-blog__section-subtitle {
    font-size: 1em;
    margin-bottom: 30px;
  }

  /* Why Choose Us Section */
  .page-blog__why-choose-us {
    padding: 50px 0;
  }

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

  .page-blog__feature-item {
    padding: 20px;
  }

  /* FAQ Section */
  .page-blog__faq-section {
    padding: 40px 0;
  }

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

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

  /* Join Community Section */
  .page-blog__join-community {
    padding: 50px 0;
  }

  /* General Image & Container Responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !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;
  }
}