/* style/blog.css */

/* --- Custom CSS Variables (Must be at the top of the file) --- */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* --- General Blog Page Styles --- */
.page-blog {
  font-family: Arial, sans-serif;
  color: var(--text-main); /* Default text color for the page, #F2FFF6 for dark background */
  background-color: var(--background-color); /* #08160F */
  line-height: 1.6;
}

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

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

.page-blog__section-title--dark {
    color: var(--text-main); /* #F2FFF6 */
}

.page-blog__section-subtitle {
  font-size: 1.1em;
  color: var(--text-secondary); /* #A7D9B8 */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__section-subtitle--dark {
    color: var(--text-secondary); /* #A7D9B8 */
}

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--background-color); /* #08160F */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 40px; /* Space between image and content */
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

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

.page-blog__main-title {
  font-weight: bold;
  color: var(--text-main); /* #F2FFF6 */
  margin-bottom: 20px;
  font-size: clamp(2em, 4vw, 3.2em);
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: var(--text-secondary); /* #A7D9B8 */
  margin-bottom: 30px;
}

.page-blog__cta-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--button-gradient); /* Custom button gradient */
  color: var(--text-main); /* #F2FFF6 */
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--gold); /* #F2C14E */
  border: 2px solid var(--gold); /* #F2C14E */
}

.page-blog__btn-secondary:hover {
  background-color: rgba(242, 193, 78, 0.1); /* Light gold background on hover */
  transform: translateY(-2px);
}

/* --- Latest Articles Section --- */
.page-blog__latest-articles {
  padding: 80px 0;
  background-color: var(--background-color); /* #08160F */
}

.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(--card-bg); /* #11271B */
  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__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-blog__article-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--text-main); /* #F2FFF6 */
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__article-date {
  font-size: 0.9em;
  color: var(--text-secondary); /* #A7D9B8 */
  margin-bottom: 15px;
}

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

.page-blog__read-more-btn {
  color: var(--glow); /* #57E38D */
  font-weight: bold;
  text-decoration: none;
  align-self: flex-start;
}

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

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

/* --- Categories Section --- */
.page-blog__categories {
  padding: 80px 0;
  background-color: var(--deep-green); /* #0A4B2C */
}

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

.page-blog__category-card {
  background-color: var(--card-bg); /* #11271B */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-bottom: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__category-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  margin-bottom: 20px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--text-main); /* #F2FFF6 */
  margin-bottom: 10px;
  padding: 0 15px;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: var(--text-secondary); /* #A7D9B8 */
  padding: 0 15px;
}

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

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

.page-blog__faq-item {
  background-color: var(--card-bg); /* #11271B */
  border: 1px solid var(--divider); /* #1E3A2A */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-main); /* #F2FFF6 */
  transition: background-color 0.3s ease;
}

.page-blog__faq-item summary:hover {
  background-color: rgba(34, 199, 104, 0.1); /* Light hover effect */
}

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

.page-blog__faq-qtext {
  flex-grow: 1;
}

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

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

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

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

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

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

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

  .page-blog__section-subtitle {
    font-size: 1em;
  }

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

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

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

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

  .page-blog__description {
    font-size: 0.95em;
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__latest-articles,
  .page-blog__categories,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 60px 0;
  }

  .page-blog__articles-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  /* Mobile image specific rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Mobile video specific rules (if any videos were added) */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  
  .page-blog__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  /* All containers with images/videos/buttons should have proper mobile width */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-articles,
  .page-blog__categories,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__articles-grid,
  .page-blog__categories-grid,
  .page-blog__cta-group {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Ensure image placeholders are not affected by filter */
.page-blog img {
  filter: none;
}

/* Content area image CSS size check */
/* This rule targets all images within .page-blog, ensuring they are not too small */
.page-blog__article-image,
.page-blog__category-image {
    min-width: 200px;
    min-height: 150px; /* Adjust min-height for these specific images as per their display height, ensuring >200px or suitable */
}

/* Ensure the hero-image takes full width of its container on desktop */
.page-blog__hero-image {
    width: 100%;
}