/* style/blog.css */
.page-blog {
  color: #333333; /* Dark text for light body background */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-blog__hero-section {
  background-color: #0A192F; /* Dark background for hero */
  color: #ffffff; /* Light text for dark background */
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-blog__hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3; /* Slightly transparent to let text stand out */
  z-index: 1;
}

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

.page-blog__hero-title {
  font-size: 3.2em;
  margin-bottom: 20px;
  color: #FFD700; /* Gold accent for title */
  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-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.page-blog__button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-width: 200px;
  text-align: center;
}

.page-blog__button--primary {
  background-color: #FFD700; /* Gold button */
  color: #0A192F; /* Dark text for gold button */
}

.page-blog__button--primary:hover {
  background-color: #e6c200;
}

.page-blog__button--secondary {
  background-color: transparent;
  color: #FFD700; /* Gold text for transparent button */
  border: 2px solid #FFD700;
}

.page-blog__button--secondary:hover {
  background-color: #FFD700;
  color: #0A192F;
}

.page-blog__section-title {
  font-size: 2.5em;
  color: #0A192F;
  text-align: center;
  margin: 60px 0 40px;
  position: relative;
}

.page-blog__section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background-color: #FFD700;
  margin: 15px auto 0;
  border-radius: 2px;
}

.page-blog__featured-articles,
.page-blog__latest-posts,
.page-blog__categories,
.page-blog__cta-bottom {
  padding: 60px 0;
}

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

.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;
  display: flex;
  flex-direction: column;
}

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

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

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

.page-blog__article-title {
  font-size: 1.6em;
  margin-bottom: 15px;
  color: #0A192F;
}

.page-blog__article-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.page-blog__article-title a:hover {
  color: #FFD700;
}

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

.page-blog__read-more {
  display: inline-block;
  color: #FFD700;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

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

.page-blog__posts-list {
  display: grid;
  gap: 40px;
}

.page-blog__post-item {
  display: flex;
  align-items: flex-start;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.page-blog__post-item:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-blog__post-image {
  width: 300px;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

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

.page-blog__post-title {
  font-size: 1.4em;
  margin-bottom: 10px;
  color: #0A192F;
}

.page-blog__post-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.page-blog__post-title a:hover {
  color: #FFD700;
}

.page-blog__post-meta {
  font-size: 0.85em;
  color: #888888;
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 0.9em;
  color: #666666;
  margin-bottom: 15px;
}

.page-blog__pagination {
  display: flex;
  justify-content: center;
  margin-top: 50px;
  gap: 10px;
}

.page-blog__pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  text-decoration: none;
  color: #0A192F;
  border: 1px solid #FFD700;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__pagination-link:hover,
.page-blog__pagination-link--active {
  background-color: #FFD700;
  color: #0A192F;
}

.page-blog__category-card {
  background-color: #0A192F;
  color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  position: relative;
  overflow: hidden;
}

.page-blog__category-card:hover {
  transform: translateY(-5px);
  background-color: #1a3350;
}

.page-blog__category-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.15;
  z-index: 0;
}

.page-blog__category-name {
  font-size: 1.3em;
  font-weight: bold;
  color: #FFD700; /* Gold text for category names */
  position: relative;
  z-index: 1;
}

.page-blog__cta-bottom {
  background-color: #0A192F;
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
}

.page-blog__cta-title {
  font-size: 2.8em;
  color: #FFD700;
  margin-bottom: 20px;
}

.page-blog__cta-description {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px;
}

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

/* Responsive adjustments */
@media (max-width: 992px) {
  .page-blog__hero-title {
    font-size: 2.5em;
  }
  .page-blog__section-title {
    font-size: 2em;
  }
  .page-blog__article-title {
    font-size: 1.4em;
  }
  .page-blog__post-item {
    flex-direction: column;
  }
  .page-blog__post-image {
    width: 100%;
    height: 250px;
  }
  .page-blog__post-content {
    padding: 20px;
  }
  .page-blog__category-card {
    min-height: 150px;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-blog__hero-section {
    padding: 60px 0;
  }
  .page-blog__hero-title {
    font-size: 2em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__hero-actions {
    flex-direction: column;
    gap: 15px;
  }
  .page-blog__button {
    width: 100%;
    max-width: 300px;
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__articles-grid,
  .page-blog__categories-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__post-item {
    flex-direction: column;
  }
  .page-blog__post-image {
    width: 100%;
    height: 220px;
  }
  .page-blog__post-content {
    padding: 15px;
  }
  .page-blog__cta-title {
    font-size: 1.8em;
  }
  .page-blog__cta-description {
    font-size: 0.95em;
  }
  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  /* Critical: Ensure all content images are responsive and don't overflow */
  .page-blog img {
    max-width: 100%;
    height: auto;
    min-width: 200px; /* Ensure images are not too small */
    min-height: 200px;
  }

  /* Specific overrides for smaller images if they exist, ensuring min size */
  .page-blog__post-image, .page-blog__category-image {
    width: 100%;
    height: auto;
    min-width: 200px;
    min-height: 200px;
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 1.6em;
  }
  .page-blog__hero-description {
    font-size: 0.9em;
  }
  .page-blog__section-title {
    font-size: 1.5em;
  }
  .page-blog__article-title {
    font-size: 1.2em;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__cta-title {
    font-size: 1.6em;
  }
  .page-blog__button {
    padding: 12px 20px;
    font-size: 0.9em;
  }
}