/* style/blog.css */

:root {
  --page-blog-primary-color: #11A84E;
  --page-blog-secondary-color: #22C768;
  --page-blog-bg-dark: #08160F;
  --page-blog-card-bg: #11271B;
  --page-blog-text-main: #F2FFF6;
  --page-blog-text-secondary: #A7D9B8;
  --page-blog-border-color: #2E7A4E;
  --page-blog-btn-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

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

.page-blog__section {
  padding: 60px 0;
  text-align: center;
}

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

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

.page-blog__section-description {
  font-size: 1.1em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  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-wrapper {
  width: 100%;
  max-height: 600px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

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

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin-top: -150px; /* Overlap slightly with the image for visual flow */
  background-color: var(--page-blog-card-bg); /* Dark background for content */
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  border: 1px solid var(--page-blog-border-color);
}

.page-blog__hero-title {
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--page-blog-text-main);
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.15em;
  color: var(--page-blog-text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

/* Buttons */
.page-blog__btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05em;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  max-width: 100%; /* Ensure button adapts to mobile */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrap */
  word-wrap: break-word; /* Allow text wrap */
}

.page-blog__btn--primary {
  background: var(--page-blog-btn-gradient);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(42, 209, 111, 0.4);
}

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

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

.page-blog__btn--secondary:hover {
  background-color: var(--page-blog-primary-color);
  color: #ffffff;
}

/* Latest Articles Section */
.page-blog__latest-articles {
  background-color: var(--page-blog-bg-dark);
}

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

.page-blog__article-card {
  background-color: var(--page-blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--page-blog-border-color);
  transition: transform 0.3s ease;
}

.page-blog__article-card:hover {
  transform: translateY(-5px);
}

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

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

.page-blog__card-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.4;
}

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

.page-blog__card-title a:hover {
  color: var(--page-blog-primary-color);
}

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

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

.page-blog__card-link {
  color: var(--page-blog-primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__card-link:hover {
  text-decoration: underline;
}

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

/* Categories Section */
.page-blog__categories {
  background-color: var(--page-blog-card-bg);
}

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

.page-blog__category-item {
  display: inline-block;
  padding: 10px 25px;
  border-radius: 25px;
  background-color: var(--page-blog-primary-color);
  color: #ffffff;
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: var(--page-blog-secondary-color);
  transform: translateY(-2px);
}

/* Why Choose Section */
.page-blog__why-choose {
  background-color: var(--page-blog-dark-section-bg, #0A4B2C); /* Deep Green */
  color: var(--page-blog-text-main);
  padding: 80px 0;
}

.page-blog__why-choose-content {
  display: flex;
  align-items: center;
  gap: 50px;
  text-align: left;
}

.page-blog__why-choose-text {
  flex: 1;
}

.page-blog__why-choose-text .page-blog__section-title {
  text-align: left;
  margin-bottom: 25px;
}

.page-blog__why-choose-text p {
  font-size: 1.1em;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--page-blog-text-secondary);
}

.page-blog__why-choose-image-wrapper {
  flex: 1;
  min-width: 400px;
  text-align: center;
}

.page-blog__why-choose-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--page-blog-border-color);
}

/* FAQ Section */
.page-blog__faq-section {
  background-color: var(--page-blog-bg-dark);
}

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

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

.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(--page-blog-text-main);
  cursor: pointer;
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

.page-blog__faq-item details > summary::-webkit-details-marker {
  display: none; /* Hide default marker for webkit */
}

.page-blog__faq-question:hover {
  background-color: rgba(var(--page-blog-primary-color), 0.1);
}

.page-blog__faq-qtext {
  flex-grow: 1;
}

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

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

/* CTA Bottom Section */
.page-blog__cta-bottom {
  background-color: var(--page-blog-card-bg);
  padding: 80px 0;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    margin-top: -100px;
    padding: 30px;
  }

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

  .page-blog__why-choose-content {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__why-choose-text .page-blog__section-title {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-blog__section {
    padding: 40px 0;
  }

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

  .page-blog__hero-content {
    margin-top: -80px;
    padding: 25px;
  }

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

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

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

  .page-blog__section-description {
    font-size: 0.95em;
  }

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

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

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

  .page-blog__card-excerpt {
    font-size: 0.9em;
  }

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

  .page-blog__why-choose-image-wrapper {
    min-width: unset;
  }

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

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

  .page-blog__btn {
    padding: 12px 25px;
    font-size: 0.95em;
  }

  .page-blog__btn--secondary {
    margin-left: 0;
    margin-top: 15px;
  }

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

  /* Mobile responsive images, videos, buttons - MUST BE !important */
  .page-blog img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__hero-content,
  .page-blog__hero-image-wrapper,
  .page-blog__why-choose-content,
  .page-blog__why-choose-image-wrapper,
  .page-blog__faq-list,
  .page-blog__faq-item,
  .page-blog__cta-buttons,
  .page-blog__article-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden;
  }

  .page-blog__video-section { /* If there was a video section */
    padding-top: 10px !important; /* body already handles --header-offset */
  }

  .page-blog__btn,
  .page-blog a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-left: 0 !important; /* Override potential left margin on secondary button */
    margin-right: 0 !important;
  }

  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Content area image CSS size lower bound (not by class name) */
/* This applies to any img within .page-blog that is not a logo/icon in shared areas */
.page-blog img:not(.shared-header__logo-image):not(.shared-footer__payment-icon):not(.shared-footer__social-icon) {
  min-width: 200px;
  min-height: 200px;
}

/* Override for images that are explicitly smaller by design (e.g. meta tags) */
/* This is a safeguard and should ideally be handled by specific class names */
.page-blog img[width='1200'][height='675'] { /* Hero image display size */
  min-width: unset;
  min-height: unset;
}

.page-blog__article-image[width='400'][height='225'] { /* Article card image display size */
  min-width: unset;
  min-height: unset;
}

.page-blog__why-choose-image[width='600'][height='450'] { /* Why choose section image display size */
  min-width: unset;
  min-height: unset;
}

/* Ensure images in meta tags are not affected by min-width/height */
img[alt*="social"], img[alt*="cover"] {
  min-width: unset !important;
  min-height: unset !important;
}