:root {
    --primary-color: #AD573A;
    --background-color: #FDF5EC;
    --text-color: #333333;
    --light-text-color: #666666;
    --white-color: #F9F7EE;
    --card-border-radius: 15px;
}


.expert-care-section {
    background-color: #ffffea;
    background-image: url("https://transparenttextures.com/patterns/arches.png");
    padding: 60px 5%;
    text-align: center;
    overflow-x: hidden;
}

.expert-care-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: -10px;
}

/* --- BULLETPROOF PERFECT CENTER DIVIDER FIX --- */
.services-divider-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; 
    margin: 0 auto 30px auto;
    width: fit-content; 
    max-width: 100%;
}

.services-divider-icon img {
    height: 80px; 
    width: auto;
    display: block;
    flex-shrink: 0; 
}

.services-divider-icon::before,
.services-divider-icon::after {
    content: '';
    display: block;
    height: 2px;
    background-color: var(--primary-color);
    width: 120px; 
    flex-shrink: 0; 
}

.expert-care-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin-top: 20px;
    width: 100%;
}

/* --- CARD STYLES (RESPONSIVE) --- */
.psychiatrist-card {
    background-color: var(--white-color);
    border: 2px solid var(--primary-color);
    border-radius: var(--card-border-radius);
    width: 100%;
    max-width: 260px; 
    min-height: 320px;
    height: 100%;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    margin: 0; 
}

.psychiatrist-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.doctor-image-container {
    width: 100%;
    aspect-ratio: 4 / 3.8; 
    overflow: hidden;
    background-color: #f0f0f0;
}

.psychiatrist-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; 
    transition: transform 0.3s ease;
}

.psychiatrist-card:hover img {
    transform: scale(1.05);
}

.doctor-text-content {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1; 
    text-align: center;
}

.doctor-text-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.doctor-text-content h4 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.doctor-text-content h4 a:hover {
    color: var(--primary-color);
}

.doctor-text-content p {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* --- BUTTON STYLES --- */
.know-more-button {
    padding: 12px 30px;
    background-color: var(--white-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.know-more-button:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

/* --- CONSULTATION INFO BASE (DESKTOP) --- */
.consultation-info {
    max-width: 1200px; 
    text-align: center;
    padding: 0 15px;
}

.consultation-info h3 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.3rem; /* Thoda chota kiya pehle se (was 1.5rem) */
}

.consultation-info p {
    color: var(--light-text-color);
    line-height: 1.6;
    font-size: 0.95rem; /* Base paragraph bhi chota kiya (was 1rem) */
}

/* ANIMATION STYLES */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* DESKTOP STYLES (> 900px) */
.care-cards-wrapper-mobile {
    display: none; 
}

@media (min-width: 901px) {
    .care-cards-wrapper-desktop {
        display: flex;
        flex-direction: row; 
        align-items: center; 
        justify-content: center; 
        gap: 20px; 
        width: 100%;
        flex-wrap: nowrap; 
    }
    
    #psychiatrist-cards-container-desktop {
        display: flex; 
        flex-wrap: nowrap; 
        justify-content: center; 
        align-items: stretch; 
        gap: 15px; 
        width: auto; 
    }

    .psychiatrist-card {
        max-width: 220px; 
        min-height: 280px; 
        margin: 0; 
        flex: 0 1 220px; 
    }
    
    .know-more-button {
       flex-shrink: 0; 
       height: fit-content;
       margin-left: 10px;
    }
}

/* TABLET & MOBILE VIEW (<= 900px) */
@media (max-width: 900px) {
    .care-cards-wrapper-desktop {
        display: none; 
    }

    .care-cards-wrapper-mobile {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .mobile-top-cards {
        display: grid;
        grid-template-columns: 1fr 1fr; 
        gap: 15px; 
        width: 100%;
    }
    
    .mobile-bottom-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
        gap: 15px;
        align-items: center;
        width: 100%;
    }
    
    .care-cards-wrapper-mobile:has(.mobile-top-cards .psychiatrist-card:first-child:last-child):has(.mobile-bottom-card:empty) .mobile-bottom-card {
        display: none;
    }

    .care-cards-wrapper-mobile:has(.mobile-top-cards .psychiatrist-card:first-child:last-child):has(.mobile-bottom-card:empty) > .mobile-top-cards,
    .care-cards-wrapper-mobile:has(.mobile-top-cards .psychiatrist-card:first-child:last-child):has(.mobile-bottom-card:empty) > .mobile-bottom-row {
        display: contents;
    }
    
    .mobile-bottom-row:has(.mobile-bottom-card:empty) {
        grid-template-columns: 1fr; 
    }

    .mobile-bottom-card {
        display: block; 
        width: 100%;
    }
    
    .psychiatrist-card {
        min-height: 270px; 
        height: 100%; 
        max-width: 100%; 
        margin: 0 auto; 
    }
    
    .doctor-image-container {
        aspect-ratio: 1 / 1.1; 
    }

    .doctor-text-content {
        padding: 12px 8px; 
    }

    .doctor-text-content h4 {
        font-size: 1rem; 
        margin-bottom: 4px; 
    }

    .doctor-text-content p {
        font-size: 0.85rem;
    }

    .know-more-button {
        justify-self: center; 
        text-align: center;
        display: inline-flex; 
        align-items: center;
        justify-content: center;
        padding: 10px 12px; 
        font-size: 0.9rem; 
        width: 100%;
        max-width: 180px; 
        min-height: 44px;
        white-space: normal; 
        line-height: 1.2;
    }
    
    .mobile-bottom-row:has(.mobile-bottom-card:empty) .know-more-button {
       justify-self: center;
       max-width: 250px;
    }

    /* Tablet Divider & Text Adjustment */
    .services-divider-icon {
        gap: 12px;
    }
    .services-divider-icon img {
        height: 65px;
    }
    .services-divider-icon::before,
    .services-divider-icon::after {
        width: 70px;
    }

    .consultation-info h3 {
        font-size: 1.15rem; 
    }
    .consultation-info p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

/* MOBILE VIEW (<= 612px) */
@media (max-width: 612px) {
    .services-divider-icon {
        gap: 10px;
    }
    .services-divider-icon img {
        height: 55px; 
    }
    .services-divider-icon::before, 
    .services-divider-icon::after {
        width: 45px; 
    }
    
    .expert-care-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .consultation-info {
        margin: 0;
        text-align: center; 
    }
    
    .consultation-info h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    .consultation-info p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* VERY SMALL MOBILE VIEW (<= 375px) */
@media (max-width: 375px) {
    .mobile-top-cards, .mobile-bottom-row {
        gap: 10px; 
    }
    
    .psychiatrist-card {
        min-height: 240px; 
    }
    
    .doctor-text-content {
        padding: 10px 4px; 
    }
    
    .doctor-text-content h4 {
        font-size: 0.85rem;
    }
    
    .doctor-text-content p {
        font-size: 0.75rem;
    }
    
    .know-more-button {
        padding: 8px 10px; 
        font-size: 0.8rem; 
    }
    
    .services-divider-icon {
        gap: 8px;
    }
    .services-divider-icon img {
        height: 45px;
    }
    .services-divider-icon::before, 
    .services-divider-icon::after {
        width: 30px;
    }

    /* --- SUPER COMPACT CONSULTATION TEXT FOR 375px --- */
    .consultation-info h3 {
        font-size: 0.9rem; /* Heading bohot choti ki */
        margin-bottom: 5px;
    }

    .consultation-info p {
        font-size: 0.7rem; /* Paragraph kafi small kardiya */
        line-height: 1.3; /* Line spacing kam ki */
    }
}
