/* style/blog.css */

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

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

.page-blog__section-title {
  font-size: clamp(2em, 4vw, 2.8em);
  font-weight: 700;
  color: var(--Text-Main);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-blog__description {
  font-size: 1.1em;
  color: var(--Text-Secondary);
  line-height: 1.8;
  margin-bottom: 30px;
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px;
}

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

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

.page-blog__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em);
  font-weight: 800;
  color: var(--Text-Main);
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.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: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background: var(--Button-Color);
  color: var(--Text-Main);
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: none;
  color: var(--Text-Main);
  border: 2px solid var(--border);
}

.page-blog__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

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

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

.page-blog__post-card {
  background-color: var(--Card-B-G);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--Text-Main);
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--Text-Secondary);
  line-height: 1.6;
  flex-grow: 1;
}

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

/* About Section */
.page-blog__about-section {
  padding: 80px 0;
  background-color: var(--Deep-Green);
}

.page-blog__about-section .page-blog__container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.page-blog__about-content {
  flex: 1;
}

.page-blog__about-image-wrapper {
  flex: 1;
  text-align: center;
}

.page-blog__about-image {
  width: 100%;
  height: auto;
  max-width: 600px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

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

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

.page-blog__faq-item {
  background-color: var(--Card-B-G);
  border: 1px solid var(--Divider);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--Text-Main);
}

.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: 600;
  cursor: pointer;
  outline: none;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-qtext {
  flex-grow: 1;
  color: var(--Text-Main);
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: var(--Glow);
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1em;
  color: var(--Text-Secondary);
  line-height: 1.6;
}

/* CTA Bottom Section */
.page-blog__cta-bottom-section {
  padding: 80px 0;
  text-align: center;
  background-color: var(--Deep-Green);
}

/* Color Contrast & Specific Styles */
.page-blog__dark-bg {
  background-color: var(--background);
  color: var(--Text-Main);
}

.page-blog__light-bg {
  background-color: var(--background);
  color: var(--Text-Main);
}

.page-blog p,
.page-blog li {
  color: var(--Text-Secondary);
}

.page-blog h1, .page-blog h2, .page-blog h3, .page-blog h4, .page-blog h5, .page-blog h6 {
  color: var(--Text-Main);
}

/* Responsive Styles */
@media (max-width: 992px) {
  .page-blog__about-section .page-blog__container {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__about-image-wrapper {
    order: -1;
    margin-bottom: 30px;
  }
}

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

  .page-blog__main-title {
    font-size: 2.2em;
  }

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
  }

  .page-blog__latest-posts,
  .page-blog__about-section,
  .page-blog__faq-section,
  .page-blog__cta-bottom-section {
    padding: 50px 0;
  }

  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }

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

  .page-blog__post-title {
    font-size: 1.2em;
  }

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

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

  /* Responsive images, videos, buttons MUST */
  .page-blog img {
    max-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__about-image-wrapper {
    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-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column;
  }
}

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

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

  .page-blog__post-title {
    font-size: 1.1em;
  }
}