#dir {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(max(280px, 30%), 1fr));
    gap: 24px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.dir-card-premium {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid #e4e9f0;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-family: 'Inter', 'Roboto', 'Segoe UI', sans-serif !important;
    text-align: center !important;
    margin: 0 !important;
    width: auto !important;
    box-sizing: border-box;
    position: relative;
}

.dir-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1) !important;
}

.dir-card-premium .directory_content {
    padding: 24px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center !important;
    height: auto !important;
    box-sizing: border-box;
}

/* ID Card / Portrait Photo: Centered 110x125px rounded rectangle */
.dir-id-photo-wrap {
    width: 110px;
    height: 125px;
    min-width: 110px;
    min-height: 125px;
    border-radius: 10px;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 auto 16px auto;
    overflow: hidden;
    background: #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dir-card-premium:hover .dir-id-photo-wrap {
    transform: scale(1.04);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.dir-id-photo-wrap img.dir-id-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: top center !important;
    display: block !important;
    border-radius: 7px !important;
}

/* Member Name & Designation */
.dir-card-premium .dir-header {
    margin-bottom: 16px;
    text-align: center !important;
}

.dir-card-premium .dir-header h3 {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a365d;
    text-align: center !important;
    line-height: 1.35;
}

.dir-card-premium .dir-header p.degi {
    font-size: 12px;
    font-weight: 600;
    color: #d96b27;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0;
    text-align: center !important;
    min-height: 18px;
}

/* Contact Info (Phone & Email) */
.dir-card-premium .dir-contact {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #edf2f7;
    text-align: left !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dir-card-premium .contact-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    color: #4a5568 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    line-height: 1.4 !important;
}

.dir-card-premium .contact-row .label {
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #4a5568 !important;
}

.dir-card-premium .contact-row .contact-icon {
    width: 15px !important;
    height: 15px !important;
    stroke: #4a5568 !important;
    vertical-align: middle;
}

.dir-card-premium .contact-row .val {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-all !important;
    word-wrap: break-word !important;
    white-space: normal !important;
    color: #1a568c !important;
    font-weight: 500 !important;
    text-align: left !important;
}

/* Single Clean Button */
.dir-card-premium .profileHover {
    padding: 12px 16px !important;
    width: 100% !important;
    text-align: center !important;
    background: #2170ac !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    margin-top: auto !important;
    border-radius: 0 0 11px 11px !important;
    transition: background 0.2s ease !important;
    display: block !important;
    border: none !important;
    outline: none !important;
}

.dir-card-premium .profileHover:hover {
    background: #17547d !important;
}

.dir-card-premium .profileHover .viewProfile,
.dir-card-premium .profileHover a.viewProfile,
.directory .right_directory .dir-card-premium .viewProfile,
.directory .right_directory .dir-card-premium a {
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
    text-decoration: none !important;
    display: block !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    cursor: pointer !important;
    line-height: normal !important;
    width: 100% !important;
}

/* Header video */
header video {
    display: none;
}

/* SVG icons */
.contact-icon {
    vertical-align: middle;
}

/* Profile popup */
.dir_pop {
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    position: fixed;
    display: none;
}

/* Popup open state */
.dir_pop.is-open {
    display: flex;
    opacity: 1;
    z-index: 999;
}

/* Popup closing state */
.dir_pop.is-closing {
    opacity: 0;
    z-index: -1;
}