/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-color);
}

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

.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__dark-section {
  background-color: var(--bg-color);
  color: var(--text-main);
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

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

.page-blog__light-bg .page-blog__section-title,
.page-blog__text-contrast-fix {
  color: #333333;
}

.page-blog__text-block {
  max-width: 800px;
  margin: 0 auto 30px auto;
  font-size: 1.1em;
  line-height: 1.7;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 300px; /* Ensure a minimum height for smaller screens */
}

.page-blog__hero-content {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  background-color: var(--bg-color);
  position: relative; /* Ensure content is above any potential background overlaps */
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

/* Call to Action Buttons */
.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: #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: #ffffff;
  color: var(--main-color, #11A84E);
  border: 2px solid var(--main-color, #11A84E);
}

.page-blog__btn-secondary:hover {
  background: var(--main-color, #11A84E);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Grid Layout for Why Follow Section */
.page-blog__grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-blog__card {
  background-color: var(--card-bg);
  color: var(--text-main);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  border: 1px solid var(--border-color);
}

.page-blog__light-bg .page-blog__card {
  background-color: #ffffff;
  color: #333333;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
}

.page-blog__card-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-main);
}

.page-blog__light-bg .page-blog__card-title {
  color: #333333;
}

/* Article List Section */
.page-blog__article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.page-blog__article-card {
  background-color: var(--card-bg);
  color: var(--text-main);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

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

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

.page-blog__article-title {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__article-title a {
  color: var(--text-main);
  text-decoration: none;
}

.page-blog__article-title a:hover {
  color: var(--secondary-color, #22C768);
  text-decoration: underline;
}

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

.page-blog__article-excerpt {
  font-size: 1em;
  color: var(--text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  color: var(--secondary-color, #22C768);
  text-decoration: none;
  font-weight: bold;
  align-self: flex-start;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

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

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

.page-blog__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--text-main);
}

.page-blog__light-bg .page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  color: #333333;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-main);
  position: relative;
  user-select: none;
}

.page-blog__light-bg .page-blog__faq-question {
  color: #333333;
}

.page-blog__faq-item summary {
  list-style: none;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

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

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

.page-blog__light-bg .page-blog__faq-answer {
  color: #555555;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

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

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

  .page-blog__description {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .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;
  }

  .page-blog__grid-layout,
  .page-blog__article-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__article-title {
    font-size: 1.1em;
  }

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

  .page-blog__faq-answer {
    padding: 0 15px 15px 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-section,
  .page-blog__hero-image-wrapper,
  .page-blog__hero-content,
  .page-blog__grid-layout,
  .page-blog__article-list,
  .page-blog__article-card,
  .page-blog__faq-list,
  .page-blog__faq-item,
  .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;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  .page-blog__hero-section,
  .page-blog__why-follow,
  .page-blog__featured-categories,
  .page-blog__how-to-register,
  .page-blog__promotions,
  .page-blog__faq,
  .page-blog__join-community {
    padding-left: 0;
    padding-right: 0;
  }

  .page-blog__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }
}

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

.page-blog__btn-primary {
  background: var(--button-gradient);
}

.page-blog__card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
}

.page-blog__dark-section {
  background-color: var(--bg-color);
  color: var(--text-main);
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.page-blog__section-title,
.page-blog__card-title,
.page-blog__article-title a,
.page-blog__faq-question {
  color: var(--text-main);
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__card-title,
.page-blog__light-bg .page-blog__faq-question {
  color: #333333;
}

.page-blog__description,
.page-blog__text-block,
.page-blog__article-excerpt,
.page-blog__article-meta,
.page-blog__faq-answer {
  color: var(--text-secondary);
}

.page-blog__light-bg .page-blog__description,
.page-blog__light-bg .page-blog__text-block,
.page-blog__light-bg .page-blog__faq-answer {
  color: #555555;
}

.page-blog__article-title a:hover,
.page-blog__read-more {
  color: var(--secondary-color);
}