/* LiberSalus 2025 Estilos por Armando Reyes */

/* reseteo */
html {  height: auto; }

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

/* variables */
:root {
  /* colores */
  --color-pri: #007cba;
  --color-sec: #F39B1E;
  --color-bkg: #ffffff;
  --color-tit: #334155;
  --color-prf: #5D5D5D;

  /* fuentes */
  --font-pri: 'Inter', sans-serif;
  --font-sec: 'Roboto', sans-serif;

  /* tamaños */

  --font-resp-tit: clamp(2.5rem, 1.4578rem + 2.4096vw, 3rem);
  --font-resp-sbt: clamp(1.5rem, 1.2289rem + 1.2048vw, 2rem);
  --font-resp-txt: clamp(1rem, 0.7289rem + 1.2048vw, 1.5rem);
  --font-resp-075: clamp(0.7rem, -0.8527rem + 1.8773vw, .85rem);
  --font-resp-050: clamp(0.5rem, 0.0069rem + 0.5776vw, 0.7rem);

  /* tamaños movil */

  --font-mv-tit: 2.5rem;
  --font-mv-sub: 1.25rem;
  --font-mv-txt: 1.25rem
}

body {
  font-family: var(--font-pri);
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body.no-scroll {
  overflow: hidden;
}

/* HEADER */
#header { background-color: var(--color-bkg);}

.navbar {
  display: flex;
  height: 5.5rem;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
}

.cntlogo {
  margin-left: 2rem;
  &>img {
    width: 5rem;
    min-width: 6rem;
  }
}

.menu {
  display: flex;
  &>li {
    list-style: none;
    &>a {
      text-decoration: none;
      color: var(--color-prf);
      padding: 0.5rem 1rem;
      border-bottom: 2px solid transparent;
      transition: border-color 0.3s;
      font-weight: bold;
      &:hover {
        border-color: var(--color-pri);
      }
    }
  }
}

.sesion {
  margin-right: 2rem;
  &>a {
    width: fit-content;
    border: 2px solid var(--color-pri);
    border-radius: .5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--color-pri);
    text-wrap: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease;
    &:hover {
      background-color: var(--color-pri);
      color: var(--color-bkg);
    }
  }
}

/* HERO */
.hero {
  height: 45rem;
  background-image:
    linear-gradient(90deg, rgb(0, 0, 0, 0.7) 0%, transparent 100%),
    url("../img/hero2.jpg");
  background-size: cover;
  padding: 5%;
  border-bottom: 15px solid var(--color-pri);
  & :nth-child(1) {
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-bkg);
  }
  & :nth-child(2) {
    color: var(--color-bkg);
    padding-top: 2rem;
    font-size: 1.5rem;
    margin-bottom: 5rem;
  }
}

.btnPrim {
  /* margin-left: 7%; */
  width: 28rem;
  padding: 1rem 8.5rem;
  background-color: var(--color-sec);
  border-radius: 3rem;
  text-decoration: none;
  color: var(--color-bkg);
  transition: background-color 0.3s ease;
  &:hover {
    background-color: #DA8000;
  }
}

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 2rem;
  height: 1.5rem;
  margin-right: 1rem;
  cursor: pointer;
  z-index: 1001;
  float: right;
  right: 1rem;
  position: absolute;
}

.hamburger span {
  display: block;
  height: 3px;
  background-color: var(--color-prf);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animación a tache */
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 10px);}
.hamburger.active span:nth-child(2) { opacity: 0;}
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -10px);}

/* Menú móvil */
.mobileMenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-bkg);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  transform: translateY(-225%);
  transition: transform 0.3s ease;
  z-index: 1000;
  box-shadow: 0px 0px 75px rgba(0, 0, 0, 0.95);
}

.mobileMenu.active { transform: translateY(-10%);}

.mobileMenu ul {
  list-style: none;
  text-align: center;
  padding: 0;
}

.mobileMenu li { margin: 1rem 0; }

.mobileMenu a {
  text-decoration: none;
  font-size: 1.25rem;
  color: var(--color-prf);
  font-weight: bold; }

