/* =========================================================
   HYDROSTOR PROJECT CARDS — FINAL VERSION WITH DYNAMIC MASKS
   ========================================================= */

/* === Slider Container === */
.hs-projects-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 2rem 0 4rem;
  /*padding-left: 5%;
	padding-right: 5%;*/
}

/* =========================================================
   DEFAULT MASK (Middle of scroll)
   Fade on left + right
   ========================================================= */
.hs-projects-slider .hs-projects-wrapper {
  display: flex;
  gap: 2rem;

  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: none; /* Free scroll */

  padding: 40px 0;
  margin-bottom: 0;
  scrollbar-width: none;

  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    /* fade on left */ rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 88%,
    rgba(0, 0, 0, 0) 100% /* fade on right */
  );
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 88%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* =========================================================
   LEFT EDGE (scrollLeft ≤ 5)
   REMOVE left fade, keep right fade
   ========================================================= */
.hs-projects-slider.at-left .hs-projects-wrapper {
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    /* no fade left */ rgba(0, 0, 0, 1) 88%,
    rgba(0, 0, 0, 0) 100% /* fade right */
  );
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 88%,
    rgba(0, 0, 0, 0) 100%
  );
}

/* =========================================================
   RIGHT EDGE (scrollRight ≤ 5)
   REMOVE right fade, keep left fade
   ========================================================= */
.hs-projects-slider.at-right .hs-projects-wrapper {
  -webkit-mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    /* fade left only */ rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 100% /* no fade right */
  );
  mask-image: linear-gradient(
    to right,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 1) 12%,
    rgba(0, 0, 0, 1) 100%
  );
}

/* Scrollbar hidden (WebKit) */
.hs-projects-wrapper::-webkit-scrollbar {
  height: 6px;
}
.hs-projects-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.hs-projects-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

/* === Card === */
.hs-project-card {
  flex: 0 0 33%;
  min-width: 500px;
  background: var(--card-bg, #0c284c);
  color: #ffffff;
  border-radius: 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: visible !important;
  transition: all 0.5s ease;
  border: 6px solid rgba(255, 255, 255, 0.1);
}

.hs-project-card:hover {
  transform: scale(1.02);
  box-shadow: 0px 0px 40px 0px #427d16;
  z-index: 200;
}

/* === Inner layout === */
.hs-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100%;
}

/* === Left side === */
.hs-card-left {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
  border-right-width: 0;
}

/* === Logo === */
.hs-card-logo img {
  max-width: 220px;
  height: auto;
  display: block;
  margin-bottom: 3.5rem;
  min-height: 80px;
}

/* === Description text === */
.hs-card-desc {
  font-size: 17px;
  line-height: 1.5;
  color: #ffffff;
}

/* === Right side image === */
.hs-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}

.hs-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

/* === Navigation Arrows === */
.hs-arrows {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-left: 5%;
}

.hs-arrow {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.6rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.hs-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* === Link wrapper === */
.hs-project-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.hs-project-card-link:hover .hs-project-card {
  transform: scale(1.02);
  transition: transform 0.3s ease;
}

/* Give space for shadows so they don't get clipped */
.hs-projects-wrapper {
  padding-left: 5% !important;
  padding-right: 5% !important;
}
