/* =================================================================
   MOBILE.CSS — Responsividade para Dispositivos Móveis
   ================================================================= */

/* =================================================================
   RESET E AJUSTES GERAIS
   ================================================================= */

@media screen and (max-width: 768px) {
  body {
    overflow-x: hidden;
    width: 100%;
  }

  .interface {
    padding: 0 20px;
  }

  h2.titulo {
    font-size: 28px !important;
    line-height: 1.3 !important;
    padding: 0 10px;
  }

  h2.titulo span {
    display: inline;
  }

  /* Grid layout */
  .grid-layout {
    max-width: 100% !important;
    padding: 0;
  }

  /* Flex containers */
  .flex {
    flex-direction: column;
    align-items: center;
  }

  /* Espaçamento entre seções */
  section {
    margin-bottom: 0 !important;
  }
}

/* =================================================================
   HEADER / NAVBAR
   ================================================================= */

@media screen and (max-width: 768px) {
  header {
    padding: 0 16px;
  }

  header .grid-layout nav {
    height: 70px !important;
    padding: 0 4px;
  }

  .logo-text {
    font-size: 1.4rem !important;
    margin-left: 0 !important;
    gap: 2px;
  }

  /* Seletor de idioma — posicionado relativo ao flex do nav */
  .language-switcher {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
  }

  #current-language {
    width: 36px !important;
    height: 36px !important;
    padding: 3px;
  }

  .language-options {
    top: 45px !important;
    right: 0;
    padding: 6px;
  }

  .language-options button {
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  .language-options button img {
    width: 20px !important;
  }

  /* Menu hamburguer */
  .mobile-menu {
    display: block !important;
    cursor: pointer;
    z-index: 1000;
  }

  .mobile-menu div {
    width: 28px !important;
    height: 2px !important;
    background-color: #fff;
    margin: 6px;
    transition: 0.3s;
  }

  /* Nav aberta */
  .nav-list {
    position: fixed !important;
    top: 70px !important;
    right: 0;
    width: 100% !important;
    height: calc(100vh - 70px) !important;
    background-color: #0c0b16;
    flex-direction: column;
    padding-top: 60px !important;
    visibility: hidden;
    opacity: 0;
    transition:
      visibility 0.4s ease,
      opacity 0.4s ease,
      transform 0.4s ease;
    margin-right: 0 !important;
    gap: 0;
  }

  .nav-list.active {
    visibility: visible;
    opacity: 1;
  }

  .nav-list li {
    margin: 0 0 32px 0;
    opacity: 0;
  }

  .nav-list.active li {
    opacity: 1;
    animation: navLinkFade 0.5s ease forwards;
  }

  .nav-list.active li:nth-child(1) {
    animation-delay: 0.1s;
  }
  .nav-list.active li:nth-child(2) {
    animation-delay: 0.2s;
  }
  .nav-list.active li:nth-child(3) {
    animation-delay: 0.3s;
  }
  .nav-list.active li:nth-child(4) {
    animation-delay: 0.4s;
  }

  .nav-list li a {
    font-size: 1.8rem !important;
    padding: 12px 20px;
    display: block;
  }
}

@media screen and (max-width: 480px) {
  .logo-text {
    font-size: 1.2rem !important;
  }

  #current-language {
    width: 32px !important;
    height: 32px !important;
  }
}

/* =================================================================
   HERO / TOPO DO SITE
   ================================================================= */

@media screen and (max-width: 768px) {
  section.topo-do-site {
    padding: 120px 4% 60px !important;
  }

  section.topo-do-site .flex {
    flex-direction: column-reverse;
    gap: 40px;
    align-items: center;
    margin-right: 0 !important;
  }

  .topo-do-site .txt-topo-site {
    text-align: center;
    width: 100%;
  }

  .topo-do-site h1 {
    font-size: 24px !important;
    line-height: 1.4 !important;
    margin-bottom: 20px;
  }

  .topo-do-site .txt-topo-site p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin: 24px 0 !important;
  }

  .btn-contato {
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
  }

  .btn-contato button,
  .btn-contato .btn-cv {
    width: 100% !important;
    max-width: 280px !important;
    padding: 12px 32px !important;
    font-size: 1rem !important;
  }

  .topo-do-site .img-topo-site {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .topo-do-site .img-topo-site img {
    width: 85% !important;
    max-width: 300px;
    height: auto;
    margin: 0;
  }
}

