/* Blog-specific styling for LongView Renovation */

/* ========================================
   TEXT SAFETY CONTRACT — DO NOT REMOVE
   ======================================== */
.premium-card-title,
.premium-card-excerpt {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  white-space: normal !important;
  word-break: break-word !important;
}

/* ========================================
   CARD LAYOUT CONTRACT — Height Control
   ======================================== */
.premium-blog-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: unset !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Image Container - ONLY place height is controlled */
.premium-blog-card .image-wrapper,
.premium-blog-card .relative {
  height: 14rem; /* h-56 equivalent - 224px */
  overflow: hidden;
}

/* Content Container - Must never control height */
.premium-card-content {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  overflow: visible !important;
  padding: 1.5rem !important;
}

/* Modern Pill Filter Buttons - Responsive */
.pill-filter {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.75rem;
  transition: all 0.15s ease;
  min-width: fit-content;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .pill-filter {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }
}

@media (min-width: 1024px) {
  .pill-filter {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}

.pill-filter:hover {
  background: #fef3c7;
  border-color: #facc15;
  color: #92400e;
}

.pill-filter.active {
  background: #facc15;
  border-color: #f59e0b;
  color: #111827;
  font-weight: 600;
}

/* Legacy category filter support */
.category-filter {
  @apply px-6 py-3 bg-white text-gray-700 border border-gray-300 rounded-full font-medium transition-all duration-300;
}

.category-filter:hover {
  @apply bg-yellow-50 border-yellow-400;
}

.category-filter.active {
  @apply bg-yellow-400 text-black border-yellow-400;
}

/* Blog Card Styling */
.blog-card {
  @apply bg-white rounded-lg shadow-md overflow-hidden transition-all duration-300;
}

.blog-card:hover {
  @apply transform -translate-y-2 shadow-lg;
}

.blog-card.featured {
  @apply border-2 border-yellow-400;
}

.blog-card-image {
  @apply relative overflow-hidden h-48;
}

.blog-card-image img {
  @apply w-full h-full object-cover transition-transform duration-300;
}

.blog-card:hover .blog-card-image img {
  @apply transform scale-105;
}

/* Base category tag styling with semantic colors */
.blog-category-tag {
  @apply absolute top-2 left-2 px-3 py-1 rounded-md text-xs font-semibold z-10 shadow-sm;
}

/* Primary Services - LongView Brand Yellow */
.blog-category-tag.roofing-and-siding,
.blog-category-tag[data-category="roofing-and-siding"] {
  background-color: rgba(255, 215, 0, 0.85) !important;
  color: #000000 !important;
  border-radius: 2px !important;
}

.blog-category-tag.interior-remodeling,
.blog-category-tag[data-category="interior-remodeling"] {
  background-color: rgba(255, 215, 0, 0.85) !important;
  color: #000000 !important;
  border-radius: 2px !important;
}

/* Secondary Services - Color Coded */
.blog-category-tag.home-maintenance,
.blog-category-tag[data-category="home-maintenance"],
span.home-maintenance {
  background-color: rgba(255, 215, 0, 0.85) !important;
  color: #000000 !important;
  z-index: 20 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  border-radius: 2px !important;
}

.blog-category-tag.local-insights,
.blog-category-tag[data-category="local-insights"] {
  background-color: rgba(255, 215, 0, 0.85) !important;
  color: #000000 !important;
  border-radius: 2px !important;
}

.blog-category-tag.project-spotlights,
.blog-category-tag[data-category="project-spotlights"] {
  background-color: rgba(255, 215, 0, 0.85) !important;
  color: #000 !important;
  border-radius: 2px !important;
}

.blog-category-tag.company-news,
.blog-category-tag[data-category="company-news"] {
  background-color: rgba(255, 215, 0, 0.85) !important;
  color: #000000 !important;
  border-radius: 2px !important;
}

/* Compact Text Layout - Reduced White Space */
.card-body {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  padding: 0.75rem !important;
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

/* 16:9 ASPECT RATIO Image Convention - SCOPED to blog grid only */
#blog-posts-grid .relative img,
#blog-posts-grid img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* 16:9 Aspect Ratio Container - SCOPED to blog grid only */
#blog-posts-grid .relative {
  width: 100% !important;
  aspect-ratio: 16/9 !important;
  overflow: hidden !important;
  position: relative !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Dark Gradient Overlay - SCOPED to blog grid only */
#blog-posts-grid .relative::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    transparent 100%
  );
  border-radius: 0.5rem 0.5rem 0 0;
  pointer-events: none;
  z-index: 1;
}

/* Ensure category pills appear above overlay */
.blog-category-tag {
  z-index: 15 !important;
  position: relative !important;
}

