@layer base, components, utilities;

:root {
  --enoloco-clr-white: hsl(0, 0%, 100%);
  --enoloco-clr-yellow: hsl(50, 86%, 49%);
  --enoloco-clr-purple: hsl(302, 57%, 35%);
  --enoloco-clr-blue: hsl(213, 75%, 54%);
  --enoloco-clr-red: hsl(358, 81%, 51%);
  --enoloco-clr-green: hsl(159, 100%, 32%);
  --enoloco-clr-pink: hsl(340, 41%, 70%);
  --enoloco-clr-magenta: hsl(333, 81%, 51%);
}

@font-face {
  font-family: "Defante";
  src: url(fonts/Defante.ttf);
}

@font-face {
  font-family: "Gilroy";
  src: url(fonts/gilroy-regular.ttf);
}

@layer base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  * {
    margin: 0;
    padding: 0;
  }

  ul[role="list"],
  ol[role="list"] {
    list-style: none;
  }

  html:focus-within {
    scroll-behavior: smooth;
  }

  a:not([class]) {
    text-decoration-skip-ink: auto;
  }

  img,
  picture,
  svg,
  video,
  canvas {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    font-style: italic;
    background-repeat: no-repeat;
    background-size: cover;
  }

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  body,
  html {
    height: 100%;
    scroll-behavior: smooth;
    font-family: "Gilroy";
    font-size: 18px;
  }
}

