/* General styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #F3F8FF; /* Light text on dark body background var(--deep-navy) */
  background-color: var(--deep-navy);
}

/* Hero Section (Main Title Area) */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, not var(--header-offset) */
  padding-bottom: 60px;
  background-color: var(--deep-navy);
  text-align: center;
}

.page-blog__hero-content-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
}

.page-blog__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Using clamp for H1 */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: #F3F8FF;
}

.page-blog__intro-description {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #AFC4E8;
}

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

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  border: none;
}

.page-blog__btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.page-blog__btn-secondary {
  background: transparent;
  color: #F3F8FF;
  border: 2px solid #244D84;
}

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

/* Latest Posts Section */
.page-blog__latest-posts-section {
  padding: 60px 0;
  background-color: #08162B; /* Deep Navy from custom colors */
}

.page-blog__container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

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

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

.page-blog__post-card {
  display: flex;
  flex-direction: column;
  background-color: #10233F; /* Card BG from custom colors */
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #1B3357; /* Divider from custom colors */
}

.page-blog__post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

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

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

.page-blog__post-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #F3F8FF;
}

.page-blog__post-meta {
  font-size: 0.9rem;
  color: #AFC4E8;
  margin-bottom: 15px;
}

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

.page-blog__read-more {
  display: inline-block;
  color: #4FA8FF; /* Glow from custom colors */
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-blog__read-more:hover {
  color: #F2C14E; /* Gold from custom colors */
}

/* Pagination */
.page-blog__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 50px;
}

.page-blog__pagination-link,
.page-blog__pagination-next {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border-radius: 8px;
  text-decoration: none;
  color: #F3F8FF;
  background-color: #1B3357; /* Divider from custom colors */
  transition: background-color 0.3s ease, color 0.3s ease;
  font-weight: 600;
}

.page-blog__pagination-link:hover,
.page-blog__pagination-next:hover {
  background-color: #1D5FD1; /* Auxiliary color */
  color: #ffffff;
}

.page-blog__pagination-link--active {
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: #ffffff;
  pointer-events: none;
}

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  text-align: center;
  background-color: #08162B; /* Deep Navy */
}

.page-blog__cta-section .page-blog__container {
  background-color: #113B7A; /* Main color */
  border-radius: 12px;
  padding: 50px 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.page-blog__cta-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #F3F8FF;
}

.page-blog__cta-description {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: #AFC4E8;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Image responsive styles */
.page-blog img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

  /* HERO Section (Main Title Area) */
  .page-blog__hero-section {
    padding-top: 10px !important; /* Small top padding, not var(--header-offset) */
    padding-bottom: 40px;
  }

  .page-blog__main-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: 15px;
  }

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

  .page-blog__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add padding to container */
  }

  /* Buttons */
  .page-blog__btn-primary,
  .page-blog__btn-secondary {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px;
    font-size: 1rem;
  }
  
  /* All containers with buttons */
  .page-blog__cta-buttons,
  .page-blog__button-group, /* Placeholder if used */
  .page-blog__btn-container { /* Placeholder if used */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
  }

  /* Latest Posts Section */
  .page-blog__latest-posts-section {
    padding: 40px 0;
  }

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

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

  .page-blog__post-card {
    border-radius: 8px;
  }

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

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

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

  .page-blog__post-meta,
  .page-blog__post-excerpt {
    font-size: 0.95rem;
  }

  /* Pagination */
  .page-blog__pagination {
    margin-top: 30px;
    gap: 8px;
  }

  .page-blog__pagination-link,
  .page-blog__pagination-next {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 60px 0;
  }

  .page-blog__cta-section .page-blog__container {
    padding: 40px 20px;
  }

  .page-blog__cta-title {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .page-blog__cta-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  /* General image responsive styles */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  /* All content containers for mobile overflow */
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__hero-content-wrapper,
  .page-blog__latest-posts-section .page-blog__container,
  .page-blog__cta-section .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }
}