/* style/blog.css */

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

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

.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(--page-blog-gold);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-blog__card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--page-blog-text-main);
  border: 1px solid var(--page-blog-border);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
  background-color: var(--page-blog-deep-green);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 40px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: none; /* Ensure no filter is applied */
}

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

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: 700;
  color: var(--page-blog-gold);
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-blog__hero-description {
  font-size: 1.15em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  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(--page-blog-btn-gradient);
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), 0 0 15px var(--page-blog-glow);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--page-blog-primary-color);
  border: 2px solid var(--page-blog-primary-color);
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background: rgba(var(--page-blog-primary-color), 0.1);
  color: var(--page-blog-glow);
  border-color: var(--page-blog-glow);
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
  background-color: var(--page-blog-background);
}

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

.page-blog__post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.page-blog__post-image {
  width: 100%;
  height: 225px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  filter: none; /* Ensure no filter is applied */
}

.page-blog__post-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-title a {
  color: var(--page-blog-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: var(--page-blog-glow);
}

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

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

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

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

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

.page-blog__category-card {
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 10px var(--page-blog-glow);
}

.page-blog__category-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  filter: none; /* Ensure no filter is applied */
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--page-blog-gold);
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: var(--page-blog-text-secondary);
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: var(--page-blog-primary-color);
  background-image: linear-gradient(135deg, var(--page-blog-primary-color) 0%, var(--page-blog-deep-green) 100%);
}

.page-blog__cta-section .page-blog__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

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

.page-blog__cta-image {
  flex-shrink: 0;
  width: 40%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  filter: none; /* Ensure no filter is applied */
}

.page-blog__cta-section .page-blog__section-title,
.page-blog__cta-section .page-blog__section-description {
  text-align: left;
  color: #ffffff;
}

.page-blog__cta-section .page-blog__btn-primary {
  background: var(--page-blog-btn-gradient);
  color: #ffffff;
  border: none;
}

.page-blog__cta-section .page-blog__btn-secondary {
  border-color: #ffffff;
  color: #ffffff;
}

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

.page-blog__faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__faq-item {
  cursor: pointer;
  border: 1px solid var(--page-blog-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.page-blog__faq-item[open] {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 15px var(--page-blog-glow);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: var(--page-blog-gold);
  cursor: pointer;
  list-style: none; /* Remove default marker for details summary */
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--page-blog-glow);
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--page-blog-text-main);
}

/* Contact CTA Section */
.page-blog__contact-cta {
  padding: 60px 0;
  text-align: center;
  background-color: var(--page-blog-card-bg);
  border-top: 1px solid var(--page-blog-divider);
}

.page-blog__contact-cta .page-blog__section-title {
  color: var(--page-blog-gold);
}

.page-blog__contact-cta .page-blog__section-description {
  color: var(--page-blog-text-secondary);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 0 40px;
  }

  .page-blog__cta-section .page-blog__container {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__cta-content {
    padding-right: 0;
    margin-bottom: 40px;
  }

  .page-blog__cta-image {
    width: 80%;
    max-width: 500px;
  }

  .page-blog__cta-section .page-blog__section-title,
  .page-blog__cta-section .page-blog__section-description {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important;
  }

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

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

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

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

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

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

  .page-blog__post-image,
  .page-blog__category-image {
    height: 180px;
  }

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

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

  /* Mobile container responsiveness */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories-section,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__contact-cta,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .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: hidden !important; /* Ensure content doesn't overflow */
  }

  .page-blog__cta-image {
    width: 100%;
  }

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

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

/* Ensure color contrast for dark background body */
.page-blog {
  color: var(--page-blog-text-main); /* #F2FFF6 */
}

.page-blog__card {
  background: var(--page-blog-card-bg); /* #11271B */
  color: var(--page-blog-text-main); /* #F2FFF6 */
}

/* Specific sections for color contrast */
.page-blog__dark-bg {
  background-color: var(--page-blog-deep-green);
  color: var(--page-blog-text-main);
}

.page-blog__light-bg {
  background-color: var(--page-blog-background);
  color: var(--page-blog-text-main);
}

.page-blog__medium-bg {
  background-color: var(--page-blog-primary-color);
  color: #ffffff;
}