/* ==========================================================================
   Zoho CommunitySpaces — Spaces
   ========================================================================== */

/* Common
   ========================================================================== */
.zwc-secmar {
  margin: 80px 0;
}

.zwc-secpad {
  padding: 80px 0;
}

.zwc-wrapper h1,
.zwc-wrapper h2,
.zwc-wrapper h3 {
  font-family: var(--zf-primary-regularserif);
  letter-spacing: -0.03em;
}

.zwc-wrapper h1,
.zwc-wrapper h2 {
  text-wrap: balance;
}

.zwc-wrapper p {
  letter-spacing: -0.02em;
  text-wrap-style: pretty;
}

.zwc-wrapper h1 {
  font-size: 44px;
}

.zwc-wrapper h2 {
  font-size: 32px;
}

.zwc-wrapper img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.zw-product-header {
  background: #A4C4FB;
}

/* Buttons — primary (.act-btn.cta-btn) is styled by the global stylesheet */
.zwc-btnwrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.act-btn,
.sec-btn {
  padding: 16px 32px;
  border-radius: 4px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.sec-btn {
  display: inline-block;
  font-family: var(--zf-primary-semibold), sans-serif;
  margin: 0;
  border: 1px solid transparent;
  cursor: pointer;
  z-index: 1;
  text-transform: uppercase;
  position: relative;
  text-align: center;
  border: 2px solid #000;
  color: #000;
}

/* Banner
   ========================================================================== */
.zwc-banner {
  padding: 70px 0 230px;
  text-align: center;
  background: #a4c4fb url(/sites/zweb/images/communityspaces/modern-spaces/banner-bg.jpg) no-repeat center bottom / cover;
}

.zwc-banner__inner {
  max-width: 876px;
  margin-inline: auto;
}

.zwc-banner p {
  max-width: 700px;
  margin: 24px auto 0;
}

.zwc-banner .zwc-btnwrap {
  margin-top: 30px;
}

/* Alternating content + media rows
   ========================================================================== */
/* contains the media's pre-animation offset so it can't widen the page */
.zwc-altsec {
  overflow: hidden;
}

.zwc-altsec__head {
  max-width: 690px;
  margin-inline: auto;
  text-align: center;
}

.zwc-altsec__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  max-width: 1000px;
  margin-inline: auto;
}

/* Content leads in the markup; this flips the pair so the media sits left */
.zwc-altsec__row--reverse {
  flex-direction: row-reverse;
}

.zwc-altsec__cont {
  flex: 0 1 512px;
  min-width: 0;
}

.zwc-altsec__cont h3 {
  font-size: 24px;
}

.zwc-altsec__cont p {
  margin-top: 16px;
}

.zwc-altsec__media {
  flex: 0 0 450px;
}

/* Explore — sticky intro + stacking cards (same behaviour as the home page
   feature section). Each card pins, the next slides over it and the covered
   ones recede into a deck (transforms set in JS); the tags follow the top card.
   ========================================================================== */

.zwc-explore {
  position: relative;
  /* own stacking context, so the scenery's negative z-index stays inside it */
  z-index: 0;
  /* clip, not hidden: overflow:hidden would make this a scroll container and
     break position:sticky on the columns */
  overflow: clip;
}

/* Landscape layer — an absolute track spanning the whole section, holding a
   one-viewport sticky frame. The frame can't leave the track, so it enters
   aligned to the section's top edge (white fade behind the heading), pins while
   the cards stack, and leaves aligned to the section's bottom edge. The pinned
   content releases at that same moment (see .zwc-explore__cont min-height and
   the deck's margin set in JS), so nothing slides over the landscape. */
.zwc-explore__scenery {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.zwc-explore__scenery::before {
  content: "";
  position: sticky;
  top: 0;
  display: block;
  height: 100vh;
  background:
    linear-gradient(#fff 18.78%, rgba(255, 255, 255, 0) 64.49%),
    #fff url(/sites/zweb/images/communityspaces/modern-spaces/explore-bg.jpg) no-repeat center bottom / cover;
}

.zwc-explore__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
}

/* Left column pins at the same offset as the cards */
.zwc-explore__cont {
  position: sticky;
  top: 140px;
  flex: 0 1 590px;
  min-width: 0;
}

.zwc-explore__cont p {
  max-width: 463px;
  margin-top: 12px;
}

.zwc-explore__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 400px;
  margin-top: 140px;
}

