/* หน้าเกี่ยวกับกองบริหารวิชาการ (pages/about.php)
 * ส่วน hero อยู่ใน page-hero.css · หน้าบุคลากรแบบใหม่ปรับต่อใน about-staff.css (โหลดทีหลังไฟล์นี้) */

/* ── แท็บ ─────────────────────────────────────────────────── */
#aboutTabs .nav-link {
    background: rgba(0, 51, 102, 0.05);
    border: 2px solid transparent;
    color: #003366;
    font-weight: 600;
    padding: 12px 28px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
#aboutTabs .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}
#aboutTabs .nav-link:hover::before {
    left: 100%;
}
#aboutTabs .nav-link:hover {
    background: rgba(0, 51, 102, 0.1);
    border-color: rgba(0, 51, 102, 0.2);
    transform: translateY(-2px);
}
#aboutTabs .nav-link.active {
    background: linear-gradient(135deg, #003366 0%, #001a33 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3);
}
#aboutTabs .nav-link.active i {
    color: #ffd700 !important;
}
#aboutTabs .nav-link i {
    transition: transform 0.3s ease;
}
#aboutTabs .nav-link:hover i,
#aboutTabs .nav-link.active i {
    transform: scale(1.2);
}

/* ── แท็บโครงสร้าง: กล่องผังและการ์ดแผนก ─────────────────── */
.org-box { min-width: 320px; }
.org-connector { width: 0; height: 30px; }
.org-connector.tall { height: 40px; }

.exec-card {
    transition: all 0.3s ease;
}
.exec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.dept-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent !important;
}
.dept-card:hover {
    transform: translateY(-5px);
    border-bottom: 3px solid var(--npu-blue) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* ── Modal (มีผลกับ modal ทุกตัวในหน้านี้: หน้าที่แผนก, รูปบุคลากร, QR ประเมิน) ── */
.modal-content {
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}
.modal.fade .modal-dialog {
    transform: scale(0.8) translateY(-50px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}
.modal-header {
    background: linear-gradient(135deg, #003366 0%, #001a33 50%, #0a1628 100%) !important;
    border-bottom: none;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}
.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    pointer-events: none;
}
.modal-header .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}
.modal-header .modal-title i {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #003366;
    font-size: 1.1rem;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3);
    animation: modalIconPulse 2s ease-in-out infinite;
}
@keyframes modalIconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 5px 20px rgba(255, 215, 0, 0.3); }
    50% { transform: scale(1.08); box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5); }
}
.modal-header .btn-close-white {
    position: relative;
    z-index: 1;
    opacity: 0.8;
    transition: all 0.3s ease;
}
.modal-header .btn-close-white:hover {
    opacity: 1;
    transform: rotate(90deg) scale(1.1);
}
.modal-body {
    padding: 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
}
.modal-body h6.fw-bold {
    color: #003366;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #ffd700, #ff8c00, transparent) 1;
    display: inline-block;
    font-size: 1.1rem;
}
.modal-body ul.list-unstyled li {
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}
.modal-body ul.list-unstyled li:hover {
    transform: translateX(8px);
    box-shadow: 0 6px 20px rgba(0, 51, 102, 0.12);
    border-left: 4px solid #ffd700;
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, white 100%);
}
.modal-body ul.list-unstyled li i.fa-check-circle {
    color: #10b981;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}
.modal-body ul.list-unstyled li:hover i.fa-check-circle {
    transform: scale(1.2);
    color: #ffd700;
}

/* ── แท็บบุคลากร: การ์ดผู้บริหาร ─────────────────────────── */
.personnel-card-new {
    cursor: pointer;
    transition: all 0.3s ease;
}
.personnel-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}
.personnel-photo-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
    position: relative;
}
.personnel-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.personnel-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}
.bg-gradient-primary {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}
.bg-gradient-blue {
    background: linear-gradient(135deg, var(--npu-blue) 0%, #1a4a8a 100%);
}

/* ── แท็บบุคลากร: การ์ดเจ้าหน้าที่ ────────────────────────── */
.staff-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent !important;
}
.staff-card:hover {
    transform: translateX(5px);
    border-left: 4px solid var(--npu-blue) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}
.staff-photo-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e9ecef;
    background: #f8f9fa;
    flex-shrink: 0;
    position: relative;
}
.staff-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.staff-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* ไอคอนแว่นขยายบนรูปเมื่อชี้ (คลิกเพื่อดูรูปใหญ่) */
.personnel-card-new .personnel-photo-wrapper::after,
.staff-card .staff-photo-wrapper::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 1.5rem;
    background: rgba(0, 51, 102, 0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}
.personnel-card-new:hover .personnel-photo-wrapper::after,
.staff-card:hover .staff-photo-wrapper::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* ── แท็บบุคลากร: modal รูปใหญ่ + ปุ่มประเมิน ───────────────── */
#photoLightbox .modal-content {
    background: transparent !important;
    box-shadow: none !important;
}
#photoLightbox .modal-body {
    background: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}
#photoLightbox .btn-close {
    z-index: 10;
    opacity: 0.8;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}
#lightboxPhoto {
    max-height: 80vh;
    width: auto;
    display: block;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
}
.eval-qr-btn {
    font-size: 0.8rem;
    padding: 2px 12px;
}

/* ── แท็บพันธกิจ ───────────────────────────────────────────── */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}
.about-indent { text-indent: 40px; }
