/* style/blog.css */

/* --- Base Styles --- */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark (#0a0a0a), so text should be light */
  background-color: transparent; /* Inherit from body or shared.css */
}

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

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 48px); /* H1 font size controlled by clamp */
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #ffffff; /* Default for dark sections */
}

.page-blog__section-description {
  font-size: clamp(16px, 2vw, 20px);
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image on top, content below */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #0a0a0a; /* Match body background for seamless look */
}

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

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

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

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 60px); /* H1 font size controlled by clamp */
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 20px;
  line-height: 1.1;
}

.page-blog__subtitle {
  font-size: clamp(18px, 2.5vw, 24px);
  color: #f0f0f0;
  margin-bottom: 30px;
}

/* --- Buttons --- */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
  box-sizing: border-box;
  max-width: 100%;
}

.page-blog__btn-primary {
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
  border: 2px solid #26A9E0;
  margin: 0 10px 10px 10px;
}

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

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

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

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

/* --- Sections --- */
.page-blog__dark-section {
  background-color: #0a0a0a; /* Dark background for sections */
  padding: 80px 0;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #ffffff; /* Light background for sections */
  padding: 80px 0;
  color: #333333; /* Dark text for light background */
}

.page-blog__dark-text {
  color: #333333; /* For titles/descriptions in light sections */
}

/* --- Featured Posts Grid --- */
.page-blog__featured-posts {
  padding-bottom: 40px; /* Adjust padding as needed */
}

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

.page-blog__post-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for cards on dark background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

.page-blog__post-content {
  padding: 20px;
}

.page-blog__post-title {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

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

.page-blog__post-excerpt {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: #26A9E0;
  font-weight: 600;
  text-decoration: none;
}

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

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

/* --- Categories Grid --- */
.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #f8f8f8; /* Light card background on light section */
  padding: 25px 15px;
  border-radius: 10px;
  text-decoration: none;
  color: #333333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-blog__category-icon {
  width: 80px; /* Display size for category icons */
  height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  color: #26A9E0; /* Brand color for category titles */
}

/* --- Guides & Tips Grid --- */
.page-blog__guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__guide-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for cards on dark background */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-blog__guide-content {
  padding: 20px;
}

.page-blog__guide-title {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.page-blog__guide-excerpt {
  font-size: 16px;
  color: #f0f0f0;
  margin-bottom: 20px;
}

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

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__faq-item {
  background-color: #f8f8f8; /* Light background for FAQ items on light section */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-blog__faq-item summary {
  list-style: none; /* Hide default marker */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 600;
  color: #26A9E0; /* Brand color for FAQ questions */
  cursor: pointer;
  outline: none;
  background-color: #ffffff; /* White background for summary */
  border-bottom: 1px solid #eeeeee;
}

.page-blog__faq-item summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: 700;
  margin-left: 15px;
  color: #26A9E0;
}

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 16px;
  color: #555555;
  background-color: #f8f8f8;
}

.page-blog__faq-answer p {
  margin: 0;
}

/* --- CTA Section --- */
.page-blog__cta-section {
  padding-top: 60px;
  padding-bottom: 80px;
  background: linear-gradient(135deg, #26A9E0, #1a7bbd); /* Gradient with brand color */
  text-align: center;
}

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

.page-blog__cta-section .page-blog__section-description {
  color: #e0f2f7;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px;
  }
  .page-blog__featured-posts,
  .page-blog__categories,
  .page-blog__guides-tips,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 60px 0;
  }
  .page-blog__container {
    padding: 0 15px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 30px 15px;
    padding-top: 10px !important; /* body already handles --header-offset */
  }

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

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

  .page-blog__main-title {
    font-size: 36px;
  }

  .page-blog__subtitle {
    font-size: 18px;
  }

  /* Force all images to be responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All image containers */
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__guide-card,
  .page-blog__category-card,
  .page-blog__container,
  .page-blog__section,
  .page-blog__posts-grid,
  .page-blog__categories-grid,
  .page-blog__guides-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Prevent content overflow */
  }

  /* Adjust specific image heights if needed, but ensure max-width: 100% */
  .page-blog__post-image,
  .page-blog__guide-image {
    height: 180px; /* Smaller fixed height for mobile cards */
  }

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

  /* Force all buttons to be responsive */
  .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 !important;
    padding-right: 15px !important;
    margin: 10px 0 !important; /* Stack buttons vertically */
  }

  /* Button containers */
  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__faq-item {
    margin-left: 0;
    margin-right: 0;
  }

  .page-blog__faq-item summary {
    padding: 15px 20px;
    font-size: 16px;
  }

  .page-blog__faq-answer {
    padding: 15px 20px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-section,
  .page-blog__featured-posts,
  .page-blog__categories,
  .page-blog__guides-tips,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }
  .page-blog__section-title {
    font-size: 24px;
  }
  .page-blog__main-title {
    font-size: 28px;
  }
  .page-blog__subtitle {
    font-size: 16px;
  }
}