/* =========================================================
   NAS KR Ex-Presidents
   ========================================================= */

.naskr-exp {
    --exp-deep: var(--nas-deep, #063d78);
    --exp-blue: var(--nas-blue, #075aa5);
    --exp-border: #dce6ef;
    --exp-muted: #6d8194;

    position: relative;

    width: 100%;
    padding: 34px 0;
}


/* Heading */

.naskr-exp-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.naskr-exp-heading h2 {
    margin: 0;

    color: var(--exp-deep);

    font-family:
        var(--nas-serif, Georgia, "Times New Roman", serif);

    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

.naskr-exp-controls {
    display: flex;
    gap: 8px;
}

.naskr-exp-prev,
.naskr-exp-next {
    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    padding: 0;

    border: 1px solid var(--exp-border);
    border-radius: 50%;

    background: #fff;
    color: var(--exp-blue);

    font-size: 19px;

    cursor: pointer;

    transition: .18s ease;
}

.naskr-exp-prev:hover,
.naskr-exp-next:hover {
    background: var(--exp-blue);
    border-color: var(--exp-blue);
    color: #fff;
}


/* Carousel */

.naskr-exp-viewport {
    overflow: hidden;
}

.naskr-exp-track {
    display: flex;

    gap: 18px;

    transform: translate3d(0, 0, 0);

    transition:
        transform .45s cubic-bezier(.2, .75, .25, 1);
}

.naskr-exp-card {
    flex: 0 0 calc((100% - 54px) / 4);

    min-width: 0;

    overflow: hidden;

    border: 1px solid var(--exp-border);
    border-radius: 4px;

    background: #fff;

    box-shadow:
        0 5px 20px rgba(8, 54, 102, .06);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.naskr-exp-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 26px rgba(8, 54, 102, .10);
}


/* Photo */

.naskr-exp-photo {
    width: 100%;

    aspect-ratio: 4 / 5;

    overflow: hidden;

    background: #eef3f7;
}

.naskr-exp-photo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;
}

.naskr-exp-photo-placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    color: #7891a8;

    font-size: 58px;
}


/* Card text */

.naskr-exp-card-body {
    padding: 16px 16px 18px;

    text-align: center;
}

.naskr-exp-name {
    min-height: 50px;

    margin: 0 0 10px;

    color: var(--exp-deep);

    font-family:
        var(--nas-serif, Georgia, "Times New Roman", serif);

    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.naskr-exp-period {
    appearance: none;

    display: inline-block;

    margin: 0;
    padding: 0 0 3px;

    border: 0;
    border-bottom: 1px solid currentColor;

    background: transparent;

    color: var(--exp-blue);

    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;

    cursor: pointer;

    transition: color .18s ease;
}

.naskr-exp-period:hover {
    color: var(--exp-deep);
}

.naskr-exp-period.is-static {
    border-bottom: 0;

    color: var(--exp-muted);

    cursor: default;
}


/* Modal */

html.naskr-exp-modal-open,
body.naskr-exp-modal-open {
    overflow: hidden;
}

.naskr-exp-modal {
    position: fixed;
    z-index: 999999;

    inset: 0;

    display: none;

    padding: 28px;

    overflow-y: auto;
}

.naskr-exp-modal.is-open {
    display: flex;

    align-items: center;
    justify-content: center;
}

.naskr-exp-modal-backdrop {
    position: fixed;

    inset: 0;

    background: rgba(4, 27, 51, .72);

    backdrop-filter: blur(2px);
}

.naskr-exp-modal-dialog {
    position: relative;
    z-index: 2;

    width: min(960px, 100%);

    max-height: calc(100vh - 56px);

    overflow-y: auto;

    padding: 42px 48px 46px;

    border-radius: 5px;

    background: #fff;

    box-shadow:
        0 30px 80px rgba(0, 20, 45, .30);
}

.naskr-exp-modal-close {
    position: absolute;

    top: 14px;
    right: 16px;

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #edf3f7;
    color: var(--exp-deep);

    font-size: 29px;
    line-height: 1;

    cursor: pointer;
}

.naskr-exp-modal-header {
    display: grid;

    grid-template-columns:
        190px
        minmax(0, 1fr);

    gap: 30px;

    align-items: center;

    padding-bottom: 28px;

    border-bottom: 1px solid #e1e9ef;
}

.naskr-exp-modal-photo {
    overflow: hidden;

    aspect-ratio: 4 / 5;

    background: #eef3f7;
}

.naskr-exp-modal-photo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;
}

.naskr-exp-modal-label {
    margin-bottom: 7px;

    color: #71869a;

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: .08em;
}

.naskr-exp-modal-heading h2 {
    margin: 0 0 10px;

    color: var(--exp-deep);

    font-family:
        var(--nas-serif, Georgia, "Times New Roman", serif);

    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    line-height: 1.18;
}

.naskr-exp-modal-period {
    color: var(--exp-blue);

    font-size: 16px;
    font-weight: 600;
}

.naskr-exp-modal-content {
    padding-top: 28px;

    color: #263e53;

    font-size: 16px;
    line-height: 1.75;
}

.naskr-exp-modal-content > :first-child {
    margin-top: 0;
}

.naskr-exp-modal-content > :last-child {
    margin-bottom: 0;
}

.naskr-exp-modal-content h2,
.naskr-exp-modal-content h3,
.naskr-exp-modal-content h4 {
    color: var(--exp-deep);

    font-family:
        var(--nas-serif, Georgia, "Times New Roman", serif);
}

.naskr-exp-modal-content img {
    max-width: 100%;
    height: auto;
}


/* Responsive */

@media (max-width: 1199.98px) {

    .naskr-exp-card {
        flex-basis: calc((100% - 36px) / 3);
    }
}

@media (max-width: 767.98px) {

    .naskr-exp {
        padding: 26px 0;
    }

    .naskr-exp-heading h2 {
        font-size: 25px;
    }

    .naskr-exp-card {
        flex-basis: calc((100% - 18px) / 2);
    }

    .naskr-exp-modal {
        padding: 12px;
    }

    .naskr-exp-modal-dialog {
        max-height: calc(100vh - 24px);

        padding: 46px 22px 28px;
    }

    .naskr-exp-modal-header {
        grid-template-columns:
            110px
            minmax(0, 1fr);

        gap: 18px;

        padding-bottom: 22px;
    }

    .naskr-exp-modal-heading h2 {
        font-size: 23px;
    }

    .naskr-exp-modal-content {
        padding-top: 22px;

        font-size: 15px;
        line-height: 1.68;
    }
}

@media (max-width: 479.98px) {

    .naskr-exp-heading {
        align-items: flex-end;
    }

    .naskr-exp-heading h2 {
        font-size: 23px;
    }

    .naskr-exp-prev,
    .naskr-exp-next {
        width: 34px;
        height: 34px;
    }

    .naskr-exp-card {
        flex-basis: 84%;
    }

    .naskr-exp-name {
        min-height: 0;

        font-size: 17px;
    }

    .naskr-exp-modal-header {
        grid-template-columns: 1fr;
    }

    .naskr-exp-modal-photo {
        width: 130px;
    }
}


/* =========================================================
   Full-screen modal fix (v1.0.1)
   ========================================================= */

.naskr-exp-modal {
    position: fixed !important;
    z-index: 2147483000 !important;

    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    display: none;

    padding: 24px !important;

    overflow-y: auto;

    box-sizing: border-box;
}

.naskr-exp-modal.is-open {
    display: flex !important;

    align-items: center;
    justify-content: center;
}

.naskr-exp-modal-backdrop {
    position: fixed !important;

    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    background: rgba(8, 35, 62, .76) !important;

    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.naskr-exp-modal-dialog {
    position: relative;
    z-index: 2;

    width: min(980px, calc(100vw - 48px)) !important;

    max-height: calc(100vh - 48px) !important;

    margin: auto !important;

    overflow-y: auto;

    background: #fff;

    border-radius: 6px;

    box-shadow:
        0 35px 90px rgba(0, 18, 38, .35);
}

@media (max-width: 767.98px) {

    .naskr-exp-modal {
        padding: 12px !important;
    }

    .naskr-exp-modal-dialog {
        width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px) !important;
    }
}


/* =========================================================
   Refined compact cards (v1.0.2)
   ========================================================= */

.naskr-exp {
    padding: 30px 0 34px;
}

.naskr-exp-heading {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e6edf3;
}

.naskr-exp-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 62px;
    height: 2px;
    background: var(--exp-blue);
}

