@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;800&display=swap');

:root {
  --colorPrincipal: #00a6f4;
  --colorPrincipal1: #0F172A;
  --colorPrincipal1a: #0f172ad8;
  --colorSecundario: #040e1a;
  --colorWhite: #f7f7f7;
  --colorSuccess: #00a63e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  font-weight: 300;
}

h1,
h2,
h3 {
  color: var(--colorWhite);
  font-weight: normal;
  text-align: center;
  padding: 30px 0 10px
}

p {
  color: var(--colorWhite);
  font-weight: 300;
  line-height: 1.5rem;
  padding: 20px 30px;
}

.enlace a:link,
a:visited {
  text-decoration: none;
  color: var(--colorPrincipal);
}

header {
  width: 100%;
  height: 100vh;
  margin: -70px auto 0;
  background-image: url("../img/background.webp");
  background-size: cover;
  background-position: center center;
}

hr {
  border: none;
  height: 1px;
  background-color: var(--colorWhite);
  margin: 25px 0;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: auto;
  width: 90%;
  height: 70px;
  position: sticky;
  top: 0;
  margin: auto;
  z-index: 100;
}

.navbar.scrolled {
  background-color: var(--colorPrincipal1a);
  width: 100%;
  padding: 0 16px;
  height: 70px;
}

.logo {
  margin-top: 10px;
}

.logo__img {
  width: 150px;
  /* filter: invert(); */
}



.bar {
  width: 3%;
  display: flex;
  justify-content: flex-end;
  text-align: right;
  font-size: 2rem;
  color: var(--colorWhite);
  cursor: pointer;
}

.bar:hover {
  color: var(--colorPrincipal);
}

.slogan {
  width: 100%;
  display: block;
  position: absolute;
  bottom: 60px;
  margin: 0 auto;
  padding: 0 40px;
  text-align: center;
  color: var(--colorWhite);
}

.slogan h1 {
  font-size: 1.6rem;
  text-shadow: 2px 2px 4px black;
  font-weight: normal;
}

.nav2 {
  margin-left: -100%;
  top: 0;
  position: fixed;
  height: 100%;
  width: 20%;
  min-width: 230px;
  padding: 0 33px;
  background-color: var(--colorPrincipal1);
  z-index: 300;
  transition: margin-left .3s ease;
}

.nav2.visible {
  margin-left: 0;
}

.nav2__in {
  margin-top: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--colorWhite);
}

.nav2__items {
  display: flex;
  flex-direction: column;
}

ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 30px 0;
  line-height: 2rem;
}

li a:link,
li a:visited {
  text-decoration: none;
  color: var(--colorWhite);
  text-transform: uppercase;
}

span.acceso {
  color: rgb(169, 169, 169);
}

span.acceso:hover {
  color: var(--colorPrincipal);
}

li a:hover {
  color: var(--colorPrincipal)
}

/* Sección Servicios */
.servicios {
  display: flex;
  flex-direction: column;
  background-color: var(--colorPrincipal1);
  border-top: 1px dotted var(--colorSecundario);
  padding-bottom: 30px;
  justify-content: center;
  min-height: 100vh;
}

ul.grid-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
  gap: 2rem;
  margin: 60px;
  justify-content: center;
}

.card {
  display: flex;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.055);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  outline: 1px dotted var(--colorSecundario);
  justify-content: center;
}

.card img {
  width: 100%;
  height: auto;
}

.card p {
  padding-top: 20px;
  text-align: center;
  color: var(--colorWhite);
  font-size: 1.2rem;
}

.servicios__titulo {
  text-align: center;
}

#servicios {
  padding-top: 32px;
  margin-top: 0px;
  transition: all .2s ease;
}

/* Sección Empresa */
#empresa {
  padding-top: 40px;
  margin-top: 0px;
  transition: all .2s ease;
  outline: 1px dashed var(--colorWhite);
}

/* Inicio de Formulario */
section.contacto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* background: var(--colorPrincipal1); */
  background-image: url('../img/contacto.webp');
  background-size: cover;
  background-position: center;
  min-height: 100vh;
}

.form__titulo {
  padding-bottom: 30px;
}

form {
  margin: 0 auto;
  width: 90%;
  height: auto;
  max-width: 800px;
  padding: 10px 0;
  border-radius: 10px;
}

form .grupo {
  position: relative;
  margin: 45px;
}

input,
textarea {
  background: none;
  color: var(--colorWhite);
  font-size: 18px;
  padding: 10px 10px 10px 5px;
  display: block;
  width: 100%;
  border: none;
  border-bottom: 1px solid #999;
  resize: none;
}

input:focus,
textarea:focus {
  outline: none;
  color: #999;
}

input:focus~label,
input:valid~label,
textarea:focus~label,
textarea:valid~label {
  position: absolute;
  top: -14px;
  font-size: 12px;
  color: var(--colorSecundario);
}

label {
  color: var(--colorWhite);
  font-size: 16px;
  position: absolute;
  left: 5px;
  top: 10px;
  transition: 0.5s ease all;
  pointer-events: none;
}


input:focus~.barra::before,
textarea:focus~.barra::before {
  width: 100%;
}

.barra {
  position: relative;
  display: block;
  width: 100%;
}

