/* style/blog.css */

/* Body background color is var(--bg-color) from shared.css, which is dark. */
/* Therefore, text colors in .page-blog should be light. */
.page-blog {
  background-color: #08160F; /* Background */
  color: #F2FFF6; /* Text Main */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px; /* Adjust padding for visual balance */
  padding-top: 10px; /* Small top padding as body handles --header-offset */
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1920px; /* Match hero image width */
  margin: 0 auto;
  position: relative;
  /* Ensure image is not covered by text */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
  margin-top: -80px; /* Pull content slightly over image for visual flow, but not overlapping text on image */
  background: linear-gradient(180deg, rgba(17, 40, 27, 0.8) 0%, rgba(8, 22, 15, 0.9) 100%);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative; /* Ensure it's above other content if margin is negative */
  z-index: 2; /* Ensure content is above image if needed */
  box-sizing: border-box;
}

.page-blog__hero-title {
  font-size: clamp(2.2em, 4vw, 3.5em);
  color: #F2FFF6; /* Text Main */
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-blog__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  color: #F2FFF6; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 600;
}

.page-blog__introduction-section,
.page-blog__featured-categories,
.page-blog__featured-posts,
.page-blog__why-us-section,
.page-blog__cta-section,
.page-blog__faq-section {
  padding: 60px 0;
  box-sizing: border-box;
}

.page-blog__paragraph {
  font-size: 1em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
  text-align: justify;
}

.page-blog__paragraph:last-child {
  margin-bottom: 0;
}

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

.page-blog__category-card,
.page-blog__post-card,
.page-blog__reason-card {
  background-color: #11271B; /* Card BG */
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: #F2FFF6; /* Text Main */
  border: 1px solid #2E7A4E; /* Border */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover,
.page-blog__post-card:hover,
.page-blog__reason-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px #57E38D; /* Glow */
}

.page-blog__category-image,
.page-blog__post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  min-height: 200px; /* Enforce minimum size */
}

.page-blog__category-title,
.page-blog__post-title,
.page-blog__reason-title {
  font-size: 1.4em;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 15px;
  font-weight: 600;
  line-height: 1.3;
}

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

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

.page-blog__category-description,
.page-blog__post-description {
  font-size: 0.95em;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 20px;
  flex-grow: 1;
  text-align: justify;
}

.page-blog__read-more {
  display: inline-block;
  color: #57E38D; /* Glow */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #F2C14E; /* Gold */
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
  color: #F2FFF6; /* Text Main */
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(34, 199, 104, 0.6);
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: #57E38D; /* Glow */
  border-color: #57E38D; /* Glow */
}

.page-blog__btn-secondary:hover {
  background-color: #57E38D;
  color: #08160F; /* Background */
  border-color: #57E38D;
  transform: translateY(-2px);
}

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

.page-blog__cta-buttons--center {
  justify-content: center;
}

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: 600;
  color: #F2FFF6; /* Text Main */
  cursor: pointer;
  background-color: #0A4B2C; /* Deep Green */
  border-bottom: 1px solid #1E3A2A; /* Divider */
}

.page-blog__faq-item[open] .page-blog__faq-question {
  border-bottom: 1px solid #2E7A4E; /* Border */
}

.page-blog__faq-question:hover {
  background-color: #11A84E; /* Main color for hover */
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #57E38D; /* Glow */
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

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

.page-blog__faq-answer p {
  margin-bottom: 0;
  color: #A7D9B8; /* Text Secondary */
}

/* Details element specific styling */
.page-blog__faq-item summary {
  list-style: none;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -60px;
  }
  .page-blog__category-grid,
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

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

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body handles --header-offset */
  }

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

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

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

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

  .page-blog__section-title {
    font-size: clamp(1.5em, 6vw, 2em);
    margin-bottom: 30px;
  }

  .page-blog__introduction-section,
  .page-blog__featured-categories,
  .page-blog__featured-posts,
  .page-blog__why-us-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__container,
  .page-blog__category-card,
  .page-blog__post-card,
  .page-blog__reason-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__category-image,
  .page-blog__post-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 200px !important; /* Ensure images are not too small */
  }

  .page-blog__category-card,
  .page-blog__post-card,
  .page-blog__reason-card {
    padding: 20px;
    margin-bottom: 20px;
  }

  .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-direction: column !important;
    gap: 15px;
    overflow: hidden !important;
  }

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

  .page-blog__faq-answer {
    padding: 15px 20px;
    font-size: 0.95em;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    padding: 20px 10px;
    margin-top: -30px;
  }

  .page-blog__hero-title {
    font-size: clamp(1.6em, 8vw, 2em);
  }

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

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

  .page-blog__category-grid,
  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__category-card,
  .page-blog__post-card,
  .page-blog__reason-card {
    padding: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 10px 15px;
    font-size: 0.9em;
  }
}