/* style/blog.css */

/* Body background color is handled by shared.css var(--background-color) */
/* The following colors are based on the provided custom palette */

:root {
  --page-blog-bg-dark: #08160F;
  --page-blog-card-bg: #11271B;
  --page-blog-text-main: #F2FFF6;
  --page-blog-text-secondary: #A7D9B8;
  --page-blog-border: #2E7A4E;
  --page-blog-glow: #57E38D;
  --page-blog-gold: #F2C14E;
  --page-blog-divider: #1E3A2A;
  --page-blog-deep-green: #0A4B2C;
  --page-blog-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--page-blog-text-main); /* Default text color for the page */
  background-color: var(--page-blog-bg-dark);
}

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

.page-blog__dark-section {
  background-color: var(--page-blog-bg-dark);
  color: var(--page-blog-text-main);
}

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

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

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for text */
  border-radius: 8px;
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  color: var(--page-blog-gold);
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-blog__intro-text {
  font-size: 1.15rem;
  color: var(--page-blog-text-main);
  margin-bottom: 30px;
}

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

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

.page-blog__btn-primary {
  background: var(--page-blog-button-gradient);
  color: #ffffff;
  border: none;
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--page-blog-text-main);
  border: 2px solid var(--page-blog-border);
}

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

.page-blog__btn-large {
    padding: 18px 35px;
    font-size: 1.1rem;
}

.page-blog__section-title {
  font-size: 2.5rem;
  color: #333333; /* Dark text for light background */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-blog__section-title--light {
  color: var(--page-blog-text-main); /* Light text for dark background */
}

.page-blog__section-description {
  font-size: 1.1rem;
  color: #555555; /* Slightly lighter dark text */
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__section-description--light {
  color: var(--page-blog-text-secondary);
}

.page-blog__featured-articles,
.page-blog__latest-posts,
.page-blog__cta-bottom {
  padding: 60px 0;
}

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

.page-blog__article-card,
.page-blog__category-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%; /* Ensure cards have equal height */
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-image-wrapper,
.page-blog__category-image-wrapper {
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  position: relative;
  overflow: hidden;
}

.page-blog__article-image,
.page-blog__category-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.page-blog__article-title,
.page-blog__category-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: bold;
}

.page-blog__article-title a,
.page-blog__category-title a {
  color: var(--page-blog-text-main);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover,
.page-blog__category-title a:hover {
  color: var(--page-blog-gold);
}

.page-blog__article-meta {
  font-size: 0.9rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
}

.page-blog__article-excerpt,
.page-blog__category-excerpt {
  font-size: 1rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-link {
  color: var(--page-blog-glow);
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
  margin-top: auto; /* Push to bottom */
}

.page-blog__read-more-link:hover {
  color: var(--page-blog-gold);
}

.page-blog__arrow {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.page-blog__read-more-link:hover .page-blog__arrow {
  transform: translateX(5px);
}

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

.page-blog__posts-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.page-blog__post-item {
  display: flex;
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__post-thumbnail-wrapper {
  flex: 0 0 300px; /* Fixed width for thumbnail */
  height: 200px; /* Fixed height for thumbnail */
  overflow: hidden;
}

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

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

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

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

.page-blog__post-title a:hover {
  color: var(--page-blog-gold);
}

.page-blog__faq-section {
  padding: 60px 0;
}

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

.page-blog__faq-item {
  background-color: var(--page-blog-card-bg);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--page-blog-border);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--page-blog-text-main);
  cursor: pointer;
  background-color: var(--page-blog-deep-green); /* Slightly different background for question */
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-blog__faq-question:hover {
  background-color: var(--page-blog-border);
}

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

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--page-blog-text-secondary);
}

.page-blog__faq-answer p {
    margin-bottom: 0;
}

.page-blog__faq-answer a {
    color: var(--page-blog-glow);
    text-decoration: underline;
}

.page-blog__cta-bottom {
  text-align: center;
}

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

/* Tablet */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }

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

  .page-blog__post-thumbnail-wrapper {
    flex: 0 0 250px;
    height: 180px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .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__featured-articles,
  .page-blog__categories-section,
  .page-blog__latest-posts,
  .page-blog__faq-section,
  .page-blog__cta-bottom,
  .page-blog__post-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

  .page-blog__hero-content {
    padding: 15px;
  }

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

  .page-blog__intro-text {
    font-size: 1rem;
  }

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

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

  .page-blog__btn-large {
    padding: 15px 25px;
    font-size: 1rem;
  }

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

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

  .page-blog__articles-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__article-content,
  .page-blog__category-content {
    padding: 20px;
  }

  .page-blog__article-title,
  .page-blog__category-title {
    font-size: 1.3rem;
  }

  .page-blog__post-item {
    flex-direction: column;
  }

  .page-blog__post-thumbnail-wrapper {
    flex: none;
    width: 100%;
    height: 220px; /* Adjust height for mobile */
  }

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

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

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

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