/* style/blog.css */

/* Base styles for the page, ensuring light text on dark body background */
.page-blog {
  color: #ffffff; /* Light text for dark body background */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: transparent; /* Body background is handled by shared.css #1a1a2e */
}

.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: 40px;
  color: #26A9E0; /* Brand color for titles */
}

.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, body handles header offset */
  min-height: 500px;
  overflow: hidden;
  background-color: #1a1a2e; /* Ensure hero background matches body if image not full cover */
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  text-align: center;
  color: #ffffff;
  padding: 20px;
  background: rgba(0, 0, 0, 0.4); /* Slightly darker overlay for text readability */
  border-radius: 8px;
  margin-top: 100px; /* Push content down slightly for image visibility */
}

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: #FFFFFF;
}

.page-blog__hero-description {
  font-size: clamp(16px, 2vw, 20px);
  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 {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: background-color 0.3s ease, color 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for primary CTA */
  color: #FFFFFF;
  border: 2px solid #EA7C07;
}

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

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

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

.page-blog__introduction-section,
.page-blog__featured-articles-section,
.page-blog__faq-section {
  background-color: #FFFFFF;
  color: #333333;
  padding: 60px 0;
}

.page-blog__introduction-section p {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 20px auto;
  text-align: center;
}

.page-blog__dark-section {
  background-color: #1a1a2e;
  color: #ffffff;
  padding: 60px 0;
}

.page-blog__dark-section .page-blog__section-title {
  color: #26A9E0;
}

.page-blog__featured-topics-section {
  padding: 60px 0;
}

.page-blog__topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.page-blog__topic-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}

.page-blog__topic-card:hover {
  transform: translateY(-5px);
}

.page-blog__topic-card .page-blog__card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-blog__topic-card .page-blog__card-description {
  font-size: 16px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__btn-link {
  display: inline-block;
  background-color: #26A9E0;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__btn-link:hover {
  background-color: #1f8ac7;
}

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

.page-blog__article-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  color: #333333;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
}

.page-blog__article-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-blog__article-content {
  padding: 20px;
}

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

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

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

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

.page-blog__article-excerpt {
  font-size: 16px;
  color: #555555;
  margin-bottom: 20px;
}

.page-blog__btn-read-more {
  display: inline-block;
  background-color: #26A9E0;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__btn-read-more:hover {
  background-color: #1f8ac7;
}

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

.page-blog__why-choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.page-blog__why-choose-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.page-blog__why-choose-item .page-blog__item-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: #26A9E0;
}

.page-blog__why-choose-item .page-blog__item-description {
  font-size: 16px;
}

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

.page-blog__faq-item {
  background-color: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  color: #333333;
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  background-color: #eaf6ff; /* Light blue background for summary */
  color: #26A9E0;
  list-style: none;
}

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

.page-blog__faq-question .page-blog__faq-toggle {
  font-size: 24px;
  font-weight: 700;
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  padding: 20px;
  font-size: 16px;
  color: #555555;
  border-top: 1px solid #e0e0e0;
}

.page-blog__cta-final-section {
  padding: 80px 0;
  text-align: center;
  background-color: #1a1a2e;
  color: #ffffff;
}

.page-blog__cta-final-section .page-blog__section-title {
  color: #FFFFFF;
}

/* Responsive styles */
@media (max-width: 992px) {
  .page-blog__hero-content {
    margin-top: 50px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    min-height: 400px;
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    margin-top: 20px;
    padding: 15px;
  }

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

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

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

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

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

  .page-blog__introduction-section p {
    font-size: 16px;
  }

  .page-blog__topics-grid,
  .page-blog__articles-grid,
  .page-blog__why-choose-grid {
    grid-template-columns: 1fr;
    padding: 0 15px;
  }

  .page-blog__topic-card,
  .page-blog__article-card,
  .page-blog__why-choose-item {
    padding: 20px;
  }

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

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

  .page-blog__article-excerpt {
    font-size: 15px;
  }

  .page-blog__faq-item summary {
    font-size: 16px;
    padding: 15px;
  }

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

  /* Mobile image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__introduction-section,
  .page-blog__featured-topics-section,
  .page-blog__featured-articles-section,
  .page-blog__why-choose-section,
  .page-blog__faq-section,
  .page-blog__cta-final-section {
    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;
  }
}