#btn-login {
  margin-top: 3rem;
  border: 2px solid var(--color-pri);
  padding: 0.25rem 1rem;
  border-radius: 0.5rem;
  color: var(--color-pri);
  transition: background-color 0.3s ease;
  &:hover {
    background-color: var(--color-pri);
    color: var(--color-bkg);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .cntMenu,
  .sesion {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

/* **********CONTENIDO* /

/* SOLUCIONES */

#soluciones,
#funciones,
#testimonios:not(p) {
  margin: 0 auto;
  padding: 5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  &> :nth-child(1) {
    font-size: 3.25rem;
    color: var(--color-tit);
  }
  &> :nth-child(2) {
    margin: 2rem 0 4rem 0;
    font-size: 2rem;
    text-align: center;
    color: var(--color-prf);
  }
}

.cntTrjSoluciones {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  width: 70%;
  gap: 0.5rem;
}

.trjSol {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 4rem;
  width: 16.68em;
  height: 20.5rem;
  border-radius: 1rem;
  box-shadow:
    0px 0px 25px 0px rgba(0, 0, 0, 0.15),
    4px 4px 6px 0px rgba(0, 0, 0, 0.25);
  transform: scale(1);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  &>h4 {
    text-align: center;
    font-size: clamp(1.25rem, 1.1145rem + 0.6024vw, 1.5rem);
    padding: 1.75rem;
    color: var(--color-tit);
  }
  &>p {
    text-align: center;
    color: var(--color-prf);
    padding: 0 0.5rem;
  }
  &:hover {
    transform: scale(1.03);
    box-shadow:
      0px 0px 45px 0px rgba(0, 0, 0, 0.45),
      4px 4px 6px 0px rgba(0, 0, 0, 0.05);
  }
}

/* COMO FUNCIONA */
#funciones { margin-bottom: 3rem;}

.resp { display: none;}

.cntsvg {
  width: 72.5%;
  margin: 0 auto;
}

.btnSec {
  padding: 1rem 5rem;
  border-radius: 0.5rem;
  background-color: var(--color-pri);
  color: var(--color-bkg);
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease;
  &:hover {
    background-color: #1fa1e3;
  }
}

.g1 .cr,
.g2 .cr,
.g3 .cr,
.g4 .cr,
.g5 .cr {
  fill: rgba(0, 0, 0, 0.0);
  transition: fill 0.3s ease;
}

.g1:hover .cr,
.g2:hover .cr,
.g3:hover .cr,
.g4:hover .cr,
.g5:hover .cr {
  fill: var(--color-pri);
}

.g1 .tx,
.g2 .tx,
.g3 .tx,
.g4 .tx,
.g5 .tx {
  transition: fill 0.3s ease;
  fill: var(--color-pri);
}

.g1:hover .tx,
.g2:hover .tx,
.g3:hover .tx,
.g4:hover .tx,
.g5:hover .tx {
  fill: var(--color-bkg);
}

.g1 .ps1,
.g2 .ps1,
.g3 .ps1,
.g4 .ps1 {
  display: none;
}

.g1:hover .ps1,
.g2:hover .ps1,
.g3:hover .ps1,
.g4:hover .ps1 {
  display: block;
  animation: flujo 2s ease infinite;
}

@keyframes flujo {
  0% {
    cx: 155;
    cy: 50
  }

  40% {
    cx: 210;
    cy: 50
  }

  45% {
    cx: 230;
    cy: 90
  }

  55% {
    cx: 275;
    cy: 10
  }

  60% {
    cx: 300;
    cy: 50
  }

  100% {
    cx: 350;
    cy: 50
  }
}


/* APLICACIÓN */

#aplicacion {
  background:linear-gradient(110deg, #007cba 0%, #67b3d9 100%);
  display: flex;
  justify-content: space-evenly;
  padding: 0 10%;
  height: auto;
  position: relative;
  height: 35.5rem;
  
}

.cntlineas {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.lineas {
  position: absolute;
  width: 90.68rem;
  height: 35.5rem;
  top: 0;
  left: 25%;
  transform: scaleX(1.5) rotate(-1deg);
}

.cntizq {
  height: 35.5rem;
  width: 37rem;
  min-width: 30rem;
  position: relative;
  
  &> :nth-child(1) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
    height: 45.5rem;
    width: 100%;
  }
}

#aplicacion::before {
  position: absolute;
  content: '';
  background-image: url("./img/lines.svg");
  background-size: cover;
  background-position: 0% 0%;
  width: 100%;
  height: 35.5rem;
  left: 0%;
  top:  0%;
  transform: rotate(-10deg);
}

