/* Enhanced Blog/Highlights Page - Modern Design with Advanced Animations */

/* Adding new animation keyframes for more sophisticated motion */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* New sophisticated animations */
@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmerGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes rotateGradient {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(12, 148, 71, 0.3);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(12, 148, 71, 0);
  }
}

/* Smooth page transitions */
* {
  scroll-behavior: smooth;
}

body {
  background: #fafafa;
}

/* Main container styling */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Enhanced hero section with gradient and depth */
.blog-hero {
  background: linear-gradient(135deg, #f6fbf5 0%, #e8f5e8 50%, #dcf0e0 100%);
  padding: 100px 20px;
  text-align: center;
  margin: 0 -20px 50px -20px;
  border-radius: 0 0 40px 40px;
  animation: fadeInUp 0.7s ease-out;
  box-shadow: 0 24px 80px rgba(12, 148, 71, 0.12);
  position: relative;
  overflow: hidden;
}

/* Add gradient shimmer to hero background */
.blog-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(253, 230, 138, 0.1) 50%, transparent 70%);
  animation: rotateGradient 15s linear infinite;
  z-index: 0;
}

.blog-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 16px;
  color: #0a3d1f;
  letter-spacing: -1px;
  line-height: 1.1;
  animation: slideInLeft 0.8s ease-out 0.1s both;
  position: relative;
  z-index: 1;
}

.blog-hero p {
  color: #4a7c60;
  margin: 0;
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  animation: slideInLeft 0.8s ease-out 0.2s both;
  font-weight: 500;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* Enhanced controls section with better spacing and animations */
.blog-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 50px 0;
  gap: 24px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease-out 0.3s both;
}

.tabs {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Enhanced tab styling with modern effects */
.tab {
  padding: 12px 26px;
  border: 2px solid transparent;
  background: #ffffff;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 600;
  color: #4a7c60;
  text-decoration: none;
  display: inline-block;
  font-size: 15px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Tab hover shine effect */
.tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.tab:hover::before {
  left: 100%;
}

.tab.is-active,
.tab.active {
  background: linear-gradient(135deg, #0c9447 0%, #0a7d3a 100%);
  color: #ffffff;
  border-color: #0a7d3a;
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(12, 148, 71, 0.35);
}

.tab:hover:not(.is-active):not(.active) {
  background: #f8fdf9;
  border-color: #0c9447;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  color: #0c9447;
}

/* Enhanced search styling */
.search {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  position: relative;
  width: max-content;
}

.search .form-control {
  max-width: 360px;
  padding: 13px 20px 13px 46px;
  border: 2px solid #e5e7eb;
  border-radius: 30px;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #ffffff;
  font-weight: 500;
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.search .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  font-size: 18px;
  transition: all 0.3s ease;
}

.search .form-control:focus {
  border-color: #0c9447;
  box-shadow: 0 0 0 4px rgba(12, 148, 71, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
  outline: none;
  background: #ffffff;
}

.search .form-control:focus + .search-icon {
  color: #0c9447;
  transform: translateY(-50%) scale(1.1);
}

/* Enhanced blog grid with better spacing */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
  margin-bottom: 60px;
}

/* Staggered animations for cards */
.blog-grid .blog-card {
  animation: scaleIn 0.6s ease-out forwards;
  opacity: 0;
}

.blog-grid .blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-grid .blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-grid .blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-grid .blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-grid .blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-grid .blog-card:nth-child(6) { animation-delay: 0.6s; }

/* Modern card styling with enhanced shadows */
.blog-card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.09);
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  color: #1f2937;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  position: relative;
}

/* Top accent line with gradient animation on hover */
.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, transparent, #0c9447, #10b981, #0c9447, transparent);
  transition: left 0.8s ease;
  z-index: 10;
  background-size: 200% 100%;
}

/* Add subtle gradient overlay on card */
.blog-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(12, 148, 71, 0.02) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.blog-card:hover::after {
  opacity: 1;
}

.blog-card:hover::before {
  left: 100%;
}

.blog-card:hover {
  transform: translateY(-16px);
  box-shadow: 0 28px 60px rgba(12, 148, 71, 0.18);
  border-color: rgba(12, 148, 71, 0.15);
}

.card-media {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #f5f5f5;
}

.card-media img,
.card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blog-card:hover .card-media img,
.blog-card:hover .card-media video {
  transform: scale(1.12) rotate(0.8deg);
}

.card-media video {
  background: #f3f4f6;
}

