/* Faculty Page Specific Styles */

/* Main section for the Faculty page, taking full breadth */
.faculty-section {
    width: 100%;
    padding: 60px 0; /* Vertical padding for the section */
    background-color: #f8f9fa; /* Light background for the section */
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); /* Subtle shadow for depth */
    margin-bottom: 0; /* Ensures no extra margin below the section */
}

/* Container for the grid of faculty members */
.faculty-grid {
    display: grid; /* Use CSS Grid for robust responsive layout */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Responsive columns, min width 350px */
    gap: 30px; /* Space between grid items */
    justify-content: center; /* Center the grid items horizontally if there's extra space */
    align-items: stretch; /* Ensures all grid items stretch to the same height */
    padding-top: 20px; /* Space below the main heading */
}

/* Styles for an individual faculty member's card */
.faculty-member-card {
    background-color: #ffffff; /* White background for the card */
    border-radius: 12px; /* Slightly more rounded corners */
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.08); /* Soft shadow */
    overflow: hidden; /* Ensures content respects border-radius */
    display: flex; /* Flexbox for internal layout */
    flex-direction: column; /* Stack image and content vertically on small screens */
    align-items: center; /* Center content horizontally within the card */
    padding: 35px; /* MODIFIED: Increased padding inside the card for more breathing room */
    text-align: center; /* Center text globally */
    transition: transform 0.3s ease-out, box-shadow 0.3s ease-out; /* Smooth hover effect */
    height: 100%; /* Important for aligning grid items */
    position: relative; /* For pseudo-elements */
}

.faculty-member-card:hover {
    transform: translateY(-8px); /* Lifts the card on hover */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
}

/* --- Optional Hover Effects (Shine) --- */
.faculty-member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Cover the entire card */
    background-color: rgba(10, 145, 218, 0.05); /* Very light blue overlay */
    opacity: 0;
    transition: opacity 0.3s ease-out;
    border-radius: 12px;
    z-index: 1; /* Above card content, below shine */
}

.faculty-member-card:hover::before {
    opacity: 1;
}

.faculty-member-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start off-screen */
    width: 50%; /* Width of the shine */
    height: 100%; /* Cover the entire card */
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%); /* MODIFIED: Slightly more subtle shine opacity */
    transform: skewX(-20deg); /* Angle the shine */
    transition: left 0.6s ease-out; /* Smooth movement */
    z-index: 2; /* Above the overlay */
    pointer-events: none; /* Allows clicks to pass through */
    border-radius: 12px;
}

.faculty-member-card:hover::after {
    left: 100%; /* Move across to the right */
}

/* Image for the faculty member */
.faculty-image-wrapper {
    flex-shrink: 0; /* Prevents image from shrinking */
    width: 160px; /* Fixed width for the image container */
    height: 160px; /* Fixed height for the image container */
    border-radius: 50%; /* Makes the image container circular */
    overflow: hidden; /* Clips image to the circle */
    margin-bottom: 28px; /* MODIFIED: Increased space below image */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Shadow for the circular image */
    border: 3px solid #0a91da; /* Blue border around the image */
    position: relative; /* For z-index to work with pseudo elements */
    z-index: 3; /* Ensure image is above pseudo elements */
}

.faculty-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the circular space */
    display: block; /* Remove extra space */
    transition: transform 0.3s ease; /* Smooth zoom on hover */
}

.faculty-member-card:hover .faculty-image {
    transform: scale(1.1); /* Slight zoom on image when card is hovered */
}


/* Content area for faculty details */
.faculty-content {
    flex-grow: 1; /* Allows content to take available space */
    width: 100%; /* Ensure content takes full width within its card */
    position: relative; /* For z-index */
    z-index: 3; /* Ensure text is above pseudo elements */
}

/* Name of the faculty member */
.faculty-name {
    font-family: 'Trirong', sans-serif;
    font-size: 1.6em; /* MODIFIED: Slightly larger name */
    color: #022335;
    font-weight: bold;
    margin-bottom: 8px; /* MODIFIED: Increased space below name */
    line-height: 1.2;
}

