/* Staff Grid Module - Base Styles */

/* Filters */
.staff-grid-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.staff-grid-filters .staff-grid-filter {
    min-width: 0;
}

.staff-grid-filters label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--fm-normal-font-color, #333);
}

.staff-grid-filters select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(25, 31, 51, 0.16);
    background-color: var(--fm-white-color, #fff);
    color: var(--fm-dark-color, #1a202c);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 46px;
}

.staff-grid-filters select:focus {
    outline: none;
    border-color: var(--fm-accent-color, rgba(25, 31, 51, 0.35));
    box-shadow: 0 0 0 3px rgba(0, 87, 255, 0.12);
}

@media (max-width: 1024px) {
    .staff-grid-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .staff-grid-filters {
        grid-template-columns: 1fr;
    }
}

/* Grid Layout */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Staff Card - Base */
.staff-card {
    position: relative;
    overflow: hidden;
    background: var(--fm-staff-card-background, transparent);
    border-radius: var(--fm-staff-card-border-radius, 8px);
    border: var(--fm-staff-card-border-width, 1px) solid var(--fm-staff-card-border-color, transparent);
}

/* Staff Card Image */
.staff-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: var(--fm-staff-image-border-radius, var(--fm-staff-card-border-radius, 8px));
    transition: border-radius 0.25s ease;
}

.staff-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--fm-staff-image-border-radius, inherit);
    transition: border-radius 0.25s ease;
}

