/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #FFF1E8; /* Text Main */
  background-color: #140C0C; /* Background */
}

.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-blog__main-title,
.page-blog__section-title {
  color: #FFF1E8; /* Text Main */
  text-align: center;
  margin-bottom: 25px;
  font-weight: 700;
  line-height: 1.2;
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 2.8rem); /* Use clamp for H1 */
  margin-bottom: 20px;
}

.page-blog__section-title {
  font-size: 2.2rem;
  padding-top: 40px;
}

.page-blog__description,
.page-blog__section-intro {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.1rem;
  color: #FFF1E8; /* Text Main */
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-blog__hero-section {
  padding: 60px 0;
  padding-top: 10px; /* Small top padding as per instruction */
}

.page-blog__top-text {
  padding: 30px 0 10px; /* Specific padding as per instruction, top 10px */
}

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

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

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFB04A 0%, #D86A14 100%); /* Button gradient */
  color: #FFF1E8; /* Text Main */
  border: none;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: transparent;
  color: #F3C54D; /* Gold */
  border: 2px solid #F3C54D; /* Gold */
}

.page-blog__btn-secondary:hover {
  background: #F3C54D; /* Gold */
  color: #140C0C; /* Background */
}

/* Latest Articles Section */
.page-blog__latest-articles {
  padding: 60px 0;
}

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

.page-blog__article-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #2A1212; /* Card BG */
  display: flex;
  flex-direction: column;
}

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

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

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

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

.page-blog__article-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFF1E8; /* Text Main */
}

.page-blog__article-date {
  font-size: 0.9rem;
  color: #F3C54D; /* Gold */
  margin-bottom: 15px;
}

.page-blog__article-summary {
  font-size: 1rem;
  color: #FFF1E8; /* Text Main */
  margin-bottom: 0;
  text-align: left; /* Override global center */
}

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

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

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

.page-blog__category-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #2A1212; /* Card BG */
  text-align: center;
  padding-bottom: 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

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

.page-blog__category-image {
  width: 100%;
  height: 180px; /* Consistent height for category images */
  object-fit: cover;
  display: block;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFF1E8; /* Text Main */
  padding: 0 15px;
}

.page-blog__category-description {
  font-size: 1rem;
  color: #FFF1E8; /* Text Main */
  padding: 0 15px;
  text-align: center;
}

/* Why go8pro Section */
.page-blog__why-go8pro-section {
  padding: 60px 0;
}

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

.page-blog__feature-item {
  background-color: #2A1212; /* Card BG */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.page-blog__feature-image {
  width: 100%;
  height: 250px; /* Consistent height for feature images */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
  display: block;
}

.page-blog__feature-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: #FFF1E8; /* Text Main */
}

.page-blog__feature-description {
  font-size: 1rem;
  color: #FFF1E8; /* Text Main */
  text-align: center;
}

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

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #6A1E1E; /* Border color */
  overflow: hidden;
  background: #2A1212; /* Card BG */
  color: #FFF1E8; /* Text Main */
}

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}

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

details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: rgba(255, 255, 255, 0.05); /* Slightly lighter hover for dark background */
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #FFF1E8; /* Text Main */
}

.page-blog__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #F3C54D; /* Gold */
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 20px 20px;
  background: #2A1212; /* Card BG */
  border-radius: 0 0 5px 5px;
  color: #FFF1E8; /* Text Main */
}

.page-blog__faq-answer p {
  margin: 0;
  text-align: left; /* Override global center */
}

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

/* --- Responsive Styles --- */

/* Mobile adaptation for all sections, images, and buttons */
@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__main-title {
    font-size: clamp(1.8rem, 6vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
    padding-top: 30px;
  }

  .page-blog__description,
  .page-blog__section-intro {
    font-size: 1rem;
    margin-bottom: 20px;
    padding: 0 10px; /* Add some horizontal padding */
  }

  /* 1. Top Text Section */
  .page-blog__hero-section {
    padding: 40px 0;
    padding-top: 10px !important; /* Specific top padding */
  }

  .page-blog__top-text {
    padding: 20px 0 10px;
  }

  /* Buttons */
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

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

  /* Latest Articles Section */
  .page-blog__latest-articles {
    padding: 40px 0;
  }

  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

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

  .page-blog__article-title {
    font-size: 1.15rem;
  }

  .page-blog__article-summary {
    font-size: 0.9rem;
  }

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

  .page-blog__category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-blog__category-image {
    height: 150px;
  }

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

  /* Why go8pro Section */
  .page-blog__why-go8pro-section {
    padding: 40px 0;
  }

  .page-blog__features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-blog__feature-item {
    padding: 25px;
  }

  .page-blog__feature-image {
    height: 200px;
    margin-bottom: 20px;
  }

  .page-blog__feature-title {
    font-size: 1.15rem;
  }

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

  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
}