/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--background-color);
}

.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, 48px);
  color: var(--text-main);
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
  line-height: 1.2;
}

.page-blog__section-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
}

/* Color Contrast Adjustments based on body background #08160F (dark) */
.page-blog {
  color: #F2FFF6; /* Text Main */
}

.page-blog__light-bg {
  background-color: #08160F; /* Match body background for consistency */
  color: #F2FFF6; /* Text Main */
}

.page-blog__dark-bg {
  background-color: #11271B; /* Card BG, slightly lighter dark */
  color: #F2FFF6; /* Text Main */
}

.page-blog__card {
  background-color: #11271B; /* Card BG */
  color: #F2FFF6; /* Text Main */
  border: 1px solid var(--border-color); /* Border */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog p,
.page-blog li {
  color: var(--text-main);
}

.page-blog a {
  color: var(--gold);
  text-decoration: none;
}

.page-blog a:hover {
  text-decoration: underline;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 60px; /* Small top padding, more bottom */
  overflow: hidden;
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.3; /* Overlay for text readability */
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 20px;
}

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

.page-blog__hero-description {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* CTA Button Base */
.page-blog__cta-button {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 50px;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button--primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #FFFFFF;
  border: none;
}

.page-blog__cta-button--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(var(--main-color-rgb), 0.4);
}

.page-blog__cta-button--secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
  margin-left: 15px;
}

.page-blog__cta-button--secondary:hover {
  background: var(--gold);
  color: #11271B;
}

/* Latest Posts Section */
.page-blog__latest-posts,
.page-blog__featured-categories,
.page-blog__faq-section,
.page-blog__cta-section {
  padding: 60px 0;
}

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

.page-blog__post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease;
  padding: 15px;
}

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

.page-blog__post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}

.page-blog__post-content {
  padding: 0 10px;
}

.page-blog__post-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

.page-blog__post-title a {
  color: var(--text-main);
}

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

.page-blog__post-meta {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--glow);
  font-weight: bold;
}

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

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

/* Featured Categories Section */
.page-blog__categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-blog__category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease;
}

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

.page-blog__category-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}

.page-blog__category-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-main);
}

/* FAQ Section */
.page-blog__faq-list {
  margin-top: 40px;
}

.page-blog__faq-item {
  margin-bottom: 15px;
  padding: 15px 20px;
}

.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  padding: 5px 0;
}

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

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

.page-blog__faq-answer {
  font-size: 16px;
  color: var(--text-secondary);
  padding-top: 10px;
  line-height: 1.7;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

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

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

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

  .page-blog__hero-description {
    font-size: clamp(16px, 3vw, 20px);
  }

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

  .page-blog__section-subtitle {
    font-size: clamp(14px, 2.5vw, 18px);
    margin-bottom: 30px;
  }

  .page-blog__latest-posts,
  .page-blog__featured-categories,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__posts-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__faq-item {
    padding: 10px;
  }

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

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

  .page-blog__faq-toggle {
    font-size: 20px;
  }

  .page-blog__cta-button {
    width: 100% !important;
    margin-left: 0 !important;
    margin-bottom: 15px;
  }

  .page-blog__cta-button--secondary {
    margin-left: 0;
  }

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

  /* Mobile image, video, button responsive adaptations */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog video,
  .page-blog__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container,
  .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; /* Ensure no horizontal scroll */
  }
  
  .page-blog__cta-button,
  .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-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__cta-buttons {
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-blog__video-section {
    padding-top: 10px !important;
  }
}

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