
.why-valuelabs-section {
    padding: 120px 0 0;
}

.wvl-container {
    margin: 0 auto;
    padding: 0 20px;
}

.wvl-title {
    margin-bottom: 40px !important;
}

.wvl-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.wvl-cell {
    display:         flex;
    flex-direction:  column;
    align-items:     stretch;
    justify-content: center;
    gap:             0;
    padding:         12px;
    text-align:      center;
    background:      #fff;
    border-right:    1px solid rgba(0, 0, 0, 0.10);
    border-bottom:   1px solid rgba(0, 0, 0, 0.10);
}

/*
   DESKTOP BORDER LOGIC
   DOM order (16 small items + 1 large at position 7):
   pos: 1   2   3   4   5
        6  [7=LARGE]  8   9
       10  [LARGE ]  11  12
       13  14  15  16  17

   Visual grid:
   Row1: item1  item2  item3  item4  item5
   Row2: item6  [LARGE 2×2 ] item7  item8
   Row3: item9  [LARGE cont] item10 item11
   Row4: item12 item13 item14 item15 item16

   NO right border → DOM pos: 5, 9, 12, 17
   NO bottom border → DOM pos: 13,14,15,16,17 (last row)
*/

/* No right border — last column per row */
.wvl-grid > .wvl-cell:nth-child(1),
.wvl-grid > .wvl-cell:nth-child(2),
.wvl-grid > .wvl-cell:nth-child(3),
.wvl-grid > .wvl-cell:nth-child(4),
.wvl-grid > .wvl-cell:nth-child(5) {
    padding-top: 0;
}
.wvl-grid > .wvl-cell:nth-child(1){
    padding-left: 0;
}

.wvl-grid > .wvl-cell:nth-child(5){
    padding-right: 0;
}

.wvl-grid > .wvl-cell:nth-child(5),
.wvl-grid > .wvl-cell:nth-child(9),
.wvl-grid > .wvl-cell:nth-child(12),
.wvl-grid > .wvl-cell:nth-child(17) {
    border-right: none;
    padding-right: 0;
}
.wvl-grid > .wvl-cell:nth-child(6),
.wvl-grid > .wvl-cell:nth-child(10),
.wvl-grid > .wvl-cell:nth-child(13) {
    padding-left: 0;
}

/* No bottom border — last row DOM 13 onwards */
.wvl-grid > .wvl-cell:nth-child(n+13) {
    border-bottom: none;
    padding-bottom: 0;

}

.wvl-size {
    flex:            1;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             10px;
    padding:         10px 0;
    text-align:      center;
    box-sizing:      border-box;
    position:        relative;
    z-index:         0;      /* creates stacking context so ::after z-index:-1 stays inside */
    overflow:        hidden;
}


/* Base state — ::after always exists but is invisible; z-index:-1 keeps it behind text/icons */
.wvl-cell:not(.wvl-cell--large) .wvl-size::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    border-radius: 12px;
   background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(204, 203, 255, 0.50) 0%, transparent 80%), #FAFAFA;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1; /* behind text and icons */
}

/* Hover state — fade in */
.wvl-cell:not(.wvl-cell--large):hover .wvl-size::after {
    opacity: 1;
}

.wvl-cell .wvl-text p {
    font-size:   16px;
    font-weight: 400;
    margin: 0;
}

.wvl-large-body {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             12px;
    width:           100%;
}

/* Side image wrappers — flex children, no position needed (careers banner pattern) */
.wvl-side-image {
    display:     flex;
    align-items: center;
    overflow:    hidden;
}

.wvl-side-image img {
    width:      auto;
    max-height: 80px;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.wvl-right-image {
    transform: scaleX(-1);
}


.wvl-cell--large {
    grid-column: span 2;
    grid-row:    span 2;
    padding:     12px;
    position:    relative;
    overflow:    visible;
    border-right:  1px solid rgba(0, 0, 0, 0.10);
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

.wvl-size-large {
    flex:            1;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    justify-content: center;
    gap:             12px;
    padding:         12px;
    text-align:      center;
    box-sizing:      border-box;
    width:           100%;
    height:          100%;
    position:        relative;
    z-index:         0;     /* creates stacking context so ::after z-index:-1 stays inside */
    overflow:        hidden;
}

/* Base state — always present, invisible */
.wvl-size-large::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(204, 203, 255, 0.50) 0%, transparent 80%), #FAFAFA;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: -1; /* behind text and icons */
}

/* Hover state — fade in */
.wvl-size-large:hover::after {
    opacity: 1;
}

/* ── Icon ───────────────────────────────────────────────────────────────────── */
.wvl-icon {
    object-fit: contain;
    margin-bottom: 10px;
    width: 64px;
    height: 64px;
}

.wvl-cell--large .wvl-icon {
    margin-bottom: 20px;
    width: 90px;
    height: 90px;
}

