/* ==========================================================================
   ANAZ — Why ANAZ / The ANAZ Promise section ("Why Us" Elementor widget)
   Adapted from html/css/why-us.css. Requires assets/css/base.css.

   Class map: .why-us → .monks-why-us, .why-us__* → .monks-why-us__*,
   .why-card* → .monks-why-us-card*, --why-* → --monks-why-us-*.
   Child rules are scoped under the section class so Elementor's
   `.elementor img` / `.elementor a` resets and kit typography never override
   the design. Elementor style controls use `{{WRAPPER}} …` selectors (or set
   the custom properties below), which are always more specific.

   Layout
     ≥1024px  intro text (left) over a pale background; angular facility +
              network composition bleeds off the top-right edge and runs
              underneath the card row, which overlaps its lower edge.
     <1024px  intro stacks above a full-width image strip; cards overlap
              the strip's lower edge.
   Cards
     ≥1200px  five in one row
     900–1199 three + two (second row centred)
     600–899  two columns, last odd card centred
     <600px   single column

   Every diagonal in the composition shares one slope (--monks-why-us-slope),
   so all edges stay parallel whatever the viewport size.
   ========================================================================== */

.monks-why-us {
    /* Section-scoped tokens */
    --monks-why-us-text: #455B75;
    --monks-why-us-border: rgba(225, 234, 243, 0.9);
    --monks-why-us-bg: #F5F9FD;
    --monks-why-us-num: #D3DFEA;
    --monks-why-us-button-bg: #EAF1F8;
    --monks-why-us-button-color: var(--anaz-navy);
    --monks-why-us-button-hover-bg: var(--anaz-navy);
    --monks-why-us-button-hover-color: var(--anaz-white);
    --monks-why-us-pale-blue: #DCE7F2;
    --monks-why-us-card-bg: rgba(255, 255, 255, 0.95);
    --monks-why-us-container: 1600px;
    --monks-why-us-card-radius: 18px;

    /* Composition geometry */
    --monks-why-us-vis-left: 45%;                     /* where the image group starts (of section width) */
    --monks-why-us-vis-h: clamp(480px, 36vw, 640px);  /* height of the image group */
    --monks-why-us-overlap: clamp(64px, 5vw, 96px);   /* how far the cards sit over the images */
    --monks-why-us-slope: 0.46;                       /* horizontal run per unit of height */
    --monks-why-us-slant: calc(var(--monks-why-us-vis-h) * var(--monks-why-us-slope));
    --monks-why-us-net-left: 62%;                     /* network panel start (of visual width) */
    --monks-why-us-gap: 26px;                         /* white divider width */
    --monks-why-us-accent-top-w: 16px;
    --monks-why-us-accent-bottom-w: 12px;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(60% 55% at 0% 0%, rgba(214, 228, 242, 0.65) 0%, rgba(214, 228, 242, 0) 70%),
        radial-gradient(50% 60% at 100% 100%, rgba(220, 232, 244, 0.7) 0%, rgba(220, 232, 244, 0) 70%),
        linear-gradient(180deg, var(--anaz-white) 0%, var(--monks-why-us-bg) 55%, var(--monks-why-us-bg) 100%);
    color: var(--monks-why-us-text);
    font-family: var(--anaz-font);
}

/* Faint white diagonal bands across the pale background */
.monks-why-us::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        linear-gradient(116deg, transparent 0 18%, rgba(255, 255, 255, 0.75) 18% 30%, transparent 30% 100%),
        linear-gradient(116deg, transparent 0 58%, rgba(255, 255, 255, 0.5) 58% 66%, transparent 66% 100%);
}

