.left-aligned {
  margin-left: auto;
}

.bg-dark {
  background-color: rgb(79, 121, 66) !important;
}

/* ALL Design of Wiki will be here - CSS */

/* CALLOUT */
.bd-callout {
  padding: 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e9ecef;
  border-left-width: .25rem;
  border-radius: .25rem;
}

.bd-callout h4 {
  margin-bottom: 1.25rem;
}

.bd-callout p:last-child {
  margin-bottom: 0;
}

.bd-callout code {
  border-radius: .25rem;
}

.bd-callout + .bd-callout {
  margin-top: -.25rem;
}

.bd-callout-info {
  border-left-color: #5bc0de;
}

.bd-callout-warning {
  border-left-color: #f0ad4e;
}

.bd-callout-danger {
  border-left-color: #d9534f;
}


/* =========================
   FOOTER LINKS
   ========================= */
footer a {
  color: white;
  font-weight: bold;
  text-decoration: none;
}

footer a:hover {
  color: white;
  text-decoration: underline;
}


/* =========================
   PROGRESS BAR
   ========================= */
#progress_bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 6px;
  background-color: rgb(76, 187, 23);
  z-index: 9999;
  transition: width 0.3s ease-out;
}


/* =========================
   HIDE NAVBAR
   ========================= */
.navbar {
  background-color: #133d2c !important;
  transition: transform 0.35s ease;
  will-change: transform;
}

.navbar-hidden {
  transform: translateY(-100%);
}


/* =========================
   GLOBAL RESET + THEME
   ========================= */
body {
  margin: 0;
  padding-top: 56px;
  font-family: Arial, sans-serif;
  background: #F1F5ED !important;
  color: #222;
}


/* Override Bootstrap dark/primary backgrounds */
.bg-dark,
.bg-primary {
  background-color: #5a7f4f !important;
}


/* =========================
   HERO / HEADER
   ========================= */
.bg-hero {
  background-color: #4e6846 !important;
  min-height: 550px;
  display: flex;
  align-items: center;
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}


/* =========================
   PAGE LAYOUT
   ========================= */
.team-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 60px;
}

.team-card {
  text-align: center;
}


.team-page .flip-circle {
  width: 200px;
  height: 200px;
  perspective: 1000px;
  margin: 20px auto;
  position: relative;
  cursor: pointer;
}

.team-page .flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.team-page .flip-circle:hover .flip-inner {
  transform: rotateY(180deg);
}

.team-page .flip-front,
.team-page .flip-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
}

.team-page .flip-front {
  background: #397a3e;
  border: 5px solid #d6e2d6;
}

.team-page .flip-back {
  background: #5a7f4f;
  border: 5px solid #d6e2d6;
  transform: rotateY(180deg);
}


/* Front side */
.flip-front {
  background: #2563eb;
}


/* Back side */
.flip-back {
  background: #7c3aed;
  transform: rotateY(180deg);
}

.member-role {
  margin-top: 12px;
  color: #555;
}

/* =========================
   TEAM PAGE SECTIONS
   ========================= */
.team-section {
  width: 100%;
}

.team-section section {
  margin-bottom: 80px;
  scroll-margin-top: 100px;
}

.team-section h2 {
  color: #397a3e;
  font-size: 30px;
  text-align: center;
  margin-bottom: 35px;
  padding-bottom: 12px;
  border-bottom: 2px solid #d6e2d6;
}

.team-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 45px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.team-card {
  width: 220px;
  text-align: center;
}

.member-name {
  color: #397a3e;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 15px;
}

.member-role {
  margin-top: 12px;
  color: #555;
  font-size: 14px;
}


/* =========================
   FLIP CIRCLE IMPROVEMENTS
   ========================= */
.flip-circle {
  width: 200px;
  height: 200px;
  perspective: 1000px;
  margin: 20px auto;
  position: relative;
  cursor: pointer;
}

.flip-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.flip-circle:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  box-sizing: border-box;
}

.flip-front {
  background: #397a3e;
  border: 5px solid #d6e2d6;
}

