/* Blog-specific styles for Bubble */

/* Blog Main Container */
.blog-main {
  padding-top: 2rem;
  min-height: calc(100vh - 200px);
}

/* Blog Hero Section */
.blog-hero {
  padding: 4rem 0 6rem;
  background: #FFFFFF;
  border-bottom: 1px solid #EEEEEE;
}

.blog-hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.blog-title {
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #333333;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.blog-subtitle {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: #666666;
  line-height: 1.6;
  margin-bottom: 0;
  font-weight: 500;
  font-style: italic;
}

/* Mobile adjustments for hero */
@media (max-width: 768px) {
  .blog-hero {
    padding: 2rem 0 3rem;
  }
  
  .blog-hero-content {
    padding: 0 1.5rem;
  }
}

/* Featured Post Section */
.featured-post {
  padding: 6rem 0;
  border-bottom: 1px solid #EEEEEE;
  background: #FFFFFF;
}

.featured-post:empty {
  display: none;
}

.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.featured-image {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #f5f5f5;
  position: relative;
}

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

.featured-image:hover img {
  transform: scale(1.02);
}

.featured-content h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  color: #333333;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.featured-content p {
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  color: #666666;
  line-height: 1.6;
  margin-bottom: 2rem;
}

/* Mobile responsive featured post */
@media (max-width: 768px) {
  .featured-post {
    padding: 3rem 0;
  }
  
  .featured-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
  }
  
  .featured-image {
    order: -1;
  }
  
  .featured-content h2 {
    margin-bottom: 0.75rem;
  }
  
  .featured-content p {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .featured-card {
    gap: 1.5rem;
    padding: 0 1rem;
  }
}

.featured-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: #888;
}

.featured-tag {
  background: #f0f0f0;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #555;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  background: #1a1a1a;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.read-more-btn:hover {
  background: #333;
  transform: translateY(-1px);
}

/* Blog Posts Grid */
.blog-posts {
  padding: 6rem 0;
  background: #FFFFFF;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 3rem;
  text-align: center;
  letter-spacing: -0.01em;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

/* Mobile responsive posts grid */
@media (max-width: 768px) {
  .blog-posts {
    padding: 3rem 0;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .posts-grid {
    gap: 1.5rem;
    padding: 0 1rem;
  }
}

/* Post Card Styles */
.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.post-image {
  aspect-ratio: 16/10;
  background: #f5f5f5;
  overflow: hidden;
  position: relative;
}

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

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

.post-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #999;
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: #888;
}

.post-date {
  font-weight: 500;
}

.post-tag {
  background: #f0f0f0;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-weight: 500;
  color: #555;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-summary {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading State */
.loading-state {
  text-align: center;
  padding: 4rem 0;
}

.loading-animation {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.loading-bubble {
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  border-radius: 50%;
  animation: bubble-bounce 1.4s ease-in-out infinite both;
}

.loading-bubble:nth-child(1) { animation-delay: -0.32s; }
.loading-bubble:nth-child(2) { animation-delay: -0.16s; }

@keyframes bubble-bounce {
  0%, 80%, 100% { 
    transform: scale(0);
  } 
  40% { 
    transform: scale(1);
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 8rem 0;
  max-width: 600px;
  margin: 0 auto;
}

.empty-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #333333;
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.empty-state p {
  color: #666666;
  font-size: 1.1rem;
  line-height: 1.6;
  font-style: italic;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Active Navigation State */
nav a.active {
  color: #1a1a1a;
  font-weight: 600;
  position: relative;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: #1a1a1a;
  border-radius: 1px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-title {
    font-size: 2.5rem;
  }
  
  .blog-subtitle {
    font-size: 1.125rem;
  }
  
  .blog-hero {
    padding: 3rem 0 4rem;
  }
  
  .featured-post {
    padding: 4rem 0;
  }
  
  .featured-card {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .featured-card .featured-image {
    order: -1;
  }
  
  .featured-content h2 {
    font-size: 2rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .blog-posts,
  .featured-post {
    padding: 3rem 0;
  }
  
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .blog-hero-content {
    padding: 0 1rem;
  }
  
  .blog-title {
    font-size: 2rem;
  }
  
  .featured-content h2 {
    font-size: 1.75rem;
  }
  
  .post-content {
    padding: 1.25rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}