/* Blog Specific Styles */
.blog-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 140px 2rem 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="20" cy="20" r="8" fill="white"/><circle cx="80" cy="40" r="5" fill="white"/><circle cx="60" cy="80" r="6" fill="white"/></svg>');
  animation: float 20s infinite linear;
}

.blog-hero-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.blog-hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  font-weight: 300;
}

.blog-hero p {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 3rem;
}

.blog-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-top: 3rem;
}

.stat {
  text-align: center;
}

.stat .number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat .label {
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Blog Section */
.blog-section {
  padding: 80px 2rem;
  background: #f8fafc;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Add Post Button */
.add-post-section {
  text-align: center;
  margin-bottom: 3rem;
}

.add-post-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.add-post-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
}

.blog-post {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-post:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.post-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.post-content {
  padding: 2rem;
}

.post-date {
  color: #667eea;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.post-title {
  font-size: 1.5rem;
  color: #2d3748;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.post-excerpt {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.read-more {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap 0.3s ease;
}

.read-more:hover {
  gap: 10px;
}

/* No Posts Message */
.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: none;
}

.no-posts.active {
  display: block;
}

.no-posts i {
  font-size: 4rem;
  color: #667eea;
  margin-bottom: 1.5rem;
}

.no-posts h3 {
  font-size: 2rem;
  color: #2d3748;
  margin-bottom: 1rem;
}

.no-posts p {
  color: #6b7280;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

/* Blog Editor */
.blog-editor {
  background: white;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 4rem;
  display: none;
}

.blog-editor.active {
  display: block;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2rem 1rem;
  border-bottom: 2px solid #f1f5f9;
}

.editor-header h3 {
  font-size: 1.5rem;
  color: #2d3748;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-editor {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-editor:hover {
  background: #f1f5f9;
  color: #2d3748;
}

.blog-form {
  padding: 0 2rem 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group input,
.form-group textarea {
  padding: 12px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 200px;
}

.char-count {
  text-align: right;
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* Image Upload */
.image-upload-container {
  position: relative;
}

.image-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.image-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #4a5568;
}

.image-upload-label:hover {
  border-color: #667eea;
  background: #f0f4ff;
}

.image-preview {
  margin-top: 1rem;
  display: none;
}

.image-preview img {
  max-width: 300px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.remove-image {
  background: #ef4444;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.publish-btn, .preview-btn, .cancel-btn {
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.publish-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.preview-btn {
  background: #e5e7eb;
  color: #4a5568;
}

.cancel-btn {
  background: #6b7280;
  color: white;
}

.publish-btn:hover, .preview-btn:hover, .cancel-btn:hover {
  transform: translateY(-2px);
}

/* Blog Modal */
.blog-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  overflow-y: auto;
}

.blog-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 20px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  margin: 2rem;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: #6b7280;
  cursor: pointer;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #2d3748;
}

.modal-body {
  padding: 2rem;
}

.modal-body img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.modal-body .post-date {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.modal-body h2 {
  font-size: 2.5rem;
  color: #2d3748;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.post-full-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4a5568;
}

.post-full-content p {
  margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 120px 1rem 60px;
  }
  
  .blog-hero h1 {
    font-size: 3rem;
  }
  
  .blog-stats {
    gap: 2rem;
    flex-direction: column;
  }
  
  .blog-section {
    padding: 60px 1rem;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .editor-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .blog-form {
    padding: 0 1.5rem 1.5rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-body h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .blog-hero h1 {
    font-size: 2.5rem;
  }
  
  .blog-hero p {
    font-size: 1.1rem;
  }
  
  .post-content {
    padding: 1.5rem;
  }
  
  .editor-header h3 {
    font-size: 1.3rem;
  }
}


/* Blog Controls */
.blog-controls {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.blog-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 0.9rem;
}

.controls-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.sort-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.import-btn, .export-btn {
    padding: 0.75rem 1rem;
    border: 1px solid #007bff;
    background: white;
    color: #007bff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.import-btn:hover, .export-btn:hover {
    background: #007bff;
    color: white;
}

/* Post Actions */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.edit-btn, .delete-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-btn {
    background: #ffc107;
    color: white;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.edit-btn:hover {
    background: #e0a800;
}

.delete-btn:hover {
    background: #c82333;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.modal-actions button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

/* Notifications */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
    max-width: 300px;
}

.notification.error {
    background: #ef4444;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        min-width: auto;
    }
    
    .controls-right {
        justify-content: center;
    }
    
    .post-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons {
        justify-content: center;
    }
}


/* Login Modal */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.login-modal.active {
    display: flex;
}

.login-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.login-form {
    margin: 1.5rem 0;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.login-form button {
    width: 100%;
    padding: 0.75rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 0.5rem;
}

.reader-btn {
    background: #6c757d !important;
}

.reader-btn:hover {
    background: #545b62 !important;
}

.login-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 1rem;
}

/* Logout Button */
.logout-btn {
    padding: 0.75rem 1rem;
    border: 1px solid #dc3545;
    background: white;
    color: #dc3545;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #dc3545;
    color: white;
}

@media (max-width: 768px) {
  .main-header {
     padding: 0.1rem 1rem; /* Reduced vertical padding */
    flex-wrap: wrap;
    min-height: 50px; /* Fixed height */
    align-items: center;
  }
  

  .header-social {
    order: 3;
    width: 100%;
    justify-content: center;
    margin: 1rem 0 0 0;
    gap: 2rem;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    box-shadow: none;
    border: rgb(19, 229, 236);
    display: flex;
    align-items: center;
  }
  
  .dropdown:hover .dropdown-menu {
    display: block;
  }
  
  .dropdown-menu a {
    padding: 8px 15px;
    border-bottom: none;
  }
}