/* style/blog.css */

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

/* Hero Section */
.page-blog__hero-section {
  display: flex;
  flex-direction: column; /* Default to column for mobile first, then row for desktop */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: #F8F8F8; /* Light background for hero */
}

.page-blog__hero-content {
  max-width: 800px;
  margin-bottom: 30px;
}

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

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

.page-blog__btn-primary {
  display: inline-block;
  background-color: #26A9E0; /* Brand color */
  color: #FFFFFF;
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  border: 2px solid transparent;
}

.page-blog__btn-primary:hover {
  background-color: #1a8cc7; /* Slightly darker brand color on hover */
}

.page-blog__hero-image-container {
  width: 100%;
  max-width: 1200px; /* Max width for the image */
  margin-top: 20px;
}

.page-blog__hero-image {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Latest Posts Section */
.page-blog__latest-posts {
  padding: 60px 20px;
  background-color: #FFFFFF;
}

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

.page-blog__section-title {
  font-size: 2.2em;
  font-weight: 700;
  color: #26A9E0;
  text-align: center;
  margin-bottom: 40px;
}

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

.page-blog__post-card {
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-blog__post-image {
  width: 100%;
  height: 225px; /* Fixed height for consistent card images */
  object-fit: cover;
  display: block;
}

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

.page-blog__post-title {
  font-size: 1.3em;
  font-weight: 600;
  color: #333333;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-blog__post-excerpt {
  font-size: 0.95em;
  color: #666666;
  margin-bottom: 15px;
}

.page-blog__post-date {
  font-size: 0.85em;
  color: #999999;
  display: block;
}

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

.page-blog__btn-secondary {
  display: inline-block;
  background-color: #FFFFFF;
  color: #26A9E0; /* Brand color */
  padding: 12px 25px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  border: 2px solid #26A9E0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-blog__btn-secondary:hover {
  background-color: #26A9E0;
  color: #FFFFFF;
}

/* Call to Action Section */
.page-blog__cta-section {
  background-color: #26A9E0; /* Brand color as background */
  color: #FFFFFF;
  text-align: center;
  padding: 80px 20px;
}

.page-blog__cta-title {
  font-size: clamp(1.8em, 3.5vw, 2.8em);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

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

.page-blog__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center;
  gap: 20px;
}

/* Specific button styles for CTA section */
.page-blog__cta-buttons .page-blog__btn-primary {
  background-color: #EA7C07; /* Custom login color */
  border-color: #EA7C07;
}

.page-blog__cta-buttons .page-blog__btn-primary:hover {
  background-color: #d16b06;
  border-color: #d16b06;
}

.page-blog__cta-buttons .page-blog__btn-secondary {
  background-color: #FFFFFF;
  color: #26A9E0;
  border-color: #FFFFFF;
}

.page-blog__cta-buttons .page-blog__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #26A9E0;
}


/* --- Responsive Styles --- */
@media (min-width: 768px) {
  .page-blog__hero-section {
    flex-direction: row;
    text-align: left;
    padding: 80px 40px;
    padding-top: 10px; /* Small top padding, body handles header offset */
  }

  .page-blog__hero-content {
    margin-right: 50px;
    margin-bottom: 0;
  }

  .page-blog__hero-image-container {
    flex-shrink: 0;
    width: 50%;
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  /* Ensure all content sections have padding on mobile */
  .page-blog__hero-section,
  .page-blog__latest-posts,
  .page-blog__cta-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__main-title {
    font-size: 2em; /* Adjust H1 size for mobile */
  }

  .page-blog__section-title {
    font-size: 1.8em;
  }

  .page-blog__cta-title {
    font-size: 1.6em;
  }

  /* Images responsiveness for mobile */
  .page-blog img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Image containers responsiveness for mobile */
  .page-blog__hero-image-container,
  .page-blog__post-card {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Buttons responsiveness for mobile */
  .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 !important;
    padding-right: 15px !important;
  }

  .page-blog__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically on mobile */
    gap: 10px !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Ensure content areas don't overflow */
  .page-blog__container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-blog__hero-section {
    padding-top: 10px !important; /* body handles header offset, small top padding here */
  }
}

/* Color Contrast Enforcement */
.page-blog__light-bg {
  color: #333333; /* Dark text for light background */
  background-color: #FFFFFF;
}

.page-blog__dark-bg {
  color: #ffffff; /* White text for dark background */
  background-color: #26A9E0; /* Brand color */
}

/* Ensure all links have sufficient contrast */
.page-blog a {
  color: #26A9E0; /* Brand color for links */
  text-decoration: underline;
}

.page-blog a:hover {
  color: #1a8cc7; /* Slightly darker brand color on hover */
}

/* No CSS filter for images */
.page-blog img {
  filter: none !important;
}