/* Use original theme styles for .doctors background and spacing */

.doctors-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 3% 2%;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* -------------------------------------
   DOCTORS PAGE (Default Base Styles)
   (5 per row, tight spacing, small image)
--------------------------------------*/
.doctors-card {
    display: flex;
    width: 300px;
    /* Increased from 260px per user request */
    min-height: 280px;
    /* Force minimum length */
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    padding: 25px 15px;
    /* Increased padding */
    background-color: #eee4d1;
    border: 1px solid #c3a165;
    border-radius: 8px;
    /* Tighter corner for smaller card */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.doctors-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.doctors-card .dcard-left {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    /* Tighter gap */
    width: 100%;
}

.doctors-card .dcard-left img {
    width: 100px !important;
    /* Much smaller image */
    height: 100px !important;
    min-width: 100px;
    min-height: 100px;
    max-width: 100px !important;
    max-height: 100px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #ffffff !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    display: block !important;
}

.doctors-card .dcard-right {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.doctors-card .dcard-right .name {
    margin-bottom: 6px;
    font-size: 15px;
    /* smaller font */
    font-weight: 700;
    color: #111;
}

.doctors-card .dcard-right .degree {
    margin-bottom: 5px;
    font-size: 10px;
    /* smaller font */
    font-family: Georgia, serif;
    font-weight: bold;
    color: #222;
    line-height: 1.3;
}

.doctors-card .dcard-right .designation {
    margin-bottom: 10px;
    font-size: 11px;
    /* smaller font */
    font-family: Georgia, serif;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.doctors-card .dcard-right .btn-profile {
    margin-top: auto;
    display: none;
    /* explicitly hidden as requested earlier */
}

.doctors-card .dcard-right .btn-profile a {
    padding: 8px 16px;
    font-size: 12px;
    background: linear-gradient(45deg, #8e6015, #fdddaa, #dab766, #b69121);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.doctors-card .dcard-right .btn-profile a:hover {
    opacity: 0.9;
}

/* -------------------------------------
   HOME PAGE OVERRIDES
   (4 per row, much larger)
--------------------------------------*/
#home-doctors-list .doctors-card {
    width: 330px;
    /* fixed width for large cards */
    padding: 40px 20px;
    min-height: 380px;
    border-radius: 12px;
}

#home-doctors-list .doctors-card .dcard-left {
    margin-bottom: 20px;
}

#home-doctors-list .doctors-card .dcard-left img {
    width: 180px !important;
    height: 180px !important;
    min-width: 180px;
    min-height: 180px;
    max-width: 180px !important;
    max-height: 180px !important;
    border: 4px solid #ffffff !important;
}

#home-doctors-list .doctors-card .dcard-right .name {
    margin-bottom: 12px;
    font-size: 20px;
}

#home-doctors-list .doctors-card .dcard-right .degree {
    margin-bottom: 8px;
    font-size: 11px;
}

#home-doctors-list .doctors-card .dcard-right .designation {
    margin-bottom: 15px;
    font-size: 12px;
}

/* -------------------------------------
   Responsive Mobile Fallbacks
--------------------------------------*/
@media(max-width:768px) {
    .doctors-grid {
        padding: 5% 5%;
        flex-direction: column;
        /* strictly center stack */
        align-items: center;
        justify-content: center;
    }

    .doctors-card,
    #home-doctors-list .doctors-card {
        width: 100%;
        max-width: 350px;
        min-height: auto;
        padding: 25px 15px;
        margin: 0 auto;
        /* forces centering bounds */
    }
}