.blog-header {
  text-align: center;
  margin-bottom: 40px;
}

.blog-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}
body.dark {
  background-color: #121212;
  color: #eee;
}

body.dark #blog-search {
  color: #fff;
  background-color: #333;
}

body.dark .footer {
  background-color: #1a1a1a;
  color: #ccc;
}

#blog-search {
  padding: 10px 15px;
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}
/* Duplicate dropdown styles removed - handled in style.css */

#blog-search:focus {
  outline: none;
  border-color: #4a90e2;
}
.blog-container {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.blog-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height:60vh;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}


.blog-category {
  background: #4a90e2;
  color: white;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 10px;
}


.blog-content {
  padding: 20px;
}

.blog-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.blog-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
}

.blog-excerpt {
  font-size: 1rem;
  color: #444;
}

/* Dark mode styles */
body.dark .blog-card {
  background-color: #222;
  color: white;
  border-color: #444;
}

body.dark .blog-meta,
body.dark .blog-excerpt {
  color: #ccc;
}
body.dark .blog-category {
  color: #fff;
}

body.dark #blog-search {
  background-color: #333;
  color: white;
  border-color: #555;
}

@media (max-width: 600px) {
  .blog-header h1 {
    font-size: 2rem;
  }

  #blog-search {
    width: 100%;
  }
}
/* -------------------- NAVBAR DARK MODE -------------------- */
body.dark .navbar {
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
}

body.dark .navbar h1 a {
  color: #eee;
}

body.dark .navbar .nav-links a {
  color: #ddd;
}

body.dark .navbar .nav-links a:hover {
  color: #fff;
}

body.dark .navbar .dropdown {
  background-color: #222;
  border: 1px solid #333;
}

body.dark .navbar .dropdown a {
  color: #ddd;
}

body.dark .navbar .dropdown a:hover {
  background-color: #333;
  color: #fff;
}

body.dark .navbar .btn.login,
body.dark .navbar .btn.signup {
  background-color: #333;
  color: #fff;
  border: 1px solid #555;
}

body.dark .navbar .btn.login:hover,
body.dark .navbar .btn.signup:hover {
  background-color: #444;
}

/* Blog interaction styles */
.interaction-box {
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.like-btn {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 16px;
  margin-bottom: 8px;
}

.comment-section {
  margin-top: 10px;
}

.comment-section textarea {
  width: 100%;
  padding: 6px;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.comment {
  background: #f0f0f0;
  padding: 6px;
  margin: 4px 0;
  border-radius: 5px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment span {
  flex: 1;
}

.comment-actions button {
  margin-left: 5px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 12px;
}

/* Resource Sharing Hub */
.resource-hub {
  margin: 30px auto;
  padding: 20px;
  max-width: 900px;
  border: 2px solid #ddd;
  border-radius: 15px;
  background: #f9f9f9;
}

.resource-hub h2 {
  text-align: center;
  margin-bottom: 20px;
}

.resource-input {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.resource-input input {
  flex: 1;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.resource-input button {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  background: #9370db;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.resource-input button:hover {
  background: #7a52c4;
}

.resources-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.resource-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: calc(33% - 10px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 150px;
}

.resource-card span {
  text-align: justify;
  flex: 1;
}

.resource-card button {
  align-self: flex-end;
  background: #e63946;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 5px 10px;
  transition: background 0.3s ease;
}

.resource-card button:hover {
  background: #c12c3b;
}

/* Dark mode for blog interactions and resources */
body.dark .interaction-box {
  border-top-color: #555;
}

body.dark .comment {
  background: #333;
  color: #fff;
}

body.dark .resource-hub {
  background: #222;
  border-color: #555;
}

body.dark .resource-hub h2 {
  color: #fff;
}

body.dark .resource-input input {
  background: #333;
  color: #fff;
  border-color: #555;
}

body.dark .resource-card {
  background: #333;
  color: #fff;
}

/* Resource responsive design */
@media (max-width: 768px) {
  .resource-card { 
    width: calc(50% - 10px); 
  }
}

@media (max-width: 480px) {
  .resource-card { 
    width: 100%; 
  }
}

/* Utility classes */
.user-section-hidden {
  display: none;
  align-items: center;
  gap: 10px;
}

.profile-img {
  border-radius: 50%;
}

.resource-search {
  width: 100%;
  padding: 8px;
  margin-bottom: 20px;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

body.dark .resource-search {
  background: #333;
  color: #fff;
  border-color: #555;
}
