/* style/blog.css */

/* Custom Colors */
:root {
  --f368-card-bg: #11271B;
  --f368-background: #08160F;
  --f368-text-main: #F2FFF6;
  --f368-text-secondary: #A7D9B8;
  --f368-border: #2E7A4E;
  --f368-glow: #57E38D;
  --f368-gold: #F2C14E;
  --f368-divider: #1E3A2A;
  --f368-deep-green: #0A4B2C;
  --f368-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

.page-blog {
  background-color: var(--f368-background);
  color: var(--f368-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;
}

/* 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-image-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  margin-bottom: 30px;
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7); /* Darken image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-top: -150px; /* Adjust to pull content up over the image */
  padding: 20px;
  background-color: rgba(17, 39, 27, 0.8); /* Semi-transparent dark green */
  border-radius: 10px;
}

.page-blog__main-title {
  color: var(--f368-text-main);
  font-size: clamp(2em, 4vw, 3em);
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  color: var(--f368-text-secondary);
  font-size: 1.1em;
  margin-bottom: 30px;
}

.page-blog__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: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-blog__btn-primary {
  background: var(--f368-button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--f368-glow);
  border: 2px solid var(--f368-glow);
}

.page-blog__btn-secondary:hover {
  background-color: var(--f368-glow);
  color: var(--f368-background);
  transform: translateY(-2px);
}

/* Sections */
.page-blog__articles-section,
.page-blog__featured-topics,
.page-blog__cta-section,
.page-blog__faq-section {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--f368-divider);
}

.page-blog__section-title {
  color: var(--f368-text-main);
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 20px;
}

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

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

.page-blog__article-card {
  background-color: var(--f368-card-bg);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-blog__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

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

.page-blog__article-title {
  color: var(--f368-text-main);
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-blog__article-excerpt {
  color: var(--f368-text-secondary);
  font-size: 0.95em;
  margin-bottom: 15px;
}

.page-blog__article-date {
  color: var(--f368-glow);
  font-size: 0.85em;
}

.page-blog__view-all-wrapper {
  margin-top: 20px;
}

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

.page-blog__topic-card {
  background-color: var(--f368-card-bg);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

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

.page-blog__topic-title {
  color: var(--f368-gold);
  font-size: 1.3em;
  margin-bottom: 10px;
}

.page-blog__topic-text {
  color: var(--f368-text-secondary);
  margin-bottom: 20px;
}

.page-blog__topic-link {
  color: var(--f368-glow);
  text-decoration: none;
  font-weight: bold;
}

.page-blog__topic-link:hover {
  text-decoration: underline;
}

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

.page-blog__cta-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  flex-wrap: wrap;
}

.page-blog__cta-image {
  flex: 1;
  min-width: 300px;
  max-width: 50%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: block;
}

.page-blog__cta-content {
  flex: 1;
  min-width: 300px;
  text-align: left;
}

.page-blog__cta-content .page-blog__section-title {
  color: var(--f368-text-main);
  text-align: left;
}

.page-blog__cta-content .page-blog__section-description {
  color: var(--f368-text-secondary);
  text-align: left;
  margin-left: 0;
  margin-right: 0;
}

/* FAQ Section */
.page-blog__faq-list {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.page-blog__faq-item {
  background-color: var(--f368-card-bg);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background-color: var(--f368-card-bg);
  color: var(--f368-text-main);
  font-weight: bold;
  cursor: pointer;
  border-bottom: 1px solid var(--f368-divider);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-blog__faq-item[open] > .page-blog__faq-question {
  border-bottom: 1px solid var(--f368-divider);
  background-color: var(--f368-deep-green);
}

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

.page-blog__faq-qtext {
  flex-grow: 1;
  font-size: 1.1em;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--f368-glow);
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  color: var(--f368-text-secondary);
  font-size: 1em;
  line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -100px;
  }
  .page-blog__cta-container {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__cta-image {
    max-width: 80%;
    margin-bottom: 30px;
  }
  .page-blog__cta-content {
    text-align: center;
  }
  .page-blog__cta-content .page-blog__section-title,
  .page-blog__cta-content .page-blog__section-description {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section,
  .page-blog__articles-section,
  .page-blog__featured-topics,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__hero-content {
    margin-top: -80px; /* Adjust for smaller screens */
    padding: 15px;
  }

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

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 10px 20px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

  .page-blog__articles-grid,
  .page-blog__topics-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__article-content,
  .page-blog__topic-card,
  .page-blog__faq-question,
  .page-blog__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Mobile image responsiveness */
  .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-image-wrapper,
  .page-blog__cta-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
  }

  /* Ensure text contrast on dark backgrounds for mobile */
  .page-blog__dark-section,
  .page-blog__dark-bg {
    color: var(--f368-text-main) !important;
  }

  .page-blog__hero-content {
    background-color: rgba(17, 39, 27, 0.9) !important; /* Slightly less transparent on mobile */
  }
}

@media (max-width: 480px) {
  .page-blog__hero-content {
    margin-top: -60px;
  }
  .page-blog__main-title {
    font-size: clamp(1.5em, 7vw, 2em);
  }
  .page-blog__hero-description {
    font-size: 0.9em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
}