/* ========================================
   📚 BLOG PAGE - CSS
   Index.html Theme ke According
======================================== */
/* Blog Search Styles (Matches Existing Theme) */
.search-container {
  display: flex;
  max-width: 600px;
  margin: 1rem auto; /* Centered */
  gap: 10px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.search-container:hover {
  box-shadow: var(--shadow-lg);
}

#blogSearchInput {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-color);
  color: var(--text-color);
}

#blogSearchInput:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-container button {
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.search-container button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Search Results */
.search-results {
  max-width: 800px;
  margin: 1rem auto;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border-color);
}

.search-results h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

#blogResultsList {
  list-style: none;
  padding: 0;
}

#blogResultsList li {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

#blogResultsList li:hover {
  background: var(--bg-color);
}

#blogResultsList li a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: block;
}

#blogResultsList li a:hover {
  text-decoration: underline;
}

/* Responsive for Mobile */
@media (max-width: 768px) {
  .search-container {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }
}

/* ✅ Blog Main Container */
.blog-main {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
  margin-bottom: 2rem;
  padding: 2.5rem 2rem;
  animation: fadeInUp 0.6s ease;
}

/* ========================================
   📋 BLOG HEADER
======================================== */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 3px solid var(--primary-color);
}

.blog-header h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.blog-header p {
  font-size: 1.2rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ========================================
   📰 BLOG GRID
======================================== */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* ========================================
   📝 BLOG CARD
======================================== */
.blog-card {
  background: var(--bg-color);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.5s ease backwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

.blog-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-8px);
}

/* ========================================
   🖼️ BLOG IMAGE
======================================== */
.blog-image {
  position: relative;
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.1);
}

/* Category Badge */
.blog-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* ========================================
   📄 BLOG CONTENT
======================================== */
.blog-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

/* Meta Info */
.blog-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.blog-date,
.blog-read-time {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Title */
.blog-content h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  line-height: 1.4;
  margin: 0;
  transition: color 0.3s ease;
}

.blog-card:hover .blog-content h2 {
  color: var(--primary-color);
}

/* Description */
.blog-content p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

/* ========================================
   🔗 READ MORE LINK
======================================== */
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
  align-self: flex-start;
  position: relative;
  overflow: hidden;
}

.read-more::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.read-more:hover::before {
  left: 100%;
}

.read-more:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-lg);
}

.read-more:active {
  transform: translateX(3px);
}

/* ========================================
   🎨 ACTIVE NAV LINK
======================================== */
nav a.active {
  background: var(--primary-color);
  color: white;
}

/* ========================================
   📱 RESPONSIVE - TABLETS (640px+)
======================================== */
@media (min-width: 640px) {
  .blog-header h1 {
    font-size: 3rem;
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .blog-image {
    height: 220px;
  }

  .blog-content h2 {
    font-size: 1.4rem;
  }
}

/* ========================================
   💻 RESPONSIVE - DESKTOP (768px+)
======================================== */
@media (min-width: 768px) {
  .blog-main {
    padding: 3rem 2.5rem;
  }

  .blog-header {
    margin-bottom: 4rem;
  }

  .blog-header h1 {
    font-size: 3.5rem;
  }

  .blog-header p {
    font-size: 1.3rem;
  }

  .blog-image {
    height: 240px;
  }

  .blog-content {
    padding: 2rem;
  }

  .blog-content h2 {
    font-size: 1.5rem;
  }

  .blog-content p {
    font-size: 1.05rem;
  }
}

/* ========================================
   🖥️ RESPONSIVE - LARGE DESKTOP (1024px+)
======================================== */
@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .blog-image {
    height: 260px;
  }
}

/* ========================================
   ✨ ANIMATIONS
======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ♿ ACCESSIBILITY
======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.hilltop-banner-wrapper {
  text-align: center; /* Banner ko center mein laayega */
  margin-top: 20px; /* Top se thoda space (chipakne se bachayega, adjust kar le 30px if zyada chahiye) */
  margin-bottom: 20px; /* Neeche bhi space de, optional */
  width: 100%; /* Full width for responsive */
}

.hilltop-banner-wrapper img {
  max-width: 100%; /* Image responsive rahe, overflow na ho */
  height: auto; /* Aspect ratio maintain */
}