/* style/blog.css */

/* Body background is #1a1a2e (dark), so default text color should be light */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #ffffff; /* Default text color for dark body background */
  line-height: 1.6;
}

.page-blog__dark-bg {
  background-color: #017439;
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #ffffff;
  color: #333333;
}

.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, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: inherit;
  line-height: 1.2;
}

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

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 30px;
}

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

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

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  margin-bottom: 20px;
  color: #FFFF00; /* Custom color for register/login font */
  line-height: 1.1;
}

.page-blog__hero-description {
  font-size: clamp(18px, 2.5vw, 22px);
  margin-bottom: 30px;
  color: #ffffff;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
}

.page-blog__btn-primary {
  background-color: #C30808; /* Custom color for register */
  color: #FFFF00; /* Custom color for register/login font */
  border: 2px solid #C30808;
}

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

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

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

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
}

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

.page-blog__post-card {
  background-color: #f8f8f8;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  color: #333333;
}

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

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

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

.page-blog__post-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: #017439;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #C30808;
}

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

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

.page-blog__read-more {
  display: inline-block;
  color: #017439;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #C30808;
}

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

.page-blog__view-all-posts .page-blog__btn-secondary {
  color: #017439;
  border-color: #017439;
  background-color: transparent;
}

.page-blog__view-all-posts .page-blog__btn-secondary:hover {
  background-color: #017439;
  color: #ffffff;
}

/* Featured Post Section */
.page-blog__featured-post {
  padding: 80px 0;
}

.page-blog__featured-content {
  display: flex;
  flex-direction: row;
  gap: 40px;
  align-items: center;
}

.page-blog__featured-image {
  width: 50%;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.page-blog__featured-text {
  width: 50%;
}

.page-blog__featured-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__featured-title a {
  color: #FFFF00;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__featured-title a:hover {
  color: #ffffff;
}

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

.page-blog__featured-excerpt {
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 30px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
}

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

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

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: #017439;
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: #e6f7ed;
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

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

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
}

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

/* Responsive Design */
@media (max-width: 992px) {
  .page-blog__hero-image-wrapper {
    margin-bottom: 20px;
  }

  .page-blog__featured-content {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__featured-image,
  .page-blog__featured-text {
    width: 100%;
  }

  .page-blog__featured-image {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__featured-post,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__hero-content,
  .page-blog__container {
    padding: 0 15px;
  }

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

  .page-blog__section-subtitle {
    font-size: 15px;
    margin-bottom: 30px;
  }

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

  .page-blog__hero-description {
    font-size: 16px;
  }

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

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

  .page-blog__post-title {
    font-size: 18px;
  }

  .page-blog__featured-title {
    font-size: 26px;
  }

  .page-blog__featured-excerpt {
    font-size: 16px;
  }

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__featured-content,
  .page-blog__featured-image,
  .page-blog__featured-text,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-section {
    padding-top: 10px !important;
  }

  /* Mobile 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;
  }

  .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-direction: column !important;
    gap: 15px;
  }

  .page-blog__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}