.naskr-exp-heading h2 {
    font-size: clamp(25px, 2.4vw, 32px);
    letter-spacing: -.015em;
}

.naskr-exp-track {
    gap: 18px;
    align-items: stretch;
}

.naskr-exp-card {
    flex: 0 0 220px;
    width: 220px;
    min-width: 220px;

    padding: 16px 14px 18px;

    overflow: visible;

    border: 1px solid #dbe6ef;
    border-radius: 14px;

    background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);

    box-shadow:
        0 8px 24px rgba(7, 56, 105, .065);

    transition:
        transform .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.naskr-exp-card:hover {
    transform: translateY(-4px);
    border-color: #c4d8e9;
    box-shadow:
        0 14px 34px rgba(7, 56, 105, .11);
}

.naskr-exp-photo {
    width: 150px;
    height: 180px;
    aspect-ratio: auto;

    margin: 0 auto;

    overflow: hidden;

    border: 1px solid #dce7ef;
    border-radius: 10px;

    background: #edf3f7;

    box-shadow:
        0 5px 15px rgba(8, 54, 102, .09);
}

.naskr-exp-photo img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center top;

    transition: transform .3s ease;
}

.naskr-exp-card:hover .naskr-exp-photo img {
    transform: scale(1.025);
}

.naskr-exp-photo-placeholder {
    font-size: 46px;
}