/* Premium Cards with Enhanced Shadows & Sophisticated Hover */
/* REMOVED: Hard height block that caused text clipping */
/* This block forced height: 320px !important and overflow: hidden !important */
/* Replaced with natural height in final overrides section */

/* Premium Hover Effects */
#blog-posts-grid article:hover,
#blog-posts-grid a:hover,
.blog-card:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.12),
    0 16px 35px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(243, 198, 35, 0.08) !important;
}

/* Card Content with Subtle Divider */
.card-body {
  border-radius: 0 0 1rem 1rem !important;
  position: relative !important;
}

/* Elegant Gradient Divider Between Image and Text */
.card-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(243, 198, 35, 0.1) 10%,
    rgba(243, 198, 35, 0.3) 25%, 
    rgba(243, 198, 35, 0.6) 50%, 
    rgba(243, 198, 35, 0.3) 75%,
    rgba(243, 198, 35, 0.1) 90%, 
    transparent 100%);
  z-index: 5;
}

/* REMOVED: Another conflicting line-clamp rule */
/* This also contradicted the text safety contract */

/* Card footer: clean layout for consistent alignment */
.card-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer .meta-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-footer .meta-cta {
  color: #d97706;
  font-weight: 600;
  text-decoration: none;
}

.card-footer .meta-cta:hover {
  color: #b45309;
}

.blog-card-content {
  @apply p-6;
}

.blog-card-title {
  @apply text-xl font-bold mb-3;
}

.blog-card-title a {
  @apply text-gray-800 hover:text-yellow-600 transition-colors duration-200;
}

.blog-card-excerpt {
  @apply text-gray-600 leading-relaxed mb-4 line-clamp-3;
}

.blog-card-meta {
  @apply flex justify-between items-center text-sm text-gray-500;
}

.blog-date {
  @apply font-medium;
}

.blog-read-time {
  @apply bg-gray-100 px-2 py-1 rounded;
}

/* Newsletter Form Styling */
.newsletter-form {
  @apply space-y-3;
}

.newsletter-form input[type="email"] {
  @apply w-full transition-colors duration-200;
}

.newsletter-form input[type="email"]:focus {
  @apply ring-2 ring-yellow-400 border-yellow-400;
}

.newsletter-form button {
  @apply w-full md:w-full transition-all duration-200;
}

.newsletter-form button:hover {
  @apply transform -translate-y-0.5 shadow-md;
}

.newsletter-form button:disabled {
  @apply opacity-60 cursor-not-allowed transform-none;
}

/* Form validation styles */
.newsletter-form input.border-red-500 {
  @apply border-red-500 focus:border-red-500 focus:ring-red-500;
}

/* Success message styling */
.newsletter-success {
  @apply bg-green-50 border-2 border-green-200 rounded-lg p-6 text-center;
}

/* Topic pills styling */
.topic-pill {
  @apply px-3 py-1 rounded-full bg-gray-100 text-xs text-gray-600;
}

.topic-pill:hover {
  @apply bg-yellow-100;
}

/* Search Bar Styling */
#blog-search {
  @apply pr-32;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .category-filter {
    @apply px-4 py-2 text-sm;
  }
  
  .blog-card-title {
    @apply text-lg;
  }
  
  .blog-card-content {
    @apply p-4;
  }
}

/* Premium Blog Post Content Styling */
.blog-post-content {
  @apply max-w-4xl mx-auto px-4 sm:px-6 lg:px-8;
  font-family: 'Roboto', sans-serif;
}

.blog-post-content header {
  @apply text-left py-8 bg-white;
  max-width: 65ch; /* Optimal reading width */
}

.blog-post-content h1 {
  @apply text-3xl md:text-4xl font-bold text-gray-900 leading-tight mb-4;
  font-family: 'Poppins', sans-serif;
}

.blog-post-content h2 {
  @apply text-xl md:text-2xl font-semibold text-gray-900 mt-10 mb-6;
  font-family: 'Poppins', sans-serif;
  max-width: 65ch; /* Reading constraint */
}

.blog-post-content h3 {
  @apply text-lg font-semibold text-gray-900 mt-8 mb-4;
  font-family: 'Poppins', sans-serif;
}

.blog-post-content p {
  @apply text-gray-700 leading-relaxed;
  font-family: 'Roboto', sans-serif;
  max-width: 65ch; /* Optimal reading width */
}

.blog-post-content section {
  @apply mb-16; /* Premium section spacing */
  max-width: 65ch; /* Reading constraint */
}

.blog-post-content .space-y-6 > * + * {
  margin-top: 1.5rem; /* 24px paragraph spacing */
}

.blog-post-content ul, .blog-post-content ol {
  @apply text-gray-700 mb-8 space-y-3;
  font-family: 'Roboto', sans-serif;
  max-width: 65ch;
}

