/* ==========================================================================
   Aradel ESG Pillars — aradel-esg-pillars.css
   Scoped entirely to .ar-esg-pillars and .ar-esg-pillars__modal-overlay
   ========================================================================== */

/* ── Section wrapper ────────────────────────────────────────────────────────
   Carries standard site padding tokens.                                      */
.ar-esg-pillars {
    max-width: 1440px;
    margin: 0 auto;
    padding: 120px 112px 96px;
    box-sizing: border-box;
    font-family: 'Nunito Sans', sans-serif;
}

@media (max-width: 1024px) {
    .ar-esg-pillars {
        padding: 80px 64px 72px;
    }
}

@media (max-width: 640px) {
    .ar-esg-pillars {
        padding: 64px 24px 48px;
    }
}

/* ── Empty state ────────────────────────────────────────────────────────────*/
.ar-esg-pillars__empty {
    color: #666;
    font-size: 16px;
}

/* ── Pillar row — base ──────────────────────────────────────────────────────*/
.ar-esg-pillars__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    padding: 80px 0;
    border-bottom: 1px solid #E5E5E5;
}

.ar-esg-pillars__row:first-of-type {
    padding-top: 0;
}

.ar-esg-pillars__row:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

/* ── Alternating column order ───────────────────────────────────────────────
   text-left:  text | image  (default, odd rows 0-indexed)
   image-left: image | text  (even rows 0-indexed)                            */
.ar-esg-pillars__row--text-left .ar-esg-pillars__text {
    order: 1;
}
.ar-esg-pillars__row--text-left .ar-esg-pillars__image-wrap {
    order: 2;
}

.ar-esg-pillars__row--image-left .ar-esg-pillars__image-wrap {
    order: 1;
}
.ar-esg-pillars__row--image-left .ar-esg-pillars__text {
    order: 2;
}

/* ── Text column ────────────────────────────────────────────────────────────*/
.ar-esg-pillars__text {
    display: flex;
    flex-direction: column;
    align-self: center;
}

/* ── Title ──────────────────────────────────────────────────────────────────*/
.ar-esg-pillars__title {
    margin: 0 0 49px;
    color: #000000;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 48px;
    letter-spacing: 0.01px;
}

@media (max-width: 1024px) {
    .ar-esg-pillars__title {
        font-size: 26px;
        line-height: 38px;
        margin-bottom: 32px;
    }
}

@media (max-width: 640px) {
    .ar-esg-pillars__title {
        font-size: 22px;
        line-height: 32px;
        margin-bottom: 24px;
    }
}

/* ── Summary ────────────────────────────────────────────────────────────────*/
.ar-esg-pillars__summary {
    margin: 0;
    color: #000000;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
}

@media (max-width: 640px) {
    .ar-esg-pillars__summary {
        font-size: 16px;
        line-height: 25px;
    }
}

/* ── Read more trigger — ar_action integration ──────────────────────────────
   The trigger is a <span role="button"> wrapping [ar_action] output.
   The span carries data-pillar; the inner ar-action handles visual styling.
   pointer-events on the inner link are disabled so the span captures clicks. */
.ar-esg-pillars__trigger {
    display: inline-block;
    margin-top: 49px;
    cursor: pointer;
}

.ar-esg-pillars__trigger .ar-action {
    /* pointer-events left intact so WAAPI hover animation fires normally */
}

@media (max-width: 640px) {
    .ar-esg-pillars__trigger {
        margin-top: 32px;
    }
}

/* ── Image column ───────────────────────────────────────────────────────────*/
.ar-esg-pillars__image-wrap {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.ar-esg-pillars__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px;
}

