/* Blog Specific Styles */

/* Blog Hero Section */
.blog-hero {
  background: linear-gradient(135deg, #52246d 0%, #a36f4a 100%);
  color: white;
  padding: 100px 20px 60px;
  text-align: center;
  margin-top: 80px;
}

.blog-hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 700;
}

.blog-hero p {
  font-size: 20px;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
}

/* Search and Filter Section */
.blog-controls {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #52246d;
  box-shadow: 0 0 0 3px rgba(82, 36, 109, 0.1);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #52246d;
  font-size: 20px;
}

.filter-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag-filter {
  padding: 10px 20px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  color: #333;
}

.tag-filter:hover,
.tag-filter.active {
  background: #52246d;
  color: white;
  border-color: #52246d;
}

/* Blog Grid */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

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

.article-thumbnail {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #f0f0f0;
}

.article-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.article-tag {
  background: #f0e6f6;
  color: #52246d;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

.article-title {
  font-size: 22px;
  color: #333;
  margin: 0 0 12px 0;
  font-weight: 700;
  line-height: 1.4;
}

.article-excerpt {
  color: #666;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
  font-size: 14px;
  color: #888;
}

.article-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-views {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Individual Article Page */
.article-hero {
  background: linear-gradient(135deg, #52246d 0%, #a36f4a 100%);
  color: white;
  padding: 120px 20px 60px;
  margin-top: 80px;
}

.article-hero-content {
  max-width: 900px;
  margin: 0 auto;
}

.article-hero h1 {
  font-size: 42px;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.article-hero-meta {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  font-size: 16px;
  opacity: 0.9;
}

.article-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.article-video {
  margin: 40px 0;
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.article-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.article-body {
  font-size: 18px;
  line-height: 1.8;
  color: #333;
}

.article-body h2 {
  color: #52246d;
  font-size: 32px;
  margin: 40px 0 20px;
  font-weight: 700;
}

.article-body h3 {
  color: #52246d;
  font-size: 24px;
  margin: 30px 0 15px;
  font-weight: 600;
}

.article-body p {
  margin: 20px 0;
}

.article-body ul,
.article-body ol {
  margin: 20px 0;
  padding-left: 30px;
}

.article-body li {
  margin: 10px 0;
}

.article-body pre {
  background: #f5f5f5;
  border-left: 4px solid #52246d;
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 25px 0;
}

.article-body code {
  background: #f5f5f5;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
}

.article-body pre code {
  background: none;
  padding: 0;
}

/* Social Share Buttons */
.social-share {
  margin: 50px 0;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 12px;
  text-align: center;
}

.social-share h3 {
  color: #52246d;
  margin-bottom: 20px;
  font-size: 24px;
}

.share-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.share-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: white;
}

.share-btn.facebook {
  background: #1877f2;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.linkedin {
  background: #0a66c2;
}

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

/* Related Articles */
.related-articles {
  margin: 60px 0;
  padding: 40px 0;
  border-top: 2px solid #e0e0e0;
}

.related-articles h3 {
  color: #52246d;
  font-size: 32px;
  margin-bottom: 30px;
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

/* Admin Panel */
.admin-container {
  max-width: 1000px;
  margin: 100px auto 40px;
  padding: 40px 20px;
}

.admin-header {
  background: linear-gradient(135deg, #52246d 0%, #a36f4a 100%);
  color: white;
  padding: 30px;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}

.admin-header h1 {
  margin: 0;
  font-size: 32px;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  background: white;
  padding: 15px 20px;
  border-bottom: 2px solid #e0e0e0;
}

.admin-tab {
  padding: 12px 24px;
  border: none;
  background: #f5f5f5;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  transition: all 0.3s ease;
}

.admin-tab.active {
  background: #52246d;
  color: white;
}

.admin-content {
  background: white;
  padding: 30px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Nunito', sans-serif;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #52246d;
  box-shadow: 0 0 0 3px rgba(82, 36, 109, 0.1);
}

.form-group textarea {
  min-height: 200px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-primary {
  padding: 12px 30px;
  background: #52246d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #3d1a51;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  padding: 12px 30px;
  background: white;
  color: #52246d;
  border: 2px solid #52246d;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

.btn-danger {
  padding: 8px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background: #c82333;
}

/* Articles List (Admin) */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.article-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #52246d;
}

.article-item-info h3 {
  margin: 0 0 8px 0;
  color: #333;
  font-size: 18px;
}

.article-item-info p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.article-item-actions {
  display: flex;
  gap: 10px;
}

.btn-edit {
  padding: 8px 16px;
  background: #52246d;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit:hover {
  background: #3d1a51;
}

/* Success/Error Messages */
.message {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Loading Spinner */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 18px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #52246d;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.no-results h3 {
  color: #52246d;
  font-size: 24px;
  margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .blog-hero h1 {
    font-size: 36px;
  }

  .blog-hero p {
    font-size: 16px;
  }

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

  .search-box {
    min-width: 100%;
  }

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

  .article-hero h1 {
    font-size: 32px;
  }

  .article-hero-meta {
    flex-direction: column;
    gap: 10px;
  }

  .article-body {
    font-size: 16px;
  }

  .article-body h2 {
    font-size: 26px;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    flex-direction: column;
  }

  .admin-tab {
    border-radius: 8px;
  }

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

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .article-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

/* Print Styles */
@media print {
  .blog-hero,
  .blog-controls,
  .social-share,
  .related-articles,
  nav,
  .footer {
    display: none;
  }

  .article-main {
    max-width: 100%;
  }
}
