/* style/blog.css */

/* Custom Colors */
:root {
  --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-start: #2AD16F;
  --page-blog-btn-gradient-end: #13994A;
}

/* 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); /* Body background color */
}

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

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6); /* Slightly dim the image for text contrast, without changing color hue */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin-top: -150px; /* Pull content up over the image for better visual flow */
  padding: 20px;
  background: linear-gradient(to top, var(--page-blog-deep-green) 0%, rgba(10, 75, 44, 0.5) 100%); /* Gradient to blend with image */
  border-radius: 8px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: bold;
  color: var(--page-blog-text-main);
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 30px;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, var(--page-blog-btn-gradient-start) 0%, var(--page-blog-btn-gradient-end) 100%);
  color: #ffffff;
  border: 2px solid transparent;
}

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--page-blog-btn-gradient-start);
  border: 2px solid var(--page-blog-btn-gradient-start);
}

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-btn-gradient-start);
  color: #ffffff;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  color: var(--page-blog-text-main);
  text-align: center;
  margin-bottom: 50px;
}

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

.page-blog__post-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  border: 1px solid var(--page-blog-border);
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.page-blog__post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-blog__post-content {
  padding: 25px;
}

.page-blog__post-title {
  font-size: 1.4em;
  color: var(--page-blog-text-main);
  margin-bottom: 10px;
  line-height: 1.4;
}

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

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

/* Guides and Tips Section */
.page-blog__guides-tips {
  padding: 80px 0;
  background-color: #ffffff; /* Light background for contrast */
  color: #333333; /* Dark text for light background */
}

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

.page-blog__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__feature-card {
  background-color: #f8f8f8; /* Lighter card background */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
  transition: transform 0.3s ease;
}

.page-blog__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-blog__feature-title {
  font-size: 1.5em;
  color: #11A84E; /* Brand color for titles */
  margin-bottom: 15px;
}

.page-blog__feature-title a {
  text-decoration: none;
  color: #11A84E;
}

.page-blog__feature-title a:hover {
  text-decoration: underline;
}

.page-blog__feature-text {
  font-size: 1em;
  color: #555555;
  margin-bottom: 20px;
}

.page-blog__link-more {
  display: inline-block;
  color: #11A84E;
  text-decoration: none;
  font-weight: bold;
  position: relative;
}

.page-blog__link-more::after {
  content: '→';
  margin-left: 5px;
  transition: margin-left 0.3s ease;
}

.page-blog__link-more:hover::after {
  margin-left: 10px;
}

/* CTA Banner Section */
.page-blog__cta-banner {
  padding: 80px 0;
  background-color: var(--page-blog-deep-green);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-blog__cta-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.page-blog__cta-content {
  flex: 1;
  text-align: left;
}

.page-blog__cta-title {
  font-size: 2.2em;
  color: var(--page-blog-text-main);
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.1em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 30px;
}

.page-blog__cta-image-wrapper {
  flex: 0 0 400px; /* Fixed width for image */
  height: 300px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.page-blog__cta-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

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

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

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

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

.page-blog__faq-item summary:hover {
  background-color: rgba(var(--page-blog-border-rgb), 0.2);
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--page-blog-btn-gradient-start);
  margin-left: 15px;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

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

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

.page-blog__faq-answer a {
  color: var(--page-blog-btn-gradient-start);
  text-decoration: none;
}

.page-blog__faq-answer a:hover {
  text-decoration: underline;
}

/* General text and elements */
.page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
  color: var(--page-blog-text-main);
}

.page-blog p, .page-blog li {
  color: var(--page-blog-text-secondary);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    margin-top: -100px;
  }

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

  .page-blog__cta-container {
    flex-direction: column-reverse;
    text-align: center;
  }

  .page-blog__cta-content {
    text-align: center;
  }

  .page-blog__cta-image-wrapper {
    flex: none;
    width: 100%;
    max-width: 500px;
    height: auto;
    margin-bottom: 30px;
  }

  .page-blog__cta-image {
    height: auto;
  }
}

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

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

  .page-blog__hero-content {
    margin-top: -80px;
    padding: 15px;
  }

  .page-blog__main-title {
    font-size: 1.8em !important;
  }

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

  .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 15px;
    margin: 0 auto;
  }

  .page-blog__latest-posts,
  .page-blog__guides-tips,
  .page-blog__cta-banner,
  .page-blog__faq-section {
    padding: 40px 0;
  }

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

  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 40px;
  }

  .page-blog__post-grid,
  .page-blog__feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__post-content,
  .page-blog__feature-card,
  .page-blog__faq-item summary,
  .page-blog__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-banner .page-blog__cta-container {
    padding: 0 15px;
  }

  .page-blog__cta-title {
    font-size: 1.8em;
  }

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

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

  .page-blog__faq-item summary {
    font-size: 1.1em;
  }

  /* Image responsiveness for all images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* All containers with images/content to prevent overflow */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__feature-card,
  .page-blog__cta-container,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__guides-tips,
  .page-blog__cta-banner,
  .page-blog__faq-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-blog__hero-image-wrapper {
    max-height: 300px;
  }

  .page-blog__hero-image {
    filter: brightness(0.5) !important;
  }
}