:root {
  --roxo-button: #5935AF;
}

* {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  scroll-behavior: smooth;
}


main {
  min-height:100vh;
  width: 100%;
  background-image: url("assets/background_home.png");
  background-size: cover;
}


p,a {
  font-size: 17px;
  font-weight: 300;
  color: #fff;
  text-decoration: none;
}

a {
  padding: 0 4%;
  position: relative;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}


h1 {
  font-size: 45px;
  font-weight: 500;
}

span {
  font-style: italic;
}

button , .btn_a {
  width: 30%;
  height: 50px;
  font-size: 12px;
  background-color: var(--roxo-button);
  box-shadow: 0 4px 4px 0 rgb(0, 0, 0, 0.2);
  color: #fff;
  border: 0;
  border-radius: 15px;
  margin-top: 25px;
}

#bt-serviços {
  width: 15%;
}

#just {
  justify-content: space-around;
  h1 {
    font-size: 42px;
  }
}

/* //////////////////////////////////////////////////////////////// */


header a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  border-bottom: 2px solid #fff;
  transition: width 0.3s ease, left 0.3s ease;
}


header a:hover::after {
  width: 100%;
  left: 0;
}


header {
  height: 50px;
  width: 100%;
  font-weight: 300;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  padding: 0 20px;
  color: #fff;
  border-bottom: 1px solid #fff;
  backdrop-filter: blur(5px);
  z-index: 10;
}

/* Links normais no desktop */
nav#nav-links {
  display: flex;
  gap: 20px;
  width: 100%;
  justify-content: center;

}

nav#nav-links a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  position: relative;
  padding: 16px 4%;
}


.menu-toggle {
  font-size: 30px;
  cursor: pointer;
  display: none;
}


header.hide {
  transform: translateY(-100%);
}


header.light {
  background-color: rgba(89, 53, 175, 0.7);
  backdrop-filter: blur(5px);
}


#home-page {
  display: flex;
  #home {
    width: 56%;
    color: #fff;
    align-items: center;
    margin: auto;
    height: 100%;
    h1 {
      width: 70%;
    }
    p {
      width: 550px;
      margin-top: 25px;
    }
  }
}


.flex {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 100px 0;
}


.branco {
  background-image: url("assets/borboleta\ fundo\ branco\ -\ Copia.PNG");
  background-size: contain;
  h1 {
    text-align: center;
    margin-bottom: 50px;
  }
  .card {
    width: 50%;
    margin: 0 auto;
    border-radius: 15px;
    background: linear-gradient(118deg, var(--roxo-button), rgba(89, 53, 175, 0.57));
    padding: 50px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100% - 200px);
    h1 {
      text-align: center;
      margin-bottom: 25px;
    };
    p {
      width: 80%;
    }
  }
}

.psicanalista {
  h1 {
    font-size: 35px;
    margin-bottom: 35px;
  }
  .card {
    justify-content: space-around;
    width: 50%;
    margin: 0 auto;
    border-radius: 15px;
    background: linear-gradient(118deg, var(--roxo-button), rgba(89, 53, 175, 0.57));
    padding: 50px;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: calc(100% - 200px);
  }
}


#serviços {
  height: fit-content;
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  span {
    color: var(--roxo-button);
  }
  .cards-services {
    display: flex;
    flex-direction: column;
  }
  #solo-p {
    text-align: center;
    align-items: center;
  }
  .card {
    align-items: start;
    margin: 15px auto;
    h1 {
      margin: 15px 0;
      text-align: left;
      font-style: italic;
      font-size: 35px;
    }
    p {
      width: 100%;
    }
  }
}


#atendimentos{
  .container {
    padding: 100px 0;
    display: flex;
    justify-content: center;  /* alinha horizontalmente */
    align-items: center;      /* alinha verticalmente */
    min-height: 100vh;
    .grid-layout {
      display: grid;
      grid-template-columns: repeat(2, 1fr); /* 2 colunas iguais */
      grid-template-rows: auto auto auto auto;    /* 3 linhas */
      gap: 20px;
      height: 80%;
      width: 80%;
      .topo {
        grid-column: 1 / 3;
        padding: 20px;
        font-weight: bold;
        h1 {
          width: 50%;
        }
      }
      .meio-5 {
        grid-column: 1/3;
      }

      .meio1 {
        text-align: start;
      }

      .meio2 {
        h1, p {
          text-align: start;
        }
        h1 {
          margin-bottom: 25px;
        }
      }

      .baixo1 {
        h1, p {
          text-align: start;
        }
        h1 {
          margin-bottom: 25px;
        }
      }

      .baixo2 {
        text-align: end;
      }

      /* Os outros blocos ocupam metade */
      .meio1, .meio2, .baixo1, .baixo2 {
        padding: 20px;
      }
    }
    h1 {
      color: #fff;
    }
    img {
      border-radius: 5px;
    }
  }
}


#depoimentos {
  min-height: 108vh;
  #text-top {
    padding: 100px 0;
    h1 {
      margin-bottom: 0;
    }
    #p-depoimentos {
      color: var(--roxo-button);
      text-align: center;
      font-style: italic;
    }
  }
  .container-dp {
    align-items: start;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    height: 50%;
    gap: 25px;
    margin: auto;
    width: 70%;
    padding-bottom: 100px;
    .card-dp {
      background: linear-gradient(118deg, var(--roxo-button), rgba(89, 53, 175, 0.57));
      border-radius: 15px;
      display: grid;
      padding: 25px;
      grid-template-columns: auto 1fr;
      grid-template-rows: auto auto;
      column-gap: 15px;
      row-gap: 15px;
      overflow: hidden;
      img {
        grid-column: 1;
      }
      div {
        grid-column: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
        img {
          width: fit-content;
        }
        p {
          text-align: start;
        }
      }
      p {
        grid-column: 1/3;
        max-height: 6em; /* ~3 linhas */
        overflow: hidden;
        text-overflow: ellipsis;
        transition: max-height .8s ease-in-out;
      }
      button {
        grid-column: 1/3;
        width: 100%;
        margin: 0;
      }
    }
  }
}


