/* =====================================================
   ALMOALLAM LEADERSHIP
===================================================== */

.almoallam-leadership {
    position: relative;
    width: 100%;
}


/* =====================================================
   GRID
===================================================== */

.almoallam-leadership-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 80px;
    width: 100%;
}


/* =====================================================
   MEMBER
===================================================== */

.almoallam-leadership-member {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 0;
}


/* =====================================================
   CARD
===================================================== */

.almoallam-leadership-member-card {
    position: relative;
    width: 100%;

    overflow: hidden;
    cursor: pointer;
    background: #eee;
}


/* =====================================================
   PHOTO
===================================================== */

.almoallam-leadership-photo {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;

    object-fit: cover;
    object-position: center;

    transition: transform 0.45s ease;
}


/* =====================================================
   HOVER OVERLAY
===================================================== */

.almoallam-leadership-hover {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    padding: 28px;

    background: rgba(223, 108, 39, 0.92);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* =====================================================
   HOVER TEXT
===================================================== */

.almoallam-leadership-hover-text {
    position: relative;
    z-index: 2;
}


.almoallam-leadership-name {
    margin: 0 0 5px;
    font-size: 24px;
    line-height: 1.25;
    font-family: var(--wd-alternative-font);

    color: #fff;
}


.almoallam-leadership-position {
    margin: 0;

    font-size: 20px;
    font-weight: 400;
    line-height: 1.4;

    color: #fff;
}


/* =====================================================
   ARROW
===================================================== */

.almoallam-leadership-arrow {
position: absolute;
  right: 4px;
  bottom: 0px;
  display: block;
  width: 36px;
  height: 36px;
  background-image: url('/wp-content/uploads/2026/09/arrow-team.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border: 0;
  transition: transform 0.25s ease;
}


/* =====================================================
   HOVER
===================================================== */

.almoallam-leadership-member-card:hover
.almoallam-leadership-hover {
    opacity: 1;
    visibility: visible;
}


.almoallam-leadership-member-card:hover
.almoallam-leadership-photo {
    transform: scale(1.03);
}


.almoallam-leadership-member-card:hover
.almoallam-leadership-arrow {
    transform: translateX(4px);
}


/* =====================================================
   BIOGRAPHY SOURCE

   Hidden for now.
   JS will use this for the click panel.
===================================================== */

.almoallam-leadership-bio {
    display: none;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 991px) {

    .almoallam-leadership-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
            gap: 20px;
    }


    .almoallam-leadership-hover {
        padding: 22px;
    }


    .almoallam-leadership-arrow {
        right: 20px;
        bottom: 22px;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 767px) {

    .almoallam-leadership-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
            gap: 20px;
    }


    .almoallam-leadership-hover {
        padding: 16px;
    }


    .almoallam-leadership-name {
        font-size: 16px;
    }


    .almoallam-leadership-position {
        font-size: 12px;
    }


    .almoallam-leadership-arrow {
        right: 15px;
        bottom: 17px;

        border-top-width: 6px;
        border-bottom-width: 6px;
        border-left-width: 8px;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 480px) {

    .almoallam-leadership-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

}


/* =====================================================
   LEADERSHIP - ACTIVE MEMBER
===================================================== */

.almoallam-leadership-member.is-active
.almoallam-leadership-hover {
    opacity: 0;
    visibility: hidden;
}


/* =====================================================
   EXPANDED DETAILS PANEL
===================================================== */

.almoallam-leadership-panel {
    position: relative;

    grid-column: 1 / -1;

    width: 100%;
    max-height: 0;

    overflow: hidden;

    background: #003b5c;

    opacity: 0;

    transition:
        max-height 0.45s ease,
        opacity 0.3s ease;
}


.almoallam-leadership-panel.is-open {
    max-height: 700px;

    opacity: 1;
}


/* =====================================================
   PANEL INNER
===================================================== */

.almoallam-leadership-panel-inner {
    position: relative;

    width: 100%;

    padding: 45px 70px 50px;
}


/* =====================================================
   PANEL HEADER
===================================================== */

.almoallam-leadership-panel-header {
    margin-bottom: 30px;
}


.almoallam-leadership-panel-name {
    margin: 0 0 6px;

    padding: 0;

    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;

    color: #fff;
}


.almoallam-leadership-panel-position {
    margin: 0;

    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;

    color: #fff;
}


/* =====================================================
   BIOGRAPHY
===================================================== */

.almoallam-leadership-panel-bio {
    max-width: 900px;

    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;

    color: #fff;
}


.almoallam-leadership-panel-bio p {
    margin-top: 0;
    margin-bottom: 15px;

    color: inherit;
}


.almoallam-leadership-panel-bio p:last-child {
    margin-bottom: 0;
}


.almoallam-leadership-panel-bio ul,
.almoallam-leadership-panel-bio ol {
    margin: 15px 0;
    padding-left: 20px;

    color: inherit;
}


.almoallam-leadership-panel-bio li {
    color: inherit;
}


/* =====================================================
   CLOSE BUTTON RESET
===================================================== */

.almoallam-leadership-close,
button.almoallam-leadership-close {
    position: absolute;

    top: 30px;
    right: 35px;
    z-index: 5;

    display: block;

    width: 32px !important;
    height: 32px !important;
    min-width: 0 !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    background-image: none !important;

    box-shadow: none !important;

    cursor: pointer;

    -webkit-appearance: none;
    appearance: none;
}


/* =====================================================
   CLOSE X
===================================================== */

.almoallam-leadership-close span {
    position: absolute;

    top: 15px;
    left: 4px;

    display: block;

    width: 24px;
    height: 2px;

    background: #fff;

    pointer-events: none;
}


.almoallam-leadership-close span:first-child {
    transform: rotate(45deg);
}


.almoallam-leadership-close span:last-child {
    transform: rotate(-45deg);
}


.almoallam-leadership-close:hover,
.almoallam-leadership-close:focus,
.almoallam-leadership-close:active {
    border: 0 !important;

    outline: 0 !important;

    background: transparent !important;

    box-shadow: none !important;
}


/* =====================================================
   TABLET EXPANDED
===================================================== */

@media (max-width: 991px) {

    .almoallam-leadership-panel-inner {
        padding: 40px 50px 45px;
    }


    .almoallam-leadership-close,
    button.almoallam-leadership-close {
        top: 25px;
        right: 25px;
    }

}


/* =====================================================
   MOBILE EXPANDED
===================================================== */

@media (max-width: 767px) {

    .almoallam-leadership-panel {
        grid-column: 1 / -1;
    }


    .almoallam-leadership-panel-inner {
        padding: 35px 25px 40px;
    }


    .almoallam-leadership-panel-name {
        padding-right: 40px;

        font-size: 21px;
    }


    .almoallam-leadership-panel-position {
        padding-right: 40px;

        font-size: 14px;
    }


    .almoallam-leadership-panel-bio {
        font-size: 13px;
        line-height: 1.6;
    }


    .almoallam-leadership-close,
    button.almoallam-leadership-close {
        top: 20px;
        right: 18px;
    }

}


/* =====================================================
   LEADERSHIP EXPANDED DESKTOP LAYOUT
===================================================== */

@media (min-width: 992px) {

    /*
     * Active member stays one normal grid column.
     */

    .almoallam-leadership-member.is-active {
        grid-column: span 1;
    }


    /*
     * Details use remaining 3 columns.
     */

    .almoallam-leadership-panel {
        grid-column: span 3;

        width: 100%;
        height: 100%;

        max-height: none;

        align-self: stretch;

        overflow: hidden;
    }


    .almoallam-leadership-panel.is-open {
        max-height: none;
    }


    /*
     * Panel content vertically centered.
     */

    .almoallam-leadership-panel-inner {
        display: flex;
        flex-direction: column;
        justify-content: center;

        width: 100%;
        height: 100%;

        padding: 35px 50px;
    }


    /*
     * Tighter heading like reference.
     */

    .almoallam-leadership-panel-header {
        margin-bottom: 18px;
    }


    .almoallam-leadership-panel-name {
        margin: 0 0 2px;

        font-size: 18px;
        line-height: 1.25;

        color: #fff;
    }


    .almoallam-leadership-panel-position {
        font-size: 18px;
        line-height: 1.3;

        color: #f1ac1c;
    }


    /*
     * Biography
     */

    .almoallam-leadership-panel-bio {
        width: 100%;
        max-width: none;

        font-size: 18px;
        line-height: 1.1;

        color: #fff;
    }


    .almoallam-leadership-panel-bio p {
        margin: 0;
    }


    /*
     * X bottom-right like your reference.
     */

    .almoallam-leadership-close,
    button.almoallam-leadership-close {
        top: auto;
        right: 14px;
        bottom: 12px;

        width: 24px !important;
        height: 24px !important;
    }


    .almoallam-leadership-close span {
        top: 11px;
        left: 3px;

        width: 18px;
        height: 2px;

        background: #f4a51c;
    }

}


/* =====================================================
   MOBILE / TABLET CLICK LAYOUT
===================================================== */

@media (max-width: 991px) {

    .almoallam-leadership-panel {
        grid-column: 1 / -1;

        width: 100%;
    }

}