.zwc-explore__tab {
  position: relative;
  z-index: 0;
  padding: 8px 16px;
  border: 1px solid #d5dbff;
  border-radius: 50px;
  background: #fff;
  color: #1a1a1a;
  font-family: var(--primaryfont-regular);
  font-size: 17px;
  line-height: 1.556;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: color 0.4s ease, border-color 0.4s ease;
}

/* Gradient lives on a pseudo so it can fade in (a background-image swap can't) */
.zwc-explore__tab::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, #00d9ff 10.15%, #425dc7 49.78%, #5b2db1 109.7%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.zwc-explore__tab--active {
  border-color: transparent;
  color: #fff;
  font-family: var(--primaryfont-semibold);
}

.zwc-explore__tab--active::before {
  opacity: 1;
}

.zwc-explore__cards {
  flex: 0 0 611px;
  min-width: 0;
  /* room for the frame drawn 10px outside each card */
  padding: 10px;
}

/* Sticky box only; JS gives every card the same height and pacing */
.zwc-explore__card {
  position: sticky;
  top: 140px;
  transform-origin: center top;
  will-change: transform;
}

/* No-JS fallback gap — JS replaces it with the uniform scroll slot */
.zwc-explore__card+.zwc-explore__card {
  margin-top: 10vh;
}

/* Trailing scroll room (added by JS) that holds the last card before release */
.zwc-explore__spacer {
  height: 30vh;
}

.zwc-explore__card-inner {
  position: relative;
  height: 100%;
  padding: 59px 48px;
  border-radius: 24px;
  background-color: #fff;
}

/* Translucent outer frame, drawn behind the white card */
.zwc-explore__card-inner::before {
  content: "";
  position: absolute;
  inset: -11px;
  z-index: -1;
  border: 1.2px solid rgba(114, 109, 56, 0.25);
  border-radius: 30px;
  background: linear-gradient(152.5deg, rgba(0, 102, 10, 0.12) 0%, rgba(162, 194, 250, 0.15) 100%);
  backdrop-filter: blur(5px);
}

.zwc-explore__card h3,
.zwc-explore__card p {
  max-width: 453px;
}

.zwc-explore__card p {
  margin-top: 16px;
}

.zwc-explore__card img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto 0;
}

/* Icon card grid
   ========================================================================== */
.zwc-gridsec__head {
  text-align: center;
}

.zwc-gridsec__head p {
  margin-top: 20px;
}

.zwc-gridsec__list {
  display: flex;
  flex-wrap: wrap;
  gap: 64px 95px;
  margin-top: 80px;
}

.zwc-gridsec__item {
  flex: 0 1 calc((100% - 190px) / 3);
}

.zwc-gridsec__item h3 {
  font-family: var(--primaryfont-semibold);
  letter-spacing: -0.02em;
}

/* Icon comes from the shared sprite — one 215x35 strip, five 35px icons
   spaced 45px apart (10px gap between cells) */
.zwc-gridsec__item h3::before {
  content: "";
  display: block;
  width: 35px;
  height: 35px;
  margin-bottom: 23px;
  background: url(/sites/zweb/images/communityspaces/modern-spaces/sprite.svg) no-repeat 0 0 / 215px 35px;
}

.zwc-gridsec__item:nth-child(2) h3::before {
  background-position-x: -45px;
}

.zwc-gridsec__item:nth-child(3) h3::before {
  background-position-x: -90px;
}

.zwc-gridsec__item:nth-child(4) h3::before {
  background-position-x: -135px;
}

.zwc-gridsec__item:nth-child(5) h3::before {
  background-position-x: -180px;
}

.zwc-gridsec__item p {
  margin-top: 12px;
}

/* FAQ
   ========================================================================== */
.zwc-faq {
  background-color: #a4c4fb;
}

.zwc-faq__inner {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

.zwc-faq__inner h2 {
  flex: 0 0 383px;
}

.zwc-faq__list {
  flex: 1 1 auto;
  min-width: 0;
}

.zwc-faq__item {
  padding: 20px;
  border: 1px solid #b4dacf;
  border-radius: 8px;
  background-color: #fff;
}

.zwc-faq__item+.zwc-faq__item {
  margin-top: 16px;
}

.zwc-faq__item h3 {
  position: relative;
  padding-right: 44px;
  cursor: pointer;
  margin-bottom: 0;
}

/* +/- toggle drawn in CSS: circle on the span, two bars on its pseudo-elements */
.zwc-faq__item h3 span {
  position: absolute;
  top: 2px;
  right: 0;
  width: 24px;
  height: 24px;
  border: 1px solid #000;
  border-radius: 50%;
}

.zwc-faq__item h3 span::before,
.zwc-faq__item h3 span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1px;
  background-color: #000;
  transform: translate(-50%, -50%);
}

