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

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--text-main); /* Default text color for the page */
  background-color: var(--bg-dark); /* Inherited from body via shared.css */
}

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

.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0 60px 0; /* Small top padding, more bottom padding */
  color: var(--text-main);
  text-align: center;
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  filter: brightness(0.7); /* Slightly dim the image for text readability */
}

.page-blog__hero-content {
  position: relative; /* Ensure content is above image filter if any */
  z-index: 1;
  max-width: 800px;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.page-blog__description {
  font-size: 1.1em;
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--text-secondary);
}

.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: 1.05em;
  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(--btn-gradient);
  color: var(--text-main);
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  opacity: 0.9;
}

.page-blog__btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  margin-left: 15px;
}

.page-blog__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--text-main);
}

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--gold-color);
  position: relative;
  padding-bottom: 15px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.page-blog__latest-posts {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

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

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

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

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

.page-blog__post-image {
  width: 100%;
  height: 220px; /* Fixed height for image */
  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.4em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
  line-height: 1.4;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-blog__post-meta {
  font-size: 0.85em;
  color: var(--primary-color);
  font-weight: 500;
}

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

.page-blog__featured-article {
  padding: 80px 0;
  background-color: var(--deep-green);
}

.page-blog__featured-content {
  display: flex;
  gap: 40px;
  align-items: center;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.page-blog__featured-image {
  width: 60%;
  height: auto;
  object-fit: cover;
  display: block;
}

.page-blog__featured-text {
  width: 40%;
  padding: 30px;
  box-sizing: border-box;
}

.page-blog__featured-title {
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--gold-color);
  line-height: 1.3;
}

.page-blog__featured-excerpt {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 25px;
}

.page-blog__categories {
  padding: 60px 0;
  background-color: var(--bg-dark);
}

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

.page-blog__category-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

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

.page-blog__category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 5px rgba(var(--primary-color), 0.5));
}

.page-blog__category-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
}

.page-blog__category-description {
  font-size: 0.9em;
  color: var(--text-secondary);
  line-height: 1.5;
}

.page-blog__cta-section {
  padding: 80px 0;
}

.page-blog__cta-section .page-blog__container {
  background-color: var(--deep-green);
  border-radius: 15px;
  padding: 50px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.page-blog__cta-section .page-blog__section-title {
  color: var(--text-main);
}

.page-blog__cta-section .page-blog__section-title::after {
  background: var(--gold-color);
}

.page-blog__cta-buttons {
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.page-blog__faq-section {
  padding: 60px 0 80px 0;
  background-color: var(--bg-dark);
}

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

.page-blog__faq-item {
  background-color: var(--card-bg);
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  color: var(--text-main);
}

.page-blog__faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15em;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--deep-green);
  border-bottom: 1px solid var(--divider-color);
  transition: background-color 0.3s ease;
}

.page-blog__faq-item summary:hover {
  background-color: var(--primary-color);
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-color);
  transition: transform 0.3s ease;
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg);
}

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--card-bg);
  border-top: 1px solid var(--divider-color);
}

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

/* All images responsive styles */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile responsive styles */
@media (max-width: 1024px) {
  .page-blog__featured-content {
    flex-direction: column;
  }
  .page-blog__featured-image,
  .page-blog__featured-text {
    width: 100%;
  }
  .page-blog__featured-text {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 10px 0 40px 0;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em);
  }
  .page-blog__description {
    font-size: 1em;
    padding: 0 10px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    font-size: 1em;
    padding: 12px 20px;
    margin: 5px 0 5px 0 !important;
    width: 100% !important;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 10px;
    padding: 0 15px;
  }
  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }
  .page-blog__latest-posts,
  .page-blog__featured-article,
  .page-blog__categories,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }
  .page-blog__post-image {
    height: 180px;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__post-excerpt {
    font-size: 0.9em;
  }
  .page-blog__category-card {
    padding: 20px;
    min-height: 180px;
  }
  .page-blog__category-icon {
    width: 80px;
    height: 80px;
  }
  .page-blog__category-title {
    font-size: 1.1em;
  }
  .page-blog__cta-section .page-blog__container {
    padding: 30px 20px;
  }
  .page-blog__faq-item summary {
    font-size: 1em;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 15px 20px;
    font-size: 0.95em;
  }

  /* Mandatory responsive rules for images, videos, and containers */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-blog__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    flex-direction: column; /* Ensure buttons stack vertically on mobile */
  }
}