/* style/blog.css */
/* BEM Naming: page-blog__element-name */

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

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main-color, #F2FFF6); /* Default text color for dark background */
  background-color: var(--background-color, #08160F); /* Ensure consistency with shared body BG */
}

/* Ensure body padding-top is handled by shared.css, no duplication here */

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px; /* Add horizontal padding for content */
  box-sizing: border-box;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  text-align: center;
  padding-top: 10px; /* Small top padding for visual separation from header */
  padding-bottom: 60px;
  background-color: var(--background-color, #08160F); /* Match body background */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 1200px; /* Constrain image width */
  margin-bottom: 30px; /* Space between image and text */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.page-blog__hero-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem); /* Responsive H1 font size */
  font-weight: 700;
  color: var(--text-main-color, #F2FFF6);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-cta-button {
  display: inline-block;
  background: var(--button-gradient); /* Custom button gradient */
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-blog__hero-cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* General Section Styles */
.page-blog__section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

.page-blog__section-title {
  font-size: 2.5rem;
  color: var(--text-main-color, #F2FFF6);
  text-align: center;
  margin-bottom: 25px;
  font-weight: 700;
}

.page-blog__section-text {
  font-size: 1.05rem;
  color: var(--text-secondary-color, #A7D9B8);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

/* Blog Grid */
.page-blog__grid-3-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__grid-2-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__blog-card,
.page-blog__news-card {
  background-color: var(--card-bg-color, #11271B); /* Custom card background */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

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

.page-blog__card-content {
  padding: 25px;
  flex-grow: 1; /* Allow content to grow */
  display: flex;
  flex-direction: column;
}

.page-blog__card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

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

.page-blog__card-meta {
  font-size: 0.9rem;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 15px;
}

.page-blog__card-excerpt {
  font-size: 1rem;
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__card-link {
  display: inline-block;
  color: var(--glow-color, #57E38D);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start; /* Align link to the start */
}

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

.page-blog__view-all-button-wrapper {
  text-align: center;
  margin-top: 40px;
}

.page-blog__view-all-button {
  display: inline-block;
  background: var(--button-gradient);
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 100%; /* Ensure responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-blog__view-all-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* List Styles */
.page-blog__list {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px auto;
  max-width: 800px;
}

.page-blog__list-item {
  background-color: var(--card-bg-color, #11271B);
  padding: 20px 25px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  font-size: 1rem;
  color: var(--text-secondary-color, #A7D9B8);
  border-left: 5px solid var(--deep-green-color, #0A4B2C); /* Custom border */
}

.page-blog__list-item strong {
  color: var(--text-main-color, #F2FFF6);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background-color: var(--background-color, #08160F);
}

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

.page-blog__faq-item {
  background-color: var(--card-bg-color, #11271B);
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color, #2E7A4E);
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main-color, #F2FFF6);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: rgba(var(--main-color-rgb), 0.1); /* Lighter hover for dark background */
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--glow-color, #57E38D);
  margin-left: 15px;
  line-height: 1;
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--text-secondary-color, #A7D9B8);
}

.page-blog__faq-answer p {
  margin-bottom: 0;
}

.page-blog__faq-answer a {
  color: var(--glow-color, #57E38D);
  text-decoration: underline;
}

/* CTA Section */
.page-blog__cta-section {
  text-align: center;
  padding: 80px 0;
  background-color: var(--deep-green-color, #0A4B2C); /* Darker background for CTA */
  color: #ffffff;
}

.page-blog__cta-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__cta-section .page-blog__section-text {
  color: var(--text-secondary-color, #A7D9B8);
  margin-bottom: 40px;
}

.page-blog__cta-section .page-blog__section-text a {
  color: var(--glow-color, #57E38D);
  text-decoration: underline;
}

/* Ensure contrast for links within dark background */
.page-blog a {
  color: var(--glow-color, #57E38D); /* Use a bright color for links */
}
.page-blog a:hover {
  color: var(--gold-color, #F2C14E); /* Change color on hover */
}

/* Ensure headings have good contrast */
.page-blog h1, .page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
  color: var(--text-main-color, #F2FFF6);
}

/* Ensure text in general elements maintain contrast */
.page-blog p, .page-blog li, .page-blog span {
  color: var(--text-secondary-color, #A7D9B8);
}

/* Specific contrast fix for dark background sections */
.page-blog__dark-section {
  background-color: var(--deep-green-color, #0A4B2C); /* Even darker green */
  color: #ffffff; /* Ensure white text */
}

.page-blog__dark-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__dark-section .page-blog__section-text {
  color: var(--text-secondary-color, #A7D9B8); /* Secondary text can be slightly off-white */
}

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

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

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

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

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

  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .page-blog__section-text {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-blog__grid-3-cols,
  .page-blog__grid-2-cols {
    grid-template-columns: 1fr; /* Stack cards on mobile */
    gap: 20px;
  }

  .page-blog__card-image {
    height: 180px; /* Adjust card image height */
  }

  .page-blog__card-content {
    padding: 20px;
  }

  .page-blog__card-title {
    font-size: 1.25rem;
  }

  .page-blog__list-item {
    padding: 15px 20px;
  }

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

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

  .page-blog__hero-cta-button,
  .page-blog__view-all-button,
  .page-blog__cta-section .page-blog__cta-button {
    width: 100% !important; /* Force full width on mobile */
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Image and Video responsive rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* If video were present, similar rules would apply */
  .page-blog video,
  .page-blog__video {
    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__video-section, /* If video were present */
  .page-blog__video-container, /* If video were present */
  .page-blog__video-wrapper, /* If video were present */
  .page-blog__cta-buttons, /* If multiple buttons */
  .page-blog__button-group, /* If multiple buttons */
  .page-blog__btn-container /* If multiple buttons */
  {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  /* Specific padding for hero section content to avoid double padding */
  .page-blog__hero-content {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__video-section {
    padding-top: 10px !important; /* body already has padding-top */
  }

  .page-blog__cta-section {
    padding: 60px 15px;
  }
}