/* this is for background */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
/*selector de colores*/
:root {
  --primary-color: #18db18;
  --secondary-color: white;
  --secondary-light: rgb(173, 173, 173);
  --dark1: #222222;
  --dark2: #050505;
}
body {
  font-size: 15px;
  font-family: "Poppins", sans-serif;
  color: var(--secondary-color);
  overflow-x: hidden;
}

.navbar {
  display: flex;
  justify-content: flex-end;
}

.navbar ul {
  display: flex;
  list-style: none;
}

.navbar a {
  font-size: 1.3rem;
  padding: 15px;
  text-decoration: none;
  color: white;
  margin: 20px;
  nav a.active {
    color: var(--primary-color);
  }
}
.navbar a:hover {
  border-bottom: var(--primary-color) solid 2px;
  z-index: 3;
  transition: all 0.3s ease-in-out;
  opacity: 5;
  color: var(--primary-color);
  text-decoration: none;
}
.hero {
  background-color: var(--dark2);
  position: relative;
}

.hero img {
  opacity: 0.6;
  background-size: cover;
  background-position: center;
  width: 100%;
  background-repeat: no-repeat;
  height: 70vh;
}
span {
  color: var(--primary-color);
}

/*para modificar el dropdown menu de portafolio*/

.dropdown {
  position: relative;
  display: inline-block;
}
.dropbtn {
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--dark1);
  min-width: 250px;
  height: 200px;
  border-radius: 10px;
  padding: 5px;
  margin: 0px 0px 0px 0px;
  box-shadow: 150px 150px 16px rgba(0, 0, 0, 0.2);
  z-index: 10;
}
.dropdown:hover .dropdown-content {
  display: grid;
}
.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.nav-item dropdown {
  display: flex;
  gap: 150px; /* ahora sí funciona */
  align-items: center;
}

/*circle profle*/
.profile div {
  position: absolute;
}
.profile {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}

.square {
  position: relative; /* para que los hijos se posicionen dentro */
  width: 325px;
  height: 440px;
  background-color: var(--dark1);
  opacity: 0.7;
  z-index: 10;
  top: 70px;
}

.square-text-container {
  position: absolute;
  bottom: 245px; /* lo baja dentro de la caja */
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 15;
  flex: auto;
}

.square-text-container h2 {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  margin: 0;
}
/*modificar texto verde*/
.profile h2 {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  margin: 0; /* Sin márgenes negativos */
  z-index: 12;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--secondary-color);
  font-weight: 600;
}
/*modificar texto verde*/
.profile h2 span {
  margin-left: 0.8rem;
  position: relative;
  display: inline-block;
  color: transparent;
  -webkit-text-stroke: 0.07rem var(--primary-color);
  animation: display-text 12s linear infinite;
  animation-delay: calc(-4s * var(--i));
  top: -210px;
}
@keyframes display-text {
  25%,
  100% {
    display: none;
  }
}
/*modificar texto verde*/
.profile h2 span::before {
  content: attr(data-text);
  position: absolute;
  width: 0;
  border-right: 0.2rem solid var(--primary-color);
  color: var(--primary-color);
  white-space: nowrap;
  overflow: hidden;
  animation: fill-text 4s linear infinite;
}
@keyframes fill-text {
  10%,
  100% {
    width: 0;
  }
  70%,
  90% {
    width: 100%;
  }
}
/*modificar texto verde*/
.briefcase-section {
  font-size: 1.2rem;

  z-index: 10;
}

/*para modificar el borde de la circunferencia verde*/
.circle {
  position: relative;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: solid 0px var(--primary-color);
  z-index: 20;
  top: 130px;
  background: conic-gradient(
    transparent,
    transparent,
    transparent,
    var(--primary-color)
  );
  transform: rotate(0deg);
  animation: rotate-border 15s linear infinite;
  animation-delay: 4.5s; /* Aquí funciona correctamente */
}
/*para modificar el borde de la circunferencia blanco*/
.circle-a {
  content: "";
  top: 130px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: solid 0px var(--secondary-color);
  background: conic-gradient(
    transparent,
    transparent,
    transparent,
    var(--secondary-color)
  );
  transform: rotate(0deg);
  animation: rotate-border 15s linear infinite;
  animation-delay: -3s; /* Aquí funciona correctamente */
  z-index: 11;
}

@keyframes rotate-border {
  100% {
    transform: rotate(360deg);
  }
}
.profile-img {
  top: 134px;
  z-index: 20;
}

.profile-img img {
  width: 202px;
  height: 202px;
  border-radius: 50%;
}

.square-text {
  font-size: 2rem;
  color: var(--secondary-color);
  top: 400px;
  z-index: 11;
}

.square-text-2 {
  font-size: 1.2rem;
  color: var(--secondary-color);
  top: 450px;

  z-index: 11;
}

.contact-icon {
  top: 30px;
  z-index: 11;
  left: 20px;
}
.contact-icon img {
  width: 40px;
  height: 40px;
}

.contact-icon img:hover {
  transform: scale(1.3);
}

/*Briefcase*/
.briefcase {
  background-color: var(--dark1);
}

.briefcase-section h2 {
  padding: 40px;
}

.briefcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, auto));
  gap: 15px;
  width: 90%;
  margin: 0 auto;
}

.briefcase-grid img {
  width: 325px;
  height: 200px;
  border-radius: 10px;

  transition: transform 0.3s ease;
}

.briefcase-grid img:hover {
  transform: scale(1.3);
}
.briefcase-grid div {
  position: relative;
}

