/* style/blog.css */

/* Base styles for the blog page, assuming a dark background from shared.css */
.page-blog {
  background-color: var(--background-color, #08160F);
  color: var(--text-main, #F2FFF6);
  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__section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
}

.page-blog__text-block {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text-secondary, #A7D9B8);
}

.page-blog__btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
  cursor: pointer;
}

.page-blog__btn--primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff; /* White text for primary button */
  border: none;
}

.page-blog__btn--primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn--secondary {
  background: var(--card-bg, #11271B);
  color: var(--gold, #F2C14E); /* Gold text for secondary button */
  border: 2px solid var(--border, #2E7A4E);
}

.page-blog__btn--secondary:hover {
  background: var(--deep-green, #0A4B2C);
  color: #ffffff;
  border-color: var(--glow, #57E38D);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: var(--background-color, #08160F);
  overflow: hidden;
}

.page-blog__hero-image-wrapper {
  width: 100%;
  max-height: 700px; /* Limit hero image height */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  min-width: 200px;
  min-height: 200px;
}

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

.page-blog__hero-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 20px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog Posts Section */
.page-blog__posts-section {
  padding: 80px 0;
  background-color: var(--card-bg, #11271B);
}

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

.page-blog__post-card {
  background-color: var(--deep-green, #0A4B2C);
  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-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-blog__post-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main, #F2FFF6);
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
  margin-bottom: 20px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Limit excerpt to 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-blog__read-more {
  color: var(--glow, #57E38D);
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
}

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

.page-blog__button-group {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.page-blog__button-group--center {
  justify-content: center;
}

/* Content Area */
.page-blog__content-area {
  padding: 80px 0;
}

.page-blog__dark-section {
  background-color: var(--background-color, #08160F);
}

.page-blog__content-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-top: 30px;
  min-width: 200px;
  min-height: 200px;
}

.page-blog__ordered-list,
.page-blog__unordered-list {
  list-style-position: inside;
  padding-left: 20px;
  margin-bottom: 20px;
  color: var(--text-secondary, #A7D9B8);
}

.page-blog__ordered-list li,
.page-blog__unordered-list li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.7;
}

.page-blog__ordered-list li strong,
.page-blog__unordered-list li strong {
  color: var(--text-main, #F2FFF6);
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: var(--card-bg, #11271B);
}

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

.page-blog__faq-item {
  background-color: var(--deep-green, #0A4B2C);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-blog__faq-item details > summary {
  list-style: none;
}

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-main, #F2FFF6);
  cursor: pointer;
  background-color: var(--deep-green, #0A4B2C);
  border-bottom: 1px solid var(--divider, #1E3A2A);
}

.page-blog__faq-question:hover {
  background-color: var(--background-color, #08160F);
}

.page-blog__faq-toggle {
  font-size: 24px;
  line-height: 1;
  color: var(--glow, #57E38D);
}

.page-blog__faq-answer {
  padding: 20px 25px;
  font-size: 16px;
  color: var(--text-secondary, #A7D9B8);
  line-height: 1.7;
  background-color: var(--deep-green, #0A4B2C);
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-section .page-blog__section-title {
  margin-bottom: 25px;
}

.page-blog__cta-section .page-blog__text-block {
  margin-bottom: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: clamp(32px, 4.5vw, 50px);
  }

  .page-blog__hero-description {
    font-size: 18px;
  }

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

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

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

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

  .page-blog__hero-title {
    font-size: clamp(28px, 6vw, 40px);
    margin-bottom: 15px;
  }

  .page-blog__hero-description {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .page-blog__btn {
    font-size: 16px;
    padding: 12px 24px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-blog__button-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-blog__section-title {
    font-size: clamp(24px, 5vw, 36px);
    margin-bottom: 30px;
  }

  .page-blog__text-block,
  .page-blog__ordered-list li,
  .page-blog__unordered-list li,
  .page-blog__post-excerpt,
  .page-blog__faq-answer p {
    font-size: 15px;
  }

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

  .page-blog__post-title {
    font-size: 18px;
  }

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

  /* Mobile image specific styles */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px !important; /* Ensure min size is maintained */
    min-height: 200px !important;
  }

  .page-blog__hero-image-wrapper,
  .page-blog__post-card,
  .page-blog__content-area,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__posts-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Ensure video section top padding is small, not header offset */
  .page-blog__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: clamp(24px, 7vw, 36px);
  }

  .page-blog__hero-description {
    font-size: 14px;
  }

  .page-blog__section-title {
    font-size: clamp(22px, 6vw, 30px);
  }

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

  .page-blog__post-title {
    font-size: 16px;
  }
}