#team {
  padding: 60px 20px;
  background: var(--bg-light-blue);
}

#team .team-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
}

@media (min-width: 1024px) {
  #team .team-container {
    grid-template-columns: repeat(3, 1fr);
  }
}



.team-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin: 0 auto 16px;
}

.team-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
}

.team-role {
  font-size: 14px;
  color: var(--text-body);
  margin: 8px 0;
}

.team-quote {
  font-size: 13px;
  font-style: italic;
  color: var(--text-gray);
  margin-top: 10px;
}

.social-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--accent-yellow);
  font-size: 1.4rem;
  transition: color 0.2s ease;
}

.social-link:hover {
  color: var(--brand-blue);
}


    
.about-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
  padding: 40px 0;
}



.about-card.horizontal-card:hover {
  transform: translateY(-4px);
}

.card-image {
  flex: 0 0 140px;
  height: 140px;
  margin: 20px;
  border: 4px solid #ffd700;
  border-radius: 16px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

.card-text {
  flex: 1;
  padding: 0 20px 0 0;
}

.card-text h3 {
  font-size: 18px;
  margin: 0 0 6px;
  font-weight: 800;
}

.card-text p {
  font-size: 15px;
  margin: 0 0 10px;
  color: #555;
}

.card-text a i {
  font-size: 20px;
  color: var(--brand-blue);
}

.vertical-center {
  display: flex;
  align-items: center; /* vertical */
  justify-content: center; /* horizontal */
}




/* === FLIP CARD === */
.flip-wrapper {
  position: relative;
  width: fit-content;
  margin: auto;
}

/* LinkedIn icon - galben implicit, albastru la hover */
.linkedin-float {
  position: absolute;
  top: -10px;
  right: -10px;
  background: white;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  color: var(--accent-yellow);
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 20px;
  text-decoration: none;
}

.linkedin-float:hover {
  color: var(--brand-blue);
  transform: scale(1.1);
}

/* Card compact */
.flip-card {
  background-color: transparent;
  width: 340px;
  height: 380px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

/* Față */
.flip-card-front img.team-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 12px;
}

.flip-card-front .team-name {
  font-size: 18px;
  margin: 0;
}

.flip-card-front .team-role {
  font-size: 14px;
  margin: 4px 0 0;
  color: #666;
}

/* Spate */
.flip-card-back {
  transform: rotateY(180deg);
  justify-content: flex-start;
  font-size: 13px;
  text-align: left;
}

.card-section {
  margin-bottom: 16px;
}

.card-section h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--brand-blue);
}

.card-section ul {
  padding-left: 20px;
  margin: 0;
}

.card-section li {
  margin-bottom: 6px;
}
/* Wrapper card + LinkedIn plutitor */
.flip-wrapper {
  position: relative;
  width: fit-content;
  margin: auto;
}

/* Iconiță LinkedIn plutitoare */
.linkedin-float {
  position: absolute;
  top: -10px;
  right: -10px;
  background: white;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  color: var(--accent-yellow);
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 20px;
  text-decoration: none;
}

.linkedin-float:hover {
  color: var(--brand-blue);
  transform: scale(1.1);
}

/* Card cu flip */
.flip-card {
  width: 340px;
  height: 380px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

/* Față */
.flip-card-front img.team-photo {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.flip-card-front .team-name {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
}

.flip-card-front .team-role {
  font-size: 14px;
  color: var(--text-body);
  margin: 8px 0 6px;
}

.flip-card-front .team-tagline {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-yellow);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.2px;
  margin-top: 4px;
}


/* Spate */
.flip-card-back {
  transform: rotateY(180deg);
  justify-content: flex-start;
  font-size: 13px;
  text-align: left;
}

.card-section {
  margin-bottom: 16px;
}

.card-section h4 {
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--brand-blue);
}

.card-section ul {
  padding-left: 20px;
  margin: 0;
}

.card-section li {
  margin-bottom: 6px;
}
.flip-card-back {
  transform: rotateY(180deg);
  justify-content: flex-start;
  font-size: 13px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
}
.linkedin-float {
  position: absolute;
  top: -10px;
  right: -10px;
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  color: var(--accent-yellow);
  transition: color 0.2s ease, transform 0.2s ease;
  font-size: 20px;
  text-decoration: none;
}
.team-container {
  position: relative;
  z-index: 1;
}

/* === Flip Card Fixes === */

/* A) Add spacing between cards */
.flip-wrapper {
  margin: 20px;
}

/* A) Increase spacing in grid */
#team .team-container {
  gap: 60px 40px; /* vertical and horizontal spacing */
}

/* B) Improve scroll on flipped back (mobile) */
.flip-card-back {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* C) Ensure both sides match in height */
.flip-card-front,
.flip-card-back {
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
}

/* Optional mobile-friendly width */
@media (max-width: 600px) {
.flip-card {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}


  .flip-wrapper {
    width: 100%;
    padding: 0 16px;      /* Add side padding so it’s not flush with screen edges */
    box-sizing: border-box;
  }
}


/* Optional extra space between sections */
#team {
  padding: 80px 20px;
}