@media screen and (max-width: 480px) {
  .topo-do-site h1 {
    font-size: 20px !important;
  }

  .topo-do-site .txt-topo-site p {
    font-size: 0.95rem !important;
  }

  .topo-do-site .img-topo-site img {
    width: 90% !important;
    max-width: 250px;
  }
}

/* =================================================================
   ESPECIALIDADES
   ================================================================= */

@media screen and (max-width: 768px) {
  section.especiliadades {
    padding: 60px 4% !important;
  }

  section.especiliadades .flex {
    flex-direction: column;
    gap: 24px;
  }

  .especiliadades .especialidades-box {
    width: 100% !important;
    padding: 32px 24px !important;
    margin-top: 0 !important;
    text-align: center;
  }

  .especiliadades .especialidades-box i {
    font-size: 56px !important;
  }

  .especiliadades .especialidades-box h3 {
    font-size: 22px !important;
    margin: 12px 0 !important;
  }

  .especiliadades .especialidades-box p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
}

@media screen and (max-width: 480px) {
  .especiliadades .especialidades-box {
    padding: 28px 20px !important;
  }

  .especiliadades .especialidades-box i {
    font-size: 48px !important;
  }

  .especiliadades .especialidades-box h3 {
    font-size: 20px !important;
  }
}

/* =================================================================
   SOBRE / ABOUT
   ================================================================= */

@media screen and (max-width: 768px) {
  section.sobre {
    padding: 60px 4% !important;
  }

  .sobre .grid-layout > div {
    flex-direction: column;
    padding: 24px !important;
    gap: 24px;
  }

  #creator-photo {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-height: 350px !important;
    order: 1;
  }

  #creator-photo h3 {
    font-size: 1rem !important;
    padding: 5px 14px !important;
    top: 12px !important;
    left: 12px !important;
  }

  .text-content {
    width: 100% !important;
    flex: 1 1 100% !important;
    text-align: center;
    order: 2;
  }

  .text-content h4 {
    font-size: 1rem !important;
    margin-bottom: 6px !important;
  }

  .text-content h2 {
    font-size: 1.6rem !important;
    margin-bottom: 6px !important;
  }

  .text-content h3 {
    font-size: 1.1rem !important;
    margin-bottom: 20px !important;
  }

  .text-content p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 24px !important;
    text-align: left;
  }

  .text-content nav ul {
    justify-content: center;
    gap: 12px;
  }

  .text-content nav ul li a {
    width: 44px !important;
    height: 44px !important;
  }

  .iconeAbout img {
    width: 22px !important;
    height: 22px !important;
  }
}

@media screen and (max-width: 480px) {
  #creator-photo {
    min-height: 280px !important;
  }

  .text-content h2 {
    font-size: 1.4rem !important;
  }

  .text-content h3 {
    font-size: 1rem !important;
  }

  .text-content p {
    font-size: 0.95rem !important;
  }
}

/* =================================================================
   MODELOS 3D
   ================================================================= */

@media screen and (max-width: 768px) {
  .modelos-3d {
    padding: 60px 4% !important;
  }

  .modelos-3d h2.titulo {
    font-size: 26px !important;
    margin-bottom: 32px !important;
  }

  /* 1 coluna no mobile */
  .modelos-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  /* Remove o comportamento de last-child que empurrava o card */
  .modelo-card:last-child {
    grid-column: auto !important;
    max-width: 100% !important;
    margin: 0;
  }

  .modelo-card {
    padding: 16px !important;
  }

  /* Canvas com altura menor para não ocupar a tela toda */
  .modelo-canvas {
    height: 260px !important;
  }

  .modelo-card h3 {
    font-size: 1.1rem !important;
    padding: 8px 0 !important;
  }

  .modelos-instrucao {
    font-size: 0.95rem !important;
    margin-top: 32px !important;
    padding: 0 8px;
  }
}