/* Department of the faculty member */
.faculty-department {
    font-size: 1.05em; /* MODIFIED: Slightly larger department font */
    color: #555;
    margin-bottom: 20px; /* MODIFIED: Increased space below department */
    display: block; /* Ensure it's a block element */
}

/* Research interests heading */
.research-interest-heading {
    font-weight: bold;
    color: #022335;
    margin-top: 15px; /* MODIFIED: Consistent space before heading */
    margin-bottom: 8px; /* MODIFIED: Consistent space below heading */
    font-size: 1em; /* MODIFIED: Slightly larger font for this heading */
    display: block;
}

/* Research interests content */
.research-interests {
    font-size: 0.95em; /* MODIFIED: Slightly larger font for research text */
    color: #444;
    line-height: 1.6; /* MODIFIED: More line height for readability */
    margin-bottom: 25px; /* MODIFIED: More space below research interests */
}

/* Contact information (email, phone, homepage) */
.contact-info {
    font-size: 0.95em; /* MODIFIED: Consistent font size for contact info */
    color: #444;
    line-height: 2; /* MODIFIED: Increased line height for better separation */
    margin-top: 20px; /* Space above contact info */
    padding-top: 15px; /* Padding at top of contact block */
    border-top: 1px solid #eee; /* Separator line */
    text-align: left; /* Align contact info to the left */
    width: 100%; /* Ensure it spans full width */
    display: flex; /* Use flexbox for the container */
    flex-direction: column; /* Stack contact items */
}

.contact-info span {
    display: flex; /* Use flex for icon and text alignment */
    align-items: center; /* Vertically align icon and text */
    margin-bottom: 5px; /* Space between each contact line */
}

.contact-info span:last-child {
    margin-bottom: 0;
}

.contact-info .fa {
    color: #0a91da; /* Blue icon color */
    margin-right: 12px; /* MODIFIED: More space between icon and text */
    width: 25px; /* MODIFIED: Fixed width for icons for better alignment */
    text-align: center; /* Center icon within its space */
    flex-shrink: 0; /* Prevent icon from shrinking */
    font-size: 1.1em; /* MODIFIED: Slightly larger icons */
}

.contact-info a {
    color: #0a91da;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.contact-info a:hover {
    text-decoration: underline;
    color: #022335;
}

/* Responsive adjustments */
@media (max-width: 991px) { /* Tablets and smaller desktops */
    .faculty-section {
        padding: 40px 0;
    }
    .faculty-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Adjust min-width */
        gap: 25px;
    }
    .faculty-member-card {
        padding: 25px;
    }
    .faculty-image-wrapper {
        width: 140px;
        height: 140px;
        margin-bottom: 20px;
    }
    .faculty-name {
        font-size: 1.4em; /* Adjusted name size */
    }
    .faculty-department {
        font-size: 1em;
    }
    .research-interest-heading {
        font-size: 0.9em;
    }
    .research-interests {
        font-size: 0.9em;
    }
    .contact-info {
        font-size: 0.9em;
    }
    .faculty-member-card::before,
    .faculty-member-card::after {
        height: 100%; /* Adjust for consistent sizing */
    }
}

@media (max-width: 767px) { /* Mobile specific adjustments */
    .faculty-section {
        padding: 30px 0;
    }
    .faculty-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    .faculty-member-card {
        padding: 20px;
    }
    .faculty-image-wrapper {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }
    .faculty-name {
        font-size: 1.25em; /* Adjusted name size */
    }
    .faculty-department {
        font-size: 0.9em;
    }
    .research-interest-heading {
        font-size: 0.85em;
    }
    .research-interests {
        font-size: 0.85em;
        line-height: 1.5;
    }
    .contact-info {
        font-size: 0.85em;
        line-height: 1.6;
    }
    .contact-info .fa {
        font-size: 1em;
        width: 18px; /* Smaller icon width for mobile */
        margin-right: 8px;
    }
}