.barra::before {
  content: '';
  height: 1px;
  width: 0%;
  bottom: 0;
  position: absolute;
  background: linear-gradient(to right, rgb(109, 109, 109), var(--colorPrincipal));
  transition: 0.3s ease all;
  left: 0%;
}

button.submit {
  background-color: transparent;
  border: 1px solid var(--colorWhite);
  display: block;
  width: 140px;
  height: 40px;
  color: var(--colorWhite);
  border-radius: 4px;
  margin: 10px auto;
  cursor: pointer;
}

button.submit:hover {
  background-color: var(--colorWhite);
  color: var(--colorPrincipal1);
}

/* Estilos para alertas */
.alert {
  max-width: 800px;
  padding: 15px 20px;
  margin: 20px auto;
  border-radius: 8px;
  font-size: 16px;
  text-align: center;
  font-weight: 400;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease-out;
}

.alert-success {
  background-color: var(--colorSuccess);
  color: var(--colorWhite);
  border: 1px solid var(--colorSuccess);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--colorSecundario);
  border-top: 1px dotted var(--colorSecundario);
}

.footer h4 {
  color: var(--colorWhite);
  font-weight: 300;
  font-size: .7rem;
}

footer span {
  color: var(--colorPrincipal);
}

/* Media Queries */
@media (max-width: 440px) {
  .bar {
    width: 35%;
  }

  ul.grid-servicios {
    grid-template-columns: 1fr;
    margin: auto;
    width: 90%;
  }
}

@media (min-width: 441px) {
  .bar {
    width: 24%;
  }

  .navbar.scrolled {
    padding: 0 30px;
  }
}

@media (min-width: 568px) {
  .bar {
    width: 20%;
  }
}

@media (min-width: 700px) {
  .bar {
    width: 10%;
  }

  .navbar.scrolled {
    padding: 0 35px;
  }

  .card {
    min-height: 400px;
  }
}

@media (max-width: 959px) {
  section.empresa {
    display: grid;
    grid-template-columns: 1fr;
    background-color: var(--colorPrincipal1);
    min-height: 100vh;
    align-items: center;
  }

  .empresa__imagen {
    display: flex;
    width: 100%;
  }

  .empresa p {
    text-align: center;
  }
}

@media (min-width: 960px) {
  .bar {
    width: 7%;
  }

  .navbar.scrolled {
    padding: 0 46px;
  }

  .empresa {
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    background-color: var(--colorPrincipal1);
    justify-content: space-between;
    padding: 0 30px;
    min-height: 100vh;
  }

  .empresa__imagen {
    width: 100%;
    margin-left: 30px;
    border-radius: 0 0% 0% 0;
    -webkit-border-radius: 0 0% 0% 0;
    -moz-border-radius: 0 0% 0% 0;
    -ms-border-radius: 0 0% 0% 0;
    -o-border-radius: 0 0% 0% 0;
}

  .empresa__texto {
    margin-left: 30px;
    text-decoration: none;
  }

  .empresa__texto a {
    text-decoration: none;
  }

  .empresa h2 {
    padding-top: 0;
    text-align: left;
    margin-left: 60px;

  }

  .empresa p {
    padding: 0 30px;
  }
}

@media (min-width: 1024) {
  .empresa {
    display: grid;
    grid-template-columns: 40% 60%;
    align-items: center;
    justify-content: space-between;;
    background-color: var(--colorPrincipal1);
    min-height: 100vh;
    }
}

@media (min-width: 1280px) {

  .empresa__imagen {
    border-radius: 0 45% 45% 0;
    -webkit-border-radius: 0 45% 45% 0;
    -moz-border-radius: 0 45% 45% 0;
    -ms-border-radius: 0 45% 45% 0;
    -o-border-radius: 0 45% 45% 0;
}

  .empresa h2 {
    /* padding: 0 0 30px;
    margin-left: 110px; */
    font-size: 1.9rem;
    padding-bottom: 30px;
  }

  .empresa p {
    /* padding: 0 80px; */
    line-height: 1.8rem;
    font-size: 1.1rem;
  }
}

@media (min-width: 1680px) {
  .empresa {
    grid-template-columns: 40% 60%;
  }

  .empresa__detalle {
    padding-left: 50px;
  }

  .bar {
    width: 3%;
  }
  
  .empresa h2 {
    padding-bottom: 50px;
    font-size: 2.2rem;
  }
  
  .empresa p {
    line-height: 2.3rem;
    font-size: 1.4rem;
  }
  
  .navbar.scrolled {
    padding: 0 85px;
  }
}

@media (min-width: 1900px) {
  .empresa {
    grid-template-columns: 40% 60%;
    padding: 0 60px;
  }
  
  .empresa__detalle {
    padding: 30px 30px 0 30px;
  }
  
  .empresa h2 {
    padding-bottom: 50px;
    font-size: 2.4rem;
    text-transform: uppercase;
  }

  .empresa p {
    line-height: 2.5rem;
    font-size: 1.5rem;
  }

  .navbar.scrolled {
    padding: 0 85px;
  }

  .form__titulo {
    font-size: 2.1rem;
  }

  ul.grid-servicios {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: space-between;
    padding: 0 50px;
    gap: 3rem;
  }

  form {
    max-width: 1000px;
  }
}