/* =========================================
   FACULTY MENTORS CAROUSEL
   Scoped to .faculty-section-root
   Theme: Matching Site Dark Gradient & Glass
========================================= */

.faculty-section-root {
    --faculty-bg-gradient: linear-gradient(135deg, #160e20 0%, #1a1025 100%);
    --faculty-card-bg: rgba(255, 255, 255, 0.03);
    --faculty-card-border: rgba(255, 255, 255, 0.1);
    --faculty-accent: #a855f7;
    /* Purple */
    --faculty-text: #ffffff;
    --faculty-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* Updated Card Dimensions */
    --faculty-card-width: 280px;
    --faculty-card-height: 420px;
    /* Taller for portrait */
    --faculty-gap: 30px;
}

.faculty-section {
    background: var(--faculty-bg-gradient);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    color: var(--faculty-text);
}

.faculty-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* --- Header --- */
.faculty-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

.faculty-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #fff 40%, var(--faculty-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.faculty-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Separated Heads Grid --- */
.faculty-heads-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.head-card {
    /* Uses .faculty-card base styles */
    z-index: 5;
    flex: 0 0 auto;
}

/* --- Carousel Track --- */
.faculty-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    padding: 40px 0;
    /* Increased padding slightly */
}

.faculty-track {
    display: flex;
    gap: var(--faculty-gap);
    width: max-content;
    will-change: transform;
}

/* --- Faculty Card --- */
.faculty-card {
    position: relative;
    width: var(--faculty-card-width);
    height: var(--faculty-card-height);
    background: var(--faculty-card-bg);
    border: 1px solid var(--faculty-card-border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    /* Reduced vertical padding, space given to image */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Align to top */
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    box-shadow: var(--faculty-shadow);
}

.faculty-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Hover Effects */
.faculty-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.2);
    z-index: 10;
}

/* --- Modified Image Styling (Vertical Rectangle) --- */
.faculty-img-box {
    width: 100%;
    /* Full width of container minus padding */
    height: 75%;
    /* Occupy majority of card height */
    border-radius: 12px;
    /* Rounded corners but not circular */
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    background: rgba(0, 0, 0, 0.2);
}

.faculty-img-box::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Gentle gradient boost at bottom for text contrast if needed, mostly for aesthetics */
    background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
}

.faculty-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* Focus on faces */
    transition: transform 0.6s ease;
}

.faculty-card:hover .faculty-img {
    transform: scale(1.08);
    /* Subtle zoom */
}

/* Text */
.faculty-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    letter-spacing: 0.5px;
    margin-top: auto;
    /* Push to bottom if space allows */
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Decorative Glow (Behind Card) */
.faculty-card-glow {
    position: absolute;
    width: 80%;
    height: 80%;
    background: var(--faculty-accent);
    filter: blur(50px);
    opacity: 0;
    z-index: -1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease;
}

.faculty-card:hover .faculty-card-glow {
    opacity: 0.2;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .faculty-section-root {
        --faculty-card-width: 240px;
        --faculty-card-height: 360px;
    }
}

@media (max-width: 768px) {
    .faculty-carousel-wrapper {
        -webkit-mask-image: none;
        mask-image: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .faculty-card {
        scroll-snap-align: center;
        /* Mobile: Keep readable size */
        width: 220px;
        height: 320px;
    }

    .faculty-title {
        font-size: 2rem;
    }

    .faculty-heads-grid {
        gap: 20px;
        margin-bottom: 20px;
        flex-direction: column;
        align-items: center;
    }
}