.flip-back {
  background: #5a7f4f;
  border: 5px solid #d6e2d6;
  transform: rotateY(180deg);
}

/* FRONT */
.flip-front .flip-image {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* BACK */
.flip-back .flip-image {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  transform: scale(1);
}


/* =========================
   MOBILE
   ========================= */
@media (max-width: 900px) {
  .team-grid {
    gap: 35px;
  }

  .team-card {
    width: 160px;
  }

  .flip-circle {
    width: 160px;
    height: 160px;
  }
}

@media (max-width: 600px) {
  .team-grid {
    flex-direction: column;
    align-items: center;
  }

  .team-card {
    width: 150px;
  }

  .flip-circle {
    width: 150px;
    height: 150px;
  }
}


/* ================================
   SIDEBAR PAGE LAYOUT
   ================================ */
.page-layout {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

/* =========================================
   VINE + SVG SIDEBAR FRAME
   ========================================= */
.sidebar {
  width: 280px;
  min-width: 280px;
  height: 500px;
  position: relative;
  flex: 0 0 280px;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: visible;
  z-index: 10;
  isolation: isolate;
}

.sidebar-artwork {
  position: absolute;
  left: -106px;
  top: -80px;
  width: 489px;
  height: 978px;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}

.vine-image {
  display: block;
  width: 489px;
  height: 978px;
  max-width: none;
  object-fit: contain;
}

.sidebar-navigation {
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  height: 480px;
  box-sizing: border-box;
  padding: 25px;
  background: transparent !important;
  border: none;
  overflow-y: auto;
  z-index: 20;
  pointer-events: auto;
}

#sidebar-nav {
  position: relative;
  z-index: 30;
}

#sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar-nav li {
  margin-bottom: 12px;
}

#sidebar-nav a {
  position: relative;
  z-index: 31;
  display: block;
  padding: 8px 5px;
  color: #333;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#sidebar-nav a:hover {
  background-color: #e8f0e3;
  color: #5a7f4f;
}

/* ================================
   CONTENT
   ================================ */
.page-content {
  flex: 1;
  min-width: 0;
}

/* ==========================
   HUMAN PRACTICES PAGE
   ========================== */
.ihp-container {
  width: 85%;
  max-width: 1200px;
  margin: 60px auto;
  display: flex;
  flex-direction: column;
  gap: 60px;
  position: relative;
}


/* ==========================
   CARDS
   ========================== */
.ihp-card {
  background: #FFFDF7;
  border-radius: 20px;
  padding: 50px 60px;
  border-top: 8px solid rgb(79,121,66);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transition:
    transform .3s ease,
    box-shadow .3s ease;
  position: relative;
  z-index: 2;
}

.ihp-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,.12);
}

.ihp-card h2 {
  margin-top: 0;
  margin-bottom: 25px;
  font-size: 2rem;
  color: rgb(79,121,66);
  font-weight: 700;
}

.ihp-card p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #444;
}


/* ==========================
   LEAF
   ========================== */
.leaf-animation {
  position: absolute;
  width: 100px;
  right: -70px;
  top: 40px;
  z-index: 1;
  pointer-events: none;
  transition:
    top 0.8s cubic-bezier(.34,1.56,.64,1),
    transform 0.8s ease;
}

.leaf-animation img {
  width: 100%;
  height: auto;
  display: block;
}


/* Little hop when landing */
.leaf-hop {
  animation: leafJump .8s ease;
}

@keyframes leafJump {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  40% {
    transform: translateY(-25px) rotate(15deg);
  }

  100% {
    transform: translateY(0) rotate(0deg);
  }
}


/* ==========================
   TIMELINE PLACEHOLDER
   ========================== */
.timeline-placeholder {
  background: #FFFDF7;
  border-radius: 20px;
  padding: 50px 60px;
  border-top: 8px solid rgb(79,121,66);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  position: relative;
  z-index: 2;
}


/* ==========================
   MOBILE
   ========================== */
@media (max-width: 768px) {
  .ihp-container {
    width: 92%;
  }

  .ihp-card,
  .timeline-placeholder {
    padding: 35px;
  }

  .leaf-animation {
    display: none;
  }
}


