/* General container for doctor profiles with attractive layout */
.frm {
    display: flex;
    flex-direction: row;
    padding: 20px;
    width: 90%;
    margin-left: 5%;
    margin-top: 3%;
    column-gap: 2%;
}

/* Doctor card with modern design */
.frm1 {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 375px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #3498db;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.frm1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2980b9, #1abc9c);
}

.frm1 img {
    width: 80%;
    margin-left: 10%;
    margin-top: 15%;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.frm1 img:hover {
    transform: scale(1.05);
}

.frm3 {
    width: 60%;
    padding: 10px;
    overflow: auto;
    margin-left: 6%;
}

.frm2 {
    width: 30%;
    border-left: 5px solid #3498db;
}

.frm3 h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    font-size: 24px;
    margin-top: 5px;
    color: #2c3e50;
    margin-top: 5%;
    position: relative;
}

.frm3 h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #1abc9c);
    border-radius: 2px;
}

.frm p {
    text-align: justify;
    margin-top: 2%;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 30px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #34495e;
}

span {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: #7f8c8d;
    font-style: italic;
}

.frm3 a {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.frm3 a:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1abc9c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2980b9, #1abc9c);
}

/* Enhanced hover effect for the card */
.frm1:hover {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(52, 152, 219, 0.3);
    border-color: #2980b9;
}

.frm1:hover .frm p {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive design */
@media (max-width: 768px) {
    .frm {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
        margin-left: 2%;
        margin-top: 5%;
        width: 96%;
    }

    .frm1 {
        flex-direction: column;
        height: auto;
        border-radius: 20px;
    }

    .frm1 img {
        width: 180px;
        height: 180px;
        margin: 15px auto;
        border-radius: 20px;
    }

    .frm3, .frm2 {
        width: 100%;
    }

    .frm2 {
        border-left: none;
        border-top: 5px solid #3498db;
        border-radius: 0;
        padding-top: 15px;
        margin-top: 15px;
    }

    .frm3 h3 {
        font-size: 20px;
        text-align: center;
        margin-top: 3%;
    }

    .frm p {
        font-size: 14px;
        padding: 12px;
        line-height: 1.5;
    }

    .frm3 a {
        padding: 8px 16px;
        font-size: 14px;
        margin-top: 15px;
    }
}

/* Additional optimization for small phones */
@media (max-width: 576px) {
    .frm {
        padding: 10px;
        margin-left: 1%;
        width: 98%;
        margin-top: 5%;
    }

    .frm1 {
        border-radius: 15px;
        box-shadow: 0 5px 15px rgba(52, 152, 219, 0.15);
    }

    .frm1 img {
        width: 150px;
        height: 150px;
        margin: 10px auto;
        border-radius: 15px;
    }

    .frm3 h3 {
        font-size: 18px;
        margin-top: 2%;
    }

    .frm p {
        font-size: 13px;
        padding: 10px;
        line-height: 1.4;
    }

    .frm3 a {
        padding: 6px 12px;
        font-size: 13px;
        margin-top: 10px;
    }

    .frm2 {
        padding-top: 10px;
        margin-top: 10px;
    }

    /* Disable hover effects on touch devices */
    .frm1:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
    }

    .frm1 img:hover {
        transform: none;
    }

    .frm3 a:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    }
    .frm1 img {
    width: 50%;
    height: auto;
    margin-left: 25%;
    margin-top: 15%;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}
.frm3 {
    width: 100%;
    padding: 10px;
    overflow: auto;
    margin-left: 0%;
}

}
