/* =========================================================
   ORGANISATIONAL STRUCTURE (single page)
   Colours: #162f6a (primary)  #d2dfff (light)
========================================================= */

/* ==========================================
   BRANCH SELECTOR
========================================== */

.org-branch-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin: 0 0 25px;
    padding: 0;

    list-style: none;
}

.org-branch-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 10px 18px;

    background: #ffffff;
    border: 1px solid #162f6a;
    border-radius: 6px;

    color: #162f6a;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;

    cursor: pointer;
    transition: background-color 0.2s ease,
                color 0.2s ease;
}

.org-branch-tab:hover {
    background: #d2dfff;
}

.org-branch-tab[aria-current="true"] {
    background: #162f6a;
    color: #ffffff;
    font-weight: 700;
}

.org-branch-tab:focus-visible {
    outline: 3px solid #162f6a;
    outline-offset: 3px;
}

/* ==========================================
   STRUCTURE IMAGE
========================================== */

.org-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 70%;
    margin: 0 auto;
    padding: 25px;

    background: #ffffff;
    border: 1px solid #c1cfee;
    border-radius: 12px;

    overflow: hidden;
    box-sizing: border-box;
}

.org-image {
    display: block;
    width: 70%;
    max-width: 100%;
    height: 60vh;
    object-fit: contain;
}

.org-image-message {
    margin: 0;
    padding: 40px 15px;

    color: #26344d;
    font-size: 16px;
    text-align: center;
}

.org-image-message[hidden] {
    display: none;
}

.org-full-size {
    display: flex;
    justify-content: flex-end;
    margin-top: 13px;
}

.org-full-size a {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    min-height: 42px;
    padding: 8px 14px;

    background: #ffffff;
    border: 1px solid #162f6a;
    border-radius: 3px;

    color: #162f6a;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;

    transition: background-color 0.2s ease,
                color 0.2s ease;
}

.org-full-size a:hover {
    background: #162f6a;
    color: #ffffff;
}

/* ==========================================
   RESPONSIVE
========================================== */


/* ==========================================
   RESPONSIVE - TABLET AND MOBILE
========================================== */

@media (max-width: 767px) {

    /* Branch selector */
    .org-branch-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 8px;
        padding: 5px 3px 10px;
        -webkit-overflow-scrolling: touch;
    }

    .org-branch-tab {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 9px 14px;
        font-size: 14px;
    }

    /* Image wrapper */
    .org-image-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 10px;
        border-radius: 8px;
        box-sizing: border-box;
    }

    /* Organisational structure image */
    .org-image {
        display: block;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 75vh;
        object-fit: contain;
    }

    /* Full-size image link */
    .org-full-size {
        margin-top: 10px;
    }

    .org-full-size a {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* ==========================================
   EXTRA SMALL MOBILE
========================================== */

@media (max-width: 480px) {

    .org-image-wrapper {
        padding: 6px;
    }

    .org-image {
        width: 100%;
        height: auto;
        max-height: 70vh;
    }

    .org-branch-tab {
        font-size: 13px;
        padding: 8px 12px;
    }
}
