.blok-agents-directory {
    max-width: 1400px;
    margin:auto
}

.blok-agents-directory .blok-agents__boxes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
}

.bio-card {
    padding: 0 !important;
}

.blok-agents-directory .blok-agents__boxes .agentsBox {
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .blok-agents-directory .blok-agents__boxes {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .blok-agents-directory .blok-agents__boxes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    .blok-agents-directory .blok-agents__boxes {
        grid-template-columns: 1fr;
    }
}

.blok-about-me-thumbnail {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    width: 320px;
    max-width: 100%;
    height: 400px;
}

.blok-about-me-thumbnail > img{
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Agent Contact Icons (WhatsApp & Email) */
.blok-agent-contact-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.blok-agent-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--brand-color-4);
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.blok-agent-icon-btn:hover {
    background-color: white;
    color: var(--brand-color-4);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.blok-agent-icon-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.blok-about-me-details {
    text-align: left;
    padding-left: 20px;
    padding-bottom: 20px;
}

.blok-agents__sort-letters{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
    margin-bottom: 2rem;
}

#blok-agents-directory > div.blok-agents__sort-letters > a {
    min-height: 3rem;
    padding: 8px;
    text-align: center;
    border: 1px solid #ccc;
    margin: 0 -1px -1px 0;
    transition: all .3s ease;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    color: #9baf1e;
}

.blok-agents-directory .blok-agents__pagination {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0 0;
}

.blok-agents-directory .blok-agents__page-numbers {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.blok-agents-directory .blok-agents__page-numbers.force-hidden {
    display: none;
}

.blok-pagination__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    color: #9baf1e;
    font-size: 3.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.blok-pagination__control:hover,
.blok-pagination__control:focus {
    color: #61740f;
    outline: none;
}

.blok-pagination__status {
    display: inline-flex;
    align-items: baseline;
    gap: 0.4rem;
    font-weight: 500;
    font-size: 1rem;
    color: #1f2937;
    padding-top: 10px;
}

.blok-pagination__divider {
    opacity: 0.6;
    font-size: 0.925rem;
}

@media (max-width: 540px) {
    .blok-agents-directory .blok-agents__page-numbers {
        padding: 0.5rem 1rem;
        gap: 0.65rem;
    }

    .blok-pagination__control {
        font-size: 1.65rem;
    }

    .blok-pagination__status {
        font-size: 0.95rem;
    }
}

#search-agent-text {
    border-right: none;
    -ms-flex: 1 0 8em;
    flex: 1 0 8em;
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 0;
    font-family: Poppins, Arial, Helvetica Neue, Helvetica, sans-serif;
    font-size: .875rem;
    line-height: 1.5;
}

.blok-field--inline {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    position: relative;
    width: 100%;
}

.blok-agents__search {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    margin: 32px 0;
    padding: 0;
    gap: 0;
    align-items: stretch;
}

.blok-agents__filter-groups {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.blok-agents__filter-groups select {
    display: inline-block;
    width: auto;
    min-width: 200px;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0;
    font-family: Poppins, Arial, Helvetica Neue, Helvetica, sans-serif;
    font-size: .875rem;
    line-height: 1.5;
    background-color: #fff;
    cursor: pointer;
    color:#555555;
}

.blok-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.blok-agenta-button svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    vertical-align: middle;
    overflow: hidden;
    display: inline-block;
    max-width: 100%;
}

.blok-agenta-button:hover svg,
.blok-agenta-button:focus svg,
#blok-agents-directory > div.blok-agents__search.agents__search > div > button > svg:hover {
    fill: #9baf1e;
}

.blok-agenta-button {
    background-color: #9baf1e;
    transition: none;
    transform: none;
    display: inline-flex;
    position: relative;
    padding: 16px 30px;
    z-index: 1;
    border: 1px solid #9baf1e;
    box-sizing: border-box;
}

.blok-agenta-button:hover,
.blok-agenta-button:focus {
    background-color: #ffffff;
    border-color: #9baf1e;
    box-shadow: none;
    transform: none;
    padding: 16px 30px;
}

#blok-agents-directory > div.blok-agents__sort-letters.agents__sort-letters > a.current {
    background: #222;
    color: #fff;
}

.blok-agent-name {
    font-weight: 600;
}

.blok-agent-office {
    /* Styled to match .blok-agent-title */
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
    margin-top: -0.5rem;
    margin-bottom: 0;
}

/* Agent Bio Button */
.blok-agent-bio-btn {
    display: inline-block;
    margin-top: 5px;
    background-color: var(--fourth-color);
    color: var(--brand-color-4);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-align: center;
}

/* Show Phone Number Button */
.blok-agent-phone-container {
    margin-top: 0.75rem;
}

.blok-agent-show-phone-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--fourth-color);
    color: var(--brand-color-4);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.blok-agent-show-phone-btn:hover {
    background-color: none;
    color: var(--brand-color-4);
}

.blok-agent-phone-container .blok-agent-phone {
    margin-top: 0.5rem;
}

.blok-agent-phone-container .blok-agent-phone a {
    color: var(--brand-color-4);
    font-weight: 600;
    text-decoration: none;
}

.blok-agent-phone-container .blok-agent-phone a:hover {
    color: var(--brand-color-4);
    text-decoration: underline;
}

/* Autocomplete Dropdown */
.blok-agent-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.blok-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.blok-autocomplete-item:hover,
.blok-autocomplete-item.blok-autocomplete-active {
    background-color: #f5f5f5;
}

.blok-autocomplete-item:last-child {
    border-bottom: none;
}

.blok-autocomplete-item strong {
    color: #9baf1e;
    font-weight: 600;
}

/* Position dropdown relative to search field */
.blok-field--inline {
    position: relative;
}

/* Mobile: Stack search field and filter groups */
@media (max-width: 768px) {
    .blok-agents__search {
        flex-wrap: wrap;
    }
    
    .blok-field--inline {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .blok-agents__filter-groups {
        width: 100%;
    }
    
    .blok-agents__filter-groups select {
        width: 100%;
        border-left: 1px solid #ccc;
    }
}
