/* ============================================================
   BRANX — PORTFÓLIO DE VÍDEOS
   style.css
   Mobile-first | Preto premium + Laranja vibrante
   ============================================================ */

/* ------------------------------------------------------------
   1. VARIÁVEIS & RESET
   ------------------------------------------------------------ */
:root {
  --orange:       #ff6a00;
  --orange-dim:   rgba(255, 106, 0, 0.18);
  --black:        #050505;
  --black-card:   #111111;
  --black-soft:   #1a1a1a;
  --white:        #ffffff;
  --text-primary: #ffffff;
  --text-muted:   rgba(255, 255, 255, 0.68);
  --text-faint:   rgba(255, 255, 255, 0.35);
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-full:  999px;
  --transition:   0.2s ease;
  --max-w:        480px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--black);
  background-image:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255,106,0,.06) 0%, transparent 70%);
  color: var(--text-primary);
  font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Utilitário */
.hidden {
  display: none !important;
}


/* ------------------------------------------------------------
   2. CONTAINER
   ------------------------------------------------------------ */
#app {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding-bottom: 96px;
}


/* ------------------------------------------------------------
   3. PROFILE HEADER
   ------------------------------------------------------------ */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 24px 20px;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.profile-header__logo {
  width: 148px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#profileLogo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 360px) {
  .profile-header__logo {
    width: 120px;
  }
}

.profile-header__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.profile-description {
  font-size: 13.5px;
  color: var(--text-muted);
  text-align: center;
  max-width: 320px;
  line-height: 1.6;
}


/* ------------------------------------------------------------
   4. REDES SOCIAIS
   ------------------------------------------------------------ */
.social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.social-links a svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.social-links a:hover,
.social-links a:focus-visible {
  border-color: var(--orange);
  color: var(--white);
  background: rgba(255,106,0,.10);
}


/* ------------------------------------------------------------
   5. SEÇÃO EQUIPE
   ------------------------------------------------------------ */
.section-team {
  padding: 24px 24px 8px;
}

.section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.team-list {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.team-list::-webkit-scrollbar {
  display: none;
}

.team-member {
  flex: 0 0 72px;
  width: 72px;
}

.team-member a,
.team-member > .team-member__photo ~ .team-member__name {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
}

.team-member a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.team-member__photo {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--black-soft);
  background-color: var(--black-soft);
  transition: border-color var(--transition);
  flex-shrink: 0;
  display: block;
}

.team-member a:hover .team-member__photo,
.team-member a:focus-visible .team-member__photo {
  border-color: var(--orange);
}

.team-member__name {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}


/* ------------------------------------------------------------
   6. ABAS DE CATEGORIA
   ------------------------------------------------------------ */
.category-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 16px 24px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
}

.category-tab:hover,
.category-tab:focus-visible {
  color: var(--text-primary);
}

.category-tab.active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}


/* ------------------------------------------------------------
   7. GRID DE VÍDEOS
   ------------------------------------------------------------ */
.section-videos {
  padding: 16px 12px 0;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.video-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--black-card);
  cursor: pointer;
}

.video-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.video-card:hover .video-card__thumb {
  transform: scale(1.03);
}

/* Fallback para cards sem thumbnail ou com imagem quebrada */
.video-card--no-thumb {
  background:
    linear-gradient(160deg, #1a1a1a 0%, #0a0a0a 60%, #111111 100%);
}

.video-card--no-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255,106,0,.08) 0%, transparent 70%);
  pointer-events: none;
}

.video-card--no-thumb::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: rgba(255, 106, 0, 0.65);
  text-shadow: 0 0 20px rgba(255,106,0,.3);
  pointer-events: none;
  transition: color var(--transition), text-shadow var(--transition);
}

.video-card--no-thumb:hover::after {
  color: rgba(255, 106, 0, 0.95);
  text-shadow: 0 0 28px rgba(255,106,0,.55);
}

.video-card__thumb--empty {
  display: none;
}

.video-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.72) 0%,
    rgba(0,0,0,.08) 55%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
  gap: 2px;
}

.video-card__client {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-card__category {
  font-size: 10px;
  font-weight: 500;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .06em;
}


/* ------------------------------------------------------------
   8. REELS VIEW (FEED TELA CHEIA)
   ------------------------------------------------------------ */
.reels-view {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.reels-back {
  position: absolute;
  top: env(safe-area-inset-top, 16px);
  left: 16px;
  z-index: 110;
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background var(--transition);
}

.reels-back:hover,
.reels-back:focus-visible {
  background: rgba(255,106,0,.25);
}

.reels-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reels-nav {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 110;
}

.reels-nav__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 18px;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.reels-nav__btn:hover,
.reels-nav__btn:focus-visible {
  background: rgba(255,106,0,.35);
}

.reels-nav__btn svg {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}


/* ------------------------------------------------------------
   9. BOTÃO FLUTUANTE WHATSAPP
   ------------------------------------------------------------ */
.floating-whatsapp {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  right: 20px;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255,106,0,.38);
  transition: transform var(--transition), box-shadow var(--transition);
}

.floating-whatsapp:hover,
.floating-whatsapp:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(255,106,0,.55);
}

