/* style/blog.css */

/* Body background is var(--black-color) from shared.css, which is dark. Therefore, text should be light. */
.page-blog {
  color: #ffffff; /* Default text color for the page */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Rely on body background from shared.css */
}

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

.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

.page-blog__dark-section {
  background-color: #0d0d0d; /* Dark background to ensure contrast with light text */
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333; /* Dark text on light background */
}

.page-blog__section-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
  color: inherit;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  padding: 10px 0 60px; /* Small top padding, body handles header offset */
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4); /* Darken image for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
  text-align: center;
  color: #ffffff;
}

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -1px;
  color: #ffffff;
  margin-bottom: 20px;
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
}

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

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

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b6;
  border-color: #1e87b6;
}

.page-blog__btn-text {
  background: none;
  border: none;
  color: #26A9E0;
  padding: 0;
  margin: 0;
  text-decoration: underline;
  font-size: 1em;
}

.page-blog__btn-text:hover {
  color: #1e87b6;
}

.page-blog__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Keyword highlighting */
.page-blog__keyword {
  color: #26A9E0;
  font-weight: bold;
}

/* Category Overview */
.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__category-card {
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: left;
  color: #333333;
  display: flex;
  flex-direction: column;
}

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

.page-blog__category-card .page-blog__card-title {
  font-size: 1.4em;
  margin: 20px 20px 10px;
  color: #333333;
  line-height: 1.3;
}

.page-blog__category-card .page-blog__card-title a {
  color: #333333;
  text-decoration: none;
}

.page-blog__category-card .page-blog__card-title a:hover {
  color: #26A9E0;
}

.page-blog__category-card .page-blog__card-text {
  font-size: 0.95em;
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__category-card .page-blog__btn-secondary {
  margin: 0 20px 20px;
  align-self: flex-start;
  padding: 8px 18px;
  font-size: 0.9em;
}

/* Why Read Section */
.page-blog__advantage-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: left;
  margin-top: 40px;
}

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

.page-blog__advantage-title {
  font-size: 1.5em;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__advantage-text {
  font-size: 1em;
  color: #555555;
}

/* Featured Posts Section */
.page-blog__featured-posts {
  background-color: #1a1a1a;
  color: #ffffff;
}

.page-blog__featured-posts .page-blog__section-title,
.page-blog__featured-posts .page-blog__section-description {
  color: #ffffff;
}

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

.page-blog__post-card {
  background-color: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

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

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

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

.page-blog__post-card .page-blog__card-title a {
  color: #ffffff;
  text-decoration: none;
}

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

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

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

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

/* FAQ Section */
.page-blog__faq-section {
  background-color: #f0f8ff; /* Light background for FAQ */
  color: #333333;
}

.page-blog__faq-section .page-blog__section-title,
.page-blog__faq-section .page-blog__section-description {
  color: #333333;
}

.page-blog__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
  text-align: left;
}

.page-blog__faq-item {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.1em;
  font-weight: bold;
  color: #333333;
  cursor: pointer;
  background-color: #fbfbfb;
  border-bottom: 1px solid #e0e0e0;
  user-select: none;
  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: #e6f7ff; /* Lighter background when open */
  border-bottom: 1px solid #cceeff;
}

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

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

.page-blog__faq-answer {
  padding: 15px 25px 20px;
  font-size: 1em;
  color: #555555;
  line-height: 1.6;
}

.page-blog__faq-answer p {
  margin-bottom: 0;
  color: #555555;
}

.page-blog__faq-answer a {
  color: #26A9E0;
  text-decoration: underline;
}

.page-blog__faq-answer a:hover {
  color: #1e87b6;
}

/* Final CTA Section */
.page-blog__cta-final {
  background-color: #26A9E0;
  color: #ffffff;
  padding: 80px 0;
}

.page-blog__cta-final .page-blog__section-title,
.page-blog__cta-final .page-blog__section-description {
  color: #ffffff;
}

.page-blog__cta-final .page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for primary CTA */
  border-color: #EA7C07;
}

.page-blog__cta-final .page-blog__btn-primary:hover {
  background-color: #c96806;
  border-color: #c96806;
}

.page-blog__cta-final .page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border-color: #ffffff;
}

.page-blog__cta-final .page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1e87b6;
  border-color: #f0f0f0;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__hero-content {
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 5vw, 3em);
  }
  .page-blog__hero-description {
    font-size: 1.1em;
  }
  .page-blog__category-grid,
  .page-blog__post-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

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

  .page-blog__container {
    padding: 0 15px !important; /* Mobile padding */
  }

  .page-blog__section {
    padding: 40px 0;
  }

  .page-blog__hero-section {
    min-height: 400px;
    padding-top: 10px !important;
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
  }

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

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

  /* Image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__hero-image {
    width: 100%; /* Important for object-fit in wrapper */
    height: 100%;
  }

  /* Card image specific adjustments if needed */
  .page-blog__category-image,
  .page-blog__post-image {
    height: 180px;
  }

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px;
    overflow: hidden !important;
  }

  .page-blog__category-card .page-blog__btn-secondary {
    width: auto !important;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
  }

  .page-blog__post-card .page-blog__btn-text {
    align-self: center;
  }

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

  .page-blog__cta-final {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__main-title {
    font-size: clamp(1.2em, 7vw, 2em);
  }
  .page-blog__hero-section {
    min-height: 350px;
  }
  .page-blog__hero-description {
    font-size: 0.95em;
  }
  .page-blog__category-card .page-blog__card-title,
  .page-blog__post-card .page-blog__card-title {
    font-size: 1.2em;
  }
  .page-blog__category-image,
  .page-blog__post-image {
    height: 150px;
  }
  .page-blog__advantage-item {
    padding: 20px;
  }
  .page-blog__advantage-title {
    font-size: 1.3em;
  }
  .page-blog__faq-question {
    font-size: 0.95em;
  }
}