.blog-post-content li {
  @apply leading-relaxed;
}

.blog-post-content strong {
  @apply text-gray-800 font-bold;
}

.blog-post-content img {
  @apply w-full rounded-lg shadow-md my-8;
  transition: transform 0.3s ease-in-out;
}

.blog-post-content img:hover {
  transform: scale(1.02);
}

/* 16:9 Aspect Ratio for Blog Post Hero Images */
article img[class*="h-96"],
article img[src*="blog/"] {
  aspect-ratio: 16/9 !important;
  height: auto !important;
  object-fit: cover !important;
  object-position: center !important;
}

.blog-post-content blockquote {
  @apply border-l-4 border-yellow-400 bg-yellow-50 p-6 my-6 italic;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blog-post-content code {
  @apply bg-gray-100 px-2 py-1 rounded text-sm font-mono;
}

.blog-post-content pre {
  @apply bg-gray-900 text-white p-6 rounded-lg overflow-x-auto my-6;
}

/* Call-to-Action Boxes */
.blog-cta-box {
  @apply bg-yellow-50 border-2 border-yellow-400 rounded-lg p-6 my-8 text-center;
}

.blog-cta-box h3 {
  @apply text-xl font-bold text-gray-800 mb-4;
  font-family: 'Poppins', sans-serif;
}

.blog-cta-box p {
  @apply text-gray-700 mb-6;
}

.blog-cta-box .btn-primary {
  @apply bg-yellow-400 text-black font-bold px-6 py-3 rounded-full hover:bg-yellow-300 transition-all duration-200;
  transform: scale(1);
}

.blog-cta-box .btn-primary:hover {
  transform: scale(1.05);
  background-color: #f3c623;
}

/* Social Sharing */
.social-sharing {
  @apply flex justify-center space-x-4 my-8;
}

.social-share-btn {
  @apply px-4 py-2 rounded-full text-white font-medium transition-all duration-300;
}

.social-share-btn.facebook {
  @apply bg-blue-600 hover:bg-blue-700;
}

.social-share-btn.twitter {
  @apply bg-blue-400 hover:bg-blue-500;
}

.social-share-btn.linkedin {
  @apply bg-blue-800 hover:bg-blue-900;
}

/* Blog Navigation */
.blog-nav {
  @apply flex justify-between items-center my-12 p-6 bg-gray-100 rounded-lg;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(243, 198, 35, 0.2);
}

.blog-nav-link {
  @apply text-yellow-600 hover:text-yellow-700 font-medium transition-all duration-200;
  transition: transform 0.2s, color 0.2s;
}

.blog-nav-link:hover {
  transform: scale(1.05);
  color: #f3c623;
}

/* Author Bio */
.author-bio {
  @apply bg-gray-50 border border-gray-200 rounded-lg p-6 my-8;
}

.author-bio h4 {
  @apply text-lg font-bold text-gray-800 mb-2;
}

.author-bio p {
  @apply text-gray-600 text-sm;
}

/* Related Posts */
.related-posts {
  @apply my-12;
}

.related-posts h3 {
  @apply text-2xl font-bold text-gray-800 mb-6;
}

.related-posts-grid {
  @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6;
}

/* Footer Styling for Blog Pages */
footer {
  margin-top: 4rem;
}

footer::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, rgba(243, 198, 35, 0.5), rgba(255, 255, 255, 0.1), rgba(243, 198, 35, 0.5));
  margin-bottom: 0;
}

footer button {
  transition: transform 0.2s, background-color 0.2s;
}

footer button:hover {
  transform: scale(1.05);
  background-color: #f3c623;
}

/* Premium Spacing Utilities */
.visual-separator {
  @apply w-full h-px bg-gradient-to-r from-transparent via-gray-300 to-transparent my-16;
}

.premium-card {
  @apply bg-white rounded-xl shadow-sm border border-slate-200 p-6 md:p-8;
}

.premium-callout {
  @apply bg-slate-50 border border-slate-200 rounded-xl p-6 md:p-8 my-12;
}

.premium-section {
  @apply mb-16;
  max-width: 65ch; /* Optimal reading width */
}

.premium-text-container {
  @apply max-w-prose;
}

.premium-heading-spacing h2 {
  @apply mt-10 mb-6;
}

.premium-heading-spacing h3 {
  @apply mt-8 mb-4;
}

/* Interactive Element Spacing */
.checkbox-item {
  @apply flex items-start gap-4;
}

.checkbox-item input[type="checkbox"] {
  @apply w-5 h-5 md:w-6 md:h-6 mt-1 rounded-md border-slate-400 text-amber-600 focus:ring-amber-500;
}

.checkbox-item .content {
  @apply min-w-0 flex-1;
}

.checkbox-item h4 {
  @apply font-semibold text-slate-900 mb-2 leading-snug;
}

