.student-listing-wrapper {
    width: 100%;
    /*display: flex;*/
    /*flex-direction: column;*/
    /*align-items: center;*/
}

.student-filters-wrapper {
    position: relative;
    z-index: 40;
}

/* WRAPPER */
.listing-filters {
    width: 100%;
}

/* CLEAR BUTTON */
.clear-filters {
    justify-self: center;
    display: block;
    padding: 12px 20px;
    margin-bottom: 44px;
    border-radius: 999px;
    border: 1px solid #06215A;
    background: #FFFFFF;
    color: #06215A;
    font-family: Instrument Sans;
    font-weight: 600;
    font-size: 16px;
    leading-trim: NONE;
    line-height: 24px;
    letter-spacing: 0%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filters:hover {
    background: #E6E9EE;
}

/* GRID */
.listing-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

/* FIELD */
.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* LABEL */
.filter-field label {
    font-family: Instrument Sans;
    font-weight: 500;
    font-size: 14px;
    leading-trim: NONE;
    line-height: 20px;
    letter-spacing: 0%;
    color: #414651;
}

/* SELECT */
.filter-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    
    padding: 10px 40px 10px 10px;
    border-radius: 8px;
    border: 1px solid #8290AC;
    font-size: 16px;
    background-color: #fff;
    color: #717680;
    cursor: pointer;
    
    /* custom arrow */
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23BC1944' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

/* HOVER */
.filter-field select:hover {
    border-color: #94a3b8;
}

/* FOCUS */
.filter-field select:focus {
    outline: none;
    border-color: #162e6b;
    box-shadow: 0 0 0 2px rgba(22, 46, 107, 0.1);
}

.filter-field select[multiple] {
    display: none;
}

.student-filters-wrapper .cf-transfer-ms {
    position: relative;
    width: 100%;
    text-align: left;
}

.student-filters-wrapper .cf-transfer-ms__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    font-size: 16px;
    line-height: 24px;
    color: #414651;
    text-align: left;
    cursor: pointer;
    border: 1px solid #8290AC;
    border-radius: 8px;
    background: #FFFFFF;
    box-shadow: 0px 1px 2px rgba(10, 13, 18, 0.08);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.student-filters-wrapper .cf-transfer-ms__trigger:hover {
    box-shadow: 0 0 0 3px rgba(6, 33, 90, 0.12);
}

.student-filters-wrapper .cf-transfer-ms__trigger:focus {
    outline: none;
    border-color: #06215A;
    box-shadow: 0 0 0 3px rgba(6, 33, 90, 0.15);
}

.student-filters-wrapper .cf-transfer-ms.is-open .cf-transfer-ms__trigger {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: #D5D7DA;
}

.student-filters-wrapper .cf-transfer-ms__trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-filters-wrapper .cf-transfer-ms__trigger-text.is-placeholder {
    color: #717680;
}

.student-filters-wrapper .cf-transfer-ms__trigger-chevron {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23BC1944' stroke-width='1.67' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s ease;
}

.student-filters-wrapper .cf-transfer-ms.is-open .cf-transfer-ms__trigger-chevron {
    transform: rotate(180deg);
}

.student-filters-wrapper .cf-transfer-ms__panel {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: -2px;
    display: block;
    flex-direction: column;
    align-items: stretch;
    max-height: min(360px, 55vh);
    min-height: 0;
    background: #FFFFFF;
    border: 1px solid #8290AC;
    border-top: 1px solid #D5D7DA;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 24px rgba(6, 33, 90, 0.12);
    overflow: hidden;
}

.cf-transfer-ms__panel.listing-ms__panel {
    overflow: scroll;
}

.student-filters-wrapper .cf-transfer-ms__panel[hidden] {
    display: none !important;
}

.student-filters-wrapper .cf-transfer-ms__list {
    flex: 1 1 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.student-filters-wrapper .cf-transfer-ms__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #414651;
    border-bottom: 1px solid #F2F4F7;
    transition: background 0.12s ease;
}

.student-filters-wrapper .cf-transfer-ms__option:last-child {
    border-bottom: none;
}

.student-filters-wrapper .cf-transfer-ms__option:hover {
    background: #E3F2FB;
}

.student-filters-wrapper .cf-transfer-ms__option.is-filtered-out {
    display: none;
}

.student-filters-wrapper .cf-transfer-ms__option input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    border: 1.5px solid #06215A;
    border-radius: 2px;
    background: #FFFFFF;
    cursor: pointer;
    align-self: center;
}

