/* ---------------------------------------------------------------------------
   Reset e Configurações Iniciais
--------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------------------------------------------------------------------------
   Variáveis de Cores
--------------------------------------------------------------------------- */
:root {
  --rosa-principal: #FFB6C1;
  --rosa-claro:    #FFE4E1;
  --branco:        #FFFFFF;
  --cinza:         #4A4A4A;
}

/* ---------------------------------------------------------------------------
   Tipografia Global
--------------------------------------------------------------------------- */
body, p, .yusei-magic-regular {
  font-family: "Yusei Magic", sans-serif;
  color: var(--cinza);
  line-height: 1.6;
  background: var(--branco);
  max-width: 100%;
  overflow-x: hidden;
}

.yusei-magic-regular {
  font-weight: 400;
  font-style: normal;
}

h1 {
  font-family: 'Yusei Magic', cursive;
}

/* ---------------------------------------------------------------------------
   Menu Fixo
--------------------------------------------------------------------------- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--rosa-principal);
  padding: 1rem 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

nav a {
  color: var(--branco);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 5px;
  transition: all 0.3s;
}

nav a:hover {
  color: var(--rosa-claro);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

#menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--branco);
  cursor: pointer;
  padding: 0 1rem;
}

/* ---------------------------------------------------------------------------
   Responsividade do Menu (até 768px)
--------------------------------------------------------------------------- */
@media (max-width: 768px) {
  nav {
    padding: 0.8rem 1rem;
  }

  nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--rosa-principal);
    flex-direction: column;
    padding: 1rem 0;
    gap: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  nav ul.ativo {
    display: flex;
  }

  nav ul li {
    text-align: center;
    padding: 0.8rem;
  }

  nav a {
    width: 80%;
    margin: 0 auto;
    display: block;
  }

  #menu-toggle {
    display: block;
  }
  
  nav ul {
    gap: 1.5rem; /* Ajuste de espaçamento no menu */
  }
}

/* ---------------------------------------------------------------------------
   Cabeçalho e Seção "Sobre"
--------------------------------------------------------------------------- */
header {
  padding: 8rem 20px 6rem;
  max-width: 1200px;
  margin: 0 auto 6rem;
}

#sobre {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 70px;
  align-items: start;
}

header img {
  width: 100%;
  height: 400px;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--rosa-principal);
  box-shadow: 0 4px 25px rgba(0,0,0,0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

header img:hover {
  transform: scale(1.08) rotate(2deg);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.header-content {
  padding-top: 2rem;
}

header h1 {
  font-size: 3rem;
  color: var(--cinza);
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
}

header h1::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 120px;
  height: 6px;
  background: var(--rosa-principal);
  border-radius: 3px;
  transform: translateX(-50%);
}

.bio-text {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 800px;
}

/* Responsividade do Cabeçalho (até 768px) */
@media (max-width: 768px) {
  header {
    padding: 4rem 20px 4rem;
    margin-bottom: 4rem;
  }

  #sobre {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  header img {
    height: 300px;
    width: 300px;
    margin: 0 auto;
  }

  header h1 {
    font-size: 2.2rem;
    text-align: center;
  }

  header h1::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .bio-text {
    text-align: center;
    font-size: 1.1rem;
  }
}

/* ---------------------------------------------------------------------------
   Ícones Sociais
--------------------------------------------------------------------------- */
.social-icons {
  position: relative;
  top: 10px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.social-icons a {
  color: var(--cinza);
  font-size: 3rem;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--rosa-principal);
}

/* ---------------------------------------------------------------------------
   Seções Gerais
--------------------------------------------------------------------------- */
section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--rosa-claro);
  text-align: center;
}

section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 0.5rem;
}

section h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 50px;
  height: 3px;
  background: var(--rosa-principal);
  border-radius: 2px;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------------------
   Seção Ferramentas
--------------------------------------------------------------------------- */
#ferramentas {
  padding: 10rem 0;
  background-color: var(--rosa-claro);
  text-align: center;
}

#ferramentas .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

#ferramentas::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: var(--rosa-claro);
  margin-bottom: 1rem;
}

#ferramentas h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
  color: #333;
}

/* Ícones e Layout das Ferramentas */
.linha-ferramentas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin: 50px auto;
  max-width: 1000px;
  padding: 0 30px;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.tool-item span {
  font-size: 1.2em;
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
}

.tool-item i {
  font-size: 3.5em;
  color: #ff9aa2;
}

.tool-item:hover i,
.tool-item:hover span {
  color: #e3d6df;
}

/* ---------------------------------------------------------------------------
   Seção de Contato
--------------------------------------------------------------------------- */
.contato-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contato-content ul {
  list-style: none;
  margin-top: 1.5rem;
  padding: 0;
}

