/* style/blog.css */
/* 
  Body background color is assumed to be dark from shared.css (e.g., #08160F or #11271B)
  Therefore, text colors will be light (#F2FFF6, #A7D9B8) to ensure contrast.
*/

:root {
  /* Custom Colors from provided scheme */
  --color-primary: #11A84E; /* Main Green */
  --color-secondary: #22C768; /* Auxiliary Green */
  --color-button-gradient-start: #2AD16F;
  --color-button-gradient-end: #13994A;
  --color-background: #08160F; /* Dark Green Background */
  --color-card-bg: #11271B; /* Darker Card Background */
  --color-text-main: #F2FFF6; /* Light Text */
  --color-text-secondary: #A7D9B8; /* Lighter Green Text */
  --color-border: #2E7A4E; /* Green Border */
  --color-glow: #57E38D; /* Bright Green Glow */
  --color-gold: #F2C14E; /* Gold Accent */
  --color-divider: #1E3A2A; /* Dark Green Divider */
  --color-deep-green: #0A4B2C; /* Deep Green */
}

.page-blog {
  font-family: 'Arial', sans-serif;
  color: var(--color-text-main); /* Default text color for the page */
  background-color: var(--color-background); /* Ensure consistency if body bg is not explicitly set */
  line-height: 1.6;
}

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

/* --- Section Titles --- */
.page-blog__section-title {
  font-size: clamp(28px, 3.5vw, 48px); /* H1 font-size rule: clamp */
  font-weight: 700;
  color: var(--color-gold); /* Using gold for main titles for emphasis */
  text-align: center;
  margin-bottom: 40px;
  line-height: 1.2;
}

/* --- Hero Section --- */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column; /* Enforce image first, then text */
  align-items: center;
  padding: 10px 0 60px 0; /* Small top padding, body handles header offset */
  background-color: var(--color-deep-green);
  overflow: hidden;
}

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

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px 0;
  max-width: 900px;
  z-index: 1; /* Ensure content is above any potential background elements */
  color: var(--color-text-main);
}

.page-blog__main-title {
  font-size: clamp(32px, 4.5vw, 56px); /* H1 font-size rule: clamp */
  font-weight: 800;
  color: var(--color-gold); /* Using gold for main H1 */
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(242, 193, 78, 0.4);
}

.page-blog__description {
  font-size: 18px;
  color: var(--color-text-secondary);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-button {
  display: inline-block;
  background: var(--color-button-gradient-start); /* Fallback for gradient */
  background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
  color: var(--color-text-main);
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

.page-blog__cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

/* --- About Section --- */
.page-blog__about-section {
  padding: 80px 0;
  background-color: var(--color-background);
}

.page-blog__text-block {
  font-size: 17px;
  margin-bottom: 20px;
  color: var(--color-text-main);
  text-align: justify;
}

/* --- Why Choose Section --- */
.page-blog__why-choose-section {
  padding: 80px 0;
  background-color: var(--color-card-bg);
}

.page-blog__feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

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

.page-blog__feature-title {
  font-size: 24px;
  color: var(--color-gold);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-blog__feature-description {
  font-size: 16px;
  color: var(--color-text-secondary);
}

/* --- Categories Section --- */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: var(--color-background);
}

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

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

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

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

.page-blog__category-title {
  font-size: 22px;
  color: var(--color-gold);
  margin: 20px 20px 10px;
  font-weight: 600;
}

.page-blog__category-description {
  font-size: 15px;
  color: var(--color-text-secondary);
  padding: 0 20px;
  flex-grow: 1;
}

.page-blog__category-link {
  display: inline-block;
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
  margin: 20px;
  transition: color 0.3s ease;
}

.page-blog__category-link:hover {
  color: var(--color-glow);
}

/* --- Latest Posts Section --- */
.page-blog__latest-posts-section {
  padding: 80px 0;
  background-color: var(--color-deep-green);
}

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

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

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

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

.page-blog__post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 15px 20px 0;
}

.page-blog__post-category {
  background-color: var(--color-primary);
  color: var(--color-text-main);
  padding: 4px 10px;
  border-radius: 5px;
  font-weight: 500;
}

.page-blog__post-title {
  font-size: 20px;
  margin: 15px 20px 10px;
  font-weight: 700;
}

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

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

.page-blog__post-excerpt {
  font-size: 15px;
  color: var(--color-text-secondary);
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__read-more-button {
  display: inline-block;
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
  margin: 0 20px 20px;
  transition: color 0.3s ease;
}

.page-blog__read-more-button:hover {
  color: var(--color-glow);
}

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

.page-blog__view-all-posts {
    padding: 12px 25px;
    font-size: 16px;
}

/* --- FAQ Section --- */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: var(--color-background);
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-gold);
  cursor: pointer;
  background-color: var(--color-deep-green);
  transition: background-color 0.3s ease;
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: var(--color-primary);
  color: var(--color-text-main);
}

