/* Teacher Card Component Styles - Premium Hybrid Mobile-First */

.teacher-card.premium-card {
    background: #ffffff;
    border-radius: 16px; /* rounded-2xl */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03); /* Subtle premium shadow */
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: row; /* Horizontal layout by default */
    padding: 1rem;
    gap: 1rem;
    width: 100%;
    min-height: 220px; /* Extra generous vertical space */
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    align-items: stretch;
}

.teacher-card.premium-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* Left Photo Section (40%) */
.card-photo-section {
    flex: 0 0 38%;
    max-width: 150px;
    min-width: 115px;
    position: relative;
    border-radius: 14px; /* rounded-xl */
    overflow: hidden; /* For image zoom + clip */
    align-self: stretch; /* Fill parent height */
}

.teacher-photo {
    width: 100%;
    height: 100%;
    min-height: 180px; /* Uniform minimum height */
    object-fit: cover; /* Strictly uniform crop */
    object-position: center; /* Always center the face */
    border-radius: 14px; /* rounded-xl */
    transition: transform 0.4s ease;
    display: block;
}

.teacher-card.premium-card:hover .teacher-photo {
    transform: scale(1.05); /* Slight zoom on hover */
}

.avatar-initials.teacher-photo {
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
}

/* Absolute Badges on Photo */
.photo-badge-rigoureux {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(79,70,229,0.4);
    z-index: 2;
}

.favorite-btn-glass {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    padding: 0;
}

.favorite-btn-glass:hover, .favorite-btn-glass.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: white;
}
.favorite-btn-glass.active svg {
    fill: #ef4444;
    stroke: #ef4444;
}
.favorite-btn-glass:hover svg {
    stroke: #ef4444;
}

/* Right Info Section (60%) */
.card-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0; /* Important for truncation */
    padding: 0.5rem 0; /* More vertical breathing */
}

.info-top {
    display: flex;
    flex-direction: column;
    gap: 0.4rem; /* More spacing between name/subjects/badges */
}

.name-badge-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    margin-bottom: 0.25rem;
}

.teacher-name {
    font-size: 1.1rem;
    font-weight: 700; /* semibold/bold */
    color: #0f172a; /* slate-900 */
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.cert-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.info-text-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* Generous spacing between matière/location/classes */
}

.info-text {
    font-size: 0.85rem; /* text-sm */
    color: #64748b; /* slate-500 */
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4; /* leading-relaxed */
}

.info-subjects {
    color: #475569; /* slate-600 */
    font-weight: 500;
}

/* Micro Badges — Horizontal Scroll single-line */
.micro-badges {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding-bottom: 2px; /* Prevent clipping */
}
.micro-badges::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.micro-badge {
    font-size: 0.7rem; /* text-xs */
    font-weight: 500; /* font-medium */
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0; /* Never compress — scroll instead */
}

/* Highly transparent background with colored text */
.badge-rating {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}
.badge-rating .badge-count {
    opacity: 0.7;
    margin-left: 2px;
}
.badge-success {
    background: rgba(22, 163, 74, 0.08);
    color: var(--success-600);
}
.badge-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}
.badge-neutral {
    background: rgba(100, 116, 139, 0.1);
    color: #475569;
}

/* Info Bottom */
.info-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.price-block {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.price-amount {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.price-currency {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

/* Action Arrow — Circular Emerald Button */
.action-arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--success-600);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
    flex-shrink: 0;
}

.teacher-card.premium-card:hover .action-arrow {
    background: var(--success-700);
    transform: translateX(3px);
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.36);
}

.teacher-card.premium-card:active .action-arrow {
    transform: scale(0.95);
}


/* --- COMPACT CARD (Recommendations) --- */
.teacher-card-compact {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1rem;
    width: 200px; /* Fixed width for carousel */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.teacher-card-compact:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.teacher-card-compact .compact-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.25rem;
}

.teacher-card-compact .compact-name-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.teacher-card-compact .compact-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.teacher-card-compact .compact-info {
    font-size: 0.75rem;
    color: #64748b;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.teacher-card-compact .compact-matiere {
    color: #0f172a;
    font-weight: 600;
}

.teacher-card-compact .compact-rating {
    font-size: 0.75rem;
    font-weight: 700;
    color: #d97706;
}

.teacher-card-compact .btn-view {
    width: 100%;
    padding: 0.5rem;
    background: rgba(22, 163, 74, 0.08);
    color: var(--success-600);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.25rem;
    transition: all 0.18s;
}

.teacher-card-compact .btn-view:hover {
    background: var(--success-600);
    color: white;
}