.cntder {
  & > a {
    z-index: 1;
    cursor: pointer;
  }
  color: var(--color-bkg);
  text-align: start;
  display: flex;
  flex-direction: column;
  &>h3 {
    padding-right:0.25rem;
    font-size: clamp(2rem, -2rem + 6.25vw, 3.25rem);
    margin: 2rem;
    text-wrap: nowrap;
  }
  &>p {
    margin: 0 auto 4rem auto;
    font-size: 1.25rem;
    width: 80%;
  }
  &>ul {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    font-size: clamp(1rem, -1.4rem + 3.75vw, 1.75rem);
    font-weight: 600;
    text-align: start;
    margin-bottom: 5rem;
    &>li {
      list-style: none;
      position: relative;
    }
    &>li::before {
      position: absolute;
      content: '';
      width: 1rem;
      height: 1rem;
      top: 0.5rem;
      left: -2rem;
      background-color: var(--color-bkg);
      border-radius: 50%;
    }
    &>li:nth-child(1) { margin-left: 5rem; }
    &>li:nth-child(2) { margin-left: 2.5rem; }
  }
  &>.cntBotones {
    display: flex;
    gap: 2.5rem;
    margin: 0 auto;
  }
  &>a{
    text-align: center;
  }
}


/* Testimonios */

#testimonios {
  height: 53rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carrucel {
  display: flex;
  width: 100%;
  padding: 3rem;
  gap: 4rem;
  justify-content: center;
  overflow: hidden;
}

.trjTst {
  width: 20.75rem;
  min-width: 20.75rem;
  height: 12.5rem;
  border-radius: 1rem;
  box-shadow: 0px 16px 32px -8px #0c0c0d66;
  position: relative;
  overflow: hidden;
  background-color: #f3f3f3;

  &>.sup {
    width: 100%;
    display: flex;
    z-index: 1;
    margin: 1.5rem 0 0 1.5rem;
    &> :nth-child(1) {
      width: 5rem;
      height: 5rem;
      border: 0.25rem solid #f3f3f3;
      border-radius: 50%;
      z-index: 1;
    }
    &> :nth-child(2) {
      font-size: 1.5rem;
      font-weight: 700;
      width: 100%;
      display: flex;
      flex-direction: column;
      text-align: left;
      padding: 0.5rem;
      &> :nth-child(2) {
        width: 8.5rem;
        padding-right: 2rem;
        padding-top: 0.5rem;
        margin-left: auto;
      }
    }
  }
  &>.inf {
    margin: 0 1rem 0 auto;
    width: 70%;
    /* border: 2px dashed lawngreen; */
    font-size: 0.75rem;
    text-align: left;
    font-style: italic;
  }
}

.trjTst::before {
  position: absolute;
  content: '';
  width: 10.37rem;
  height: 25rem;
  background-color: #007cba;
  border-radius: 50%;
  top: -8.5rem;
  left: -6.5rem;
}

.cntCta {
  width: 90%;
  height: 10rem;
  margin: 0 auto;
  text-align: center;
  &>h3 {
    margin-bottom: 4.5rem;
    font-size: 2rem;
    color: var(--color-tit);
  }
  &>.btn-Prim {
    margin-top: 3rem;
    width: 28rem;
    padding: 1rem 3.5rem;
    background-color: var(--color-sec);
    border-radius: 3rem;
    text-decoration: none;
    text-wrap: nowrap;
    color: var(--color-bkg);
    transition: background-color 0.3s ease;
    &:hover {
      background-color: #DA8000;
    }
  }
}

.carrucelWrap {
  overflow: hidden;
  width: 100%;
}

.carrucel {
  display: flex;
  gap: 4rem;
  padding: 3rem;
  width: max-content;
  animation: scrollCarrucel 250s linear infinite;
}
.carrucel:hover {
  animation-play-state: paused;
}

@keyframes scrollCarrucel {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media (min-width: 1180px) {
  .carrucel {
    width: max-content;
    animation: scrollCarrucel 250s linear infinite;
  }

  @keyframes scrollCarrucel {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* ← ajusta según duplicación */
  }
}

@media (max-width: 1180px) {
  .carrucelWrap {
    overflow-x: auto;
  }

  .carrucel {
    width: 100%;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 2rem 1rem;
    gap: 2rem;
  }
}

/* FOOTER */
#footer {
  width: 100%;
  background-color: var(--color-pri);
  padding: 2.5rem;
  &>.cntFooter {
    display: flex;
    justify-content: space-between;
    &>.logo {
      &>img {
        width: 12.5rem;
        filter: grayscale(100) brightness(100);
      }
    }
    &>.menu {
      display: flex;
      flex-direction: column;
      gap: .5rem;
      color: var(--color-bkg);
      &>p {
        font-size: 1.25rem;
        font-weight: 600;
      }
      &>a {
        color: var(--color-bkg);
        text-decoration: none;
        transition: font-weight 0.3s ease;
        &:hover {
          font-weight: 600;
        }
      }
    }
    &>.reds {
      display: inline-block;
      &>p {
        color: var(--color-bkg);
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 1rem;
      }
      &>a {
        margin: 0 .5rem;
      }
    }
    &>.cont {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      color: var(--color-bkg);
      &>p {
        font-size: 1.25rem;
        font-weight: 600;
        text-align: center;
      }
      &>div {
        display: flex;
        gap: 1rem;
      }
    }
  }
  &>p {
    color: var(--color-bkg);
    font-size: .75rem;
    font-weight: 200;
    text-align: center;
    margin-top: 2rem;
    & > a {
      text-decoration: none;
      transition: 0.5s ease;
      color: var(--color-bkg);
      &:hover {
        text-decoration: underline;
      }
    }
  }
}

