/* ─── Sections ───────────────────────────────────────────────────────────── */

.section-header {
  margin-top: 3.5rem;
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #00FF87;
  margin-bottom: 0.4rem;
}

.section-desc {
  font-size: 0.95rem;
  opacity: 0.55;
  line-height: 1.6;
  max-width: 560px;
}

/* ─── Grid ───────────────────────────────────────────────────────────────── */

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.projects.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.projects.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

@media (max-width: 900px) {
  .projects.grid-4 { grid-template-columns: repeat(3, 1fr); }
  .projects.grid-6 { grid-template-columns: repeat(4, 1fr); }
}

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

/* ─── Card base ──────────────────────────────────────────────────────────── */

.card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  padding: 20px;
  color: #ffffff;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(0, 255, 135, 0.25);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-header > div {
  flex: 1;
  min-width: 0;
}

.card-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-sub {
  font-size: 0.8rem;
  opacity: 0.45;
  margin-top: 2px;
}

.card-bio {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.65;
  margin-bottom: 14px;
}

/* ─── Card piloto / grupo: vertical com imagem no topo ──────────────────── */

.card--piloto {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card--piloto .card-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: rgba(0,255,135,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card--piloto .card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card--piloto .avatar-initials {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
}

.card--piloto .card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ─── Card grupo: vertical com logo quadrado no topo ────────────────────── */

.card--grupo {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card--grupo .card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(0,255,135,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card--grupo .card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card--grupo .avatar-initials {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
}

.card--grupo .card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card--grupo .card-name {
  font-size: 0.8rem;
}

.card--grupo .card-sub {
  font-size: 0.7rem;
}

.card--grupo .ig-icon {
  width: 14px;
  height: 14px;
}

.card--kartodromo {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card--kartodromo .card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: rgba(0,255,135,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card--kartodromo .card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card--kartodromo .avatar-initials {
  width: 72px;
  height: 72px;
  font-size: 1.6rem;
}

.card--kartodromo .card-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card--kartodromo .card-name {
  font-size: 0.8rem;
}

.card--kartodromo .card-sub {
  font-size: 0.7rem;
}

.card--kartodromo .ig-icon {
  width: 14px;
  height: 14px;
}

/* ─── Avatars ────────────────────────────────────────────────────────────── */

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0,255,135,0.1);
  border: 1px solid rgba(0,255,135,0.2);
}

.avatar-initials {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(0,255,135,0.1);
  border: 1px solid rgba(0,255,135,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #00FF87;
  letter-spacing: 0.02em;
}

.avatar-square {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(0,255,135,0.1);
  border: 1px solid rgba(0,255,135,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

/* ─── Instagram link ─────────────────────────────────────────────────────── */

.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00FF87;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: opacity 0.2s;
}

.instagram-link:hover { opacity: 0.7; }

.ig-icon {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.instagram-link:hover .ig-icon { opacity: 1; }
