/* style/blog.css */
.page-blog {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #1F2D3D; /* Text Main */
  background-color: #F4F7FB; /* Background */
}

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

.page-blog__hero-section {
  padding: 40px 0;
  text-align: center;
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%);
  color: #ffffff;
  padding-top: 10px; /* Small top padding, body handles header offset */
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size */
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  color: #ffffff;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__description {
  font-size: clamp(1em, 1.5vw, 1.2em);
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-blog__btn {
  display: inline-block;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  max-width: 100%; /* Ensure button doesn't overflow */
  box-sizing: border-box;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #4A8BFF 0%, #2F6BFF 100%); /* Button color */
  color: #ffffff;
  border: 2px solid transparent;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.3);
}

.page-blog__btn-primary:hover {
  background: linear-gradient(180deg, #2F6BFF 0%, #4A8BFF 100%);
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.4);
}

.page-blog__btn-secondary {
  background: #ffffff;
  color: #2F6BFF; /* Main color */
  border: 2px solid #2F6BFF;
  box-shadow: 0 4px 10px rgba(47, 107, 255, 0.1);
}

.page-blog__btn-secondary:hover {
  background: #F4F7FB;
  color: #2F6BFF;
  border-color: #6FA3FF;
  box-shadow: 0 6px 15px rgba(47, 107, 255, 0.2);
}

.page-blog__btn-ghost {
  background: transparent;
  color: #2F6BFF;
  border: 2px solid #2F6BFF;
}

.page-blog__btn-ghost:hover {
  background: #2F6BFF;
  color: #ffffff;
}

.page-blog__articles-section,
.page-blog__about-blog-section,
.page-blog__categories-section,
.page-blog__popular-posts-section,
.page-blog__cta-bottom-section {
  padding: 60px 0;
}

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  font-weight: 700;
  color: #1F2D3D; /* Text Main */
  text-align: center;
  margin-bottom: 40px;
}

.page-blog__about-blog-section {
  background: #2F6BFF;
  color: #ffffff;
}

.page-blog__about-blog-section .page-blog__section-title {
  color: #ffffff;
}

.page-blog__text-block {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__text-block p {
  margin-bottom: 20px;
  font-size: 1.1em;
  line-height: 1.7;
}

.page-blog__text-block strong {
  font-weight: 700;
}

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

.page-blog__article-card {
  background: #ffffff; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #D6E2FF; /* Border */
}

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

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

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

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

.page-blog__article-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #1F2D3D; /* Text Main */
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__article-title:hover {
  color: #2F6BFF;
}

.page-blog__article-excerpt {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.5;
}

.page-blog__article-date {
  font-size: 0.85em;
  color: #888;
}

.page-blog__view-all-wrapper {
  text-align: center;
}

.page-blog__category-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.page-blog__category-item {
  background: #ffffff; /* Card BG */
  border: 1px solid #D6E2FF; /* Border */
  border-radius: 25px;
  padding: 8px 20px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.page-blog__category-item:hover {
  background-color: #2F6BFF;
  border-color: #2F6BFF;
}

.page-blog__category-link {
  text-decoration: none;
  color: #1F2D3D; /* Text Main */
  font-weight: 500;
  display: block;
}

.page-blog__category-item:hover .page-blog__category-link {
  color: #ffffff;
}

.page-blog__popular-post-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.page-blog__popular-post-item {
  display: flex;
  align-items: center;
  background: #ffffff; /* Card BG */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #D6E2FF; /* Border */
  padding: 15px;
}

.page-blog__popular-post-image {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
  flex-shrink: 0;
}

.page-blog__popular-post-content {
  flex-grow: 1;
}

.page-blog__popular-post-link {
  font-size: 1.1em;
  font-weight: 600;
  color: #1F2D3D; /* Text Main */
  text-decoration: none;
  display: block;
  margin-bottom: 5px;
  line-height: 1.4;
}

.page-blog__popular-post-link:hover {
  color: #2F6BFF;
}

.page-blog__popular-post-date {
  font-size: 0.85em;
  color: #888;
}

.page-blog__cta-bottom-section .page-blog__section-title {
  margin-bottom: 20px;
}

.page-blog__cta-bottom-section p {
  text-align: center;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.1em;
}

/* Mobile Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__hero-section {
    padding: 30px 0;
  }

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

  .page-blog__description {
    font-size: clamp(1em, 1.8vw, 1.1em);
  }

  .page-blog__articles-section,
  .page-blog__about-blog-section,
  .page-blog__categories-section,
  .page-blog__popular-posts-section,
  .page-blog__cta-bottom-section {
    padding: 40px 0;
  }

  .page-blog__section-title {
    font-size: clamp(1.8em, 4vw, 2.2em);
    margin-bottom: 30px;
  }

  .page-blog__article-image {
    height: 200px;
  }

  .page-blog__popular-post-item {
    flex-direction: column;
    text-align: center;
  }

  .page-blog__popular-post-image {
    margin-right: 0;
    margin-bottom: 10px;
    width: 150px;
    height: 112px;
  }
}

@media (max-width: 768px) {
  /* 1. Top section/CTA */
  .page-blog__hero-section {
    padding: 20px 0 !important;
    padding-top: 10px !important; /* Small top padding, body handles header offset */
  }

  .page-blog__main-title {
    font-size: clamp(1.8em, 7vw, 2.5em) !important;
    margin-bottom: 10px !important;
  }

  .page-blog__description {
    font-size: 1em !important;
    margin-bottom: 20px !important;
  }

  .page-blog__cta-buttons {
    flex-direction: column !important;
    gap: 10px !important;
    padding: 0 15px;
  }

  .page-blog__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 !important;
    padding-right: 15px !important;
  }

  /* 2. Single column article wrap & general containers */
  .page-blog__container,
  .page-blog__text-block {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-blog__articles-section,
  .page-blog__about-blog-section,
  .page-blog__categories-section,
  .page-blog__popular-posts-section,
  .page-blog__cta-bottom-section {
    padding: 30px 0 !important;
  }

  .page-blog__section-title {
    font-size: clamp(1.5em, 6vw, 2em) !important;
    margin-bottom: 25px !important;
  }

  .page-blog__article-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .page-blog__article-card {
    margin-bottom: 15px;
  }

  .page-blog__article-image {
    height: 180px !important;
  }

  .page-blog__article-title {
    font-size: 1.2em !important;
  }

  .page-blog__article-excerpt,
  .page-blog__text-block p {
    font-size: 0.95em !important;
  }

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

  /* 4. Buttons (already handled in top section, but re-emphasize for other buttons) */
  /* .page-blog__btn and .page-blog__cta-buttons are already covered */

  /* 5. Registration tutorials & FAQ sections - N/A for this blog content, but general text blocks are covered */
  .page-blog__category-list {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .page-blog__category-item {
    width: 100%;
    max-width: 250px;
    text-align: center;
  }

  .page-blog__popular-post-list {
    grid-template-columns: 1fr !important;
  }

  .page-blog__popular-post-item {
    flex-direction: row !important; /* Keep horizontal for popular posts for better use of space */
    text-align: left !important;
    padding: 10px !important;
  }

  .page-blog__popular-post-image {
    width: 80px !important;
    height: 60px !important;
    margin-right: 10px !important;
    margin-bottom: 0 !important;
  }

  .page-blog__popular-post-link {
    font-size: 1em !important;
  }
}

/* Glow color for potential use, though not explicitly used in this layout */
.page-blog__glow {
  box-shadow: 0 0 15px #A5C4FF;
}