/* Zoho page: "Bring Your Entire Business Together with Zoho One" (Figma).
   Heading (645px) on the left, intro (479px) on the right; below, a 608px picture on the left
   and four 608 x 224 cards on the right (green, grey, green, grey), 16px apart. */

.ect-zoho-one,
.ect-zoho-one * {
  box-sizing: border-box;
}

.ect-zoho-one {
  width: min(1240px, calc(100% - 48px));
  margin: 72px auto;
  color: #000;
  font-family: "Montserrat", "Montserrat Variable", sans-serif;
}

.ect-zoho-one__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 16px;
}

body.service-page .ect-zoho-one .ect-zoho-one__heading,
body.zoho-page .ect-zoho-one .ect-zoho-one__heading {
  flex: 0 1 645px;
  margin: 0;
  font-family: "Montserrat", "Montserrat Variable", sans-serif !important;
  font-size: 42px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  color: #000 !important;
}

.ect-zoho-one__intro {
  flex: 0 0 479px;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.ect-zoho-one__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.ect-zoho-one__media {
  height: 563px;
  margin: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #d9d9d9;
}

.ect-zoho-one__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ect-zoho-one__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ect-zoho-one__card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 224px;
  padding: 16px;
  border-radius: 16px;
}

.ect-zoho-one__card--green {
  background-color: #5b6d49;
  background-image: url("../img/noise-on-green.0a043fc97d8c.png");
  background-size: 320px 320px;
  color: #fff;
}

.ect-zoho-one__card--gray {
  background-color: #f1f1ef;
  background-image: url("../img/noise-on-gray.40137d71694a.png");
  background-size: 320px 320px;
  color: #000;
}

.ect-zoho-one__link {
  color: inherit;
  text-decoration: underline;
}

/* Figma title boxes: 439 / 567 / 521 / 567 px wide, text box 567px. */
@media (min-width: 1200px) {
  .ect-zoho-one__card:nth-child(1) .ect-zoho-one__title { max-width: 439px; }
  .ect-zoho-one__card:nth-child(3) .ect-zoho-one__title { max-width: 521px; }
  .ect-zoho-one__text { max-width: 567px; }
}

body.service-page .ect-zoho-one .ect-zoho-one__title,
body.zoho-page .ect-zoho-one .ect-zoho-one__title {
  margin: 0;
  font-family: "Montserrat", "Montserrat Variable", sans-serif;
  font-size: 30.51px;
  font-weight: 600;
  line-height: 1.25;
  color: inherit;
}

.ect-zoho-one__text {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: inherit;
}

/* Figma scroll animation (desktop): the picture stays pinned while the four cards pin one
   after another and each next card slides up over the one before it. After the last card
   everything scrolls away together. */
@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
  .ect-zoho-one__media,
  .ect-zoho-one__card {
    position: sticky;
    top: 100px;
  }
}

/* Tablet and mobile: responsive layout approved in the interactive preview. */
@media (max-width: 1199px) {
  .ect-zoho-one {
    width: min(100% - 48px, 1024px);
    margin: 56px auto;
    overflow: hidden;
  }

  .ect-zoho-one__header {
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
    margin-bottom: 26px;
  }

  body.service-page .ect-zoho-one .ect-zoho-one__heading,
  body.zoho-page .ect-zoho-one .ect-zoho-one__heading {
    flex: none;
    font-size: clamp(28px, 4.4vw, 36px) !important;
  }

  .ect-zoho-one__intro {
    flex: none;
    max-width: 850px;
  }

  .ect-zoho-one__body {
    display: block;
  }

  .ect-zoho-one__media {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-bottom: 18px;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
  }

  .ect-zoho-one__cards {
    display: flex;
    flex-direction: row;
    gap: 16px;
    width: 100%;
    padding: 2px 0 10px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ect-zoho-one__cards::-webkit-scrollbar {
    display: none;
  }

  .ect-zoho-one__card {
    flex: 0 0 82%;
    min-width: 0;
    min-height: 280px;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border-radius: 18px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* Preview sequence: green, gray, gray, green. Desktop keeps its Figma sequence. */
  .ect-zoho-one__card:nth-child(1),
  .ect-zoho-one__card:nth-child(4) {
    background-color: #5b6d49;
    background-image: url("../img/noise-on-green.0a043fc97d8c.png");
    background-size: 320px 320px;
    color: #fff;
  }

  .ect-zoho-one__card:nth-child(2),
  .ect-zoho-one__card:nth-child(3) {
    background-color: #f1f1ef;
    background-image: url("../img/noise-on-gray.40137d71694a.png");
    background-size: 320px 320px;
    color: #000;
  }

  body.service-page .ect-zoho-one .ect-zoho-one__title,
  body.zoho-page .ect-zoho-one .ect-zoho-one__title {
    font-size: clamp(18px, 2.4vw, 23px);
    line-height: 1.2;
  }

  .ect-zoho-one__text {
    font-size: clamp(13px, 1.45vw, 15px);
    line-height: 1.5;
  }
}

@media (max-width: 700px) {
  .ect-zoho-one {
    width: calc(100% - 32px);
  }

  .ect-zoho-one__header {
    margin-bottom: 22px;
  }

  body.service-page .ect-zoho-one .ect-zoho-one__heading,
  body.zoho-page .ect-zoho-one .ect-zoho-one__heading {
    font-size: clamp(26px, 7.2vw, 32px) !important;
    line-height: 1.12 !important;
  }

  .ect-zoho-one__intro {
    font-size: 15px;
    line-height: 1.55;
  }

  .ect-zoho-one__body {
    display: block;
  }

  .ect-zoho-one__media {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-bottom: 18px;
    aspect-ratio: 16 / 10;
  }

  .ect-zoho-one__cards {
    gap: 12px;
    padding-bottom: 8px;
  }

  body.service-page .ect-zoho-one .ect-zoho-one__title,
  body.zoho-page .ect-zoho-one .ect-zoho-one__title {
    font-size: 21px;
  }

  .ect-zoho-one__card {
    flex: 0 0 88%;
    min-height: 260px;
  }

  .ect-zoho-one__text {
    font-size: 14px;
  }
}
