/* style/blog.css */

/* Custom properties for colors */
:root {
  --primary-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: #0A4B2C;
}

/* 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); /* From custom colors: #08160F */
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--text-main); /* #F2FFF6 */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--text-secondary); /* #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;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, larger bottom for content */
  overflow: hidden;
  background-color: var(--bg-color);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 600px; /* Limit image height to prevent it from being too tall */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and content */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.page-blog__hero-content {
  max-width: 900px;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size for H1 */
  color: var(--text-main); /* #F2FFF6 */
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

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

.page-blog__cta-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Featured Categories Section */
.page-blog__featured-categories {
  padding: 80px 0;
  background-color: var(--card-bg);
}

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

.page-blog__category-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
}

.page-blog__category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.page-blog__card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: bold;
  padding: 20px 20px 10px 20px;
  color: var(--text-main); /* #F2FFF6 */
}

.page-blog__card-title a {
  color: var(--text-main); /* #F2FFF6 */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__card-title a:hover {
  color: var(--glow-color); /* #57E38D */
}

.page-blog__card-text {
  font-size: 1em;
  color: var(--text-secondary); /* #A7D9B8 */
  padding: 0 20px 15px 20px;
  flex-grow: 1;
}

.page-blog__card-link {
  display: inline-block;
  color: var(--glow-color); /* #57E38D */
  text-decoration: none;
  font-weight: bold;
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  transition: color 0.3s ease;
}

.page-blog__card-link:hover {
  color: #ffffff;
}

/* Why Follow Section */
.page-blog__why-follow-section {
  padding: 80px 0;
  background-color: #ffffff; /* Light background for contrast */
  color: #333333; /* Dark text for contrast */
}

.page-blog__why-follow-section .page-blog__section-title,
.page-blog__why-follow-section .page-blog__section-description {
  color: #333333; /* Ensure dark text on light background */
}

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

.page-blog__benefit-item {
  background-color: #f8f8f8; /* Slightly off-white for card */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  color: #333333;
}

.page-blog__benefit-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--deep-green); /* #0A4B2C */
}

.page-blog__benefit-text {
  font-size: 1em;
  color: #555555;
}

/* Recent Articles Section */
.page-blog__recent-articles {
  padding: 80px 0;
  background-color: var(--bg-color);
}

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

.page-blog__article-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
}

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

.page-blog__article-card .page-blog__card-image {
  height: 200px;
}

.page-blog__article-card .page-blog__card-title {
  font-size: 1.3em;
}

.page-blog__article-card .page-blog__card-text {
  font-size: 0.95em;
}

.page-blog__view-all-button-wrapper {
  text-align: center;
}

.page-blog__view-all-button {
  padding: 12px 25px;
  font-size: 1em;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #f0f0f0; /* Light background for contrast */
  color: #333333; /* Dark text for contrast */
}

.page-blog__faq-section .page-blog__section-title,
.page-blog__faq-section .page-blog__section-description {
  color: #333333; /* Ensure dark text on light background */
}

.page-blog__faq-list {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--deep-green); /* #0A4B2C */
  background-color: #fcfcfc;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-question:hover {
  background-color: #e8e8e8;
}

.page-blog__faq-answer {
  padding: 15px 25px 20px 25px;
  border-top: 1px solid #e0e0e0;
  font-size: 0.95em;
  color: #555555;
}

/* Subscribe Section */
.page-blog__subscribe-section {
  padding: 80px 0;
  background-color: var(--deep-green); /* Dark background */
  color: var(--text-main);
}

.page-blog__subscribe-section .page-blog__section-title,
.page-blog__subscribe-section .page-blog__section-description {
  color: var(--text-main); /* Ensure light text on dark background */
}

.page-blog__subscribe-form {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  margin: 40px auto 0 auto;
  gap: 15px;
}

.page-blog__subscribe-input {
  flex-grow: 1;
  padding: 15px 20px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1em;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  outline: none;
}

.page-blog__subscribe-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Color Contrast Adjustments */
.page-blog__dark-section {
  background-color: var(--card-bg); /* #11271B */
  color: var(--text-main); /* #F2FFF6 */
}

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

.page-blog__text-contrast-fix {
  color: #333333 !important;
}

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

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

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

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

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

  .page-blog__subtitle {
    font-size: 1em;
  }

  .page-blog__cta-button {
    width: 100% !important; /* Ensure full width on mobile */
    max-width: 300px !important; /* Limit max width for better appearance */
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__category-card,
  .page-blog__benefit-item,
  .page-blog__article-card {
    margin-left: 15px;
    margin-right: 15px;
  }

  .page-blog__subscribe-form {
    flex-direction: column;
    padding: 0 15px;
  }

  .page-blog__subscribe-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__subscribe-section .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__category-card,
  .page-blog__article-card,
  .page-blog__container,
  .page-blog__subscribe-form {
    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;
  }

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

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

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.8em;
  }

  .page-blog__cta-button {
    font-size: 1em;
    padding: 12px 20px;
  }

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