/* ===================================
   BLOG PAGE STYLES
   =================================== */

.blog-page {
  padding: 0;
  min-height: 100vh;
}

/* Hero Section */
.blog-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a1f4d 100%);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(146, 47, 22, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(146, 47, 22, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.blog-hero-title {
  font-size: 3.5rem;
  color: var(--white);
  margin-bottom: 15px;
  position: relative;
  animation: fadeInUp 0.8s ease;
}

.blog-hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Blog Layout */
.blog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 60px 0;
  position: relative;
}

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  animation: fadeInLeft 0.8s ease;
}

.filter-section {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 25px;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.filter-section:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.filter-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 10px;
}

.category-filter {
  display: block;
  padding: 10px 15px;
  color: #555;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.category-filter::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--brick);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.category-filter:hover,
.category-filter.active {
  background: var(--white);
  color: var(--brick);
  padding-left: 20px;
}

.category-filter:hover::before,
.category-filter.active::before {
  transform: scaleY(1);
}

/* Search Input */
.blog-search-input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--brick);
  box-shadow: 0 0 0 3px rgba(146, 47, 22, 0.1);
}

/* Recent Posts */
.recent-posts {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts li {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e9ecef;
}

.recent-posts li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recent-posts a {
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.4;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  transition: color 0.3s ease;
}

.recent-posts a:hover {
  color: var(--brick);
}

.recent-date {
  font-size: 0.75rem;
  color: #999;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Blog Controls */
.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  animation: fadeInUp 0.8s ease 0.3s backwards;
}

.view-toggle {
  display: flex;
  gap: 10px;
  background: var(--white);
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.view-btn {
  padding: 10px 15px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn:hover {
  background: #f8f9fa;
  color: var(--navy);
}

.view-btn.active {
  background: var(--brick);
  color: var(--white);
}

.posts-count {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  animation: fadeInUp 0.8s ease 0.4s backwards;
  transition: all 0.5s ease;
}

.blog-grid.list-view {
  grid-template-columns: 1fr;
}

/* Blog Card */
.blog-card {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
}

.blog-card.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.blog-card-inner {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.blog-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brick), var(--light-brick));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.blog-card-inner:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.blog-card-inner:hover::before {
  transform: scaleX(1);
}

/* Card Image */
.blog-card-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #f0f0f0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card-inner:hover .blog-card-image img {
  transform: scale(1.1);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.blog-card-inner:hover .image-overlay {
  opacity: 1;
}

.blog-card-image.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.placeholder-image {
  color: #ccc;
  transition: transform 0.4s ease;
}

.blog-card-inner:hover .placeholder-image {
  transform: scale(1.1);
}

/* Card Content */
.blog-card-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 12px;
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-card-meta svg {
  opacity: 0.7;
}

.blog-card-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.category-badge {
  background: rgba(146, 47, 22, 0.1);
  color: var(--brick);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
}

.blog-card-inner:hover .category-badge {
  background: var(--brick);
  color: var(--white);
}

.blog-card-title {
  font-size: 1.4rem;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-card-title a {
  color: var(--navy);
  text-decoration: none;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-title a:hover {
  color: var(--brick);
}

.blog-card-excerpt {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brick);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
  width: fit-content;
}

.read-more-btn svg {
  transition: transform 0.3s ease;
}

.read-more-btn:hover {
  gap: 12px;
}

.read-more-btn:hover svg {
  transform: translateX(4px);
}

/* List View Styles */
.blog-grid.list-view .blog-card-inner {
  flex-direction: row;
  align-items: stretch;
}

.blog-grid.list-view .blog-card-image {
  width: 300px;
  height: auto;
  flex-shrink: 0;
}

.blog-grid.list-view .blog-card-content {
  padding: 30px;
}

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid #f0f0f0;
}

.blog-pagination a,
.blog-pagination span {
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-pagination a:hover {
  border-color: var(--brick);
  background: var(--brick);
  color: var(--white);
  transform: translateY(-2px);
}

.blog-pagination .current {
  background: var(--brick);
  color: var(--white);
  border-color: var(--brick);
}

/* No Posts State */
.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.no-posts svg {
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-posts p {
  font-size: 1.2rem;
  margin: 0;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .blog-hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 60px 0 40px;
  }

  .blog-hero-title {
    font-size: 2rem;
  }

  .blog-hero-subtitle {
    font-size: 1rem;
  }

  .blog-sidebar {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .blog-controls {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .view-toggle {
    justify-content: center;
  }

  .blog-grid.list-view .blog-card-inner {
    flex-direction: column;
  }

  .blog-grid.list-view .blog-card-image {
    width: 100%;
    height: 240px;
  }

  .blog-pagination a,
  .blog-pagination span {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}