
/*#region Generic*/
section {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5vw 0;
}

.home-title {
  font-size: clamp(2rem, 10cqw, 7rem);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  z-index: 2;
  position: relative;
  display: inline-block;
}

#about-us .home-title,
#services .home-title {
  color: #75a4fd;
  font-family: 'Balsamiq Sans';
}

#about-us .roundBackground {
  min-width: 35%;
  width: clamp(250px, 19cqw, 500px);
}

.roundBackground {
  position: relative;
  display: inline-block;
  container-type: inline-size;
}

.roundBackground > a > img {
  width: 100%;
  height: auto;
  display: block;
}

.btnText {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-family: 'Balsamiq Sans';
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
  font-size: var(--dynamic-font-size, 12cqi);
}
/*#endregion*/

/*#region Cover*/
#cover {
  background-image: url("/Images/Web Generic/Backgrounds/FaroAdriftTeam.png");
  background-repeat: no-repeat;
  background-position: 35% 5%;
  background-size: cover; /* o contain */
  min-width: 100vw;
  min-height: 100vh;
  z-index: 1;
  position: relative;
  overflow: hidden;
  padding: 0;
}

#cover .slogan-container {
  position: absolute;
  top: 33%;
  left: 31%;
  width: clamp(500px, 35vw, 1200px);

  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  container-type: inline-size;
}

#cover .slogan{
  flex: 0 0 auto;
  z-index: 1;
  margin: 0;
  text-align: center;
  text-shadow: 0vh 0vh 0.7vh rgba(74, 44, 1, 0.9);
  white-space: nowrap;
  display: block;
}
#cover .slogan.wheat{
  font-weight: normal;
  color: whitesmoke;
  font-size: 9cqi;
}

#cover .slogan.orange{
  font-family: 'Balsamiq Sans';
  font-weight: bold;
  color: #fa824c;
  font-size: 13cqi;
}
/*#endregion*/

/*#region About-us*/

#about-us {
  position: relative;
  overflow: visible;
  z-index: 2;
  min-height: 0;
  padding: 0 13vw 0 10vw;
}
#about-us::before,
#about-us::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 80%;
  width: auto;
  aspect-ratio: 1/1;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("/Images/Web Generic/Decoration/CurvaNaranja.png");
  z-index: -2;
  pointer-events: none;
}

#about-us::before {
  left: 0;
  transform: translate(var(--a-before-x, -72%), var(--a-before-y, -15%)) rotate(295deg);
  background-position: center;
}

#about-us::after {
  right: 0;
  transform: translate(var(--a-after-x, 64%), var(--a-after-y, -32%)) ; 
  background-position: center;
}

#about-us-title-holder {
  container-type: inline-size;
  width: 100%;
  height: auto;
  margin-bottom: 5%;
}

#about-us .home-title {
  text-align: left;
  font-size: clamp(2rem, 14cqi, 7rem);
  font-weight: normal;
  white-space: nowrap;
  line-height: 1;
  display: block;
  letter-spacing: -0.02em;
}

#about-us .home-title::after {
  content: "";
  position: absolute;
  left: 55%;
  bottom: -9cqw;
  width: 70cqw;
  height: 100%;
  background-image: url("/Images/Web Generic/Decoration/LineOrange.png");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  z-index: -1;
}

#about-us .content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 90vw;
  margin: 0 auto;
  gap: 4vh;
  padding-top: var(--home-wave-size);
  padding-bottom: 5%;
}

#about-us .leftContent {
  flex: 1 0 55vh;
  min-width: 25vw;
  max-width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#about-us .rightContent{
  flex: 0 1 50vh;
  min-width: 30vw;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#about-us p{
  font-size: clamp(20px, 1.5cqw, 35px);
  color: black;
  text-align: left;
  line-height: 1.5;
  margin-bottom: 10%;
}

