/* ========================================
   MEMBERS PAGE
   members.css
======================================== */
/* ========================================
   HERO
======================================== */

.members-hero {

  position: relative;

  min-height: 78vh;

  display: flex;
  align-items: center;

  overflow: hidden;

  padding-top: 180px;
  padding-bottom: 140px;

  /* พื้นหลัง */
  background:
    linear-gradient(
      rgba(25, 0, 45, 0.78),
      rgba(55, 0, 90, 0.82)
    ),

    url("../assets/image/bg-members.jpeg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

}

/* overlay ม่วง */
.members-hero::before {

  content: "";

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at top left,
      rgba(182,109,255,0.22),
      transparent 38%
    ),

    radial-gradient(
      circle at bottom center,
      rgba(255,255,255,0.12),
      transparent 45%
    );

  pointer-events: none;

}

/* เบลอล่าง */
.members-hero::after {

  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -120px;

  height: 260px;

  background:
    radial-gradient(
      ellipse at center,
      rgba(255,255,255,0.6),
      transparent 72%
    );

  filter: blur(40px);

  pointer-events: none;

}

/* container */
.members-hero .container {

  position: relative;
  z-index: 5;

  display: flex;
  justify-content: flex-end;

}

/* กล่องข้อความ */
.members-hero-content {

  max-width: 720px;

}

/* title */
.members-title {

  font-size: clamp(2.8rem, 6vw, 5.2rem);

  font-weight: var(--fw-black);

  line-height: 1.05;

  margin-bottom: 20px;

  color: white;

}

/* คำว่า คะวะโต */
.members-title span {

  color: #b56dff;

}

/* subtitle */
.members-subtitle {

  font-size: 1.1rem;

  font-weight: var(--fw-light);

  color: rgba(255,255,255,0.82);

  line-height: 1.8;

}

/* section number */
.members-hero .section-number {

  color: #f0c04f;

}


/* ========================================
   SHOWCASE SECTION
======================================== */
.members-showcase {
  padding: 80px 0 120px;
  background: var(--off-white);
  overflow: hidden;
}

/* ========================================
   SLIDER WRAPPER
======================================== */
.showcase-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  padding: 0 80px;
}

/* ========================================
   SLIDER
======================================== */
.showcase-slider {
  position: relative;
  width: 100%;
  height: 540px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
}

/* ========================================
   MEMBER CARD
======================================== */
.member-card {
  position: absolute;
  width: 180px;
  height: 380px;
  border-radius: 28px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity   0.7s ease,
    width     0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    height    0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.7s ease;
}

.member-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.member-card:hover img {
  transform: scale(1.04);
}

/* ========================================
   CARD POSITIONS
======================================== */

/* กลาง — ใหญ่สุด */
.member-card.pos-center {
  width: 320px;
  height: 500px;
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
  transform: translateX(0) scale(1) rotateY(0deg);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(212, 168, 67, 0.4);
}

/* ซ้าย 1 */
.member-card.pos-left1 {
  opacity: 0.88;
  pointer-events: auto;
  z-index: 8;
  transform: translateX(-280px) scale(0.82) rotateY(15deg);
  box-shadow: var(--shadow-md);
}

/* ซ้าย 2 */
.member-card.pos-left2 {
  opacity: 0.45;
  pointer-events: auto;
  z-index: 6;
  transform: translateX(-490px) scale(0.64) rotateY(22deg);
  box-shadow: var(--shadow-sm);
}

/* ขวา 1 */
.member-card.pos-right1 {
  opacity: 0.88;
  pointer-events: auto;
  z-index: 8;
  transform: translateX(280px) scale(0.82) rotateY(-15deg);
  box-shadow: var(--shadow-md);
}

/* ขวา 2 */
.member-card.pos-right2 {
  opacity: 0.45;
  pointer-events: auto;
  z-index: 6;
  transform: translateX(490px) scale(0.64) rotateY(-22deg);
  box-shadow: var(--shadow-sm);
}

/* ซ่อน */
.member-card.pos-hidden {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transform: translateX(0) scale(0.4);
}

/* ========================================
   MEMBER OVERLAY (ชื่อบนการ์ด)
======================================== */
.member-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  color: var(--white);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.member-card.pos-center .member-overlay {
  opacity: 1;
}

.member-overlay h2 {
  font-size: 1.3rem;
  font-weight: var(--fw-bold);
  margin-bottom: 4px;
}

.member-overlay p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  font-weight: var(--fw-light);
}

/* ========================================
   SLIDER BUTTONS
======================================== */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--purple-main);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  z-index: 20;
  cursor: pointer;
  border: 1.5px solid rgba(107, 33, 168, 0.12);
}

.slider-btn:hover {
  background: var(--purple-main);
  color: var(--white);
  transform: translateY(-50%) scale(1.08);
  box-shadow: var(--shadow-lg);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

/* ========================================
   DOT INDICATORS
======================================== */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 56px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(107, 33, 168, 0.2);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.slider-dot.active {
  width: 24px;
  background: var(--purple-mid);
}

/* ========================================
   DETAIL PANEL
======================================== */
.member-detail {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  padding: 48px 56px;
  background: var(--white);
  border: 1px solid rgba(107, 33, 168, 0.1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

/* รูปใหญ่ */
.detail-image {
  position: relative;
}

.detail-image img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  transition: var(--transition);
}

.detail-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(212, 168, 67, 0.3);
  pointer-events: none;
}

/* ข้อมูลขวา */
.detail-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: var(--fw-black);
  color: var(--purple-main);
  margin-bottom: 6px;
  transition: var(--transition);
}

.detail-content h4 {
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
  transition: var(--transition);
}

