/* style/blog.css */

/* --- Base Styles & Typography --- */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark #1a1a2e, so text should be light */
  background-color: transparent; /* Main content background is transparent, body handles the actual background */
}

.page-blog h1,
.page-blog h2,
.page-blog h3 {
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog h1 {
  /* No fixed font-size for H1, relying on surrounding elements and responsiveness */
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 90%; /* Limit width to prevent overly long lines */
  color: #ffffff;
}

.page-blog h2 {
  font-size: clamp(28px, 4vw, 38px);
  text-align: center;
  margin-bottom: 30px;
  color: #ffffff;
}

.page-blog h3 {
  font-size: clamp(20px, 3vw, 26px);
  color: #ffffff;
}

.page-blog p {
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-blog a {
  color: #26A9E0; /* Brand color for links */
  text-decoration: none;
}

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

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

/* --- Sections --- */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Ensure image is above content */
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  text-align: center;
  overflow: hidden; /* Ensure content doesn't spill */
}

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

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit height for aesthetic */
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-blog__hero-content {
  max-width: 800px;
  padding: 0 20px;
  color: #ffffff;
}

.page-blog__main-title {
  margin-bottom: 20px;
  color: #ffffff;
}

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

.page-blog__recent-posts,
.page-blog__featured-categories,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 0;
}

/* --- Color Backgrounds --- */
.page-blog__light-bg {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter background for contrast */
  color: #ffffff; /* Light text on light background (but still dark enough for contrast) */
}

.page-blog__dark-bg {
  background-color: #26A9E0; /* Brand color as background */
  color: #ffffff; /* White text on brand color */
}

.page-blog__dark-bg h2,
.page-blog__dark-bg h3,
.page-blog__dark-bg p {
  color: #ffffff;
}

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

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

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

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

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

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

.page-blog__post-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  color: #ffffff;
}

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

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #f0f0f0;
}

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

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

.page-blog__category-card {
  background-color: rgba(255, 255, 255, 0.15); /* Slightly transparent card background */
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #ffffff;
}

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

.page-blog__category-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 15px;
  display: block;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-blog__category-title {
  font-size: 1.2em;
  color: #ffffff;
  padding: 0 15px;
}

/* --- FAQ Section --- */
.page-blog__faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
  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 {
  background-color: rgba(255, 255, 255, 0.2);
}

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

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

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

.page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #ffffff;
  border: 2px solid #EA7C07;
  margin-right: 15px;
}

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: #26A9E0; /* Brand color */
  border: 2px solid #26A9E0;
}

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

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

/* --- Responsive Styles --- */
@media (max-width: 1024px) {
  .page-blog h1 {
    font-size: clamp(32px, 5vw, 48px);
  }
  .page-blog h2 {
    font-size: clamp(24px, 4.5vw, 36px);
  }
  .page-blog h3 {
    font-size: clamp(18px, 3.5vw, 24px);
  }
}

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

  .page-blog h1 {
    font-size: clamp(28px, 6vw, 42px);
  }
  .page-blog h2 {
    font-size: clamp(22px, 5vw, 32px);
  }
  .page-blog h3 {
    font-size: clamp(16px, 4vw, 20px);
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-blog__hero-image {
    max-height: 400px;
  }

  .page-blog__recent-posts,
  .page-blog__featured-categories,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__post-grid,
  .page-blog__category-grid {
    grid-template-columns: 1fr;
  }

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

  .page-blog__category-image {
    height: 150px;
  }

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    margin-right: 0;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Images responsive force */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  /* Containers for images/content */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Specific padding for hero/video sections */
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .page-blog__hero-content {
    padding: 0 15px;
  }
  .page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-answer {
    padding: 0 15px 15px;
  }

  /* Ensure content area images are not too small */
  .page-blog__post-image,
  .page-blog__category-image {
    min-width: 200px !important;
    min-height: 200px !important;
  }
}

/* Ensure no filter is used for images */
.page-blog img {
  filter: none !important;
}