/* style/blog.css */
/* Base styles */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: #ffffff; /* Default body background is white */
}

/* Sections */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: #f8f8f8; /* Light background for the hero section */
}

.page-blog__hero-image-wrapper {
    width: 100%;
    max-width: 1200px;
    margin-bottom: 30px; /* Space between image and content */
}

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

.page-blog__hero-content {
    max-width: 800px;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
  font-weight: 700;
  color: #26A9E0; /* Brand color for main title */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 15px;
}

.page-blog__section-subtitle {
  font-size: 1.1rem;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
  padding: 80px 0;
}

.page-blog__dark-bg {
  background-color: #26A9E0; /* Primary brand color for dark sections */
  color: #ffffff; /* White text for contrast */
  padding: 80px 0;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 1.05rem;
  text-align: center;
  box-sizing: border-box; /* Crucial for button responsiveness */
}

.page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for primary CTA */
  color: #ffffff;
  border: 2px solid #EA7C07;
  margin: 0 10px 10px 10px;
}

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

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
  margin: 0 10px 10px 10px;
}

.page-blog__btn-secondary:hover {
  background-color: #e0f4ff;
  color: #1e87c0;
}

/* Latest Articles */
.page-blog__latest-articles {
  padding: 80px 0;
}

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

.page-blog__article-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__article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__article-image-wrapper {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    overflow: hidden;
}

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

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

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

.page-blog__article-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #1e87c0;
}

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

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

.page-blog__read-more-btn {
  display: inline-block;
  color: #EA7C07;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
  align-self: flex-start;
}

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

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

/* Categories Section */
.page-blog__categories {
    padding: 80px 0;
}

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.15); /* Slightly transparent white on dark background */
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.page-blog__category-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #ffffff;
}

.page-blog__category-description {
  font-size: 1rem;
  color: #f0f0f0;
}

/* Featured Guides */
.page-blog__featured-guides {
    padding: 80px 0;
}

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

.page-blog__guide-item {
  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__guide-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__guide-image {
  width: 100%;
  height: 250px; /* Fixed height for guide images */
  object-fit: cover;
  display: block;
}

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

.page-blog__guide-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__guide-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__guide-title a:hover {
  color: #1e87c0;
}

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

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

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.15); /* Slightly transparent white on dark background */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none; /* For details/summary */
}
.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For details/summary */
}

.page-blog__faq-item[open] .page-blog__faq-question {
    border-bottom: none;
}

.page-blog__faq-qtext {
    flex-grow: 1;
    margin-right: 15px;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  width: 25px;
  text-align: center;
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: #f0f0f0;
  max-height: 0; /* Managed by JS for non-details or native for details */
  overflow: hidden; /* Managed by JS for non-details or native for details */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
    max-height: 500px; /* Sufficient height for content */
    padding-top: 15px;
}

/* CTA Section */
.page-blog__cta-section {
    padding: 80px 0;
    text-align: center;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  gap: 20px;
  margin-top: 30px;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .page-blog__section-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-blog__hero-section {
    padding-top: 10px !important; /* Ensure small top padding */
  }

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Images responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Image wrappers and containers */
  .page-blog__hero-image-wrapper,
  .page-blog__article-image-wrapper,
  .page-blog__guide-image,
  .page-blog__article-card,
  .page-blog__guide-item,
  .page-blog__category-card,
  .page-blog__faq-item,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Ensure no overflow */
  }
  
  /* Specific override for article image wrapper height on mobile if needed */
  .page-blog__article-image-wrapper {
      height: 180px; /* Adjust height for mobile if necessary */
  }
  .page-blog__guide-image {
      height: 200px; /* Adjust height for mobile if necessary */
  }

  /* Buttons responsiveness */
  .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;
    margin: 0 0 15px 0 !important; /* Stack buttons vertically */
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack CTA buttons */
    gap: 15px; /* Adjust gap */
  }

  .page-blog__article-grid,
  .page-blog__category-grid,
  .page-blog__guide-list {
    grid-template-columns: 1fr; /* Single column layout for grids */
  }

  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }
}

/* Contrast fixes for critical areas */
.page-blog p,
.page-blog li,
.page-blog__article-excerpt,
.page-blog__guide-excerpt {
  color: #333333; /* Ensure dark text on light background */
}

/* For dark background sections, ensure light text */
.page-blog__dark-bg p,
.page-blog__dark-bg li,
.page-blog__dark-bg .page-blog__section-subtitle,
.page-blog__dark-bg .page-blog__category-description,
.page-blog__dark-bg .page-blog__faq-answer {
  color: #f0f0f0; /* Slightly off-white for readability */
}