/* =========================================================
   ROCHESTER iGEM — MAIN NAVIGATION
   ========================================================= */


/* -------------------------
   NAVIGATION BAR
   ------------------------- */
.navbar {
  background-color: #315c3a !important;
  min-height: 82px;
  padding: 0.45rem 0;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}


/* -------------------------
   ROCHESTER TEAM NAME
   ------------------------- */
.navbar-brand {
  color: #ffffff !important;
  font-size: 2.3rem !important;
  font-weight: 600;
  letter-spacing: 1px;
  margin-right: 2rem;
  transition: all 0.25s ease;
}

.navbar-brand:hover {
  color: #dcefd5 !important;
}


/* -------------------------
   MAIN NAVIGATION LINKS
   ------------------------- */
.navbar .nav-link {
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 0.75rem 0.8rem !important;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    transform 0.25s ease;
  border-radius: 8px;
}


/* Hover effect */
.navbar .nav-link:hover {
  color: #e4f2df !important;
  background-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}


/* -------------------------
   DROPDOWN ARROW
   ------------------------- */
.navbar .dropdown-toggle::after {
  margin-left: 0.4rem;
  vertical-align: middle;
}


/* -------------------------
   DROPDOWN MENU
   ------------------------- */
.navbar .dropdown-menu {
  background-color: #315c3a;
  border: none;
  border-radius: 0 0 12px 12px;
  padding: 0.5rem;
  margin-top: 0.35rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  min-width: 190px;
}


/* -------------------------
   DROPDOWN ITEMS
   ------------------------- */
.navbar .dropdown-item {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 450;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    padding-left 0.2s ease;
}


/* Dropdown hover */
.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
  background-color: #79a96b;
  color: #ffffff;
  padding-left: 1.2rem;
}


/* -------------------------
   ACTIVE DROPDOWN
   ------------------------- */
.navbar .nav-item.show .nav-link {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}


/* -------------------------
   MOBILE MENU BUTTON
   ------------------------- */
.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.2);
}


/* -------------------------
   MOBILE NAVIGATION
   ------------------------- */
@media (max-width: 991.98px) {
  .navbar {
    min-height: 70px;
  }

  .navbar-brand {
    font-size: 2rem !important;
    margin-right: 0;
  }

  .navbar-collapse {
    margin-top: 0.75rem;
    padding: 0.5rem 0;
  }

  .navbar .nav-link {
    padding: 0.7rem 1rem !important;
  }

  .navbar .dropdown-menu {
    border-radius: 10px;
    margin-top: 0.25rem;
    box-shadow: none;
    background-color: #284d31;
  }

  .navbar .dropdown-item {
    padding: 0.65rem 1.2rem;
  }
}


/* -------------------------
   LONG HUMAN PRACTICES MENU
   ------------------------- */
@media (min-width: 992px) {
  .navbar .nav-link {
    white-space: nowrap;
  }

  #navbar-human-practices + .dropdown-menu {
    min-width: 270px;
  }
}


/* =========================================================
   iGEM FOOTER
   ========================================================= */
.igem-footer {
  background-color: #F5F0DF;
  color: #4F7942;
  padding: 25px 20px 15px;
  margin-top: 50px;
}


/* -------------------------
   SOCIAL SECTION
   ------------------------- */
.social-section {
  text-align: center;
  padding-bottom: 10px;
}