.briefcase-grid div p {
  position: absolute;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  width: 100%;
  text-align: center;
  padding: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.briefcase-grid div:hover p {
  opacity: 1;
}

/*skills*/
section.skills {
  background-color: var(--dark1);

  /*estilo de iconos de skills*/
}
.knowledge div,
.tools div {
  background-color: var(--dark2);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  height: 100px;
  color: var(--secondary-color);
  align-items: center;
  width: 100px;
}

.knowledge div:hover,
.tools div:hover {
  transform: translateY(-5px);
  box-shadow: 0 2px 2px rgba(0, 0, 0, 0.4);
}
.knowledge,
.tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 25px;
  justify-items: center;
}
.knowledge div:hover,
.tools div:hover {
  border: 2px solid transparent;
  background-image: linear-gradient(var(--dark2), var(--dark2)),
    linear-gradient(45deg, #18db18, #00ffff);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

.skills {
  /*border: 0.1rem solid var(--primary-color);*/
  border-radius: 20px;
  display: grid;
  padding: 40px 0px 50px 0px;
  gap: 50px;
  width: 82%;
  margin: 0 auto;
}
.skill h2 {
  margin-top: 55px;
  text-align: center;
  padding: 25px 25px 70px 45px;
  font-size: 2rem;
  columns: 1;
}
.skill img {
  width: 55px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(110px, auto));
}

.knowledge {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, auto));
  gap: 25px;
  justify-content: center;
}

.tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, auto));
  gap: 25px;
  justify-content: center;
}

/*tooltip*/
.skills h3 {
  background-color: var(--dark2);
  text-align: center;
  padding: 5px 0px;
  border-radius: 5px;
  font-size: 1rem;
  width: 100px;
  opacity: 0;
  transform: translate(-1px, -80px);
  transition: transform 0.4s ease, opacity 0.4s ease;
  color: var(--primary-color);
}

.knowledge > div:hover h3,
.tools > div:hover h3 {
  transform: translate(25px, -100px);
  opacity: 1;
}

/*section servicios*/
.servicios {
  background-color: var(--dark1);
  padding: 50px 0;
  top: 150px;
}

.servicios h2,
h3 {
  text-align: left;
  padding-left: 35px;

  color: var(--secondary-color);
}

.servicios img {
  width: 70px;
  height: 70px;
  border-radius: 10%;
  margin-bottom: -140px;
  margin-left: -140px;
}

#servicios h3 {
  color: var(--dark1);
  font-weight: bold;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.heading {
  position: absolute;
  text-align: right;
  padding: 20rem;
  margin-bottom: 1050px;
  font-size: 1.8rem;
  margin-left: -1000px;
}

.heading span {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.8rem;
}

.servicios {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  padding: 1rem;
  justify-items: center;
  align-items: center;
}

.servicios-box {
  /*border: 0.1rem solid var(--primary-color);*/
  align-items: center;
  border-radius: 20px;
  text-align: left;
  width: 1500px;
  margin-top: 20px;
  padding: 20px 100px 30px 150px;
  display: grid;
  margin-bottom: 10px;
}
.servicios-box h3 {
  justify-content: center;
  margin-left: -35px;
}
.servicios-box li {
  font-size: 1.1rem;
  color: var(--secondary-color);
  font-weight: 500;
}
li {
  list-style-type: none;
}

/*footer*/
footer {
  background-color: var(--dark2);
  color: var(--secondary-color);
  padding: 20px 0;
  columns: 3;
  padding: 35px 25px 25px 30px;
}

.topofooter img {
  width: 400px;
  height: 400px;
  z-index: 500;
  /* margin-left: 1200px;*/
  position: relative;

  /*margin-top: -300px;*/
}

/* ======== SECCIÓN SERVICIOS ======== */
.servicios {
  background: var(--dark1);
  padding: 100px 20px;
  text-align: center;
}
/* titulo principal de los servicios */
.servicios .heading {
  font-size: 2.8rem;
  color: #f8f8f8;
  padding: 10px 20px;
  margin-top: -350px;
  z-index: 10;
}

.servicios .heading span {
  color: #0d6efd;
}

/* Contenedor principal */
.servicios-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Cada tarjeta */
.servicio-box {
  background: #d4d0d0;
  border-radius: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 400px; /* 🔹 Más ancho */
  height: 650px; /* 🔹 Más altura */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;

  padding-bottom: 20px;
}

.servicio-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Imagen principal */
.servicio-box > img {
  width: 100%;
  height: 250px; /* 🔹 Más alta */
  object-fit: cover;
  border-bottom: 4px solid #0d6efd;
}

/* Título */
.servicio-box h3 {
  margin: 20px 0 10px;
  font-size: 1.6rem;
  color: #0d6efd;
}

/* Lista de servicios */
.servicio-box ul {
  list-style: none;
  padding: 0 25px;
  text-align: left;
  font-size: 1.05rem;
  color: #333;
  line-height: 1.5;
}

.servicio-box ul li {
  margin: 8px 0;
}

/* Galería interna */
.servicio-galeria {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: center;
}
/* cambiar tamaño imagenes dentro de tarjetas */
.servicio-galeria img {
  width: 300px; /* 🔹 Más grandes */
  height: 230px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  border: 3px solid #eee;
  margin-left: 28px;
}

.servicio-galeria img:hover {
  transform: scale(1.07);
  border-color: #0d6efd;
}

/* ======== RESPONSIVO ======== */
@media (max-width: 1024px) {
  .servicio-box {
    width: 340px;
  }
}

@media (max-width: 768px) {
  .servicio-box {
    width: 90%;
    max-width: 450px;
  }

  .servicio-galeria img {
    width: 48%;
  }
}

@media (max-width: 480px) {
  .servicio-galeria img {
    width: 100%;
    height: auto;
  }
}
