








.hh-tc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 20px; }

@media (max-width: 1000px) { .hh-tc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 599px)  { .hh-tc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.hh-tc {
  --hh-tc-navy: #051c2c; --hh-tc-accent: #2a5bd4; --hh-tc-soft: #eef3fd; --hh-tc-line: #e3e8ef; --hh-tc-muted: #5b6b7f;
  box-sizing: border-box; position: relative; min-width: 0; height: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; align-content: start;
  grid-template-areas: "media" "name" "title" "acts";
  background: #fff; border: 1px solid var(--hh-tc-line); border-radius: 20px; padding: 10px 10px 16px;
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--hh-tc-navy); text-align: center;
  overflow-wrap: anywhere;
}
.hh-tc *, .hh-tc-dialog * { box-sizing: border-box; }
.hh-tc svg, .hh-tc-dialog svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hh-tc svg .f, .hh-tc-dialog svg .f { fill: currentColor; stroke: none; }


.hh-tc-media { grid-area: media; position: relative; aspect-ratio: 4 / 5; border-radius: 15px; overflow: hidden; background: linear-gradient(160deg, #e8eefb, #d5e0f7); }
.hh-tc-photo { position: absolute; inset: 0; display: grid; place-items: center; }


.hh-tc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hh-tc-pos, 50% 22%); transform: scale(var(--hh-tc-zoom, 1)); transform-origin: var(--hh-tc-pos, 50% 22%); border-radius: 15px; display: block; }
.hh-tc-ini { font-size: clamp(34px, 6vw, 56px); font-weight: 800; letter-spacing: .03em; color: var(--hh-tc-accent); line-height: 1; }
.hh-tc-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s ease;
  background: linear-gradient(180deg, rgba(5, 28, 44, .28) 0%, rgba(5, 28, 44, 0) 26%, rgba(5, 28, 44, .18) 50%, rgba(5, 28, 44, .9) 100%);
}