.social-section h3 {
  color: #4F7942;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}


/* -------------------------
   SOCIAL ICONS
   ------------------------- */
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.social-icons a {
  display: inline-flex !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #4F7942;
  text-decoration: none;
  line-height: 1;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
}

.social-icons a svg {
  display: block !important;
  width: 12px !important;
  height: 12px !important;
  max-width: 12px !important;
  max-height: 12px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Bluesky */
.social-icons a:nth-child(3) svg {
  fill: currentColor;
  stroke: none;
}


/* -------------------------
   SOCIAL HOVER
   ------------------------- */
.social-icons a:hover {
  color: #315C32;
  transform: translateY(-2px) scale(1.08);
  text-decoration: none;
}


/* -------------------------
   FOOTER DIVIDER
   ------------------------- */
.igem-footer hr {
  border: 0;
  border-top: 1px solid rgba(79, 121, 66, 0.2);
  margin: 12px 0 10px;
}


/* -------------------------
   LICENSE + GITLAB
   ------------------------- */
.igem-footer-bottom {
  text-align: center;
  color: #52604D;
}

.igem-footer-bottom p {
  margin: 2px 0;
  line-height: 1.3;
}

.igem-footer-bottom small {
  font-size: 0.7rem;
}

.igem-footer-bottom a {
  color: #4F7942;
  font-weight: 500;
}

.igem-footer-bottom a:hover {
  color: #315C32;
}


/* -------------------------
   FOOTER MOBILE
   ------------------------- */
@media (max-width: 576px) {
  .igem-footer {
    padding: 22px 15px 12px;
  }

  .social-icons {
    gap: 10px;
  }

  .social-icons a svg {
    width: 12px !important;
    height: 12px !important;
  }
}


/* =========================================================
   FINAL BACKGROUND OVERRIDES
   These are intentionally at the bottom so they override
   earlier Bootstrap/background rules.
   ========================================================= */
html,
body {
  background-color: #F1F5ED !important;
}


/* Main page wrappers remain transparent */
.page-layout,
.page-content {
  background-color: transparent !important;
}

/* Bootstrap containers should not create another background */
.container,
.container-fluid {
  background-color: transparent;
}


/* Main content cards */
.ihp-card,
.timeline-placeholder {
  background-color: #FFFDF7 !important;
}


/* Footer stays cream */
.igem-footer {
  background-color: #F5F0DF !important;
}

/* Main page background */
html,
body {
  background-color: #e3efdf !important;
}

/* Main content area */
main {
  background-color: #e3efdf !important;
}

/* =========================================
   VINE SIDEBAR MOBILE
   ========================================= */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    min-width: 0;
    height: auto;
    flex: 0 0 auto;
  }

  .sidebar-artwork {
    display: none;
  }

  .sidebar-navigation {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    padding: 20px;
    overflow: visible;
  }
}

/* =========================================
   ORGANIC VINE GROWTH
   ========================================= */
.vine-growth {
  position: absolute;
  left: 0;
  top: 0;
  width: 489px;
  height: 978px;
  max-width: none;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}


/* -----------------------------------------
   Animated growth path
   ----------------------------------------- */
.vine-growth-path {
  stroke-dasharray: 1;
  /* 0 = fully grown (no JS needed). Set back to 1 to animate from hidden. */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.12s linear;
}

/* Show the whole vine artwork. The growth mask only reveals the parts its
   stroked path covers, which cuts off leaves and leaves rounded gaps.
   Remove this rule if you bring back the scroll-growth animation. */
.vine-growth image {
  mask: none;
  -webkit-mask: none;
}


/* -----------------------------------------
   Static sidebar rectangle
   ----------------------------------------- */
.vine-rectangle {
  position: absolute;
  left: 0;
  top: 0;
  width: 489px;
  height: 978px;
  max-width: none;
  object-fit: contain;

  /*
     The rectangle in the original SVG is
     approximately x=117–425 and
     y=88–614.

     This clips the duplicate SVG so that
     only the rectangle remains.
  */
  clip-path: inset(
    80px
    104px
    421px
    106px
  );

  pointer-events: none;
  z-index: 2;
}


/* -----------------------------------------
   Keep navigation above everything
   ----------------------------------------- */
.sidebar-navigation {
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  height: 480px;
  box-sizing: border-box;
  padding: 25px;
  background: transparent !important;
  overflow-y: auto;
  z-index: 10;
}

/* =========================
   PARTS TABLE
   ========================= */
.parts-table-container {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 60px;
  border-radius: 14px;
  background: white;
  border: 1px solid #cfdccf;
  box-shadow: 0 5px 20px rgba(45, 91, 48, 0.08);
}


/* Main table */
.parts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}


