/* ==========================================================================
   UP Developer — overrides sobre o tema Mivon (style.css)
   Carregado DEPOIS do style.css. Mantém o Mivon intacto e isola nossos ajustes.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Navbar — fundo único cobrindo logo + menu
   O Mivon põe o fundo translúcido só no .navbar-nav (atrás dos links); a logo
   fica fora. Movemos o fundo para o .container (envolve logo + menu + toggle)
   e zeramos o do .navbar-nav → vira uma barra só, atrás de tudo.
   -------------------------------------------------------------------------- */
.navbar .container {
  background: rgba(40, 40, 40, 0.4);
  -webkit-backdrop-filter: blur(6rem);
  backdrop-filter: blur(6rem);
  border-radius: 15px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 35px;
  padding-right: 35px;
}
.navbar .navbar-nav {
  background: transparent !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  margin-top: 0;
}
@media screen and (max-width: 991px) {
  /* no mobile o .container é full-width (padding:0); damos um respiro lateral
     pra barra não colar nas bordas da tela */
  .navbar .container {
    width: calc(100% - 30px) !important;
    max-width: none !important;
    margin-left: 15px;
    margin-right: 15px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 18px;
    padding-bottom: 18px;
  }
  /* logo e toggler já tinham margens de 30px; reduzimos pq agora há a barra */
  .navbar .logo {
    margin-left: 15px;
  }
  .navbar .navbar-toggler {
    margin-right: 15px;
  }
}

/* --------------------------------------------------------------------------
   Home / Hero — logo UP no centro do círculo, com glow (substitui o shape1.png)
   -------------------------------------------------------------------------- */
.hero-style1 .circle-button .hero-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  font-weight: 800;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -1px;
  color: #fff;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(221, 241, 96, 0.75);
}
/* halo/glow radial atrás da logo (cor de destaque #DDF160) */
.hero-style1 .circle-button .hero-logo-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  height: 170px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
              rgba(221, 241, 96, 0.45) 0%,
              rgba(221, 241, 96, 0.15) 42%,
              rgba(221, 241, 96, 0) 70%);
  border-radius: 50%;
  z-index: 1;
  pointer-events: none;
  animation: upGlowPulse 3.2s ease-in-out infinite;
}
@keyframes upGlowPulse {
  0%, 100% { opacity: 0.7;  transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.14); }
}
/* mobile: logo e glow maiores (estava pequeno demais) */
@media screen and (max-width: 768px) {
  .hero-style1 .circle-button .hero-logo-icon { font-size: 64px; }
  .hero-style1 .circle-button .hero-logo-icon::before { width: 220px; height: 220px; }
}

/* --------------------------------------------------------------------------
   Home / Hero — espaçamentos no mobile
   O Mivon usa padding-top: 200px no hero (desktop) e o media query mobile
   nunca reduz isso → vão enorme entre a navbar (55px, absolute) e o conteúdo.
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
  .hero-style1 {
    padding-top: 120px;
  }

  /* Logo do header 2x no mobile (Mivon limitava a 80px) */
  .navbar .logo.w-200px {
    max-width: 160px !important;
  }
}

@media screen and (max-width: 768px) {
  .hero-style1 {
    padding-top: 95px;
    padding-bottom: 50px;
  }

  /* gaps internos do hero um pouco menores no celular */
  .hero-style1 .col-lg-8 > .md-mb50 {
    margin-bottom: 30px !important;
  }
  .hero-style1 .md-mb80 {
    margin-bottom: 40px !important;
  }

  /* círculo giratório: sem o pull-up negativo e com respiro acima */
  .hero-style1 .circle-button {
    margin-top: 20px;
  }
}

/* --------------------------------------------------------------------------
   Portfólio (home) — cards colados à esquerda no mobile
   A .hr-container é uma .row com margin negativa, mas a seção tem padding 0
   (sem .container) → os cards vazam pra esquerda. No desktop essa margem é
   necessária pro scroll horizontal (GSAP), então só corrigimos no mobile.
   -------------------------------------------------------------------------- */


/* --------------------------------------------------------------------------
   Navbar: respiro do topo + margem lateral pra não colar nas bordas
   -------------------------------------------------------------------------- */
.navbar {
  margin-top: 20px;
  left: 30px;
  right: 30px;
  width: auto;
}
@media screen and (max-width: 991px) {
  .navbar {
    margin-top: 10px;
    left: 15px;
    right: 15px;
  }
}

/* --------------------------------------------------------------------------
   Hero da home — apresentação do título com mais presença
   - Eyebrow tag com dot animado
   - Título em 2 linhas: linha 1 leve, linha 2 destacada (gradient + underline)
   -------------------------------------------------------------------------- */
.hero-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  padding: 8px 18px 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.light .hero-eyebrow {
  color: rgba(20, 20, 20, 0.85);
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(0, 0, 0, 0.04);
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c79621;
  box-shadow: 0 0 0 0 rgba(199, 150, 33, 0.6);
  animation: heroDotPulse 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes heroDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(199, 150, 33, 0.55); }
  50%      { box-shadow: 0 0 0 10px rgba(199, 150, 33, 0); }
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
}

.hero-line-main {
  display: block;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.72);
}

body.light .hero-line-main {
  color: rgba(20, 20, 20, 0.7);
}

.hero-line-accent {
  display: block;
  position: relative;
  font-weight: 800;
  font-style: italic;
}

.hero-accent-text {
  color: #c79621;
  display: inline;
}

/* Responsivo: respeita a hierarquia .fs-75 mas garante leveza no mobile */
@media screen and (max-width: 767px) {
  .hero-headline { gap: 18px; }
  .hero-eyebrow {
    font-size: 11px;
    padding: 7px 14px 7px 12px;
  }
  .hero-line-accent { font-size: 0.92em; }
}

}

