.facility{
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
}

.facility-text{ 
    text-align: justify; 
    width: 100%;
    word-break: break-word;
}

.facility-img{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.facility-img img{
    width: 100%;
    height: 100%;
    max-width: 20vw;
    max-height: 15vw;
}

.facility-text table {
    width: 100%;
    margin-top: 1rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.facility-text th,
.facility-text td {
    background: #FFF;
    border: 1px solid var(--dark-color);
    padding: 8px;
    text-align: left;
}

.extra-links{
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    align-items: center;
    justify-content: start;
    gap: 0.5rem;
}

.extra-links a{
    flex: 1 1 180x;
    padding: 5px 18px;
    background: var(--danger);
    text-decoration: none;
    color: var(--white-color);
    max-width: 250px;
    text-align: center;
}

.facility-profile {
    display: grid;
    gap: 20px;
    width: 100%;
    margin: 2rem 0;
}

.profile-card {
    background: var(--white-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eaeaea;
}

.profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.profile-header {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eaeaea;
}

.profile-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-title h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.profile-title .designation {
    margin: 5px 0 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.profile-body {
    padding: 20px;
}

.profile-detail {
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
}

.profile-detail:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #34495e;
    width: 100px;
    font-size: 0.85rem;
}

.detail-value {
    flex: 1;
    color: #555;
    font-size: 0.85rem;
    word-break: break-word;
}

.detail-value a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.detail-value a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.no-staff {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    width: 100%;
}

@media (max-width: 768px) {
    .facility-profile {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 25px 20px;
    }
    
    .profile-img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .profile-detail {
        flex-direction: column;
    }
    
    .detail-label {
        width: 100%;
        margin-bottom: 3px;
    }
}

@media (max-width: 480px) {
    .facility-profile {
        grid-template-columns: 1fr;
    }
}

/* @media (max-width: 900px){ .facility-profile{ grid-template-columns: repeat(2, 1fr);} } */
@media (max-width: 726px){
    .facility-img{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .facility-img img{
        width: 100%;
        height: 100%;
        max-width: 200px;
        max-height: 150px;
        object-fit: contain;
    }
}

/* @media (max-width: 900px){ .facility-profile{ grid-template-columns: repeat(1, 1fr);} } */
@media (max-width: 400px) { 
    .fprofile{ 
        flex-direction: column; 
        border-radius: 0;
    } 
}
@media (max-width: 350px){
    .facility-img{
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .facility-img img{
        width: 100%;
        height: 100%;
        max-width: 120px;
        max-height: 120px;
    }
}