/* Projects Hero */
/* standardized hero height with min-height and flexbox centering */
.projects-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 6rem;
  overflow: hidden;
  padding: 3rem 2rem;
}

.projects-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 183, 126, 0.15) 0%, rgba(255, 209, 102, 0.1) 100%);
  z-index: 0;
}

.projects-background::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 119, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.projects-hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--mist-grey);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

.projects-hero p {
  position: relative;
  z-index: 1;
  font-size: 1.25rem;
  color: var(--emerald-green);
  text-align: center;
  max-width: 800px;
  animation: fadeInUp 1.2s ease-out;
}

/* Projects Grid */
.projects-grid-section {
  padding: 4rem 2rem;
  background-color: var(--deep-navy);
}

.projects-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  auto-rows: 1fr;
}

.project-card {
  background: linear-gradient(135deg, rgba(0, 183, 126, 0.08) 0%, rgba(0, 119, 255, 0.08) 100%);
  border: 1px solid rgba(0, 183, 126, 0.2);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--emerald-green);
  background: linear-gradient(135deg, rgba(0, 183, 126, 0.15) 0%, rgba(0, 119, 255, 0.15) 100%);
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(0, 183, 126, 0.2);
}

.project-card.featured {
  grid-column: 1 / 2;
  grid-row: 2;
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.1) 0%, rgba(0, 119, 255, 0.08) 100%);
}

.project-card.featured:hover {
  border-color: var(--gold);
}

.project-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(0, 183, 126, 0.1) 0%, rgba(0, 119, 255, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.placeholder-image {
  font-size: 4rem;
  opacity: 0.6;
  transition: transform 0.3s ease;
}

.project-card:hover .placeholder-image {
  transform: scale(1.2);
}

.project-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-content h3 {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mist-grey);
  margin-bottom: 0.75rem;
}

.project-content p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--mist-grey);
  opacity: 0.85;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-link {
  color: var(--electric-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-link:hover {
  color: var(--gold);
  transform: translateX(5px);
}

/* CTA */
.projects-cta {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.08) 0%, rgba(0, 183, 126, 0.08) 100%);
  text-align: center;
}

.projects-cta h2 {
  font-family: var(--font-sans);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--mist-grey);
  margin-bottom: 1rem;
}

.projects-cta p {
  font-size: 1.125rem;
  color: var(--mist-grey);
  margin-bottom: 2rem;
}

/* Added community gallery section */
.projects-community {
  padding: 4rem 2rem;
  background: linear-gradient(135deg, rgba(0, 183, 126, 0.05) 0%, rgba(0, 119, 255, 0.05) 100%);
}

.community-container {
  max-width: 1400px;
  margin: 0 auto;
}

.community-container h2 {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.community-subtitle {
  text-align: center;
  color: var(--mist-grey);
  opacity: 0.7;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.community-gallery {
  display: flex;
  justify-content: center;
}

.community-item {
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(0, 183, 126, 0.2);
  transition: all 0.3s ease;
}

.community-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.community-item:hover {
  border-color: var(--emerald-green);
  box-shadow: 0 20px 50px rgba(0, 183, 126, 0.2);
}

.community-item:hover img {
  transform: scale(1.03);
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card.featured {
    grid-column: 1 / 2;
    grid-row: auto;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .projects-hero h1 {
    font-size: 1.75rem;
  }

  .community-item {
    border-radius: 0.75rem;
  }
}
