/* Imports  Roboro font from Google Fonts */

@import url("https://fonts.googleapis.com/css2?family=Funnel+Display:wght@300..800&family=Roboto:ital,wght@0,100..900;1,100..900&family=Share+Tech+Mono&display=swap");

:root {
  --main-color: #00d4fa;
  --text-color: #ffffff;
  --background-color-01: #1f242d;
  --background-color-02: #323946;
  --color-05: #111c22ee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: none;
  scroll-behavior: smooth;
}

html {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
}

body {
  background-color: var(--background-color-02);
  color: var(--text-color);
  
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.1rem;
  background-color: var(--color-05);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  /* border-bottom: solid 2px var(--main-color);  */
}

.logo {
  font-size: 2rem;
  color: var(--text-color);
  font-weight: 650;
  cursor: default;
}

.nav a {
  font-size: 1.4rem;
  color: var(--text-color);
  padding: 0.4rem 0.9rem;
  transition: 0.4s;

  /* border: solid 1px var(--color-03); */
}

.nav a:hover {
  transform: scale(1.1);
  color: var(--main-color);
}

section {
  min-height: 100vh;
  padding: 6rem 6rem 2rem;
  background-color: var(--background-color-02);

  /* border: solid 1px var(--color-04); */
}

span {
  color: var(--main-color);
}

/* home and about */
.home {
  position: relative;
  overflow: hidden;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 50px 100px;

  background-image: url("../img/Gemini_Generated_Image_lw14sxlw14sxlw14.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* OVERLAY */
.home::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color:#0b0f17c9;
  z-index: 0;
}

/* CONTEÚDO SOBREPOSTO */
.home > * {
  position: relative;
  z-index: 1;
}

.about {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
  background-color: var(--background-color-01);
}

.home-img {
  border-right: solid 0.5rem var(--main-color);
  border-bottom: solid 0.4rem var(--main-color);
  border-radius: 10%;
  border-image: linear-gradient(132deg, transparent 55%, var(--main-color)) 1;
}

.about {
  background-color: var(--background-color-02);
}

.about-img {
  border-left: solid 0.5rem var(--main-color);
  border-bottom: solid 0.4rem var(--main-color);
  border-image: linear-gradient(224deg, transparent 58%, var(--main-color)) 1;
}

.home-img img,
.about-img img {
  width: 100%;
}

.home-content,
.about-content {
  width: 100%;
}

.home-content h1,
.about-content h1 {
  font-weight: 600;
  line-height: 1.1;
  font-size: 2rem;
}

.home-content h3,
.about-content h3 {
  font-weight: 700;
  padding: 10px;
  font-size: 2rem;
}

.home-content p,
.about-content p {
  margin-top: 1.6rem;
  text-align: justify;
}

.services h2,
.portfolio h2,
.contact h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.services-container {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
}

.services-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 25rem;

  margin-bottom: 1rem;
}

.services-container .services-box {
  padding: 1rem 1rem 2.5rem;
  border-radius: 1.1rem;
  text-align: center;
  border: solid 0.15rem var(--background-color-02);
  background-color: var(--background-color-01);
  transition: 0.6s ease;
  margin: 0.4rem;
}

.services-container .services-box:hover {
  border-color: var(--main-color);
  transform: scale(1.05);
}

.services-box i {
  font-size: 5rem;
  color: var(--main-color);
}

.services-box h3 {
  font-size: 2rem;
}

.services-box p {
  margin: 0.5rem;
  letter-spacing: 0.07rem;
  /* overflow lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* portfolio */

.portfolio {
  background-color: var(--background-color-01);
}
.portfolio-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  align-items: stretch; /* força os itens a preencherem a mesma altura */
}

.portfolio-box {
  position: relative;
  border-radius: 0.6rem;
  box-shadow: 0 0 0.6rem var(--background-color-01);
  overflow: hidden;
  /* display: flex; */
}
img {
  width: 800px;
  height: 535px;
}
.portfolio-box img {
  width: 100%;
  transition: 0.5s ease;
}

.portfolio-box img:hover {
  transform: scale(1.3);
}

.portfolio-box .portfolio-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90%;
  background: linear-gradient(transparent, var(--main-color));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 4rem;
  transform: translateY(30rem);
  transition: 1.2s ease;
}

.portfolio-box:hover .portfolio-layer {
  transform: translateY(0);
}

.portfolio-layer h4 {
  font-size: 1.8rem;
}
.portfolio-layer p {
  margin: 0.2rem 0 0.5rem;
}
.portfolio-layer a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 3rem;
  height: 3rem;
  background: var(--text-color);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--main-color);
}

form {
  max-width: 45rem;
  margin: 0.6rem auto;
  text-align: center;
  margin-bottom: 2rem;
  /* border: solid 1px var(--color-04); teste */
}

form .input-box {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  /* border: solid 1px var(--color-03); teste */
}

