/* style/blog.css */

:root {
  --primary-color: #017439;
  --secondary-color: #C30808; /* For Register/Login */
  --text-color-light: #FFFFFF;
  --text-color-dark: #333333;
  --background-color-light: #FFFFFF;
  --background-color-dark: #017439;
  --link-color: #017439;
  --border-color: #e0e0e0;
  --highlight-text-color: #FFFF00; /* For Register/Login font */
}

.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--background-color-light);
}

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

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

.page-blog__section-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-blog__section-description {
  font-size: 18px;
  color: #555;
  margin-bottom: 40px;
  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;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, header offset handled by body */
  background: linear-gradient(135deg, var(--primary-color) 0%, #00a040 100%);
  color: var(--text-color-light);
  overflow: hidden;
}

.page-blog__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.page-blog__hero-image {
  width: 100%;
  margin-bottom: 30px;
  order: 1;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-content {
  order: 2;
  text-align: center;
  width: 100%;
  padding: 20px;
}

.page-blog__main-title {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-blog__hero-description {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  margin-bottom: 30px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--secondary-color);
  color: var(--highlight-text-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  border: none;
  cursor: pointer;
}

.page-blog__cta-button:hover {
  background: #a50707;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-blog__view-all-button-container {
  margin-top: 40px;
}

/* Latest Posts Section */
.page-blog__latest-posts .page-blog__section-title,
.page-blog__latest-posts .page-blog__section-description {
  color: var(--primary-color);
}

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

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

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-blog__post-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.page-blog__post-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-blog__post-title {
  font-size: 22px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
  line-height: 1.3;
}

.page-blog__post-meta {
  font-size: 14px;
  color: #888;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 16px;
  color: #666;
  margin-bottom: 0;
  flex-grow: 1;
}

/* Featured Categories Section */
.page-blog__featured-categories {
  background: var(--background-color-dark);
  color: var(--text-color-light);
}

.page-blog__featured-categories .page-blog__section-title {
  color: var(--text-color-light);
}

.page-blog__featured-categories .page-blog__section-description {
  color: rgba(255, 255, 255, 0.8);
}

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

.page-blog__category-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 30px 20px;
  text-decoration: none;
  color: var(--text-color-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__category-card:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

.page-blog__category-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.page-blog__category-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--text-color-light);
}

/* Why Us / Benefits Section */
.page-blog__why-us .page-blog__section-title {
  color: var(--primary-color);
}

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

.page-blog__benefit-item {
  background: var(--background-color-light);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 30px;
  text-align: center;
}

.page-blog__benefit-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 25px;
}

.page-blog__benefit-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-blog__benefit-text {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
}

/* Promotions Section */
.page-blog__promotions {
  background: var(--background-color-dark);
  color: var(--text-color-light);
}

.page-blog__promotions .page-blog__section-title {
  color: var(--text-color-light);
}

.page-blog__promotions .page-blog__section-description {
  color: rgba(255, 255, 255, 0.8);
}

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

.page-blog__promo-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__promo-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-blog__promo-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color-light);
  margin-bottom: 10px;
}

.page-blog__promo-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

/* FAQ Section */
.page-blog__faq-section .page-blog__section-title {
  color: var(--primary-color);
}

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

details.page-blog__faq-item summary.page-blog__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
  color: var(--text-color-dark);
}

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

details.page-blog__faq-item summary.page-blog__faq-question:hover {
  background: #f5f5f5;
}

.page-blog__faq-qtext {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--primary-color);
}

.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  flex-shrink: 0;
  margin-left: 20px;
  width: 30px;
  text-align: center;
  line-height: 1;
}

details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: #f9f9f9;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  text-align: left;
  color: #555;
}

.page-blog__faq-answer p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
}

/* Final CTA Section */
.page-blog__cta-final {
  background: linear-gradient(135deg, #017439 0%, #00a040 100%);
  color: var(--text-color-light);
  padding: 80px 0;
}

.page-blog__cta-final .page-blog__section-title {
  color: var(--text-color-light);
  font-size: 36px;
}

.page-blog__cta-final .page-blog__section-description {
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.page-blog__btn-primary {
  background: var(--secondary-color);
  color: var(--highlight-text-color);
  padding: 18px 50px;
  font-size: 22px;
  border-radius: 10px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  margin-top: 30px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
  border: none;
  cursor: pointer;
}

.page-blog__btn-primary:hover {
  background: #a50707;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Dark background sections */
.page-blog__dark-section {
  background-color: var(--background-color-dark);
  color: var(--text-color-light);
}

.page-blog__dark-section .page-blog__section-title {
  color: var(--text-color-light);
}

.page-blog__dark-section .page-blog__section-description {
  color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-blog__section-title {
    font-size: 28px;
  }
  .page-blog__section-description {
    font-size: 16px;
  }
  .page-blog__post-title {
    font-size: 20px;
  }
  .page-blog__category-title {
    font-size: 18px;
  }
  .page-blog__benefit-title {
    font-size: 22px;
  }
  .page-blog__promo-title {
    font-size: 20px;
  }
  .page-blog__faq-qtext {
    font-size: 16px;
  }
  .page-blog__faq-toggle {
    font-size: 24px;
  }
  .page-blog__cta-final .page-blog__section-title {
    font-size: 32px;
  }
  .page-blog__cta-final .page-blog__section-description {
    font-size: 18px;
  }
  .page-blog__btn-primary {
    padding: 15px 40px;
    font-size: 20px;
  }
}

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

  .page-blog__section {
    padding: 40px 0;
  }

  /* HERO Section */
  .page-blog__hero-section {
    padding-top: 10px !important;
    padding-bottom: 30px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-blog__hero-image img {
    border-radius: 8px;
  }

  .page-blog__main-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

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

  .page-blog__cta-button {
    padding: 12px 30px;
    font-size: 18px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Latest Posts Grid */
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-blog__post-excerpt {
    font-size: 15px;
  }

  /* Categories Grid */
  .page-blog__categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
  }

  .page-blog__category-icon {
    width: 80px;
    height: 80px;
  }

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

  /* Benefits Grid */
  .page-blog__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__benefit-image {
    height: 150px;
  }

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

  .page-blog__benefit-text {
    font-size: 15px;
  }

  /* Promotions Grid */
  .page-blog__promos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-blog__promo-image {
    height: 150px;
  }

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

  .page-blog__promo-text {
    font-size: 15px;
  }

  /* FAQ Section */
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px 20px;
  }

  .page-blog__faq-qtext {
    font-size: 15px;
  }

  .page-blog__faq-toggle {
    font-size: 22px;
    width: 25px;
  }

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

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

  /* Final CTA */
  .page-blog__cta-final {
    padding: 60px 0;
  }

  .page-blog__cta-final .page-blog__section-title {
    font-size: 28px;
  }

  .page-blog__cta-final .page-blog__section-description {
    font-size: 16px;
  }

  .page-blog__btn-primary {
    padding: 14px 35px;
    font-size: 18px;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* General image and container responsive rules */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__category-card,
  .page-blog__benefit-item,
  .page-blog__promo-item,
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }
}