.checkbox-item p {
  @apply text-slate-700 text-sm leading-relaxed;
}

/* Premium Blog Modal Styling */
#blog-modal {
  @apply fixed inset-0 z-50 hidden items-center justify-center bg-black bg-opacity-70 p-4;
}

#blog-modal .modal-content {
  @apply bg-white rounded-3xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-y-auto;
}

/* Premium Section Styling */
.premium-section-header h2::after {
  content: '';
  @apply absolute bottom-0 left-0 w-12 h-1 bg-yellow-400 rounded-full;
}

.premium-content-block {
  @apply bg-white rounded-2xl shadow-sm border border-gray-100 p-8 my-12;
}

.expert-callout {
  @apply bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-200 rounded-2xl p-8 my-12 relative overflow-hidden;
}

.expert-callout::before {
  content: '';
  @apply absolute top-0 left-0 w-full h-1 bg-gradient-to-r from-blue-400 to-indigo-400;
}

.conversion-zone {
  @apply bg-gradient-to-br from-yellow-50 via-amber-50 to-orange-50 border-2 border-yellow-200 rounded-3xl p-10 my-16 text-center relative;
}

/* Premium Blog Cards - Enhanced Design System */
.premium-blog-card {
  @apply bg-white rounded-2xl overflow-hidden border border-gray-100 transition-all duration-500 ease-out;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 10px 15px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.02);
  height: 100%;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Prevent any inheritance issues with SVG icons */
.premium-blog-card svg {
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  vertical-align: middle;
}

/* Sophisticated hover effects system */
.premium-blog-card:hover {
  transform: translateY(-16px) scale(1.02);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.18),
    0 12px 30px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(243, 198, 35, 0.15),
    0 0 80px rgba(243, 198, 35, 0.1);
}

/* Standardized 16:9 aspect ratio for premium consistency */
.premium-blog-card .relative {
  position: relative;
  aspect-ratio: 16/9;
  height: auto;
  min-height: 280px;
  max-height: 320px;
  overflow: hidden;
  border-radius: 1rem 1rem 0 0;
}

/* Enhanced image treatment for premium appearance */
.premium-blog-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: all 500ms cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  filter: brightness(0.95) contrast(1.1) saturate(1.05);
}

/* Enhanced hover effects for premium experience */
.premium-blog-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.05) contrast(1.15) saturate(1.1);
}

/* Badge hover animation */
.premium-blog-card:hover .premium-category-badge {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(243, 198, 35, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

/* Time badge hover effect */
.premium-blog-card:hover .premium-time-badge {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Gradient overlay enhancement on hover */
.premium-blog-card:hover .relative::before {
  opacity: 0.8;
}

/* Premium multi-layer gradient overlay system */
.premium-blog-card .relative::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.1) 30%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0.8) 100%
  );
  z-index: 2;
  pointer-events: none;
  transition: opacity 300ms ease;
}

/* Additional vignette effect for premium appearance */
.premium-blog-card .relative::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0.1) 70%,
    rgba(0, 0, 0, 0.2) 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Premium badge positioning */
.premium-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: linear-gradient(135deg, #f3c623 0%, #f59e0b 100%);
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Premium glass-morphism category badges */
.premium-category-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  backdrop-filter: blur(16px) saturate(180%);
  background: rgba(255, 215, 0, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(243, 198, 35, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #000 !important;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.premium-category-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

/* Force border-radius for all premium category badge variants - Maximum specificity */
span.premium-category-badge.roofing-and-siding,
span.premium-category-badge.interior-remodeling,
span.premium-category-badge.home-maintenance,
span.premium-category-badge.local-insights,
span.premium-category-badge.company-news,
span.premium-category-badge.project-spotlights,
.premium-blog-card span.premium-category-badge {
  border-radius: 2px !important;
}

span.premium-category-badge.roofing-and-siding::before,
span.premium-category-badge.interior-remodeling::before,
span.premium-category-badge.home-maintenance::before,
span.premium-category-badge.local-insights::before,
span.premium-category-badge.company-news::before,
span.premium-category-badge.project-spotlights::before,
.premium-blog-card span.premium-category-badge::before {
  border-radius: 2px !important;
}

/* Premium time badge styling */
.premium-time-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Force proper icon sizing - override any conflicting styles */
.premium-time-badge svg {
  width: 12px !important;
  height: 12px !important;
  margin-right: 4px;
  flex-shrink: 0;
  display: inline-block;
}

/* Enhanced category pill styling */
.premium-blog-card .blog-category-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 10;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 8px 16px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
}

/* Premium content area - matches JS class names */
.premium-card-content {
  padding: 24px 24px 32px 24px !important;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  min-height: 200px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%) !important;
}

/* REMOVED: Premium title styling with line-clamp that contradicted text safety contract */
/* Line-clamp rules moved to final overrides section where they are disabled */

/* REMOVED: Premium excerpt styling with line-clamp that contradicted text safety contract */
/* Line-clamp rules moved to final overrides section where they are disabled */

/* Premium meta footer - matches JS class names */
.premium-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
}

