@media (max-width: 576px) {
    .table-responsive table {
        font-size: 13px !important;
    }

    .btn-primary.btn-sm {
        padding: 6px 14px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
        margin:0px !important;
    }
    .table > thead > tr > th {
  padding: 17px 8px 17px;
    }
}

    .faculty-modal {
        border-radius: 12px;
        overflow: hidden;
        padding: 10px 20px;
        background: #fff;
    }

    .faculty-photo {
        border-radius: 10px;
        width: 80%;
        box-shadow: 0 0 8px rgba(0,0,0,0.2);
    }

    .faculty-name {
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 5px;
        color: #4b0082;
    }

    .faculty-qualification {
        font-size: 16px;
        color: #333;
        margin-bottom: 8px;
    }

    .faculty-designation {
        font-size: 15px;
        background: #f3e8ff;
        display: inline-block;
        padding: 6px 12px;
        border-radius: 6px;
        color: #5a189a;
        margin-bottom: 10px;
    }

    .faculty-dept {
        margin-bottom: 8px;
        font-size: 16px;
        color: #444;
    }

    .faculty-email {
        font-size: 15px;
        margin-bottom: 12px;
        color: #555;
    }

    .faculty-table th {
        width: 40%;
        background: #f7f1ff;
        color: #4a148c;
        font-weight: 600;
    }

    .faculty-table td {
        color: #333;
    }

    .modal-close-x {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 32px;
        font-weight: 400;
        color: #333;
        background: transparent;
        border: none;
        outline: none !important;
        z-index: 999;
    }

    .modal-close-x:hover {
        color: #000;
        opacity: 0.7;
        cursor: pointer;
    }

    /* ---------------- MOBILE FIXES ---------------- */
    @media (max-width: 576px) {

        /* Modal container padding */
        .faculty-modal {
            padding: 15px !important;
        }

        /* PHOTO — Center + smaller */
        .faculty-photo {
            width: 60% !important;
            margin: 0 auto 15px auto;
            display: block;
        }

        /* Close button adjust */
        .modal-close-x {
            top: 5px;
            right: 10px;
            font-size: 28px;
        }

        /* TABLE — FULL WIDTH + readable */
        .faculty-table {
            width: 100% !important;
            font-size: 14px !important;
        }

        .faculty-table th,
        .faculty-table td {
            display: block;
            width: 100%;
            text-align: left !important;
            padding: 10px;
        }

        .faculty-table tr {
            margin-bottom: 10px;
            border: 1px solid #e9d7ff;
            border-radius: 6px;
            overflow: hidden;
        }

        .faculty-table th {
            background: #f3e8ff;
        }
    }
