/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Body background is dark (#0a0a0a), so text is light */
  background-color: transparent; /* Rely on body's background from shared.css */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for text readability */
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px; /* Space between image and text */
}

.page-blog__hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.page-blog__hero-content {
  max-width: 800px;
  margin: 0 auto;
  z-index: 1;
}

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff; /* Ensure high contrast */
  max-width: 100%;
  margin-bottom: 20px;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 100%;
}

/* Buttons */
.page-blog__btn-primary {
  display: inline-block;
  background-color: #26A9E0; /* Primary brand color */
  color: #ffffff;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

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

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

/* Content Sections */
h2.page-blog__section-title {
  font-size: 2.2em;
  color: #ffffff; /* Light text for dark body background */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-blog__latest-articles,
.page-blog__categories-section,
.page-blog__featured-guide,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Article Grid */
.page-blog__article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.page-blog__article-card {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly visible card on dark 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;
  color: #ffffff; /* Ensure text is light */
  display: flex;
  flex-direction: column;
}

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

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

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

.page-blog__article-card-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: bold;
}

.page-blog__article-card-title a {
  color: #26A9E0; /* Brand color for links */
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-blog__article-card-meta {
  font-size: 0.9em;
  color: #cccccc;
  margin-bottom: 15px;
}

.page-blog__article-card-description {
  font-size: 1em;
  color: #f0f0f0;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__btn-readmore {
  align-self: flex-start; /* Align button to the start */
}

/* Categories Section */
.page-blog__categories-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-blog__category-item a {
  display: block;
  background-color: rgba(38, 169, 224, 0.1); /* Light brand color background */
  color: #26A9E0;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  font-weight: bold;
}

.page-blog__category-item a:hover {
  background-color: #26A9E0;
  color: #ffffff;
}

/* Featured Guide Section */
.page-blog__featured-guide-content {
  display: flex;
  gap: 40px;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 30px;
  color: #ffffff;
}

.page-blog__featured-guide-image-wrapper {
  flex: 1;
  min-width: 300px;
}

.page-blog__featured-guide-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.page-blog__featured-guide-text {
  flex: 2;
}

.page-blog__featured-guide-title {
  font-size: 2em;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__featured-guide-description {
  margin-bottom: 25px;
  color: #f0f0f0;
}

/* FAQ Section */
.page-blog__faq-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin-bottom: 15px;
  color: #ffffff;
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  color: #ffffff;
}

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

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

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: #26A9E0;
}

.page-blog__faq-answer {
  padding: 0 25px 18px;
  font-size: 1em;
  color: #cccccc;
}

/* CTA Section */
.page-blog__cta-section {
  text-align: center;
  background-color: #26A9E0; /* Use primary brand color as background */
  color: #ffffff;
  border-radius: 8px;
  padding: 50px 20px;
}

.page-blog__cta-title {
  font-size: 2.5em;
  color: #ffffff;
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

/* Responsive Styles */
@media (max-width: 992px) {
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px;
  }

  .page-blog__main-title {
    font-size: 2em;
  }

  .page-blog__latest-articles,
  .page-blog__categories-section,
  .page-blog__featured-guide,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 15px;
  }

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

  .page-blog__featured-guide-image-wrapper {
    min-width: unset;
    width: 100%;
  }

  h2.page-blog__section-title {
    font-size: 1.8em;
  }

  .page-blog__cta-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  /* Global responsive image/video/button rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container,
  .page-blog__latest-articles,
  .page-blog__categories-section,
  .page-blog__featured-guide,
  .page-blog__faq-section,
  .page-blog__cta-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  .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 !important;
    padding-right: 15px !important;
  }

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

  .page-blog__video-section {
    padding-top: 10px !important;
  }

  .page-blog__hero-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .page-blog__main-title {
    font-size: 1.8em;
  }

  .page-blog__hero-description {
    font-size: 1em;
  }

  h2.page-blog__section-title {
    font-size: 1.6em;
  }

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

  .page-blog__featured-guide-title {
    font-size: 1.5em;
  }

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

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

  .page-blog__cta-title {
    font-size: 1.8em;
  }
}