@layer components {
  [data-lang="en"],
  [data-lang="it"] {
    display: none;
  }

  .home-container {
    display: grid;
    place-items: center;
    width: 100dvw;
    gap: 3rem;
  }

  .header {
    display: grid;
    place-items: center;
    position: relative;
    background-image: url(img/enoloco_home_banner.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100dvh;
    width: 100%;
  }

  .language-selector {
    position: absolute;
    top: 0;
    left: 0;
    margin: 1rem;
  }

  .selected-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--enoloco-clr-pink);
  }

  .selected-option .flag-icon {
    width: 2rem;
    height: 2rem;
  }

  .options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    border-radius: 5px;
    background-color: var(--enoloco-clr-pink);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
  }

  .options li {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
  }

  .options li:hover {
    background-color: var(--enoloco-clr-magenta);
  }

  .options li .flag-icon {
    width: 1.5rem;
    height: 1.5rem;
  }

  /* Mostrar opciones cuando el selector está activo */
  .language-selector.active .options {
    display: block;
  }

  .header-image {
    height: 50dvh;
    align-self: end;
  }

  .hamburger {
    display: block;
    font-size: 4rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--enoloco-clr-white);
  }

  .navbar {
    display: none;
  }

  .header .navbar.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 0.5rem;
    background-color: var(--enoloco-clr-green);
    position: absolute;
    top: 3rem;
    right: 0;
    width: 100%;
    text-align: center;
    font-size: 1.5rem;
    z-index: 10;
  }

  .navbar-link {
    position: relative;
    padding-bottom: 0.25rem;
    color: var(--enoloco-clr-white);
    text-decoration: none;
    width: 100%;
    display: block;
  }

  .navbar-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(
      --enoloco-clr-white
    ); /* Cambia el color del borde aquí */
    transition: width 0.4s ease, right 0.4s ease;
  }

  .navbar-link:hover::after {
    width: 50%;
    right: 25%;
  }

  .header .navbar,
  .header .hamburger {
    position: absolute;
    top: 0;
    right: 0;
    margin-top: 1rem;
  }

  .header .navbar {
    width: 40%;
  }

  .header .hamburger {
    margin-right: 1rem;
  }

  .header-logo {
    position: absolute;
    right: 3.5rem;
    bottom: 60%;
    width: 7rem;
  }

  .slogan-container {
    width: 100%;
    display: grid;
    gap: 1rem;
    place-items: center;
    margin-bottom: 12dvh;
  }

  .horizontal-logo {
    width: 6.5rem;
  }

  .slogan {
    width: clamp(21rem, 80%, 35rem);
    padding: 0.5rem;
  }

  .btn {
    display: flex;
    justify-content: center;
    padding: 1rem 2rem;
    width: max-content;
    border: 0;
    border-radius: 0.25rem;
    cursor: pointer;
    text-decoration: none;
  }

  .btn-magenta {
    color: var(--enoloco-clr-white);
    background-color: var(--enoloco-clr-magenta);
  }

  .btn-magenta:hover {
    background-color: var(--enoloco-clr-purple);
  }

  .btn-blue {
    color: var(--enoloco-clr-blue);
    background-color: var(--enoloco-clr-yellow);
  }

  .btn-blue:hover {
    color: var(--enoloco-clr-white);
    background-color: var(--enoloco-clr-blue);
  }

  .main {
    width: 100%;
  }

  .about-us {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-top: 2rem;
    background-image: url(img/enoloco_watermark.png);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    min-height: 75dvh;
  }

  .about-us > * {
    margin-inline: 0.5rem;
  }

  .about-us .text {
    text-align: center;
    font-size: clamp(1.5rem, 80%, 2rem);
  }

  .whw {
    display: grid;
    place-content: center;
    width: 100%;
    padding-top: 2rem;
  }

  .template-container-1 {
    display: grid;
    place-items: center;
    padding: 2rem;
    width: 100dvw;
    text-align: center;
    font-size: 1.25rem;
  }

  .template-container-1 .image {
    width: 80dvw;
    aspect-ratio: 1;
    margin-block: auto;
  }

  .template-container-1 .text,
  .template-container-2 .text {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .template-container-1 .text .title {
    font-family: "Defante";
    font-size: 2rem;
    font-weight: inherit;
  }

  .banner-container {
    /* display: block; */
    display: none;
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 100dvh;
    background-image: url(img/enoloco_banner.png);
    margin-block: 5rem;
  }

  .banner-inner-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 30% 20% 1fr;
  }

  .banner-title {
    font-family: "Defante";
    font-size: 5rem;
    font-weight: inherit;
    padding: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }

  .banner-subtitle {
    font-family: "Defante";
    font-size: 3rem;
    font-weight: inherit;
    padding: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }

  .banner-text {
    font-size: 2.2rem;
    align-self: end;
    padding: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }

  .right-text-wrapper {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    justify-content: end;
    text-align: right;
  }

  .news {
    display: grid;
    place-content: center;
    width: 100%;
    padding-top: 2rem;
  }

  .template-container-2 {
    width: 100%;
    display: grid;
    background-color: var(--enoloco-clr-purple);
    position: relative;
    place-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    padding-block: 1rem;
  }

  .template-container-2 .text {
    color: var(--enoloco-clr-white);
    text-align: center;
    padding-inline: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .template-container-2 .text .title {
    font-family: "Defante";
    font-size: 3rem;
    font-weight: inherit;
  }

  .template-container-2 .image {
    height: 18rem;
    object-position: center;
    object-fit: cover;
  }

  .footer {
    display: grid;
    width: 100%;
    margin-bottom: 2rem;
    margin-top: 2rem;
  }

  .about-us .title,
  .footer .title {
    font-family: "Defante";
    font-weight: inherit;
    font-size: 4rem;
    text-align: center;
    height: fit-content;
  }

  .footer > .subtitle {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 2rem;
  }

  .contact-container {
    background-color: var(--enoloco-clr-green);
    width: 100%;
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
  }

  .contact-container .vertical-logo {
    padding: 1rem;
    place-self: center;
    width: 60%;
    display: none;
  }

  .contact-container .logo {
    padding: 1rem;
    place-self: center;
    width: 60%;
    margin-bottom: 12rem;
    display: none;
  }

  .contact-form-wrapper {
    place-self: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 90%;
  }

  .contact-form-wrapper .subtitle {
    color: var(--enoloco-clr-white);
    font-size: 1.25rem;
    padding-top: 1rem;
    text-align: center;
  }

  .contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .form-control {
    min-height: 3rem;
    padding: 0.5rem 1rem;
    background-color: hsla(0, 0%, 100%, 0.27);
    border: 0;
    color: var(--enoloco-clr-white);
  }

  .form-control::placeholder {
    color: var(--enoloco-clr-white);
  }

  .contact-form .btn {
    padding-block: 0.5rem;
    align-self: end;
  }

  .links-container {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    margin-block: 1rem;
    gap: 1rem;
  }

  .links-container .horizontal-logo {
    width: 50%;
  }

  .social-links {
    display: flex;
    align-items: start;
    gap: 2rem;
  }

  .social-links > * {
    width: 2rem;
  }

  .footer-menu {
    display: none;
    margin-left: auto;
  }

  .footer-menu .navbar {
    gap: 3rem;
  }

  /* Medium screen md */
  @media screen and (min-width: 768px) {
    .about-us .text {
      text-align: center;
      font-size: 2rem;
    }

    .btn {
      font-size: 1.5rem;
    }

    .navbar {
      display: flex;
      justify-content: space-evenly;
      flex-direction: row;
    }

    .hamburger {
      display: none;
    }

    .about-us > * {
      margin-inline: clamp(2rem, 10dvw, 10rem);
    }

    .template-container-1 .image {
      width: 60dvw;
    }

    .footer > .subtitle {
      padding: 3rem 10rem;
      font-size: 2rem;
    }

    .contact-container {
      height: 100dvh;
      grid-template-columns: 25% 1fr 25%;
      grid-template-rows: 1fr 20%;
    }

    .contact-container .vertical-logo {
      display: block;
    }

    .contact-form-wrapper .subtitle {
      font-size: 1.5rem;
    }

    .contact-container .logo {
      display: block;
    }

    .links-container {
      grid-column: 1 / -1;
      gap: 2rem;
      padding-inline: 5rem;
    }

    .links-container .horizontal-logo {
      width: 20%;
    }

    .footer-menu {
      display: flex;
    }
  }

  /* Large screen lg */
  @media screen and (min-width: 1024px) {
    .header {
      grid-template-columns: 1fr 1fr;
    }

    .header-image {
      height: 72dvh;
    }

    .navbar {
      width: 30%;
    }

    .slogan-container {
      justify-self: start;
      align-self: end;
      margin-bottom: 20dvh;
    }

    .template-container-1 {
      grid-template-columns: 20rem 1fr;
      gap: 1rem;
      width: 90dvw;
      text-align: left;
    }

    .template-container-2 {
      place-items: unset;
      grid-template-columns: 1fr 20%;
      padding: 1rem;
      font-size: 1.75rem;
    }

    .template-container-2 .text {
      text-align: left;
      padding-inline: 1rem 5rem;
    }

    .template-container-2 .image {
      position: absolute;
      right: 2rem;
      top: 3rem;
      width: 15rem;
    }
  }

  /* Extra Large screen xl */
  @media screen and (min-width: 1280px) {
    .header {
      grid-template-columns: 1fr 1fr;
    }

    .header,
    .footer {
      width: 95dvw;
      margin-inline: auto;
    }

    .header-image {
      height: 85dvh;
    }

    .about-us > * {
      margin-inline: 15rem;
    }

    .template-container-1 {
      width: 70dvw;
      font-size: 1.5rem;
    }

    .selected-option .flag-icon {
      width: 1.5rem;
      height: 1.5rem;
    }

    .banner-container {
      display: block;
    }
  }

  /*Extra Extra Large screen 2xl */
  @media screen and (min-width: 1536px) {
    .header,
    .footer {
      width: 90dvw;
      margin-inline: auto;
    }

    .header-image {
      height: 100dvh;
    }

    .template-container-2 .text {
      text-align: left;
      padding-inline: 5rem;
    }

    .template-container-2 .image {
      right: 2rem;
      top: 2rem;
      width: 18rem;
    }
  }
}

@layer utilities {
  .text-green {
    color: var(--enoloco-clr-green);
  }
  .text-purple {
    color: var(--enoloco-clr-purple);
  }
  .text-blue {
    color: var(--enoloco-clr-blue);
  }
  .text-yellow {
    color: var(--enoloco-clr-yellow);
  }
  .text-magenta {
    color: var(--enoloco-clr-magenta);
  }
  .text-red {
    color: var(--enoloco-clr-red);
  }
  .relative {
    position: relative;
  }
  .hidden {
    display: none;
  }
  .w-90 {
    width: 90%;
  }
}
