/* style/blog.css */

:root {
  --page-blog-primary-color: #26A9E0;
  --page-blog-secondary-color: #FFFFFF;
  --page-blog-login-color: #EA7C07;
  --page-blog-dark-background: #1a1a2e; /* From body background color */
  --page-blog-light-text: #ffffff;
  --page-blog-dark-text: #333333;
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-blog-light-text); /* Default text color for dark body background */
  background-color: var(--page-blog-dark-background); /* Ensure consistency with body background */
}

/* Sections with light background */
.page-blog__latest-posts,
.page-blog__about-mg188 {
  background-color: var(--page-blog-secondary-color);
  color: var(--page-blog-dark-text);
  padding: 60px 0;
}

/* Sections with dark background */
.page-blog__hero-section,
.page-blog__cta-section,
.page-blog__faq-section {
  background-color: var(--page-blog-dark-background);
  color: var(--page-blog-light-text);
  padding: 60px 0;
}

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding as body handles header offset */
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3; /* Slightly dim the image for text readability */
  filter: none; /* Ensure no color filters are applied */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  color: var(--page-blog-light-text);
}

.page-blog__main-title {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--page-blog-light-text);
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.page-blog__hero-description {
  font-size: 1.15rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%; /* Ensure button adapts to mobile */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-light-text);
  border: 2px solid var(--page-blog-primary-color);
}

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--page-blog-primary-color);
  border: 2px solid var(--page-blog-primary-color);
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background-color: var(--page-blog-primary-color);
  color: var(--page-blog-light-text);
}

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

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherits from parent section */
}

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

.page-blog__post-card {
  background-color: #f8f9fa;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  filter: none; /* Ensure no color filters are applied */
}

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

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

.page-blog__post-title a {
  color: var(--page-blog-dark-text);
  text-decoration: none;
}

.page-blog__post-title a:hover {
  color: var(--page-blog-primary-color);
}

.page-blog__post-date {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1rem;
  color: var(--page-blog-dark-text);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--page-blog-primary-color);
  text-decoration: none;
  font-weight: 600;
  align-self: flex-start;
}

.page-blog__read-more:hover {
  text-decoration: underline;
}

.page-blog__view-all-wrapper {
  text-align: center;
  margin-top: 20px;
}

.page-blog__text-block {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: inherit;
}

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

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

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: var(--page-blog-light-text);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--page-blog-light-text);
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-item summary {
  list-style: none; /* Standard for details/summary */
}

.page-blog__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 0 25px 18px 25px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .page-blog__section-title {
    font-size: 2rem;
  }

  .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__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body handles header offset */
  }

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

  .page-blog__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  .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-left: 0 !important; /* Remove margin for stacked buttons */
    margin-bottom: 15px;
  }

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

  .page-blog__latest-posts,
  .page-blog__cta-section,
  .page-blog__about-mg188,
  .page-blog__faq-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
  }

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

  .page-blog__post-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

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

  .page-blog__post-title {
    font-size: 1.2rem;
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* Image responsiveness for content area */
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}