/* style/blog.css */
:root {
  --page-blog-bg: #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-btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

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

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

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

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  position: relative;
  z-index: 0;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.6);
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  margin-top: -200px; /* Overlap slightly for visual appeal, but not on image directly */
  max-width: 900px;
  padding: 0 20px;
}

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

.page-blog__hero-description {
  font-size: 1.2rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 30px;
}

.page-blog__hero-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: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: var(--page-blog-btn-gradient);
  color: var(--page-blog-text-main);
  border: none;
}

.page-blog__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

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

.page-blog__btn-secondary:hover {
  background: var(--page-blog-glow);
  color: var(--page-blog-bg);
}

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--page-blog-text-main);
  text-align: center;
  margin-bottom: 20px;
}

.page-blog__section-description {
  font-size: 1.1rem;
  color: var(--page-blog-text-secondary);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__latest-posts,
.page-blog__categories-section,
.page-blog__featured-article,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 0;
}

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

.page-blog__post-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;
  border: 1px solid var(--page-blog-border);
}

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

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

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

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

.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--page-blog-text-main);
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: inherit;
  text-decoration: none;
}

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

.page-blog__post-excerpt {
  font-size: 0.95rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-blog__post-date {
  font-size: 0.85rem;
  color: var(--page-blog-text-secondary);
  opacity: 0.7;
}

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

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  justify-content: center;
}

.page-blog__category-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--page-blog-text-main);
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid var(--page-blog-border);
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: var(--page-blog-deep-green);
}

.page-blog__category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
}

.page-blog__category-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.page-blog__featured-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--page-blog-border);
}

.page-blog__featured-image {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.page-blog__featured-content {
  padding: 30px;
}

.page-blog__featured-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--page-blog-text-main);
  margin-bottom: 15px;
}

.page-blog__featured-title a {
  color: inherit;
  text-decoration: none;
}

.page-blog__featured-title a:hover {
  color: var(--page-blog-glow);
}

.page-blog__featured-excerpt {
  font-size: 1.1rem;
  color: var(--page-blog-text-secondary);
  margin-bottom: 25px;
}

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

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

.page-blog__faq-item[open] {
  background-color: var(--page-blog-deep-green);
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--page-blog-text-main);
  cursor: pointer;
  list-style: none;
}

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

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

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

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

.page-blog__newsletter-form {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.page-blog__newsletter-input {
  padding: 15px 20px;
  border: 1px solid var(--page-blog-border);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--page-blog-text-main);
  font-size: 1rem;
  flex-grow: 1;
  max-width: 400px;
  box-sizing: border-box;
}

.page-blog__newsletter-input::placeholder {
  color: var(--page-blog-text-secondary);
  opacity: 0.7;
}

.page-blog__form-note {
  font-size: 0.9rem;
  color: var(--page-blog-text-secondary);
  text-align: center;
  margin-top: 20px;
}

/* Responsive styles */
@media (min-width: 769px) {
  .page-blog__hero-content {
    margin-top: -150px; /* Less overlap on larger screens */
  }
  .page-blog__featured-card {
    flex-direction: row;
  }
  .page-blog__featured-image {
    width: 50%;
    height: auto;
  }
  .page-blog__featured-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-bottom: 40px;
  }

  .page-blog__hero-content {
    margin-top: -100px; /* Adjust overlap for mobile */
  }

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

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

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

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

  .page-blog__latest-posts,
  .page-blog__categories-section,
  .page-blog__featured-article,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__posts-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__featured-card {
    margin: 0 15px;
  }

  .page-blog__featured-image {
    height: 250px;
  }

  .page-blog__featured-title {
    font-size: 1.5rem;
  }

  .page-blog__featured-excerpt {
    font-size: 0.95rem;
  }

  .page-blog__newsletter-form {
    flex-direction: column;
    align-items: center;
  }

  .page-blog__newsletter-input,
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

  /* Mobile responsive for all containers */
  .page-blog__hero-section,
  .page-blog__latest-posts .page-blog__container,
  .page-blog__categories-section .page-blog__container,
  .page-blog__featured-article .page-blog__container,
  .page-blog__faq-section .page-blog__container,
  .page-blog__cta-section .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__featured-card,
  .page-blog__faq-item,
  .page-blog__newsletter-form {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .page-blog__hero-buttons .page-blog__btn-primary,
  .page-blog__hero-buttons .page-blog__btn-secondary {
    width: calc(100% - 30px) !important; /* Account for container padding */
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    white-space: normal !important;
    word-wrap: break-word !important;
  }
}