/* === PERFECTLY ALIGNED TWO-COLUMN PRESIDENT GRID === */

.president-grid-fixed {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  justify-items: center;
  align-items: start;
  gap: 160px 80px;
  padding: 100px 10%;
  background: none;
}

/* Each block (title + card) */
.president-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 500px;
}

/* Static name (stays above, never moves) */
.president-name-static {
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 30px;
}

/* Card container */
.president-card {
  width: 100%;
  height: 650px;
  position: relative;
  perspective: 1000px;
  transition: transform 0.3s ease;
  margin: 0; /* ensure no vertical offsets */
}

/* No offsets anywhere */
.president-wrapper:nth-child(2n),
.president-wrapper:nth-child(2n) .president-card {
  margin-top: 0 !important;
}

/* Hover scale */
.president-card:hover {
  transform: scale(1.03);
}

/* Front & back faces */
.card-front,
.card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  backface-visibility: hidden;
  overflow: hidden;
  transition: transform 0.8s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Front */
.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Back */
.card-back {
  transform: rotateY(180deg);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  text-align: center;
}

.card-back .dates {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 12px;
}

.card-back .bio {
  font-size: 1em;
  margin-bottom: 20px;
}

.card-back .socials a svg {
  width: 28px;
  height: 28px;
  margin: 0 8px;
  transition: transform 0.3s ease, color 0.3s ease;
  color: white; /* default color, controlled via currentColor */
}

.card-back .socials a:hover svg {
  transform: scale(1.2);
  color: #f0f0f0; /* subtle hover tint */
}


}

/* Flip effect */
.president-card:hover .card-front {
  transform: rotateY(180deg);
}

.president-card:hover .card-back {
  transform: rotateY(0deg);
}

/* Responsive */
@media (max-width: 1024px) {
  .president-grid-fixed {
    grid-template-columns: 1fr;
    gap: 100px;
    padding: 60px 5%;
  }

  .president-wrapper {
    max-width: 500px;
  }

  .president-card {
    height: auto;
  }
}