footer {
  background-color: var(--roxo-button);
  .container-footer {
    padding: 50px 0;
    width: 50%;
    margin: auto;
    div {
      margin: 25px 0;
    }
    h1 {
      color: #fff;
    }
    h6 {
      color: #fff;
      font-size: 25px;
      font-weight: 300;
    }
  }
.sub-footer {
  text-align: center;
  border-top: 1px solid #fff;
  padding: 25px 0;
}
}

/* ///////////////////////////////////////////////////////////////// */

/*  MEDIA QUERIES DO PROJETO*/

/* Responsivo para Desktop Médio */
@media (max-width: 1200px) {
  #home-page #home {
    width: 80%;
  }

  .branco .card,
  .psicanalista .card {
    width: 80%;
    padding: 30px;
  }

  #atendimentos .container .grid-layout {
    display: flex;
    flex-direction: column;
    width: 70%;
  }

  #depoimentos .container-dp {
    grid-template-columns: 1fr; /* 2 colunas */
    width: 70%;
  }

  #atendimentos .container .grid-layout .topo h1 {
    width: 100%;
  }

  .meio1 img {
    width: 100%;
  }

  .baixo2 img {
    width: 100%;
  }

  footer .container-footer {
    width: 80%;
  }
}

/* Responsivo para Tablets */
@media (max-width: 768px) {
  header {
    padding: 0;
  }
  header #nav-links a {
    padding: 16px 0;
  }
  h1 {
    font-size: 28px;
  }

  p, a {
    font-size: 15px;
  }

  button, .btn_a {
    width: 80%;
    font-size: 14px;
  }

  #bt-serviços {
    width: 70%;
  }

  #home-page {
    flex-direction: column;
    padding: 120px 0 50px 0;
  }

  #home-page #home {
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  #home-page #home p {
    width: 90%;
    margin: 20px auto;
  }

  .branco .card, .psicanalista .card {
    width: 70%;
    padding: 20px;
  }

  #depoimentos .container-dp {
    grid-template-columns: 1fr; /* Só 1 coluna agora */
    width: 70%;
  }

  #atendimentos .container .grid-layout {
    display: flex;
    flex-direction: column;
    width: 90vw;
  }

  .meio1 img {
    width: 100%;
  }

  .baixo2 img {
    width: 100%;
  }

  footer .container-footer {
    width: 90%;
  }
}

/* Responsivo para Celulares */
@media (max-width: 480px) {
  .menu-toggle {
    display: flex;
    width: 100%;
    padding: 0 10px;
    font-size: 20px;
    width: 90%; /* Mostra o botão hamburguer no mobile */
  }

  nav#nav-links {
    position: absolute;
    top: 48px;
    right: 0;
    background-color: rgba(89, 53, 175, 0.9);
    width: 100%;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    height: 0;
    transition: height 0.3s ease;
    gap: 10px;
    display: flex;
  }

  nav#nav-links a {
    padding: 10px 0;
    font-size: 18px;
  }

  nav#nav-links.open {
    height: 250px; /* altura suficiente para os links aparecerem */
  }

  header {
    height: auto;
    width: 100%;
    display: flex;
    flex-direction: column;  /* Alinha os links em coluna */
    align-items: center;  /* Centraliza os links horizontalmente */
    justify-content: center; /* Centraliza os links verticalmente */
    padding: 10px 0;
    text-align: center; /* Centraliza o texto dos links */
  }

  header a {
    font-size: 14px;
    padding: 8px 0;
    position: relative;
    display: block; /* Faz os links ocuparem 100% da largura */
    text-align: center; /* Garante que o texto dentro do link estará centralizado */
  }
/*
  header a::after {
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%); /* Centraliza a linha debaixo do link
  } */
  h1 {
    font-size: 35px;
  }

  p, a {
    font-size: 13px;
  }

  #home-page {
    padding: 0;
  }

  button, .btn_a {
    height: 45px;
    font-size: 14px;
    padding: 0;
  }

  #home {
    .btn_a {
      width: 100%;;
    }
  }

  #home-page #home h1 {
    width: 100%;
  }

  #home-page #home p {
    width: 100%;
  }

  .branco .card h1 {
    margin-bottom: 35px;
    font-size: 35px;
    text-align: start;
  }

  .branco .card p {
    width: 100%;;
  }

  #minha-jornada .card {
    margin: 0 10px;
    padding: 15px;
  }

  .psicanalista .flex {
    min-height: 100vh;
  }

  .psicanalista .card {
    margin: 0 10px;
    padding: 15px;
  }

  #serviços .card {
    margin: 0;
    width: 70vw;
    h1 {
      font-size: 25px;
    }
  }

  #bt-serviços {
    width: 70vw;
  }

  .branco .card {
    width: 70vw;
    margin: 0;
  }

  .cards-services {
    align-items: center;
    gap: 15px;
  }

  #atendimentos .container .grid-layout {
    display: flex;
    flex-direction: column;
    width: 100vw;
  }

  #depoimentos .container-dp {
    width: 95%;
  }


  .meio1 img {
    width: 100%;
  }

  .baixo2 img {
    width: 100%;
  }
}
