/* ==========================================================================
   trabalhos.html — portfólio para enviar a agências e clientes
   Usa style.css do site; aqui ficam só os ajustes desta página.
   ========================================================================== */

/* "Mostrar todos os projetos" abaixo do grid */
.tb-more { display: flex; justify-content: center; margin-top: clamp(24px, 3vw, 40px); }
.tb-more[hidden] { display: none; }

/* contagem nos filtros */
.pf-bar button small:empty { display: none; }

/* ---------- criações: duas faixas rolando em sentidos opostos ---------- */
.tb-rows {
  display: grid; gap: clamp(12px, 1.4vw, 20px); margin-top: clamp(32px, 4vw, 56px); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.tb-row { display: flex; width: max-content; animation: tbMove 90s linear infinite; }
.tb-row--story { animation-duration: 110s; }
.tb-row--rev { animation-direction: reverse; }
.tb-rows:hover .tb-row { animation-play-state: paused; }
.tb-set { display: flex; gap: clamp(12px, 1.4vw, 20px); padding-right: clamp(12px, 1.4vw, 20px); }
.tb-set img {
  flex: none; height: clamp(190px, 20vw, 290px); width: auto; aspect-ratio: 1;
  border-radius: var(--r); object-fit: cover; background: #e7e7e4;
}
.tb-row--story .tb-set img { height: clamp(300px, 30vw, 460px); aspect-ratio: 9 / 16; }
@keyframes tbMove { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tb-row { animation: none; }
  .tb-rows { overflow-x: auto; }
}

/* botão de WhatsApp com ícone */
.tb-wa svg { flex: none; margin-right: 2px; }

/* ---------- header: só o botão de WhatsApp (sem menu), visível também no celular ---------- */
.tb .header-r .btn { display: inline-flex; }
@media (max-width: 560px) { .tb .header-r .btn { padding-left: 14px; font-size: 13px; } }

/* ---------- clientes: grade fixa de logos ---------- */
.tb-clients .t-xl { margin-top: 14px; max-width: 18ch; }
.tb-logos {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1vw, 12px);
  margin-top: clamp(32px, 4vw, 56px);
}
.tb-logo {
  display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 0 clamp(14px, 1.8vw, 26px);
  border-radius: var(--r); background: var(--bg); transition: background .3s;
}
.tb-lg {
  display: block; width: 100%; max-width: 100%; aspect-ratio: var(--r);
  /* logos largos ocupam a largura; logos altos ficam limitados pela altura */
  max-height: clamp(34px, 3.8vw, 56px); width: min(100%, calc(clamp(34px, 3.8vw, 56px) * var(--r)));
  background-color: #6f6f6b; transition: background-color .3s;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
}
.tb-logo:hover { background: #ecece9; }
.tb-logo:hover .tb-lg { background-color: var(--ink); }
@media (max-width: 900px) { .tb-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tb-logo { aspect-ratio: 4 / 3; padding: 0 10px; border-radius: 12px; } .tb-lg { max-height: 30px; width: min(100%, calc(30px * var(--r))); } }

/* ---------- pop-up do projeto ---------- */
.tb-modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: flex-end; justify-content: center; }
.tb-modal[hidden] { display: none; }
.tb-modal-bg { position: absolute; inset: 0; background: rgba(12, 12, 12, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .35s; }
.tb-modal-panel {
  position: relative; display: flex; flex-direction: column; width: min(1360px, calc(100% - 2 * clamp(0px, 2vw, 28px)));
  height: calc(100% - clamp(16px, 3vh, 40px)); background: #fff; border-radius: 20px 20px 0 0; overflow: hidden;
  transform: translateY(40px); opacity: 0; transition: transform .5s var(--ease), opacity .35s;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .25);
}
.tb-modal.is-open .tb-modal-bg { opacity: 1; }
.tb-modal.is-open .tb-modal-panel { transform: none; opacity: 1; }
.tb-modal-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 clamp(14px, 2vw, 24px); border-bottom: 1px solid var(--line);
}
.tb-modal-bar b { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-modal-act { display: flex; gap: 8px; flex: none; }
.tb-mbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; min-width: 40px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; transition: border-color .25s, background .25s, color .25s;
}
.tb-mbtn:hover { border-color: var(--ink); }
.tb-mbtn--x { background: var(--ink); border-color: var(--ink); color: #fff; padding: 0 16px; }
.tb-mbtn--x span { font-size: 18px; line-height: 1; }
.tb-modal-body { position: relative; flex: 1; min-height: 0; background: #fff; }
.tb-modal-body iframe { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .35s; }
.tb-modal-body.is-ready iframe { opacity: 1; }
.tb-spin {
  position: absolute; left: 50%; top: 40%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--blue); animation: tbSpin .8s linear infinite;
}
.tb-modal-body.is-ready .tb-spin { display: none; }
@keyframes tbSpin { to { transform: rotate(360deg); } }
body.tb-lock { overflow: hidden; }
@media (max-width: 560px) {
  .tb-modal-panel { width: 100%; height: calc(100% - 10px); border-radius: 16px 16px 0 0; }
  .tb-modal-bar { height: 56px; }
  .tb-mbtn--x { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) { .tb-modal-panel, .tb-modal-bg { transition: none; } }

/* ---------- hero: título curto e maior, só o botão, mãos maiores saindo pelas bordas ---------- */
.tb .hero-title-wrap { --tb-fs: clamp(44px, 6.4vw, 96px); --half: calc(var(--tb-fs) * 4.95); }
.tb .hero-c .t-hero--2 { font-size: var(--tb-fs); }
.tb .hero-title-wrap .hero-hand { width: clamp(420px, 42vw, 720px); }
.tb .hero-title-wrap .hero-hand--l { right: calc(50% + var(--half) + 4px); }
.tb .hero-title-wrap .hero-hand--r { left: calc(50% + var(--half) + 4px); }
.tb .hero-c .hero-row { justify-items: center; }
.tb .hero-c .hero-ctas { justify-content: center; }

/* ---------- rodapé simples: logo + texto à esquerda, WhatsApp à direita ---------- */
.tb-fx-main { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px 48px; flex-wrap: wrap; }
.tb-fx-txt { margin-top: 18px; max-width: 34ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.45; color: #b8b8b8; }
.tb-fx-bottom { position: relative; z-index: 1; grid-template-columns: 1fr; margin-top: clamp(40px, 5vw, 64px); }
.tb-fx-bottom > span:last-child { justify-self: start; color: #8c8c8c; }
@media (max-width: 560px) { .tb-fx-main .btn { width: 100%; justify-content: space-between; } }