/* ── Tablet: stack to single column ────────────────────────────────────────*/
@media (max-width: 1024px) {
    .ar-esg-pillars__row {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 64px 0;
    }

    /* On tablet/mobile, image always appears above text regardless of direction */
    .ar-esg-pillars__row--text-left .ar-esg-pillars__image-wrap,
    .ar-esg-pillars__row--image-left .ar-esg-pillars__image-wrap {
        order: 1;
    }

    .ar-esg-pillars__row--text-left .ar-esg-pillars__text,
    .ar-esg-pillars__row--image-left .ar-esg-pillars__text {
        order: 2;
    }

    .ar-esg-pillars__image-wrap {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 640px) {
    .ar-esg-pillars__row {
        gap: 28px;
        padding: 48px 0;
    }

    .ar-esg-pillars__image-wrap {
        aspect-ratio: 4 / 3;
    }
}

/* ==========================================================================
   MODAL SYSTEM
   ========================================================================== */

/* ── Overlay (full-screen fixed backdrop + centering shell) ─────────────── */
.ar-esg-pillars__modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;

    /* Hidden state — pointer-events off so the fixed overlay never blocks page clicks */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ar-esg-pillars__modal-overlay[hidden] {
    display: flex !important; /* keep in DOM for transition; visibility hides it visually */
}

.ar-esg-pillars__modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── Backdrop: frosted glass white overlay ─────────────────────────────── */
.ar-esg-pillars__modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ── Modal panel ────────────────────────────────────────────────────────── */
.ar-esg-pillars__modal-panel {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.10), 0 4px 16px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;

    /* Entrance animation — scale from 96% → 100% */
    transform: scale(0.96) translateY(8px);
    transition: transform 0.25s ease;
}

.ar-esg-pillars__modal-overlay.is-open .ar-esg-pillars__modal-panel {
    transform: scale(1) translateY(0);
}

/* ── Close button ───────────────────────────────────────────────────────── */
.ar-esg-pillars__modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #F3F3F3;
    color: #01303A;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.ar-esg-pillars__modal-close:hover {
    background: #01303A;
    color: #ffffff;
}

.ar-esg-pillars__modal-close:focus-visible {
    outline: 2px solid #C1000F;
    outline-offset: 3px;
}

/* ── Modal inner content ────────────────────────────────────────────────── */
.ar-esg-pillars__modal-inner {
    padding: 56px 56px 64px;
}

@media (max-width: 1024px) {
    .ar-esg-pillars__modal-inner {
        padding: 48px 40px 56px;
    }
}

@media (max-width: 640px) {
    .ar-esg-pillars__modal-inner {
        padding: 48px 28px 48px;
    }
}

/* ── Modal title ────────────────────────────────────────────────────────── */
.ar-esg-pillars__modal-title {
    margin: 0;
    color: #000000;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 48px;
    font-weight: 400;
    line-height: 64px;
    letter-spacing: 0.014px;
}

@media (max-width: 1024px) {
    .ar-esg-pillars__modal-title {
        font-size: 36px;
        line-height: 48px;
    }
}

@media (max-width: 640px) {
    .ar-esg-pillars__modal-title {
        font-size: 28px;
        line-height: 38px;
    }
}

/* ── Divider ────────────────────────────────────────────────────────────── */
.ar-esg-pillars__modal-divider {
    height: 1px;
    background: #000000;
    margin: 50px 0;
}

@media (max-width: 640px) {
    .ar-esg-pillars__modal-divider {
        margin: 32px 0;
    }
}

/* ── Modal body copy ────────────────────────────────────────────────────── */
.ar-esg-pillars__modal-body {
    color: #000000;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    text-align: justify;
}

.ar-esg-pillars__modal-body p {
    margin: 0 0 18px;
}

.ar-esg-pillars__modal-body p:last-child {
    margin-bottom: 0;
}

.ar-esg-pillars__modal-body ul,
.ar-esg-pillars__modal-body ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

.ar-esg-pillars__modal-body li {
    margin-bottom: 8px;
}

@media (max-width: 640px) {
    .ar-esg-pillars__modal-body {
        font-size: 16px;
        line-height: 25px;
        text-align: left;
    }
}

/* ── Hidden modal content templates (rendered in DOM, never shown directly) */
.ar-esg-pillars__modal-tpl {
    display: none;
}

/* ── Body scroll lock (applied via JS) ─────────────────────────────────── */
body.ar-esg-modal-open {
    overflow: hidden;
}