@media screen and (max-width: 480px) {
  .modelos-3d {
    padding: 50px 4% !important;
  }

  .modelo-canvas {
    height: 220px !important;
  }

  .modelo-card h3 {
    font-size: 1rem !important;
  }

  .modelos-instrucao {
    font-size: 0.9rem !important;
  }
}

/* =================================================================
   PORTFÓLIO
   ================================================================= */

@media screen and (max-width: 768px) {
  section.portfolio {
    padding: 60px 4% !important;
  }

  section.portfolio .flex {
    flex-direction: column;
    gap: 24px;
    align-items: center;
  }

  .img-port {
    width: 100% !important;
    max-width: 100% !important;
    height: 380px !important;
    margin: 0;
    border-radius: 20px;
    background-size: cover !important;
    background-position: 100% 0% !important;
    transition: background-position 8s ease-out !important;
  }

  .img-port:hover,
  .img-port:active,
  .img-port.touched {
    background-position: 100% 100% !important;
  }

  .img-port .overlay {
    font-size: 20px !important;
    border-radius: 20px;
    transition: opacity 0.5s ease !important;
  }

  .img-port:hover .overlay,
  .img-port:active .overlay,
  .img-port.touched .overlay {
    opacity: 1 !important;
  }

  .link-repositorio {
    margin-top: 40px !important;
    font-size: 1.1rem !important;
    text-align: center;
  }

  .link-repositorio i {
    font-size: 1.4rem !important;
  }
}

@media screen and (max-width: 480px) {
  .img-port {
    height: 320px !important;
    border-radius: 16px;
  }

  .img-port .overlay {
    font-size: 18px !important;
    border-radius: 16px;
  }

  .link-repositorio {
    font-size: 1rem !important;
  }
}

/* =================================================================
   SKILLS / CONHECIMENTOS
   ================================================================= */

@media screen and (max-width: 768px) {
  .section-skills {
    padding: 60px 4% !important;
  }

  .section-skills .grid-layout .skills {
    flex-direction: column;
    padding: 0;
  }

  .section-skills .grid-layout .skills > div,
  .section-skills .grid-layout .skills > article {
    width: 100% !important;
  }

  .section-skills .skills-text {
    min-height: auto !important;
    margin-bottom: 32px;
    text-align: center;
  }

  .section-skills .skills-text h2 {
    font-size: 1.6rem !important;
    margin-bottom: 20px !important;
  }

  .section-skills .skills-text .changeDescription {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    max-width: 100% !important;
    display: block !important;
    text-align: center;
  }

  .section-skills .skills-cards {
    margin-top: 0 !important;
    gap: 16px;
    justify-content: center;
  }

  .section-skills .skills-cards article {
    width: calc(50% - 8px) !important;
    max-width: 160px;
    height: 110px !important;
    flex-grow: 0 !important;
  }

  .section-skills .skills-cards article img {
    width: 48px !important;
    height: 48px !important;
  }
}

@media screen and (max-width: 480px) {
  .section-skills .skills-cards article {
    width: calc(50% - 8px) !important;
    max-width: 140px;
    height: 100px !important;
  }

  .section-skills .skills-cards article img {
    width: 42px !important;
    height: 42px !important;
  }

  .section-skills .skills-text h2 {
    font-size: 1.4rem !important;
  }

  .section-skills .skills-text .changeDescription {
    font-size: 0.95rem !important;
  }
}

/* =================================================================
   FOOTER
   ================================================================= */

