
:root{
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --body-font: 'DM Sans', sans-serif;
    --second-family: 'Plus Jakarta Sans', sans-serif;

    --text-950: #0f172a;
    --text-700: #292929;
    --green-700: #15503F;
    --green-500: #2D9C78;
    --primary: #4FB893;
    --badge-bg: #D8F3E5;

    /* container & gutters -> header & list sejajar */
    --container: 1420px;
    --gutter-mobile: 20px;
    --gutter-desktop: 24px;

    /* spacing */
    --px: 4px;
    --s-3: calc(var(--px) * 3);   /* 12 */
    --s-4: calc(var(--px) * 4);   /* 16 */
    --s-5: calc(var(--px) * 5);   /* 20 */
    --s-6: calc(var(--px) * 6);   /* 24 */
    --s-8: calc(var(--px) * 8);   /* 32 */
    --s-10: calc(var(--px) * 10); /* 40 */
    --radius-lg: 16px;
  }

  html, body{
    overflow-x: hidden;
    margin: 0; padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
  }
  *{ box-sizing: border-box; }

  /* ===== Section ===== */
  .section-team{
    width: 100%;
    max-width: 100vw;
    position: relative;
    padding: clamp(32px, 6vw, 64px) 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .section-header{
    width: 100%;
    max-width: var(--container);
    margin: 0 auto var(--s-6);
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
    text-align: left;
  }

  /* BADGE: fixed 12px */
  .section-header .badge-label{
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 12px;              /* <= updated */
    background: var(--badge-bg);
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    margin-bottom: var(--s-3);
  }

  /* TITLE: fixed 30px */
  .section-header h2{
    font-family: var(--second-family);
    font-size: 30px;              /* <= updated */
    font-weight: 700;
    margin: 12px 0 0;
    color: var(--text-700);
    line-height: 1.2;
  }

  /* ===== Team list & card ===== */
  .team-list{
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
    display: flex;
    flex-direction: row;      /* default: 1 kartu (mobile & tablet < 1024) */
    flex-wrap: wrap;
    gap: var(--s-6);
    justify-content: center;
  }

  .team-member{
    width: 30%;
    height: auto;
    display: none;               /* mode 1 kartu pakai .active */
  }

  .team-member h5{
    font-size: 36px;
  }
  .team-member.active{ display: block; }

  .image-wrapper{
    width: 100%;
    aspect-ratio: 456 / 546;
    position: relative;
    perspective: 1000px;
  }
  .flip-card{ width: 100%; height: 100%; position: relative; }
  .flip-card-inner{
    width: 100%; height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .8s ease;
  }
  .flip-card.flipped .flip-card-inner{ transform: rotateY(180deg); }

  .flip-card-front, .flip-card-back{
    position: absolute; inset: 0;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    overflow: hidden;
  }
  .flip-card-front img, .flip-card-back img{
    width: 100%; height: 100%; object-fit: cover;
  }
  .flip-card-back{ transform: rotateY(180deg); position: relative; }

  .back-content{
    position: absolute; inset: 0;
    padding: var(--s-10);
    /* display: flex;  */
    flex-direction: column;
  }
  .back-about{
    font-family: var(--second-family);
    font-weight: 600;
    font-size: clamp(18px, 2.4vw, 26px);
    line-height: 1.25;
    color: var(--text-700);
    margin-bottom: 24px;
  }
  .back-description{
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(14px, 2.4vw, 18px);
    line-height: 1.4;
    color: var(--green-700);
    margin-bottom: var(--s-6);
    flex-grow: 1;
  }
  .back-email{
    font-family: var(--font-family);
    font-weight: 400;
    font-size: clamp(14px, 2.4vw, 18px);
    color: var(--green-500);
    text-decoration: none;
    margin-top: auto;
    
  }

  .img-button{
    position: absolute;
    bottom: 0; right: 0;
    background-color: var(--primary);
    width: clamp(54px, 10vw, 64px);
    height: clamp(54px, 10vw, 64px);
    padding: 8px;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
    cursor: pointer; border: none; z-index: 2;
  }
  .flip-card-back .img-button{ left: 0; right: auto; }
  .img-button .flip-icon{
    width: clamp(10px, 2.8vw, 20px);
    height: clamp(10px, 2.8vw, 20px);
    object-fit: contain;
  }

  /* default (mobile/tablet <1024) */
  .team-member h5{
    font-family: var(--second-family);
    color: var(--text-700);
    font-size: clamp(20px, 4.5vw, 26px);
    font-weight: 600;
    margin: var(--s-4) 0 var(--s-3);
    line-height: 1.3;
  }
  .team-member > p{
    font-family: var(--second-family);
    font-size: clamp(14px, 3.5vw, 16px);
    color: var(--green-500);
    font-weight: 600;
    margin: 0;
  }

  /* ===== Mobile nav (default ON) ===== */
  .mobile-nav{
    display: flex;
    justify-content: center;
    gap: var(--s-5);
    margin-top: var(--s-6);
    width: 100%;
    max-width: var(--container);
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
  }
  .mobile-nav-button{
    width: clamp(48px, 12vw, 80px);
    height: clamp(48px, 12vw, 80px);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: #262626;
    border: 1px solid #262626;
    cursor: pointer;
    font-size: 24px;
  }
  .mobile-nav-button:hover{ color: var(--primary); border-color: var(--primary); }
  .mobile-icon{
    width: clamp(20px, 6vw, 30px);
    height: clamp(12px, 4vw, 30px);
    filter: brightness(0) saturate(100%);
  }
  .mobile-nav-button:hover .mobile-icon{
    filter: brightness(0) saturate(100%) invert(64%) sepia(15%) saturate(1236%) hue-rotate(116deg) brightness(92%) contrast(92%);
  }

  /* ===== Tablet (≥768px) ===== */
  @media (min-width: 768px){
    .section-header{ padding-left: var(--gutter-desktop); padding-right: var(--gutter-desktop); margin-bottom: var(--s-6); }
    .team-list{ padding-left: var(--gutter-desktop); padding-right: var(--gutter-desktop); gap: var(--s-8); }
    .mobile-nav{ padding-left: var(--gutter-desktop); padding-right: var(--gutter-desktop); }
  }

  /* ===== Desktop (≥1024px) -> 3 kartu ===== */
  @media (min-width: 1024px){
    /* .team-list{
      display: grid;
      grid-template-columns: repeat(3, minmax(280px, 1fr));
      gap: 24px;
    } */
    .team-member{ display: block; }   /* tampilkan semua kartu */
    .mobile-nav{ display: none; }     /* sembunyikan nav mobile */
  }

  @media (max-width: 1023px){
    /* Ukuran teks card di desktop */
     .team-member{
      width: 100%;
    }
    .team-member h5{ font-size: 26px; }   /* <= updated */
    .team-member > p{ font-size: 28px; }  /* <= updated */
    .back-description{ font-size: 11px; margin-bottom: 16px;}  /* <= updated */
  }

  /* @media (max-width: 768px){ */
    /* .section-header h2{ font-size: 26px; }  <= updated */
    /* .back-about{ font-size: 70px; }        <= updated */
    /* .back-description{ font-size: 30px; }  <= updated */
    /* .back-email{ font-size: 26px; }        <= updated */
  /* } */

  @media (max-width: 480px){
    .section-header h2{ font-size: 24px; }  /* <= updated */
    .back-about{ font-size: 30px; }        /* <= updated */
    .back-description{ font-size: 14px; }  /* <= updated */
    .back-email{ font-size: 14px; }        /* <= updated */
  }