.staff-card-image-placeholder {
    width: 100%;
    height: 100%;
    background: var(--fm-muted-color, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-card-image-placeholder i {
    font-size: 48px;
    color: var(--fm-light-color, #ccc);
}

/* Staff Card Content */
.staff-card-content {
    padding: 20px;
}

.staff-card-position {
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--fm-accent-color, #666);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.staff-card-name {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.3;
    color: var(--fm-dark-color, #1a202c);
}

.staff-card-button {
    margin-top: 8px;
}

/* Preset One - Clean */
.staff-card--preset-one {
    box-shadow: none;
    border: var(--fm-staff-card-border-width, 1px) solid var(--fm-staff-card-border-color, rgba(0, 0, 0, 0.08));
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, border-radius 0.25s ease;
}

.staff-card--preset-one:hover,
.staff-card--preset-one:focus-within {
    transform: translateY(-2px);
    border-color: var(--fm-staff-card-border-hover, var(--fm-dark-color));
    background: var(--fm-staff-card-background-hover, var(--fm-staff-card-background, transparent));
}

.staff-card--preset-one:hover .staff-card-image,
.staff-card--preset-one:focus-within .staff-card-image {
    border-radius: var(--fm-staff-image-border-radius, 8px) var(--fm-staff-image-border-radius, 8px) 0 0;
}

.staff-card--preset-one:hover .staff-card-image img,
.staff-card--preset-one:focus-within .staff-card-image img {
    border-radius: var(--fm-staff-image-border-radius, 8px) var(--fm-staff-image-border-radius, 8px) 0 0;
}

.staff-card--preset-one:hover .staff-card-name,
.staff-card--preset-one:focus-within .staff-card-name {
    color: var(--fm-staff-name-hover-color, var(--fm-accent-color));
}

/* Preset Two - Shadow */
.staff-card--preset-two {
    padding: 24px;
    border-radius: var(--fm-staff-card-border-radius, 0px);
    background-color: var(--fm-staff-card-background, transparent);
    border: var(--fm-staff-card-border-width, 1px) solid var(--fm-staff-card-border-color, transparent);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.staff-card--preset-two .staff-card-image {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: var(--fm-staff-image-border-radius, 8px);
    margin-bottom: 16px;
}

.staff-card--preset-two:hover,
.staff-card--preset-two:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 35, 95, 0.12);
    border-color: var(--fm-staff-card-border-hover, var(--fm-dark-color));
    background-color: var(--fm-staff-card-background-hover, var(--fm-light-color, rgba(25, 31, 51, 0.06)));
}

.staff-card--preset-two:hover .staff-card-name,
.staff-card--preset-two:focus-within .staff-card-name {
    color: var(--fm-staff-name-hover-color, var(--fm-accent-color));
}

/* Preset Three - Overlay */
.staff-card--preset-three {
    background: transparent;
    border: none;
    transition: border-color 0.25s ease;
}

.staff-card--preset-three .staff-card-image {
    aspect-ratio: 3 / 4;
    border-radius: var(--fm-staff-image-border-radius, 8px);
}

.staff-card--preset-three .staff-card-image img {
    transition: transform 0.45s cubic-bezier(.15, .85, .45, 1),
                filter 0.45s cubic-bezier(.15, .85, .45, 1);
}

.staff-card--preset-three:hover .staff-card-image img,
.staff-card--preset-three:focus-within .staff-card-image img {
    transform: scale(1.05);
    filter: brightness(1.07);
}

.staff-card--preset-three .staff-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: #fff;
    border-radius: 0 0 8px 8px;
}

.staff-card--preset-three .staff-card-position {
    color: rgba(255, 255, 255, 0.8);
}

.staff-card--preset-three .staff-card-name {
    color: #fff;
    margin-bottom: 8px;
}

/* Preset Four - Image Zoom (like Event Grid Preset 3) */
.staff-card--preset-four {
    display: flex;
    flex-direction: column;
    background: var(--fm-staff-card-background, transparent);
    border: var(--fm-staff-card-border-width, 1px) solid var(--fm-staff-card-border-color, transparent);
    border-radius: var(--fm-staff-card-border-radius, 8px);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.staff-card--preset-four .staff-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: var(--fm-staff-image-border-radius, 8px);
}

.staff-card--preset-four .staff-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.staff-card--preset-four:hover .staff-card-image img,
.staff-card--preset-four:focus-within .staff-card-image img {
    transform: scale3d(1.05, 1.05, 1.05);
}

.staff-card--preset-four .staff-card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 0 0;
}

.staff-card--preset-four:hover,
.staff-card--preset-four:focus-within {
    background-color: var(--fm-staff-card-background-hover, transparent);
    border-color: var(--fm-staff-card-border-hover, transparent);
}

.staff-card--preset-four:hover .staff-card-name,
.staff-card--preset-four:focus-within .staff-card-name {
    color: var(--fm-staff-name-hover-color, var(--fm-accent-color));
}

/* Modal Styles */
.staff-modal.uk-modal-dialog {
    padding: 30px;
    max-width: 600px;
    border-radius: 12px;
}

.staff-modal .uk-modal-close-default {
    top: 15px;
    right: 15px;
}

.staff-modal-name {
    margin: 0 0 4px;
    font-size: 28px;
    line-height: 1.2;
    color: var(--fm-dark-color, #1a202c);
}

.staff-modal-position {
    margin: 0 0 20px;
    font-size: 12px;
    color: var(--fm-accent-color, #666);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.staff-modal-bio {
    margin-bottom: 20px;
    line-height: 1.7;
}

.staff-modal-bio p:last-child {
    margin-bottom: 0;
}

.staff-modal-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.staff-modal-contact a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.staff-modal-contact .staff-email-btn {
    background: var(--fm-accent-color, #0073aa);
    color: #fff;
}

.staff-modal-contact .staff-email-btn:hover {
    opacity: 0.9;
}

.staff-modal-contact .staff-social-btn {
    background: var(--fm-light-color, #f5f5f5);
    color: var(--fm-dark-color, #333);
}

.staff-modal-contact .staff-social-btn:hover {
    background: var(--fm-muted-color, #e5e5e5);
}

.staff-modal-contact .staff-social-btn i {
    font-size: 16px;
}

/* Pagination */
.staff-pagination-container {
    margin-top: 30px;
}

.staff-pagination-container .fl-builder-pagination {
    text-align: center;
}

.staff-pagination-container .page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.staff-pagination-container .page-numbers li {
    display: inline-block;
}

.staff-pagination-container .page-numbers a,
.staff-pagination-container .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--fm-staff-grid-pagination-radius, 6px);
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.staff-pagination-container .page-numbers a {
    background: var(--fm-staff-grid-pagination-bg, var(--fm-light-color, #f5f5f5));
    color: var(--fm-staff-grid-pagination-color, var(--fm-dark-color, #333));
    border: 1px solid var(--fm-staff-grid-pagination-border, transparent);
}

.staff-pagination-container .page-numbers a:hover {
    background: var(--fm-staff-grid-pagination-bg-hover, var(--fm-accent-color, #0073aa));
    color: var(--fm-staff-grid-pagination-color-hover, #fff);
    border-color: var(--fm-staff-grid-pagination-border-hover, transparent);
}

.staff-pagination-container .page-numbers .current {
    background: var(--fm-staff-grid-pagination-active-bg, var(--fm-accent-color, #0073aa));
    color: var(--fm-staff-grid-pagination-active-color, #fff);
    border: 1px solid var(--fm-staff-grid-pagination-active-border, transparent);
}

.staff-pagination-container .page-numbers .dots {
    background: transparent;
    color: var(--fm-staff-grid-pagination-color, var(--fm-dark-color, #333));
}

/* Load More */
.load-more-container {
    margin-top: 30px;
    text-align: center;
}

/* No Results */
.staff-grid-no-results {
    text-align: center;
    padding: 40px 20px;
    color: var(--fm-dark-color, #666);
    font-size: 16px;
}

/* Loading State */
.fm-staff-grid-module.is-loading .staff-grid-wrapper {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .staff-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-card-content {
        padding: 16px;
    }
    
    .staff-modal.uk-modal-dialog {
        padding: 20px;
        margin: 10px;
    }
    
    .staff-modal-name {
        font-size: 24px;
    }
}
