/* style/blog.css */
.page-blog {
  color: #f0f0f0; /* Light text for dark sections */
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  background-color: #0A2239;
}

.page-blog__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px);
  padding-bottom: 80px;
  background-color: #0A2239;
  color: #ffffff;
  text-align: center;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.page-blog__hero-title {
  font-size: 3.2em;
  font-weight: bold;
  color: #FFD700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.page-blog__button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.page-blog__button--primary {
  background-color: #FFD700;
  color: #0A2239;
}

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

.page-blog__button--secondary {
  background-color: transparent;
  color: #FFD700;
  border: 2px solid #FFD700;
}

.page-blog__button--secondary:hover {
  background-color: #FFD700;
  color: #0A2239;
  transform: translateY(-2px);
}

.page-blog__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.page-blog__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4) contrast(1.1); /* Darken image to ensure text contrast */
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #FFD700;
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

.page-blog__section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: #FFD700;
  border-radius: 2px;
}

.page-blog__latest-articles {
  background-color: #1a324a;
  padding: 80px 20px;
  color: #ffffff;
}

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

.page-blog__article-card {
  background-color: #0A2239;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.page-blog__article-thumbnail {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  min-width: 200px; /* Enforce minimum display size */
  min-height: 200px;
}

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

.page-blog__article-title {
  font-size: 1.5em;
  color: #FFD700;
  margin-bottom: 15px;
  line-height: 1.3;
}

.page-blog__article-link {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

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

.page-blog__read-more {
  display: inline-block;
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95em;
  border-bottom: 2px solid #FFD700;
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
  margin-top: auto;
}

.page-blog__read-more:hover {
  color: #ffffff;
  border-color: #ffffff;
}

.page-blog__featured-post {
  background-color: #0A2239;
  padding: 80px 20px;
  color: #ffffff;
}

.page-blog__featured-card {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: #1a324a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.page-blog__featured-thumbnail {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  min-width: 200px; /* Enforce minimum display size */
  min-height: 200px;
}

.page-blog__featured-content {
  padding: 40px;
}

.page-blog__featured-title {
  font-size: 2em;
  color: #FFD700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-blog__featured-excerpt,
.page-blog__featured-text {
  font-size: 1.1em;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-blog__categories {
  background-color: #1a324a;
  padding: 80px 20px;
  color: #ffffff;
}

.page-blog__category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-blog__category-card {
  background-color: #0A2239;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.page-blog__category-icon {
  width: 100%; /* Changed to 100% to fill container */
  height: auto;
  max-width: 250px; /* Ensure it's not tiny, but allows flexibility */
  margin: 0 auto 20px auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-width: 200px; /* Enforce minimum display size */
  min-height: 200px;
}

.page-blog__category-title {
  font-size: 1.3em;
  color: #FFD700;
  margin-bottom: 10px;
}

.page-blog__category-link {
  color: #FFD700;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.page-blog__category-description {
  font-size: 0.95em;
  color: #f0f0f0;
}

.page-blog__why-follow {
  background-color: #0A2239;
  padding: 80px 20px;
  color: #ffffff;
}

.page-blog__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-blog__benefit-item {
  background-color: #1a324a;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.page-blog__benefit-title {
  font-size: 1.6em;
  color: #FFD700;
  margin-bottom: 15px;
}

.page-blog__benefit-description {
  font-size: 1em;
  color: #f0f0f0;
}

.page-blog__call-to-action {
  background-color: #1a324a;
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-blog__cta-description {
  font-size: 1.2em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  position: relative;
  z-index: 2;
}

.page-blog__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

.page-blog__cta-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.page-blog__cta-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) contrast(1.1);
  min-width: 200px; /* Enforce minimum display size */
  min-height: 200px;
}

.page-blog__newsletter-signup {
  background-color: #0A2239;
  padding: 80px 20px;
  text-align: center;
  color: #ffffff;
}

.page-blog__newsletter-description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-blog__newsletter-form {
  display: flex;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
  gap: 15px;
  flex-wrap: wrap;
}

.page-blog__newsletter-input {
  padding: 14px 20px;
  border-radius: 8px;
  border: 2px solid #1a324a;
  background-color: #0A2239;
  color: #ffffff;
  font-size: 1em;
  flex-grow: 1;
  min-width: 250px;
}

.page-blog__newsletter-input::placeholder {
  color: #999;
}

/* Media Queries */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 2.8em;
  }
  .page-blog__section-title {
    font-size: 2.2em;
  }
  .page-blog__featured-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-blog {
    padding-top: var(--header-offset, 120px);
  }
  .page-blog__hero-section {
    padding-top: 60px; /* Adjust for mobile, as header offset is handled by .page-blog */
    padding-bottom: 60px;
  }
  .page-blog__hero-title {
    font-size: 2.2em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__hero-cta {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__button {
    width: 100%;
    max-width: 300px;
  }
  .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 40px;
  }
  .page-blog__latest-articles, .page-blog__featured-post, .page-blog__categories, .page-blog__why-follow, .page-blog__call-to-action, .page-blog__newsletter-signup {
    padding: 60px 15px;
  }
  .page-blog__article-grid,
  .page-blog__category-grid,
  .page-blog__benefits-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__featured-card {
    flex-direction: column;
  }
  .page-blog__featured-content {
    padding: 30px;
  }
  .page-blog__featured-title {
    font-size: 1.5em;
  }
  .page-blog__featured-excerpt,
  .page-blog__featured-text {
    font-size: 0.95em;
  }
  .page-blog__newsletter-form {
    flex-direction: column;
    gap: 10px;
  }
  .page-blog__newsletter-input {
    min-width: unset;
    width: 100%;
  }
  /* Ensure all images within .page-blog do not overflow */
  .page-blog img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 1.8em;
  }
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__button {
    font-size: 1em;
    padding: 12px 25px;
  }
  .page-blog__article-title {
    font-size: 1.3em;
  }
  .page-blog__featured-title {
    font-size: 1.3em;
  }
  .page-blog__category-title {
    font-size: 1.2em;
  }
}