/* 
 * Faculty Public Styles 
 * Designed for Premium Aesthetics
 */

:root {
    --faculty-primary: #1e4d8c;
    --faculty-accent: #3498db;
    --faculty-text: #333333;
    --faculty-text-light: #777777;
    --faculty-border: #e1e4e8;
    --faculty-bg-light: #f9fafc;
    --faculty-white: #ffffff;
    --faculty-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faculty-frontend-container {
    max-width: 1200px;
    margin: 40px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--faculty-text);
}

.faculty-main-header {
    margin-bottom: 20px;
    text-align: center;
}

.faculty-main-title {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
}

/* Banner Styling */
.faculty-banner {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: var(--faculty-card-shadow);
}

.faculty-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
}

.faculty-banner .faculty-header-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 0 40px;
    text-align: center;
}

/* Toolbar Styling */
.faculty-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--faculty-bg-light);
    padding: 15px 25px;
    border: 1px solid var(--faculty-border);
    border-radius: 12px 12px 0 0;
    gap: 15px;
    flex-wrap: wrap;
}

.faculty-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.faculty-select {
    padding: 8px 12px;
    border: 1px solid var(--faculty-border);
    border-radius: 8px;
    background: var(--faculty-white);
    color: var(--faculty-text);
    font-size: 0.95rem;
    cursor: pointer;
    height: 40px;
}

.faculty-search-box {
    display: flex;
    align-items: center;
    background: var(--faculty-white);
    padding: 5px;
    border: 1px solid var(--faculty-border);
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    width: 400px;
    gap: 0;
}

.faculty-search-box input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    flex-grow: 1;
    padding: 0 15px;
    height: 40px;
    font-size: 1.05rem;
    line-height: normal;
    outline: none;
    margin: 0;
}

.faculty-search-box button {
    padding: 0 25px;
    background: var(--faculty-primary);
    color: var(--faculty-white);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    height: 40px;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.faculty-search-box button:hover {
    background: var(--faculty-accent);
}

/* Clear Search Button Styling */
.faculty-search-clear {
    display: none; /* Controlled by is-visible class */
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    cursor: pointer;
    color: var(--faculty-text-light);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    opacity: 0.5;
    flex-shrink: 0;
}

.faculty-search-clear.is-visible {
    display: flex !important;
    opacity: 1;
}

.faculty-search-clear:hover {
    background-color: rgba(30, 77, 140, 0.1);
    color: var(--faculty-primary);
    opacity: 1;
    transform: scale(1.1);
}

.faculty-search-clear svg {
    display: block;
}

/* Alphabet Filter */
.faculty-alphabet-filter {
    background: var(--faculty-white);
    border-left: 1px solid var(--faculty-border);
    border-right: 1px solid var(--faculty-border);
    border-bottom: 1px solid var(--faculty-border);
    padding: 0;
    overflow: hidden;
    position: relative;
    border-radius: 0;
}

.faculty-alphabet-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.faculty-alphabet-filter ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
    height: 50px;
}

.faculty-alphabet-filter ul::-webkit-scrollbar {
    display: none;
}

.faculty-alphabet-filter li {
    cursor: pointer;
    padding: 0 15px;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 100%;
    position: relative;
    border-right: 1px solid #eee;
}

.faculty-alphabet-filter li:last-child {
    border-right: none;
}

.faculty-alphabet-filter li:hover {
    color: #1e4d8c;
    background-color: #f8f9fa;
}

.faculty-alphabet-filter li.active {
    color: #1e4d8c;
    font-weight: 600;
}

.faculty-alphabet-filter li.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: #1e4d8c;
    border-radius: 0;
}

.faculty-alphabet-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #333;
    cursor: pointer;
    height: 50px;
    background: var(--faculty-white);
    flex-shrink: 0;
    transition: all 0.2s;
    z-index: 5;
}

.faculty-alphabet-chevron.chevron-left {
    border-right: 1px solid #eee;
    box-shadow: 5px 0 8px rgba(0,0,0,0.02);
}

.faculty-alphabet-chevron.chevron-right {
    border-left: 1px solid #eee;
    box-shadow: -5px 0 8px rgba(0,0,0,0.02);
}

.faculty-alphabet-chevron:hover {
    color: #1e4d8c;
}

/* Alphabet Filter Layout Variants */
.faculty-alphabet-filter.mobile-wrap ul {
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
    overflow: visible;
    padding: 5px 0;
}

.faculty-alphabet-filter.mobile-wrap .faculty-alphabet-chevron {
    display: none !important;
}

.faculty-alphabet-filter.mobile-wrap li {
    border-right: none;
    height: 40px;
}