.premium-card-footer .meta-info {
  display: flex;
  align-items: center;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 500;
}

.premium-card-footer .publish-date {
  display: flex;
  align-items: center;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 500;
}

.premium-card-footer svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  display: inline-block;
}

.premium-card-footer .publish-date svg {
  margin-right: 6px;
}

.premium-card-footer .read-more-cta svg {
  margin-left: 4px;
}

.premium-card-footer .read-more-cta {
  background: none;
  color: #b45309;
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 200ms ease;
  display: inline-flex;
  align-items: center;
}

.premium-card-footer .read-more-cta:hover {
  color: #d97706;
  text-decoration: none;
}

/* Blog Grid Container */
#blog-posts-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  justify-items: center;
  justify-content: center;
  align-items: stretch !important; /* Match card heights per row */
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  width: 100%;
}

@media (min-width: 768px) {
  #blog-posts-grid {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    justify-content: center;
    align-items: stretch !important; /* Match card heights per row */
  }
}

@media (min-width: 1024px) {
  #blog-posts-grid {
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    justify-content: center;
    align-items: stretch !important; /* Match card heights per row */
  }
}

/* Cards fill their grid cell height for uniform rows */
#blog-posts-grid article,
#blog-posts-grid > article,
#blog-posts-grid .premium-blog-card {
  width: 100%;
  height: 100% !important; /* Fill grid cell */
  align-self: stretch !important; /* Stretch to match row */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .premium-blog-card {
    min-height: 380px;
  }
  
  .premium-blog-card .relative {
    aspect-ratio: 16/9;
    min-height: 220px;
    max-height: 260px;
  }
  
  .premium-card-content {
    padding: 24px 20px;
  }
  
  .premium-card-title {
    font-size: 1.125rem;
  }
  
  .premium-card-excerpt {
    font-size: 0.9rem;
  }
  
  .premium-category-badge {
    font-size: 0.7rem;
    padding: 6px 12px;
  }
  
  .premium-time-badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
}

/* Professional Load More Button */
.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f3c623 0%, #f59e0b 100%);
  color: #000;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(243, 198, 35, 0.25);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.load-more-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 500ms ease;
  z-index: -1;
}

.load-more-btn:hover::before {
  left: 100%;
}

.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(243, 198, 35, 0.4);
}

.load-more-btn:active {
  transform: translateY(-1px);
}

.load-more-text {
  font-weight: 600;
  letter-spacing: 0.025em;
}

.load-more-icon {
  transition: transform 300ms ease;
  flex-shrink: 0;
}

.load-more-btn:hover .load-more-icon {
  transform: translateY(2px);
}

/* Loading state */
.load-more-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.load-more-btn.loading .load-more-icon {
  animation: bounce-down 1s infinite;
}

@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .load-more-btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
  
  .load-more-icon {
    width: 18px;
    height: 18px;
  }
}

/* Utilities */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ================================
   BLOG2 FINAL OVERRIDES (WIN LAST)
   ================================ */

/* 1) Kill clamp + overflow hiding (JS truncation already handles length) */
#blog-posts-grid .premium-card-title,
#blog-posts-grid .premium-card-excerpt {
  display: block !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;
}

/* 2) Remove hard card heights that cause clipping — but allow stretch for uniform rows */
#blog-posts-grid article,
#blog-posts-grid a,
#blog-posts-grid .premium-blog-card {
  height: 100% !important;
  min-height: unset !important;
  max-height: none !important;
}

/* 3) Keep overflow hidden ONLY on the image wrapper, not on the whole card */
#blog-posts-grid .premium-blog-card {
  overflow: visible !important; /* allows text to be visible */
}

/* 3a) Image wrapper must contain scaled images on hover */
#blog-posts-grid .premium-blog-card .relative {
  overflow: hidden !important; /* contains image scaling */
}

/* 4) Ensure content can grow naturally */
#blog-posts-grid .premium-card-content {
  height: auto !important;
  overflow: visible !important;
}

/* 5) Ensure badge containers and badges are visible with premium backgrounds */
#blog-posts-grid .premium-category-badge {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 15 !important;
  position: relative !important;
  background: rgba(255, 215, 0, 0.85) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(243, 198, 35, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.5) !important;
}

#blog-posts-grid .premium-time-badge {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 15 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25) !important;
}

/* ========================================
   INTERACTIVE BEFORE/AFTER SLIDER
   ======================================== */

