.main-header {
  background: #2c3e50;
  padding: 1rem 0;
  color: white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.main-header .container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
}

.nav-links .nav-btn {
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  background: #6A42C2;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.nav-links .nav-btn:hover {
  background: #6A42C2;
}

.hero-section {
  background: #ecf0f1;
  text-align: center;
  padding: 2rem 1rem;
}

.hero-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.hero-section p {
  color: #555;
}





.post-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.post-card:hover {
  transform: translateY(-5px);
}

.post-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: white;
  padding: 1rem;
}

.post-title {
  font-size: 1.2rem;
  margin: 0;
}

.post-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.post-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.post-user img {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
}

.user-role {
  font-size: 0.8rem;
  color: gray;
}

.post-description {
  color: #333;
  line-height: 1.4;
  max-height: 3.6em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.read-more-btn {
  align-self: flex-start;
  padding: 0.4rem 0.8rem;
  background: #6A42C2;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.read-more-btn:hover {
  background: #6A42C2;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #555;
  margin-top: auto;
}

.post-actions i {
  margin-right: 5px;
}




.post-actions-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.8rem;
  border-top: 1px solid #eee;
  padding-top: 0.8rem;
}

.reactions span {
  margin-right: 1rem;
  font-size: 0.95rem;
  color: #555;
  cursor: pointer;
}

.reactions i {
  margin-right: 5px;
  color: #555;
}

.nice-post-btn {
  background: #6A42C2;
  color: white;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 5px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.3s;
}

.nice-post-btn:hover {
  background: #6A42C2;
}

/* Category Section */
.category-section {
  margin: 3rem 1rem;
  padding: 1rem;
  background: #f7f7f7;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.category-section h3 {
  margin-bottom: 1rem;
  color: #333;
  text-align: center;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cat-btn {
  background: #6A42C2;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.3s;
}

.cat-btn:hover {
  background: #6A42C2;
}


.category-section {
  background: #f0f4ff;
  padding: 30px 15px;
  border-radius: 10px;
  margin: 40px auto;
  max-width: 1000px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-section h3 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #333;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 15px;
  justify-items: center;
}

.cat-btn {
  background-color: #6A42C2;
  color: white;
  padding: 10px 16px;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 25px;
  transition: 0.3s ease;
  display: inline-block;
  text-align: center;
}

.cat-btn:hover {
  background-color: #1a237e;
  transform: scale(1.05);
}
