/* Base styles for the blog page */
.page-blog {
  color: #333333; /* Default text color for light background */
  background: #ffffff; /* Default white background */
}

/* Hero Section */
.page-blog__hero-section {
  padding-top: 10px; /* Small top padding to avoid double header offset */
  position: relative;
  text-align: center;
  background: linear-gradient(135deg, #26A9E0, #4CAF50);
  color: #ffffff;
  padding-bottom: 40px;
}

.page-blog__hero-image {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

.page-blog__hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px; /* Limit height for hero image */
}

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

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3.5em);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  color: #ffffff; /* White text on hero background */
}

.page-blog__description {
  font-size: 1.1em;
  line-height: 1.6;
  color: #f0f0f0;
}

/* Section Titles */
.page-blog__section-title {
  font-size: 2.5em;
  font-weight: 700;
  text-align: center;
  color: #26A9E0;
  margin: 40px 0 30px;
  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: #26A9E0;
  border-radius: 2px;
}

/* Latest Posts Grid */
.page-blog__latest-posts {
  padding: 40px 20px;
  background: #f8f8f8;
}

.page-blog__blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-blog__blog-card {
  background: #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;
}

.page-blog__blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

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

.page-blog__blog-card-image {
  position: relative;
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  overflow: hidden;
}

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

.page-blog__blog-date {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #26A9E0;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: 600;
  z-index: 1;
}

.page-blog__blog-card-body {
  padding: 20px;
  text-align: left;
}

.page-blog__blog-card-title {
  font-size: 1.4em;
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__blog-divider {
  width: 50px;
  height: 3px;
  background: #e0e0e0;
  margin: 15px 0;
}

.page-blog__blog-excerpt {
  font-size: 0.95em;
  color: #555;
  line-height: 1.6;
}

.page-blog__view-all-button-container {
  text-align: center;
  margin-top: 40px;
}

.page-blog__view-all-button {
  display: inline-block;
  background-color: #EA7C07; /* Login color for CTA */
  color: #ffffff;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.page-blog__view-all-button:hover {
  background-color: #d16b06;
}

/* Featured Articles */
.page-blog__featured-articles {
  padding: 40px 20px;
  background: #ffffff;
}

.page-blog__featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-blog__featured-card {
  display: flex;
  background: #f8f8f8;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-blog__featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-blog__featured-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  width: 100%;
}

.page-blog__featured-card-image {
  flex: 0 0 40%;
  height: auto;
  overflow: hidden;
}

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

.page-blog__featured-card-content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.page-blog__featured-card-title {
  font-size: 1.5em;
  font-weight: 700;
  color: #26A9E0;
  margin-bottom: 10px;
  line-height: 1.3;
}

.page-blog__featured-card-excerpt {
  font-size: 0.95em;
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.page-blog__read-more {
  color: #EA7C07;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}

/* Categories */
.page-blog__categories {
  padding: 40px 20px;
  background: #f8f8f8;
}

.page-blog__category-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  max-width: 1000px;
  margin: 0 auto;
}

.page-blog__category-item {
  background: #ffffff;
  border: 1px solid #26A9E0;
  color: #26A9E0;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.page-blog__category-item:hover {
  background: #26A9E0;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(38, 169, 224, 0.3);
}

/* CTA Section */
.page-blog__cta-section {
  background: #26A9E0;
  color: #ffffff;
  padding: 60px 20px;
  text-align: center;
}

.page-blog__cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.page-blog__cta-title {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-blog__cta-description {
  font-size: 1.2em;
  line-height: 1.7;
  margin-bottom: 30px;
  color: #f0f0f0;
}

.page-blog__cta-button {
  display: inline-block;
  background-color: #EA7C07; /* Login color */
  color: #ffffff;
  padding: 18px 40px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1.3em;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.3s ease;
  max-width: 100%; /* Ensure button adapts */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-blog__cta-button:hover {
  background-color: #d16b06;
  transform: translateY(-3px);
}

/* Related Links */
.page-blog__related-links {
  padding: 40px 20px;
  background: #ffffff;
}

.page-blog__link-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 800px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px 30px;
}

.page-blog__link-item {
  font-size: 1.1em;
  color: #26A9E0;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.page-blog__link-item:hover {
  color: #EA7C07;
  text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-blog__blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-blog__featured-grid {
    grid-template-columns: 1fr;
  }
  .page-blog__featured-card-link {
    flex-direction: column;
  }
  .page-blog__featured-card-image {
    flex: none;
    width: 100%;
    height: 250px;
  }
  .page-blog__featured-card-content {
    padding: 15px;
  }
  .page-blog__featured-card-title {
    font-size: 1.3em;
  }
}

@media (max-width: 768px) {
  /* Hero Section */
  .page-blog__hero-section {
    padding-top: 10px; /* Small top padding */
    padding-bottom: 30px;
  }
  .page-blog__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }
  .page-blog__description {
    font-size: 1em;
    padding: 0 15px;
  }

  /* Section Titles */
  .page-blog__section-title {
    font-size: 2em;
    margin: 30px 0 20px;
  }

  /* Latest Posts Grid */
  .page-blog__latest-posts {
    padding: 30px 15px;
  }
  .page-blog__blog-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
    gap: 25px;
  }
  .page-blog__blog-card-image {
    height: 180px;
  }
  .page-blog__blog-card-body {
    padding: 15px;
  }
  .page-blog__blog-card-title {
    font-size: 1.2em;
  }
  .page-blog__blog-date {
    font-size: 0.8em;
    padding: 6px 10px;
  }

  /* Featured Articles */
  .page-blog__featured-articles {
    padding: 30px 15px;
  }
  .page-blog__featured-card {
    flex-direction: column;
  }
  .page-blog__featured-card-image {
    height: 200px;
  }
  .page-blog__featured-card-title {
    font-size: 1.2em;
  }
  .page-blog__featured-card-excerpt {
    font-size: 0.9em;
  }

  /* Categories */
  .page-blog__categories {
    padding: 30px 15px;
  }
  .page-blog__category-list {
    gap: 10px;
  }
  .page-blog__category-item {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  /* CTA Section */
  .page-blog__cta-section {
    padding: 40px 15px;
  }
  .page-blog__cta-title {
    font-size: 2em;
  }
  .page-blog__cta-description {
    font-size: 1em;
  }
  .page-blog__cta-button {
    padding: 15px 25px;
    font-size: 1.1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin: 0 auto;
  }
  .page-blog__view-all-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__view-all-button-container {
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Related Links */
  .page-blog__related-links {
    padding: 30px 15px;
  }
  .page-blog__link-list {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .page-blog__link-item {
    font-size: 1em;
  }

  /* General image and container responsiveness */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .page-blog__section,
  .page-blog__card,
  .page-blog__container,
  .page-blog__cta-content,
  .page-blog__blog-card,
  .page-blog__featured-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-blog__blog-card-body, .page-blog__featured-card-content {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .page-blog__home-content {
    padding: 0 15px !important;
  }
}