/* ===== Modern Carousel Container ===== */
.modern-carousel {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 
    0 32px 64px -12px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  background: #ffffff;
}

/* ===== Image Wrapper - รักษาขนาดรูปภาพเต็ม ===== */
.carousel-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
  padding: 30px;
  min-height: 450px;
}

.modern-carousel .carousel-item img {
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.6s ease;
}

.modern-carousel:hover .carousel-item img {
  transform: scale(1.02);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.15),
    0 10px 25px rgba(0, 0, 0, 0.1);
}

/* ===== Modern Inner Container ===== */
.modern-inner {
  border-radius: 24px;
  overflow: hidden;
}

/* ===== Smooth Slide Transition ===== */
.modern-carousel .carousel-item {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Modern Indicators ===== */
.modern-indicators {
  bottom: 24px;
  margin-bottom: 0;
  z-index: 15;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  margin-left: 0;
  margin-right: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.modern-indicators li {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a7f3d0;
  border: none;
  margin: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  opacity: 1;
}

.modern-indicators li.active {
  width: 32px;
  border-radius: 20px;
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.4);
}

.modern-indicators li:hover:not(.active) {
  background: #6ee7b7;
  transform: scale(1.3);
}

/* ===== Modern Control Arrows ===== */
.modern-control {
  width: 70px;
  opacity: 0;
  transition: all 0.4s ease;
}

.modern-carousel:hover .modern-control {
  opacity: 1;
}

.modern-control-prev {
  left: 20px;
}

.modern-control-next {
  right: 20px;
}

.control-icon-wrapper {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modern-control:hover .control-icon-wrapper {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: scale(1.12);
  box-shadow: 0 12px 35px rgba(4, 120, 87, 0.35);
}

.modern-control .carousel-control-prev-icon,
.modern-control .carousel-control-next-icon {
  width: 22px;
  height: 22px;
  background-size: 100%;
  filter: brightness(0) saturate(100%) invert(30%) sepia(10%) saturate(500%) hue-rotate(180deg);
  transition: filter 0.35s ease;
}

.modern-control:hover .carousel-control-prev-icon,
.modern-control:hover .carousel-control-next-icon {
  filter: brightness(0) invert(1);
}

/* ===== Decorative Elements ===== */
.modern-carousel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #047857, #059669, #10b981, #047857);
  background-size: 300% 100%;
  animation: gradientMove 4s ease infinite;
  z-index: 20;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ===== Bottom Accent Line ===== */
.modern-carousel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #047857 20%, 
    #059669 50%, 
    #047857 80%, 
    transparent 100%);
  z-index: 20;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
  .modern-carousel {
    border-radius: 20px;
  }
  
  .carousel-image-wrapper {
    padding: 25px;
    min-height: 380px;
  }
  
  .modern-carousel .carousel-item img {
    max-height: 60vh;
    border-radius: 12px;
  }
}

@media (max-width: 768px) {
  .modern-carousel {
    border-radius: 16px;
  }
  
  .carousel-image-wrapper {
    padding: 20px;
    min-height: 300px;
  }
  
  .modern-carousel .carousel-item img {
    max-height: 50vh;
    border-radius: 10px;
  }
  
  .control-icon-wrapper {
    width: 46px;
    height: 46px;
  }
  
  .modern-control .carousel-control-prev-icon,
  .modern-control .carousel-control-next-icon {
    width: 18px;
    height: 18px;
  }
  
  .modern-indicators {
    padding: 8px 16px;
    bottom: 18px;
  }
  
  .modern-indicators li {
    width: 8px;
    height: 8px;
  }
  
  .modern-indicators li.active {
    width: 26px;
  }
  
  .modern-control {
    opacity: 1;
    width: 55px;
  }
  
  .modern-control-prev {
    left: 10px;
  }
  
  .modern-control-next {
    right: 10px;
  }
}

@media (max-width: 576px) {
  .modern-carousel {
    border-radius: 12px;
  }
  
  .carousel-image-wrapper {
    padding: 15px;
    min-height: 240px;
  }
  
  .modern-carousel .carousel-item img {
    max-height: 42vh;
    border-radius: 8px;
  }
  
  .control-icon-wrapper {
    width: 40px;
    height: 40px;
  }
  
  .modern-control .carousel-control-prev-icon,
  .modern-control .carousel-control-next-icon {
    width: 14px;
    height: 14px;
  }
  
  .modern-indicators {
    padding: 6px 12px;
    bottom: 12px;
    gap: 8px;
  }
  
  .modern-indicators li {
    width: 6px;
    height: 6px;
  }
  
  .modern-indicators li.active {
    width: 20px;
  }
  
  .modern-control-prev {
    left: 6px;
  }
  
  .modern-control-next {
    right: 6px;
  }
}