/* CSS Custom Properties for LongView Brand */
:root {
  --longview-primary: #f3c623;
  --longview-secondary: #f59e0b;
  --slider-shadow-primary: rgba(243, 198, 35, 0.4);
  --slider-shadow-secondary: rgba(243, 198, 35, 0.1);
}

/* Container */
.before-after-slider {
  position: relative;
  width: 100%;
  max-width: 100%;
  touch-action: pan-y; /* Allow vertical scroll, prevent horizontal pan conflicts */
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.15),
    0 20px 40px rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--slider-shadow-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: ew-resize;
  user-select: none;
  /* Focus styles for accessibility */
  outline: none;
}

.before-after-slider:focus {
  outline: 2px solid var(--longview-primary);
  outline-offset: 2px;
}

.before-after-slider:hover {
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.2),
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(243, 198, 35, 0.2);
}

/* Image containers */
.before-after-slider .image-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
}

.before-after-slider .before-image,
.before-after-slider .after-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* After image container with clipping */
.before-after-slider .after-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}

/* Labels */
.before-after-slider .before-label,
.before-after-slider .after-label {
  position: absolute;
  top: 20px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.before-after-slider .before-label {
  left: 20px;
}

.before-after-slider .after-label {
  right: 20px;
}

/* Slider handle */
.before-after-slider .slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--longview-primary) 0%, var(--longview-secondary) 100%);
  z-index: 20;
  cursor: ew-resize;
  box-shadow: 0 0 20px var(--slider-shadow-primary);
  will-change: transform; /* GPU acceleration */
}

/* Handle circle */
.before-after-slider .slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--longview-primary) 0%, var(--longview-secondary) 100%);
  border-radius: 50%;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 8px 25px var(--slider-shadow-primary),
    inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid white;
  will-change: transform; /* GPU acceleration */
  /* Minimum touch target size for accessibility */
  min-width: 44px;
  min-height: 44px;
}

/* Focus styles for keyboard navigation */
.before-after-slider .slider-button:focus {
  outline: 2px solid var(--longview-primary);
  outline-offset: 2px;
}

.before-after-slider .slider-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 
    0 6px 25px rgba(0, 0, 0, 0.4),
    0 10px 30px rgba(243, 198, 35, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.before-after-slider .slider-button:active {
  transform: translate(-50%, -50%) scale(0.95);
}

/* Handle arrows */
.before-after-slider .slider-arrows {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #000;
}

.before-after-slider .arrow-left,
.before-after-slider .arrow-right {
  width: 0;
  height: 0;
  border-style: solid;
}

.before-after-slider .arrow-left {
  border-width: 6px 8px 6px 0;
  border-color: transparent #000 transparent transparent;
}

.before-after-slider .arrow-right {
  border-width: 6px 0 6px 8px;
  border-color: transparent transparent transparent #000;
}

/* Loading state */
.before-after-slider.loading {
  background: #f3f4f6;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.before-after-slider .loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #f3c623;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .before-after-slider .slider-button {
    width: 40px;
    height: 40px;
    border: 2px solid white;
  }
  
  .before-after-slider .before-label,
  .before-after-slider .after-label {
    top: 15px;
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  
  .before-after-slider .before-label {
    left: 15px;
  }
  
  .before-after-slider .after-label {
    right: 15px;
  }
  
  .before-after-slider .arrow-left {
    border-width: 4px 6px 4px 0;
  }
  
  .before-after-slider .arrow-right {
    border-width: 4px 0 4px 6px;
  }
}

/* Browser compatibility fallback */
@supports not (clip-path: inset(0 50% 0 0)) {
  .before-after-slider .after-container {
    width: 50%;
    left: 0;
    right: auto;
    clip-path: none;
  }
  
  .before-after-slider.animating .after-container {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Smooth transition only during initial reveal animation */
.before-after-slider.animating .after-container {
  transition: clip-path 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Removed immediately after reveal — drag must be instant */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .before-after-slider,
  .before-after-slider *,
  .before-after-slider.animating .after-container {
    transition: none !important;
    animation: none !important;
  }
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .before-after-slider {
    border: 2px solid;
  }
  
  .before-after-slider .slider-button {
    border: 3px solid;
    box-shadow: none;
  }
  
  .before-after-slider .slider-handle {
    background: currentColor;
    box-shadow: none;
  }
}

/* ========================================
   CATEGORY BADGE FIX - BASED ON WORKING OLDER VERSION
   Can be easily removed if needed for rollback
   ======================================== */

/* CRITICAL: Image container must contain images but allow badge positioning */
.premium-blog-card .relative,
#blog-posts-grid .relative,
#blog-posts-grid .premium-blog-card .relative {
  overflow: hidden !important; /* Contain images within bounds */
  position: relative !important;
  border-radius: 1rem 1rem 0 0 !important;
}

/* Keep image itself contained with proper border radius */
.premium-blog-card .relative img,
#blog-posts-grid .relative img,
#blog-posts-grid .premium-blog-card .relative img {
  border-radius: 1rem 1rem 0 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  overflow: hidden !important;
}

/* Image container proper containment already handled above */

/* Badge container must be visible outside the image area */
.premium-blog-card .relative .absolute.top-4.left-4,
#blog-posts-grid .relative .absolute.top-4.left-4,
#blog-posts-grid .premium-blog-card .relative .absolute.top-4.left-4 {
  position: absolute !important;
  top: 1rem !important;
  left: 1rem !important;
  z-index: 25 !important; /* Higher z-index to appear above contained image */
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important; /* Ensure badges are clickable/interactive */
}