/* --------------------------------------------------------------------------
   Portfólio (home) — carrossel horizontal arrastável + autoplay suave
   - Cards menores que o original
   - Scroll suave nativo (scroll-behavior: smooth) com easing implícito
   - Autoplay com requestAnimationFrame (controlado via JS)
   - Pausa no hover/drag, retoma após
   -------------------------------------------------------------------------- */
.hr-sec { overflow: hidden; }

.hr-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  padding: 0 30px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: none;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  scroll-behavior: auto;
}
.hr-carousel::-webkit-scrollbar { display: none; }
.hr-carousel.is-dragging { cursor: grabbing; }
.hr-carousel.is-dragging a,
.hr-carousel.is-dragging img { pointer-events: none; }

.hr-slide {
  flex: 0 0 auto;
  width: 460px;
  max-width: 80vw;
}
/* Sobrescreve .hr-sec .fit-img (era 70vh min 480px → muito grande) */
.hr-sec .hr-carousel .fit-img {
  height: 56vh;
  min-height: 360px;
  max-height: 520px;
}
.hr-slide img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
.hr-slide a,
.hr-slide .butn-arrow { pointer-events: auto; }

@media screen and (max-width: 991px) {
  .hr-carousel { padding: 0 15px; gap: 16px; }
  .hr-slide { width: 320px; max-width: 85vw; }
  .hr-sec .hr-carousel .fit-img { height: 50vh; min-height: 320px; max-height: 460px; }
}

@media screen and (min-width: 1400px) {
  .hr-carousel { padding: 0 60px; }
  .hr-slide { width: 520px; }
}

/* --------------------------------------------------------------------------
   CTA Marquee — loop infinito sem buraco
   - Animação no pai .slide-har (não nos filhos .box)
   - Translate -50% com 4 cópias de .box → reset visualmente idêntico
   -------------------------------------------------------------------------- */
.cta-marquee .slide-har {
  display: flex;
  width: max-content;
  animation: cta-marquee-loop 60s linear infinite;
}
.cta-marquee .slide-har.st1 .box,
.cta-marquee .slide-har.st2 .box {
  animation: none !important;
}

@keyframes cta-marquee-loop {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   /projetos — grid clicável
   - 3 cols desktop, 2 cols tablet, 1 col mobile
   - card inteiro é <a> com hover sutil
   -------------------------------------------------------------------------- */
.projects-grid-sec { padding-top: 40px; padding-bottom: 80px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}
@media screen and (max-width: 991px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media screen and (max-width: 575px) {
  .projects-grid { grid-template-columns: 1fr; gap: 20px; }
}

.projects-grid__card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform .35s ease, border-color .35s ease, background .35s ease, box-shadow .35s ease;
}
body.light .projects-grid__card {
  background: rgba(0, 0, 0, 0.025);
  border-color: rgba(0, 0, 0, 0.08);
}
.projects-grid__card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 150, 33, 0.45);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  color: inherit;
}

.projects-grid__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #111;
}
.projects-grid__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.projects-grid__card:hover .projects-grid__media img { transform: scale(1.05); }

.projects-grid__body {
  padding: 24px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.projects-grid__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.projects-grid__tags span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.85);
}
body.light .projects-grid__tags span {
  border-color: rgba(0, 0, 0, 0.14);
  color: rgba(20, 20, 20, 0.8);
}

.projects-grid__title {
  font-size: 1.35rem;
  line-height: 1.2;
  margin: 4px 0 0;
}

.projects-grid__url {
  margin: 0;
  font-size: 13px;
  opacity: 0.7;
  word-break: break-all;
}

.projects-grid__cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c79621;
}
.projects-grid__cta svg {
  width: 18px;
  height: 18px;
  transition: transform .3s ease;
}
.projects-grid__card:hover .projects-grid__cta svg { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Carrossel home — slide-link clicável (card inteiro)
   -------------------------------------------------------------------------- */
.hr-slide--link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.hr-slide--link:hover { text-decoration: none; color: inherit; }

/* --------------------------------------------------------------------------
   Footer — após remover a barra superior, restaurar respiro no topo
   -------------------------------------------------------------------------- */
.footer-style1 .row.sm-marg { margin-top: 30px; }
@media screen and (max-width: 991px) {
  .footer-style1 .row.sm-marg { margin-top: 20px; }
}

/* --------------------------------------------------------------------------
   Blog post — fonte com padding bottom + labels Tags/Compartilhar sem quebrar
   -------------------------------------------------------------------------- */
.main-post .item > article p > em > a[rel*="nofollow"],
.main-post article p em {
  /* nada — fix abaixo é estrutural */
}

/* Garante respiro abaixo do bloco "Fonte:" antes da linha de tags */
.main-post article > div.text:last-child,
.main-post article > p:last-child {
  padding-bottom: 30px;
}

/* Labels "Tags:" e "Compartilhar:" não devem quebrar */
.main-post .tags > div:first-child,
.main-post .share-icon > div:first-child {
  white-space: nowrap;
  margin-right: 16px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Blog post — <code> com contraste WCAG AA (Lighthouse color-contrast)
   -------------------------------------------------------------------------- */
.main-post article code,
.main-post .text code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Menlo', monospace;
  font-size: 0.9em;
  background: rgba(255, 198, 79, 0.16);
  color: #ffd47a;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 198, 79, 0.3);
  white-space: nowrap;
}

body.light .main-post article code,
body.light .main-post .text code {
  background: rgba(199, 150, 33, 0.12);
  color: #6b4d10;
  border-color: rgba(199, 150, 33, 0.35);
}