/* Header */
.parts-table thead {
  background: #397a3e;
  color: white;
}

.parts-table th {
  padding: 17px 16px;
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  border: 1px solid #316b35;
}


/* EVERY CELL gets a border */
.parts-table td {
  padding: 20px 16px;
  vertical-align: top;
  border: 1px solid #d6e2d6;
  line-height: 1.65;
  color: #444;
}


/* Alternating rows */
.parts-table tbody tr:nth-child(even) {
  background: #f7faf7;
}


/* Hover */
.parts-table tbody tr:hover {
  background: #edf6ed;
}


/* Part name */
.part-name {
  min-width: 150px;
  color: #397a3e !important;
  font-weight: 700;
  font-size: 15px;
}


/* Construct column */
.construct {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.construct span {
  display: block;
  padding: 7px 9px;
  border-radius: 6px;
  background: #edf5ed;
  border-left: 3px solid #6ba86f;
  color: #3e573f;
  font-size: 12px;
  line-height: 1.4;
}


/* Type badge */
.part-type {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 20px;
  background: #e5f2e6;
  color: #397a3e;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* Species names */
.parts-table em {
  color: #397a3e;
}


/* Mobile */
@media (max-width: 900px) {
  .parts-table {
    min-width: 850px;
  }
}

/* =========================
   TEAM MEMBER SVG BACKGROUNDS
   ========================= */
.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  backface-visibility: hidden;
  font-weight: bold;
  color: white;
  font-size: 16px;
}

/* =========================================================
   iGEM ROCHESTER 2026 — NEW TEAM PAGE
   ========================================================= */
.team-page {
  --green-dark: #24382d;
  --green: #416f4d;
  --green-light: #8eaa91;
  --sage: #dce7dc;
  --cream: #f7f5ed;
  --white: #ffffff;
  --text: #24382d;
  --muted: #66756a;

  background: var(--cream);
  color: var(--text);
  width: 100%;
  overflow: hidden;
}


/* =========================================================
   HERO
   ========================================================= */
.team-page .team-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 30px 100px;
  text-align: center;
  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(142, 170, 145, 0.35),
      transparent 32%
    ),
    radial-gradient(
      circle at 10% 80%,
      rgba(65, 111, 77, 0.15),
      transparent 35%
    ),
    var(--cream);
}

.team-page .team-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  margin: auto;
}

.team-page .team-eyebrow {
  margin: 0 0 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--green);
}

.team-page .team-hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.055em;
  color: var(--green-dark);
}

.team-page .team-hero-text {
  max-width: 680px;
  margin: 32px auto 40px;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--muted);
}

.team-page .team-hero-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 25px;
  border-radius: 999px;
  background: var(--green);
  color: white !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.team-page .team-hero-button:hover {
  transform: translateY(-3px);
  background: var(--green-dark);
  color: white !important;
  box-shadow: 0 10px 25px rgba(36, 56, 45, 0.2);
}


/* =========================================================
   SECTIONS
   ========================================================= */
.team-page .team-section {
  width: 100%;
  padding: 110px 6vw;
  background: var(--cream);
}

.team-page .team-section-alt {
  background: var(--sage);
}

.team-page .team-section-heading {
  max-width: 850px;
  margin: 0 auto 65px;
  text-align: center;
}

.team-page .team-section-label {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--green);
}

.team-page .team-section-heading h2 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--green-dark);
}

.team-page .team-section-heading > p:last-child {
  max-width: 620px;
  margin: auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}


/* =========================================================
   TEAM GRID
   ========================================================= */
.team-page .team-grid {
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 55px 35px;
}

.team-page .team-grid-small {
  max-width: 1000px;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 45px;
}

/* =========================================================
   CENTER HEAD ADVISOR
   ========================================================= */
#head-advisor .team-grid-small {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
}


/* =========================================================
   TEAM CARD
   ========================================================= */
.team-page .team-card {
  width: auto !important;
  text-align: center;
  background: transparent;
  border: none;
}


/* =========================================================
   CIRCULAR PHOTO
   ========================================================= */