@media screen and (max-width: 768px) {
  .site-footer {
    padding: 24px 4% !important;
  }

  .site-footer .grid-layout {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .site-footer p {
    font-size: 0.95rem !important;
  }

  .site-footer .footer-powered {
    justify-content: center;
  }

  .site-footer img {
    width: 28px !important;
  }

  footer .line-footer p {
    font-size: 0.9rem !important;
  }

  footer .line-footer p i {
    font-size: 18px !important;
  }
}

@media screen and (max-width: 480px) {
  .site-footer p {
    font-size: 0.9rem !important;
  }

  .site-footer img {
    width: 24px !important;
  }
}

/* =================================================================
   MELHORIAS DE TOQUE E INTERAÇÃO
   ================================================================= */

@media screen and (max-width: 768px) {
  /* Área mínima de toque */
  a,
  button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Remove hover em mobile (não faz sentido em touch) */
  .especialidades-box:hover,
  .skills-cards article:hover,
  button:hover,
  form .btn-enviar input:hover {
    box-shadow: none !important;
    transform: none !important;
  }

  /* Feedback de toque */
  .especialidades-box:active,
  button:active {
    opacity: 0.8;
    transform: scale(0.98);
  }

  /* Previne seleção de texto durante toque */
  .especialidades-box,
  .img-port,
  .skills-cards article {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

/* =================================================================
   ORIENTAÇÃO LANDSCAPE
   ================================================================= */

@media screen and (max-width: 768px) and (orientation: landscape) {
  section.topo-do-site {
    padding: 100px 4% 40px !important;
  }

  .topo-do-site .img-topo-site img {
    max-width: 200px !important;
  }

  #creator-photo {
    min-height: 260px !important;
  }

  .img-port {
    height: 280px !important;
  }

  .modelo-canvas {
    height: 200px !important;
  }
}

/* =================================================================
   TABLETS (769px – 992px)
   ================================================================= */

@media screen and (min-width: 769px) and (max-width: 992px) {
  header {
    padding: 0 32px;
  }

  .logo-text {
    font-size: 1.5rem !important;
    margin-left: 0 !important;
  }

  section.topo-do-site {
    padding: 140px 4% 80px !important;
  }

  .topo-do-site h1 {
    font-size: 32px !important;
  }

  .topo-do-site .txt-topo-site p {
    font-size: 1.1rem !important;
  }

  .img-port {
    height: 420px !important;
  }

  .section-skills .skills-cards article {
    width: calc(33.333% - 16px) !important;
    height: 120px !important;
  }

  /* Modelos 3D em tablet — 2 colunas */
  .modelos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px;
  }

  .modelo-canvas {
    height: 300px !important;
  }
}

/* =================================================================
   BOTÃO FLUTUANTE WHATSAPP
   ================================================================= */

.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  box-shadow: 0px 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 1000;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  background-color: #20ba5a;
  box-shadow: 0px 6px 20px rgba(37, 211, 102, 0.6);
  transform: scale(1.1);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

.whatsapp-float i {
  line-height: 1;
}

@keyframes pulse-whatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media screen and (max-width: 768px) {
  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 20px;
    right: 20px;
    font-size: 28px;
  }
}

@media screen and (max-width: 480px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
    font-size: 26px;
  }
}

/* =================================================================
   BARRA DE PROGRESSO DE SCROLL
   ================================================================= */

.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, #986dff 0%, #c99eff 100%);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 2px 8px rgba(152, 109, 255, 0.5);
}

.scroll-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  background-size: 50% 100%;
  animation: shine 2s infinite;
}

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

/* =================================================================
   BOTÃO SCROLL TO TOP
   ================================================================= */

.scroll-to-top {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #986dff 0%, #7c52d1 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(152, 109, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, #7c52d1 0%, #986dff 100%);
  box-shadow: 0 6px 20px rgba(152, 109, 255, 0.6);
  transform: translateY(-3px);
}

.scroll-to-top:active {
  transform: translateY(0) scale(0.95);
}

@media screen and (max-width: 768px) {
  .scroll-to-top {
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    font-size: 26px;
  }
}

@media screen and (max-width: 480px) {
  .scroll-to-top {
    bottom: 85px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

/* =================================================================
   FIM DO MOBILE.CSS
   ================================================================= */
