/* style/blog.css */

/* Body background is #08160F from shared.css, so text color is light */
.page-blog {
  font-family: 'Arial', sans-serif;
  color: #F2FFF6; /* Text Main */
  background-color: #08160F; /* Background */
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

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

.page-blog__section-title {
  font-size: clamp(1.8rem, 2.5vw, 2.8rem); /* H1 title size is clamped */
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #F2FFF6; /* Text Main */
  line-height: 1.2;
}

.page-blog__section-description {
  font-size: 1.1rem;
  text-align: center;
  margin-bottom: 40px;
  color: #A7D9B8; /* Text Secondary */
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px; /* Base padding */
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
  background-color: #0A4B2C; /* Deep Green */
}

.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;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-content {
  text-align: center;
  max-width: 900px;
  z-index: 1;
}

.page-blog__hero-title {
  font-size: clamp(2.5rem, 4.5vw, 3.8rem);
  font-weight: 800;
  color: #F2FFF6; /* Text Main */
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.25rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 30px;
  line-height: 1.5;
}

/* Buttons */
.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: 1.1rem;
  transition: all 0.3s ease;
  text-align: center;
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Button */
  color: #F2FFF6; /* Text Main */
  border: none;
  box-shadow: 0 4px 15px rgba(34, 199, 104, 0.4);
}

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

.page-blog__btn-secondary {
  background-color: transparent;
  color: #57E38D; /* Glow */
  border: 2px solid #57E38D; /* Glow */
}

.page-blog__btn-secondary:hover {
  background-color: rgba(87, 227, 141, 0.1);
  transform: translateY(-2px);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 80px 0;
  background-color: #08160F; /* Background */
  color: #F2FFF6; /* Text Main */
}

.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: #11271B; /* 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;
  border: 1px solid #2E7A4E; /* Border */
}

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

.page-blog__post-image-wrapper {
  height: 225px;
  overflow: hidden;
}

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

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

.page-blog__post-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__post-title a {
  color: #F2FFF6; /* Text Main */
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #57E38D; /* Glow */
}

.page-blog__post-summary {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  margin-bottom: 15px;
  height: 72px; /* Fixed height for summary to align cards */
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-blog__post-date {
  font-size: 0.9rem;
  color: #A7D9B8; /* Text Secondary */
  display: block;
  margin-bottom: 15px;
}

.page-blog__read-more-btn {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #57E38D; /* Glow */
  text-decoration: none;
  border-bottom: 2px solid #57E38D;
  padding-bottom: 3px;
  transition: all 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: #F2FFF6; /* Text Main */
  border-bottom-color: #F2FFF6;
}

.page-blog__all-posts-cta {
  text-align: center;
}

/* Categories Section */
.page-blog__categories-section {
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6; /* Text Main */
}

.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 25px;
  text-align: center;
}

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 15px;
  background-color: #11271B; /* Card BG */
  border-radius: 12px;
  text-decoration: none;
  color: #F2FFF6; /* Text Main */
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: #1e3a2a; /* Slightly lighter Deep Green for hover */
}

.page-blog__category-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
  object-fit: contain;
  display: block; /* Ensure it respects width/height */
}

.page-blog__category-name {
  font-size: 1.1rem;
  font-weight: 600;
}

/* Featured Article Section */
.page-blog__featured-article-section {
  padding: 80px 0;
  background-color: #08160F; /* Background */
  color: #F2FFF6; /* Text Main */
}

.page-blog__article-content {
  background-color: #11271B; /* Card BG */
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__article-content p {
  margin-bottom: 1.2em;
  font-size: 1.05rem;
  color: #A7D9B8; /* Text Secondary */
}

.page-blog__article-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #F2FFF6; /* Text Main */
}

.page-blog__article-content a {
  color: #57E38D; /* Glow */
  text-decoration: none;
  border-bottom: 1px solid #57E38D;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.page-blog__article-content a:hover {
  color: #F2FFF6; /* Text Main */
  border-bottom-color: #F2FFF6;
}

