/* botão hamburger (invisível no desktop) */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 5px;
}

/* ícones */
.icon-close { display: none; }

/* mobile: mostrar botão e transformar nav em painel */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }
  
  .navmenu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 70px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    transition: right 0.3s ease;
    padding: 20px;
    overflow-y: auto;
    z-index: 999;
  }
  
  .navmenu.active {
    right: 0;
  }
  
  .navmenu ul {
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }
  
  .navmenu li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .navmenu a {
    display: block;
    padding: 15px 0;
    width: 100%;
  }
}

/* troca de ícones via classe no header */
.nav-open .icon-hamburger { display: none; }
.nav-open .icon-close { display: inline; }

/* opcional: travar scroll ao abrir */
.no-scroll { overflow: hidden; }

/* ===== CARROSSEL AJUSTES MOBILE ===== */
@media (max-width: 768px) {

  /* Indicadores (dots) */
  .carousel .dot {
    width: 8px;
    height: 8px;
    border-width: 1.5px;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
  }

  .carousel .dot.active {
    opacity: 1;
    box-shadow: 0 0 6px #0d6efd;
  }

  .carousel .dot .loader {
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: conic-gradient(blue 0%, transparent 0%);
    mask-image: radial-gradient(circle at center, transparent 48%, black 49%);
    -webkit-mask-image: radial-gradient(circle at center, transparent 48%, black 49%);
    z-index: -1;
    opacity: 1;
    transition: background 0.3s;
  }

  /* Botões de controle */
  .carousel .controls button {
    font-size: 16px;
    padding: 6px 12px;
  }

  .carousel .controls {
    gap: 5px;
    bottom: 15px;
  }

  /* Imagens de fundo mobile */
  .carousel .slide:nth-of-type(1) {
    background-image: url('../imagens/imagemPrincipalDoInicioMobile.jpg') !important;
  }
  .carousel .slide:nth-of-type(2) {
    background-image: url('../imagens/imagemInicioConexãoDevMobile.jpg') !important;
  }
  .carousel .slide:nth-of-type(3) {
    background-image: url('../imagens/imagemInicioFerramentasMobile.jpg') !important;
  }
  .carousel .slide:nth-of-type(4) {
    background-image: url('../imagens/imagemInicioLojaMobile.jpg') !important;
  }

  /* Conteúdo centralizado */
  .carousel .slide .content {
    position: absolute;
    top: 40%; /* centralizado visualmente */
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: 90%;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
    z-index: 2;
    padding: 10px;
    box-sizing: border-box;
  }

  .slide.active .content {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  /* Tipografia mobile */
  .carousel .slide h1 {
    font-size: 2em;
    color: blue;
    white-space: normal; /* permite quebra de linha */
    opacity: 0;
    transform: translateX(-50px);
    transition: transform 2s ease, opacity 2s ease;
  }

  .slide.active h1 {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 1s;
  }

  .carousel .slide p {
    font-size: 1rem;
    opacity: 0;
    transform: translateX(50px);
    transition: transform 2s ease, opacity 2s ease;
  }

  .slide.active p {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 2s;
  }

  .carousel .slide h6 {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: transform 2s ease, opacity 2s ease;
  }

  .slide.active h6 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 3s;
  }

  /* Botão saiba mais */
  .carousel .btn-saiba-mais {
    display: inline-block;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
  }

  .slide.active .btn-saiba-mais {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 4s;
  }

  /* Sobrescreve o desktop para remover nowrap */
  .slide:first-of-type .digitando-h1{
    white-space: normal; /* permite quebra de linha no mobile */
    font-size: 3em;
  }
  .slide:nth-of-type(3) .digitando-h1 {
    font-size: 1.5em;
  }
  .slide:nth-of-type(3){
     top: 10%;
  }
  .slide:nth-of-type(4) .digitando-h1 {
    font-size: 1.5em;
  }
}

/* ===== VIDEO MOBILE ===== */
.video-desktop,
.video-mobile {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-mobile {
  display: none;
}

@media (max-width: 768px) {
  .video-desktop {
    display: none;
  }
  .video-mobile {
    display: block;
  }
}
