/* --- ОСНОВНИЙ КОНТЕЙНЕР --- */
.shc-app {
    display: flex; 
    flex-direction: column;
    width: 100%; 
    min-height: auto;
    background: transparent !important; 
    border: none !important;
    box-shadow: none !important;
    color: var(--sh-text) !important;
    font-family: var(--font-family, system-ui, -apple-system, BlinkMacSystemFont, sans-serif) !important;
    padding: 10px 0;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.shc-app * {
    font-family: var(--font-family, system-ui, -apple-system, BlinkMacSystemFont, sans-serif) !important;
    box-sizing: border-box;
}

/* --- ШАПКА --- */
.shc-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
}

.shc-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 2px solid var(--lg-surface-border, var(--sh-menu-border, var(--border-subtle))) !important;
    box-shadow: var(--lg-shadow-soft, var(--shadow-sm)), var(--lg-inner-highlight), var(--sh-3d-shadow, none) !important;
    background: var(--lg-surface-bg, var(--sh-pill-bg, var(--glass-bg))) !important; 
    overflow: hidden;
    margin-bottom: 15px;
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.shc-avatar img { width: 100%; height: 100%; object-fit: cover; }

.shc-name {
    font-size: 24px; font-weight: 800; text-transform: none; letter-spacing: normal;
    color: var(--sh-text) !important; margin: 0 0 5px 0;
}

.shc-job {
    font-size: 16px; font-weight: 600; color: var(--sh-text) !important;
    opacity: 0.7; margin: 0;
}

/* --- СІТКА --- */
.shc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: var(--space-5, 20px);
    width: 100%;
    max-width: 100%; 
    padding: var(--space-2, 8px) 0;
}

/* --- КНОПКИ (ЗАВЖДИ ПО ЦЕНТРУ) --- */
.shc-card-btn {
    position: relative;
    display: flex;
    flex-direction: row;     /* Рядок */
    align-items: center;     /* Центр по вертикалі */
    justify-content: center; /* Центр по горизонталі (ГОЛОВНЕ) */
    
    text-align: left;
    width: 100%;
    min-height: 100px; 
    padding: var(--space-5, 20px);
    gap: var(--space-4, 16px);
    
    background: var(--lg-surface-bg, var(--sh-pill-bg, var(--glass-bg))) !important;
    border: 1px solid var(--lg-surface-border, var(--sh-menu-border, var(--border-subtle))) !important;
    box-shadow: var(--lg-shadow-soft, var(--shadow-sm)), var(--lg-inner-highlight), var(--sh-3d-shadow, none) !important;
    border-radius: var(--sh-ui-card-radius, var(--radius-2xl, 24px)) !important;
    color: var(--text-primary, var(--sh-text)) !important;
    font-weight: 800 !important; 
    font-size: 14px !important;
    text-transform: none;
    letter-spacing: normal;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    z-index: 1;
}

.shc-card-btn:focus-visible {
    outline: none;
    box-shadow: var(--lg-shadow-soft, var(--shadow-sm)), var(--lg-inner-highlight), var(--sh-ui-focus-ring) !important;
}

.shc-card-btn:active {
    transform: scale(var(--lg-press-scale, 0.98)); 
    box-shadow: var(--shadow-xs, 0 1px 3px rgba(0,0,0,0.03)) !important;
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .shc-card-btn,
    .shc-avatar {
        backdrop-filter: var(--lg-blur, blur(var(--glass-blur, 20px)));
        -webkit-backdrop-filter: var(--lg-blur, blur(var(--glass-blur, 20px)));
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .shc-card-btn,
    .shc-avatar {
        background: var(--bg-surface-solid, #ffffff) !important;
    }
}

/* --- ІКОНКА --- */
.shc-card-icon {
    width: var(--icon-size-md, 48px);
    height: var(--icon-size-md, 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--icon-size-md, 48px); /* Не стискатись */
    margin: 0;
}

.shc-card-icon img {
    width: 100%; height: 100%; object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* --- ТЕКСТ КНОПКИ --- */
.shc-card-title {
    width: auto;
    flex: 0 1 auto; /* Гнучка ширина */
    line-height: 1.2;
}

/* --- HERO IMAGE --- */
.shc-hero-img {
    display: block;
    margin: var(--space-7, 28px) auto var(--space-3, 12px) auto; 
    width: auto; max-width: 100%; max-height: 280px;
    background: transparent !important; border: none !important;
    box-shadow: none !important; border-radius: 0 !important; 
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.25));
}

/* --- РОЗДІЛЮВАЧ --- */
.shc-divider {
    width: 100%; text-align: center;
    font-size: 18px; font-weight: 800; text-transform: none; letter-spacing: normal;
    margin: 10px 0 30px 0; color: var(--text-primary, var(--sh-text)) !important;
    opacity: var(--text-muted-opacity, 0.85);
}

/* --- АДАПТИВНІСТЬ --- */
@media (min-width: 768px) {
    .shc-grid { gap: var(--space-6, 24px); margin: 0 auto 30px auto; }
    
    /* Тут ми більше НЕ змінюємо justify-content на flex-start */
    /* Текст залишається по центру */
    .shc-card-title { font-size: 16px !important; }
}

@media (max-width: 600px) {
    .shc-hero-img { max-height: 220px !important; margin-bottom: var(--space-5, 20px); }
}

/* --- ЛОГІКА РОЗТЯГУВАННЯ --- */
/* Розтягуємо останню непарну кнопку, але контент залишається по центру */
.shc-grid > .shc-card-btn:last-child:nth-child(odd) {
    grid-column: 1 / -1; 
}