.waves {
  position: absolute;
  top: var(--home-wave-offset);
  left: 0;
  width: 100%;
  height: var(--home-wave-size);
  pointer-events: none;
  z-index: 3;
  
  background-image: url("/Images/Web Generic/Backgrounds/New_PanelOlasSmall.png");
  background-repeat: repeat-x;
  background-size: var(--wave-tile-width) auto;
  background-position-y: bottom;
  mask-image: url("/Images/Web Generic/Mask/NavVarNew.png");
  mask-repeat: repeat-x; 
  mask-size: 80% auto;
  
  animation: olas-mask-fija 15s linear infinite;

/* 
  animation: mover-olas 15s linear infinite;
  mask-repeat: repeat-x;
  mask-size: 35% auto;*/
}

body:not(.js-ready) .waves {
  visibility: hidden;
}
/*#endregion*/

/*#region Projects*/
#projects .home-title {
  color: #fa824c;
  font-family: 'Balsamiq Sans';
  font-weight: bold;
}
.carousel-container {
  padding-top: 3%; /* mismo valor que el hover */
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}

.carousel-container.holding,
.carousel-container.holding *,
.carousel-container.dragging,
.carousel-container.dragging *{
  cursor: grabbing !important;
}

.carousel-container.dragging {
  user-select: none;
}

.carousel-track {
  display: flex;
  gap: 0.2rem;
  width: max-content;
  user-select: none;
  height: calc(var(--slide-width) * var(--track-height-multiplier, 1));
  transition: transform 0.3s ease; /* para animaciones */
}

.carousel-slide{
  transition: transform 0.3s ease;
  flex: 0 0 var(--slide-width, 33.33vw);
  height: 100%;
  position: relative;
  padding: 0;
  margin: 0;
  box-sizing: border-box;

  mask-image: url('/Images/Web%20Generic/Mask/BoxShape.png');
  mask-repeat: no-repeat;
  mask-size: 100% 100%; /* cover es distinto pero va bien tb */
  /* -webkit- es pa cuando alguien use un navegador que no esté muy actualizao */
  -webkit-mask-image: url('/Images/Web%20Generic/Mask/BoxShape.png');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; /* cover es distinto pero va bien tb */
}

.carousel-slide :hover{
  transform: translateY(-0.2rem);
  z-index: 1;
}

.carousel-slide img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: var(--carousel-slide-focus-pos, center);
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.carousel-slide h3 {
  position: absolute;
  bottom: 1vw;
  left: 1%;
  /* transform: translateX(-10%); */
  text-align: center;
  margin: 0;
  padding: 0.4rem 0.8rem;
  color: white;
  font-weight: bolder;
  font-size: 2vw;
  text-shadow: 1px 1px 14px rgba(0,0,0);
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
}

/*#endregion*/

/*#region KeyFrame-Animations*/

@keyframes mover-olas {
  from {
    transform: translateX(-35%);
  }
  to {
    transform: translateX(0%);
  }
}
@keyframes olas-mask-fija {
  from {
    background-position-x: 0%;
  }
  to {
    background-position-x: var(--wave-tile-width); 
  }
}
@keyframes floatCombined {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-2.5%) rotate(1.5deg);
  }
  50% {
    transform: translateY(-5%) rotate(3deg);
  }
  75% {
    transform: translateY(-2.5%) rotate(-1.5deg);
  }
}

@media (max-width: 768px) {
  #cover .slogan {
    text-align: right;
  }
  #cover .slogan-container {
    align-items: end;
    width: clamp(300px, 35vw, 1200px);
  }
}
/*#endregion*/

/*#region Services*/
#services {
  position: relative;
  overflow: visible;
  min-height: 80vh;
  justify-content: space-around;
  padding: 5vh 0;
  box-sizing: border-box;
}

#services::before,
#services::after {
  content: "";
  position: absolute;
  top: 50%;
  height: 80%;
  width: auto;
  aspect-ratio: 1/1;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("/Images/Web Generic/Decoration/CurvaAzul.png");
  z-index: -1;
}

#services::before {
  left: 0;
  transform: translate(var(--s-before-x, -63%), 12%); 
  background-position: center;
}

#services::after {
  right: 0;
  transform: translate(var(--s-after-x, 49%), 15%) rotate(var(--s-after-r, 270deg));
  background-position: center;
}

