/* style/blog.css */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: transparent; /* Body background is handled by shared.css */
}

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

.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  background-color: #0a0a0a; /* Ensure hero section background matches body for seamless look */
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly darken image for text readability */
}

.page-blog__hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  max-width: 800px;
  padding: 20px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
  line-height: 1.2;
}

.page-blog__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 30px;
  color: #f0f0f0;
}

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

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

.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: #26A9E0;
  border: 2px solid #26A9E0;
}

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

.page-blog__section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: #ffffff;
}

.page-blog__intro-section {
  padding: 80px 0;
}

.page-blog__intro-section p {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #f0f0f0;
  text-align: justify;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg p,
.page-blog__light-bg h3,
.page-blog__light-bg a {
  color: #ffffff; /* Ensure light text on dark background */
}

.page-blog__dark-bg {
  background-color: #1a1a1a; /* Slightly lighter dark background for contrast */
  padding: 80px 0;
}

.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg p,
.page-blog__dark-bg h3,
.page-blog__dark-bg a {
  color: #ffffff;
}

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

.page-blog__article-card,
.page-blog__category-item {
  background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent white card background */
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__article-card:hover,
.page-blog__category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

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

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

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

.page-blog__card-meta {
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 15px;
}

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

.page-blog__read-more {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 600;
  margin-top: auto; /* Push to bottom */
}

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

.page-blog__category-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 15px 0 10px;
  text-align: center;
}

.page-blog__category-title a {
  color: #ffffff;
  text-decoration: none;
}

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

.page-blog__category-item p {
  font-size: 0.95rem;
  color: #e0e0e0;
  padding: 0 15px 20px;
  text-align: center;
}

.page-blog__news-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 40px;
}

.page-blog__news-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 25px;
  transition: box-shadow 0.3s ease;
}

.page-blog__news-item:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.page-blog__news-date {
  font-size: 0.9rem;
  color: #cccccc;
  margin-bottom: 10px;
}

.page-blog__news-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.page-blog__news-title a {
  color: #ffffff;
  text-decoration: none;
}

.page-blog__news-title a:hover {
  color: #26A9E0;
}

.page-blog__news-excerpt {
  font-size: 1rem;
  color: #e0e0e0;
  margin-bottom: 15px;
}

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

.page-blog__faq-section {
  padding: 80px 0;
}

.page-blog__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  color: #ffffff;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Old versions of Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently supported by Chrome, Edge, Opera and Firefox */
  list-style: none; /* For details/summary */
}

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

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

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

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-left: 15px;
  color: #26A9E0;
}

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

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

.page-blog__cta-content {
  color: #ffffff;
}

.page-blog__cta-content .page-blog__section-title {
  color: #ffffff;
}

.page-blog__cta-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    max-width: 90%;
  }
  .page-blog__main-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
  }
  .page-blog__subtitle {
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  }
}

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

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

  .page-blog__hero-section {
    padding: 10px 0 40px 0;
  }

  .page-blog__hero-image-wrapper {
    max-height: 50vh;
  }

  .page-blog__hero-content {
    position: static;
    transform: none;
    padding: 20px 0;
    max-width: 100%;
  }

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

  .page-blog__subtitle {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    margin-bottom: 20px;
  }

  .page-blog__cta-group {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 15px;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: clamp(1.6rem, 6vw, 2rem);
    margin-bottom: 30px;
  }

  .page-blog__intro-section,
  .page-blog__featured-articles,
  .page-blog__categories,
  .page-blog__latest-news,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

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

  .page-blog__card-image,
  .page-blog__category-image {
    height: 180px;
  }

  .page-blog__card-title,
  .page-blog__category-title {
    font-size: 1.2rem;
  }

  .page-blog__news-title {
    font-size: 1.1rem;
  }

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

  .page-blog__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95rem;
  }

  /* 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 {
    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; /* body already handles --header-offset */
  }

  /* Mobile video responsiveness (if any video was present) */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-blog__video-section {
    padding-top: 10px !important;
  }
  .page-blog__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mobile button responsiveness */
  .page-blog__cta-button,
  .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 {
    flex-direction: column;
  }
}

/* FAQ details/summary styling for native behavior */
.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}