/* Med-Pro Expert Panel Frontend Styles */

.med-pro-experts-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.med-pro-experts-grid {
    display: grid;
    gap: 24px;
    margin-bottom: 30px;
}

/* Responsive Grid Columns */
.med-pro-columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.med-pro-columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.med-pro-columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.med-pro-columns-1 {
    grid-template-columns: 1fr;
}

/* Expert Card Styling */
.med-pro-expert-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 28px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.med-pro-expert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2980b9, #27ae60, #e74c3c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.med-pro-expert-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.med-pro-expert-card:hover::before {
    opacity: 1;
}

/* Expert Photo */
.med-pro-expert-photo {
    margin-bottom: 20px;
    position: relative;
}

.med-pro-expert-photo img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f8f9fa;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.med-pro-expert-card:hover .med-pro-expert-photo img {
    transform: scale(1.05);
    border-color: #3498db;
}

/* Expert Information */
.med-pro-expert-info {
    position: relative;
}

.med-pro-expert-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.med-pro-expert-specialization {
    font-size: 1.05rem;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.med-pro-expert-credentials {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 8px;
    font-style: italic;
}

.med-pro-expert-experience {
    font-size: 0.9rem;
    color: #27ae60;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Read More Button */
.med-pro-read-more {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 120px;
}

.med-pro-read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    transition: left 0.3s ease;
}

.med-pro-read-more:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.med-pro-read-more:hover::before {
    left: 100%;
}

.med-pro-read-more:active {
    transform: translateY(0);
}

/* Modal Styles */
.med-pro-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.med-pro-modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.med-pro-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.med-pro-modal-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.med-pro-close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.med-pro-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.med-pro-modal-body {
    padding: 28px;
}

.med-pro-expert-details {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.med-pro-expert-details img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 5px solid #f8f9fa;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.med-pro-expert-text {
    flex: 1;
}

.med-pro-expert-text .specialization {
    font-size: 1.2rem;
    color: #3498db;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.med-pro-expert-text .credentials {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 16px;
    font-style: italic;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.med-pro-expert-text .bio {
    line-height: 1.7;
    color: #2c3e50;
    font-size: 1rem;
}

/* Loading Animation */
.med-pro-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .med-pro-columns-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .med-pro-experts-container {
        padding: 16px;
    }
    
    .med-pro-experts-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .med-pro-expert-card {
        padding: 24px 20px;
    }
    
    .med-pro-expert-photo img {
        width: 110px;
        height: 110px;
    }
    
    .med-pro-modal-content {
        width: 95%;
        margin: 20px;
        max-height: 90vh;
    }
    
    .med-pro-modal-body {
        padding: 20px;
    }
    
    .med-pro-expert-details {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .med-pro-expert-details img {
        width: 140px;
        height: 140px;
    }
    
    .med-pro-modal-header {
        padding: 20px 24px;
    }
    
    .med-pro-modal-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .med-pro-experts-container {
        padding: 12px;
    }
    
    .med-pro-experts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .med-pro-expert-card {
        padding: 20px 16px;
    }
    
    .med-pro-expert-photo img {
        width: 100px;
        height: 100px;
    }
    
    .med-pro-expert-name {
        font-size: 1.2rem;
    }
    
    .med-pro-expert-specialization {
        font-size: 1rem;
    }
    
    .med-pro-read-more {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .med-pro-modal-content {
        width: 98%;
        margin: 10px;
    }
    
    .med-pro-modal-body {
        padding: 16px;
    }
    
    .med-pro-expert-details img {
        width: 120px;
        height: 120px;
    }
    
    .med-pro-modal-header {
        padding: 16px 20px;
    }
    
    .med-pro-modal-header h2 {
        font-size: 1.3rem;
    }
    
    .med-pro-close {
        font-size: 28px;
        width: 36px;
        height: 36px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .med-pro-expert-photo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .med-pro-expert-card {
        background: #2c3e50;
        border-color: rgba(255, 255, 255, 0.1);
        color: #ecf0f1;
    }
    
    .med-pro-expert-name {
        color: #ecf0f1;
    }
    
    .med-pro-expert-credentials {
        color: #bdc3c7;
    }
    
    .med-pro-modal-content {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .med-pro-expert-text .credentials {
        background: #2c3e50;
        color: #bdc3c7;
    }
    
    .med-pro-expert-text .bio {
        color: #ecf0f1;
    }
}

/* Print Styles */
@media print {
    .med-pro-read-more {
        display: none;
    }
    
    .med-pro-expert-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .med-pro-experts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility Enhancements */
.med-pro-read-more:focus {
    outline: 3px solid #3498db;
    outline-offset: 2px;
}

.med-pro-close:focus {
    outline: 3px solid white;
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .med-pro-expert-card,
    .med-pro-expert-photo img,
    .med-pro-read-more,
    .med-pro-modal,
    .med-pro-modal-content {
        transition: none;
        animation: none;
    }
    
    .med-pro-expert-card:hover {
        transform: none;
    }
    
    .med-pro-expert-card:hover .med-pro-expert-photo img {
        transform: none;
    }
    
    .med-pro-read-more:hover {
        transform: none;
    }
}