.wvl-cell--large .wvl-text p {
    font-size:   19px;
    font-weight: 400;
    margin: 0;
}

/* =============================================================================
   TABLET — 4 columns  (768px – 1024px)
   Layout:
   Row1: item1  item2  item3  item4
   Row2: [LARGE — full width]
   Row3: item5  item6  item7  item8
   Row4: item9  item10 item11 item12
   Row5: item13 item14 item15 item16

   Border rules:
   item5  → no left border
   item8  → no right border
   item9  → no left border
   item12 → no right border
   item13 → no left, no bottom
   item14 → no bottom
   item15 → no bottom
   item16 → no right, no bottom
   ============================================================================= */
@media (max-width: 1199.98px) and (min-width: 768px) {
    .why-valuelabs-section{
        padding: 80px 0 0;
    }
    .wvl-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .wvl-title{
        margin-bottom: 26px !important;
    }
    .wvl-size{
        gap: 7px;
    }

    /* Reset desktop border rules */
    .wvl-grid > .wvl-cell:nth-child(5),
    .wvl-grid > .wvl-cell:nth-child(9),
    .wvl-grid > .wvl-cell:nth-child(12),
    .wvl-grid > .wvl-cell:nth-child(17) {
        border-right: 1px solid rgba(0, 0, 0, 0.10);
    }
    .wvl-grid > .wvl-cell:nth-child(n+13) {
        border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    }

    /* All cells — restore full borders first */
    .wvl-cell {
        border-right:  1px solid rgba(0, 0, 0, 0.10);
        border-bottom: 1px solid rgba(0, 0, 0, 0.10);
        border-left:   none;
    }

    /* Order — items 1-4 first (order:0), large second (order:1), items 5-16 after (order:2) */
    .wvl-cell--item-1, .wvl-cell--item-2,
    .wvl-cell--item-3, .wvl-cell--item-4  { order: 0; }

    .wvl-cell--large                       { order: 1; }

    .wvl-cell--item-5,  .wvl-cell--item-6,  .wvl-cell--item-7,
    .wvl-cell--item-8,  .wvl-cell--item-9,  .wvl-cell--item-10,
    .wvl-cell--item-11, .wvl-cell--item-12, .wvl-cell--item-13,
    .wvl-cell--item-14, .wvl-cell--item-15, .wvl-cell--item-16 { order: 2; }

    /* Large item — full width, no right border */
    .wvl-cell--large {
        grid-column:   1 / -1;
        grid-row:      auto;
        border-right:  none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    }
    
    .wvl-cell--item-4  { border-right: none; padding-right: 0;}

    /* item5 — row3 col1: no left border */
    .wvl-cell--item-5  { border-left: none; padding-left: 0; }

    /* item8 — row3 col4: no right border */
    .wvl-cell--item-8  { border-right: none !important; padding-right: 0;}

    /* item9 — row4 col1: no left border */
    .wvl-cell--item-9  { border-left: none; padding-left: 0; }

    /* item12 — row4 col4: no right border */
    .wvl-cell--item-12 { border-right: none; padding-right: 0;}

    /* item13 — row5 col1: no left, no bottom */
    .wvl-cell--item-13 { border-left: none !important; border-bottom: none !important; padding-left: 0; padding-bottom: 0;}

    /* item14 — row5 col2: no bottom */
    .wvl-cell--item-14 , .wvl-cell--item-15{ border-bottom: none !important; padding-bottom: 0;}
    .wvl-cell--item-16 { border-right: none !important; border-bottom: none !important; padding-right: 0; padding-bottom: 0;}
.wvl-grid > .wvl-cell:nth-child(12){
    padding-right: 12px;

}
.wvl-grid > .wvl-cell:nth-child(6){
    padding-left: 12px;

}
.wvl-grid > .wvl-cell:nth-child(5){
    padding: 12px 12px 12px 0;
}
.wvl-grid > .wvl-cell:nth-child(13){
    padding: 12px 0 12px 12px;
    }

    .wvl-cell--large{
    padding-left: 0;
    padding-right: 0;
}
}