.team-page .team-photo-wrapper {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 25px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--sage);
  perspective: 1000px;
  transform-style: preserve-3d;
  box-shadow:
    0 0 0 8px rgba(255,255,255,0.7),
    0 15px 35px rgba(36,56,45,0.12);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

/* Only the hovered card comes forward */
.team-page .team-card:hover {
  position: relative;
  z-index: 10;
}

.team-page .team-card:hover .team-photo-wrapper {
  transform: translateY(-8px) scale(1.04);
  box-shadow:
    0 0 0 8px rgba(255,255,255,0.85),
    0 22px 45px rgba(36,56,45,0.2);
}


.team-page .team-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(0deg);
  transition: transform 0.8s ease;
}


/* =========================================================
   PHOTO PLACEHOLDER
   ========================================================= */
.team-page .placeholder-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(
      circle,
      rgba(255,255,255,0.7),
      transparent 65%
    ),
    var(--sage);
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}


/* =========================================================
   BIO HOVER
   ========================================================= */
.team-page .team-bio {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border-radius: 50%;
  background: rgba(36,56,45,0.95);
  color: white;
  opacity: 1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  transition: transform 0.8s ease;
}

/* Flip the two faces */
.team-page .team-card:hover .team-photo {
  transform: rotateY(180deg);
}

.team-page .team-card:hover .team-bio {
  transform: rotateY(0deg);
}


.team-page .team-bio > div {
  width: 100%;
  text-align: center;
}

.team-page .team-bio .team-bio-label {
  margin-bottom: 8px;
  color: var(--green-light);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.team-page .team-bio h3 {
  margin: 0 0 10px;
  color: white;
  font-size: 1.25rem;
}

.team-page .team-bio p:last-child {
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 0.8rem;
  line-height: 1.55;
}


/* =========================================================
   NAME + ROLE
   ========================================================= */
.team-page .team-card-info {
  padding: 0 10px;
}

.team-page .team-card-info h3 {
  margin: 0 0 7px;
  color: var(--green-dark);
  font-size: 1.15rem;
  font-weight: 700;
}

.team-page .team-card-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}


/* =========================================================
   HEAD FEATURE
   ========================================================= */
.team-page .team-feature-card {
  display: flex;
  align-items: center;
  gap: 70px;
  max-width: 950px;
  margin: 0 auto;
  padding: 55px;
  border-radius: 35px;
  background: var(--sage);
  box-shadow: 0 20px 50px rgba(36,56,45,0.08);
}

.team-page .team-feature-photo {
  flex: 0 0 250px;
  width: 250px;
  height: 250px;
  overflow: hidden;
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(255,255,255,0.7),
    0 15px 35px rgba(36,56,45,0.12);
}

.team-page .team-feature-content {
  flex: 1;
}

