/* style/blog.css */

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

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

.page-blog__dark-bg {
  background-color: #1a1a1a; /* Slightly lighter than body background for contrast */
  color: #ffffff;
}

.page-blog__light-bg {
  background-color: #262626; /* Dark background for light text contrast */
  color: #ffffff;
}

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: 1.1em;
  color: #f0f0f0;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__btn-primary {
  display: inline-block;
  background-color: #26A9E0;
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
  box-sizing: border-box;
  text-align: center;
}

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

.page-blog__btn-secondary {
  display: inline-block;
  background-color: transparent;
  color: #26A9E0;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  border: 2px solid #26A9E0;
  box-sizing: border-box;
  text-align: center;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px; /* Small padding-top to avoid conflict with body padding-top */
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image-container {
  width: 100%;
  max-width: 100%;
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 20px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-blog__subtitle {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 80px 0;
}

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

.page-blog__post-card {
  background-color: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-blog__card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__card-excerpt {
  font-size: 1em;
  color: #cccccc;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__post-date {
  font-size: 0.9em;
  color: #999999;
  display: block;
  margin-top: auto;
}

.page-blog__cta-buttons {
  text-align: center;
  margin-top: 50px;
}

/* Featured Article Section */
.page-blog__featured-article {
  padding: 80px 0;
}

.page-blog__flex-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

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

.page-blog__featured-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.page-blog__featured-content {
  flex: 2;
}

.page-blog__featured-content .page-blog__section-title {
  text-align: left;
  font-size: 2em;
}

.page-blog__text-block {
  font-size: 1.1em;
  color: #f0f0f0;
  margin-bottom: 25px;
}

/* Categories Section */
.page-blog__categories {
  padding: 80px 0;
}

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

.page-blog__category-card {
  background-color: #1a1a1a;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.page-blog__category-icon {
  width: 100px;
  height: 75px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 10px;
}

.page-blog__category-description {
  font-size: 0.95em;
  color: #cccccc;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
}

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

.page-blog__faq-item {
  background-color: #1a1a1a;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.page-blog__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2em;
  font-weight: 600;
  color: #ffffff;
  background-color: #26A9E0; /* Brand color for summary background */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item summary:hover {
  background-color: #1e87c0;
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  transition: transform 0.3s ease;
}

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1.05em;
  color: #cccccc;
  background-color: #1a1a1a;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
}

.page-blog__flex-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 25px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__flex-container {
    flex-direction: column;
  }

  .page-blog__featured-content .page-blog__section-title {
    text-align: center;
    margin-top: 30px;
  }

  .page-blog__featured-image-wrapper {
    order: -1; /* Image appears above content on smaller screens */
  }
}

@media (max-width: 768px) {
  .page-blog__section-title {
    font-size: 2em;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
  }

  .page-blog__subtitle {
    font-size: 1em;
  }

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

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

  /* 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,
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__featured-article,
  .page-blog__categories,
  .page-blog__faq-section,
  .page-blog__cta-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;
  }

  /* Mobile button responsiveness */
  .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: 12px 20px;
  }

  .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 {
    display: flex;
    flex-direction: column;
  }

  .page-blog__hero-content .page-blog__btn-primary {
    margin-top: 20px;
  }
}

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

  .page-blog__main-title {
    font-size: clamp(1.5em, 10vw, 2em);
  }

  .page-blog__card-title {
    font-size: 1.2em;
  }

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

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