@media (max-width: 1024px) {
  
  /* HERO */
  .hero {
    background-size: cover;
    height: 30rem;
    background-position: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    & :nth-child(1) {
      font-size: var(--font-resp-tit);
    }
    & :nth-child(2) {
      font-size: var(--font-resp-txt)
    }
  }
  .btnPrim {
    margin: 0 auto;
    width: fit-content;
    flex-shrink: 0;
    padding: 1rem 3.5rem;
  }

  /* **********CONTENIDO* /
/* SOLUCIONES */
  #soluciones,
  #funciones,
  #testimonios:not(p) {
    text-align: center;
    &> :nth-child(1) {
      font-size: var(--font-resp-sbt);
    }
    &> :nth-child(2) {
      
      font-size: var(--font-resp-txt);
      color: var(--color-prf);
    }
  }
  #soluciones {
    padding-bottom: 0rem;
    width: 80%;
  }
  .cntTrjSoluciones { width: 90%; }
  
  /* .trjSol {zoom: .5;} */

  /* COMO FUNCIONA */
  .web { display: none;}
  .resp { display: block;}
  #funciones { margin-top: 0; }
  .cntsvg {
    width: 97%;
    margin-bottom: 2rem;
  }
  .btnSec {padding: 1rem 2.5rem;}

  .g3:hover .ps1 {
    display: none;
  }

  /* APLICACIÓN */
  #aplicacion {height: auto; padding: 1rem;}
  .cntizq {
    zoom: 0.35;
    transform: translateY(10%);
  }
  #aplicacion::before { left: -20%; }
  .cntder {
    transform: translate(-2rem);
    zoom: 0.65;
    text-align: start;
    flex-direction: column;
    &>h3 {
      padding-right:0;
      font-size: clamp(1.5rem, -2.85rem + 16vw, 2.5rem);
      text-align: start;
    }
    &>p {
      font-size: clamp(1.5rem, -2.2rem + 12vw, 2.5rem);
      width: 70%;
      
    }
    &>ul {
      list-style-type: none;
      font-size: clamp(1.5rem, -2.2rem + 12vw, 2rem);
      gap: 1rem;
      font-weight: 600;
      width: 80%;
      margin-left: 3rem;
      
      &>li:nth-child(1) { margin-left: 0; }
      &>li:nth-child(2) { margin-left: 0; }
    }
    
  }

  .lineas {
    position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform: scaleX(1.7) rotate(-1deg);
  }
  .cntBotones {

  }
  /* Testimonios */

  .carrucelWrap {
    overflow-x: auto;               
    overflow-y: hidden;
    scroll-snap-type: x mandatory;  
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
  }

  .carrucel {
    width: max-content;     
    padding: 2rem 1rem;
    gap: 2rem;
    animation: none;        
    transform: translateX(0);
  }

  /* FOOTER */
  #footer {

    &>.cntFooter {
      align-items: center;
      flex-direction: column;
      text-align: center;
      gap: 2rem;
      &>.logo {
        &>img { width: 8.5rem; }
      }
    }
    &>p {
      color: var(--color-bkg);
      font-size: .75rem;
      font-weight: 200;
      text-align: center;
      margin-top: 2rem;
    }
  }
}

@media (orientation: portrait) {
  .mobileMenu {
    height: 100vh;
  }
}

/* construccion */
.construccion {
  margin-top: 3rem;
  width: 100%;
  height: 16rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  gap: 3rem;
  & > h2 {
    margin-top: 7rem;
    font-size: clamp(1.5rem, 1.1582rem + 1.519vw, 3rem);
  }
  & > p {
    font-size: clamp(0.75rem, 0.5791rem + 0.7595vw, 1.5rem);
    line-height: 1.5;
  }
  & > .engranes {
    width: 7rem;
  }
}

.arriba, .centro{
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(0deg);
}
.arriba {animation: arriba 12s linear infinite;}
.centro {animation: centro 12s linear infinite;}

@keyframes arriba {
  to {transform: rotate(360deg);}
}
@keyframes centro {
  to {transform: rotate(-360deg);}
}