.page-blog__article-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 30px;
  display: block;
}

.page-blog__article-cta {
  margin-top: 40px;
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Why EV99 Section */
.page-blog__why-ev99-section {
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6; /* Text Main */
}

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

.page-blog__feature-item {
  background-color: #11271B; /* Card BG */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid #2E7A4E; /* Border */
}

.page-blog__feature-icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__feature-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: #F2FFF6; /* Text Main */
}

.page-blog__feature-text {
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
}

.page-blog__cta-area {
  text-align: center;
  margin-top: 40px;
}

/* FAQ Section */
.page-blog__faq-section {
  padding: 80px 0;
  background-color: #08160F; /* Background */
  color: #F2FFF6; /* Text Main */
}

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

.page-blog__faq-item {
  background-color: #11271B; /* Card BG */
  border: 1px solid #2E7A4E; /* Border */
  border-radius: 10px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

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

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #F2FFF6; /* Text Main */
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.page-blog__faq-question:hover {
  background-color: rgba(46, 122, 78, 0.2); /* Border color with opacity */
}

.page-blog__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  color: #57E38D; /* Glow */
  margin-left: 15px;
}

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 1rem;
  color: #A7D9B8; /* Text Secondary */
  line-height: 1.6;
}

/* Final CTA Section */
.page-blog__final-cta-section {
  padding: 80px 0;
  background-color: #0A4B2C; /* Deep Green */
  color: #F2FFF6; /* Text Main */
  text-align: center;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
  }
  .page-blog__hero-description {
    font-size: 1.1rem;
  }
  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
  .page-blog__feature-item {
    padding: 25px;
  }
  .page-blog__article-content {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  /* General mobile container padding */
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__featured-article-section,
  .page-blog__why-ev99-section,
  .page-blog__faq-section,
  .page-blog__final-cta-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Section padding adjustments */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Body handles header offset, small top padding */
    padding-bottom: 40px !important;
  }
  .page-blog__latest-posts-section,
  .page-blog__categories-section,
  .page-blog__featured-article-section,
  .page-blog__why-ev99-section,
  .page-blog__faq-section,
  .page-blog__final-cta-section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }

  .page-blog__hero-image-wrapper {
    max-height: 300px;
    margin-bottom: 20px;
  }

  .page-blog__hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }
  .page-blog__hero-description {
    font-size: 1rem;
    margin-bottom: 25px;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .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;
    padding: 12px 20px !important;
  }

  .page-blog__all-posts-cta .page-blog__btn-secondary {
    width: auto !important; /* Allow button to fit content if not full width */
    max-width: 80% !important;
  }

  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__post-image-wrapper {
    height: 180px;
  }
  .page-blog__post-content {
    padding: 20px;
  }
  .page-blog__post-title {
    font-size: 1.2rem;
  }
  .page-blog__post-summary {
    font-size: 0.95rem;
    height: auto; /* Allow summary to expand on mobile */
  }
  .page-blog__categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  .page-blog__category-card {
    padding: 20px 10px;
  }
  .page-blog__category-name {
    font-size: 1rem;
  }
  .page-blog__feature-item {
    padding: 20px;
  }
  .page-blog__article-content {
    padding: 25px;
  }
  .page-blog__article-content h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
  }
  .page-blog__article-content p {
    font-size: 0.95rem;
  }
  .page-blog__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }
  .page-blog__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.95rem;
  }

  /* Image responsive rules for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Video responsive rules for mobile (if any) */
  .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;
  }

  /* Buttons responsive rules for mobile */
  .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;
    flex-wrap: wrap !important;
    gap: 10px;
    display: flex;
    flex-direction: column; /* Stack buttons vertically on mobile */
  }

}

@media (max-width: 480px) {
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__category-icon {
    width: 50px;
    height: 50px;
  }
  .page-blog__category-name {
    font-size: 0.95rem;
  }
}