.contato-content li {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ---------------------------------------------------------------------------
   Rodapé
--------------------------------------------------------------------------- */
footer {
  background: var(--rosa-claro);
  color: var(--branco);
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
}

/* ---------------------------------------------------------------------------
   Botão de Voltar ao Topo
--------------------------------------------------------------------------- */
#topoBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  background: var(--rosa-principal);
  color: var(--branco);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1100;
  transition: opacity 0.3s ease;
  display: none;
}

#topoBtn:hover {
  background: #ff9aa2;
}

/* ---------------------------------------------------------------------------
   Seção de Projetos
--------------------------------------------------------------------------- */
.projetos {
  padding: 80px 0;
  background: var(--branco);
  border-top: 4px solid transparent; /* corrigido para border-top completo */
}

.projetos .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.projetos-container {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1.5rem 0;
  align-items: stretch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.projetos-container::-webkit-scrollbar {
  display: none;
}

.projetos h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--cinza);
  text-align: center;
  position: relative;
}

.projetos h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 80px;
  height: 4px;
  background: var(--rosa-principal);
  border-radius: 2px;
  transform: translateX(-50%);
}

.projetos-wrapper {
  width: 100%;
}

/* Carrossel de projetos */
.projetos-carousel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 80px;
}

/* Botões do carrossel */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--rosa-principal);
  color: var(--branco);
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  opacity: 1;
}

.carousel-btn:hover {
  background: #ff9aa2;
  transform: translateY(-50%) scale(1.15);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.9);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-btn i {
  font-size: 1.5rem;
  color: var(--branco);
  transition: transform 0.3s ease;
}

.carousel-btn:hover i {
  transform: scale(1.2);
}

/* Cards de Projetos */
.projeto-card {
  width: 360px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--branco);
  border: 2px solid var(--rosa-claro);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  word-wrap: break-word;
  word-break: normal;
}

.projeto-card:hover {
  border-color: var(--rosa-principal);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  transform: translateY(-8px);
}

.projeto-content {
  flex-direction: column;
  display: flex;
  padding: 1.2rem;
  height: 100%;
  min-height: 500px;
  max-height: 500px;
  overflow: hidden;
}

.projeto-content h3 {
  font-size: 1rem;
  color: var(--cinza);
  margin-bottom: 0.8rem;
  line-height: 1.3;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  word-wrap: break-word;
  hyphens: auto;
  overflow-wrap: break-word;
  min-height: 2.8rem;
}

.projeto-imagem {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 0.8rem;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.projeto-card:hover .projeto-imagem {
  transform: scale(1.05);
}

.projeto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.projeto-tags span {
  background: var(--rosa-principal);
  color: var(--branco);
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.projeto-descricao {
  flex: 1;
  margin-bottom: 0.8rem;
  min-height: 100px;
  overflow: hidden;
}

.projeto-descricao p,
.projeto-descricao li {
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: justify;
  hyphens: auto;
  text-overflow: ellipsis;
  margin-bottom: 0.8rem;
}

.projeto-descricao li {
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.2rem;
}

.projeto-descricao strong {
  color: var(--cinza);
  font-weight: 500;
}

/* Links dos Projetos */
.projeto-links {
  margin-top: auto;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.github-btn,
.demo-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.github-btn {
  background: #4A4A4A;
  color: var(--branco);
}

.github-btn:hover {
  background: #333;
  transform: translateY(-2px);
}

.demo-btn {
  background: var(--rosa-principal);
  color: var(--branco);
}

.demo-btn:hover {
  background: #ff9aa2;
  transform: translateY(-2px);
}

/* ---------------------------------------------------------------------------
   Responsividade para Projetos
--------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .projetos h2 {
    font-size: 2rem;
  }

  .projetos-carousel {
    padding: 0 60px;
  }

  .projetos-container {
    gap: 1.5rem;
    padding: 1.5rem 0;
  }

  .projeto-card {
    min-width: 280px;
    max-width: 320px;
  }

  .projeto-content {
    padding: 1rem;
  }

  .projeto-content h3 {
    font-size: 1.2rem;
  }

  .projeto-imagem {
    height: 180px;
  }

  .projeto-links {
    flex-direction: column;
  }

  .github-btn,
  .demo-btn {
    justify-content: center;
  }

  .carousel-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .carousel-btn.prev {
    left: 5px;
  }

  .carousel-btn.next {
    right: 5px;
  }
}

@media (max-width: 480px) {
  .projetos .container {
    padding: 0 15px;
  }

  .projetos-carousel {
    padding: 0 50px;
  }

  .projetos-container {
    gap: 1rem;
    padding: 1rem 0;
  }

  .projeto-card {
    min-width: 260px;
    max-width: 300px;
  }

  .projeto-content {
    padding: 0.8rem;
  }

  .projeto-imagem {
    height: 150px;
  }

  .projeto-tags span {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .carousel-btn {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .carousel-btn.prev {
    left: 2px;
  }

  .carousel-btn.next {
    right: 2px;
  }
}
