/* Section container */
.doctors-section {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 50px 10%;
    position: relative;
}

/* Each doctor card */
.doctor-card {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    gap: 30px;
    background: #f9efee;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
    /* Adjust to your header height */
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Sticky stack effect: higher card overlays above the next */
.doctor-card:nth-child(1) {
    z-index: 1;
}

.doctor-card:nth-child(2) {
    z-index: 2;
}

.doctor-card:nth-child(3) {
    z-index: 3;
}

.doctor-card:nth-child(4) {
    z-index: 4;
}

.doctor-card:nth-child(5) {
    z-index: 5;
}

.doctor-card:nth-child(6) {
    z-index: 6;
}

.doctor-card:nth-child(7) {
    z-index: 7;
}

.doctor-card:nth-child(8) {
    z-index: 8;
}

.doctor-card:nth-child(9) {
    z-index: 9;
}

/* On hover */
.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Doctor Info */

.doctor-info {
    padding: 30px;
}

.doctor-info h2 {
    color: #ff7a00;
    margin-bottom: 15px;
}

.doctor-info p {
    color: #444;
    line-height: 1.6;
}

/* Image */
.doctor-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .doctor-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .doctor-image {
        order: -1;
    }
}