.naskr-exp-card-body {
    padding: 16px 2px 0;
    text-align: center;
}

.naskr-exp-name {
    min-height: 46px;
    margin: 0 0 11px;

    font-size: 16px;
    line-height: 1.32;
}

.naskr-exp-name-button,
.naskr-exp-name-static {
    color: var(--exp-deep);
    font: inherit;
    font-weight: 700;
    line-height: inherit;
    text-transform: none;
}

.naskr-exp-name-button {
    appearance: none;
    display: inline;

    margin: 0;
    padding: 0;

    border: 0;
    background: transparent;

    text-align: center;
    cursor: pointer;

    transition: color .18s ease;
}

.naskr-exp-name-button:hover {
    color: var(--exp-blue);
}

.naskr-exp-name-button:focus-visible,
.naskr-exp-period:focus-visible {
    outline: 3px solid rgba(7, 90, 165, .18);
    outline-offset: 4px;
    border-radius: 4px;
}

.naskr-exp-period {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 32px;

    padding: 6px 12px;

    border: 1px solid #d5e4f0;
    border-radius: 999px;

    background: #f3f8fc;
    color: var(--exp-blue);

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    text-decoration: none;

    transition:
        color .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.naskr-exp-period::after {
    content: "→";
    font-size: 13px;
    line-height: 1;
}

.naskr-exp-period:hover {
    border-color: var(--exp-blue);
    background: var(--exp-blue);
    color: #fff;
}

.naskr-exp-period.is-static {
    border-color: #e3e9ee;
    background: #f7f9fb;
    color: var(--exp-muted);
}

.naskr-exp-period.is-static::after {
    display: none;
}

/* Slightly calmer carousel arrows */
.naskr-exp-prev,
.naskr-exp-next {
    width: 36px;
    height: 36px;
    background: #f8fbfd;
}

@media (max-width: 767.98px) {
    .naskr-exp-card {
        flex-basis: 210px;
        width: 210px;
        min-width: 210px;
    }

    .naskr-exp-photo {
        width: 145px;
        height: 174px;
    }
}

@media (max-width: 479.98px) {
    .naskr-exp-card {
        flex-basis: min(220px, 78vw);
        width: min(220px, 78vw);
        min-width: min(220px, 78vw);
    }

    .naskr-exp-name {
        min-height: 0;
    }
}

/* Leadership periods v1.1.0 */
.naskr-exp-period-block {
    display: grid;
    justify-items: center;
    gap: 6px;
    margin-top: 8px;
}

.naskr-exp-period-label {
    color: #788b9f;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.naskr-exp-period-block .naskr-exp-period {
    display: block;
    max-width: 100%;
    font-size: 12.5px;
}

.naskr-exp-modal-terms {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.naskr-exp-modal-term {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-left: 3px solid var(--exp-blue);
    background: #f5f8fb;
}

.naskr-exp-modal-term strong {
    color: var(--exp-deep);
    font-size: 14px;
    line-height: 1.4;
}

.naskr-exp-modal-term span {
    color: #566f86;
    font-size: 13px;
    line-height: 1.4;
}


/* =========================================================
   Overall leadership period on card — v1.1.2
   ========================================================= */

.naskr-exp-overall-period {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin-top: 10px;
}

.naskr-exp-overall-label {
    color: #73869a;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
}

.naskr-exp-overall-years {
    color: var(--exp-deep);
    font-family:
        var(--nas-serif, Georgia, "Times New Roman", serif);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}
