/* style/blog.css */

/* Base styles */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--text-main-color); /* #F2FFF6 */
  background-color: var(--background-color); /* #08160F */
  line-height: 1.6;
}

.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: 700;
  color: var(--gold-color); /* #F2C14E */
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--text-secondary-color); /* #A7D9B8 */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding-top: 10px; /* Small top padding */
  padding-bottom: 40px;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4);
}

.page-blog__hero-content-wrapper {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--text-main-color); /* #F2FFF6 */
  padding: 20px;
}

.page-blog__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
  font-weight: 800;
  color: var(--gold-color); /* #F2C14E */
  margin-bottom: 15px;
  line-height: 1.2;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-secondary-color); /* #A7D9B8 */
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  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;
  font-size: 1.1em;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: var(--text-main-color); /* #F2FFF6 */
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-secondary {
  background: var(--card-bg-color); /* #11271B */
  color: var(--glow-color); /* #57E38D */
  border: 2px solid var(--border-color); /* #2E7A4E */
}

.page-blog__btn-secondary:hover {
  transform: translateY(-3px);
  background: var(--deep-green-color); /* #0A4B2C */
  box-shadow: 0 5px 15px rgba(87, 227, 141, 0.2);
}

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

.page-blog__dark-section {
  background-color: var(--background-color); /* #08160F */
  color: var(--text-main-color); /* #F2FFF6 */
}

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

.page-blog__post-card {
  background-color: var(--card-bg-color); /* #11271B */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

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

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

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  color: var(--text-main-color); /* #F2FFF6 */
  margin-bottom: 10px;
  line-height: 1.3;
}

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

.page-blog__post-date {
  font-size: 0.85em;
  color: var(--glow-color); /* #57E38D */
  opacity: 0.8;
}

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

/* Categories Section */
.page-blog__categories-section {
  padding: 60px 0;
  background-color: var(--card-bg-color); /* #11271B */
}

.page-blog__light-bg {
  background-color: var(--card-bg-color); /* #11271B */
  color: var(--text-main-color); /* #F2FFF6 */
}

.page-blog__text-contrast-fix {
  color: var(--text-main-color) !important; /* Ensure light text on dark background */
}

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

.page-blog__category-card {
  background-color: var(--deep-green-color); /* #0A4B2C */
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: var(--text-main-color); /* #F2FFF6 */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: var(--border-color); /* #2E7A4E */
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: 600;
  color: var(--gold-color); /* #F2C14E */
  margin-bottom: 10px;
}

.page-blog__category-desc {
  font-size: 0.9em;
  color: var(--text-secondary-color); /* #A7D9B8 */
}

/* Featured Article Section */
.page-blog__featured-article-section {
  padding: 60px 0;
  background-color: var(--background-color); /* #08160F */
}

.page-blog__featured-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
}

.page-blog__featured-image {
  flex: 1 1 500px;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__featured-text {
  flex: 1 1 400px;
  color: var(--text-main-color); /* #F2FFF6 */
}

.page-blog__featured-title {
  font-size: 2em;
  font-weight: 700;
  color: var(--gold-color); /* #F2C14E */
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-blog__featured-excerpt {
  font-size: 1.1em;
  color: var(--text-secondary-color); /* #A7D9B8 */
  margin-bottom: 25px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--card-bg-color); /* #11271B */
}

.page-blog__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  background-color: var(--deep-green-color); /* #0A4B2C */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--divider-color); /* #1E3A2A */
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--text-main-color); /* #F2FFF6 */
  background-color: var(--deep-green-color); /* #0A4B2C */
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: var(--border-color); /* #2E7A4E */
}

.page-blog__faq-qtext {
  flex-grow: 1;
  color: var(--text-main-color); /* #F2FFF6 */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
  color: var(--gold-color); /* #F2C14E */
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--text-secondary-color); /* #A7D9B8 */
  line-height: 1.7;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }

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

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

  .page-blog__featured-image {
    flex: 1 1 100%;
  }

  .page-blog__featured-text {
    flex: 1 1 100%;
  }
}

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

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__hero-section {
    min-height: 400px;
    padding-top: 10px !important;
    padding-bottom: 20px;
  }

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

  .page-blog__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;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__featured-article-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }

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

  .page-blog__section-description {
    font-size: 0.95em;
  }

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

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

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

  .page-blog__category-card {
    padding: 20px;
  }

  .page-blog__featured-title {
    font-size: 1.5em;
  }

  .page-blog__featured-excerpt {
    font-size: 1em;
  }

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

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

  /* Image responsive rules */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-image-wrapper,
  .page-blog__posts-grid,
  .page-blog__categories-grid,
  .page-blog__featured-content,
  .page-blog__faq-list,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__featured-image,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__view-all-wrapper {
    padding-left: 15px;
    padding-right: 15px;
  }
}