.gsub{
  /* The section shell around this widget carries the page gutter, so the widget
     adds none of its own - same contract as the other GAON widgets. */
  --gsub-max: 1330px;
  --gsub-gap: 30px;
  --gsub-cols: 5;
  --gsub-ink: #07080A;
  --gsub-card-bg: #FFFFFF;
  --gsub-card-line: #1E1E1E;
  /* Figma's border-top is 0.326px. Kept sub-pixel rather than rounded to 1px,
     which is three times the drawn weight and reads as a rule instead of a
     hairline. Every current engine snaps this to one device pixel, which is the
     finest line a screen can draw and what the design is asking for. */
  --gsub-card-line-w: 0.33px;
  /* #363636 at 70% over white, which is what the Figma text node resolves to.
     4.8:1 against the card - above AA for body text, so the opacity is baked
     into a solid colour rather than left as a live opacity that a future
     background change could quietly ruin. */
  --gsub-desc-ink: #727272;
  --gsub-badge-border: #CBCBCB;
  --gsub-bar: #8EB1F2;
  --gsub-bar-ink: #040404;
  --gsub-font: "Noto Sans Hebrew", system-ui, Arial, sans-serif;
  inline-size: 100%;
  max-inline-size: var(--gsub-max);
  margin-inline: auto;
  font-family: var(--gsub-font);
  color: var(--gsub-ink);
}

