/* style/blog.css */

/* Base styles for the blog page */
.page-blog {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default dark text for light body background */
  background-color: #FFFFFF;
}

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

/* Hero Section */
.page-blog__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  background-color: #f0f8ff; /* Light background for the section */
}

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

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

.page-blog__hero-content {
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
  margin-top: -80px; /* Adjust to slightly overlap the image for visual flow */
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 1; /* Ensure content is above any decorative elements */
}

.page-blog__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 15px;
  line-height: 1.2;
}

.page-blog__description {
  font-size: 1.1em;
  color: #555555;
  margin-bottom: 30px;
}

/* Intro Section */
.page-blog__intro-section {
  padding: 60px 0;
  background-color: #f9f9f9;
  text-align: center;
}

.page-blog__section-heading {
  font-size: clamp(1.8em, 3vw, 2.5em);
  color: #26A9E0;
  margin-bottom: 30px;
  font-weight: bold;
}

.page-blog__intro-text {
  font-size: 1.1em;
  color: #333333;
  margin-bottom: 20px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Blog List Section */
.page-blog__blog-list-section {
  padding: 60px 0;
  background-color: #ffffff;
}

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

.page-blog__blog-card {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  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.1);
}

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

.page-blog__card-image-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.page-blog__card-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-bottom: 1px solid #eeeeee;
}

.page-blog__card-content {
  padding: 20px;
}

.page-blog__card-date {
  font-size: 0.9em;
  color: #777777;
  margin-bottom: 10px;
  display: block;
}

.page-blog__card-title {
  font-size: 1.3em;
  font-weight: bold;
  color: #26A9E0;
  margin-bottom: 15px;
  line-height: 1.4;
}

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

.page-blog__read-more-btn {
  display: inline-block;
  color: #26A9E0;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-blog__read-more-btn:hover {
  color: #1a7bb0;
}

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

/* CTA Section */
.page-blog__cta-section {
  padding: 80px 0;
  background-color: #26A9E0; /* Brand primary color for dark background */
  color: #ffffff; /* White text for dark background */
  text-align: center;
}

.page-blog__cta-heading {
  font-size: clamp(2em, 4vw, 3em);
  font-weight: bold;
  margin-bottom: 20px;
  color: #ffffff;
}

.page-blog__cta-text {
  font-size: 1.1em;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #f0f0f0;
}

/* Buttons */
.page-blog__btn-primary,
.page-blog__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  max-width: 100%; /* Ensure button responsiveness */
  box-sizing: border-box;
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word;
}

.page-blog__btn-primary {
  background-color: #EA7C07; /* Login color for primary action */
  color: #ffffff;
  border: 2px solid #EA7C07;
}

.page-blog__btn-primary:hover {
  background-color: #d16e06;
  border-color: #d16e06;
}

.page-blog__btn-secondary {
  background-color: #ffffff;
  color: #26A9E0;
  border: 2px solid #26A9E0;
}

.page-blog__btn-secondary:hover {
  background-color: #e0f2f7;
  color: #1a7bb0;
  border-color: #1a7bb0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-blog__hero-content {
    margin-top: 0;
    padding: 30px 15px;
  }

  .page-blog__main-title,
  .page-blog__section-heading,
  .page-blog__cta-heading {
    font-size: 1.8em !important;
  }

  .page-blog__description,
  .page-blog__intro-text,
  .page-blog__cta-text {
    font-size: 1em;
  }

  .page-blog__hero-section,
  .page-blog__intro-section,
  .page-blog__blog-list-section,
  .page-blog__cta-section {
    padding: 40px 0;
  }

  .page-blog__container {
    padding: 0 15px;
  }

  .page-blog__blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-blog__hero-image-wrapper,
  .page-blog__card-image-wrapper,
  .page-blog__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding-left: 0;
    padding-right: 0;
  }

  /* Buttons responsive */
  .page-blog__btn-primary,
  .page-blog__btn-secondary,
  .page-blog a[class*="button"],
  .page-blog a[class*="btn"] {
    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__hero-content .page-blog__btn-primary, /* Specific override for hero button */
  .page-blog__cta-section .page-blog__cta-button {
    margin-left: auto;
    margin-right: auto;
    max-width: 300px !important; /* Example max-width for single button */
  }

  .page-blog__view-all-button-wrapper .page-blog__btn-secondary {
    max-width: 250px !important;
    margin-left: auto;
    margin-right: auto;
  }

  .page-blog__cta-buttons,
  .page-blog__button-group,
  .page-blog__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    flex-wrap: wrap !important;
    gap: 10px;
  }

  .page-blog__hero-section {
    padding-top: 10px !important;
  }
}