/* style/blog.css */
:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --text-on-dark: #FFFFFF;
  --text-on-light: #333333;
  --bg-dark: #0a0a0a;
  --bg-light: #f8f9fa;
  --login-color: #EA7C07;
}

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-on-dark); /* Body background is dark, so text is light */
  background-color: var(--bg-dark); /* Ensure consistency if body background is overridden */
}

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

.page-blog__section {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 42px);
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 30px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__sub-title {
  font-size: clamp(22px, 3vw, 30px);
  color: var(--secondary-color);
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 600;
}

.page-blog__text-block {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-on-dark);
}

.page-blog__highlight {
  color: var(--primary-color);
  font-weight: bold;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--bg-dark);
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 900px;
  margin-top: -80px; /* Overlap slightly for visual effect, but not text on image */
  position: relative; /* Ensure z-index works */
  z-index: 10;
  background-color: var(--bg-dark);
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.page-blog__main-title {
  font-size: clamp(32px, 5vw, 50px);
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 20px;
  color: var(--text-on-dark);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-blog__btn-primary:hover {
  background-color: #208DBF; /* Darken primary color */
  border-color: #208DBF;
}

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

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

/* List styles */
.page-blog__list {
  list-style: none;
  padding: 0;
  margin-left: 20px;
  color: var(--text-on-dark);
}

.page-blog__list-item {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
  font-size: 17px;
}

.page-blog__list-item::before {
  content: '✔';
  color: var(--primary-color);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: bold;
}

/* Article Grid */
.page-blog__articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__article-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  color: var(--text-on-dark);
}

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

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

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

.page-blog__article-title {
  font-size: 22px;
  margin-bottom: 10px;
  min-height: 60px; /* Ensure consistent card height */
}

.page-blog__article-title a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

.page-blog__article-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 16px;
  color: var(--text-on-dark);
  margin-bottom: 20px;
  min-height: 80px; /* Consistent excerpt height */
}

.page-blog__read-more-btn {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 5px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

/* Section specific colors */
.page-blog__dark-bg {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

.page-blog__dark-bg .page-blog__section-title,
.page-blog__dark-bg .page-blog__sub-title {
  color: var(--secondary-color);
}

.page-blog__dark-bg .page-blog__text-block {
  color: var(--secondary-color);
}

.page-blog__light-bg {
  background-color: var(--bg-light);
  color: var(--text-on-light);
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__sub-title {
  color: var(--primary-color);
}

.page-blog__light-bg .page-blog__text-block {
  color: var(--text-on-light);
}

.page-blog__light-bg .page-blog__highlight {
  color: var(--primary-color);
}

/* CTA Section */
.page-blog__cta-section {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  text-align: center;
  padding: 80px 20px;
}

.page-blog__cta-title {
  font-size: clamp(30px, 4.5vw, 45px);
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__cta-description {
  font-size: 20px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--bg-dark);
  padding: 60px 0;
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
  color: var(--secondary-color);
  position: relative;
  list-style: none; /* For <details> summary */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for <details> */
}

.page-blog__faq-toggle {
  font-size: 24px;
  line-height: 1;
  color: var(--primary-color);
  margin-left: 15px;
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Rotate for 'x' or '-' effect */
}

.page-blog__faq-answer {
  padding: 0 20px 20px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -60px;
  }
}

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

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

  .page-blog__hero-section {
    padding: 40px 0 20px; /* Adjust padding for mobile */
    padding-top: 10px !important; /* body handles header offset */
  }

  .page-blog__hero-content {
    padding: 30px 15px;
    margin-top: -40px; /* Adjust overlap */
  }

  .page-blog__main-title {
    font-size: clamp(28px, 8vw, 40px);
  }

  .page-blog__description {
    font-size: 18px;
  }

  .page-blog__section-title {
    font-size: clamp(24px, 7vw, 36px);
  }

  .page-blog__sub-title {
    font-size: clamp(20px, 6vw, 28px);
  }

  .page-blog__text-block {
    font-size: 16px;
  }

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

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

  .page-blog__article-title {
    font-size: 20px;
    min-height: unset;
  }

  .page-blog__article-excerpt {
    min-height: unset;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0 !important;
    margin-bottom: 15px;
  }

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

  .page-blog__cta-title {
    font-size: clamp(26px, 7vw, 38px);
  }

  .page-blog__cta-description {
    font-size: 18px;
  }

  /* Ensure all images are responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__article-card,
  .page-blog__section,
  .page-blog__container,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__faq-question {
    font-size: 16px;
  }

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

@media (max-width: 480px) {
  .page-blog__hero-content {
    margin-top: -30px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 12px 20px;
    font-size: 16px;
  }
}