/**
 * Blog Posts Block - Frontend Styles
 */

/* Full width wrapper - spans the entire viewport width */
.blog-posts-wrapper-full {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  position: relative;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  box-sizing: border-box; /* Include padding in width calculation */
  display: flex;
  justify-content: center;
  background-color: #1E88E5; /* Default blue background color as shown in the image */
  padding: 3rem 0;
}

/* Main block container */
.wildapricot-blog-posts-block {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Container - matches Bootstrap container */
.wildapricot-blog-posts-block .container {
  width: 100%;
  max-width: 1400px; /* Updated container width */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Main card that wraps all content */
.blog-posts-main-card {
  width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
}

/* Header section with title and CTA */
.blog-posts-header {
  text-align: center;
  margin-bottom: 2.5rem;
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Eyebrow style for blog posts */
.blog-posts-eyebrow {
  color: #411A50;
  display: block;
  font-size: 26px;
  font-style: normal;
  font-weight: 700;
  line-height: 105%;
  letter-spacing: -0.78px;
  margin-bottom: 0.5rem;
}

/* Section title */
.blog-posts-title {
  font-family: 'Georama', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: #411A50;
}

/* Section subtitle */
.blog-posts-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #333333;
}

/* CTA link */
.blog-posts-cta {
  display: inline-block;
  color: #333333 !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.blog-posts-cta:hover,
.blog-posts-cta:focus {
  color: #8509B9 !important;
  text-decoration: underline !important;
}

/* Posts container */
.blog-posts-container {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  width: 100%;
}

/* Responsive columns */
@media (min-width: 576px) {
  .columns-2.blog-posts-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .columns-3.blog-posts-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .columns-3.blog-posts-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Individual post card */
.blog-post-card {
  background-color: #fff;
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.blog-post-card:hover {
  transform: translateY(-5px);
}

/* Post featured image */
.blog-post-media {
  width: 100%;
  overflow: hidden;
  padding: 15px 15px 5px 15px;
}

.blog-post-media img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
  border-radius: 16px;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.blog-post-card:hover .blog-post-media img {
  transform: scale(1.18);
}

/* Post content */
.blog-post-content {
  padding: 0 1.5rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* Post title */
.blog-post-title {
  font-family: 'Georama', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  color: #411A50; /* Purple color for titles as shown in the image */
  line-height: 1.2;
}

/* Post title link */
.blog-post-title a {
  color: #411A50 !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

.blog-post-title a:hover,
.blog-post-title a:focus {
  color: #8509B9 !important;
  text-decoration: none;
}

/* Image link */
.blog-post-media a {
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

/* Post excerpt */
.blog-post-excerpt {
  margin-bottom: 1rem;
  flex-grow: 1;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.5;
}

.blog-post-excerpt p {
  margin-bottom: 0.5rem;
}

/* Read more link */
.blog-post-read-more {
  display: inline-block;
  color: #411A50; /* Purple color for links */
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.blog-post-read-more:hover,
.blog-post-read-more:focus {
  color: #FF7E0B; /* Orange color on hover */
  text-decoration: underline;
}

/* Background colors - removed to avoid duplication with theme-colors.css */

/* Custom background color - applied inline via style attribute */
.blog-posts-wrapper-full[style*="background-color"] .blog-posts-title,
.blog-posts-wrapper-full[style*="background-color"] .blog-posts-subtitle,
.blog-posts-wrapper-full[style*="background-color"] .blog-posts-cta {
  /* Default to white text for custom backgrounds */
  color: #ffffff;
}

/* For light custom backgrounds, provide a way to override with a class */
.blog-posts-wrapper-full.light-custom-bg[style*="background-color"] .blog-posts-title,
.blog-posts-wrapper-full.light-custom-bg[style*="background-color"] .blog-posts-subtitle,
.blog-posts-wrapper-full.light-custom-bg[style*="background-color"] .blog-posts-cta {
  color: var(--text-color, #333333);
}

/* CTA links with colored backgrounds */
.blog-posts-wrapper-full.bg-primary > .wildapricot-blog-posts-block .blog-posts-header .blog-posts-cta,
.blog-posts-wrapper-full.bg-secondary > .wildapricot-blog-posts-block .blog-posts-header .blog-posts-cta,
.blog-posts-wrapper-full.bg-success > .wildapricot-blog-posts-block .blog-posts-header .blog-posts-cta,
.blog-posts-wrapper-full.bg-danger > .wildapricot-blog-posts-block .blog-posts-header .blog-posts-cta,
.blog-posts-wrapper-full.bg-dark > .wildapricot-blog-posts-block .blog-posts-header .blog-posts-cta,
.blog-posts-wrapper-full.bg-info > .wildapricot-blog-posts-block .blog-posts-header .blog-posts-cta {
  text-decoration: none !important;
}

/* Override for all CTA links to ensure they have the correct color */
.blog-posts-wrapper-full .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta {
  color: inherit !important;
}

/* Super specific override for CTA links */
html body main .blog-posts-wrapper-full.bg-primary > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-secondary > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-success > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-danger > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-dark > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-info > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta {
  text-decoration: none !important;
}

/* Super specific override for light backgrounds */
html body main .blog-posts-wrapper-full.bg-warning > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-light > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-white > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta,
html body main .blog-posts-wrapper-full.bg-transparent > .wildapricot-blog-posts-block .blog-posts-header a.blog-posts-cta {
  color: #333333 !important;
  text-decoration: none !important;
}

.blog-posts-wrapper-full.bg-primary > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-primary > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-secondary > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-secondary > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-success > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-success > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-danger > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-danger > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-dark > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-dark > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-info > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-info > .wildapricot-blog-posts-block .blog-posts-cta:focus {
  color: #ffffff !important;
  text-decoration: underline !important;
}

.blog-posts-wrapper-full.bg-warning > .wildapricot-blog-posts-block .blog-posts-title,
.blog-posts-wrapper-full.bg-warning > .wildapricot-blog-posts-block .blog-posts-subtitle,
.blog-posts-wrapper-full.bg-light > .wildapricot-blog-posts-block .blog-posts-title,
.blog-posts-wrapper-full.bg-light > .wildapricot-blog-posts-block .blog-posts-subtitle,
.blog-posts-wrapper-full.bg-white > .wildapricot-blog-posts-block .blog-posts-title,
.blog-posts-wrapper-full.bg-white > .wildapricot-blog-posts-block .blog-posts-subtitle,
.blog-posts-wrapper-full.bg-transparent > .wildapricot-blog-posts-block .blog-posts-title,
.blog-posts-wrapper-full.bg-transparent > .wildapricot-blog-posts-block .blog-posts-subtitle {
  color: #333333;
}

/* CTA links with light backgrounds */
.blog-posts-wrapper-full.bg-warning > .wildapricot-blog-posts-block .blog-posts-cta,
.blog-posts-wrapper-full.bg-light > .wildapricot-blog-posts-block .blog-posts-cta,
.blog-posts-wrapper-full.bg-white > .wildapricot-blog-posts-block .blog-posts-cta,
.blog-posts-wrapper-full.bg-transparent > .wildapricot-blog-posts-block .blog-posts-cta {
  color: #333333 !important;
  text-decoration: none !important;
}

.blog-posts-wrapper-full.bg-warning > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-warning > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-light > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-light > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-white > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-white > .wildapricot-blog-posts-block .blog-posts-cta:focus,
.blog-posts-wrapper-full.bg-transparent > .wildapricot-blog-posts-block .blog-posts-cta:hover,
.blog-posts-wrapper-full.bg-transparent > .wildapricot-blog-posts-block .blog-posts-cta:focus {
  color: #8509B9 !important;
  text-decoration: underline !important;
}

/* Ensure blog post card content always has the correct text color regardless of parent background */
.blog-post-card {
  color: #411a50;
}

.blog-post-card h1, 
.blog-post-card h2, 
.blog-post-card h3, 
.blog-post-card h4, 
.blog-post-card h5, 
.blog-post-card h6,
.blog-post-title {
  color: #411a50 !important;
}

.blog-post-card p, 
.blog-post-card li,
.blog-post-excerpt {
  color: #333333 !important;
}

/* Override any inherited text colors for cards */
.bg-primary .blog-post-card,
.bg-secondary .blog-post-card,
.bg-success .blog-post-card,
.bg-danger .blog-post-card,
.bg-dark .blog-post-card,
.bg-info .blog-post-card,
.bg-warning .blog-post-card,
.bg-light .blog-post-card,
.bg-white .blog-post-card,
.bg-transparent .blog-post-card {
  color: #411a50;
}

.bg-primary .blog-post-card h1, 
.bg-primary .blog-post-card h2, 
.bg-primary .blog-post-card h3, 
.bg-primary .blog-post-card h4, 
.bg-primary .blog-post-card h5, 
.bg-primary .blog-post-card h6,
.bg-primary .blog-post-title,
.bg-secondary .blog-post-card h1, 
.bg-secondary .blog-post-card h2, 
.bg-secondary .blog-post-card h3, 
.bg-secondary .blog-post-card h4, 
.bg-secondary .blog-post-card h5, 
.bg-secondary .blog-post-card h6,
.bg-secondary .blog-post-title,
.bg-success .blog-post-card h1, 
.bg-success .blog-post-card h2, 
.bg-success .blog-post-card h3, 
.bg-success .blog-post-card h4, 
.bg-success .blog-post-card h5, 
.bg-success .blog-post-card h6,
.bg-success .blog-post-title,
.bg-danger .blog-post-card h1, 
.bg-danger .blog-post-card h2, 
.bg-danger .blog-post-card h3, 
.bg-danger .blog-post-card h4, 
.bg-danger .blog-post-card h5, 
.bg-danger .blog-post-card h6,
.bg-danger .blog-post-title,
.bg-dark .blog-post-card h1, 
.bg-dark .blog-post-card h2, 
.bg-dark .blog-post-card h3, 
.bg-dark .blog-post-card h4, 
.bg-dark .blog-post-card h5, 
.bg-dark .blog-post-card h6,
.bg-dark .blog-post-title,
.bg-info .blog-post-card h1, 
.bg-info .blog-post-card h2, 
.bg-info .blog-post-card h3, 
.bg-info .blog-post-card h4, 
.bg-info .blog-post-card h5, 
.bg-info .blog-post-card h6,
.bg-info .blog-post-title {
  color: #411a50 !important;
}

.bg-primary .blog-post-card p, 
.bg-primary .blog-post-card li,
.bg-primary .blog-post-excerpt,
.bg-secondary .blog-post-card p, 
.bg-secondary .blog-post-card li,
.bg-secondary .blog-post-excerpt,
.bg-success .blog-post-card p, 
.bg-success .blog-post-card li,
.bg-success .blog-post-excerpt,
.bg-danger .blog-post-card p, 
.bg-danger .blog-post-card li,
.bg-danger .blog-post-excerpt,
.bg-dark .blog-post-card p, 
.bg-dark .blog-post-card li,
.bg-dark .blog-post-excerpt,
.bg-info .blog-post-card p, 
.bg-info .blog-post-card li,
.bg-info .blog-post-excerpt {
  color: #333333 !important;
}
