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

.page-blog__hero-section {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 500px;
}

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

.page-blog__hero-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-blog__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 40px;
  background-color: rgba(0, 51, 102, 0.7); /* Semi-transparent dark blue overlay */
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.page-blog__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  color: #FFD700; /* Gold for main title */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-blog__hero-description {
  font-size: 1.3em;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__button {
  display: inline-block;
  padding: 15px 30px;
  background-color: #FFD700; /* Gold button */
  color: #003366; /* Dark blue text on gold */
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 1.1em;
  border: none;
  cursor: pointer;
}

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

.page-blog__button--primary {
  background-color: #DC143C; /* Red for primary action */
  color: #ffffff;
}

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

.page-blog__section-title {
  font-size: 2.8em;
  color: #003366; /* Dark blue title */
  text-align: center;
  margin: 60px 0 40px;
  position: relative;
  padding-bottom: 10px;
}

.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__recent-posts,
.page-blog__categories-section,
.page-blog__featured-article,
.page-blog__cta-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

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

.page-blog__post-card {
  background-color: #ffffff;
  border-radius: 10px;
  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__post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

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

.page-blog__post-title {
  font-size: 1.8em;
  margin-bottom: 15px;
  color: #003366;
}

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

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

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

.page-blog__read-more {
  display: inline-block;
  color: #DC143C; /* Red link */
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  margin-top: auto;
}

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

.page-blog__categories-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

.page-blog__category-item {
  display: inline-block;
  padding: 12px 25px;
  background-color: #003366; /* Dark blue category item */
  color: #ffffff;
  text-decoration: none;
  border-radius: 25px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 1em;
}

.page-blog__category-item:hover {
  background-color: #FFD700; /* Gold on hover */
  color: #003366;
  transform: translateY(-2px);
}

.page-blog__featured-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-blog__featured-image {
  flex-shrink: 0;
  width: 600px;
  height: 337px; /* Maintain aspect ratio for 16:9 */
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-blog__featured-text p {
  margin-bottom: 15px;
  color: #333333;
  font-size: 1.1em;
}

.page-blog__featured-text .page-blog__button {
  margin-top: 20px;
}

.page-blog__cta-section {
  background: linear-gradient(to right, #003366, #1a4d80); /* Dark blue gradient */
  color: #ffffff;
  text-align: center;
  padding: 80px 20px;
  border-radius: 10px;
  margin-top: 60px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-title {
  font-size: 3em;
  margin-bottom: 20px;
  color: #FFD700; /* Gold title */
}

.page-blog__cta-description {
  font-size: 1.4em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #f0f0f0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-blog__hero-title {
    font-size: 3em;
  }
  .page-blog__hero-description {
    font-size: 1.1em;
  }
  .page-blog__featured-content {
    flex-direction: column;
    align-items: center;
  }
  .page-blog__featured-image {
    width: 100%;
    height: auto;
    max-width: 600px; /* Constrain width on smaller screens */
  }
}

@media (max-width: 768px) {
  .page-blog {
    padding-top: var(--header-offset, 80px); /* Adjust for smaller header on mobile */
  }
  .page-blog__hero-section {
    min-height: 400px;
    padding: 30px 15px;
  }
  .page-blog__hero-content {
    padding: 25px;
  }
  .page-blog__hero-title {
    font-size: 2.2em;
  }
  .page-blog__hero-description {
    font-size: 1em;
  }
  .page-blog__button {
    padding: 12px 25px;
    font-size: 1em;
  }
  .page-blog__section-title {
    font-size: 2em;
    margin: 40px 0 25px;
  }
  .page-blog__posts-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__post-image {
    height: 200px;
  }
  .page-blog__post-title {
    font-size: 1.5em;
  }
  .page-blog__post-content {
    padding: 20px;
  }
  .page-blog__categories-grid {
    gap: 10px;
  }
  .page-blog__category-item {
    padding: 10px 20px;
    font-size: 0.9em;
  }
  .page-blog__featured-content {
    gap: 20px;
    padding: 20px;
  }
  .page-blog__featured-image {
    width: 100%;
    height: auto;
    max-width: 100%;
  }
  .page-blog__featured-text p {
    font-size: 1em;
  }
  .page-blog__cta-section {
    padding: 60px 15px;
  }
  .page-blog__cta-title {
    font-size: 2.2em;
  }
  .page-blog__cta-description {
    font-size: 1.1em;
  }
  /* Ensure all images within .page-blog are responsive */
  .page-blog img {
    max-width: 100%;
    height: auto;
    min-width: 200px; /* Enforce minimum size for content images */
    min-height: 200px;
  }
  .page-blog__post-image,
  .page-blog__featured-image {
    min-width: unset; /* Allow these to scale down if needed */
    min-height: unset;
    height: auto; /* Override fixed height for responsiveness */
  }
  .page-blog__post-image {
    width: 100%; /* Ensure post images fill card width */
  }
}

@media (max-width: 480px) {
  .page-blog__hero-title {
    font-size: 1.8em;
  }
  .page-blog__hero-description {
    font-size: 0.9em;
  }
  .page-blog__cta-title {
    font-size: 1.8em;
  }
  .page-blog__cta-description {
    font-size: 1em;
  }
  .page-blog__button {
    width: 100%;
    box-sizing: border-box;
  }
}