/* style/blog.css */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --page-bg: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

.page-blog {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-main); /* Assuming body background is dark */
  background-color: var(--page-bg); /* Use specified background color */
  line-height: 1.6;
}

.page-blog h1, .page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
  color: var(--text-main);
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-blog h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-blog h2 {
  font-size: 2.5em;
  font-weight: 600;
  text-align: center;
  margin-bottom: 40px;
}

.page-blog a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

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

/* HERO Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%; /* Ensure width is 100% for flex item */
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3); /* Slight overlay for readability */
  border-radius: 12px;
}

.page-blog__main-title {
  color: var(--text-main);
  font-size: 3.2em; /* Use em for relative sizing, responsive via media queries */
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 30px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--button-gradient);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
}

.page-blog__cta-button:hover {
  background: var(--secondary-color);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--glow-color);
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
  background-color: var(--page-bg);
}

.page-blog__section-title {
  color: var(--text-main);
  font-size: 2.8em;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.page-blog__section-intro {
  color: var(--text-secondary);
  font-size: 1.1em;
  text-align: center;
  max-width: 900px;
  margin: 0 auto 60px;
}

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

.page-blog__post-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow-color);
}

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

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

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

.page-blog__post-title {
  font-size: 1.5em;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95em;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-blog__post-date {
  display: block;
  font-size: 0.85em;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 0.9em;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: var(--primary-color);
}

.page-blog__cta-section--bottom {
  text-align: center;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--divider-color);
}

.page-blog__cta-text {
  font-size: 1.3em;
  color: var(--text-main);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__button-secondary {
  display: inline-block;
  padding: 15px 35px;
  background: var(--deep-green);
  color: var(--text-main);
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-size: 1.05em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__button-secondary:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: var(--deep-green);
}

.page-blog__faq-list {
  margin-top: 40px;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-main);
  font-weight: 600;
  font-size: 1.1em;
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: rgba(var(--primary-color), 0.2);
}
.page-blog__faq-qtext {
  flex: 1;
  line-height: 1.5;
  text-align: left;
}
.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: var(--secondary-color);
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: rgba(var(--card-bg), 0.7);
  border-radius: 0 0 12px 12px;
  color: var(--text-secondary);
  font-size: 1em;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.8em;
  }
  .page-blog__section-title {
    font-size: 2.2em;
  }
  .page-blog__post-title {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__hero-image img {
    border-radius: 8px;
  }
  .page-blog__hero-content {
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: 2em;
    margin-bottom: 10px;
  }
  .page-blog__hero-description {
    font-size: 1em;
    margin-bottom: 20px;
  }
  .page-blog__cta-button {
    padding: 12px 30px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__latest-posts, .page-blog__faq-section {
    padding: 40px 0;
  }
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-blog__section-intro {
    font-size: 0.95em;
    margin-bottom: 40px;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__post-image {
    height: 180px;
  }
  .page-blog__post-content {
    padding: 20px;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__post-excerpt {
    font-size: 0.9em;
  }
  .page-blog__cta-section--bottom {
    margin-top: 40px;
    padding-top: 30px;
  }
  .page-blog__cta-text {
    font-size: 1.1em;
    margin-bottom: 20px;
  }
  .page-blog__button-secondary {
    padding: 12px 25px;
    font-size: 0.95em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
    font-size: 1em;
  }
  .page-blog__faq-qtext {
    font-size: 1em;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
    font-size: 0.95em;
  }

  /* Mobile image and container responsive styles */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__hero-container,
  .page-blog__latest-posts .page-blog__container,
  .page-blog__faq-section .page-blog__container,
  .page-blog__post-card,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}