.page-blog__faq-toggle {
  font-size: 24px;
  line-height: 1;
  margin-left: 15px;
  color: var(--color-gold);
}

.page-blog__faq-item[open] .page-blog__faq-toggle {
  color: var(--color-text-main);
}

.page-blog__faq-answer {
  padding: 15px 20px 20px;
  font-size: 16px;
  color: var(--color-text-secondary);
  background-color: var(--color-card-bg);
}

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

/* For details tag, hide default marker */
.page-blog__faq-item summary {
  list-style: none;
}
.page-blog__faq-item summary::-webkit-details-marker {
  display: none;
}

/* --- CTA Section --- */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: var(--color-deep-green);
  text-align: center;
}

.page-blog__cta-section .page-blog__description {
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 100%; /* Required for mobile responsiveness */
  max-width: 100%; /* Required for mobile responsiveness */
  box-sizing: border-box;
}

.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: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box; /* Ensure padding/border are included in width */
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, var(--color-button-gradient-start) 0%, var(--color-button-gradient-end) 100%);
  color: var(--color-text-main);
  box-shadow: 0 4px 15px rgba(17, 168, 78, 0.4);
}

.page-blog__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(17, 168, 78, 0.6);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
  box-shadow: 0 4px 15px rgba(242, 193, 78, 0.2);
}

.page-blog__btn-secondary:hover {
  transform: translateY(-3px);
  background-color: rgba(242, 193, 78, 0.1);
  box-shadow: 0 6px 20px rgba(242, 193, 78, 0.4);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-blog__main-title {
    font-size: clamp(28px, 4vw, 48px);
  }
  .page-blog__section-title {
    font-size: clamp(24px, 3vw, 40px);
  }
}

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

  /* Images responsive */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Image containers responsive */
  .page-blog__hero-image-wrapper,
  .page-blog__category-card,
  .page-blog__post-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Sections responsive */
  .page-blog__hero-section,
  .page-blog__about-section,
  .page-blog__why-choose-section,
  .page-blog__categories-section,
  .page-blog__latest-posts-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0 !important; /* Adjust section padding for mobile */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding for hero on mobile */
  }

  .page-blog__main-title {
    font-size: clamp(24px, 7vw, 38px);
    margin-bottom: 15px;
  }

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

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

  /* Buttons responsive */
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px !important;
  }

  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog__cta-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px !important; /* Adjust button padding */
    font-size: 16px !important;
  }

  .page-blog__feature-item,
  .page-blog__category-card,
  .page-blog__post-card {
    padding: 20px; /* Adjust card padding */
  }
  
  .page-blog__category-image,
  .page-blog__post-image {
    height: 180px; /* Adjust image height for mobile cards */
  }

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

  .page-blog__faq-answer {
    font-size: 15px;
    padding: 10px 15px 15px;
  }
}

/* Ensure no images are smaller than 200px display size */
.page-blog img {
  min-width: 200px;
  min-height: 200px;
}

/* Exceptions for images that are not content images, if any, but the rule says no small icons */
/* The min-width/height here will ensure content images are always >= 200px. */
/* For example, if there were small decorative icons, they would need a specific class to override this, */
/* but the prompt strictly forbids small icons, so this global rule is sufficient. */