/* Social Icons */
.detail-social {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(107, 33, 168, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-mid);
  font-size: 0.9rem;
  transition: var(--transition);
}

.detail-social a:hover {
  background: var(--purple-mid);
  border-color: var(--purple-mid);
  color: var(--white);
  transform: translateY(-2px);
}

/* Info Grid */
.member-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 24px;
}

.info-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.info-label {
  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
  color: var(--purple-mid);
  min-width: 90px;
  letter-spacing: 0.05em;
}

.info-value {
  font-size: 0.95rem;
  font-weight: var(--fw-medium);
  color: var(--black);
  transition: var(--transition);
}

/* Quote */
.detail-quote {
  font-size: 0.95rem;
  font-weight: var(--fw-light);
  color: var(--gray);
  line-height: 1.9;
  border-left: 3px solid var(--gold);
  padding-left: 20px;
  margin-top: 8px;
  font-style: italic;
  transition: var(--transition);
}

/* ========================================
   DETAIL FADE ANIMATION
======================================== */
.member-detail.updating .detail-image img,
.member-detail.updating .detail-content h2,
.member-detail.updating .detail-content h4,
.member-detail.updating .info-value,
.member-detail.updating .detail-quote {
  opacity: 0;
  transform: translateY(8px);
}

/* ========================================
   BACK HOME
======================================== */
.back-home {
  padding: 100px 0;
  background: var(--white);
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1100px) {
  .member-card.pos-center {
    width: 260px;
    height: 420px;
  }
  .member-card.pos-left1 {
    transform: translateX(-220px) scale(0.78) rotateY(12deg);
  }
  .member-card.pos-right1 {
    transform: translateX(220px) scale(0.78) rotateY(-12deg);
  }
  .member-card.pos-left2 {
    transform: translateX(-390px) scale(0.58) rotateY(18deg);
  }
  .member-card.pos-right2 {
    transform: translateX(390px) scale(0.58) rotateY(-18deg);
  }
  .member-detail {
    grid-template-columns: 240px 1fr;
    gap: 40px;
    padding: 40px;
  }
}

@media (max-width: 900px) {
  .member-detail {
    grid-template-columns: 1fr;
  }
  .detail-image img {
    height: 320px;
    width: 240px;
    margin: 0 auto;
  }
  .detail-content {
    text-align: center;
  }
  .detail-social {
    justify-content: center;
  }
  .info-row {
    justify-content: center;
  }
  .detail-quote {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .showcase-slider {
    height: 400px;
  }
  .showcase-wrapper {
    padding: 0 56px;
  }
  .member-card.pos-center {
    width: 200px;
    height: 340px;
  }
  .member-card.pos-left1 {
    transform: translateX(-160px) scale(0.72) rotateY(10deg);
  }
  .member-card.pos-right1 {
    transform: translateX(160px) scale(0.72) rotateY(-10deg);
  }
  .member-card.pos-left2,
  .member-card.pos-right2 {
    opacity: 0;
    pointer-events: none;
  }
  .member-detail {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .members-title {
    font-size: 2.2rem;
  }
  .showcase-slider {
    height: 340px;
  }
  .member-card.pos-center {
    width: 170px;
    height: 290px;
  }
  .member-card.pos-left1 {
    transform: translateX(-130px) scale(0.65);
  }
  .member-card.pos-right1 {
    transform: translateX(130px) scale(0.65);
  }
}
/* ========================================
   MEMBER DETAIL MOBILE FIX
======================================== */

@media (max-width: 768px) {

  /* การ์ด */
  .member-detail-card,
  .member-profile-card,
  .member-info-card {
    padding: 32px 22px !important;
  }

  /* =========================
     ชื่อเล่น + ชื่อจริง
  ========================= */

  .member-name,
  .profile-name {

    display: flex;
    flex-direction: column;

    align-items: center;

    text-align: center;

    line-height: 1.25;

    margin-bottom: 10px;
  }

  /* ชื่อเล่น */
  .member-name {
    font-size: 2.3rem !important;
    font-weight: 800;
  }

  /* ชื่อจริง */
  .member-name span,
  .profile-name span {

    display: block;

    margin-top: 8px;

    font-size: 1.35rem !important;
    font-weight: 700;

    line-height: 1.5;

    color: var(--purple-main);
  }

  /* =========================
     ตำแหน่ง
  ========================= */

  .member-role,
  .profile-role {

    text-align: center;

    font-size: 1.05rem;

    margin-top: 14px;
    margin-bottom: 36px;

    color: var(--gold);
  }

  /* =========================
     ตารางข้อมูล
  ========================= */

  .member-info,
  .profile-info {

    width: 100%;

    display: flex;
    flex-direction: column;

    gap: 22px;

    margin-top: 24px;
  }

  /* แต่ละแถว */
  .member-info-item,
  .profile-info-item {

    display: grid !important;

    grid-template-columns: 110px 1fr;

    align-items: start;

    gap: 14px;

    width: 100%;
  }

  /* หัวข้อ */
  .member-info-item span,
  .profile-info-item span {

    font-size: 0.95rem;

    font-weight: 700;

    color: var(--purple-mid);

    text-align: left;

    white-space: nowrap;
  }

  /* ข้อมูล */
  .member-info-item p,
  .profile-info-item p {

    margin: 0;

    font-size: 1rem;

    line-height: 1.7;

    color: #222;

    text-align: left;
  }

}
/* ========================================
   GOLD DIVIDER
======================================== */
.gold-divider {
  width: 90%;
  height: 2px;
  border-radius: 999px;
  margin: 0 auto 28px auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #d4a843 20%,
    #f3d37a 50%,
    #d4a843 80%,
    transparent 100%
  );
}