/* /opt/homebrew/var/www */
:root {
  background-color: black;
  font-family: "Trebuchet MS", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Open Sans', sans-serif;
  --white: #FFFFFF;
  --white-80: #FFFFFFcc;
  --black: #000000;
  --dark-gray: #393E46;
  --gray-90: #393737aa;
  --gray-80: #393737cc;
  --light-black: #222222;
  --gray: #393737;
  --red: #bc2234;
  --red-light: #da3447;
  --beigh: #948979;
  --beigh-90: #948979aa;
  --beigh-80: #948979cc;
  --beigh-light: #DFD0B8;
  --padding-h2: 50px;
  --blue: rgb(45, 112, 194);
}

html {
  scroll-behavior: smooth;
  line-height: 4ch;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.navbar {
  width: 100vw;
  height: auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background-color: var(--black);
  align-items: center;
  padding: 15px 10% 15px 10%;
  box-shadow: 0px 5px 5px rgb( 0 0 0 / 0.25);
  position: sticky;
  z-index: 999;
  top: 0;
  font-size: 1.2rem;
}

.links ul {
  display: flex;
  flex-direction: row;
  list-style-type: none;    
  margin: 0;
  padding: 0;
}

.links .normal-menu li {
  margin-right: 1rem;
}

.links ul li a {
  position: relative;
  text-decoration: none;
  color: white;
  opacity: 80%;
  transition: opacity 0.3s ease;
}

.links .normal-menu li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1ch;
  width: 0;
  height: 2px;
  background-color: white;
  transition: width 0.3s ease;
}

.links .normal-menu li a:hover::after {
  width: 100%;
}

.links ul li a:hover {
  opacity: 100%;
}

.logo {
  height: 90px;
}
/* hamburger menu */

.hamburger-menu {
  position: absolute;
  z-index: 999;
  background-color: var(--gray-90);
  backdrop-filter: blur(7px);
  height: 110vh;
  width: 100vw;
  top: 0;
  margin: 0;
  padding: 0;
  left: 0
}

