/* General styles for blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #FFF3E6; /* Text Main */
  background: #0D0E12; /* Background */
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 10px; /* Small top padding, assuming body handles header offset */
  margin-bottom: 40px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit hero image height */
}

.page-blog__hero-content {
  position: relative;
  background: rgba(13, 14, 18, 0.85); /* Semi-transparent background */
  padding: 30px;
  margin-top: -100px; /* Overlap slightly with image for visual effect */
  border-radius: 10px;
  max-width: 90%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.page-blog__main-title {
  font-size: clamp(28px, 4vw, 48px); /* Responsive H1 font size */
  color: #FFB04D; /* Glow */
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 18px;
  color: #FFF3E6; /* Text Main */
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary,
.page-blog__read-more-btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%; /* For mobile adaptation */
  white-space: normal; /* For mobile adaptation */
  word-wrap: break-word; /* For mobile adaptation */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Button Gradient */
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 10px rgba(255, 165, 58, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
  box-shadow: 0 6px 15px rgba(255, 165, 58, 0.6);
}

.page-blog__btn-secondary {
  background: transparent;
  color: #FFA53A; /* Auxiliary */
  border: 2px solid #FFA53A; /* Auxiliary */
  box-shadow: 0 2px 8px rgba(255, 165, 58, 0.2);
}

.page-blog__btn-secondary:hover {
  background: #FFA53A; /* Auxiliary */
  color: #0D0E12; /* Background */
  box-shadow: 0 4px 10px rgba(255, 165, 58, 0.4);
}

.page-blog__read-more-btn {
  background: #A84F0C; /* Border */
  color: #FFF3E6; /* Text Main */
  border: none;
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 5px;
}

.page-blog__read-more-btn:hover {
  background: #FF8C1A; /* Main Color */
}

/* Section Titles */
.page-blog__section-title {
  font-size: 36px;
  color: #FFB04D; /* Glow */
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
  line-height: 1.3;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 0;
  background: #17191F; /* Card BG */
  color: #FFF3E6; /* Text Main */
}

.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: #0D0E12; /* Background */
  border: 1px solid #A84F0C; /* Border */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

.page-blog__post-title {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-blog__post-title a {
  color: #FFB04D; /* Glow */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #FFA53A; /* Auxiliary */
}

.page-blog__post-meta {
  font-size: 14px;
  color: #A84F0C; /* Border */
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: #FFF3E6; /* Text Main */
  margin-bottom: 20px;
  flex-grow: 1;
}

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

/* About Blog Section */
.page-blog__about-blog {
  padding: 60px 0;
  background: #0D0E12; /* Background */
  color: #FFF3E6; /* Text Main */
  text-align: center;
}

.page-blog__about-blog .page-blog__section-title {
  margin-bottom: 30px;
}

.page-blog__text-block {
  max-width: 800px;
  margin: 0 auto 20px auto;
  font-size: 17px;
  line-height: 1.7;
  color: #FFF3E6; /* Text Main */
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 60px 0;
  background: #17191F; /* Card BG */
  color: #FFF3E6; /* Text Main */
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #A84F0C; /* Border */
  overflow: hidden;
  background: #0D0E12; /* Background */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: #FFB04D; /* Glow */
}
details.page-blog__faq-item summary.page-blog__faq-question::-webkit-details-marker {
  display: none;
}
details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: rgba(255, 139, 26, 0.1); /* Lighter hover for dark background */
}
.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
}
.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #FFA53A; /* Auxiliary */
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #17191F; /* Card BG */
  border-radius: 0 0 10px 10px;
  color: #FFF3E6; /* Text Main */
}
.page-blog__faq-answer p {
  margin-top: 0;
  margin-bottom: 0;
}
.page-blog__faq-answer a {
  color: #FFA53A; /* Auxiliary */
  text-decoration: underline;
}
.page-blog__faq-answer a:hover {
  color: #FFB04D; /* Glow */
}

/* CTA Banner Section */
.page-blog__cta-banner {
  padding: 60px 0;
  text-align: center;
}

.page-blog__cta-banner .page-blog__container {
  background: #17191F; /* Card BG */
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  position: relative;
}

.page-blog__cta-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  z-index: 0;
}

.page-blog__cta-content {
  position: relative;
  z-index: 1;
}

.page-blog__cta-title {
  font-size: 38px;
  color: #FFB04D; /* Glow */
  margin-bottom: 20px;
  font-weight: 700;
}

.page-blog__cta-description {
  font-size: 20px;
  color: #FFF3E6; /* Text Main */
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -80px;
    padding: 25px;
  }
  .page-blog__main-title {
    font-size: clamp(24px, 3.5vw, 40px);
  }
  .page-blog__hero-description {
    font-size: 17px;
  }
  .page-blog__section-title {
    font-size: 32px;
  }
  .page-blog__cta-title {
    font-size: 32px;
  }
  .page-blog__cta-description {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    margin-bottom: 30px;
  }
  .page-blog__hero-content {
    margin-top: -60px;
    padding: 20px;
    max-width: calc(100% - 30px); /* Adjust for padding */
  }
  .page-blog__main-title {
    font-size: clamp(22px, 6vw, 36px);
  }
  .page-blog__hero-description {
    font-size: 15px;
    margin-bottom: 20px;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .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;
  }
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column;
  }

  .page-blog__latest-posts,
  .page-blog__about-blog,
  .page-blog__faq-section,
  .page-blog__cta-banner {
    padding: 40px 0;
  }
  .page-blog__section-title {
    font-size: 28px;
    margin-bottom: 25px;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .page-blog__post-title {
    font-size: 20px;
  }
  .page-blog__post-excerpt {
    font-size: 15px;
  }
  .page-blog__text-block {
    font-size: 15px;
  }
  details.page-blog__faq-item summary.page-blog__faq-question { padding: 15px; }
  .page-blog__faq-qtext { font-size: 16px; }
  .page-blog__faq-toggle { font-size: 24px; width: 24px; height: 24px;}
  details.page-blog__faq-item .page-blog__faq-answer { padding: 0 15px 15px; }

  .page-blog__cta-banner .page-blog__container {
    padding: 30px 15px;
  }
  .page-blog__cta-title {
    font-size: 28px;
  }
  .page-blog__cta-description {
    font-size: 16px;
  }

  /* General image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__cta-banner .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Color contrast rules - adapted for dark background body */
.page-blog {
  color: #FFF3E6; /* Text Main - light text for dark background */
  background: #0D0E12; /* Background - dark */
}

.page-blog__card, .page-blog__post-card {
  background: #0D0E12; /* Background - dark */
  color: #FFF3E6; /* Text Main - light text */
}

.page-blog__light-bg {
  background: #17191F; /* Card BG - dark */
  color: #FFF3E6; /* Text Main - light text */
}

.page-blog__dark-bg {
  background: #0D0E12; /* Background - dark */
  color: #FFF3E6; /* Text Main - light text */
}

/* Ensure link colors are visible */
.page-blog a {
  color: #FFA53A; /* Auxiliary */
}
.page-blog a:hover {
  color: #FFB04D; /* Glow */
}