/* Blog Page Styles */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

/* Loading Spinner */
.loading-spinner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loading-spinner.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner-container {
  text-align: center;
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(71, 142, 192, 0.3);
  border-top: 3px solid #478ec0;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Blog page specific header adjustments */
header {
  margin-top: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Ensure the main site's header styles work */
.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background-color: #fff;
  padding: 2px 12px;
  border-radius: 30px;
}

.logo {
  width: 145px;
  height: 37px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #fff;
  padding: 2px 2px;
  cursor: pointer;
  background-clip: padding-box;
}

/* Navigation adjustments for blog page */
.nav-links a {
  color: white;
  text-decoration: none;
}

.btn-header {
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid transparent;
  background-image: linear-gradient(90deg, #478ec0, #51b36c);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  color: white;
  font-weight: 600;
  margin-left: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.btn-header:hover {
  background: #478ec0;
  box-shadow: 0 4px 12px rgba(71, 142, 192, 0.4);
}

/* Hero Section */
.blog-hero {
  position: relative;
  background: linear-gradient(135deg, #1c2732 0%, #0f1419 100%);
  padding: 120px 20px 80px;
  text-align: center;
  overflow: hidden;
}

.blog-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.blog-hero-title {
  font-size: clamp(32px, 2vw, 48px);
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(90deg, #478ec0 0%, #51b36c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-hero-subtitle {
  font-size: clamp(16px, 1vw, 20px);
  color: #e5e7eb;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Hero Pattern */
.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.pattern-circle {
  position: absolute;
  border: 1px solid rgba(71, 142, 192, 0.2);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.pattern-circle:nth-child(1) {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.pattern-circle:nth-child(2) {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.pattern-circle:nth-child(3) {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 20%;
  animation-delay: 4s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.6;
  }
}

/* Blog Content Section with Two Column Layout */
.blog-content-section {
  padding: 60px 20px;
  background: #f8fafc;
}

.blog-container {
  max-width: 1400px;
  margin: 0 auto;
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* Left Column - Blog Posts */
.blog-posts-column {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Search and Filter Section at Top */
.search-filter-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 5px;
  margin-bottom: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-filter-container {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 15px;
  align-items: center;
}



.blog-posts-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 30px;
}

/* Right Column - Sidebar */
.blog-sidebar {
  position: sticky;
  top: 120px;
}

.sidebar-widget {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  color: #1f2937;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 2px solid #f3f4f6;
  padding-bottom: 10px;
}

.filter-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 2px solid #f3f4f6;
  background: white;
  color: #6b7280;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  width: 100%;
}

.category-filter:hover,
.category-filter.active {
  border-color: #478ec0;
  background: linear-gradient(90deg, #478ec0, #51b36c);
  color: white;
  transform: translateX(4px);
}

.category-name {
  flex: 1;
}

.category-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.category-filter.active .category-count {
  background: rgba(255, 255, 255, 0.3);
}

/* Pagination Styles */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid #f3f4f6;
  margin-top: 20px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(90deg, #478ec0, #51b36c);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(71, 142, 192, 0.3);
}

.pagination-btn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.pagination-info {
  color: #6b7280;
  font-weight: 500;
  font-size: 14px;
}

/* Responsive Design for Two Column Layout */
@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr 280px;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .blog-sidebar {
    position: static;
    order: -1;
  }
  
  .sidebar-widget {
    padding: 20px;
    margin-bottom: 25px;
  }
  
  .filter-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }
  
  .category-filter {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .pagination-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .pagination-btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Mobile blog post card layout */
  .blog-post-card {
    flex-direction: column;
    gap: 15px;
  }
  
  .post-image {
    width: 100%;
    height: 180px;
  }
  
  .post-image.no-image::before {
    font-size: 40px;
  }

  /* Mobile responsive for search-filter section */
  .search-filter-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .search-filter-section {
    padding: 15px;
    margin-bottom: 20px;
  }
  
  .date-filter-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Blog Post Card */
.blog-post-card {
  background: #f9fafb;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #f3f4f6;
  transition: all 0.3s ease;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
  display: flex;
  gap: 20px;
  padding: 20px;
}

.blog-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #e5e7eb;
}

.blog-post-card.animate {
  animation-delay: var(--animation-delay, 0s);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-image {
  width: 200px;
  height: 150px;
  background: linear-gradient(135deg, #478ec0, #51b36c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  flex-shrink: 0;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-image.no-image::before {
  content: '📝';
  font-size: 32px;
}

.post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #6b7280;
}

.post-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.post-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.post-category {
  padding: 4px 8px;
  background: rgba(71, 142, 192, 0.1);
  color: #478ec0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.post-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 12px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-excerpt {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 15px;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #f3f4f6;
}

.read-more {
  color: #478ec0;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: #51b36c;
}

.post-comments {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9ca3af;
  font-size: 14px;
}



/* Blog Modal */
.blog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
}

.blog-modal.active {
  display: block;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1230px;
  max-height: 90vh;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  transition: background 0.3s ease;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.modal-body {
  padding: 40px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-post-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 20px;
  line-height: 1.3;
}

.modal-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #6b7280;
}

.modal-post-content {
  color: #374151;
  line-height: 1.8;
  font-size: 16px;
}

.modal-post-content h1,
.modal-post-content h2,
.modal-post-content h3,
.modal-post-content h4,
.modal-post-content h5,
.modal-post-content h6 {
  color: #1f2937;
  margin: 25px 0 15px;
  font-weight: 600;
}

.modal-post-content p {
  margin-bottom: 15px;
}

.modal-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
}

.modal-post-content blockquote {
  border-left: 4px solid #478ec0;
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
  color: #6b7280;
}

.modal-post-content ul,
.modal-post-content ol {
  padding-left: 25px;
  margin-bottom: 15px;
}

.modal-post-content li {
  margin-bottom: 8px;
}

.modal-post-content a {
  color: #478ec0;
  text-decoration: none;
}

.modal-post-content a:hover {
  text-decoration: underline;
}

.modal-comments-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f3f4f6;
}

.comments-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 20px;
}

.comment-item {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
}

.comment-author {
  font-weight: 600;
  color: #478ec0;
  margin-bottom: 5px;
}

.comment-date {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 10px;
}

.comment-content {
  color: #374151;
  line-height: 1.6;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  margin: 40px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.error-content i {
  font-size: 48px;
  color: #ef4444;
  margin-bottom: 20px;
}

.error-content h3 {
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 10px;
}

.error-content p {
  color: #6b7280;
  margin-bottom: 25px;
}

.retry-btn {
  padding: 12px 24px;
  background: #478ec0;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s ease;
}

.retry-btn:hover {
  background: #3d7ba8;
}

/* Footer adjustments for blog page */
.footer-section {
  margin-top: 40px;
}

/* Preloader styles (from main site) */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-bitxia {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.loader-container {
  position: relative;
  width: 100px;
  height: 100px;
}

.radial {
  position: absolute;
  border: 2px solid rgba(71, 142, 192, 0.3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.circle-1 { width: 20px; height: 20px; top: 40px; left: 40px; }
.circle-2 { width: 40px; height: 40px; top: 30px; left: 30px; animation-delay: 0.5s; }
.circle-3 { width: 60px; height: 60px; top: 20px; left: 20px; animation-delay: 1s; }
.circle-4 { width: 80px; height: 80px; top: 10px; left: 10px; animation-delay: 1.5s; }

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Circle pattern styles */
.circle-pattern {
  position: fixed;
  z-index: 1;
  top: 50%;
  margin-top: -200px;
  left: -200px;
  pointer-events: none;
  animation: rotate 10s linear infinite;
}

.circle-logo {
  width: 400px;
  height: 400px;
  position: relative;
  z-index: 1;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media screen and (max-width: 576px) {
  .circle-pattern {
    animation: rotate 20s linear infinite;
    margin-top: -150px;
  }
  
  .circle-logo {
    width: 300px;
    height: 300px;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-hero {
    padding: 100px 20px 60px;
  }
  
  .blog-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }

  .filter-tags {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }
  
  .filter-tag {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .blog-hero-title {
    font-size: 28px;
  }
  
  .blog-hero-subtitle {
    font-size: 16px;
  }
  
  .post-content {
    padding: 20px;
  }
  
  .modal-post-title {
    font-size: 24px;
  }
}

/* Animation Utilities */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* No Posts Message */
.no-posts-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.no-posts-message i {
  font-size: 48px;
  color: #d1d5db;
  margin-bottom: 20px;
}

.no-posts-message h3 {
  font-size: 24px;
  color: #374151;
  margin-bottom: 10px;
}

.no-posts-message p {
  font-size: 16px;
  color: #6b7280;
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Mobile skeleton adjustments */
@media (max-width: 768px) {
  .skeleton-card {
    flex-direction: column !important;
    gap: 15px !important;
  }
  
  .skeleton-card .skeleton-image {
    width: 100% !important;
    height: 180px !important;
  }
}
/* S
earch Widget Styles */
.search-container {
  margin-bottom: 0;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.search-input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 2px solid #f3f4f6;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  background: white;
  transition: all 0.3s ease;
  height: 42px;
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: #478ec0;
  box-shadow: 0 0 0 3px rgba(71, 142, 192, 0.1);
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-btn {
  position: absolute;
  right: 35px;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s ease;
}

.search-btn:hover {
  color: #478ec0;
}

.search-clear {
  position: absolute;
  right: 8px;
  background: #ef4444;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.3s ease;
}

.search-clear:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.search-results-info {
  padding: 8px 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  color: #0369a1;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}

.search-no-results {
  text-align: center;
  padding: 30px 20px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-top: 10px;
}

.no-results-animation {
  position: relative;
  margin-bottom: 20px;
  display: inline-block;
}

.no-results-animation i {
  font-size: 32px;
  color: #ef4444;
  position: relative;
  z-index: 2;
}

.search-waves {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.wave {
  position: absolute;
  border: 2px solid #ef4444;
  border-radius: 50%;
  opacity: 0;
  animation: searchWave 2s infinite;
}

.wave:nth-child(1) {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  animation-delay: 0s;
}

.wave:nth-child(2) {
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  animation-delay: 0.5s;
}

.wave:nth-child(3) {
  width: 80px;
  height: 80px;
  margin: -40px 0 0 -40px;
  animation-delay: 1s;
}

@keyframes searchWave {
  0% {
    opacity: 1;
    transform: scale(0);
  }
  100% {
    opacity: 0;
    transform: scale(1);
  }
}

.search-no-results h4 {
  color: #dc2626;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.search-no-results p {
  color: #7f1d1d;
  font-size: 14px;
  margin: 0;
}

/* Date Filter Styles */
.date-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: center;
}

.date-select {
  padding: 10px 12px;
  border: 2px solid #f3f4f6;
  border-radius: 6px;
  background: white;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  height: 42px;
  box-sizing: border-box;
}

.date-select:focus {
  outline: none;
  border-color: #478ec0;
  box-shadow: 0 0 0 3px rgba(71, 142, 192, 0.1);
}

.date-select:hover {
  border-color: #d1d5db;
}

.date-clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.date-clear-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Tags Widget Styles */
.tags-container {
  min-height: 60px;
}

.tags-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: #6b7280;
  font-size: 14px;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.tag-item:hover {
  background: #e5e7eb;
  color: #374151;
  transform: translateY(-1px);
}

.tag-item.active {
  background: linear-gradient(90deg, #478ec0, #51b36c);
  color: white;
  border-color: #478ec0;
}

.tag-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
}

.tag-item.active .tag-count {
  background: rgba(255, 255, 255, 0.3);
}

.tags-empty {
  text-align: center;
  padding: 30px 20px;
  color: #9ca3af;
}

.tags-empty i {
  font-size: 24px;
  margin-bottom: 10px;
  display: block;
}

.tags-empty p {
  font-size: 14px;
  margin: 0;
}

/* Active Filter Indicators */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.active-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #478ec0;
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.active-filter .remove-filter {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  font-size: 10px;
}

.active-filter .remove-filter:hover {
  color: #fecaca;
}

/* Responsive Design for New Components */
@media (max-width: 768px) {
  .date-filter-row {
    grid-template-columns: 1fr;
  }
  
  .search-input {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .tags-list {
    justify-content: center;
  }
  
  .sidebar-widget {
    margin-bottom: 20px;
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .search-input::placeholder {
    font-size: 13px;
  }
  
  .tag-item {
    font-size: 11px;
    padding: 5px 10px;
  }
  
  .date-select {
    font-size: 13px;
  }
}

/* Enhanced Animation for Search */
.search-input.searching {
  border-color: #478ec0;
  box-shadow: 0 0 0 3px rgba(71, 142, 192, 0.1);
}

.search-btn.searching {
  color: #478ec0;
  animation: searchPulse 1s infinite;
}

@keyframes searchPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Filter Results Counter */
.filter-results-summary {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 20px;
  color: #0369a1;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.filter-results-summary.no-results {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* Post Tags Styles */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.post-tag {
  padding: 3px 8px;
  background: rgba(81, 179, 108, 0.1);
  color: #51b36c;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(81, 179, 108, 0.2);
}

/* Ensure proper spacing between categories and tags */
.post-categories + .post-tags {
  margin-top: 8px;
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
  .search-input::placeholder {
    font-size: 14px;
  }
  
  .search-no-results {
    padding: 20px 15px;
  }
  
  .no-results-animation i {
    font-size: 28px;
  }
  
  .wave {
    border-width: 1px;
  }
  
  .date-filter-row {
    gap: 8px;
  }
  
  .date-select {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  .filter-results-summary {
    font-size: 13px;
    padding: 10px 12px;
    margin-bottom: 15px;
  }
  
  .post-tags {
    gap: 4px;
  }
  
  .post-tag {
    font-size: 10px;
    padding: 2px 6px;
  }
}

@media (max-width: 480px) {
  .search-input {
    padding: 10px 40px 10px 12px;
    font-size: 14px;
  }
  
  .search-btn {
    right: 30px;
  }
  
  .search-clear {
    right: 6px;
    width: 20px;
    height: 20px;
    font-size: 9px;
  }
  
  .date-select {
    font-size: 12px;
    padding: 7px 8px;
  }
  
  .tag-item {
    font-size: 10px;
    padding: 4px 8px;
  }
  
  .tag-count {
    font-size: 9px;
    padding: 1px 4px;
  }

  /* Additional mobile styles for search-filter section */
  .search-filter-section {
    padding: 12px;
  }
  
  .date-filter-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Loading States */
.search-input.loading {
  background-image: linear-gradient(90deg, transparent 0%, rgba(71, 142, 192, 0.1) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: searchLoading 1.5s infinite;
}

@keyframes searchLoading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Accessibility Improvements */
.search-input:focus,
.date-select:focus,
.category-filter:focus,
.tag-item:focus {
  outline: 2px solid #478ec0;
  outline-offset: 2px;
}

.search-btn:focus,
.search-clear:focus {
  outline: 2px solid #478ec0;
  outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .search-input {
    border-width: 2px;
  }
  
  .category-filter,
  .tag-item {
    border-width: 2px;
  }
  
  .search-no-results {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .search-waves .wave {
    animation: none;
  }
  
  .search-btn.searching {
    animation: none;
  }
  
  .search-input.loading {
    animation: none;
  }
}