/* style/blog.css */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for assumed light body background */
}

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

/* Top Section */
.page-blog__top-section {
  padding-top: 10px; /* Adhering to the 10px top padding rule */
  padding-bottom: 40px;
  text-align: center;
  background: linear-gradient(135deg, #26A9E0, #34C6F0); /* Using brand color */
  color: #ffffff; /* White text on brand color background */
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* H1 font size clamp */
  font-weight: 700;
  margin-bottom: 15px;
  color: #ffffff;
}

.page-blog__description {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 30px;
  color: #f0f0f0;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-blog__btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.2s ease;
  max-width: 100%; /* For button responsiveness */
  box-sizing: border-box; /* For button responsiveness */
  white-space: normal; /* For button text responsiveness */
  word-wrap: break-word; /* For button text responsiveness */
  text-align: center;
}

.page-blog__btn-primary {
  background-color: #EA7C07; /* Custom login color */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-blog__btn-primary:hover {
  background-color: #D46B00;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
}

/* Articles Grid Section */
.page-blog__articles-grid {
  padding: 60px 0;
  background-color: #f8f8f8; /* Light background for article cards */
}

.page-blog__section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-blog__article-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.page-blog__article-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333333;
  margin-bottom: 10px;
  min-height: 70px; /* Ensure consistent card height */
}

.page-blog__article-excerpt {
  font-size: 0.95rem;
  color: #555555;
  margin-bottom: 15px;
  min-height: 80px; /* Ensure consistent card height */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.page-blog__article-date {
  font-size: 0.85rem;
  color: #888888;
  display: block;
}

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

/* Featured Article / Long Content Section */
.page-blog__featured-article {
  padding: 60px 0;
  background-color: #ffffff;
}

.page-blog__article-wrap {
  max-width: 900px; /* Slightly narrower for long-form content readability */
  margin: 0 auto;
  padding: 0 20px;
}

.page-blog__featured-article h2 {
  color: #26A9E0;
  margin-bottom: 30px;
}

.page-blog__featured-article h3 {
  font-size: 1.8rem;
  color: #333333;
  margin-top: 40px;
  margin-bottom: 20px;
}

.page-blog__featured-article p {
  margin-bottom: 15px;
  font-size: 1.05rem;
  color: #444444;
}

.page-blog__featured-article ul,
.page-blog__featured-article ol {
  margin-left: 25px;
  margin-bottom: 15px;
  color: #444444;
}

.page-blog__featured-article li {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.page-blog__figure {
  margin: 30px 0;
  text-align: center;
}

.page-blog__figure img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-blog__figcaption {
  font-size: 0.9rem;
  color: #777777;
  margin-top: 10px;
}

/* Bottom CTA Section */
.page-blog__cta-bottom {
  padding: 60px 0;
  text-align: center;
  background: #26A9E0; /* Brand color */
  color: #ffffff;
}

.page-blog__cta-bottom .page-blog__section-title {
  color: #ffffff;
}

.page-blog__cta-bottom .page-blog__description {
  color: #f0f0f0;
}

.page-blog__cta-bottom .page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #ffffff; /* White border on brand background */
}

.page-blog__cta-bottom .page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #26A9E0;
}

/* General image styling */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
  min-width: 200px; /* Ensure no small icons */
  min-height: 200px; /* Ensure no small icons */
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__container {
    padding: 0 15px;
  }

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

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

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

  .page-blog__article-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  /* 1. Top section title + dual CTA */
  .page-blog__top-section {
    padding-top: 10px !important; /* Enforce 10px top padding */
    padding-bottom: 30px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8rem, 7vw, 2.5rem); /* Adjust H1 for mobile */
    margin-bottom: 10px;
  }

  .page-blog__description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* 4. Buttons and button containers */
  .page-blog__btn,
  .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-left: 15px;
    padding-right: 15px;
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  /* 2. Single column long text container */
  .page-blog__articles-grid,
  .page-blog__featured-article,
  .page-blog__cta-bottom {
    padding: 40px 0;
  }

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

  .page-blog__grid {
    grid-template-columns: 1fr; /* Single column layout for cards */
    gap: 20px;
  }

  .page-blog__article-image {
    height: 180px; /* Adjust image height for mobile cards */
  }

  .page-blog__article-title {
    font-size: 1.2rem;
    min-height: auto; /* Allow height to adjust */
  }

  .page-blog__article-excerpt {
    font-size: 0.9rem;
    min-height: auto; /* Allow height to adjust */
  }

  .page-blog__article-wrap {
    padding: 0 15px; /* Adjust padding for content wrap */
  }

  .page-blog__featured-article h3 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-blog__featured-article p,
  .page-blog__featured-article li {
    font-size: 1rem;
  }

  /* 3. General images and figure */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important; /* Ensure min size */
    min-height: 200px !important; /* Ensure min size */
  }

  .page-blog__figure {
    margin: 20px 0;
  }
  .page-blog__figure img {
    width: 100%;
    height: auto;
  }

  /* 5. Registration tutorial and FAQ blocks (using general text styles) */
  .page-blog__featured-article ol,
  .page-blog__featured-article ul {
    margin-left: 20px;
  }
}