/* Component-specific styles for the Jekyll component system */

/* Post Card Components */
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-md);
  transition: all 0.2s ease;
}

.post-card:hover {
  border-color: var(--border-default);
  transform: translateY(-1px);
}

.post-card--featured {
  border: 2px solid var(--accent-primary);
}

.post-card--text {
  border: none;
  background: transparent;
  padding: 0;
}

.post-card--text:hover {
  transform: none;
  box-shadow: none;
}

/* Post Image Components */
.post-image__img {
  object-fit: cover;
  border-radius: var(--border-radius-sm);
}

.post-image__img--hero {
  border-radius: var(--border-radius-lg);
}

.post-image--featured .image {
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

/* Post Tags Components */
.post-tags__inline {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.post-tags__tag {
  color: var(--accent-primary);
  font-weight: 500;
}

.post-tags__more {
  color: var(--text-muted);
  font-style: italic;
}

/* Button Group for Post Actions */
.button-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button-group .button {
  transition: all 0.2s ease;
}

.text-spaced {
  margin-right: 0.25rem;
}

/* Post Meta Styling */
.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.post-meta__date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-meta__category {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.post-meta__category a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.post-meta__category a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .button-group {
    gap: 0.5rem;
  }
  
  .button-group .button {
    font-size: 0.875rem;
  }
  
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ------------------------------------ *\
  #FEATURED POSTS ALTERNATING BACKGROUNDS
\* ------------------------------------ */

/* Base featured post styling */
.featured-post-item {
    transition: background-color 0.3s ease, border-color 0.3s ease;
    padding: 3rem 0;
    margin: 0 -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    border-bottom: 1px solid var(--bulma-border);
}

/* Light theme alternating backgrounds - darker variations */
[data-theme="light"] .featured-post-item.bg-alternate-1 {
    background-color: var(--bulma-scheme-main); /* Pure white */
}

[data-theme="light"] .featured-post-item.bg-alternate-2 {
    background-color: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-scheme-main-bis-l) - 5%)); /* Darker light gray */
}

/* Dark theme alternating backgrounds */
[data-theme="dark"] .featured-post-item.bg-alternate-1 {
    background-color: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-scheme-main-l) + 3%)); /* Slightly lighter dark */
}

[data-theme="dark"] .featured-post-item.bg-alternate-2 {
    background-color: hsl(var(--bulma-scheme-h), var(--bulma-scheme-s), calc(var(--bulma-scheme-main-l) - 2%)); /* Darker tone */
}

/* Fallback for no theme specified - uses Bulma's adaptive variables */
.featured-post-item.bg-alternate-1 {
    background-color: var(--bulma-scheme-main);
}

.featured-post-item.bg-alternate-2 {
    background-color: var(--bulma-scheme-main-bis);
}

/* Remove last border */
.featured-post-item:last-child {
    border-bottom: none;
}

/* Subtle hover effect for interactive feel */
.featured-post-item:hover {
    background-color: var(--bulma-scheme-main-ter) !important;
    transform: translateY(-1px);
}

/* Ensure content maintains proper contrast and readability */
.featured-post-item .title,
.featured-post-item .subtitle,
.featured-post-item .content {
    color: var(--bulma-text);
}

.featured-post-item .tag {
    background-color: var(--bulma-scheme-main-ter);
    color: var(--bulma-text);
    border: 1px solid var(--bulma-border);
}

/* Enhanced visual hierarchy for titles */
.featured-post-item .title a {
    color: var(--bulma-text-strong);
    transition: color 0.2s ease;
}

.featured-post-item .title a:hover {
    color: var(--bulma-link);
}

/* Responsive adjustments for mobile */
@media screen and (max-width: 768px) {
    .featured-post-item {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .featured-post-item:hover {
        transform: none; /* Remove hover transform on mobile */
        box-shadow: none;
    }
}
