.about-section#projects-section {
  justify-content: flex-start; 
  align-items: center; 
  overflow: auto; 
  padding-bottom: 40px; 
  max-height: calc(95vh - 100px); 
}

#main-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: auto;
  margin-bottom: auto;
  width: 80%;
}

.cards-wrapper {
  width: 80%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.hidden {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

.big-card {
  flex: 1 1 250px;
  border: 3px solid var(--border-color);
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  font-size: 22px;
  cursor: pointer;
  transition: transform 0.3s, background 0.3s;
}

.big-card:hover {
  transform: scale(1.05);
  background: rgba(0,0,0,0.05);
}

.project-card {
  flex: 1 1 300px;
  max-width: 300px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  background: var(--bg-color);
}

.project-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.project-card h3 {
  margin: 10px 0 8px 0;
  font-size: 20px;
  line-height: 1.2;
}

.project-card p {
  font-size: 15px;
  line-height: 1.6;
  width: 110%;
  text-align: left;
  margin-bottom: 5px;
}

.project-card .tech {
  font-size: 14px;
  margin: 5px 0 10px 0;
  width: 100%;
  text-align: left;
  color: var(--text-color);
}

.project-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.project-buttons .btn {
  padding: 8px 14px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 14px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.project-buttons .btn:hover {
  background: var(--border-color);
  color: var(--bg-color);
  transform: scale(1.05);
}

.back-btn {
  flex-basis: 100%;
  padding: 8px 16px;
  margin-bottom: 20px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--text-color);
}

.cards-wrapper:not(#main-cards) .back-btn {
  align-self: flex-start;
}

#mode-toggle.rotate {
  transform: rotate(360deg);
  transition: transform 0.6s ease;
}

.container.arabic {
  font-family: 'Amiri', serif;
} 

body.arabic .project-card p {
  margin-right: 15%;
  direction: rtl;
  text-align: right;
  margin-left: 15%;
}
