/* Garante título centrado */
.site-title {
  text-align: center;
  width: 100%;
}

.menu {
  display: block;
}

/* Estilo do botão de menu */
.menu-toggle {
  color: white;
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Media query para telemóveis */
@media (max-width: 600px) {
  body {
    padding: 0;
  }

  .wrapper {
    padding: 3rem 2rem;
  }
  
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .menu-toggle {
    display: block;
    margin-bottom: 1rem;
  }

  .menu {
    margin-top: 10px;
    width: 100%;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.8s ease-in-out;
  }

  .menu ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0;
  }
  
  .menu .underline {
    display: none;    
  }

  .card {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .project-detail {
    padding: .8rem;
    width: 98%;
    padding-top: 45px;
    max-height: calc(100vh - env(safe-area-inset-top) - 2vh);
  }

  #project-window .project-content {
    flex-direction: column-reverse;
  }

  #project-window .project-content .right-content,
  #project-window .project-content .right-content .media-container {
    width: 100%;
  }

  .close-btn {
    width: 100%;
    font-size: 20px;
    border-radius: 0;
  }

  .media-container iframe,
  .media-container img {
    height: 200px;
  }
}

@media screen and (max-width: 860px) and (min-width: 600px) {
  .site-title {
    font-size: 2rem;
  }

  .subtitle {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 25px;
  }
  
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .menu {
    margin-left: 0;
  }
}
