/* =====================================================
   HEADER SIMPLE + STICKY
   ===================================================== */

.simple-site-header {
    min-height: 82px;
    position: sticky;
    top: 0;
    z-index: 9998;

    border-top:
        4px solid
        var(--primary-dark);

    border-bottom:
        1px solid
        #e8edf2;

    background:
        rgba(
            255,
            255,
            255,
            .97
        );

    box-shadow:
        0 5px 18px
        rgba(
            15,
            23,
            42,
            .06
        );

    backdrop-filter:
        blur(10px);
}


.simple-header-inner {
    min-height: 78px;

    display: flex;
    align-items: center;
    gap: 36px;
}


/* =====================================================
   BRAND
   ===================================================== */

.simple-school-brand {
    min-width: 0;
    flex: 0 1 auto;

    display: flex;
    align-items: center;
    gap: 13px;

    color:
        #101828;

    text-decoration: none;
}

.simple-school-brand img,
.simple-school-logo-fallback {
    width: 52px;
    height: 52px;

    flex: 0 0 52px;
}

.simple-school-brand img {
    object-fit: contain;
}

.simple-school-logo-fallback {
    border-radius: 12px;

    display: grid;
    place-items: center;

    color:
        var(--primary-dark);

    background:
        var(--secondary);

    font-weight: 900;
}

.simple-school-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}


/* =====================================================
   NAV
   ===================================================== */

.simple-navigation {
    min-width: 0;
    flex: 1 1 auto;
}

.simple-navigation-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.simple-navigation-list {
    min-width: 0;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    gap: 5px;

    list-style: none;
}

.simple-navigation-item {
    position: relative;
}

.simple-navigation-row {
    display: flex;
    align-items: center;
}

.simple-navigation-link {
    padding: 10px 11px;

    display: block;

    color:
        #1e293b;

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

    text-decoration: none;

    white-space: nowrap;

    transition:
        color .2s ease;
}

.simple-navigation-link:hover {
    color:
        var(--primary);
}


/* =====================================================
   DROPDOWN
   ===================================================== */

.simple-dropdown-button {
    width: 26px;
    height: 34px;
    padding: 0;

    border: 0;

    display: grid;
    place-items: center;

    color:
        #334155;

    background:
        transparent;

    cursor: pointer;
}

.simple-dropdown-button svg {
    width: 17px;
    height: 17px;
}

.simple-dropdown-menu {
    min-width: 210px;
    margin: 0;
    padding: 8px;

    position: absolute;
    left: 0;
    top: calc(100% + 8px);

    visibility: hidden;
    opacity: 0;

    border:
        1px solid
        #e2e8f0;

    border-radius: 12px;

    list-style: none;

    background:
        #ffffff;

    box-shadow:
        0 18px 35px
        rgba(
            15,
            23,
            42,
            .12
        );

    transform:
        translateY(5px);

    transition:
        opacity .18s ease,
        visibility .18s ease,
        transform .18s ease;
}

.simple-navigation-item:hover
.simple-dropdown-menu,
.simple-navigation-item.dropdown-open
.simple-dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.simple-dropdown-menu a {
    padding: 10px 12px;

    display: block;

    border-radius: 8px;

    color:
        #334155;

    font-size: 13px;
    font-weight: 600;

    text-decoration: none;
}

.simple-dropdown-menu a:hover {
    color:
        var(--primary);

    background:
        color-mix(
            in srgb,
            var(--primary) 7%,
            white
        );
}


/* =====================================================
   HEADER TOOLS
   ===================================================== */

.simple-header-tools {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 10px;
}


/* =====================================================
   SEARCH ICON
   ===================================================== */

.simple-search-wrapper {
    position: relative;
}

.simple-search-toggle {
    width: 42px;
    height: 42px;
    padding: 0;

    border: 0;
    border-radius: 50%;

    display: grid;
    place-items: center;

    color:
        #0f172a;

    background:
        transparent;

    cursor: pointer;

    transition:
        color .2s ease,
        background .2s ease;
}

.simple-search-toggle:hover {
    color:
        var(--primary);

    background:
        #f1f5f9;
}

.simple-search-toggle svg {
    width: 26px;
    height: 26px;
}


/* SEARCH DROPDOWN */

.simple-search-form {
    width: 320px;
    padding: 10px;

    position: absolute;
    right: 0;
    top: calc(100% + 12px);

    display: none;
    grid-template-columns:
        1fr auto;
    gap: 8px;

    border:
        1px solid
        #e2e8f0;

    border-radius: 14px;

    background:
        #ffffff;

    box-shadow:
        0 18px 35px
        rgba(
            15,
            23,
            42,
            .14
        );
}

