/* Blog-specific styles for Ungambled */

/* Featured Post */
.featured-post {
  padding: var(--spacing-md) 0 var(--spacing-xl);
}

.card.featured {
  overflow: hidden;
  padding: 0;
  display: flex;
}

.card.featured .row {
  width: 100%;
  margin: 0;
  display: flex;
}

.col-narrow {
  flex: 0 0 35%;
  max-width: 35%;
}

.col-wide {
  flex: 0 0 65%;
  max-width: 65%;
}

.featured-image {
  padding: 0;
  min-height: 350px;
  height: 350px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.featured-post-img {
  height: 100%;
  width: auto;
  object-position: center;
  object-fit: scale-down;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.featured-content {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.featured-content h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.featured-content p {
  color: var(--gray);
  margin-bottom: var(--spacing-lg);
  font-size: 1.1rem;
  line-height: 1.6;
}

.featured-content .blog-button {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: auto;
  align-self: flex-start;
  box-shadow: 0 4px 8px rgba(93, 75, 196, 0.3);
  background: linear-gradient(90deg, #7B68EE 0%, #FFD700 100%);
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.featured-content .blog-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(93, 75, 196, 0.4);
}

.placeholder-image {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background-color: var(--light-gray);
  color: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: italic;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Post Grid */
.blog-posts {
  padding: var(--spacing-xl) 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card.post {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-image {
  height: 200px;
  overflow: hidden;
  position: relative;
  background-color: var(--light-gray);
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

.post-image img.show-top {
  object-position: top center;
}

.card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
  font-size: 0.9rem;
}

.post-category {
  color: var(--primary);
  font-weight: 600;
}

.post-date {
  color: var(--gray);
}

.post h3 {
  font-size: 1.4rem;
  margin-bottom: var(--spacing-sm);
}

.post p {
  color: var(--gray);
  margin-bottom: var(--spacing-md);
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  margin-top: auto;
  transition: all 0.3s ease;
}

.read-more:hover {
  color: var(--primary-hover);
  transform: translateX(5px);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

/* Blog Hero Section */
.blog-hero {
  padding: var(--spacing-xl) 0 var(--spacing-sm);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  /* Convert featured post to standard card on mobile */
  .featured-post {
    padding: var(--spacing-md) 0 0;
  }
  
  .card.featured {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    margin-bottom: 0;
  }
  
  .card.featured .row {
    flex-direction: column;
    width: 100%;
    margin: 0;
  }
  
  .col-narrow, .col-wide {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  .featured-image {
    min-height: 200px;
    height: 200px;
    width: 100%;
  }
  
  .featured-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  
  .featured-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  
  .featured-content h2 {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
  }
  
  .featured-content p {
    color: var(--gray);
    margin-bottom: var(--spacing-md);
  }
  
  .featured-content .blog-button {
    margin-top: auto;
    width: 100%;
    max-width: 300px;
    text-align: center;
  }
  
  /* Regular post grid */
  .post-grid {
    grid-template-columns: 1fr;
  }
}

/* Gold Gradient for buttons - matching the brand identity */
.cu-action-button.gold-gradient {
  background: linear-gradient(90deg, #5D4BC4 0%, #E9C31B 100%);
}

.cu-action-button.gold-gradient::before {
  background: linear-gradient(90deg, #5D4BC4 0%, #E9C31B 100%);
}

/* Blog button styling */
.blog-button {
  display: inline-block;
  background: linear-gradient(90deg, #5D4BC4 0%, #E9C31B 100%);
  color: white !important;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(93, 75, 196, 0.2);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  margin-top: auto;
}

.blog-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(93, 75, 196, 0.3);
}

.blog-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #5D4BC4 0%, #E9C31B 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.blog-button:hover::before {
  opacity: 1;
}

/* Hover effect for blog posts */
.card.post.hover {
  border-color: #5D4BC4;
}

/* Animation for read more links */
.read-more.animated {
  background: linear-gradient(90deg, #5D4BC4 0%, #E9C31B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