.student-filters-wrapper .cf-transfer-ms__option input:checked {
    background-color: #06215A;
    border-color: #06215A;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6.2L5 8.7l4.5-5.5' stroke='%23ffffff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.student-filters-wrapper .cf-transfer-ms__option input:focus-visible {
    outline: 2px solid #06215A;
    outline-offset: 2px;
}

.student-filters-wrapper .cf-transfer-ms__option-text {
    flex: 1;
    min-width: 0;
}


/* Portaled panel styles (when dropdown is moved to body) */
.listing-ms__panel {
    display: block;
    flex-direction: column;
    align-items: stretch;
    max-height: min(360px, 55vh);
    min-height: 0;
    background: #FFFFFF;
    border: 1px solid #8290AC;
    border-top: 1px solid #D5D7DA;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 24px rgba(6, 33, 90, 0.12);
    overflow: hidden;
}

.listing-ms__panel[hidden] {
    display: none !important;
}

.listing-ms__panel .cf-transfer-ms__list {
    flex: 1 1 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.listing-ms__panel .cf-transfer-ms__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #414651;
    border-bottom: 1px solid #F2F4F7;
    transition: background 0.12s ease;
}

.listing-ms__panel .cf-transfer-ms__option:last-child {
    border-bottom: none;
}

.listing-ms__panel .cf-transfer-ms__option:hover {
    background: #E3F2FB;
}

.listing-ms__panel .cf-transfer-ms__option.is-filtered-out {
    display: none;
}

.listing-ms__panel .cf-transfer-ms__option input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    border: 1.5px solid #06215A;
    border-radius: 2px;
    background: #FFFFFF;
    cursor: pointer;
    align-self: center;
}

.listing-ms__panel .cf-transfer-ms__option input:checked {
    background-color: #06215A;
    border-color: #06215A;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6.2L5 8.7l4.5-5.5' stroke='%23ffffff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.listing-ms__panel .cf-transfer-ms__option input:focus-visible {
    outline: 2px solid #06215A;
    outline-offset: 2px;
}

.listing-ms__panel .cf-transfer-ms__option-text {
    flex: 1;
    min-width: 0;
}


/* RESPONSIVE */
@media (max-width: 900px) {
  .listing-filters {
    grid-template-columns: repeat(2, 1fr);
    
  }
}

@media(max-width:767px){
  .listing-filters {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* MASONRY */
#student-listing {
    margin-left: -16px;
    margin-right: -16px;
}

.listing-item {
    width: 33.333%;
    padding: 16px;
}

@media(max-width:980px){
    .listing-item { width: 50%; }
    .clear-filters {
        width: 100%;
    }
}

@media(max-width:767px){
    .listing-item { width: 100%; }
}

/* CARD */
.student-card {
    background: #f3f4f6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0px 2px 2px -1px #0A0D120A;
    box-shadow: 0px 4px 6px -2px #0A0D1208;
    box-shadow: 0px 12px 16px -4px #0A0D1214;
}

.student-header {
    background: #06215A;
    padding: 32px;
    display: flex;
    gap: 24px;
}

.student-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.student-header img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
}

.student-header h3 {
    color: #fff;
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    padding-bottom: 0px !important;
}

.student-header span {
    color: #CDD3DE;
    font-size: 16px;
}

.student-body {
    display: flex;
    flex-direction: column;
    padding: 32px;
    gap: 24px;
}

.quote {
    color: #414651;
    font-family: Instrument Sans;
    font-weight: 500;
    font-size: 18px;
    leading-trim: NONE;
    line-height: 28px;
    letter-spacing: 0%;
}

