/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #FFFFFF;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #FFFFFF;
  overflow: hidden;
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.page-blog__hero-title {
  font-size: 2.5em;
  font-weight: 700;
  line-height: 1.2;
  color: #26A9E0;
  margin-bottom: 15px;
  letter-spacing: -0.02em;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
}

.page-blog__hero-cta {
  display: inline-block;
  padding: 12px 28px;
  background-color: #26A9E0;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__hero-cta:hover {
  background-color: #1e87b7;
}

/* General container for content sections */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: 2em;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
}

.page-blog__section-title--light {
  color: #FFFFFF;
}

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

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  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 6px 20px rgba(0, 0, 0, 0.12);
}

.page-blog__post-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card appearance */
  object-fit: cover;
  display: block;
}

.page-blog__post-card a {
  text-decoration: none;
  color: inherit;
}

.page-blog__post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85em;
  color: #777777;
  padding: 15px 20px 0;
}

.page-blog__post-category {
  background-color: #e0f2f7;
  color: #26A9E0;
  padding: 4px 10px;
  border-radius: 3px;
  font-weight: 600;
}

.page-blog__post-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #333333;
  margin: 15px 20px 10px;
  line-height: 1.4;
}

.page-blog__post-title a:hover {
  color: #26A9E0;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #666666;
  margin: 0 20px 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  padding: 8px 15px;
  background-color: #f0f0f0;
  color: #26A9E0;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 600;
  margin: 0 20px 20px;
  align-self: flex-start;
  transition: background-color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  background-color: #e0e0e0;
}

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

.page-blog__view-all-posts {
  display: inline-block;
  padding: 12px 30px;
  border: 2px solid #26A9E0;
  color: #26A9E0;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__view-all-posts:hover {
  background-color: #26A9E0;
  color: #FFFFFF;
}

/* Categories Section */
.page-blog__categories {
  padding: 60px 0;
  background-color: #26A9E0; /* Brand primary color for dark background */
  color: #FFFFFF; /* White text for dark background */
}

.page-blog__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

/* Why Choose Section */
.page-blog__why-choose {
  padding: 80px 0;
  background-color: #FFFFFF;
}

.page-blog__why-choose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: center;
}

@media (min-width: 992px) {
  .page-blog__why-choose-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.page-blog__why-choose-content {
  text-align: left;
}

.page-blog__why-choose-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-blog__why-choose-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  display: block;
}

.page-blog__text-block {
  color: #555555;
  margin-bottom: 25px;
}

.page-blog__feature-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-blog__feature-item {
  margin-bottom: 10px;
  color: #333333;
  position: relative;
  padding-left: 25px;
}

.page-blog__feature-item::before {
  content: '✓';
  color: #26A9E0;
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* CTA Section */
.page-blog__cta {
  padding: 80px 0;
  background-color: #26A9E0;
  color: #FFFFFF;
  text-align: center;
}

.page-blog__cta-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Button Base Styles */
.page-blog__btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background-color: #EA7C07; /* Login color for primary CTA */
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background-color: #d16b06;
}

.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  background-color: transparent;
  color: #FFFFFF;
  text-decoration: none;
  border: 2px solid #FFFFFF;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__btn-secondary:hover {
  background-color: #FFFFFF;
  color: #26A9E0;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #f9f9f9;
}

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

.page-blog__faq-item {
  background-color: #FFFFFF;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.15em;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-question:hover {
  background-color: #f0f0f0;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #26A9E0;
  margin-left: 15px;
}

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

.page-blog__faq-answer {
  padding: 0 20px 20px;
  font-size: 1em;
  color: #555555;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .page-blog__hero-title {
    font-size: 2em;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__why-choose,
  .page-blog__cta,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__hero-content,
  .page-blog__post-grid,
  .page-blog__category-list,
  .page-blog__why-choose-grid,
  .page-blog__cta-buttons,
  .page-blog__faq-list {
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__hero-image {
    height: 250px; /* Adjust hero image height for mobile */
  }

  .page-blog__post-image {
    height: 180px; /* Adjust card image height for mobile */
  }

  /* Mobile button responsiveness */
  .page-blog__hero-cta,
  .page-blog__read-more-btn,
  .page-blog__view-all-posts,
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 10px; /* Add spacing between stacked buttons */
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  /* Mobile container/section adjustments */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

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

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

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

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

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

  .page-blog__why-choose-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__why-choose-content {
    text-align: center;
  }
  .page-blog__feature-item {
    padding-left: 0;
    text-align: left;
  }
  .page-blog__feature-item::before {
    left: -20px;
  }
  .page-blog__text-block {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-section {
    padding: 30px 10px;
  }
  .page-blog__hero-title {
    font-size: 1.5em;
  }
  .page-blog__hero-description {
    font-size: 0.9em;
  }
  .page-blog__section-title {
    font-size: 1.3em;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__category-item {
    padding: 8px 15px;
    font-size: 0.9em;
  }
}