/* Arquivo para melhorias de responsividade em todos os tamanhos de tela */

/* Breakpoints:
   xs: 0-479px (telefones pequenos)
   sm: 480-767px (telefones maiores)
   md: 768-991px (tablets e dispositivos menores)
   lg: 992-1199px (laptops e dispositivos médios)
   xl: 1200-1599px (desktops)
   xxl: 1600px+ (telas grandes)
*/

/* ========== ESTILOS GLOBAIS RESPONSIVOS ========== */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  overflow-x: hidden;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== LAYOUT GERAL ========== */

/* Extra-pequeno: 0-479px (padrão - mobile first) */
.container-hero,
.container-sobre,
.skills-container,
.projects-container,
.contact-container,
.blog-container,
.terminal-container,
.footer-container {
  padding: 1rem;
  width: 100%;
  max-width: 100%;
}

section {
  padding: 3rem 1rem;
}

/* Pequeno: 480-767px */
@media (min-width: 480px) {
  .container-hero,
  .container-sobre,
  .skills-container,
  .projects-container,
  .contact-container,
  .blog-container,
  .terminal-container,
  .footer-container {
    padding: 1.5rem;
  }

  section {
    padding: 4rem 1.5rem;
  }
}

/* Médio: 768-991px */
@media (min-width: 768px) {
  .container-hero,
  .container-sobre,
  .skills-container,
  .projects-container,
  .contact-container,
  .blog-container,
  .terminal-container,
  .footer-container {
    padding: 2rem;
    max-width: 720px;
    margin: 0 auto;
  }

  section {
    padding: 5rem 2rem;
  }
}

/* Grande: 992-1199px */
@media (min-width: 992px) {
  .container-hero,
  .container-sobre,
  .skills-container,
  .projects-container,
  .contact-container,
  .blog-container,
  .terminal-container,
  .footer-container {
    max-width: 960px;
  }
}

/* Extra-grande: 1200px+ */
@media (min-width: 1200px) {
  .container-hero,
  .container-sobre,
  .skills-container,
  .projects-container,
  .contact-container,
  .blog-container,
  .terminal-container,
  .footer-container {
    max-width: 1140px;
  }
}

/* Super-grande: 1600px+ */
@media (min-width: 1600px) {
  .container-hero,
  .container-sobre,
  .skills-container,
  .projects-container,
  .contact-container,
  .blog-container,
  .terminal-container,
  .footer-container {
    max-width: 1480px;
  }
}

/* ========== NAVEGAÇÃO RESPONSIVA ========== */
@media (max-width: 767px) {
  .menu-container {
    padding: 0.5rem 1rem;
  }
  
  .logo-principal {
    font-size: 1.5rem;
  }
}

/* ========== HERO SECTION RESPONSIVA ========== */
.avatar-hero-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.avatar-hero {
  max-width: 220px;
  height: auto;
  border-radius: 50%;
  border: 5px solid var(--primary-color);
}

@media (min-width: 768px) {
  .avatar-hero-container {
    width: 40%;
    margin-bottom: 0;
  }

  .avatar-hero {
    max-width: 100%;
  }

  .conteudo-hero {
    width: 60%;
  }
}

/* ========== SECÇÕES RESPONSIVAS ========== */
/* Projetos */
.projects-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 580px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Blog */
.blog-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 580px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Formulário de contato */
.contact-form {
  width: 100%;
}

/* ========== AJUSTES DE TAMANHO DE TEXTO RESPONSIVOS ========== */
/* Extra-pequeno: até 479px */
.titulo-hero {
  font-size: 2rem;
  line-height: 1.2;
}

.titulo-secao,
.skills-title,
.projects-title,
.blog-title,
.contact-title {
  font-size: 2rem;
}

.descricao-hero,
.texto-sobre,
.projects-description,
.blog-description,
.contact-description {
  font-size: 1.1rem;
  line-height: 1.5;
}

/* Pequeno: 480-767px */
@media (min-width: 480px) {
  .titulo-hero {
    font-size: 2.3rem;
  }

  .descricao-hero,
  .texto-sobre {
    font-size: 1.15rem;
  }
}

/* Médio: 768-991px */
@media (min-width: 768px) {
  .titulo-hero {
    font-size: 3rem;
  }

  .titulo-secao,
  .skills-title,
  .projects-title,
  .blog-title,
  .contact-title {
    font-size: 2.3rem;
  }

  .descricao-hero,
  .texto-sobre,
  .projects-description,
  .blog-description,
  .contact-description {
    font-size: 1.25rem;
  }
}

/* Grande: 992px+ */
@media (min-width: 992px) {
  .titulo-hero {
    font-size: 3.5rem;
  }
}

/* ========== AJUSTES DE ELEMENTOS ESPECÍFICOS ========== */

/* Espaçamento do botão voltar ao topo em mobile */
@media (max-width: 767px) {
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
  }
  
  .pixel-arrow {
    font-size: 1.5rem;
  }
}

/* Versão expandida do botão para telas maiores - opcional */
@media (min-width: 1200px) {
  .back-to-top {
    width: 4rem;
    height: 4rem;
  }
  
  .pixel-arrow {
    font-size: 2rem;
  }
}

/* Corrigir overflow em cards */
.blog-card, 
.project-card {
  overflow: hidden;
  width: 100%;
}

/* Ajustes responsivos para o footer com foto */
@media (max-width: 480px) {
  .footer-logo-wrapper {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .footer-avatar {
    width: 60px;
    height: 60px;
  }
  
  .footer-logo-pixel {
    font-size: 2.2rem;
  }
}

@media (min-width: 481px) and (max-width: 767px) {
  .footer-avatar {
    width: 62px;
    height: 62px;
  }
  
  .footer-logo-pixel {
    font-size: 2.5rem;
  }
}

@media (min-width: 768px) {
  .footer-avatar {
    width: 65px;
    height: 65px;
  }
}

/* Ajustes para elementos decorativos em telas pequenas */
@media (max-width: 479px) {
  .pixel-corner {
    width: 24px;
    height: 24px;
  }
  
  .easter-egg-modal {
    width: 90%;
    max-width: 350px;
  }
}

/* Ajuste na barra de habilidades */
.skill-item {
  margin-bottom: 1.5rem;
}

/* Partículas e estrelas para não sobrecarregarem dispositivos móveis */
@media (max-width: 767px) {
  .stars-fixed-container .star-decoration {
    opacity: 0.5;
  }
}

/* Ajuste para o formulário de contato */
@media (max-width: 479px) {
  .contact-button {
    width: 100%;
    padding: 0.8rem;
  }
}

/* Cursor personalizado apenas em desktop */
@media (max-width: 767px) {
  .pixel-cursor {
    display: none !important;
  }
}

.terminal-body {
  overflow-x: auto;
  word-wrap: break-word;
}

/* Ajustes nas seções em telas pequenas */
@media (max-width: 480px) {
  .section-projects, .section-terminal, .section-blog, .section-contact {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}
/* Ajustes para animações pesadas em telas pequenas */
@media (max-width: 768px) {
  .heavy-animation {
    animation: none;
  }
}