/* Faculty Page Specific Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Banner Section */
.faculty-banner {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    height: auto;
    max-height: 500px;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
}

.faculty-banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Title Section */
.faculty-title-section {
    padding: 4rem 0 2rem;
    background-color: #ffffff;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: #862C91;
    text-align: center;
    margin-bottom: 0;
}

/* Introduction Section */
.faculty-intro-section {
    padding: 0 0 4rem;
    background-color: #ffffff;
}

.faculty-intro-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.faculty-intro-text p {
    color: #4b5563;
    line-height: 1.6;
    font-size: 1.05rem;
    margin-bottom: 0;
    padding: 0 15px;
}

/* Dean's Message Section */
.dean-message-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.dean-message-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-color: #f5f5f5;
    padding: 4rem 0;
}

/* Desktop Layout - CSS Grid for proper two-column layout */
.dean-message-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    grid-template-rows: auto auto auto auto;
    gap: 0 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.dean-message-title-wrapper {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 2rem;
}

.dean-message-title {
    font-size: 2rem;
    font-weight: 600;
    color: #862C91;
    margin-bottom: 0;
}

.dean-info {
    grid-column: 1;
    grid-row: 2;
    margin-bottom: 2rem;
}

.dean-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #862C91;
    margin-bottom: 0.5rem;
}

.dean-position {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0;
    font-weight: 500;
}

.dean-photo {
    grid-column: 2;
    grid-row: 2 / 5;
    width: 400px;
    height: 400px;
}

.dean-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.dean-bio {
    grid-column: 1;
    grid-row: 3;
    margin-bottom: 2rem;
}

.dean-bio p {
    font-size: 1rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 0;
}

.dean-cta {
    grid-column: 1;
    grid-row: 4;
}

/* Faculty Grid Section */
.faculty-grid-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

/* Adjust spacing between banners and faculty sections */
.faculty-banner + .faculty-grid-section {
    padding-top: 4rem;
}

.faculty-grid-section + .faculty-banner {
    margin-top: 0;
}

/* Updated Faculty Grid - 4 Columns on Desktop with Centered Last Row */
/* Using Flexbox with justify-content: center automatically centers incomplete rows */
.faculty-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Faculty cards need fixed width for consistent 4-column layout */
.faculty-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
    display: flex;
    flex-direction: column;
    width: calc((100% - 6rem) / 4); /* Exactly 4 columns: (100% - 3 gaps of 2rem) / 4 */
    min-width: 250px;
    max-width: 300px;
}

.faculty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.faculty-photo {
    width: 100%;
    max-width: 270px;
    height: 180px;
    margin: 0 auto 1.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.faculty-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faculty-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #862C91;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.faculty-credentials {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
}

.faculty-credentials p {
    margin-bottom: 0.25rem;
}

.faculty-credentials p:last-child {
    margin-bottom: 0;
}

/* Button Styles */
.btn {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-light {
    background-color: #e0e0e0;
    color: #333;
}

.btn-light:hover {
    background-color: #d0d0d0;
}

/* CTA Section */
.cta-section {
    background-color: #862C91;
    padding: 4rem 0;
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.cta-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary {
    background-color: #FFC107;
    color: #333;
}

.btn-primary:hover {
    background-color: #e0a800;
}

.btn-outline-light {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.btn-outline-light:hover {
    background-color: white;
    color: #333;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .faculty-banner {
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        max-height: 450px;
    }
    
    .faculty-card {
        width: calc((100% - 4rem) / 3); /* Exactly 3 columns: (100% - 2 gaps of 2rem) / 3 */
        min-width: 220px;
        max-width: 280px;
    }
    
    .dean-message-content {
        max-width: 1000px;
    }
}

@media (max-width: 992px) {
    .faculty-banner {
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        max-height: 400px;
    }

    .faculty-card {
        width: calc((100% - 2rem) / 2); /* Exactly 2 columns: (100% - 1 gap of 2rem) / 2 */
        min-width: 200px;
        max-width: 350px;
    }

    /* Mobile Layout - Switch to Flexbox and reorder: Title, Name/Position, Photo, Bio, Button */
    .dean-message-content {
        display: flex;
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0;
    }

    .dean-message-title-wrapper {
        order: 1;
        grid-column: unset;
        grid-row: unset;
        width: 100%;
        margin-bottom: 1.5rem;
    }

    .dean-info {
        order: 2;
        grid-column: unset;
        grid-row: unset;
        width: 100%;
        margin-bottom: 2rem;
    }

    .dean-photo {
        order: 3;
        grid-column: unset;
        grid-row: unset;
        width: 300px;
        height: 300px;
        margin: 0 auto 3rem;
    }

    .dean-bio {
        order: 4;
        grid-column: unset;
        grid-row: unset;
        width: 100%;
        margin-bottom: 2rem;
    }

    .dean-cta {
        order: 5;
        grid-column: unset;
        grid-row: unset;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .faculty-banner {
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        max-height: 300px;
    }

    .faculty-title-section {
        padding: 3rem 0 1.5rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .faculty-intro-section {
        padding: 0 0 3rem;
    }

    .faculty-intro-text p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .dean-message-container {
        padding: 3rem 0;
    }

    .dean-message-title {
        font-size: 1.75rem;
    }

    .dean-name {
        font-size: 1.3rem;
    }

    .dean-photo {
        width: 250px;
        height: 250px;
        margin: 0 auto 2.5rem;
    }

    .faculty-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .faculty-grid-section {
        padding: 3rem 0;
    }
    
    .faculty-card {
        width: 100%; /* 1 column - full width */
        max-width: 400px;
        min-width: auto;
        margin: 0 auto;
        padding: 1.25rem;
    }
    
    .faculty-photo {
        width: 200px;
        height: 150px;
    }
    
    .faculty-name {
        font-size: 1.1rem;
    }
    
    .faculty-credentials {
        font-size: 0.85rem;
    }
    
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-text {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .cta-buttons .btn {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .faculty-banner {
        margin-left: calc(-50vw + 50%);
        margin-right: calc(-50vw + 50%);
        max-height: 250px;
    }

    .faculty-title-section {
        padding: 2.5rem 0 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .faculty-intro-text p {
        font-size: 0.95rem;
    }

    .dean-message-container {
        padding: 2.5rem 0;
    }

    .dean-message-content {
        padding: 0 1rem;
    }

    .dean-message-title {
        font-size: 1.5rem;
    }

    .dean-name {
        font-size: 1.2rem;
    }

    .dean-bio p {
        font-size: 0.95rem;
    }

    .dean-photo {
        width: 200px;
        height: 200px;
        margin: 0 auto 2.5rem;
    }

    .faculty-grid-section {
        padding: 2.5rem 0;
    }
    
    .faculty-card {
        padding: 1rem;
    }
    
    .faculty-photo {
        width: 150px;
        height: 120px;
        margin-bottom: 1rem;
    }
    
    .faculty-name {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .faculty-credentials {
        font-size: 0.8rem;
    }
    
    .cta-title {
        font-size: 1.5rem;
    }
    
    .cta-text {
        font-size: 0.95rem;
    }
    
    .cta-buttons .btn {
        width: 250px;
    }
}