/* Blogs Page Specific Styles */

.blogs-main {
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Blog Hero Section */
.blog-hero {
  position: relative;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: 80px;
}

.blog-hero .hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0.1;
  z-index: 0;
}

.blog-hero .hero-content {
  position: relative;
  z-index: 1;
  animation: fadeIn 0.8s ease-out;
}

.blog-hero .hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -2px;
}

.blog-hero .hero-subtitle {
  font-size: 1.5rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .blog-hero {
    height: 300px;
    margin-top: 60px;
  }

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

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

/* Blog Showcase Section */
.blog-showcase {
  padding: 80px 0;
}

.blog-showcase .container {
  max-width: 1200px;
}

/* Search and Filter Container */
.search-filter-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 4rem;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box i {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  font-size: 1.1rem;
}

.search-box input {
  width: 100%;
  padding: 1rem 1rem 1rem 3.5rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--card);
  color: var(--foreground);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249, 87, 66, 0.1);
}

.search-box input::placeholder {
  color: var(--muted-foreground);
}

.filter-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--foreground);
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
  .search-filter-container {
    gap: 1.5rem;
  }

  .filter-container {
    gap: 1rem;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .filter-btn i {
    display: none;
  }
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid var(--border);
  animation: fadeIn 0.6s ease-out;
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .blog-card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

[data-theme="dark"] .blog-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.blog-card.hidden {
  display: none;
}

.blog-image-wrapper {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: var(--muted);
}

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

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

.blog-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.blog-overlay-btn {
  background: white;
  color: var(--primary);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.blog-overlay-btn:hover {
  transform: scale(1.1);
  background: var(--primary);
  color: white;
}

.blog-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.blog-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.blog-read-time {
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--foreground);
  transition: color 0.3s ease;
  line-height: 1.4;
}

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

.blog-excerpt {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.blog-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.blog-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.blog-author-info h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin: 0.2rem 0 0 0;
}

.blog-arrow {
  color: var(--primary);
  transition: transform 0.3s ease;
}

.blog-card:hover .blog-arrow {
  transform: translateX(4px);
}

/* Blog Modal */
.blog-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.blog-modal.active {
  display: flex;
}

.modal-content {
  background: var(--card);
  border-radius: 12px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideInUp 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--card);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 10;
  transition: all 0.3s ease;
  color: var(--foreground);
}

.modal-close:hover {
  background: var(--primary);
  color: white;
  transform: rotate(90deg);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.modal-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.modal-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.modal-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.modal-category {
  background: var(--primary);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.modal-read-time {
  color: var(--muted-foreground);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.modal-info h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--foreground);
  line-height: 1.3;
}

.modal-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.author-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.author-details p {
  font-size: 0.85rem;
  color: var(--muted-foreground);
  margin: 0.3rem 0 0 0;
}

.modal-excerpt {
  font-size: 1rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
}

.modal-actions .btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Newsletter Section */
.newsletter-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0.95;
  margin-top: 60px;
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  color: white;
}

.newsletter-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.newsletter-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  padding: 1rem;
  border: none;
  border-radius: 50px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
}

.newsletter-form input::placeholder {
  color: #999;
}

.newsletter-form .btn {
  padding: 1rem 2rem;
}

@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .modal-info h2 {
    font-size: 1.5rem;
  }

  .modal-close {
    top: 1rem;
    right: 1rem;
  }

  .newsletter-content h2 {
    font-size: 1.75rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    min-width: auto;
  }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted-foreground);
}

.no-results i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results p {
  font-size: 1.25rem;
  font-weight: 500;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