.zwc-faq__item h3 span::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.zwc-faq__item h3.active span::after {
  opacity: 0;
}

.zwc-faq__item p {
  display: none;
  margin-block: 12px 0;
}

.zwc-faq__item h3.active+p {
  display: block;
}

/* Closing CTA
   ========================================================================== */
.zwc-cta {
  text-align: center;
  background: #a4c4fb url(/sites/zweb/images/communityspaces/modern-spaces/cta-bg.jpg) no-repeat center bottom / cover;
}

.zwc-cta .zwc-btnwrap {
  margin-top: 44px;
}

/* Scroll-in animation — .middle-animated is added to .content-wrap by the
   global script. Media slides in from the side it sits on.
   ========================================================================== */
.zwc-altsec__media {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.zwc-altsec__row--reverse .zwc-altsec__media {
  transform: translateX(-60px);
}

.middle-animated .zwc-altsec__media {
  opacity: 1;
  transform: translateX(0);
}

/* Desktop typography and spacing
   ========================================================================== */
@media only screen and (min-width: 1200px) {
  .zwc-secmar {
    margin: 120px 0;
  }

  .zwc-secpad {
    padding: 120px 0;
  }

  .zwc-banner {
    padding: 120px 0 300px;
  }

  .zwc-banner h1 {
    font-size: 72px;
    line-height: 1.111;
  }

  .zwc-banner p {
    font-size: 18px;
    line-height: 1.444;
  }

  .zwc-altsec__head h2,
  .zwc-explore__cont h2,
  .zwc-gridsec__head h2,
  .zwc-faq__inner h2 {
    font-size: 56px;
    line-height: 1.143;
  }

  .zwc-altsec__head {
    margin-bottom: 80px;
  }

  /* each row sits in its own .content-wrap; margins collapse to this value */
  .content-wrap+.content-wrap .zwc-altsec__row {
    margin-top: 80px;
  }

  .zwc-altsec__cont h3 {
    font-size: 40px;
    line-height: 1.25;
  }

  .zwc-explore__card h3 {
    font-size: 32px;
    line-height: 1.25;
  }

  .zwc-altsec__cont p,
  .zwc-explore__card p,
  .zwc-gridsec__item p,
  .zwc-gridsec__head p {
    font-size: 18px;
    line-height: 1.556;
  }

  .zwc-explore__cont p {
    font-size: 18px;
    line-height: 1.444;
  }

  .zwc-gridsec__item h3 {
    font-size: 24px;
    line-height: 1.333;
  }

  .zwc-faq__item h3 {
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }

  .zwc-faq__item p {
    font-size: 16px;
    line-height: 1.625;
  }

  .zwc-cta h2 {
    font-size: 56px;
    line-height: 1.143;
  }

  .zwc-cta.zwc-secpad {
    padding: 80px 0 210px;
  }
}

/* Explore, two-column layout — the pin offset and the image cap scale with
   short viewports so the pinned card always stays inside the fold
   ========================================================================== */
@media only screen and (min-width: 992px) {

  .zwc-explore__cont,
  .zwc-explore__card {
    top: clamp(80px, 13vh, 140px);
  }

  /* Fills the frame below the pin line, so the intro unpins exactly when the
     landscape frame does instead of sliding down over it */
  .zwc-explore__cont {
    min-height: calc(100vh - clamp(80px, 13vh, 140px));
  }

  .zwc-explore__card img {
    max-height: 40vh;
    width: auto;
  }
}

/* Large tablet
   ========================================================================== */
@media only screen and (max-width: 1199px) {
  .zwc-altsec__head {
    margin-bottom: 40px;
  }

  /* each row sits in its own .content-wrap; margins collapse to this value */
  .content-wrap+.content-wrap .zwc-altsec__row {
    margin-top: 60px;
  }

  .zwc-gridsec__list {
    gap: 50px 60px;
  }

  .zwc-gridsec__item {
    flex: 0 1 calc((100% - 120px) / 3);
  }

  .zwc-faq__inner {
    gap: 40px;
  }

  .zwc-faq__inner h2 {
    flex: 0 0 300px;
  }
}

/* Tablet
   ========================================================================== */
@media only screen and (max-width: 991px) {

  .zwc-altsec__row,
  .zwc-explore__inner,
  .zwc-faq__inner {
    flex-direction: column;
  }

  .zwc-altsec__row,
  .zwc-explore__inner {
    align-items: center;
    text-align: center;
    gap: 40px;
    max-width: 600px;
  }

  .zwc-explore__inner {
    margin-inline: auto;
  }

  .zwc-explore__cont p {
    margin-inline: auto;
  }

  /* Stacked: the intro scrolls away and only the deck pins. The tags are a live
     indicator for the pinned deck, so they'd point at nothing here. */
  .zwc-explore__cont {
    position: static;
  }

  .zwc-explore__tabs {
    display: none;
  }

  /* The deck fills more of a narrow viewport, so start the fade lower to keep
     the landscape visible beneath the pinned card */
  .zwc-explore__scenery::before {
    background-image:
      linear-gradient(#fff 30%, rgba(255, 255, 255, 0) 70%),
      url(/sites/zweb/images/communityspaces/modern-spaces/explore-bg.jpg);
  }

  .zwc-explore__cards {
    width: 100%;
  }

  .zwc-explore__card {
    top: 80px;
    text-align: left;
  }

  /* Same safety valve for the stacked deck */
  .zwc-explore__card img {
    max-height: 45vh;
    width: auto;
  }

  .zwc-altsec__cont,
  .zwc-altsec__media,
  .zwc-explore__cont,
  .zwc-explore__cards {
    flex: 0 1 auto;
    max-width: 100%;
  }

  /* Content leads on stacked layouts */
  .zwc-altsec__row--reverse {
    flex-direction: column;
  }

  .zwc-gridsec__list {
    gap: 45px 50px;
    margin-top: 50px;
  }

  .zwc-gridsec__item {
    flex: 0 1 calc((100% - 50px) / 2);
  }

  .zwc-faq__inner {
    align-items: stretch;
    gap: 30px;
  }

  .zwc-faq__inner h2 {
    flex: 0 1 auto;
    text-align: center;
  }

  /* The wide scenic strip reads better cropped than scaled down */
  .zwc-cta {
    background-size: cover;
  }

  /* Stacked media rises into place instead of sliding sideways */
  .zwc-altsec__media,
  .zwc-altsec__row--reverse .zwc-altsec__media {
    transform: translateY(30px);
  }

  .middle-animated .zwc-altsec__media {
    transform: translateY(0);
  }
}

/* Mobile
   ========================================================================== */
@media only screen and (max-width: 767px) {
  .zwc-secmar {
    margin: 60px 0;
  }

  .zwc-secpad {
    padding: 60px 0;
  }

  .zwc-banner p {
    margin-top: 16px;
  }

  .zwc-banner .zwc-btnwrap,
  .zwc-cta .zwc-btnwrap {
    margin-top: 30px;
  }

  .zwc-btnwrap .act-btn {
    padding: 14px 24px;
  }

  .zwc-altsec__head {
    margin-bottom: 40px;
  }

  /* each row sits in its own .content-wrap; margins collapse to this value */
  .content-wrap+.content-wrap .zwc-altsec__row {
    margin-top: 50px;
  }

  .zwc-explore__card-inner {
    padding: 30px 20px;
    border-radius: 14px;
  }

  .zwc-explore__card-inner::before {
    border-radius: 20px;
  }

  .zwc-gridsec__list {
    gap: 40px;
    margin-top: 40px;
    text-align: center;
  }

  .zwc-gridsec__item {
    flex: 0 1 100%;
    max-width: 450px;
    margin-inline: auto;
  }

  /* block-level icon needs centring once the cards are centred */
  .zwc-gridsec__item h3::before {
    margin-inline: auto;
    margin-bottom: 16px;
  }

  .zwc-faq__item {
    padding: 16px;
  }

  .zwc-faq__item h3 {
    padding-right: 34px;
  }

  .zwc-faq__item h3 span {
    width: 20px;
    height: 20px;
  }
}

/* Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {

  .zwc-altsec__media {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .zwc-explore__tab,
  .zwc-explore__tab::before {
    transition: none;
  }
}