/* -------------------------------------------------------------------------- */
/*                              Blog Page Styles                              */
/* -------------------------------------------------------------------------- */

/* Base styles for the blog page */
.page-blog {
  background-color: var(--deep-navy); /* #08162B */
  color: var(--text-main); /* #F3F8FF */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Container for content sections */
.page-blog__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section titles */
.page-blog__section-title {
  font-size: 2.5em;
  color: var(--gold); /* #F2C14E */
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
  line-height: 1.2;
}

/* Section descriptions */
.page-blog__section-description {
  font-size: 1.1em;
  color: var(--text-secondary); /* #AFC4E8 */
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px auto;
}

/* Call to action buttons */
.page-blog__cta-button {
  display: inline-block;
  padding: 15px 30px;
  background: linear-gradient(180deg, #2B73F6 0%, #1144A6 100%);
  color: var(--text-main); /* #F3F8FF */
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

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

.page-blog__cta-button--secondary {
  background: transparent;
  border: 2px solid var(--border-color); /* #244D84 */
  color: var(--text-main);
}

.page-blog__cta-button--secondary:hover {
  background: var(--border-color); /* #244D84 */
  color: var(--text-main);
}

/* -------------------------------------------------------------------------- */
/*                                Hero Section                                */
/* -------------------------------------------------------------------------- */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding, body handles header offset */
  margin-bottom: 60px;
  position: relative;
}

.page-blog__hero-image {
  width: 100%;
  height: auto;
  overflow: hidden;
}

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

.page-blog__hero-content {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: center;
  padding: 0 20px;
}

.page-blog__main-title {
  font-size: clamp(2.5em, 5vw, 3.5em); /* Responsive font size */
  color: var(--gold); /* #F2C14E */
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.page-blog__description {
  font-size: 1.2em;
  color: var(--text-secondary); /* #AFC4E8 */
  margin-bottom: 40px;
  line-height: 1.7;
}

/* -------------------------------------------------------------------------- */
/*                              Category Overview                             */
/* -------------------------------------------------------------------------- */
.page-blog__category-overview {
  padding: 80px 0;
  background-color: var(--card-bg); /* #10233F */
  margin-bottom: 60px;
}

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

.page-blog__category-card {
  background-color: var(--deep-navy); /* #08162B */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding-bottom: 20px;
  display: flex;
  flex-direction: column;
}

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

.page-blog__category-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-blog__card-title {
  font-size: 1.5em;
  color: var(--text-main); /* #F3F8FF */
  margin: 20px 20px 10px 20px;
  font-weight: bold;
}

.page-blog__card-title a {
  color: inherit;
  text-decoration: none;
}

.page-blog__card-title a:hover {
  color: var(--gold); /* #F2C14E */
}

.page-blog__card-text {
  font-size: 1em;
  color: var(--text-secondary); /* #AFC4E8 */
  padding: 0 20px;
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-blog__card-link {
  display: inline-block;
  color: var(--glow); /* #4FA8FF */
  text-decoration: none;
  font-weight: bold;
  margin-left: 20px;
  padding: 8px 15px;
  border: 1px solid var(--glow);
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__card-link:hover {
  background-color: var(--glow);
  color: var(--deep-navy); /* #08162B */
}

/* -------------------------------------------------------------------------- */
/*                                 Why Read Section                           */
/* -------------------------------------------------------------------------- */
.page-blog__why-read {
  padding: 80px 0;
  margin-bottom: 60px;
}

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

.page-blog__feature-item {
  background-color: var(--card-bg); /* #10233F */
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-blog__feature-item:hover {
  transform: translateY(-5px);
}

.page-blog__feature-title {
  font-size: 1.8em;
  color: var(--gold); /* #F2C14E */
  margin-bottom: 15px;
  font-weight: bold;
}

.page-blog__feature-text {
  font-size: 1em;
  color: var(--text-secondary); /* #AFC4E8 */
}

/* -------------------------------------------------------------------------- */
/*                                Recent Posts                                */
/* -------------------------------------------------------------------------- */
.page-blog__recent-posts {
  padding: 80px 0;
  background-color: var(--card-bg); /* #10233F */
  margin-bottom: 60px;
}

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

.page-blog__post-card {
  background-color: var(--deep-navy); /* #08162B */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.page-blog__post-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.page-blog__post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-blog__post-meta {
  padding: 15px 20px 0 20px;
  font-size: 0.9em;
  color: var(--text-secondary); /* #AFC4E8 */
}

.page-blog__post-date {
  opacity: 0.8;
}

.page-blog__post-title {
  font-size: 1.4em;
  color: var(--text-main); /* #F3F8FF */
  margin: 10px 20px;
  font-weight: bold;
  line-height: 1.4;
  flex-grow: 1;
}

.page-blog__post-title a {
  color: inherit;
  text-decoration: none;
}

.page-blog__post-title a:hover {
  color: var(--gold); /* #F2C14E */
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: var(--text-secondary); /* #AFC4E8 */
  padding: 0 20px;
  margin-bottom: 20px;
}

.page-blog__read-more {
  display: inline-block;
  color: var(--glow); /* #4FA8FF */
  text-decoration: none;
  font-weight: bold;
  margin: 0 20px 20px 20px;
  padding: 8px 15px;
  border: 1px solid var(--glow);
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__read-more:hover {
  background-color: var(--glow);
  color: var(--deep-navy); /* #08162B */
}

.page-blog__view-all-posts {
  text-align: center;
}

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

.page-blog__cta-section .page-blog__container {
  display: flex;
  align-items: center;
  gap: 50px;
  background-color: var(--card-bg); /* #10233F */
  border-radius: 15px;
  padding: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-blog__cta-content {
  flex: 1;
}

.page-blog__cta-content .page-blog__section-title {
  text-align: left;
  margin-bottom: 25px;
}

.page-blog__cta-content .page-blog__description {
  text-align: left;
  margin-bottom: 40px;
}

.page-blog__cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.page-blog__cta-image {
  flex-shrink: 0;
  width: 500px;
  height: auto;
}

.page-blog__cta-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* -------------------------------------------------------------------------- */
/*                                 Responsive Styles                          */
/* -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .page-blog__cta-section .page-blog__container {
    flex-direction: column;
    text-align: center;
  }
  .page-blog__cta-content .page-blog__section-title,
  .page-blog__cta-content .page-blog__description {
    text-align: center;
  }
  .page-blog__cta-image {
    width: 100%;
    max-width: 600px;
  }
  .page-blog__cta-buttons {
    justify-content: center;
  }
}

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

  /* HERO Section */
  .page-blog__hero-section {
    margin-bottom: 40px;
  }
  .page-blog__main-title {
    font-size: clamp(2em, 8vw, 2.8em); /* Adjusted clamp for smaller screens */
    margin-top: 20px;
  }
  .page-blog__description {
    font-size: 1em;
    margin-bottom: 30px;
  }
  .page-blog__hero-content {
    margin-top: 20px;
    padding: 0 15px;
  }

  /* Section Titles & Descriptions */
  .page-blog__section-title {
    font-size: 2em;
    margin-bottom: 30px;
  }
  .page-blog__section-description {
    font-size: 1em;
    margin-bottom: 40px;
    padding: 0 15px;
  }

  /* Category Overview */
  .page-blog__category-overview {
    padding: 50px 0;
    margin-bottom: 40px;
  }
  .page-blog__category-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 25px;
  }
  .page-blog__category-card {
    padding-bottom: 15px;
    margin: 0 15px;
  }
  .page-blog__category-card img {
    
  }
  .page-blog__card-title {
    font-size: 1.3em;
    margin: 15px 15px 8px 15px;
  }
  .page-blog__card-text {
    padding: 0 15px;
    margin-bottom: 15px;
  }
  .page-blog__card-link {
    margin-left: 15px;
  }

  /* Why Read Section */
  .page-blog__why-read {
    padding: 50px 0;
    margin-bottom: 40px;
  }
  .page-blog__feature-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 25px;
  }
  .page-blog__feature-item {
    padding: 25px;
    margin: 0 15px;
  }
  .page-blog__feature-title {
    font-size: 1.5em;
    margin-bottom: 10px;
  }

  /* Recent Posts */
  .page-blog__recent-posts {
    padding: 50px 0;
    margin-bottom: 40px;
  }
  .page-blog__post-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 25px;
    margin-bottom: 40px;
  }
  .page-blog__post-card {
    margin: 0 15px;
  }
  .page-blog__post-card img {
    
  }
  .page-blog__post-meta {
    padding: 10px 15px 0 15px;
  }
  .page-blog__post-title {
    font-size: 1.2em;
    margin: 8px 15px;
  }
  .page-blog__post-excerpt {
    padding: 0 15px;
    margin-bottom: 15px;
  }
  .page-blog__read-more {
    margin: 0 15px 15px 15px;
  }
  .page-blog__view-all-posts .page-blog__cta-button {
    width: calc(100% - 30px) !important; /* Ensure button fills width */
    margin: 0 15px;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 50px 0;
    margin-bottom: 40px;
  }
  .page-blog__cta-section .page-blog__container {
    padding: 30px;
    margin: 0 15px;
    gap: 30px;
  }
  .page-blog__cta-content .page-blog__section-title {
    font-size: 1.8em;
    margin-bottom: 20px;
  }
  .page-blog__cta-content .page-blog__description {
    margin-bottom: 30px;
  }
  .page-blog__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    width: 100%;
  }
  .page-blog__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-blog__cta-image {
    width: 100%;
  }

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

  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__category-card,
  .page-blog__feature-item,
  .page-blog__post-card,
  .page-blog__cta-section .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    /* padding-left and padding-right are handled by specific elements */
  }
}

@media (max-width: 480px) {
  .page-blog__main-title {
    font-size: clamp(1.8em, 9vw, 2.5em);
  }
  .page-blog__section-title {
    font-size: 1.8em;
  }
  .page-blog__cta-section .page-blog__container {
    padding: 20px;
  }
  .page-blog__cta-content .page-blog__section-title {
    font-size: 1.6em;
  }
}