/* Badge containment and proper sizing */
.premium-category-badge {
  max-width: calc(100% - 2rem) !important; /* Prevent badge from extending beyond card */
  min-width: auto !important; /* Allow natural width for full text */
  width: auto !important; /* Auto width to fit content */
  white-space: nowrap !important; /* Keep badges on single line */
  overflow: visible !important; /* Show full text */
  text-overflow: clip !important; /* Don't truncate */
}

/* Badge element styling - relative within the absolute wrapper */
#blog-posts-grid .premium-category-badge,
.premium-blog-card .premium-category-badge,
span.premium-category-badge,
#blog-posts-grid span.premium-category-badge {
  position: relative !important;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: rgba(255, 215, 0, 0.85) !important;
  color: #000000 !important;
  padding: 0.5rem 0.875rem !important;
  border-radius: 4px !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  transition: all 0.3s ease !important;
  z-index: 15 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Badge hover effects */
#blog-posts-grid .premium-category-badge:hover,
.premium-blog-card:hover .premium-category-badge,
.premium-blog-card .premium-category-badge:hover,
#blog-posts-grid .premium-blog-card:hover .premium-category-badge {
  transform: translateY(-2px) scale(1.05) !important;
  background: rgba(243, 198, 35, 0.95) !important;
  color: #000000 !important;
  border-color: rgba(243, 198, 35, 0.5) !important;
  box-shadow: 0 6px 20px rgba(243, 198, 35, 0.4) !important;
}

/* CONTENT PROTECTION: Ensure badges don't cover valuable content */
.premium-card-content {
  padding: 1.5rem 1.5rem 2rem 1.5rem !important; /* Back to original padding */
  margin-top: 0.75rem !important; /* Safe space below image/badge area */
  overflow: visible !important; /* Allow Read More button shadow to extend */
  position: relative !important; /* Enable z-index stacking */
}

.premium-card-title {
  margin-top: 0.5rem !important; /* Additional buffer from image area */
  padding: 0.25rem !important; /* Inner padding for readability */
  line-height: 1.4 !important; /* Proper line spacing */
}

/* Responsive spacing adjustments */
@media (max-width: 768px) {
  .premium-card-content {
    padding: 1.25rem 1.25rem 1.75rem 1.25rem !important;
  }
  
  .premium-card-title {
    font-size: 1.125rem !important; /* Slightly smaller on mobile */
    margin-top: 0.75rem !important; /* More space on smaller screens */
  }
}

/* Ensure image area has defined height to create clear separation */
.premium-blog-card .relative {
  min-height: 14rem !important; /* 224px - consistent image area height */
  max-height: 14rem !important; /* Prevent image area from expanding */
  border-radius: 1rem 1rem 0 0 !important; /* Clean top corners */
}

/* CRITICAL: Fix image overflow issue - ensure images stay within bounds */
.premium-blog-card .relative img,
#blog-posts-grid .relative img,
#blog-posts-grid .premium-blog-card .relative img {
  border-radius: 1rem 1rem 0 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 14rem !important; /* Force height constraint */
  object-fit: cover !important;
  object-position: center !important;
  display: block !important; /* Remove any inline spacing */
  overflow: hidden !important;
}

/* Ensure the image container clips any overflow */
.premium-blog-card,
#blog-posts-grid .premium-blog-card,
#blog-posts-grid article.premium-blog-card {
  overflow: visible !important; /* Allow shadows but clip content */
  border-radius: 1rem !important; /* Clean card edges - all corners rounded */
  position: relative !important;
}

/* Ensure content area has rounded bottom corners */
.premium-card-content {
  border-radius: 0 0 1rem 1rem !important; /* Rounded bottom corners to match card */
}

/* CRITICAL: Fix square element protruding from bottom on hover */
.premium-card-footer {
  position: relative !important;
  overflow: visible !important; /* Allow shadow overflow for Read More button */
  max-width: 100% !important; /* Prevent width overflow */
}

