/* style/blog.css */

/* Body background is var(--black-color) from shared.css, implying a dark background. */
/* Therefore, text in main content should be light by default, unless overridden by specific sections. */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #f0f0f0; /* Default text color for the page, assuming dark body background */
}

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

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

.page-blog__section-title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #26A9E0; /* Using brand color for titles */
  font-weight: bold;
}

.page-blog__section-text {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto 40px auto;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* body handles padding-top, this is decorative */
  min-height: 500px;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5); /* Darken image for text readability, not changing color */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  color: #FFFFFF;
  max-width: 900px;
  padding: 20px;
}

.page-blog__hero-title {
  font-weight: bold;
  color: #FFFFFF;
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.05em;
}

.page-blog__hero-description {
  font-size: 1.2rem;
  margin-bottom: 30px;
  line-height: 1.5;
}

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

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

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

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

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #1a7eb3;
  border-color: #1a7eb3;
}

/* Background Colors */
.page-blog__dark-section {
  background-color: #26A9E0;
  color: #FFFFFF;
}

.page-blog__dark-section .page-blog__section-title,
.page-blog__dark-section .page-blog__hero-title {
  color: #FFFFFF;
}

.page-blog__light-bg {
  background-color: #FFFFFF;
  color: #333333; /* Dark text on light background */
}

.page-blog__light-bg .page-blog__section-title {
  color: #26A9E0;
}

/* About Blog Section */
.page-blog__about-blog .page-blog__section-text {
  color: #333333;
}

/* Categories Section */
.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__category-item {
  background-color: #f8f8f8;
  border-radius: 10px;
  padding: 25px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  color: #333333;
  min-height: 400px; /* Ensure minimum height for content */
  display: flex;
  flex-direction: column;
}

.page-blog__category-item:hover {
  transform: translateY(-5px);
}

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

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

.page-blog__category-description {
  font-size: 1rem;
  line-height: 1.6;
  flex-grow: 1;
}

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

.page-blog__post-card {
  background-color: #f8f8f8;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: left;
  color: #333333;
  display: flex;
  flex-direction: column;
}

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

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

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

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

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

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

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

.page-blog__post-excerpt {
  font-size: 1rem;
  color: #555555;
  margin-bottom: 20px;
  flex-grow: 1;
}

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

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

.page-blog__view-all-wrapper {
  margin-top: 50px;
}

/* Why Follow Section */
.page-blog__benefits-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  text-align: left;
}

.page-blog__benefit-item {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 20px;
  border-radius: 8px;
  font-size: 1.1rem;
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
}

.page-blog__benefit-item::before {
  content: '✓';
  color: #FFFFFF;
  font-weight: bold;
  margin-right: 10px;
  font-size: 1.3rem;
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-blog__faq-item {
  background-color: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  color: #333333;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #26A9E0;
  cursor: pointer;
  background-color: #e0f2f7;
  border-bottom: 1px solid #d0e8ed;
}

.page-blog__faq-question:hover {
  background-color: #d0e8ed;
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: bold;
  color: #26A9E0;
  margin-left: 15px;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  content: '−';
}

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

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1rem;
  line-height: 1.6;
  color: #555555;
}

/* CTA Bottom Section */
.page-blog__cta-bottom .page-blog__section-text {
  color: #FFFFFF;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 2rem;
  }
  .page-blog__hero-title {
    font-size: 2.8rem;
  }
}

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

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

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

  .page-blog__section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
    min-height: 400px;
  }

  .page-blog__hero-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

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

  .page-blog__category-item,
  .page-blog__post-card {
    padding: 20px;
  }
  
  .page-blog__category-item {
    min-height: auto;
  }

  .page-blog__category-image,
  .page-blog__post-image {
    height: 180px;
    min-width: 200px !important;
    min-height: 180px !important;
  }

  /* Buttons responsive */
  .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;
    padding-right: 15px;
    margin: 10px 0 !important;
  }
  
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

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

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

  .page-blog__benefits-list {
    grid-template-columns: 1fr;
    gap: 15px;
  }

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

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 1.8rem;
  }
  .page-blog__section-title {
    font-size: 1.5rem;
  }
  .page-blog__category-item {
    padding: 15px;
  }
  .page-blog__category-title {
    font-size: 1.3rem;
  }
  .page-blog__post-title {
    font-size: 1.2rem;
  }
}