.monks-why-us .monks-why-us__container {
    position: relative;
    width: min(100% - 2 * var(--anaz-gutter), var(--monks-why-us-container));
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Part A — introduction
   -------------------------------------------------------------------------- */

.monks-why-us .monks-why-us__top {
    position: relative;
}

.monks-why-us .monks-why-us__intro {
    position: relative;
    z-index: 1;
    min-height: calc(var(--monks-why-us-vis-h) - var(--monks-why-us-overlap));
    padding: clamp(48px, 5vw, 100px) 0 clamp(32px, 3vw, 48px);
}

.monks-why-us .monks-why-us__eyebrow {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    color: var(--anaz-navy);
    font-family: var(--anaz-font);
    font-size: clamp(12px, 0.85vw, 15px);
    font-weight: 700;
    letter-spacing: 0.24em;
    line-height: 1.4;
    text-transform: uppercase;
}

.monks-why-us .monks-why-us__eyebrow::before {
    content: "";
    flex: none;
    width: clamp(32px, 2.6vw, 46px);
    height: 3px;
    border-radius: 2px;
    background: var(--anaz-orange);
}

.monks-why-us .monks-why-us__title {
    margin: clamp(24px, 2.6vw, 44px) 0 clamp(18px, 1.8vw, 30px);
    color: var(--anaz-navy);
    font-family: var(--anaz-font);
    font-size: clamp(40px, 4.4vw, 88px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-transform: none;
}

/* The title may follow a hidden eyebrow */
.monks-why-us .monks-why-us__intro > .monks-why-us__title:first-child {
    margin-top: 0;
}

/* Each line is a mask for the GSAP slide-up; padding keeps descenders visible */
.monks-why-us .monks-why-us__title-line {
    display: block;
    overflow: hidden;
    padding-bottom: 0.1em;
    margin-bottom: -0.1em;
}

.monks-why-us .monks-why-us__title-inner {
    display: block;
}

.monks-why-us .monks-why-us__title-line--accent {
    color: var(--anaz-orange);
}

.monks-why-us .monks-why-us__desc {
    max-width: min(680px, 38vw);
    margin: 0;
    color: inherit;
    font-family: var(--anaz-font);
    font-size: clamp(16px, 1.2vw, 22px);
    font-weight: 500;
    line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Part A — angular photographic composition (decorative layout layer)
   -------------------------------------------------------------------------- */

.monks-why-us .monks-why-us__visual {
    position: absolute;
    top: 0;
    right: 0;
    left: var(--monks-why-us-vis-left);
    z-index: 0;
    height: var(--monks-why-us-vis-h);
    pointer-events: none;
}

.monks-why-us .monks-why-us__photo {
    position: absolute;
    inset: 0;
    margin: 0;
    overflow: hidden;
    clip-path: polygon(var(--monks-why-us-slant) 0, 100% 0, 100% 100%, 0 100%);
}

.monks-why-us .monks-why-us__photo img {
    width: 100%;
    max-width: none;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
}

/* Facility photo: soft fade into the page on its left edge + warm light */
.monks-why-us .monks-why-us__photo--facility {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 12%, #000 30%);
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 12%, #000 30%);
}

.monks-why-us .monks-why-us__photo--facility img {
    object-position: 38% 55%;
}

.monks-why-us .monks-why-us__photo--facility::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(255, 138, 36, 0.42) 0%, rgba(255, 170, 90, 0.16) 32%, rgba(255, 255, 255, 0) 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0) 55%, rgba(11, 45, 73, 0.28) 100%);
}

.monks-why-us .monks-why-us__divider {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: calc(var(--monks-why-us-net-left) - var(--monks-why-us-gap));
    background: var(--anaz-white);
    clip-path: polygon(var(--monks-why-us-slant) 0, 100% 0, 100% 100%, 0 100%);
}

/* Orange slivers along the divider. Each one is a parallelogram whose
   height is a fraction (--a-h) of the visual, so its slant is that same
   fraction of --monks-why-us-slant. */
.monks-why-us .monks-why-us__accent {
    --a-slant: calc(var(--monks-why-us-slant) * var(--a-h));
    position: absolute;
    height: calc(var(--monks-why-us-vis-h) * var(--a-h));
    background: linear-gradient(180deg, var(--anaz-orange-light) 0%, var(--anaz-orange) 100%);
    clip-path: polygon(var(--a-slant) 0, 100% 0, calc(100% - var(--a-slant)) 100%, 0 100%);
}

