/* --- Wrapper & Controls --- */
.fm-directory-wrapper { max-width: 1200px; margin: 0 auto; }
.fm-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; background: #f5f5f5; padding: 15px; border-radius: 8px; }
.fm-filters { flex: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.fm-filters input, .fm-filters select { padding: 8px; border: 1px solid #ccc; border-radius: 4px; }
.fm-view-toggle button { padding: 8px 15px; cursor: pointer; border: 1px solid #0073aa; background: #fff; color: #0073aa; border-radius: 4px; }
.fm-view-toggle button.active { background: #0073aa; color: #fff; }

/* --- Grid View (3 Col Desktop, 1 Col Mobile) --- */
.view-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 768px) {
    .view-grid { grid-template-columns: repeat(3, 1fr); }
}

.fm-card { border: 1px solid #ddd; padding: 20px; border-radius: 8px; text-align: center; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); transition: transform 0.2s; }
.fm-card:hover { transform: translateY(-3px); }
.fm-card img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.fm-card h3 { margin: 10px 0 5px; font-size: 1.2em; }
.fm-meta { font-size: 0.85em; color: #666; margin-bottom: 5px; }
.fm-job { color: #0073aa; font-weight: bold; margin-bottom: 15px; }
.fm-details-btn { background: #0073aa; color: #fff; border: none; padding: 8px 16px; cursor: pointer; border-radius: 4px; }

/* --- List View --- */
.fm-list-table { width: 100%; border-collapse: collapse; }
.fm-list-table th, .fm-list-table td { text-align: left; padding: 10px; border-bottom: 1px solid #eee; }

/* --- Tree View (Simple CSS Hierarchy) --- */
.fm-tree-wrapper ul { padding-left: 20px; list-style: none; border-left: 2px solid #ccc; }
.fm-tree-wrapper li { margin: 10px 0; position: relative; }
.fm-tree-wrapper li::before { content: ''; position: absolute; top: 15px; left: -20px; width: 20px; height: 2px; background: #ccc; }
.tree-node { display: inline-block; background: #fff; border: 1px solid #ccc; padding: 5px 10px; border-radius: 4px; }
.tree-name { font-weight: bold; }
.tree-job { font-size: 0.8em; color: #666; }

/* --- Modal --- */
.fm-modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5); }
.fm-modal-content { background-color: #fff; margin: 10% auto; padding: 20px; border: 1px solid #888; width: 90%; max-width: 500px; border-radius: 8px; position: relative; }
.close-modal { float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.modal-img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 15px; }