/* style/blog.css */

/* General styles for the blog page content */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #ffffff; /* Default text color for dark body background */
  background-color: #0a0a0a; /* Ensure consistency with body background */
}

.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: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #26A9E0;
}

.page-blog__section-description {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  color: #f0f0f0;
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 20px;
  box-sizing: border-box;
}

.page-blog__main-title {
  font-weight: bold;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #26A9E0;
  margin-bottom: 15px;
}

.page-blog__description {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #ffffff;
}

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

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

.page-blog__btn-primary {
  background: #26A9E0;
  color: #ffffff;
  border: 2px solid #26A9E0;
}

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

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

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

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
  background-color: #1a1a1a; /* Lighter dark background for content */
  color: #ffffff;
}

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

.page-blog__post-card {
  background: rgba(255, 255, 255, 0.08); /* Semi-transparent white for cards */
  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;
  color: #ffffff;
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-blog__post-title a {
  color: #26A9E0;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #1e87b8;
}

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

.page-blog__post-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: bold;
  border-bottom: 2px solid #26A9E0;
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #1e87b8;
  border-color: #1e87b8;
}

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

/* Categories Section */
.page-blog__categories {
  padding: 80px 0;
  background-color: #0a0a0a;
  color: #ffffff;
}

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

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 25px;
  text-decoration: none;
  color: #ffffff;
  transition: transform 0.3s ease, background 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background: rgba(38, 169, 224, 0.2);
}

.page-blog__category-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
  object-fit: cover;
}

.page-blog__category-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #26A9E0;
}

/* Newsletter Section */
.page-blog__newsletter {
  padding: 80px 0;
  background-color: #1a1a1a;
  color: #ffffff;
}

.page-blog__newsletter-form {
  display: flex;
  justify-content: center;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.page-blog__form-input {
  flex-grow: 1;
  padding: 15px 20px;
  border: 1px solid #26A9E0;
  border-radius: 5px;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-sizing: border-box;
  max-width: 100%; /* Ensure input is responsive */
}

.page-blog__form-input::placeholder {
  color: #bbbbbb;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #0a0a0a;
  color: #ffffff;
}

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

.page-blog__faq-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  color: #26A9E0;
  background: rgba(255, 255, 255, 0.05);
  transition: background 0.3s ease;
  list-style: none; /* For details/summary */
}

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

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

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

.page-blog__faq-answer {
  padding: 0 20px 20px;
  font-size: 1rem;
  color: #e0e0e0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-blog__faq-item[open] .page-blog__faq-answer {
  max-height: 500px; /* Adjust as needed */
  padding-top: 10px;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  .page-blog__section-title {
    font-size: 2rem;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* body handles --header-offset */
  }

  .page-blog__main-title {
    /* H1 will auto-scale, no fixed large font-size */
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }

  .page-blog__description {
    font-size: 1rem;
  }

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

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

  .page-blog__latest-posts,
  .page-blog__categories,
  .page-blog__newsletter,
  .page-blog__faq-section {
    padding: 40px 0;
  }

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

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

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

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

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

  .page-blog__newsletter-form {
    flex-direction: column;
  }

  .page-blog__form-input {
    width: 100% !important;
    max-width: 100% !important;
  }

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

  /* Image responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__category-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
}

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.8rem;
  }

  .page-blog__main-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

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

  .page-blog__faq-question {
    font-size: 0.95rem;
  }
}