.simple-search-form.open {
    display: grid;
}

.simple-search-form input {
    min-width: 0;
    height: 42px;
    padding: 0 13px;

    border:
        1px solid
        #d7e0e9;

    border-radius: 9px;

    outline: 0;

    font: inherit;
}

.simple-search-form input:focus {
    border-color:
        var(--primary);

    box-shadow:
        0 0 0 3px
        color-mix(
            in srgb,
            var(--primary) 10%,
            transparent
        );
}

.simple-search-form button {
    padding: 0 15px;

    border: 0;
    border-radius: 9px;

    color:
        #ffffff;

    background:
        var(--primary);

    font-weight: 700;

    cursor: pointer;
}


/* =====================================================
   AKSES ADMIN - GEMBOK SAMAR
   ===================================================== */

.simple-admin-lock {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    padding: 0;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 50%;

    color: #64748b;
    background: transparent;

    text-decoration: none;
    opacity: .22;

    cursor: pointer;

    transition:
        opacity .18s ease,
        color .18s ease,
        background .18s ease;
}

.simple-admin-lock svg {
    width: 12px;
    height: 12px;
}

.simple-admin-lock:hover,
.simple-admin-lock:focus-visible {
    color: #334155;
    opacity: .48;

    background:
        rgba(100, 116, 139, .07);
}

.simple-admin-lock:focus-visible {
    outline: 1px solid rgba(100, 116, 139, .30);
    outline-offset: 2px;
}


/* =====================================================
   MOBILE
   ===================================================== */

.simple-mobile-menu-button {
    width: 42px;
    height: 42px;
    padding: 9px;

    display: none;

    border:
        1px solid
        #dce4ec;

    border-radius: 10px;

    background:
        #ffffff;

    cursor: pointer;
}

.simple-mobile-menu-button span {
    width: 100%;
    height: 2px;
    margin: 4px 0;

    display: block;

    background:
        #1e293b;
}


@media (max-width: 1150px) {

    .simple-header-inner {
        gap: 18px;
    }

    .simple-school-name {
        font-size: 17px;
    }

    .simple-navigation-link {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 13px;
    }

}


@media (max-width: 980px) {

    .simple-site-header {
        min-height: 72px;
    }

    .simple-header-inner {
        min-height: 68px;
        justify-content:
            space-between;
    }

    .simple-school-brand img,
    .simple-school-logo-fallback {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .simple-mobile-menu-button {
        display: block;
    }

    .simple-navigation {
        flex: 0 0 auto;
    }

    .simple-navigation-content {
        width:
            min(
                360px,
                calc(
                    100vw - 28px
                )
            );

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

        padding: 15px;

        position: absolute;
        right: 14px;
        top: calc(100% + 6px);

        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;

        overflow-y: auto;

        border:
            1px solid
            #e2e8f0;

        border-radius: 15px;

        background:
            #ffffff;

        box-shadow:
            0 18px 35px
            rgba(
                15,
                23,
                42,
                .14
            );
    }

    .simple-navigation-content.open {
        display: flex;
    }

    .simple-navigation-list {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .simple-navigation-row {
        width: 100%;
    }

    .simple-navigation-link {
        flex: 1;
        padding: 11px 8px;
    }

    .simple-dropdown-menu {
        width: 100%;

        position: static;

        display: none;

        visibility: visible;
        opacity: 1;

        border: 0;

        box-shadow: none;

        transform: none;

        background:
            #f8fafc;
    }

    .simple-navigation-item.dropdown-open
    .simple-dropdown-menu {
        display: block;
    }

    .simple-navigation-item:hover
    .simple-dropdown-menu {
        display: none;
    }

    .simple-navigation-item.dropdown-open:hover
    .simple-dropdown-menu {
        display: block;
    }

    .simple-header-tools {
        width: 100%;
        justify-content: space-between;

        padding-top: 10px;

        border-top:
            1px solid
            #e2e8f0;
    }

    .simple-search-form {
        width:
            min(
                310px,
                calc(
                    100vw - 65px
                )
            );

        left: 0;
        right: auto;
    }

}


@media (max-width: 560px) {

    .simple-school-name {
        max-width: 190px;

        overflow: hidden;

        font-size: 15px;

        text-overflow:
            ellipsis;

        white-space: nowrap;
    }

}


@media (max-width: 980px) {
    .simple-header-tools .simple-admin-lock {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        margin-left: auto;
    }
}
