/* ============================================================
   Vidoco Nhân Sự — Frontend Styles
   ============================================================ */

/* ---- Filter bar ---- */
.vn-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.vn-filter-select {
    padding: 9px 36px 9px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    min-width: 200px;
    transition: border-color .15s, box-shadow .15s;
    height: auto;
    margin-bottom: 0;
    width: auto;
}

.vn-filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* ---- Grid nhân viên ---- */
.vn-nhanvien-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    transition: opacity .2s;
}

.vn-nhanvien-grid.vn-loading {
    opacity: .4;
    pointer-events: none;
}

@media (max-width: 900px) {
    .vn-nhanvien-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .vn-nhanvien-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Card nhân viên — Portrait layout (giống ảnh mẫu)
   ============================================================ */
.vn-nhanvien-card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}


/* ---- Ảnh portrait full-width ---- */
.vn-card-photo {
    width: 100%;
    background: #e5e7eb;
    line-height: 0;
}

.vn-card-photo img {
    width: 100%;
    height: auto;
    display: block;
}

/* Placeholder khi không có ảnh */
.vn-card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    letter-spacing: -2px;
}

/* ---- Info bar phía dưới ảnh ---- */
.vn-card-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fff;
    gap: 10px;
}

.vn-card-info-text {
    flex: 1;
    min-width: 0;
}

.vn-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vn-card-phongban {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Social toggle — nút share bung popup
   ============================================================ */
.vn-card-social-wrap {
    position: relative;
    flex-shrink: 0;
}

/* Nút trigger share */
.vn-social-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: background .15s, transform .15s;
    outline: none;
    flex-shrink: 0;
    margin: 0;
}

.vn-social-toggle:hover {
    background: #1d4ed8;
    transform: scale(1.08);
}

.vn-social-toggle.active {
    background: #1d4ed8;
}

/* Popup social links — xuất hiện phía trên nút khi .active */
.vn-social-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    right: -6px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #fff;
    border-radius: 10px;
    padding: 10px 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .16);
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(.95);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 99;
    min-width: 44px;
    align-items: center;
}

.vn-social-popup.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Mũi tên popup */
.vn-social-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 40%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    transform: rotate(45deg);
}

/* Từng link social trong popup */
.vn-sp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none !important;
    color: #fff !important;
    font-size: 14px;
    transition: transform .15s, opacity .15s;
}

.vn-sp-link:hover {
    transform: scale(1.12);
    opacity: .9;
}

.vn-sp-fb {
    background: #1877f2;
}

.vn-sp-zalo {
    background: #0068ff;
}

.vn-sp-mail {
    background: #ea4335;
}

.vn-sp-phone {
    background: #16a34a;
}

.vn-sp-zalo-text {
    font-size: 15px;
    font-weight: 900;
    font-family: sans-serif;
    line-height: 1;
}

/* ---- Pagination ---- */
.vn-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.vn-pagination a,
.vn-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    transition: all .15s;
}

.vn-pagination a:hover {
    background: #2563eb;
    color: #fff !important;
    border-color: #2563eb;
}

.vn-pagination .current {
    background: #2563eb;
    color: #fff !important;
    border-color: #2563eb;
}

/* ---- Loader spinner ---- */
.vn-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

.vn-spinner.active {
    display: block;
}

.vn-spinner::after {
    content: '';
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: vn-spin .7s linear infinite;
}

@keyframes vn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Slider (Flatsome Flickity) ---- */
.row-slider .vn-nhanvien-card {
    margin: 4px 0;
}

/* ---- Wrapper section ---- */
.vn-nhanvien-section {
    padding: 0;
}