.premium-card-footer .meta-info {
  position: relative !important;
  overflow: hidden !important; /* Contain meta elements */
  max-width: 100% !important;
}

/* Override: kill blue background, restore text link */
.premium-card-footer .read-more-cta {
  background: none !important;
  color: #b45309 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  max-width: none !important;
  overflow: visible !important;
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  position: relative !important;
  transition: color 0.2s ease !important;
}

/* Override any Tailwind group-hover transforms that cause spillage */
.group:hover .group-hover\:translate-x-1,
.premium-blog-card:hover .group-hover\:translate-x-1,
#blog-posts-grid .group:hover .group-hover\:translate-x-1 {
  transform: none !important; /* Disable translateX that causes overflow */
}

/* Amber text link hover */
.premium-blog-card:hover .premium-card-footer .read-more-cta {
  background: none !important;
  color: #d97706 !important;
}

/* Card-level hover: subtle lift only (no scale) */
.premium-blog-card:hover,
#blog-posts-grid .premium-blog-card:hover,
#blog-posts-grid article.premium-blog-card:hover {
  transform: translateY(-4px) !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

/* CRITICAL: Fix article element overflow - the actual issue */
#blog-posts-grid article,
#blog-posts-grid > article {
  overflow: hidden !important; /* Clip article element itself */
  border-radius: 1rem !important; /* Clean article boundaries */
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important; /* Fill grid cell for uniform rows */
  max-width: 100% !important;
}

/* Article hover: subtle lift matches card */
#blog-posts-grid article:hover,
#blog-posts-grid > article:hover {
  transform: translateY(-4px) !important;
}

/* NUCLEAR OPTION: Force absolute containment of all child elements */
#blog-posts-grid article *,
#blog-posts-grid article *:hover,
#blog-posts-grid article *:before,
#blog-posts-grid article *:after {
  max-width: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Prevent any pseudo-elements from extending beyond bounds */
#blog-posts-grid article::before,
#blog-posts-grid article::after,
#blog-posts-grid article *::before,
#blog-posts-grid article *::after {
  max-width: 100% !important;
  overflow: hidden !important;
  position: relative !important;
}

/* BALANCED FIX: Article boundaries with shadow allowance */
#blog-posts-grid article {
  margin: 0 !important; /* Remove any margins causing spillage */
  padding: 0 !important; /* Remove any padding extending bounds */
  border: none !important; /* Remove borders that extend visual size */
  outline: none !important; /* Remove outlines */
  overflow: visible !important; /* Allow shadows to extend beyond article */
  position: relative !important; /* Enable z-index stacking */
}

/* Ensure no margins on ANY child elements cause spillage */
#blog-posts-grid article * {
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* FINAL FIX: Grid container must allow shadows to extend for realistic effect */
#blog-posts-grid {
  overflow: visible !important; /* Allow shadows to extend beyond grid */
  position: relative !important;
  z-index: 1 !important; /* Base layer for shadow stacking */
}

/* Each grid cell must allow complete shadow overflow */
#blog-posts-grid > * {
  overflow: visible !important; /* Allow shadows to extend for realistic effect */
  position: relative !important;
  max-width: 100% !important;
  height: 100% !important; /* Fill grid cell for uniform rows */
  z-index: 2 !important; /* Above grid base layer */
}

/* Ensure the link wrapper also allows shadow overflow */
#blog-posts-grid a.premium-blog-card,
#blog-posts-grid > article > a {
  overflow: visible !important; /* Critical: Link wrapper must not clip shadows */
  position: relative !important;
  display: block !important;
}

/* Refined hover: subtle lift with elegant shadow */
#blog-posts-grid article:hover,
#blog-posts-grid .premium-blog-card:hover {
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 0 0 1px rgba(243, 198, 35, 0.08) !important;
  transform: translateY(-4px) !important;
  z-index: 10 !important;
  transition: box-shadow 0.3s ease, transform 0.3s ease !important;
}

/* CRITICAL: Ensure read time text is always visible */
#blog-posts-grid .absolute.top-3.right-3,
.premium-blog-card .absolute.top-3.right-3 {
  position: absolute !important;
  top: 0.75rem !important; /* 12px from top */
  right: 0.75rem !important; /* 12px from right */
  z-index: 25 !important; /* Above all overlays */
  visibility: visible !important;
  opacity: 1 !important;
}

/* Read time text styling — high-contrast dark glass */
#blog-posts-grid .absolute.top-3.right-3 span,
.premium-blog-card .absolute.top-3.right-3 span {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.65) !important;
  font-weight: 600 !important;
  font-size: 0.7rem !important;
  padding: 0.3rem 0.6rem !important;
  border-radius: 4px !important;
  backdrop-filter: blur(6px) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  z-index: 1 !important;
}