.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text-main); /* Default text color for the page */
  background-color: var(--color-deep-navy); /* From shared.css, dark background */
}

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  overflow: hidden;
}

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

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

.page-blog__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 30px;
  background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background for text readability */
  border-radius: 10px;
  color: var(--color-text-main);
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.2em); /* Responsive font size for H1 */
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: var(--color-text-secondary);
  margin-bottom: 30px;
}

.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%); /* Custom button color */
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  box-sizing: border-box; /* For mobile responsiveness */
}

.page-blog__cta-button:hover {
  background: linear-gradient(180deg, #1144A6 0%, #2B73F6 100%);
}

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 80px 20px;
  background-color: var(--color-deep-navy); /* Dark background for this section */
  color: var(--color-text-main);
}

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

.page-blog__section-title {
  font-size: clamp(1.8em, 3vw, 2.8em);
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 50px;
  font-weight: 700;
}

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

.page-blog__post-card {
  background-color: var(--color-card-bg); /* Custom card background color */
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  color: var(--color-text-main);
}

.page-blog__post-card:hover {
  transform: translateY(-5px);
}

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

.page-blog__post-image-wrapper {
  width: 100%;
  height: 225px; /* Fixed height for consistent card image display */
  overflow: hidden;
}

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

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

.page-blog__post-title {
  font-size: 1.4em;
  color: var(--color-text-main); /* Main text color */
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: 600;
}

.page-blog__post-title:hover {
  color: var(--color-glow); /* Hover effect for titles */
}

.page-blog__post-meta {
  font-size: 0.9em;
  color: var(--color-text-secondary); /* Secondary text color */
  margin-bottom: 15px;
}

.page-blog__post-excerpt {
  font-size: 1em;
  color: var(--color-text-secondary);
}

.page-blog__button-group {
  text-align: center;
}

.page-blog__cta-button--secondary {
  background: var(--color-glow); /* Using Glow color for secondary button */
  color: var(--color-deep-navy); /* Dark text on medium-light background */
}

.page-blog__cta-button--secondary:hover {
  background: #3a8cdb; /* Slightly darker hover for glow color */
}

/* Newsletter Section */
.page-blog__newsletter-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--color-deep-navy); /* Using Deep Navy as background */
  color: var(--color-text-main); /* Main text color for readability */
}

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

.page-blog__form-input {
  flex-grow: 1;
  padding: 15px 20px;
  border: 1px solid var(--color-border); /* Border color */
  border-radius: 8px;
  font-size: 1em;
  background-color: var(--color-card-bg); /* Card BG for input background */
  color: var(--color-text-main);
  box-sizing: border-box; /* For mobile responsiveness */
}

.page-blog__form-input::placeholder {
  color: var(--color-text-secondary);
}

/* --- Responsive Design --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
  .page-blog__hero-content {
    padding: 25px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 5vw, 2.8em);
  }
  .page-blog__section-title {
    font-size: clamp(1.6em, 4vw, 2.4em);
  }
}

/* Mobile */
@media (max-width: 768px) {
  .page-blog {
    font-size: 16px;
    line-height: 1.6;
  }

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

  .page-blog__hero-image-wrapper,
  .page-blog__post-image-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* General container/section responsiveness */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-section,
  .page-blog__latest-posts-section,
  .page-blog__newsletter-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    overflow: hidden !important; /* Prevent horizontal scroll */
  }

  /* Hero Section specific */
  .page-blog__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important; /* Small top padding for mobile */
  }
  .page-blog__hero-content {
    padding: 20px;
    max-width: 100%;
  }
  .page-blog__main-title {
    font-size: clamp(1.5em, 6vw, 2.5em);
  }
  .page-blog__description {
    font-size: 1em;
  }

  /* Blog Posts Grid */
  .page-blog__posts-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 20px;
  }

  .page-blog__post-card {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Lighter shadow for mobile */
    padding-bottom: 0;
  }

  .page-blog__post-content {
    padding: 20px;
  }
  .page-blog__post-title {
    font-size: 1.2em;
  }
  .page-blog__post-meta,
  .page-blog__post-excerpt {
    font-size: 0.9em;
  }

  /* Buttons responsiveness */
  .page-blog__cta-button,
  .page-blog__form-input {
    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;
  }

  .page-blog__newsletter-form {
    flex-direction: column;
    gap: 15px;
  }
}