.student-meta {
    display: flex;
    flex-direction: row;
    gap: 18px;
    font-size: 14px;
    color: #414651;
}

.student-meta-left,
.student-meta-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 50%;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item span {
    font-family: Instrument Sans;
    font-weight: 400;
    font-size: 14px;
    leading-trim: NONE;
    line-height: 20px;
    letter-spacing: 0%;
}

.meta-item strong {
    font-family: Instrument Sans;
    font-weight: 600;
    font-size: 14px;
    leading-trim: NONE;
    line-height: 20px;
    letter-spacing: 0%;
}

@media(max-width:767px){
    .student-header {
        padding: 20px;
    }

    .student-header span {
        font-size: 14px;
    }
    
    .student-body {
        padding: 32px 20px;
    }

    .quote {
        font-size: 16px;
    }
}

/* PAGINATION */

.pagination {
    display: flex;
    align-items: center;
    padding: 40px 0;
    margin-top: 40px;
    border-top: 1px solid #D5D7DA;
}

.page-status {
    display: none;
}

.page-btn {
    padding: 10px;
    margin: 0 4px;
    height: 40px;
    width: 40px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #717680;
    cursor: pointer;
    font-family: Instrument Sans;
    font-weight: 500;
    font-size: 14px;
    leading-trim: NONE;
    line-height: 20px;
    letter-spacing: 0%;
    text-align: center;
}

.page-btn.next {
    margin-left: auto;
    height: unset;
    width: unset;
    color: #06215A;
    font-family: Instrument Sans;
    font-weight: 600;
    font-size: 14px;
    leading-trim: NONE;
    line-height: 20px;
    letter-spacing: 0%;
    cursor: pointer;
}

.page-btn.prev {
    margin-right: auto;
    padding: 0;
    height: unset;
    width: unset; 
    color: #06215A;
    font-family: Instrument Sans;
    font-weight: 600;
    font-size: 14px;
    leading-trim: NONE;
    line-height: 20px;
    letter-spacing: 0%;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.page-btn.prev:before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.4997 6.66732H0.833008M0.833008 6.66732L6.66634 12.5007M0.833008 6.66732L6.66634 0.833984' stroke='%23A4A7AE' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    display: flex;
    align-items: center;
}

.page-btn:hover.prev:before {
    background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.4997 6.66732H0.833008M0.833008 6.66732L6.66634 12.5007M0.833008 6.66732L6.66634 0.833984' stroke='%2306215A' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.page-btn.active {
    background: #fff;
    color: #06215A;
    border-color: #06215A;
}

@media (max-width: 767px) {
    .pagination {
        justify-content: space-between;
        gap: 16px;
        padding: 16px 0 0 0;
    }

    .pagination .page-btn:not(.prev):not(.next) {
        display: none;
    }

    .page-status {
        display: block;
        order: 2;
        font-family: Instrument Sans;
        font-weight: 500;
        font-size: 14px;
        line-height: 56px;
        color: #414651;
        text-align: center;
        flex: 1;
    }

    .page-btn.prev,
    .page-btn.next {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        margin: 0;
        padding: 0;
        font-size: 0;
        line-height: 0;
        border: 1px solid #06215A;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: transparent;
    }

    .page-btn.prev {
        order: 1;
    }

    .page-btn.next {
        order: 3;
    }

    .page-btn.prev:before,
    .page-btn.next:before {
        content: "";
        width: 24px;
        height: 24px;
        margin: 0;
        display: block;
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
    }

    .page-btn.prev:before {
        background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.4997 6.66732H0.833008M0.833008 6.66732L6.66634 12.5007M0.833008 6.66732L6.66634 0.833984' stroke='%23A4A7AE' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    }

    .page-btn.next:before {
        background: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5003 6.66732H13.167M13.167 6.66732L7.33366 12.5007M13.167 6.66732L7.33366 0.833984' stroke='%23A4A7AE' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    }
}

/* LOADER WRAPPER */
.listing-loader {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

/* SPINNER */
.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #06215A;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ANIMATION */
@keyframes spin {
    to { transform: rotate(360deg); }
}