/* style/blog.css */

:root {
  --primary-color: #26A9E0;
  --secondary-color: #FFFFFF;
  --login-color: #EA7C07;
  --background-light: #FFFFFF;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --black-color: #000000; /* From shared.css body background */
}

/* Base styles for the blog page, assuming a dark body background from shared.css */
.page-blog {
  color: var(--text-light); /* Light text on dark body background */
  background-color: transparent; /* Body background handled by shared.css */
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

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

.page-blog__section-title {
  font-size: 2.5em;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-light);
  line-height: 1.2;
}

.page-blog__paragraph {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-blog__list {
  list-style: disc;
  margin-left: 20px;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-blog__list-item {
  margin-bottom: 10px;
  font-size: 1.1em;
}

.page-blog__link {
  color: var(--primary-color);
  text-decoration: none;
}

.page-blog__link: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: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  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;
}

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
}

.page-blog__main-title {
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.2;
  /* Using clamp for responsive font-size, avoiding fixed large values */
  font-size: clamp(2.2em, 4vw, 3.5em);
}

.page-blog__hero-description {
  font-size: 1.2em;
  color: var(--text-light);
  margin-bottom: 30px;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-primary:hover {
  background-color: darken(var(--primary-color), 10%);
  border-color: darken(var(--primary-color), 10%);
}

.page-blog__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-blog__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Light background sections */
.page-blog__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
  padding: 60px 0;
}

.page-blog__light-bg .page-blog__section-title,
.page-blog__light-bg .page-blog__paragraph,
.page-blog__light-bg .page-blog__list-item,
.page-blog__light-bg .page-blog__category-title,
.page-blog__light-bg .page-blog__category-description,
.page-blog__light-bg .page-blog__article-title,
.page-blog__light-bg .page-blog__article-meta,
.page-blog__light-bg .page-blog__article-excerpt,
.page-blog__light-bg .page-blog__read-more {
  color: var(--text-dark);
}

.page-blog__light-bg .page-blog__link,
.page-blog__light-bg .page-blog__category-link {
  color: var(--primary-color);
}

/* Dark background sections */
.page-blog__dark-section {
  background-color: var(--black-color);
  color: var(--text-light);
  padding: 60px 0;
}

.page-blog__dark-section .page-blog__section-title,
.page-blog__dark-section .page-blog__paragraph,
.page-blog__dark-section .page-blog__list-item,
.page-blog__dark-section .page-blog__feature-title,
.page-blog__dark-section .page-blog__feature-description {
  color: var(--text-light);
}

.page-blog__dark-section .page-blog__link {
  color: var(--primary-color);
}

/* Intro Section */
.page-blog__intro-section {
  text-align: center;
}

/* Why Follow Section */
.page-blog__why-follow-section {
  text-align: center;
}

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

.page-blog__feature-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-blog__feature-title {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-light);
}

.page-blog__feature-description {
  color: var(--text-light);
}

/* Categories Section */
.page-blog__categories-section {
  text-align: center;
}

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

.page-blog__category-card {
  background: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}

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

.page-blog__category-title {
  font-size: 1.4em;
  font-weight: bold;
  margin: 15px 20px 10px;
  color: var(--text-dark);
}

.page-blog__category-link {
  color: var(--text-dark);
  text-decoration: none;
}

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

.page-blog__category-description {
  font-size: 0.95em;
  color: #666;
  margin: 0 20px 20px;
}

/* Recent Articles Section */
.page-blog__recent-articles {
  text-align: center;
}

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

.page-blog__article-card {
  background: var(--secondary-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}

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

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

.page-blog__article-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__article-title a {
  color: var(--text-dark);
  text-decoration: none;
}

.page-blog__article-title a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-blog__article-meta {
  font-size: 0.9em;
  color: #888;
  margin-bottom: 15px;
}

.page-blog__article-excerpt {
  font-size: 1em;
  color: #555;
  margin-bottom: 20px;
}

.page-blog__read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

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

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

/* FAQ Section */
.page-blog__faq-section {
  text-align: center;
}

.page-blog__faq-list {
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__faq-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  text-align: left;
}

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

.page-blog__faq-item[open] .page-blog__faq-question {
  background-color: rgba(255, 255, 255, 0.15);
}

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

.page-blog__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  color: var(--primary-color);
}

.page-blog__faq-answer {
  padding: 0 20px 20px;
  font-size: 1.05em;
  color: var(--text-light);
}

.page-blog__faq-answer p {
  color: var(--text-light);
}

/* Conclusion Section */
.page-blog__conclusion-section {
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 15px;
  }

  .page-blog__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }

  .page-blog__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

  .page-blog__hero-section,
  .page-blog__intro-section,
  .page-blog__why-follow-section,
  .page-blog__categories-section,
  .page-blog__search-guide-section,
  .page-blog__recent-articles,
  .page-blog__faq-section,
  .page-blog__conclusion-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-blog__hero-content {
    padding: 10px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }

  .page-blog__hero-description {
    font-size: 1em;
  }

  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-blog__paragraph,
  .page-blog__list-item,
  .page-blog__feature-description,
  .page-blog__category-description,
  .page-blog__article-excerpt,
  .page-blog__faq-answer p {
    font-size: 0.95em;
  }

  .page-blog__feature-grid,
  .page-blog__category-grid,
  .page-blog__article-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .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;
    margin-bottom: 10px;
  }

  .page-blog__view-all {
    margin-top: 30px;
  }

  .page-blog__faq-question {
    font-size: 1.1em;
    padding: 15px;
  }

  /* Force responsive images */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-blog__video-section {
    padding-top: 10px !important; /* body already handles --header-offset */
  }
  
  .page-blog__feature-item,
  .page-blog__category-card,
  .page-blog__article-card,
  .page-blog__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
  }
}