/* style/blog.css */

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

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

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

.page-blog__text-block {
  font-size: 1.1em;
  margin-bottom: 20px;
  text-align: justify;
}

.page-blog__highlight {
  color: #26A9E0;
  font-weight: bold;
}

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: 1;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
  max-width: 900px;
  margin-top: -100px; /* Adjust to place content below image, not overlapping */
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.page-blog__main-title {
  font-size: clamp(2.2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 900;
  color: #FFFFFF;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__subtitle {
  font-size: 1.2em;
  color: #f0f0f0;
  margin-bottom: 30px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  box-sizing: border-box;
  max-width: 100%;
}

.page-blog__btn-primary {
  background-color: #26A9E0;
  color: #FFFFFF;
  border: 2px solid #26A9E0;
  margin: 0 10px 10px 10px;
}

.page-blog__btn-primary:hover {
  background-color: #1a7fb2;
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background-color: #26A9E0;
  color: #FFFFFF;
  transform: translateY(-2px);
}

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

.page-blog__light-bg {
  background-color: #222222; /* Lighter than dark-bg but still dark */
  color: #ffffff;
}

/* Introduction Section */
.page-blog__introduction-section {
  padding: 60px 0;
}

/* Featured Posts */
.page-blog__featured-posts-section {
  padding: 60px 0;
}

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

.page-blog__post-card {
  background-color: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  color: #ffffff;
}

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

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

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

.page-blog__card-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

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

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

.page-blog__card-description {
  font-size: 1em;
  color: #cccccc;
  margin-bottom: 20px;
}

.page-blog__read-more-btn {
  display: inline-block;
  color: #26A9E0;
  text-decoration: none;
  font-weight: bold;
}

.page-blog__read-more-btn:hover {
  text-decoration: underline;
}

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

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

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

.page-blog__category-card {
  background-color: #2a2a2a;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: #333333;
}

.page-blog__category-icon {
  width: 100px;
  height: 75px;
  object-fit: contain;
  margin-bottom: 15px;
  display: block; /* Ensure it behaves as a block element */
  margin-left: auto;
  margin-right: auto;
}

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

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

/* Latest Posts Section (List Layout) */
.page-blog__latest-posts-section {
  padding: 60px 0;
}

.page-blog__post-list {
  display: grid;
  gap: 30px;
}

.page-blog__post-item {
  background-color: #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: flex-start;
  color: #ffffff;
}

.page-blog__post-item-image {
  width: 300px; /* Fixed width for desktop */
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}

.page-blog__post-item-content {
  padding: 20px;
  flex-grow: 1;
}

.page-blog__post-item-title {
  font-size: 1.3em;
  margin-bottom: 10px;
  line-height: 1.3;
}

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

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

.page-blog__post-item-description {
  font-size: 0.95em;
  color: #cccccc;
  margin-bottom: 15px;
}

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

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

.page-blog__faq-item {
  background-color: #2a2a2a;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  color: #ffffff;
}

.page-blog__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-weight: bold;
  cursor: pointer;
  color: #26A9E0;
  font-size: 1.1em;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  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: 0 20px 20px 20px;
  color: #cccccc;
  font-size: 1em;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 60px 0;
  text-align: center;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__hero-content {
    margin-top: -80px;
    padding: 15px;
  }
  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-blog__subtitle {
    font-size: 1.1em;
  }
  .page-blog__post-item {
    flex-direction: column;
  }
  .page-blog__post-item-image {
    width: 100%;
    height: 250px;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__section-title {
    font-size: 1.8em !important;
    margin-bottom: 30px !important;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles --header-offset, this is decorative */
    padding-bottom: 40px !important;
  }

  .page-blog__hero-content {
    margin-top: -60px !important;
    padding: 15px !important;
  }

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

  .page-blog__subtitle {
    font-size: 1em !important;
    margin-bottom: 20px !important;
  }

  .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 !important;
    margin: 5px 0 !important;
  }
  
  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Images 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,
  .page-blog__post-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__post-grid,
  .page-blog__categories-grid,
  .page-blog__post-list {
    gap: 20px !important;
  }

  .page-blog__post-item {
    flex-direction: column !important;
  }
  .page-blog__post-item-image {
    width: 100% !important;
    height: 200px !important;
  }

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

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

@media (max-width: 480px) {
  .page-blog__section-title {
    font-size: 1.5em !important;
  }
  .page-blog__main-title {
    font-size: clamp(1.5em, 7vw, 2em) !important;
  }
  .page-blog__subtitle {
    font-size: 0.9em !important;
  }
  .page-blog__post-card .page-blog__post-image {
    height: 180px;
  }
  .page-blog__post-item-image {
    height: 150px !important;
  }
  .page-blog__category-icon {
    width: 80px;
    height: 60px;
  }
}