.hh-tc-name { grid-area: name; margin: 14px 4px 0; height: 28px; font-size: 19px; line-height: 28px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; color: var(--hh-tc-navy); }
.hh-tc-title { grid-area: title; margin: 2px 4px 0; height: 22px; font-size: 15px; line-height: 22px; font-weight: 700; color: var(--hh-tc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.hh-tc-info {
  grid-area: media; align-self: start; justify-self: end; z-index: 2; margin: 10px;
  width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--hh-tc-navy);
  box-shadow: 0 6px 18px rgba(5, 28, 44, .25); opacity: 0; transition: opacity .2s ease, transform .2s ease;
}
.hh-tc-info svg { width: 24px; height: 24px; }
.hh-tc-info:hover { transform: scale(1.06); }


.hh-tc-acts {
  grid-area: media; align-self: end; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 0 14px 14px; text-align: left; opacity: 0; transition: opacity .2s ease; min-width: 0;
}
.hh-tc-tel {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; max-width: 100%; color: #fff; text-decoration: none;
  font-size: 16px; font-weight: 800; letter-spacing: .01em; white-space: nowrap; text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}
.hh-tc-tel span { overflow: hidden; text-overflow: clip; }
.hh-tc-tel:hover span { text-decoration: underline; text-underline-offset: 3px; }
.hh-tc-btns { display: flex; gap: 8px; }
.hh-tc-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; text-decoration: none;
  background: #fff; color: var(--hh-tc-navy); box-shadow: 0 6px 16px rgba(0, 0, 0, .22); transition: transform .15s ease;
}
.hh-tc-btn:hover { transform: translateY(-1px); }
.hh-tc-li { background: #0a66c2; color: #fff; }


.hh-tc:hover .hh-tc-media::after, .hh-tc:focus-within .hh-tc-media::after, .hh-tc-force .hh-tc-media::after,
.hh-tc:hover .hh-tc-info, .hh-tc:focus-within .hh-tc-info, .hh-tc-force .hh-tc-info,
.hh-tc:hover .hh-tc-acts, .hh-tc:focus-within .hh-tc-acts, .hh-tc-force .hh-tc-acts { opacity: 1; }
.hh-tc-info:focus-visible, .hh-tc-tel:focus-visible, .hh-tc-btn:focus-visible, .hh-tc-dlg-close:focus-visible { outline: 3px solid #a9c1ff; outline-offset: 2px; }


@media (hover: none) {
  .hh-tc-info { opacity: 1; width: 44px; height: 44px; margin: 8px; }
  .hh-tc-media::after { display: none; }
  .hh-tc-acts {
    grid-area: acts; align-self: stretch; opacity: 1; padding: 8px 2px 0; height: 104px; gap: 6px; align-items: center;
  }
  .hh-tc a.hh-tc-tel[href^="tel"] { color: var(--hh-tc-navy) !important; }
  .hh-tc-tel { text-shadow: none; font-size: 15px; justify-content: center; }
  .hh-tc-tel svg { color: var(--hh-tc-accent); width: 18px; height: 18px; }
  .hh-tc-btn { box-shadow: none; border: 1px solid var(--hh-tc-line); }
  .hh-tc-li { border-color: #0a66c2; }
}

@media (hover: none) and (max-width: 1000px) { .hh-tc-tel svg { display: none; } .hh-tc-tel { font-size: 14px; letter-spacing: 0; gap: 0; } }

@media (hover: none) and (max-width: 379px) {
  .hh-tc-tel { font-size: 13px; white-space: normal; text-align: center; line-height: 16px; }
  .hh-tc-tel span { overflow: visible; }
}
@media (max-width: 379px) { .hh-tc { padding: 8px 8px 12px; } .hh-tc-info { margin: 6px; } }


@media (max-width: 1000px) {
  .hh-tc-name { height: 48px; font-size: 17px; line-height: 24px; white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: normal; word-break: normal; }
  .hh-tc-title { height: 40px; font-size: 14px; line-height: 20px; white-space: normal; text-overflow: clip; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow-wrap: normal; word-break: normal; }
}


.hh-tc-dialog {
  width: calc(100% - 32px); max-width: 680px; max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 20px;
  color: #051c2c; background: #fff; box-shadow: 0 30px 80px rgba(5, 28, 44, .35); overflow: auto; overflow-wrap: anywhere;
  font-family: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif; text-align: left;
}
.hh-tc-dialog::backdrop { background: rgba(5, 28, 44, .6); }
.hh-tc-dlg-in { position: relative; padding: 26px 26px 28px; }
.hh-tc-dlg-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f1f4f9; color: #051c2c; font-size: 26px; line-height: 1; cursor: pointer; }
.hh-tc-dlg-close:hover { background: #e3e8ef; }
.hh-tc-dlg-head { display: flex; align-items: center; gap: 18px; padding-right: 48px; }
.hh-tc-dlg-photo { flex: none; width: 104px; height: 130px; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #e8eefb, #d5e0f7); display: grid; place-items: center; }
.hh-tc-dlg-photo img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hh-tc-pos, 50% 22%); transform: scale(var(--hh-tc-zoom, 1)); transform-origin: var(--hh-tc-pos, 50% 22%); border-radius: 14px; display: block; }
.hh-tc-dlg-photo .hh-tc-ini { font-size: 34px; }
.hh-tc-dlg-name { margin: 0; font-size: 23px; line-height: 1.25; font-weight: 800; }
.hh-tc-dlg-title { margin: 4px 0 0; font-size: 15px; font-weight: 700; color: #5b6b7f; }
.hh-tc-dlg-area { margin: 2px 0 0; font-size: 14px; color: #5b6b7f; }
.hh-tc-dlg-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.hh-tc-dlg-tags li { padding: 4px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #2a5bd4; background: #eef3fd; }
.hh-tc-dlg-bio { margin: 16px 0 0; font-size: 16px; line-height: 1.7; color: #374151; }
.hh-tc-dlg-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e3e8ef; }
.hh-tc-dlg-acts a.hh-tc-tel[href^="tel"] { color: #051c2c !important; } .hh-tc-dlg-acts .hh-tc-tel { text-shadow: none; } 
.hh-tc-dlg-acts .hh-tc-tel svg { color: #2a5bd4; }
.hh-tc-dlg-acts .hh-tc-btn { box-shadow: none; border: 1px solid #e3e8ef; }
.hh-tc-dlg-acts .hh-tc-li { border-color: #0a66c2; }
@media (max-width: 520px) {
  .hh-tc-dlg-in { padding: 20px 16px 22px; }
  .hh-tc-dlg-head { gap: 14px; }
  .hh-tc-dlg-photo { width: 84px; height: 105px; }
  .hh-tc-dlg-name { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .hh-tc-media::after, .hh-tc-info, .hh-tc-acts, .hh-tc-btn { transition: none; } }
@media (prefers-reduced-motion: no-preference) { .hh-tc-dialog[open] { animation: hh-tc-in .18s ease-out; } }
@keyframes hh-tc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