@media (max-width: 767.98px) {
    .why-valuelabs-section{
        padding: 60px 0 0;
    }
    .wvl-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wvl-cell .wvl-text p {
        font-size: 14px;
    }

    /* Reset desktop + tablet border rules */
    .wvl-grid > .wvl-cell:nth-child(5),
    .wvl-grid > .wvl-cell:nth-child(9),
    .wvl-grid > .wvl-cell:nth-child(12),
    .wvl-grid > .wvl-cell:nth-child(17) {
        border-right: 1px solid rgba(0, 0, 0, 0.10);
    }
    .wvl-grid > .wvl-cell:nth-child(n+13) {
        border-bottom: none;
        padding-bottom: 0;


        /* border-bottom: 1px solid rgba(0, 0, 0, 0.10); */
    }

    /* All cells — restore full borders first */
    .wvl-cell {
        border-top:    1px solid rgba(0, 0, 0, 0.10);
        border-right:  1px solid rgba(0, 0, 0, 0.10);
        border-bottom: 1px solid rgba(0, 0, 0, 0.10);
        border-left:   1px solid rgba(0, 0, 0, 0.10);
    }

    /* Order */
    .wvl-cell--item-1, .wvl-cell--item-2,
    .wvl-cell--item-3, .wvl-cell--item-4  { order: 0; }
    .wvl-cell--large                       { order: 1; }
    .wvl-cell--item-5,  .wvl-cell--item-6,  .wvl-cell--item-7,
    .wvl-cell--item-8,  .wvl-cell--item-9,  .wvl-cell--item-10,
    .wvl-cell--item-11, .wvl-cell--item-12, .wvl-cell--item-13,
    .wvl-cell--item-14, .wvl-cell--item-15, .wvl-cell--item-16 { order: 2; }

    /* item1 — no left, no top */
    .wvl-cell--item-1  { border-left: none; border-top: none; padding-left: 0; padding-top: 0; }

    /* item2 — no top, no right */
    .wvl-cell--item-2  { border-top: none; border-right: none; padding-right: 0; padding-top: 0;}

    /* item3 — no left */
    .wvl-cell--item-3  { border-left: none; padding-left: 0; }

    /* item4 — no right */
    .wvl-cell--item-4  { border-right: none; padding-right: 0; }

    /* large — no left, no right */
    .wvl-cell--large {
        grid-column:   1 / -1;
        grid-row:      auto;
        border-left:   none;
        border-right:  none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    }

    /* item5–item14 — col1: no left, col2: no right */
    .wvl-cell--item-5,  .wvl-cell--item-7,  .wvl-cell--item-9,
    .wvl-cell--item-11, .wvl-cell--item-13  { border-left: none; padding-left: 0;}

    .wvl-cell--item-6,  .wvl-cell--item-8,  .wvl-cell--item-10,
    .wvl-cell--item-12, .wvl-cell--item-14  { border-right: none !important; padding-right: 0; }

    /* item15 — no left, no bottom */
    .wvl-cell--item-15 { border-left: none; border-bottom: none;padding-left: 0; padding-top: 0;}

    /* item16 — no right, no bottom */
    .wvl-cell--item-16 { border-right: none !important; border-bottom: none; padding-right: 0; padding-bottom: 0;}

    /* ── Typography & spacing ── */
    .wvl-title {
        margin-bottom: 24px !important;
    }

    .wvl-cell {
        padding: 20px 10px;
    }
    
    .wvl-text p {
        font-size: 12px;
    }

     .wvl-grid > .wvl-cell:nth-child(2){
        padding-right: 12px;
     }
    .wvl-grid > .wvl-cell:nth-child(3),
    .wvl-grid > .wvl-cell:nth-child(4){
    padding-top: 12px;
    }

    .wvl-grid > .wvl-cell:nth-child(3){
        padding-left: 0;
    }
    .wvl-grid > .wvl-cell:nth-child(4){
        padding-right: 0;
    }
      .wvl-cell--large{
        padding-left: 0;
        padding-right: 0;
    }
    .wvl-grid > .wvl-cell:nth-child(5){ 
        padding-top: 12px;
        padding-left: 0;
        padding-right: 12px;
    }
        .wvl-grid > .wvl-cell:nth-child(6){ 
        padding-right: 0;
        padding-left: 12px;
    }
    .wvl-grid > .wvl-cell:nth-child(8){ 
        padding-left: 0;
    }
     /* .wvl-grid > .wvl-cell:nth-child(9){ 
        padding-right: 0;
    } */
     .wvl-grid > .wvl-cell:nth-child(9){ 
        padding-right: 0;
        padding-bottom: 12px;
        padding-left: 12px;
    }
      .wvl-grid > .wvl-cell:nth-child(10){ 
        padding-left: 0;
        padding-bottom: 12px;
    }
        .wvl-grid > .wvl-cell:nth-child(11){ 
        padding-right: 0;
        padding-bottom: 12px;
    }
      .wvl-grid > .wvl-cell:nth-child(12){ 
        padding-right: 12px;
        padding-left: 0;
    }

       .wvl-grid > .wvl-cell:nth-child(13){ 
         padding-right: 0;
        padding-bottom: 12px;
        padding-left: 12px; 
    }
         .wvl-grid > .wvl-cell:nth-child(14){ 
         padding-left: 0;
        padding-bottom: 12px;
    }
      .wvl-grid > .wvl-cell:nth-child(15){ 
         padding-right: 0;
        padding-bottom: 12px;
    }
        .wvl-grid > .wvl-cell:nth-child(16){ 
         padding-left: 0;
    }


}