.body {
    max-width: 1400px;
    margin: 20px auto 50px;
}

#header {
    /* margin-left: -20px; */
    padding: 0;
}

/* --- Faculty Home --- */

.category-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 30px;
}
.full-text {
    display: inline; /* Hide 'Bachelor' */
}
.short-text {
    display: none; /* Show 'B.' */
}

/* Update this section in faculty.css */

.faculty-grid {
    margin-top: 15px;    
    margin-bottom: 15px;
    display: grid; /* Enables Grid layout */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Automatically places cards side-by-side */
    gap: 25px; /* Adds space between the cards */
}

.faculty-card {
    /* Remove max-width: 400px; so the grid can control the size */
    width: 100%; 
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faculty-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-top-accent {
    height: 5px;
    background-color: var(--accent-orange); /* Using your KMITL orange */
}

.card-main-content {
    display: flex;
    padding: 25px 25px 15px 25px; /* Spaced padding */
    gap: 20px;
    align-items: center;
}

.profile-img {
    width: 90px;
    height: 90px;
    border-radius: 50%; /* Perfect circle */
    object-fit: cover;
    border: 3px solid #f8f8f8;
}

.name-th {
    color: var(--accent-orange);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.name-en {
    color: #666;
    font-size: 0.95rem;
}

.contact-details {
    padding: 0 25px 25px 25px;
}

.contact-details p {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-details i {
    width: 16px; /* Ensures icons align vertically */
    color: #555;
    text-align: center;
}

/* Profile */

.highlight-title {
    padding-left: 10px;
    padding-top: 5px;
    padding-bottom: 10px;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-orange);
}

.info-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 15px; /* Keeps the main card rounded */
    overflow: hidden;    /* Essential: clips the header to the card's corners */
    margin-top: 15px;
    margin-bottom: 35px;
}

.info-card-header {
    background: #f8f8f8;
    padding: 12px 25px;
    border-bottom: 1px solid #ddd; /* The line separating the areas */
    
    /* FIX: Only round the top corners to match the parent card */
    border-top-left-radius: 14px; 
    border-top-right-radius: 14px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card-body {
    padding: 30px 30px; /* Spacious internal padding */
}

.split-view-profile {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
}

.split-view-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
}

.details-list {
    list-style: none;
    padding: 0;
    flex: 1;
}

.details-list li {
    margin-bottom: 15px;
    line-height: 1.6;
    font-family: 'Sarabun', sans-serif;
}

.profile-large {
    width: 220px; /* Large sizing from reference */
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #f0f0f0;
}

#display-breadcrumb-name:hover {
    color: var( --text-light);
}

#display-expertise {
    margin-top: 20px;
    margin-left: 10px;
    /* line-height: 1.6; */
}

/* Container for the research items */
#display-research {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.research-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers image and text horizontally */
    text-align: center;
}

.research-thumb {
    /* width: 100%; */
    width: 250px;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.research-caption {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.4;
    font-family: 'Sarabun', sans-serif;
}

.research-link {
    text-decoration: none; /* Removes default underline */
    color: inherit;        /* Keeps your original text color */
    display: block;
    transition: opacity 0.2s ease;
}

.research-link:hover {
    opacity: 0.8;          /* Gives a slight fade effect when hovering */
}

.research-link:hover .research-caption {
    color: var(--accent-orange); /* Changes text color on hover */
    text-decoration: underline;
}

.placeholder-text {
    margin-left: 10px;
}

/* Responsive Adjustments */

/* For Tablets and smaller screens (under 992px) */
@media (max-width: 992px) {

    .highlight-title {
        font-size: 1.8rem; /* Shrink title size */
        text-align: center;
    }

    .page-title { 
        font-size: 1.68rem;
        margin: auto;
    }

    .info-card-body {
        padding: 25px; /* Reduce padding */
    }

    .split-view-profile {
        flex-direction: column-reverse; /* Stack image on top of text */
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .split-view-body {
        flex-direction: column;
    }

    .details-list li {
        text-align: left; /* Keep list items left-aligned for readability */
        display: inline-block; /* Helps centering the block if needed */
        width: 100%;
    }
}

/* For Mobile Phones (under 600px) */
@media (max-width: 600px) {
    .body {
        margin: 5px;
    }

    .full-text {
        display: none; /* Hide 'Bachelor' */
    }
    .short-text {
        display: inline; /* Show 'B.' */
    }

    .page-title { 
        font-size: 1.3rem;
        text-align: center;
    }

    #long-title {
        font-size: 1.2rem;
    }

    .highlight-title {
        font-size: 1.4rem;
    }

    .profile-large {
        width: 180px; /* Smaller image for mobile */
        height: 180px;
    }

    .info-card-header {
        justify-content: center; /* Center header icon/text */
    }
}

