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

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

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

.page-blog__section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-blog__section-description {
  font-size: 18px;
  color: #666666;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__section-description--light {
  color: #cccccc;
}

/* 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, body handles header offset */
  background-color: var(--bg-light);
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-blog__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: clamp(28px, 4vw, 48px); /* Using clamp for responsive H1 font size */
}

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

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  background: darken(var(--secondary-color), 10%); /* Placeholder for darker color */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Blog Posts Section */
.page-blog__posts-section {
  padding: 80px 0;
  background-color: var(--bg-white);
}

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

.page-blog__post-card {
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-blog__post-thumbnail {
  width: 100%;
  height: 220px; /* Fixed height for thumbnails */
  overflow: hidden;
}

.page-blog__post-thumbnail img {
  width: 100%;
  height: 100%;
  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: 22px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

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

.page-blog__post-meta {
  font-size: 14px;
  color: #999999;
  margin-bottom: 15px;
}

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

.page-blog__read-more-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start;
  display: flex;
  align-items: center;
}

.page-blog__read-more-link:hover {
  color: darken(var(--primary-color), 10%); /* Placeholder for darker color */
}

.page-blog__read-more-link span {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.page-blog__read-more-link:hover span {
  transform: translateX(3px);
}

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

.page-blog__view-all-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__view-all-button:hover {
  background: darken(var(--primary-color), 10%); /* Placeholder for darker color */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: var(--text-light);
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 150px;
}

.page-blog__category-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.page-blog__category-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-light);
}

.page-blog__category-count {
  font-size: 16px;
  color: #e0e0e0;
}

/* Featured Article Section */
.page-blog__featured-section {
  padding: 80px 0;
  background-color: var(--bg-white);
}

.page-blog__featured-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.page-blog__featured-image {
  flex: 1;
  min-width: 400px;
}

.page-blog__featured-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__featured-text {
  flex: 2;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dark);
}

.page-blog__featured-text p {
  margin-bottom: 1em;
}

.page-blog__featured-text strong {
  color: var(--primary-color);
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: var(--primary-color);
  text-align: center;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  flex-shrink: 0;
}

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

.page-blog__btn-primary:hover {
  background: darken(var(--secondary-color), 10%); /* Placeholder for darker color */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-blog__btn-secondary {
  background: var(--bg-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

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

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

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: #f5f5f5;
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--text-dark);
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: var(--bg-light);
  border-radius: 0 0 5px 5px;
  color: #555555;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__featured-content {
    flex-direction: column;
    align-items: center;
  }
  .page-blog__featured-image {
    min-width: unset;
    width: 100%;
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__hero-section,
  .page-blog__posts-section,
  .page-blog__categories-section,
  .page-blog__featured-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .page-blog__section-description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-blog__main-title {
    font-size: clamp(24px, 7vw, 36px);
    margin-bottom: 10px;
  }

  .page-blog__intro-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-blog__cta-button,
  .page-blog__view-all-button,
  .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: 12px 20px;
    font-size: 16px;
  }

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

  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__post-title {
    font-size: 18px;
  }

  .page-blog__categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__category-title {
    font-size: 20px;
  }

  .page-blog__featured-text {
    font-size: 15px;
  }

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }

  .page-blog__faq-qtext {
    font-size: 15px;
  }

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

  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__hero-section,
  .page-blog__posts-section,
  .page-blog__categories-section,
  .page-blog__featured-section,
  .page-blog__cta-section,
  .page-blog__faq-section,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__hero-container,
  .page-blog__hero-image,
  .page-blog__hero-content,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}