/* ===== Focus States for Accessibility ===== */
.modern-control:focus .control-icon-wrapper {
  outline: 3px solid rgba(4, 120, 87, 0.5);
  outline-offset: 3px;
}

.modern-indicators li:focus {
  outline: 2px solid rgba(4, 120, 87, 0.5);
  outline-offset: 2px;
}

/* ===== Optional: Dark Theme Variant ===== */
@media (prefers-color-scheme: dark) {
  .carousel-image-wrapper {
    background: linear-gradient(180deg, #064e3b 0%, #022c22 100%);
  }
  
  .modern-carousel {
    background: #022c22;
    box-shadow: 
      0 32px 64px -12px rgba(0, 0, 0, 0.5),
      0 0 0 1px rgba(255, 255, 255, 0.05);
  }
  
  .modern-carousel .carousel-item img {
    box-shadow: 
      0 20px 50px rgba(0, 0, 0, 0.4),
      0 8px 20px rgba(0, 0, 0, 0.3);
  }
  
  .modern-indicators {
    background: rgba(6, 78, 59, 0.9);
  }
  
  .modern-indicators li {
    background: #065f46;
  }
  
  .modern-indicators li:hover:not(.active) {
    background: #059669;
  }
  
  .control-icon-wrapper {
    background: rgba(6, 78, 59, 0.95);
  }
  
  .modern-control .carousel-control-prev-icon,
  .modern-control .carousel-control-next-icon {
    filter: brightness(0) invert(0.7);
  }
}





















/* --------------------------------------
     Staff Directory Styles (Modern List Layout)
  ----------------------------------------- */
:root {
    --brand-dark: #1e293b;       /* สีน้ำเงินเข้ม/เทาเข้ม ดูพรีเมียม */
    --brand-accent: #0284c7;     /* สีฟ้าสว่างสำหรับลิงก์และจุดสนใจ */
    --text-body: #475569;        /* สีเนื้อหาหลัก */
    --bg-light: #f8fafc;         /* สีพื้นหลังการ์ดตอนปกติ */
    --bg-hover: #ffffff;         /* สีพื้นหลังการ์ดตอน Hover */
    --border-soft: #e2e8f0;      /* เส้นขอบนุ่มๆ */
  }

  .staff-list-container {
    width: 100%;
    max-width: 1100px; /* คงความกว้างสูงสุดไว้เท่าเดิม แต่จะยืดหยุ่นตามจอ */
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
    font-family: 'Sarabun', 'Helvetica Neue', Arial, sans-serif;
  }

  /* ตัวการ์ดแถวรายชื่อ */
  .staff-row-card {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* เอฟเฟกต์ยกตัวและการแสดงเงาเมื่อเอาเมาส์มาวาง */
  .staff-row-card:hover {
    background-color: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
  }

  /* ควบคุมขนาดรูปภาพให้สมส่วน ไม่บิดเบี้ยว */
  .staff-image-wrapper {
    width: 100px;
    height: 140px;
    flex-shrink: 0; /* ป้องกันรูปโดนบีบ */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    background-color: #cbd5e1;
  }

  .staff-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ตัดส่วนรูปให้พอดีกรอบอัตโนมัติ */
    object-position: center;
  }

  /* ส่วนข้อมูลรายละเอียด */
  .staff-info-content {
    margin-left: 1.5rem;
    flex-grow: 1;
  }

  .staff-fullname {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
  }

  .staff-role {
    font-size: 1rem;
    color: var(--brand-accent);
    font-weight: 500;
    margin: 0 0 0.75rem 0;
  }

  /* ส่วนของคอนแทกต์ */
  .staff-meta-contact {
    display: flex;
    flex-wrap: wrap; /* ปล่อยให้อีเมลตกลงมาได้ถ้าจอมือถือแคบเกินไป */
    align-items: center;
    font-size: 0.95rem;
    color: var(--text-body);
    gap: 0.5rem;
  }

  .meta-divider {
    color: #cbd5e1;
    margin: 0 0.25rem;
  }

  .contact-link {
    color: var(--text-body);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .contact-link:hover {
    color: var(--brand-accent);
    text-decoration: underline;
  }

  /* --------------------------------------
     Responsive Design (สำหรับหน้าจอมือถือ)
  ----------------------------------------- */
  @media (max-width: 640px) {
    .staff-row-card {
      flex-direction: column; /* เปลี่ยนจากแนวนอนเป็นแนวตั้งบนมือถือ */
      text-align: center;
      padding: 1.5rem 1rem;
    }

    .staff-info-content {
      margin-left: 0;
      margin-top: 1rem;
      width: 100%;
    }

    .staff-meta-contact {
      flex-direction: column; /* จัดคอนแทกต์เรียงลงมาเป็นแนวตั้ง */
      gap: 0.25rem;
    }

    .meta-divider {
      display: none; /* ซ่อนเส้นคั่นแนวตั้งบนมือถือ */
    }
  }

