/* 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);
  overflow-x: hidden;
}

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

.page-blog__section-title--white {
  color: var(--text-main);
}

.page-blog__section-description {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__section-description--white {
  color: var(--text-secondary);
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* body handles --header-offset, this is for visual top padding */
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.2;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  color: var(--text-main);
}

.page-blog__hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.1;
  color: var(--text-main);
}

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

.page-blog__hero-cta {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #FFFFFF;
  border: none;
}

.page-blog__hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.page-blog__introduction-section {
  padding: 80px 0;
  background-color: var(--background);
  color: var(--text-main);
}

.page-blog__intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.page-blog__intro-text p {
  margin-bottom: 15px;
  font-size: 17px;
  color: var(--text-secondary);
}

.page-blog__intro-image-wrapper {
  text-align: center;
}

.page-blog__intro-image {
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

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

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

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

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

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

.page-blog__category-title {
  font-size: 24px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 10px;
  padding: 0 15px;
}

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

.page-blog__category-link {
  font-size: 16px;
  font-weight: bold;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  transition: color 0.3s ease;
}

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

.page-blog__arrow {
  margin-left: 5px;
  transition: margin-left 0.3s ease;
}

.page-blog__category-link:hover .page-blog__arrow {
  margin-left: 10px;
}

/* Why Follow Section */
.page-blog__why-follow-section {
  padding: 80px 0;
  background-color: var(--background);
}

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

.page-blog__benefit-item {
  background-color: var(--card-b-g);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

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

.page-blog__benefit-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-main);
  margin-bottom: 15px;
}

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

.page-blog__text-link {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__text-link:hover {
  color: var(--glow);
  text-decoration: underline;
}

/* Featured Articles Section */
.page-blog__featured-articles-section {
  padding: 80px 0;
  background-color: var(--card-b-g);
}

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

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

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

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

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

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

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

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

.page-blog__read-more {
  font-size: 16px;
  font-weight: bold;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.3s ease;
}

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

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

.page-blog__view-all-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #FFFFFF;
  border: none;
}

.page-blog__view-all-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

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

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

.page-blog__faq-item {
  background-color: var(--card-b-g);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.page-blog__faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 18px;
  font-weight: bold;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.3s ease;
}

.page-blog__faq-item summary:hover {
  background-color: var(--deep-green);
}

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

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

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

.page-blog__faq-answer {
  padding: 0 25px 20px;
  font-size: 16px;
  color: var(--text-secondary);
}

/* Call to Action Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: var(--card-b-g);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-blog__cta-section .page-blog__section-title,
.page-blog__cta-section .page-blog__section-description {
  position: relative;
  z-index: 1;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #FFFFFF;
  border: none;
  margin-top: 30px;
  position: relative;
  z-index: 1;
}

.page-blog__cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.page-blog__cta-image {
  position: absolute;
  bottom: -50px;
  right: -100px;
  width: 500px;
  height: auto;
  opacity: 0.1;
  z-index: 0;
  transform: rotate(15deg);
}

/* Responsive Styles */
@media (min-width: 769px) {
  .page-blog__intro-grid {
    grid-template-columns: 1fr 1fr;
  }

  .page-blog__intro-image-wrapper {
    order: 2; /* Image on the right for desktop */
  }

  .page-blog__intro-text {
    order: 1; /* Text on the left for desktop */
  }
}

@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: clamp(32px, 4.5vw, 48px);
  }
  .page-blog__hero-description {
    font-size: clamp(16px, 2.2vw, 20px);
  }
}

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

  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }

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

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

  .page-blog__hero-cta,
  .page-blog__view-all-button,
  .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
  }

  .page-blog__introduction-section,
  .page-blog__categories-section,
  .page-blog__why-follow-section,
  .page-blog__featured-articles-section,
  .page-blog__faq-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

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

  .page-blog__section-description {
    font-size: 15px;
    margin-bottom: 30px;
  }

  .page-blog__intro-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__intro-text,
  .page-blog__intro-image-wrapper {
    order: unset;
  }

  .page-blog__categories-grid,
  .page-blog__benefits-grid,
  .page-blog__articles-grid {
    grid-template-columns: 1fr;
  }

  .page-blog__category-card,
  .page-blog__benefit-item,
  .page-blog__article-card {
    margin-left: 15px;
    margin-right: 15px;
  }

  .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__introduction-section,
  .page-blog__categories-section,
  .page-blog__why-follow-section,
  .page-blog__featured-articles-section,
  .page-blog__faq-section,
  .page-blog__cta-section,
  .page-blog__intro-image-wrapper,
  .page-blog__view-all-wrapper,
  .page-blog__cta-button-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  .page-blog__faq-item summary {
    padding: 15px 20px;
    font-size: 16px;
  }

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

  .page-blog__cta-image {
    position: relative;
    width: 100%;
    right: auto;
    bottom: auto;
    transform: none;
    margin-top: 30px;
    opacity: 0.05;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: clamp(24px, 7vw, 30px);
  }
  .page-blog__hero-description {
    font-size: clamp(14px, 3.5vw, 16px);
  }
  .page-blog__section-title {
    font-size: clamp(22px, 6vw, 28px);
  }
  .page-blog__category-title {
    font-size: 20px;
  }
  .page-blog__benefit-title {
    font-size: 20px;
  }
  .page-blog__article-title {
    font-size: 18px;
  }
}