/* Enhanced pill badges */
.pill {
  position: absolute;
  left: 18px;
  top: 18px;
  background: rgba(255, 255, 255, 0.99);
  backdrop-filter: blur(12px);
  border-radius: 26px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.pill:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Enhanced pill color schemes with gradients */
.pill--recipes { 
  color: #dc2626; 
  background: linear-gradient(135deg, rgba(254, 242, 242, 0.95) 0%, rgba(254, 226, 226, 0.95) 100%);
  border-color: rgba(254, 202, 202, 0.3);
}
.pill--news { 
  color: #2563eb; 
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(219, 234, 254, 0.95) 100%);
  border-color: rgba(147, 197, 253, 0.3);
}
.pill--stories { 
  color: #d97706; 
  background: linear-gradient(135deg, rgba(255, 251, 235, 0.95) 0%, rgba(254, 243, 199, 0.95) 100%);
  border-color: rgba(252, 211, 77, 0.3);
}
.pill--blog { 
  color: #0c9447; 
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.95) 0%, rgba(209, 250, 229, 0.95) 100%);
  border-color: rgba(134, 239, 172, 0.3);
}
.pill--tips { 
  color: #059669; 
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.95) 0%, rgba(167, 243, 208, 0.95) 100%);
  border-color: rgba(52, 211, 153, 0.3);
}

/* Enhanced card body with better typography */
.card-body {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-title {
  margin: 0 0 14px;
  font-size: 1.4rem;
  line-height: 1.35;
  color: #0a3d1f;
  font-weight: 750;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

.blog-card:hover .card-title {
  color: #0c9447;
}

.card-excerpt {
  margin: 0 0 14px;
  color: #6b7280;
  line-height: 1.7;
  font-size: 0.98rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Enhanced metadata styling */
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #9ca3af;
  font-size: 13px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  transition: all 0.3s ease;
}

.blog-card:hover .card-meta {
  border-top-color: rgba(12, 148, 71, 0.25);
  color: #6b7280;
}

.card-meta .dot {
  opacity: 0.4;
  font-size: 12px;
}

/* Enhanced pagination */
.blog-pagination {
  text-align: center;
  padding: 80px 0;
  animation: fadeInUp 0.7s ease-out 1s both;
}

.blog-pagination .btn {
  border-radius: 35px;
  padding: 16px 48px;
  font-weight: 750;
  background: linear-gradient(135deg, #0c9447 0%, #0a7d3a 100%);
  border: none;
  color: #ffffff;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 16px;
  box-shadow: 0 12px 28px rgba(12, 148, 71, 0.25);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

/* Button shine and pulse effect */
.blog-pagination .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  transition: left 0.6s ease;
  z-index: 1;
}

.blog-pagination .btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmerGradient 3s linear infinite;
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-pagination .btn:hover::before {
  left: 100%;
}

.blog-pagination .btn:hover::after {
  opacity: 1;
}

.blog-pagination .btn:hover {
  background: linear-gradient(135deg, #0a7d3a 0%, #084d2a 100%);
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(12, 148, 71, 0.4);
}

.blog-pagination .btn:active {
  transform: translateY(-2px);
}

/* Mobile responsiveness improvements */
@media (max-width: 768px) {
  .main-container {
    padding: 0 18px;
  }

  .blog-hero {
    padding: 60px 20px;
    margin: 0 -18px 40px -18px;
    border-radius: 0 0 30px 30px;
  }

  .blog-hero h1 {
    font-size: 2.8rem;
    margin-bottom: 12px;
  }

  .blog-hero p {
    font-size: 1.05rem;
    line-height: 1.6;
  }

  .blog-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 40px;
  }

  .tabs {
    justify-content: center;
    gap: 10px;
  }

  .tab {
    padding: 11px 20px;
    font-size: 14px;
    flex: 0 1 auto;
  }

  .search {
    width: 100%;
    justify-content: stretch;
  }

  .search .form-control {
    max-width: 100%;
    width: 100%;
    font-size: 14px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
  }

  .card-media {
    height: 220px;
  }

  .card-body {
    padding: 24px 28px;
  }

  .card-title {
    font-size: 1.25rem;
  }

  .card-excerpt {
    font-size: 0.96rem;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding: 50px 18px;
    margin: 0 -18px 30px -18px;
    border-radius: 0 0 25px 25px;
  }

  .blog-hero h1 {
    font-size: 2.1rem;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
  }

  .blog-hero p {
    font-size: 0.98rem;
    line-height: 1.6;
  }

  .blog-controls {
    gap: 10px;
    margin-bottom: 30px;
  }

  .tabs {
    gap: 8px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .tab {
    padding: 10px 16px;
    font-size: 12px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .search .form-control {
    font-size: 13px;
    max-width: 100%;
  }

  .blog-grid {
    gap: 18px;
    margin-bottom: 30px;
  }

  .card-media {
    height: 180px;
  }

  .card-body {
    padding: 20px 22px;
  }

  .card-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .card-excerpt {
    font-size: 0.93rem;
    line-height: 1.6;
    -webkit-line-clamp: 2;
  }

  .card-meta {
    font-size: 12px;
    gap: 8px;
  }

  .pill {
    left: 14px;
    top: 14px;
    padding: 6px 12px;
    font-size: 11px;
  }

  .blog-pagination {
    padding: 50px 0;
  }

  .blog-pagination .btn {
    padding: 13px 28px;
    font-size: 13px;
    letter-spacing: 0.3px;
  }
}

.hidden {
  display: none !important;
}
