/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body
{
  font: 16px "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.blog-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Header */
.blog-header {
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.blog-header a
{
  text-decoration: none;
  color: #FFF;
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-icon {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  backdrop-filter: blur(10px);
}

.header-content h1 {
  font-size: 3rem;
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.header-subtitle {
  color: #cbd5e1;
  font-size: 1.125rem;
}

/* Main Content */
.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

/* Blog Posts */
.posts-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-post {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.blog-post:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.post-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.post-date svg {
  flex-shrink: 0;
}

.blog-post h2 {
  font-size: 1.875rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.blog-post h2 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.blog-post h2 a:hover {
  color: #475569;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.post-excerpt {
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #334155;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 2px solid #cbd5e1;
  padding-bottom: 2px;
  transition: all 0.2s ease;
}

.read-more:hover {
  color: #0f172a;
  border-bottom-color: #0f172a;
}

.read-more svg {
  transition: transform 0.2s ease;
}

.read-more:hover svg {
  transform: translateX(4px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  gap: 1rem;
}

.pagination a {
  text-decoration: none;
  color: #334155;
}

.newer-posts-btn,
.older-posts-btn {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #cbd5e1;
  color: #334155;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  display:block;
}

.newer-posts-btn a {
  text-decoration: none;
  color: #334155;
}

.older-posts-btn a {
  text-decoration: none;
  color: #334155;
}

.newer-posts-btn:hover,
.older-posts-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* Sidebar */
.sidebar-widget {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  position: sticky;
  top: 2rem;
}

.widget-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.widget-header svg {
  color: #334155;
}

.widget-header h3 {
  font-size: 1.25rem;
  color: #0f172a;
}

.recent-posts-list {
  list-style: none;
}

.recent-posts-list li {
  margin-bottom: 0.75rem;
}

.recent-posts-list li:last-child {
  margin-bottom: 0;
}

.recent-posts-list a {
  color: #475569;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.5;
  transition: color 0.2s ease;
  display: block;
}

.recent-posts-list a:hover {
  color: #0f172a;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

/* Footer */
.blog-footer {
  border-top: 1px solid #cbd5e1;
  margin-top: 4rem;
  padding: 2rem 1rem;
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
  color: #475569;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
  
  .sidebar-widget {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 2rem 1rem;
  }
  
  .header-content h1 {
    font-size: 2rem;
  }
  
  .header-subtitle {
    font-size: 1rem;
  }
  
  .blog-post {
    padding: 1.5rem;
  }
  
  .blog-post h2 {
    font-size: 1.5rem;
  }
  
  .pagination {
    flex-direction: column;
  }
  
  .newer-posts-btn,
  .older-posts-btn {
    width: 100%;
  }
}

/* Single Post Styles */
.single-post-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.single-post {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  border: 1px solid #e2e8f0;
}

.single-post h2 {
  font-size: 1.875rem;
  margin-bottom: 2rem;
  line-height: 1.2;
  color: #0f172a;
}

.single-post h2 a {
  text-decoration: none;
  color: #0f172a;
}
.post-content {
  color: #334155;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content p:last-child {
  margin-bottom: 0;
}

/* Post Navigation */
.post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.post-navigation a {  
  text-decoration: none;
  color: #334155;
}

.prev-post-btn,
.next-post-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: white;
  border: 2px solid #cbd5e1;
  color: #334155;
  border-radius: 0.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  display:block;
}

.prev-post-btn a,
.next-post-btn a {
  text-decoration: none;
  color: #334155;
}

.prev-post-btn:hover,
.next-post-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.prev-post-btn svg {
  transition: transform 0.2s ease;
}

.next-post-btn svg {
  transition: transform 0.2s ease;
}

.prev-post-btn:hover svg {
  transform: translateX(-4px);
}

.next-post-btn:hover svg {
  transform: translateX(4px);
}

@media (max-width: 768px) {
  .single-post {
    padding: 2rem 1.5rem;
  }

  .single-post h2 {
    font-size: 1.75rem;
  }

  .post-navigation {
    flex-direction: column;
  }

  .prev-post-btn,
  .next-post-btn {
    width: 100%;
  }
}

/* Editor Styles */
.editor-section {
  display: flex;
  flex-direction: column;
}

.editor-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  border: 1px solid #e2e8f0;
}

.editor-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.editor-header svg {
  color: #334155;
}

.editor-header h2 {
  font-size: 1.875rem;
  color: #0f172a;
  margin: 0;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: #334155;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.title-input {
  padding: 0.875rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 1.125rem;
  color: #0f172a;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.title-input:focus {
  outline: none;
  border-color: #64748b;
  background: white;
}

.content-textarea {
  padding: 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #334155;
  line-height: 1.7;
  min-height: 400px;
  resize: vertical;
  font-family: inherit;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.content-textarea:focus {
  outline: none;
  border-color: #64748b;
  background: white;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #e2e8f0;
}

.form-actions a {
  color: #334155;
  text-decoration: none;  
}

.btn-primary,
.btn-secondary {
  padding: 0.875rem 1.75rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: #0f172a;
  color: white;
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.btn-secondary {
  background: white;
  color: #334155;
  border: 2px solid #cbd5e1;
  display:block;
}

.btn-secondary a{
  color: #334155;
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* Image Upload Widget */
.image-upload-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border: 2px dashed #cbd5e1;
  border-radius: 0.5rem;
  background: #f8fafc;
  text-align: center;
  min-height: 160px;
}

.upload-placeholder svg {
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.upload-placeholder p {
  color: #94a3b8;
  font-size: 0.875rem;
}

.file-input {
  display: none;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 0.5rem;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.upload-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.upload-btn svg {
  flex-shrink: 0;
}

/* Categories Widget */
.categories-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.category-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.category-item:hover {
  background: #f8fafc;
}

.category-item input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
  accent-color: #0f172a;
}

.category-item span {
  color: #475569;
  font-size: 0.875rem;
}

.add-category {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.category-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #334155;
  transition: all 0.2s ease;
}

.category-input:focus {
  outline: none;
  border-color: #64748b;
}

.add-category-btn {
  padding: 0.5rem;
  background: #0f172a;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-category-btn:hover {
  background: #1e293b;
}

.add-category-btn svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .editor-card {
    padding: 1.5rem;
  }

  .editor-header h2 {
    font-size: 1.5rem;
  }

  .content-textarea {
    min-height: 300px;
  }

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

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

/* Login Page Styles */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem 1rem;
}

.login-card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 450px;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
}

.login-header svg {
  color: #334155;
}

.login-header h2 {
  font-size: 1.875rem;
  color: #0f172a;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-input {
  padding: 0.875rem 1rem;
  border: 2px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #0f172a;
  transition: all 0.2s ease;
  background: #f8fafc;
  width: 100%;
}

.login-input:focus {
  outline: none;
  border-color: #64748b;
  background: white;
}

.login-input::placeholder {
  color: #94a3b8;
}

.login-actions {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
}

.login-actions a {
  text-decoration: none;
  color: #334155;
}

.login-actions .btn-primary,
.login-actions .btn-secondary {
  flex: 1;
}

.password-message {
  min-height: 2rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  text-align: center;
}

.password-message:empty {
  display: none;
}

@media (max-width: 768px) {
  .login-card {
    padding: 1.5rem;
  }

  .login-header h2 {
    font-size: 1.5rem;
  }

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

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