/* /css/profile.css */

.vm-side-card{
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.06);
}

.vm-side-top{
  display:flex;
  gap:12px;
  align-items:center;
  padding:14px;
  background: linear-gradient(135deg, rgba(160,220,255,.35), rgba(190,210,255,.22), rgba(160,255,230,.18));
}

.vm-side-avatar{
  width:64px;
  height:64px;
  border-radius: 16px;
  overflow:hidden;
  background:#e9ecef;
  flex:0 0 auto;
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
  border: 1px solid rgba(255,255,255,.7);
}

.vm-side-avatar img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.vm-side-avatar-ph{
  width:100%;
  height:100%;
  background: linear-gradient(135deg, rgba(160,220,255,.7), rgba(210,210,255,.55), rgba(160,255,230,.5));
}

.vm-side-user{ min-width:0; }

/* щоб ПІБ не різало в один рядок — даємо 2 рядки */
.vm-side-name{
  font-weight: 800;
  font-size: 16px;
  line-height: 1.15;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-width: 100%;
}

.vm-side-username{
  margin-top: 3px;
  color: rgba(0,0,0,.55);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vm-side-menu a{
  display:flex;
  gap:10px;
  align-items:center;
  padding: 12px 14px;
  text-decoration:none;
  color:#1f2d3d;
  border-top: 1px solid rgba(0,0,0,.06);
  font-weight: 600;
}

.vm-side-menu a:hover{
  background: rgba(13,110,253,.06);
}

.vm-side-menu a.active{
  background:#0d6efd;
  color:#fff;
}

.vm-ico{
  width:22px;
  display:inline-flex;
  justify-content:center;
  opacity:.9;
}

/* ===== Profile hero (cover + avatar) ===== */

.profile-hero{
  border-radius: 18px;
  position: relative;

  /* параметри */
  --cover-h: 320px;
  --avatar: 132px;
  --overlap: 54px; /* наскільки аватар перекриває білий блок */
}

.profile-cover{
  position: relative;
  height: var(--cover-h);
  background: #e9ecef;
  overflow: hidden;
}

.profile-cover-bg,
.profile-cover-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

.profile-cover-bg{
  object-fit: cover;
  filter: blur(18px);
  transform: scale(1.08);
  opacity: .55;
}

.profile-cover-img{
  object-fit: contain;   /* НЕ обрізаємо */
}

.profile-cover-empty{
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, rgba(160,220,255,.6), rgba(210,210,255,.45), rgba(160,255,230,.35));
}

/* Аватар поверх hero і перекриває біле поле */
.profile-avatar{
  position:absolute;
  right: 18px;
  top: calc(var(--cover-h) - var(--avatar) + var(--overlap));

  width: var(--avatar);
  height: var(--avatar);
  border-radius: 20px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 16px 30px rgba(0,0,0,.18);
  border: 1px solid rgba(0,0,0,.06);
  overflow:hidden;
  z-index: 20;
}

/* ✅ Заповнюємо поле БЕЗ білих полос */
.profile-avatar img{
  width: 100% !important;
  height: 100% !important;
  border-radius: 16px;
  object-fit: cover !important;      /* було contain */
  object-position: center !important;
  display:block !important;
}

.profile-avatar-placeholder{
  width:100%;
  height:100%;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(160,220,255,.7), rgba(210,210,255,.55), rgba(160,255,230,.5));
}

.profile-head{
  padding-top: 70px;
}

/* Mobile */
@media (max-width: 768px){
  .profile-hero{
    --cover-h: 240px;
    --avatar: 108px;
    --overlap: 44px;
  }

  .profile-avatar{
    right: 14px;
    border-radius: 18px;
  }

  .profile-avatar img,
  .profile-avatar-placeholder{ border-radius: 14px; }

  .profile-head{ padding-top: 58px; }
}