.team-page .team-feature-content .team-bio-label {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.team-page .team-feature-content h3 {
  margin: 0 0 18px;
  color: var(--green-dark);
  font-size: clamp(2rem,4vw,3.2rem);
  line-height: 1;
}

.team-page .team-feature-content p:last-child {
  max-width: 550px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}


/* =========================================================
   CLOSING
   ========================================================= */
.team-page .team-closing {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 30px;
  text-align: center;
  background: var(--green-dark);
  overflow: hidden;
}

.team-page .team-closing > div {
  max-width: 800px;
}

.team-page .team-closing .team-section-label {
  color: var(--green-light);
}

.team-page .team-closing h2 {
  margin: 0 0 25px;
  color: white;
  font-size: clamp(2.8rem,6vw,5.5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.team-page .team-closing p:last-child {
  margin: 0;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  line-height: 1.7;
}


/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1100px) {
  .team-page .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* =========================================================
   SMALL TABLET
   ========================================================= */
@media (max-width: 800px) {
  .team-page .team-hero {
    min-height: 65vh;
    padding: 100px 25px 80px;
  }

  .team-page .team-section {
    padding: 80px 25px;
  }

  .team-page .team-grid,
  .team-page .team-grid-small {
    grid-template-columns: repeat(2, 1fr);
    gap: 45px 25px;
  }

  .team-page .team-feature-card {
    flex-direction: column;
    gap: 35px;
    padding: 45px 30px;
    text-align: center;
  }

  .team-page .team-feature-photo {
    flex: none;
    width: 210px;
    height: 210px;
  }

  .team-page .team-feature-content p:last-child {
    margin-left: auto;
    margin-right: auto;
  }
}


/* =========================================================
   PHONE
   ========================================================= */
@media (max-width: 550px) {
  .team-page .team-hero {
    padding: 90px 20px 70px;
  }

  .team-page .team-hero h1 {
    font-size: clamp(3rem,15vw,5rem);
  }

  .team-page .team-hero-text {
    font-size: 0.92rem;
  }

  .team-page .team-section {
    padding: 70px 18px;
  }

  .team-page .team-grid,
  .team-page .team-grid-small {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 15px;
  }

  .team-page .team-photo-wrapper {
    width: min(100%, 190px);
    box-shadow:
      0 0 0 5px rgba(255,255,255,0.7),
      0 10px 25px rgba(36,56,45,0.12);
  }

  .team-page .team-bio {
    padding: 18px;
  }

  .team-page .team-bio h3 {
    font-size: 0.95rem;
  }

  .team-page .team-bio p:last-child {
    font-size: 0.7rem;
  }

  .team-page .team-card-info h3 {
    font-size: 0.95rem;
  }

  .team-page .team-card-info p {
    font-size: 0.7rem;
  }

  .team-page .team-feature-card {
    padding: 35px 20px;
    border-radius: 25px;
  }

  .team-page .team-feature-photo {
    width: 180px;
    height: 180px;
  }

  .team-page .team-closing {
    min-height: 50vh;
    padding: 80px 25px;
  }

  .team-page .team-closing h2 {
    font-size: 3rem;
  }
}

/* =========================================================
   TEAM CARD 3D FLIP
   ========================================================= */
.team-page .team-card {
  position: relative;
}

.team-page .team-photo-wrapper {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 25px;
  overflow: hidden;
  border-radius: 50%;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
  z-index: 1;
}


/* =========================================================
   TEAM FLIP CIRCLES — FINAL OVERRIDE
   Images fill the entire circular face; no inner border.
   ========================================================= */

.team-page .team-grid {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 70px 80px;
    justify-items: center;
}

.team-page .team-grid-small {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 60px 45px;
    justify-items: center;
}

.team-page .team-card {
    width: auto !important;
    text-align: center;
    background: transparent;
    border: none;
}

.team-page .flip-circle {
    width: 320px;
    height: 320px;
    max-width: 100%;
    margin: 20px auto 25px;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    border-radius: 50%;
}

.team-page .flip-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s ease;
    border-radius: 50%;
}

.team-page .flip-circle:hover .flip-inner {
    transform: rotateY(180deg);
}

.team-page .flip-front,
.team-page .flip-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.team-page .flip-front {
    background: #397a3e;
    transform: rotateY(0deg);
}

.team-page .flip-back {
    background: #5a7f4f;
    transform: rotateY(180deg);
}

/* Actual team photos fill the entire circular face. */
.team-page .flip-front .flip-image,
.team-page .flip-back .flip-image,
.team-page .flip-front img,
.team-page .flip-back img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

/* Placeholder also fills the entire circle. */
.team-page .flip-placeholder {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Keep names/roles outside the circle. */
.team-page .member-name {
    color: #397a3e;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.team-page .member-role {
    margin-top: 12px;
    color: #555;
    font-size: 14px;
}

/* Responsive team layout */
@media (max-width: 1100px) {
    .team-page .team-grid {
        gap: 60px 45px;
    }

    .team-page .flip-circle {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 800px) {
    .team-page .team-grid,
    .team-page .team-grid-small {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 50px 30px;
    }

    .team-page .flip-circle {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 550px) {
    .team-page .team-grid,
    .team-page .team-grid-small {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .team-page .flip-circle {
        width: 230px;
        height: 230px;
    }
}

.team-page {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
}

html, body {
  overflow-x: hidden;
}

.page-layout {
  gap: 110px;
}