/* Ícone SVG inline injetado via JS — fallback */
.floating-whatsapp svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}


/* ------------------------------------------------------------
   10. ESTADOS VAZIOS & LOADING
   ------------------------------------------------------------ */
.empty-state {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
}

.skeleton {
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  background: linear-gradient(
    90deg,
    var(--black-card) 25%,
    var(--black-soft) 50%,
    var(--black-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ------------------------------------------------------------
   11. RESPONSIVO — tablet/desktop mínimo
   ------------------------------------------------------------ */
@media (min-width: 480px) {
  #app {
    border-left:  1px solid rgba(255,255,255,.05);
    border-right: 1px solid rgba(255,255,255,.05);
  }

  .video-grid {
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ------------------------------------------------------------
   12. REELS MOCK — conteúdo injetado pelo JS em #reelsContainer
   ------------------------------------------------------------ */
.reels-mock {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.reels-mock__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  display: block;
}

.reels-mock__info {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 28px 20px calc(env(safe-area-inset-bottom, 0px) + 28px);
  background: linear-gradient(
    to top,
    rgba(0,0,0,.88) 0%,
    rgba(0,0,0,.42) 55%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reels-mock__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.reels-mock__client {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.reels-mock__desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 300px;
}

.reels-mock__wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 11px 22px;
  border-radius: 12px;
  background: var(--orange);
  color: var(--white);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  align-self: flex-start;
  box-shadow: 0 2px 10px rgba(255,106,0,.22);
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}

.reels-mock__wa-btn:hover,
.reels-mock__wa-btn:focus-visible {
  background: #ff7a1a;
  box-shadow: 0 4px 16px rgba(255,106,0,.38);
  transform: translateY(-1px);
}

/* Cliente clicável */
.reels-mock__client--link {
  display: inline-block;
  text-decoration: none;
  color: var(--white);
  transition: color var(--transition);
}

.reels-mock__client--link:hover,
.reels-mock__client--link:focus-visible {
  color: var(--orange);
}

/* Etiqueta de categoria */
.reels-mock__category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 2px;
}

/* Botão toggle de informações */
.reels-mock__info-toggle {
  position: absolute;
  top: calc(env(safe-area-inset-top, 16px) + 4px);
  right: 16px;
  z-index: 110;
  font-size: 20px;
  color: rgba(255,255,255,.6);
  background: none;
  border: none;
  padding: 4px;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition);
}

.reels-mock__info-toggle:hover,
.reels-mock__info-toggle:focus-visible {
  color: var(--white);
}

/* Estado oculto da info via toggle */
.reels-mock__info--hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--transition), transform var(--transition);
}

.reels-mock__info {
  transition: opacity var(--transition), transform var(--transition);
}


/* ------------------------------------------------------------
   13. BRANX PLAYER — player HTML5 personalizado
   ------------------------------------------------------------ */
.branx-player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

/* — vídeo — */
.branx-player__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  display: block;
  background: #000;
}

/* — botão play central — */
.branx-player__center-play {
  position: relative;
  z-index: 20;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  pointer-events: auto;
}

.branx-player__center-play:hover,
.branx-player__center-play:focus-visible {
  background: rgba(255,106,0,.65);
  transform: scale(1.08);
}

.branx-player__center-play svg {
  width: 30px;
  height: 30px;
  fill: var(--white);
  margin-left: 3px;
}

/* — barra de controles — */
.branx-player__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  padding: 0 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
  transition: opacity 0.3s ease;
}

.branx-player__controls--hidden {
  opacity: 0;
  pointer-events: none;
}

/* — barra de progresso — */
.branx-player__progress {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,.22);
  border-radius: 2px;
  margin-bottom: 8px;
  cursor: pointer;
  touch-action: none;
}

.branx-player__progress:hover {
  height: 5px;
  margin-bottom: 6px;
}

.branx-player__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.1s linear;
}

.branx-player__progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0;
  transition: opacity var(--transition);
}

.branx-player__progress:hover .branx-player__progress-thumb {
  opacity: 1;
}

/* — linha de botões — */
.branx-player__row {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* — botões individuais — */
.branx-player__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 16px;
  flex-shrink: 0;
  transition: color var(--transition), transform var(--transition);
}

.branx-player__btn:hover,
.branx-player__btn:focus-visible {
  color: var(--white);
  transform: scale(1.1);
}

.branx-player__btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

/* botão empurrado para direita */
.branx-player__btn--right {
  margin-left: auto;
}

/* — tempo — */
.branx-player__time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  letter-spacing: .02em;
  padding: 0 4px;
}

/* — info overlay sobre o player reusa .reels-mock__info — */
.branx-player .reels-mock__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 25;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
  background: linear-gradient(
    to top,
    rgba(0,0,0,.82) 0%,
    rgba(0,0,0,.55) 35%,
    rgba(0,0,0,.20) 65%,
    transparent 100%
  );
  pointer-events: auto;
}