form .input-box input,
form textarea {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--background-color-01);
  border-radius: 0.6rem;
  margin: 0.4rem 0;
  /* border: solid 1px var(--main-color02); teste */
}

/* contact */

.button {
  display: inline-block;
  font-size: 1.1rem;
  padding: 0.7rem 1.8rem;
  background-color: var(--main-color);
  border-radius: 2.5rem;
  color: var(--background-color-02);
  font-weight: 600;
  letter-spacing: 0.1rem;
  transition: 0.3s ease;
  margin-top: 1.2rem;
}

.button:hover {
  box-shadow: 0 0 1rem var(--main-color);
  background-color: inherit;
  color: var(--main-color);
  cursor: pointer;
}

.about {
  background-color: var(--background-color-01);
}

.read-more-text {
  max-height: 4.5em; /* aproximadamente 3 linhas */
  overflow: hidden;
  transition: max-height 0.6s ease, opacity 0.4s ease;
  opacity: 0.85;
}

.read-more-text.expanded {
  max-height: 1000px; /* valor alto o suficiente */
  opacity: 1;
}

.read-more-text.expanded {
  display: block !important; /* remove o -webkit-box */
  -webkit-line-clamp: unset !important;
  max-height: none !important;
  overflow: visible !important;
}

/* <<<<<send message */

.form-message {
  text-align: center;
  font-weight: normal;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border-radius: 0.4rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease-in-out;
  opacity: 0.9;
}

.form-message.success {
  color: #007a3d; /* verde mais escuro */
  background-color: #e9f7f0;
  border: 1px solid #b2d8cc;
}

.form-message.error {
  color: #a94442;
  background-color: #fbeaea;
  border: 1px solid #e6bcbc;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

/* send message>>>> */

/* social-media */

.social-media {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
}

.social-media a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2rem;
  height: 2rem;
  background-color: var(--background-color-01);
  border-radius: 40%;
  color: var(--main-color);
  font-size: 1.4rem;
  transition: 0.4s ease;
}

.social-media a:hover {
  background-color: var(--main-color);
  color: var(--background-color-01);

  transform: scale(1.18);
}
/* social-media>>> */

/* Menu Toggle (Hamburger) */

/* Ícone do menu hamburguer */
.menu-icon {
  display: none;
  font-size: 2rem;
  color: var(--text-color);
  cursor: pointer;
  z-index: 101;
}

/* Estilo base da nav */
.nav {
  display: flex;
  gap: 1rem;
}

/* Estilo mobile - menu lateral direito */
@media (max-width: 768px) {
  .menu-icon {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%; /* escondido inicialmente */
    height: 100%;
    width: 25%; /* menu ocupa 25% da largura */
    background-color: var(--background-color-01);
    flex-direction: column;
    align-items: flex-start;
    padding: 4rem 1rem 2rem;
    gap: 1.5rem;
    transition: right 0.3s ease-in-out;
    z-index: 100;
    box-shadow: -4px 0 6px rgba(0, 0, 0, 0.452);
    border-radius: 0.4rem;
  }

  .nav.show {
    right: 0;
  }

  .nav a {
    font-size: 1.2rem;
    width: 100%;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    transition: background-color 0.3s;
    border-radius: 2.5rem;
  }

  .nav a:hover {
    background-color: var(--main-color);
    color: var(--background-color-01);
  }
}

/*menutoggle>>>> */

/* =================== Responsividade =================== */

/* Para tablets e telas médias */
@media (max-width: 1024px) {
  .home-content,
  .about-content {
    width: 60%;
    text-align: center;
  }

  .home-img,
  .about-img {
    width: 60%;
    margin: 1rem auto;
  }

  .services-container {
    flex-direction: column;
    align-items: center;
  }

  .services-box {
    width: 80%;
    margin-bottom: 1.5rem;
  }

  .portfolio-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
  }
}

/* Para celulares */
@media (max-width: 768px) {
  .home,
  .about {
    flex-direction: column;
    padding: 4rem 1.5rem 2rem;
  }

  .home-content,
  .about-content {
    width: 90%;
  }

  .home-img,
  .about-img {
    width: 100%;
    margin: 1rem auto;
  }

  .services-box {
    width: 100%;
  }

  .portfolio-container {
    grid-template-columns: 1fr;
  }

  section {
    padding: 5rem 1rem 2rem;
  }
}

/* Para telas muito pequenas */
@media (max-width: 480px) {
  header {
    padding: 1rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav a {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }

  .home-content h1,
  .about-content h1 {
    font-size: 2rem;
  }

  .home-content h3,
  .about-content h3 {
    font-size: 1.2rem;
  }

  .services-box h3 {
    font-size: 1.5rem;
  }

  .services-box i {
    font-size: 4rem;
  }

  .portfolio-layer h4 {
    font-size: 1.2rem;
  }
}