/* Responsive Alphabet Filter */
@media (min-width: 769px) {
    .faculty-alphabet-filter ul {
        justify-content: center;
        flex-wrap: nowrap;
        height: 50px;
        padding: 0;
    }
    .faculty-alphabet-filter li {
        border-right: 1px solid #eee;
        height: 100%;
        min-width: 38px;
        padding: 0 5px;
        font-size: 0.9rem;
    }
    .faculty-alphabet-chevron {
        display: none;
    }
    .faculty-alphabet-filter li.active::after {
        left: 5px;
        right: 5px;
        bottom: 0;
    }
}

/* Faculty Grid */
.faculty-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 40px 0;
}

.faculty-card {
    background: var(--faculty-white);
    border: 1px solid var(--faculty-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.faculty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(33, 81, 255, 0.12);
    border-color: #2151FF;
}

.faculty-card-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.faculty-card-content {
    padding: 20px;
    text-align: left;
    flex-grow: 1;
}

.faculty-card-content h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--faculty-primary);
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.faculty-card-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faculty-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    /* Precise 8px gap between icon and text */
    color: var(--faculty-text);
}

.faculty-meta-row svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #2151FF;
    margin-top: 2px;
    /* Slight offset for perfect vertical alignment with first line of text */
}

.faculty-meta-row span {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 400;
    color: var(--faculty-text);
}

/* Pagination Section */
.faculty-pagination-container {
    padding: 25px;
    background: var(--faculty-bg-light);
    border: 1px solid var(--faculty-border);
    border-radius: 0 0 8px 8px;
}

.faculty-pagination-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faculty-showing-stats {
    font-size: 0.85rem;
    color: var(--faculty-text-light);
}

.faculty-page-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.f-page-btn {
    padding: 2px 7px;
    font-size: 0.85rem;
    border: 1px solid var(--faculty-border);
    background: var(--faculty-white);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.f-page-btn:hover:not([disabled]) {
    background: var(--faculty-primary);
    color: var(--faculty-white);
    border-color: var(--faculty-primary);
}

.f-page-btn.active {
    background: var(--faculty-primary);
    color: var(--faculty-white);
    border-color: var(--faculty-primary);
}

.f-page-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loader Styling (Themed) */
.faculty-grid-wrapper {
    position: relative;
    min-height: 400px;
}

.faculty-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    /* Shown via JS */
    align-items: center;
    justify-content: center;
    border: 1px solid var(--faculty-border);
    border-top: none;
    backdrop-filter: blur(2px);
}

.faculty-loader .loading-container,
.faculty-loader .loading {
    height: 100px;
    /* Theme default */
    position: relative;
    width: 100px;
    border-radius: 100%;
}

.faculty-loader .loading {
    border: 2px solid transparent;
    border-color: transparent var(--faculty-primary) transparent var(--faculty-primary);
    -webkit-animation: rotate-loading 1.5s linear 0s infinite normal;
    animation: rotate-loading 1.5s linear 0s infinite normal;
    -webkit-transform-origin: 50% 50%;
    transform-origin: 50% 50%;
}

.faculty-loader #loading-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 66px;
    /* Theme default */
}

.faculty-loader #loading-icon img {
    width: 100%;
    height: auto;
    display: block;
}

.faculty-loader #loading-icon i {
    font-size: 24px;
    color: var(--faculty-primary);
}

@-webkit-keyframes rotate-loading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes rotate-loading {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* No Results */
.faculty-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.25rem;
    color: var(--faculty-text-light);
}

/* Loading Effects */
.faculty-loading-state {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s;
}

.faculty-loading-state.loading {
    opacity: 0.3;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .faculty-frontend-container {
        margin: 20px auto;
    }
    .faculty-cards-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    .faculty-header-content,
    .faculty-main-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px 15px;
        margin-bottom: 0 !important;
    }

    .faculty-banner {
        height: auto;
        min-height: 150px;
        margin-bottom: 10px;
        padding: 20px 10px;
    }

    .faculty-frontend-container {
        margin: 5px auto;
        padding: 0 15px;
        box-sizing: border-box;
    }

    .faculty-search-box {
        flex-direction: row;
        width: 100%;
        margin-top: 10px;
    }

    .faculty-search-box button {
        padding: 0 15px;
        min-width: 80px;
        justify-content: center;
    }

    .faculty-toolbar {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
        border-radius: 12px;
    }

    .faculty-cards-wrapper {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px 0;
        gap: 15px;
    }

    .faculty-pagination-inner {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .faculty-cards-wrapper {
        grid-template-columns: 1fr;
    }

    .faculty-banner h1 {
        font-size: 2rem;
    }
}