#services .service-icons-group {
  --cols: 4;
  --gap: 3rem;
  --icon-width: 100%;

  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: var(--gap);
  
  width: 80%;
  max-width: 1800px;
  justify-content: center;
  justify-items: center;
  margin: 2rem 0;
  padding-bottom: 5vh;
}

#services .service-icons-group .service-icon {
  position: relative;
  width: var(--icon-width);
  aspect-ratio: 1 / 1.25;
  cursor: pointer;
  justify-self: center;
  container-type: inline-size;
  /* display: inline-block;
  align-items: center;
  justify-content: center;
  z-index: 2; */
  transition: width 0.3s ease, margin-top 0.5s ease;
}

#services .service-icons-group.overlap-mode .row-odd {
  margin-top: -30%;
  z-index: 2; 
}

#services .service-icons-group.overlap-mode .row-even:not(:first-of-type) {
  margin-top: -10%;
  z-index: 1; 
}

#services .service-icons-group.overlap-mode {
  padding-bottom: 2vh;
  margin: 2rem 0;
}

#services .service-icons-group .service-icon.row-even {
  justify-self: start;
}

#services .service-icons-group .service-icon.row-odd {
  justify-self: end;
}

#services .service-icons-group .service-icon > a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 3;
  align-items: center;
}

.serviceIconImage {
  width: 80%;
  height: auto;
  display: block;
}

.serviceIconbackground {
  flex: 0 0 80%;
  background-image: url("/Images/Web Generic/Decoration/CircleMaskOrange.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

#services .roundBackground {
  min-width: 22%;
  width: clamp(250px, 12cqw, 500px);
}

.btnService {
  font-size: clamp(23px, 8cqi, 33px);
  flex: 0 0 10%;
  color: black;
  font-weight: bold;
  white-space: nowrap;
  pointer-events: none;
  text-align: center;
}
/*#endregion*/

/*#region ContactHome*/
#contactHome {
  display: flex;
  flex-direction: column;
  text-align: center;
  justify-content: space-between;
  margin: 2rem 0 0 0;
  min-height: 90vh;
  padding-top: 3vw;
  padding-bottom: 0;
}

#contactDescription {
  flex: 0 1 auto;
  width: 70vw;
  text-align: center;
  margin: 0;
  padding-bottom: 3%;
}

#contactHome h1{
  font-size: clamp(2rem, 8cqw, 7rem);
  white-space: break-spaces;
  font-family: 'Balsamiq Sans';
  color: #fa824c;
  font-weight: bold;
  width: 75%;
}

#contactHome h3{
  font-family: 'Balsamiq Sans';
  font-size: clamp(1rem, 5cqw, 4rem);
  color: #75a4fd;
  font-weight: normal;
  width: 90%;
  display: inline-block;
}

#contactHome .roundBackground {
  min-width: 32%;
  width: clamp(250px, 12cqw, 500px);
}
/* 
#contactHome .icon-container {
  flex: 1 0 auto;
  width: 100%;
  min-height: 25vh;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  background-image: url('/Images/Web%20Generic/Backgrounds/PanelOlasAlfaRecortado.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position-y: bottom;
}

#contactHome .icon-container a {
  width: 7vw;
  cursor: pointer;
} */

#sea {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  min-height: 25vh;
  border-radius: 12px;
  overflow: hidden;
  background-image: url('/Images/Web%20Generic/Backgrounds/New_PanelOlasSmall.png');
  background-size: auto 100%;
  background-repeat: repeat-x;
  background-position-y: bottom;
}

.lifebelt {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, opacity 0.3s ease;
  animation-play-state: paused;
  opacity: 0;
  text-decoration: none;
  overflow: hidden;
}

.lifebelt.animate {
  animation: floatCombined 3.5s ease-in-out infinite;
  animation-play-state: running;
  opacity: 1;
  
  animation-fill-mode: forwards; /* Mantiene el último estado cuando se pausa */
  will-change: transform; /* Ayuda a mejorar el rendimiento en animaciones transform */
}

.lifebelt:hover {
  transform: scale(1.1);
}

.social-icon {
  width: 70%;
  height: 70%;
  object-fit: contain;
  pointer-events: none;
}
/*#endregion*/