.wp-directory.employee-directory {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.wp-directory .search-container {
    margin-bottom: 30px;
    text-align: center;
}

.wp-directory #employee-search {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wp-directory .employee-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

.wp-directory .directory-section + .directory-section {
    margin-top: 34px;
}

.wp-directory .directory-section-title {
    margin: 0 0 16px;
    color: #15324b;
    font-size: clamp(1.35rem, 1.6vw, 1.7rem);
    font-weight: 800;
}

.wp-directory .employee-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    background-color: #f9f9f9;
}

.wp-directory .employee-card[hidden] {
    display: none;
}

.wp-directory .employee-card img {
    max-width: 100px;
    margin-bottom: 10px;
}

.wp-directory .employee-card-content {
    width: 100%;
}

.wp-directory .employee-name {
    margin: 0 0 5px;
    font-size: 1.1rem;
    font-weight: 700;
}

.wp-directory .employee-title {
    margin: 0 0 10px;
    color: #18466d;
    font-size: 0.95rem;
    font-weight: 600;
}

.wp-directory .employee-roles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 14px;
}

.wp-directory .employee-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8f1f8;
    color: #18466d;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}

.wp-directory .contact-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #004f8b, #0a74b8);
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.wp-directory .contact-link:hover,
.wp-directory .contact-link:focus {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 79, 139, 0.22);
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background:
        radial-gradient(circle at top, rgba(14, 116, 185, 0.2), transparent 35%),
        rgba(6, 14, 28, 0.68);
    backdrop-filter: blur(6px);
}

.contact-modal .modal-content {
    position: relative;
    width: min(100%, 720px);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.98));
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.contact-modal .modal-header {
    padding: 28px 32px 20px;
    background:
        linear-gradient(135deg, rgba(0, 79, 139, 0.98), rgba(16, 124, 194, 0.96));
    color: #fff;
}

.contact-modal .modal-eyebrow {
    margin: 0 0 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.82;
}

.contact-modal .modal-title {
    margin: 0;
    color: #fff;
    font-size: clamp(1.7rem, 2vw, 2.15rem);
    line-height: 1.1;
}

.contact-modal .modal-description {
    margin: 10px 0 0;
    max-width: 42ch;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.98rem;
}

.contact-modal .close-modal {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-modal .close-modal:hover,
.contact-modal .close-modal:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 10px 20px rgba(0, 0, 0, 0.16);
}

.contact-modal .close-modal:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.contact-modal .employee-contact-form {
    padding: 26px 32px 32px;
}

.contact-modal .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.contact-modal .form-group {
    margin-bottom: 18px;
}

.contact-modal .form-group label {
    display: block;
    margin-bottom: 7px;
    color: #15324b;
    font-size: 0.92rem;
    font-weight: 700;
}

.contact-modal .employee-contact-form label::after {
    content: " *";
    color: #c81f3a;
}

.contact-modal .form-group input,
.contact-modal .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c9d5e2;
    border-radius: 14px;
    background: #fff;
    color: #12273c;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.contact-modal .form-group input:focus,
.contact-modal .form-group textarea:focus {
    border-color: #0a74b8;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(10, 116, 184, 0.14);
}

.contact-modal .form-group textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-modal .form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 6px;
}

.contact-modal .form-note {
    margin: 0;
    color: #61758a;
    font-size: 0.86rem;
}

.contact-modal #employee-contact-form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 12px 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #004f8b, #0a74b8);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.contact-modal #employee-contact-form button[type="submit"]:hover,
.contact-modal #employee-contact-form button[type="submit"]:focus {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0, 79, 139, 0.2);
}

.contact-modal #employee-contact-form button[type="submit"]:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.contact-modal .success-message {
    padding: 48px 32px;
    text-align: center;
    color: #167249;
    font-size: 1.05rem;
    font-weight: 700;
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
}

@media (max-width: 1024px) {
    .wp-directory .employee-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .wp-directory .employee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .wp-directory .employee-grid {
        grid-template-columns: 1fr;
    }

    .contact-modal {
        padding: 14px;
    }

    .contact-modal .modal-header,
    .contact-modal .employee-contact-form {
        padding-left: 20px;
        padding-right: 20px;
    }

    .contact-modal .form-row,
    .contact-modal .form-footer {
        grid-template-columns: 1fr;
        display: grid;
    }

    .contact-modal #employee-contact-form button[type="submit"] {
        width: 100%;
    }
}