/* Upper sliver: just left of the divider, from the top edge down */
.monks-why-us .monks-why-us__accent--top {
    --a-h: 0.4;
    top: 0;
    left: calc(var(--monks-why-us-net-left) - var(--monks-why-us-gap) - var(--monks-why-us-accent-top-w) + var(--monks-why-us-slant) * (1 - var(--a-h)));
    width: calc(var(--monks-why-us-accent-top-w) + var(--a-slant));
}

/* Lower sliver: hugs the network panel's edge down to the bottom */
.monks-why-us .monks-why-us__accent--bottom {
    --a-h: 0.46;
    bottom: 0;
    left: calc(var(--monks-why-us-net-left) - var(--monks-why-us-accent-bottom-w));
    width: calc(var(--monks-why-us-accent-bottom-w) + var(--a-slant));
}

/* Network panel: navy-toned night map with glowing orange routes */
.monks-why-us .monks-why-us__photo--network {
    left: var(--monks-why-us-net-left);
    background: var(--anaz-navy-dark);
}

.monks-why-us .monks-why-us__photo--network img {
    object-position: 40% 60%;
    opacity: 0.88;
}

.monks-why-us .monks-why-us__photo--network::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(11, 45, 73, 0.55) 0%, rgba(7, 31, 58, 0.15) 45%, rgba(7, 31, 58, 0.6) 100%);
}

.monks-why-us .monks-why-us__routes {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    max-width: none;
    height: 100%;
}

.monks-why-us .monks-why-us__route-lines path {
    fill: none;
    stroke: var(--anaz-orange-light);
    stroke-width: 1.6;
    stroke-linecap: round;
    filter: drop-shadow(0 0 3px rgba(255, 120, 20, 0.9));
}

.monks-why-us .monks-why-us__route-nodes circle {
    fill: #FFC48A;
    stroke: var(--anaz-orange);
    stroke-width: 2;
    filter: drop-shadow(0 0 6px rgba(255, 138, 36, 0.95));
}

/* --------------------------------------------------------------------------
   Part B — benefit cards
   -------------------------------------------------------------------------- */

.monks-why-us .monks-why-us__cards {
    --monks-why-us-cards-gap: clamp(14px, 1.1vw, 22px);

    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--monks-why-us-cards-gap);
    margin: 0;
    padding: 0 0 clamp(64px, 7vw, 112px);
    list-style: none;
}

.monks-why-us .monks-why-us-card {
    --monks-why-us-card-pad: clamp(20px, 1.7vw, 32px);

    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0 var(--monks-why-us-card-pad) var(--monks-why-us-card-pad);
    overflow: hidden;
    background: var(--monks-why-us-card-bg);
    border: 1px solid var(--monks-why-us-border);
    border-radius: var(--monks-why-us-card-radius);
    box-shadow: 0 10px 30px rgba(11, 45, 73, 0.05);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    transition: transform 0.4s var(--anaz-ease), box-shadow 0.4s var(--anaz-ease);
}

.monks-why-us .monks-why-us-card__num {
    position: absolute;
    top: clamp(18px, 1.5vw, 28px);
    left: var(--monks-why-us-card-pad);
    z-index: 1;
    color: var(--monks-why-us-num);
    font-family: var(--anaz-font);
    font-size: clamp(30px, 2.3vw, 44px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* Angular image: a parallelogram photo with a coloured sliver on its
   left edge; both share the same slope (24% of width over full height). */
.monks-why-us .monks-why-us-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 12px calc(12px - var(--monks-why-us-card-pad)) 0 26%;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
}

.monks-why-us .monks-why-us-card__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--monks-why-us-pale-blue);
    clip-path: polygon(24% 0, 29% 0, 5% 100%, 0 100%);
}

.monks-why-us .monks-why-us-card__media--orange::before {
    background: linear-gradient(180deg, var(--anaz-orange-light), var(--anaz-orange));
}

.monks-why-us .monks-why-us-card__frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--monks-why-us-pale-blue);
    clip-path: polygon(32% 0, 100% 0, 100% 100%, 8% 100%);
}

