/* style/blog.css */
:root {
  --tl88-primary-color: #11A84E;
  --tl88-secondary-color: #22C768;
  --tl88-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --tl88-card-bg: #11271B;
  --tl88-background: #08160F;
  --tl88-text-main: #F2FFF6;
  --tl88-text-secondary: #A7D9B8;
  --tl88-border-color: #2E7A4E;
  --tl88-glow-color: #57E38D;
  --tl88-gold-color: #F2C14E;
  --tl88-divider-color: #1E3A2A;
  --tl88-deep-green: #0A4B2C;
}

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--tl88-text-main); /* Default text color for the page */
  background-color: var(--tl88-background); /* Default background for the page */
}

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

.page-blog__hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--tl88-background);
}

.page-blog__hero-image-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  margin-bottom: 40px;
}

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

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--tl88-text-main);
  margin-bottom: 20px;
}

.page-blog__hero-description {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--tl88-text-secondary);
  margin-bottom: 30px;
}

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

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

.page-blog__btn-primary {
  background: var(--tl88-button-gradient);
  color: #ffffff; /* White text for primary button */
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(var(--tl88-glow-color-rgb), 0.4);
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--tl88-primary-color); /* Brand color text for secondary button */
  border: 2px solid var(--tl88-primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: rgba(var(--tl88-primary-color-rgb), 0.1);
  transform: translateY(-2px);
}

.page-blog__section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--tl88-text-main);
  text-align: center;
  margin-bottom: 20px;
}

.page-blog__section-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tl88-text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-blog__dark-section {
  background-color: var(--tl88-card-bg);
  padding: 80px 0;
}

.page-blog__featured-categories,
.page-blog__latest-posts,
.page-blog__guides-section,
.page-blog__expert-tips,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 80px 0;
}

.page-blog__featured-categories {
  background-color: var(--tl88-background);
}

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

.page-blog__category-card {
  background-color: var(--tl88-card-bg);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--tl88-text-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

.page-blog__category-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 20px 20px 10px 20px;
  color: var(--tl88-text-main);
}

.page-blog__category-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--tl88-text-secondary);
  padding: 0 20px 20px 20px;
  flex-grow: 1;
}

.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: var(--tl88-card-bg);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.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.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-title a {
  color: var(--tl88-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: var(--tl88-primary-color);
}

.page-blog__post-meta {
  font-size: 0.85rem;
  color: var(--tl88-text-secondary);
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--tl88-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--tl88-deep-green);
  color: var(--tl88-text-main);
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  align-self: flex-start;
}

.page-blog__read-more-btn:hover {
  background-color: var(--tl88-primary-color);
}

.page-blog__view-all {
  text-align: center;
}

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

.page-blog__guide-card {
  background-color: var(--tl88-card-bg);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

.page-blog__guide-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 20px 20px 10px 20px;
}

.page-blog__guide-title a {
  color: var(--tl88-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__guide-title a:hover {
  color: var(--tl88-primary-color);
}

.page-blog__guide-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--tl88-text-secondary);
  padding: 0 20px 20px 20px;
  flex-grow: 1;
}

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

.page-blog__tip-item {
  background-color: var(--tl88-card-bg);
  border-radius: 10px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__tip-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__tip-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--tl88-text-main);
  margin-bottom: 15px;
}

.page-blog__tip-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tl88-text-secondary);
  flex-grow: 1;
}

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

.page-blog__faq-item {
  background-color: var(--tl88-card-bg);
  border: 1px solid var(--tl88-border-color);
  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.15rem;
  font-weight: 600;
  color: var(--tl88-text-main);
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* For details tag */
}

.page-blog__faq-question::-webkit-details-marker {
  display: none; /* For details tag */
}

.page-blog__faq-question:hover {
  background-color: rgba(var(--tl88-primary-color-rgb), 0.1);
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--tl88-primary-color);
}

.page-blog__faq-answer {
  padding: 0 20px 20px 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--tl88-text-secondary);
}

.page-blog__cta-section {
  text-align: center;
  padding: 80px 0;
  background-color: var(--tl88-background);
}

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

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: 2rem;
  }

  .page-blog__hero-description {
    font-size: 1rem;
  }

  .page-blog__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .page-blog__section-title {
    font-size: 1.8rem;
  }

  .page-blog__section-description {
    font-size: 0.9rem;
    margin-bottom: 30px;
  }

  .page-blog__dark-section,
  .page-blog__latest-posts,
  .page-blog__guides-section,
  .page-blog__expert-tips,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__category-grid,
  .page-blog__post-grid,
  .page-blog__guide-grid,
  .page-blog__tips-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__post-title,
  .page-blog__category-title,
  .page-blog__guide-title,
  .page-blog__tip-title {
    font-size: 1.15rem;
  }

  .page-blog__post-excerpt,
  .page-blog__category-text,
  .page-blog__guide-text,
  .page-blog__tip-text {
    font-size: 0.9rem;
  }

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

  .page-blog__faq-answer {
    padding: 0 15px 15px 15px;
    font-size: 0.9rem;
  }
  
  /* Mobile specific image adaptation */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__hero-image-container,
  .page-blog__container,
  .page-blog__category-card,
  .page-blog__post-card,
  .page-blog__guide-card,
  .page-blog__tip-item,
  .page-blog__faq-item,
  .page-blog__hero-cta-buttons,
  .page-blog__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow */
  }

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

@media (min-width: 769px) {
  .page-blog__hero-image-container {
    max-width: 1200px; /* Ensure desktop image container width */
  }
}