.gsub__sr{
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Header - the same badge and display type as the "why choose" section, so the
   two headings read as one system.
   ---------------------------------------------------------------------- */

.gsub__head{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  text-align: start;
}

.gsub__badge{
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: clamp(16px, 11.77px + 1.127vw, 28px);
  padding-block: 2px;
  padding-inline: clamp(10px, 4.4px + 1.49vw, 26px);
  border: 1px solid var(--gsub-badge-border);
  border-radius: clamp(5.74px, 4.24px + 0.4vw, 10px);
  background-color: #FFFFFF;
  font-size: clamp(10px, 7.54px + 0.657vw, 17px);
  line-height: 1.4;
  color: var(--gsub-ink);
  white-space: nowrap;
}

.gsub__title{
  margin: 0;
  font-weight: 500;
  font-size: clamp(38px, 32.92px + 1.354vw, 52.42px);
  line-height: clamp(45px, 38.94px + 1.617vw, 62.22px);
  color: var(--gsub-ink);
}

/* -------------------------------------------------------------------------
   Card - identical markup and identical proportions in both shapes.
   ---------------------------------------------------------------------- */

.gsub .gsub__card{
  position: relative;
  display: flex;
  flex-direction: column;
  min-block-size: 318px;
  padding-block-start: 54px;
  padding-block-end: 27px;
  background-color: var(--gsub-card-bg);
  border-block-start: var(--gsub-card-line-w) solid var(--gsub-card-line);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.gsub .gsub__card:hover{
  box-shadow: 0 6px 24px rgba(7, 8, 10, .10);
}
/* Cards sit edge to edge inside their grid cell, so the focus ring is drawn
   inside the card rather than around it, where a neighbour would clip it. */
.gsub .gsub__card:focus-visible{
  outline: 2px solid var(--gsub-ink);
  outline-offset: -3px;
}

.gsub__logo{
  flex: none;
  block-size: 36px;
  margin-inline: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gsub .gsub__logo img{
  display: block;
  max-block-size: 36px;
  max-inline-size: 100%;
  inline-size: auto;
  block-size: auto;
  object-fit: contain;
}
.gsub__logo-fallback{
  font-size: 20px;
  font-weight: 500;
  color: var(--gsub-ink);
}

.gsub__desc{
  display: block;
  margin-block-start: 42px;
  padding-inline: 20px;
  font-size: 15.21px;
  line-height: 21.73px;
  color: var(--gsub-desc-ink);
  overflow-wrap: break-word;
}

/* Pushed to the foot of the card so the arrows line up across a row, which is
   how the Figma grid reads even though the descriptions differ in length. */
.gsub__arrow{
  margin-block-start: auto;
  padding-block-start: 20px;
  padding-inline: 15px;
  display: flex;
  justify-content: flex-end;
  color: #1E1E1E;
}
.gsub__arrow-ico{
  transition: transform .2s ease;
}
.gsub .gsub__card:hover .gsub__arrow-ico{
  transform: translate(-3px, 3px);
}

.gsub__division{
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 27px;
  display: flex;
  align-items: center;
  padding-inline-start: 12px;
  background-color: var(--gsub-bar);
  color: var(--gsub-bar-ink);
  font-size: 15.996px;
  line-height: 22.85px;
}

/* -------------------------------------------------------------------------
   Mobile: accordion.

   Every collapse rule is confined to this query. An earlier pass declared them
   at base level and the .gsub__group.is-open .gsub__panel selector (0,3,0) then
   beat the desktop display:contents (0,1,0) - media queries add no specificity
   - which dropped all thirteen cards into a single column. Keeping the two
   shapes in two disjoint queries means they can never out-specify each other.
   ---------------------------------------------------------------------- */

@media (max-width: 767px){
  .gsub__head{
    margin-block-end: 28px;
  }

  .gsub__acc{
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
  }

  /* Written .gsub .gsub__acc-btn on purpose: Hello Elementor's reset paints
     native buttons through attribute selectors at (0,2,0), so a single class
     would lose the toggle's colours to a stray crimson. */
  .gsub .gsub__acc-btn{
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    inline-size: 100%;
    min-block-size: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-inline: 20px;
    background-color: var(--gsub-bar);
    color: var(--gsub-bar-ink);
    font-family: var(--gsub-font);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    text-align: start;
    -webkit-tap-highlight-color: transparent;
  }
  .gsub .gsub__acc-btn:hover,
  .gsub .gsub__acc-btn:focus{
    background-color: var(--gsub-bar);
    color: var(--gsub-bar-ink);
  }
  .gsub .gsub__acc-btn:focus-visible{
    outline: 2px solid var(--gsub-ink);
    outline-offset: -4px;
  }

  .gsub__chev{
    flex: none;
    transition: transform .25s ease;
  }
  .gsub__group.is-open .gsub__chev{
    transform: rotate(180deg);
  }

  .gsub__group + .gsub__group{
    margin-block-start: 4px;
  }

  .gsub__panel{
    display: none;
  }
  /* The open panel is its own block of space: the toggle does not sit straight
     on top of the first card, there is 40px of ground between them in the
     mobile frame. Mirrored at the foot so the next collapsed toggle is not
     glued to the last card either. */
  .gsub__group.is-open .gsub__panel{
    display: block;
    padding-block: 40px;
  }

  /* The mobile frame insets the cards inside the open division - the toggle
     runs the full width of the shell, the cards sit at roughly two thirds of
     it and stay portrait, the same proportion the desktop card holds. Filling
     the width instead turns them landscape, which is what the first pass got
     wrong. */
  .gsub .gsub__card{
    inline-size: 67%;
    margin-inline: auto;
  }
  /* Ground between stacked cards. Flush cards read as one long sheet broken by
     hairlines; 13px lets each card end and still holds the column together. */
  .gsub__card + .gsub__card{
    margin-block-start: 13px;
  }
}

/* -------------------------------------------------------------------------
   Tablet and up: the accordion dissolves. The group and panel wrappers become
   display:contents so the cards are promoted to direct grid items, which is
   what lets one set of markup serve both shapes.
   ---------------------------------------------------------------------- */

@media (min-width: 768px){
  .gsub__grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--gsub-gap);
    align-items: stretch;
  }
  .gsub__group,
  .gsub__panel{
    display: contents;
  }
  .gsub__acc{
    display: none;
  }
  .gsub__head{
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px){
  .gsub__grid{
    grid-template-columns: repeat(var(--gsub-cols), minmax(0, 1fr));
  }
  /* Two cells in the first row, exactly where the Figma frame parks the
     heading - the thirteen cards then close out three clean rows of five. */
  .gsub__head{
    grid-column: span 2;
  }
}

@media (prefers-reduced-motion: reduce){
  .gsub__chev,
  .gsub__arrow-ico,
  .gsub .gsub__card{
    transition-duration: .01ms;
  }
}
