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

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

.page-blog__section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  text-align: center;
  margin-bottom: 25px;
  color: var(--color-text-main, #FFF6D6);
  line-height: 1.2;
}

.page-blog__section-intro {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: rgba(255, 246, 214, 0.8);
}

.page-blog__dark-bg {
  background-color: var(--color-background, #0A0A0A);
  color: var(--color-text-main, #FFF6D6);
}

.page-blog__light-bg {
  background-color: #f9f9f9; /* Contrast for specific sections */
  color: #333333;
}

.page-blog__text-contrast-fix {
  color: #333333 !important;
}

.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  color: #ffffff;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: transparent;
  border: 2px solid var(--color-glow, #FFD36B);
  color: var(--color-glow, #FFD36B);
}

.page-blog__btn-secondary:hover {
  background: var(--color-glow, #FFD36B);
  color: #111111;
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  padding-top: 10px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.page-blog__hero-image {
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

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

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

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

.page-blog__description {
  font-size: clamp(18px, 2.5vw, 22px);
  margin-bottom: 30px;
  color: rgba(255, 246, 214, 0.9);
}

/* Latest Articles Section */
.page-blog__latest-articles-section {
  padding: 60px 0;
}

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

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

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

.page-blog__post-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

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

.page-blog__post-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text-main, #FFF6D6);
  line-height: 1.3;
}

.page-blog__post-excerpt {
  font-size: 15px;
  color: rgba(255, 246, 214, 0.7);
  margin-bottom: 15px;
}

.page-blog__post-date {
  font-size: 14px;
  color: rgba(255, 246, 214, 0.5);
  display: block;
  margin-bottom: 10px;
}

.page-blog__read-more {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-glow, #FFD36B);
  text-decoration: none;
  position: relative;
}

.page-blog__read-more::after {
  content: '→';
  margin-left: 8px;
  transition: margin-left 0.3s ease;
}

.page-blog__post-link:hover .page-blog__read-more::after {
  margin-left: 12px;
}

/* Featured Article Section */
.page-blog__featured-article-section {
  padding: 60px 0;
}

.page-blog__article-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  color: #333333;
}

.page-blog__article-body h3 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #1a1a1a;
}

.page-blog__article-body p {
  font-size: 17px;
  margin-bottom: 18px;
  line-height: 1.7;
  color: #444444;
}

.page-blog__article-body ul,
.page-blog__article-body ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.page-blog__article-body li {
  font-size: 17px;
  margin-bottom: 10px;
  color: #444444;
}

.page-blog__article-body img.page-blog__article-figure {
  width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* FAQ Section */
details.page-blog__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #ffffff;
  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;
}
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: #333333;
}
.page-blog__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 30px;
  text-align: center;
}
details.page-blog__faq-item .page-blog__faq-answer {
  padding: 0 25px 25px;
  background: #fdfdfd;
  border-radius: 0 0 8px 8px;
}
details.page-blog__faq-item .page-blog__faq-answer p {
  font-size: 16px;
  color: #555555;
  line-height: 1.6;
}

/* Responsive styles */
@media (max-width: 1024px) {
  .page-blog__container {
    padding: 0 15px;
  }
  .page-blog__hero-content {
    padding: 0 15px;
  }
  .page-blog__main-title {
    font-size: clamp(32px, 4.5vw, 48px);
  }
  .page-blog__description {
    font-size: clamp(16px, 2.2vw, 20px);
  }
  .page-blog__articles-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .page-blog__post-title {
    font-size: 20px;
  }
  .page-blog__article-body {
    padding: 15px;
  }
  .page-blog__article-body h3 {
    font-size: 24px;
  }
  .page-blog__article-body p,
  .page-blog__article-body li {
    font-size: 16px;
  }
}

@media (max-width: 849px) {
  .page-blog__hero-image img {
    object-fit: contain !important;
    aspect-ratio: unset !important;
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding-top: 10px; /* Specific top padding for mobile hero */
    padding-bottom: 40px;
  }
  .page-blog__hero-image img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* Ensure image is fully visible */
  }
  .page-blog__hero-content {
    padding: 0 15px;
  }
  .page-blog__main-title {
    font-size: clamp(28px, 8vw, 38px);
    margin-bottom: 15px;
  }
  .page-blog__description {
    font-size: clamp(15px, 4vw, 18px);
    margin-bottom: 25px;
  }
  .page-blog__section-title {
    font-size: clamp(24px, 7vw, 32px);
    margin-bottom: 20px;
  }
  .page-blog__section-intro {
    font-size: 16px;
    margin-bottom: 30px;
    padding: 0 15px;
  }
  .page-blog__latest-articles-section,
  .page-blog__featured-article-section,
  .page-blog__cta-section,
  .page-blog__faq-section {
    padding: 40px 0;
  }
  .page-blog__articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-blog__post-card img {
    
  }
  .page-blog__post-content {
    padding: 15px;
  }
  .page-blog__post-title {
    font-size: 18px;
  }
  .page-blog__post-excerpt {
    font-size: 14px;
  }
  .page-blog__article-body {
    padding: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__article-body h3 {
    font-size: 22px;
    margin-top: 25px;
    margin-bottom: 10px;
  }
  .page-blog__article-body p,
  .page-blog__article-body li {
    font-size: 15px;
    line-height: 1.6;
  }
  .page-blog__article-body img.page-blog__article-figure {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 20px auto;
  }
  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding: 0 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 20px;
    font-size: 16px;
    box-sizing: border-box !important;
  }
  details.page-blog__faq-item summary.page-blog__faq-question {
    padding: 15px;
  }
  .page-blog__faq-qtext {
    font-size: 16px;
  }
  .page-blog__faq-toggle {
    font-size: 24px;
    width: 24px;
  }
  details.page-blog__faq-item .page-blog__faq-answer {
    padding: 0 15px 15px;
  }
  .page-blog__faq-answer p {
    font-size: 15px;
  }
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__container,
  .page-blog__post-card,
  .page-blog__cta-section,
  .page-blog__faq-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
}