/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background: var(--bg-color, #FFFFFF); /* Inherit from shared or default to white */
}

/* 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 */
  overflow: hidden;
  box-sizing: border-box;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  color: #FFFFFF; /* Text color for dark background */
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.page-blog__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

/* General container and section styles */
.page-blog__container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em); /* Responsive font size */
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #26A9E0;
}

/* Card styles */
.page-blog__card {
  background: #ffffff;
  color: #333333;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Button styles */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: #EA7C07; /* Login color */
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}

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

.page-blog__btn-secondary {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.page-blog__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
}

.page-blog__latest-posts .page-blog__section-title {
  color: #26A9E0;
}

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

.page-blog__post-card {
  display: flex;
  flex-direction: column;
}

.page-blog__post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  display: block;
}

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

.page-blog__post-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: #26A9E0;
  text-decoration: none;
}

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

.page-blog__post-meta {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 15px;
}

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

.page-blog__read-more {
  color: #EA7C07;
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
}

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

.page-blog__view-all-button-container {
  text-align: center;
}

.page-blog__latest-posts .page-blog__btn-primary {
  background: #26A9E0;
  border-color: #26A9E0;
  color: #FFFFFF;
}

.page-blog__latest-posts .page-blog__btn-primary:hover {
  background: #1e87bb;
  border-color: #1e87bb;
}

/* Categories Section */
.page-blog__categories {
  padding: 60px 0;
  background: #26A9E0;
  color: #FFFFFF;
}

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

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

.page-blog__category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #333333;
  background: #FFFFFF;
}

.page-blog__category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
  display: block;
}

.page-blog__category-title {
  font-size: 1.2em;
  font-weight: 600;
  color: #26A9E0;
}

/* Why Read Section */
.page-blog__why-read {
  padding: 60px 0;
}

.page-blog__why-read .page-blog__section-title {
  color: #26A9E0;
}

.page-blog__why-read .page-blog__description {
  color: #555555;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px auto;
}

.page-blog__benefit-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
}

.page-blog__benefit-item {
  background: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__benefit-title {
  font-size: 1.3em;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-blog__benefit-text {
  color: #555555;
}

/* Featured Article Section */
.page-blog__featured-article {
  padding: 60px 0;
  background: #26A9E0;
  color: #FFFFFF;
}

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

.page-blog__featured-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #FFFFFF;
  color: #333333;
}

.page-blog__featured-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 8px 0 0 8px;
  display: block;
}

.page-blog__featured-content {
  width: 50%;
  padding: 30px;
}

.page-blog__featured-title {
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__featured-title a {
  color: #26A9E0;
  text-decoration: none;
}

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

.page-blog__featured-excerpt {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 20px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
}

.page-blog__faq-section .page-blog__section-title {
  color: #26A9E0;
}

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

.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: 600;
  color: #26A9E0;
  cursor: pointer;
  list-style: none; /* For details summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For details summary */
}

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

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

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

.page-blog__cta-section .page-blog__description {
  color: #f0f0f0;
  max-width: 800px;
  margin: 0 auto 30px auto;
}

.page-blog__cta-section .page-blog__btn-primary {
  background: #EA7C07;
  border-color: #EA7C07;
  color: #FFFFFF;
}

.page-blog__cta-section .page-blog__btn-primary:hover {
  background: #d46b00;
  border-color: #d46b00;
}

.page-blog__cta-section .page-blog__btn-secondary {
  background: transparent;
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.page-blog__cta-section .page-blog__btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Theme specific colors */
.page-blog__dark-bg {
  background: #26A9E0;
  color: #ffffff;
}

.page-blog__light-bg {
  background: #ffffff;
  color: #333333;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__featured-card {
    flex-direction: column;
  }

  .page-blog__featured-image,
  .page-blog__featured-content {
    width: 100%;
    border-radius: 8px;
  }

  .page-blog__featured-image {
    border-radius: 8px 8px 0 0;
  }

  .page-blog__featured-content {
    padding-top: 20px;
  }
}

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

  .page-blog__hero-content {
    padding: 0 15px;
  }

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

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

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

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

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

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

  .page-blog__category-item {
    padding: 20px;
  }

  .page-blog__category-icon {
    width: 80px;
    height: 80px;
  }

  .page-blog__featured-title {
    font-size: 1.5em;
  }

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

  /* Mobile specific overrides with !important */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__why-read,
  .page-blog__featured-article,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__hero-image-wrapper,
  .page-blog__post-grid,
  .page-blog__categories-grid,
  .page-blog__benefit-list,
  .page-blog__featured-card,
  .page-blog__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow for sections/containers */
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  .page-blog__cta-button,
  .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;
  }
  
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
  }
}