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

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--max10-text-main); /* Main text color for the page, contrasting with dark background */
  background-color: var(--max10-background); /* Page background color */
  line-height: 1.6;
}

.page-blog__section {
  padding: 60px 0;
  position: relative;
}

.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;
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  padding-bottom: 60px;
  overflow: hidden;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 600px; /* Limit height for hero image */
}

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
  margin-top: -80px; /* Pull content up slightly over the image for visual flow, but not overlapping text on image */
  position: relative;
  background-color: rgba(17, 39, 27, 0.8); /* Card BG with transparency for subtle effect */
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.page-blog__main-title {
  font-size: 2.8em;
  font-weight: 700;
  color: var(--max10-text-main);
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.1em;
  color: var(--max10-text-secondary);
  margin-bottom: 30px;
}

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

.page-blog__section-description {
  font-size: 1.05em;
  color: var(--max10-text-secondary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

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

.page-blog__btn-primary {
  background: var(--max10-button-gradient);
  color: var(--max10-text-main);
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  box-shadow: 0 6px 20px rgba(42, 209, 111, 0.6);
}

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

.page-blog__btn-secondary:hover {
  background: rgba(17, 168, 78, 0.1);
  color: var(--max10-text-main);
  border-color: var(--max10-secondary-color);
}

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

.page-blog__latest-posts {
  background-color: var(--max10-deep-green);
}

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

.page-blog__post-card {
  background-color: var(--max10-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-blog__card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

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

.page-blog__card-content {
  padding: 25px;
}

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

.page-blog__post-meta {
  font-size: 0.9em;
  color: var(--max10-text-secondary);
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--max10-text-secondary);
  margin-bottom: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical;
}

.page-blog__read-more-btn {
  color: var(--max10-primary-color);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}

.page-blog__read-more-btn:hover {
  text-decoration: underline;
}

.page-blog__categories {
  background-color: var(--max10-background);
}

.page-blog__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}

.page-blog__category-item {
  background-color: var(--max10-card-bg);
  color: var(--max10-text-main);
  padding: 10px 25px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid var(--max10-border);
}

.page-blog__category-item:hover {
  background-color: var(--max10-primary-color);
  color: #ffffff;
  border-color: var(--max10-primary-color);
}

.page-blog__featured-video {
  background-color: var(--max10-deep-green);
}

.page-blog__video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
  border-radius: 12px;
  margin-top: 40px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__video-link {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.page-blog__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.page-blog__why-choose-us {
  background-color: var(--max10-background);
}

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

.page-blog__feature-item {
  background-color: var(--max10-card-bg);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-blog__feature-item:hover {
  transform: translateY(-5px);
}

.page-blog__feature-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
  display: inline-block;
}

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

.page-blog__feature-text {
  font-size: 1em;
  color: var(--max10-text-secondary);
}

.page-blog__faq-section {
  background-color: var(--max10-deep-green);
}

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

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: 600;
  color: var(--max10-text-main);
  cursor: pointer;
  list-style: none; /* Remove default marker for details/summary */
}

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

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

.page-blog__faq-item[open] .page-blog__faq-toggle {
  transform: rotate(45deg); /* Change + to X or similar */
}

.page-blog__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: var(--max10-text-secondary);
  line-height: 1.7;
}

.page-blog__cta-section {
  background-color: var(--max10-background);
  text-align: center;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: 2.5em;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__hero-content {
    margin-top: -60px;
    padding: 30px 20px;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-blog__hero-content {
    margin-top: -40px;
    padding: 25px 15px;
    max-width: calc(100% - 30px); /* Adjust for padding */
  }

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

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

  .page-blog__section {
    padding: 40px 0;
  }

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

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

  .page-blog__post-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-blog__post-image {
    height: 200px;
  }

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

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

  .page-blog__category-list {
    gap: 10px;
  }

  .page-blog__category-item {
    padding: 8px 20px;
    font-size: 0.9em;
  }

  .page-blog__feature-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

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

  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 18px 20px;
  }

  .page-blog__faq-answer {
    padding: 0 20px 18px 20px;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    padding: 12px 25px;
    font-size: 1em;
    width: 100% !important; /* Force full width on mobile */
    margin-left: 0 !important;
  }

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

  /* Mobile image responsiveness */
  .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 {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles --header-offset */
  }

  /* Mobile video responsiveness */
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__video-section,
  .page-blog__video-container,
  .page-blog__video-wrapper {
    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;
  }
}