/* style/blog.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #EA7C07;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-light: #f8f8f8;
  --background-dark: #26A9E0;
  --border-color: #e0e0e0;
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--background-light);
}

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

.page-blog__section-title {
  font-size: 36px;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-blog__hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive font size */
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

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

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

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button--primary {
  background: var(--primary-color);
  color: var(--text-color-light);
  border: 2px solid var(--primary-color);
}

.page-blog__cta-button--primary:hover {
  background: #208bc4; /* Darken primary color */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-button--secondary {
  background: var(--text-color-light);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__cta-button--secondary:hover {
  background: #f0f0f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

.page-blog__article-card {
  background: var(--text-color-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: var(--text-color-dark);
}

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

.page-blog__article-image {
  width: 100%;
  height: 250px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  filter: none; /* Ensure no filter applied */
}

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

.page-blog__article-title {
  font-size: 22px;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__article-title a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

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

.page-blog__article-excerpt {
  font-size: 16px;
  color: #555;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__article-date {
  font-size: 14px;
  color: #777;
  margin-top: auto; /* Pushes date and read more to bottom */
  margin-bottom: 10px;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  margin-top: 10px;
}

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

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

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

.page-blog__faq-section .page-blog__section-title {
  color: var(--text-color-light);
}

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

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-color-light);
}

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

details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: rgba(255, 255, 255, 0.15);
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}

.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--text-color-light);
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  color: var(--text-color-light);
}

.page-blog__faq-answer p {
  margin: 0;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 32px;
  }
  .page-blog__hero-description {
    font-size: 17px;
  }
  .page-blog__article-title {
    font-size: 20px;
  }
  .page-blog__article-image {
    height: 220px;
  }
  .page-blog__faq-qtext {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__main-title {
    font-size: clamp(24px, 6vw, 40px);
  }
  .page-blog__hero-description {
    font-size: 16px;
  }
  .page-blog__cta-group {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-blog__articles-section, .page-blog__faq-section {
    padding: 60px 0;
  }
  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }
  .page-blog__articles-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__article-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  .page-blog__article-image {
    max-width: 100% !important;
    width: 100% !important;
    height: 200px; /* Adjust height for mobile */
  }
  .page-blog__article-content {
    padding: 20px;
  }
  .page-blog__article-title {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .page-blog__article-excerpt {
    font-size: 15px;
  }
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px 20px;
  }
  .page-blog__faq-qtext {
    font-size: 16px;
  }
  .page-blog__faq-toggle {
    font-size: 24px;
    width: 24px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 20px 20px;
  }
  .page-blog__faq-answer p {
    font-size: 15px;
  }
  .page-blog__container {
    padding: 0 15px;
  }
  /* Ensure all image containers are constrained */
  .page-blog__section, .page-blog__card, .page-blog__container, .page-blog__articles-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* Color contrast specific rules */
.page-blog__dark-bg {
  background: var(--background-dark);
  color: var(--text-color-light);
}

.page-blog__light-bg {
  background: var(--background-light);
  color: var(--text-color-dark);
}

.page-blog__dark-bg .page-blog__section-title {
  color: var(--text-color-light);
}

.page-blog__dark-bg .page-blog__faq-question,
.page-blog__dark-bg .page-blog__faq-qtext,
.page-blog__dark-bg .page-blog__faq-toggle {
  color: var(--text-color-light);
}

.page-blog__dark-bg details.page-blog__faq-item {
  border-color: rgba(255, 255, 255, 0.3);
}

.page-blog__dark-bg details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: rgba(255, 255, 255, 0.2);
}

.page-blog__dark-bg .page-blog__faq-answer {
  background: rgba(0, 0, 0, 0.2);
}

/* Ensure no image filters */
.page-blog img {
  filter: none; /* Explicitly remove any potential filter */
}

/* Mobile button specific padding for responsiveness */
@media (max-width: 768px) {
  .page-blog__cta-group .page-blog__cta-button {
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__view-all-posts .page-blog__cta-button {
    padding-left: 15px;
    padding-right: 15px;
  }
}