/* style/blog.css */
.page-blog {
  color: #ffffff; /* Body background is dark, so use light text */
}

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

.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 */
  background-color: #1a1a2e; /* Match body background for consistency */
}

.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: 8px;
  object-fit: cover;
}

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

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

.page-blog__description {
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

.page-blog__btn-primary,
.page-blog__btn-secondary {
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

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

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

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

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

.page-blog__latest-posts-section,
.page-blog__detailed-content-section,
.page-blog__categories-section,
.page-blog__faq-section {
  padding: 60px 0;
  background-color: #1a1a2e; /* Match body background */
  color: #ffffff;
}

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

.page-blog__section-description {
  font-size: 1.1em;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0;
}

.page-blog__sub-section-title {
  font-size: clamp(1.5em, 2.5vw, 2.2em);
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #FFFFFF;
}

.page-blog__sub-sub-section-title {
  font-size: clamp(1.2em, 2vw, 1.8em);
  font-weight: 500;
  margin-top: 25px;
  margin-bottom: 15px;
  color: #f0f0f0;
}

.page-blog__detailed-content-section p {
  font-size: 1em;
  line-height: 1.7;
  margin-bottom: 15px;
  color: #e0e0e0;
}

.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: rgba(255, 255, 255, 0.05); /* Slightly transparent white for cards */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

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

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

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

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

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

.page-blog__post-card-readmore {
  color: #26A9E0;
  text-decoration: none;
  font-weight: 500;
  align-self: flex-start;
}

.page-blog__post-card-readmore:hover {
  text-decoration: underline;
}

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

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

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.08); /* Slightly transparent white for categories */
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  height: 100%; /* Ensure consistent height */
}

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

.page-blog__category-image {
  width: 100%;
  max-width: 200px; /* Constrain image size within card */
  height: auto;
  border-radius: 4px;
  margin-bottom: 15px;
  object-fit: cover;
}

.page-blog__category-name {
  font-size: 1.2em;
  font-weight: 600;
  text-align: center;
  color: #26A9E0;
}

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

.page-blog__faq-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #e0e0e0;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  color: #26A9E0;
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-blog__faq-question::-webkit-details-marker {
  display: none;
}

.page-blog__faq-question::marker {
  display: none;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

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

.page-blog__cta-section {
  padding: 80px 20px;
  text-align: center;
  background-color: #26A9E0; /* Brand color as background */
  color: #FFFFFF;
}

.page-blog__cta-section .page-blog__section-title {
  color: #FFFFFF;
  margin-bottom: 20px;
}

.page-blog__cta-section .page-blog__section-description {
  color: #f0f0f0;
  margin-bottom: 40px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

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

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    width: 100% !important;
    max-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__latest-posts-section,
  .page-blog__detailed-content-section,
  .page-blog__categories-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: clamp(1.5em, 7vw, 2em);
    margin-bottom: 15px;
  }

  .page-blog__section-description {
    font-size: 0.9em;
    margin-bottom: 25px;
  }

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

  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-image,
  .page-blog__post-card-image,
  .page-blog__category-image {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }

  .page-blog__hero-image-wrapper,
  .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: 0;
  }

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

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