/* style/blog.css */

/* General styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  color: #F2FFF6; /* Text Main for dark body background */
  background-color: #08160F; /* Body background color */
  line-height: 1.6;
}

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

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog a[class*="button"],
.page-blog a[class*="btn"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap; /* Prevent text wrapping initially for desktop */
  word-wrap: normal;
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  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; /* Button color for secondary */
  border: 2px solid #2AD16F; /* Button color for secondary */
}

.page-blog__btn-secondary:hover {
  background: #2AD16F;
  color: #08160F; /* Dark background color */
  transform: translateY(-2px);
}

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, relying on body padding for header offset */
  padding-bottom: 60px;
  background-color: #08160F; /* Ensure consistency with body background */
}

.page-blog__hero-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
}

.page-blog__hero-content {
  flex: 1 1 50%;
  min-width: 300px;
  color: #F2FFF6; /* Text Main */
}

.page-blog__hero-title {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #F2FFF6; /* Text Main */
}

.page-blog__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  color: #A7D9B8; /* Text Secondary */
}

.page-blog__hero-cta-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.page-blog__hero-image-wrapper {
  flex: 1 1 40%;
  min-width: 300px;
  text-align: center;
}

.page-blog__hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: block;
}

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

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

.page-blog__blog-card {
  background-color: #11271B; /* 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__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__card-image {
  width: 100%;
  height: 200px; /* 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-category {
  display: inline-block;
  background-color: #1E3A2A; /* Divider color for category background */
  color: #A7D9B8; /* Text Secondary */
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: bold;
}

.page-blog__card-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #F2FFF6; /* Text Main */
  flex-grow: 1;
}

.page-blog__card-title:hover {
  color: #2AD16F; /* Lighter green on hover */
}

.page-blog__card-excerpt {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
}

.page-blog__card-date {
  font-size: 0.85rem;
  color: #A7D9B8; /* Text Secondary */
  margin-top: auto; /* Push date to bottom */
}

/* Pagination */
.page-blog__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
  gap: 10px;
}

.page-blog__pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: #11271B; /* Card BG */
  color: #A7D9B8; /* Text Secondary */
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.page-blog__pagination-link:hover,
.page-blog__pagination-link.is-active {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #F2FFF6; /* Text Main */
}

/* CTA Banner Section */
.page-blog__cta-banner {
  background-color: #0A4B2C; /* Deep Green */
  padding: 80px 0;
  text-align: center;
  color: #F2FFF6; /* Text Main */
}

.page-blog__cta-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

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

.page-blog__cta-button {
  margin: 0 auto; /* Center the button */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 2.8rem;
  }
  .page-blog__cta-title {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  /* General mobile container padding */
  .page-blog__container {
    padding: 0 15px !important;
  }

  /* HERO Section */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
    padding-bottom: 40px !important;
  }
  .page-blog__hero-container {
    flex-direction: column !important;
    padding: 20px 0 !important;
    gap: 30px !important;
  }
  .page-blog__hero-content {
    order: 2 !important; /* Content below image on mobile */
    text-align: center !important;
    flex-basis: auto !important;
  }
  .page-blog__hero-title {
    font-size: 2.2rem !important;
    line-height: 1.3 !important;
  }
  .page-blog__hero-description {
    font-size: 1rem !important;
  }
  .page-blog__hero-cta-group {
    flex-direction: column !important;
    gap: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .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;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px !important; /* Adjust padding for smaller screens */
    box-sizing: border-box !important;
  }
  .page-blog__hero-image-wrapper {
    order: 1 !important; /* Image above content on mobile */
    flex-basis: auto !important;
  }
  .page-blog__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* Latest Posts Section */
  .page-blog__section-title {
    font-size: 2rem !important;
    margin-bottom: 30px !important;
    padding-top: 30px !important;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr !important; /* Single column on mobile */
    gap: 20px !important;
  }
  .page-blog__blog-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__card-image {
    max-width: 100% !important;
    width: 100% !important;
    height: 180px !important; /* Adjust height for mobile */
  }
  .page-blog__card-title {
    font-size: 1.3rem !important;
  }
  .page-blog__card-excerpt {
    font-size: 0.95rem !important;
  }

  /* Pagination */
  .page-blog__pagination {
    flex-wrap: wrap !important;
    gap: 8px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__pagination-link {
    width: 36px !important;
    height: 36px !important;
    font-size: 0.9rem !important;
  }

  /* CTA Banner Section */
  .page-blog__cta-banner {
    padding: 60px 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__cta-title {
    font-size: 2rem !important;
  }
  .page-blog__cta-description {
    font-size: 1rem !important;
  }
  .page-blog__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px !important;
    box-sizing: border-box !important;
  }

  /* Universal image and content container rules 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__latest-posts,
  .page-blog__cta-banner {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}