.monks-why-us .monks-why-us-card__frame img {
    width: 100%;
    max-width: none;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
    object-position: var(--monks-why-us-pos, 50% 50%);
    transition: scale 0.6s var(--anaz-ease);
}

/* Route-to-market: stylised regional map instead of a photo */
.monks-why-us .monks-why-us-card__frame--map {
    background: linear-gradient(135deg, #F1F6FB 0%, #DDE9F5 100%);
}

.monks-why-us .monks-why-us-card__frame--map img {
    position: absolute;
    top: -8%;
    left: -100%;
    width: 250%;
    max-width: none;
    height: auto;
}

.monks-why-us .monks-why-us-card__map-route {
    position: absolute;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
}

.monks-why-us .monks-why-us-card__map-path {
    fill: none;
    stroke: var(--anaz-orange);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 4 5;
}

.monks-why-us .monks-why-us-card__pin path {
    fill: var(--anaz-orange);
    filter: drop-shadow(0 3px 3px rgba(11, 45, 73, 0.25));
}

.monks-why-us .monks-why-us-card__pin circle {
    fill: var(--anaz-white);
}

/* Reliable supply: shield + check badge over the cartons */
.monks-why-us .monks-why-us-card__badge {
    position: absolute;
    right: 10%;
    bottom: 9%;
    width: 22%;
    height: auto;
    filter: drop-shadow(0 6px 10px rgba(11, 45, 73, 0.3));
}

.monks-why-us .monks-why-us-card__badge-shield {
    fill: var(--anaz-navy);
    stroke: var(--anaz-white);
    stroke-width: 3;
    stroke-linejoin: round;
}

.monks-why-us .monks-why-us-card__badge-check {
    fill: none;
    stroke: var(--anaz-orange-light);
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.monks-why-us .monks-why-us-card__title {
    margin: clamp(18px, 1.5vw, 26px) 0 10px;
    color: var(--anaz-navy);
    font-family: var(--anaz-font);
    font-size: clamp(20px, 1.42vw, 27px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: none;
}

/* The title moves up when a card has no image */
.monks-why-us .monks-why-us-card--no-media .monks-why-us-card__title {
    margin-top: calc(clamp(18px, 1.5vw, 28px) + clamp(30px, 2.3vw, 44px) + 16px);
}

.monks-why-us .monks-why-us-card__text {
    margin: 0 0 clamp(20px, 1.6vw, 30px);
    color: inherit;
    font-family: var(--anaz-font);
    font-size: clamp(15px, 1.02vw, 18px);
    line-height: 1.5;
}

/* The arrow is the card's link; its ::after stretches over the whole card
   so the full card is clickable while focus stays on the arrow. */
.monks-why-us .monks-why-us-card__link {
    display: grid;
    place-items: center;
    flex: none;
    width: clamp(46px, 3vw, 54px);
    height: clamp(46px, 3vw, 54px);
    margin-top: auto;
    border-radius: 50%;
    background: var(--monks-why-us-button-bg);
    color: var(--monks-why-us-button-color);
    text-decoration: none;
    box-shadow: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.monks-why-us .monks-why-us-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: var(--monks-why-us-card-radius);
}

.monks-why-us .monks-why-us-card__link svg {
    transition: transform 0.3s var(--anaz-ease);
}

.monks-why-us .monks-why-us-card__link:focus-visible {
    outline: none;
    box-shadow: var(--anaz-focus);
}

.monks-why-us .monks-why-us-card:focus-within {
    box-shadow: 0 18px 40px rgba(11, 45, 73, 0.1);
}

@media (hover: hover) and (pointer: fine) {
    .monks-why-us .monks-why-us-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 44px rgba(11, 45, 73, 0.11);
    }

    .monks-why-us .monks-why-us-card:hover .monks-why-us-card__frame img {
        scale: 1.06;
    }

    .monks-why-us .monks-why-us-card:hover .monks-why-us-card__link {
        background: var(--monks-why-us-button-hover-bg);
        color: var(--monks-why-us-button-hover-color);
    }

    .monks-why-us .monks-why-us-card:hover .monks-why-us-card__link svg {
        transform: translateX(3px);
    }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Standard desktop / iPad landscape: three + two cards */
@media (max-width: 1199px) {
    .monks-why-us .monks-why-us__cards {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .monks-why-us .monks-why-us-card {
        grid-column: span 2;
    }

    /* Source: 4th and 5th cards centred as the second row. Generalised to
       any count: when the last row holds two cards, it is centred. */
    .monks-why-us .monks-why-us-card:nth-child(3n + 1):nth-last-child(2) {
        grid-column: 2 / span 2;
    }

    .monks-why-us .monks-why-us-card:nth-child(3n + 2):last-child {
        grid-column: 4 / span 2;
    }

    /* A single card on the last row is centred too */
    .monks-why-us .monks-why-us-card:nth-child(3n + 1):last-child {
        grid-column: 3 / span 2;
    }

    .monks-why-us .monks-why-us-card__title {
        font-size: 22px;
    }

    .monks-why-us .monks-why-us-card__text {
        font-size: 16px;
    }
}

/* Tablet portrait and below: text first, then a full-width image strip */
@media (max-width: 1023px) {
    .monks-why-us {
        --monks-why-us-vis-h: clamp(220px, 46vw, 400px);
        --monks-why-us-overlap: 48px;
        --monks-why-us-slope: 0.3;
        --monks-why-us-net-left: 64%;
        --monks-why-us-gap: 16px;
        --monks-why-us-accent-top-w: 10px;
        --monks-why-us-accent-bottom-w: 8px;
    }

    .monks-why-us .monks-why-us__top {
        display: flex;
        flex-direction: column;
    }

    .monks-why-us .monks-why-us__visual {
        position: relative;
        left: auto;
        order: 2;
    }

    .monks-why-us .monks-why-us__photo--facility {
        clip-path: none;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .monks-why-us .monks-why-us__intro {
        min-height: 0;
        padding: clamp(48px, 9vw, 80px) 0 clamp(32px, 5vw, 48px);
    }

    .monks-why-us .monks-why-us__title {
        font-size: clamp(36px, 6.6vw, 60px);
    }

    .monks-why-us .monks-why-us__desc {
        max-width: 680px;
    }

    .monks-why-us .monks-why-us__cards {
        margin-top: calc(-1 * var(--monks-why-us-overlap));
    }

    /* Without the image strip there is nothing for the cards to overlap */
    .monks-why-us.monks-why-us--no-visual .monks-why-us__cards {
        margin-top: 0;
    }
}

@media (max-width: 899px) {
    .monks-why-us .monks-why-us__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .monks-why-us .monks-why-us-card,
    .monks-why-us .monks-why-us-card:nth-child(3n + 1):nth-last-child(2),
    .monks-why-us .monks-why-us-card:nth-child(3n + 2):last-child,
    .monks-why-us .monks-why-us-card:nth-child(3n + 1):last-child {
        grid-column: auto;
    }

    /* Odd last card (the fifth by default) centred on its own row, same
       width as the others */
    .monks-why-us .monks-why-us-card:nth-child(odd):last-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - var(--monks-why-us-cards-gap) / 2);
    }
}

@media (max-width: 599px) {
    .monks-why-us {
        --monks-why-us-vis-h: clamp(200px, 58vw, 300px);
        --monks-why-us-overlap: 32px;
        --monks-why-us-net-left: 60%;
    }

    .monks-why-us .monks-why-us__accent--top {
        display: none;
    }

    .monks-why-us .monks-why-us__cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .monks-why-us .monks-why-us-card:nth-child(odd):last-child {
        width: 100%;
    }

    .monks-why-us .monks-why-us-card__media {
        margin-left: 30%;
    }
}

/* Desktop composition without its image group: the intro needs no height
   reserved for the images and the cards follow directly. */
@media (min-width: 1024px) {
    .monks-why-us.monks-why-us--no-visual .monks-why-us__intro {
        min-height: 0;
    }
}