.links .hamburger-menu {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.links .hamburger-menu li {
  margin-top: 2ch;
  width: 100%;
  height: 100px;
}

.links .hamburger-menu li > a {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.links .hamburger-menu li > a:active {
  background-color: var(--gray);
}

@media only screen and (max-width : 700px) {
  .normal-menu {
    display: none;
  }

  .normal-menu > * {
    display: none;
  }

  li:has(svg[class="hamburger-icon"]) {
    display: inline;
  }

  .row-div > img.logo {
    height: 48px;
  }

  .divider {
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media only screen and (min-width : 701px) {

  li:has(svg[class="hamburger-icon"]) {
    display: none;
  }
  
  li:has(svg[class="close-icon"]) {
    display: none;
  }
}

/* hamburger menu */

.row-div {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.row-div > img + span {
  margin-left: 1ch;
  font-family: "Trebuchet MS";
  font-weight: bold;
}

.row-div > img {
  height: 4rem;
}

/* MAIN START */

main {
  /* max-width: clamp(1ch, 80vw, 70ch); */
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: auto;
  position: relative;
  overflow: visible;
}

.intro-banner {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap-reverse;
  width: 100%;
  justify-content: space-between;
  position: relative;
  background-color: white;
}

.intro-banner > div {
  width: 60%;
  z-index: 1;
}

.intro-banner > img {
  width: 40%;
}


.intro-banner div {
  font-size: 1.5rem;
  line-height: 3ch;
  padding: var(--padding-h2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  color: #444040;
}

strong {
  font-weight: bolder;
  color: var(--red);
}

/* INTRO */

.intro {
  width: 100vw;
  height: 85vh;
  position: relative;
  filter: grayscale(60%);
  background-image: url("/resources/images/pic2.webp");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.intro > .lemma {
  position: absolute;
  height: 100%;
  width: 100%;
  top: 0;
  left: 0;
  right: 0;
  color: white;
  text-align: center;
  font-size: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.intro > .lemma > span {
  width: fit-content;
  background-color: rgb(0 0 0 / .75);
  padding: 1ch;
}

/* INTRO */

h1 {
  text-align: center;
  font-size: 3rem;
}

h2 {
  font-size: 2.5rem;
}

.phrase-divider {
  background-color: var(--red);
  color: white;
  padding: 2ch 20% 2ch 20%;
  text-align: center;
  font-size: 2rem;
  line-height: 3ch;
}

.guarantee {
  position: relative;
  padding: 0px 50px 100px 0;
  color: white;
  display: flex;
  overflow: hidden; 
  flex-direction: column;
  justify-content: space-between;
  text-shadow: 2px 2px 2px black;
}

.guarantee::before {
  content: "";
  position: absolute;
  top: -15px;
  bottom: -15px;
  left: -15px;
  right: -15px;
  background-image: url("/resources/images/pic6.webp");
  background-size: cover;
  background-position: center;
  filter: blur(12px);
  z-index: -1;
}

.guarantee ul {
  margin-left: 20%;
  font-size: 1.5rem;
  line-height: 3rem;
}

.guarantee h2 {
  padding: var(--padding-h2);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.divider {
  padding-top: var(--padding-h2);
  padding-bottom: var(--padding-h2);
  background-color: var(--light-black);
  color: white;
  text-align: center;
  scroll-margin: calc(var(--padding-h2) * 1.5);
}

.services {
  background-color: var(--red);
  color: white;
  font-size: 1.5rem;
  display: flex;
  flex-direction: row;
}

.services > div > ul {
  padding: 50px;
}

.services > div {
  width: 60%;
  padding-left: 50px;
}

.services div:last-of-type {
  width: 40%;
  height: auto;
  background-image: url("/resources/images/pic1.webp");
  background-position: right;
  background-size: cover;
}

.services ul {
  list-style-image: url("/resources/images/icons/truck.svg");
}

.services li {
  margin-bottom: 50px;
  line-height: 3rem;
}

.tiles {
  background-color: white;
  font-size: 1.5rem;
  display: flex;
  flex-direction: row;
}

.tile {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 25px;
}

.tiles > :last-child {
  background-color: var(--red);
  color: white;
}

.tiles > :first-child {
  background-color: var(--blue);
  color: white;
}

.tile > .truck-img {
  width: 80%;
  height: 200px;
  margin-top: 25px;
}

.tile:first-of-type > .truck-img {
  background-image: url("/resources/images/pic8.webp");
  background-position: center;
  background-size: cover;
}

.tile:last-of-type > .truck-img {
  background-image: url("/resources/images/pic9.webp");
  background-position: center;
  background-size: cover;
}

/* FOOTER */

footer {
  width: 100vw;
}

.form-section {
  padding: var(--padding-h2);
  width: 60%;
  margin: auto;
  color: white;
  font-size: 1.2rem;
}

.form-section > * {
  margin-bottom: 25px;
}

.form-section a {
  text-decoration: none;
  color: var(--red);
  font-weight: bold;
  transition: all .3s;
}

.form-section a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.form-section iframe {
  width: 100%;
}

.col-input {
  display: flex;
  flex-direction: column;
}

.form-section input, 
.form-section textarea {
  appearance: none;
  border: 3px solid transparent;
  font-size: 1rem;
  padding: .5rem;
}

.form-section input {
  width: min(45ch, 100%);
}

.col-input > textarea {
  resize: none;
}

.btn-whatsapp {
  appearance: none;
  background-color: transparent;
  border: 0;
  padding: 0;
  width: 189px;
  height: 40px;
}

.btn-whatsapp:hover rect {
  fill: #128C7E; /* A darker green */
}

form :user-invalid {
  border-color: tomato;
}

form > div:has(:user-invalid) label::after {
  content: "El campo debe estar lleno";
  color: tomato;
  font-size: 1rem;
  margin-left: 15px;
}

form > * {
  margin-top: 20px;
}

form > button {
  margin-top: 40px;
  margin-bottom: 40px;
}

#send-email {
  border: 0;
  width: 189px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--red);
  color: white;
}

#send-email:hover {
  background-color: var(--red-light);
}

.required-message {
  font-size: .85rem;
  opacity: 80%;
}

.social-media,
.social-media-icon {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.social-media > * {
  margin-left: 10px;
}

/* FOOTER */

@media only screen and (max-width : 700px) {
  .intro-banner > #nosotros > h2 {
    margin-top: 0;
  }

  .intro-banner > div {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    backdrop-filter: blur(10px);
    justify-content: start;
    color: white;
    text-shadow: 1px 1px 1px black;
  }

  .intro-banner h2 {
    margin-top: 50px;
  }

  .intro-banner > img {
    width: 100%;
  }

  .intro > .lemma {
    font-size: 1.5rem;
  }

  .phrase-divider {
    padding-left: 1ch;
    padding-right: 1ch;
    font-size: 1.5rem;
  }

  h1, h2 {
    font-size: 2rem;
  }

  .services {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
  }

  .services > div {
    width: 100%;
    padding-left: 10%;
  }
  
  .services div:last-of-type {
    width: 100%;
    height: 600px;
  }

  #nosotros,
  #contacto {
    scroll-margin: calc(var(--padding-h2) * 1.5)
  }

  .tile:first-of-type > .truck-img {
    background-position: center left;
  }
  
  .tile:last-of-type > .truck-img {
    background-position: center right;
  }
}

@media only screen and (min-width : 1000px) {
  .services > div {
    width: 50%;
  }
  
  .services div:last-of-type {
    width: 50%;
  }

  .guarantee::before {
    background-position: bottom;
  }
}

@media only screen and (max-width : 900px) {
  .tiles {
    flex-wrap: wrap-reverse;
  }

  .tile {
    width: 100%;
  }

  .form-section {
    width: 100%;
  }
}

@media only screen and (max-height : 433px) {
  .links .hamburger-menu  li {
    height: auto;
    margin-top: 30px;
  }

  .links .hamburger-menu  li > a {
    align-items: start;
  }
}

@media only screen and (max-height : 300px) {
  .links .hamburger-menu  li {
    height: auto;
    margin-top: 5px;
  }

  .links .hamburger-menu  li > a {
    align-items: start;
  }
}