﻿/* Glava portala (_SiteLayout.cshtml) – mobile first. Na telefonu predal z menijem, od 1100 px meni v vrstici s spustnimi seznami.
   Barve klasične teme (main.css): #346c81 ozadje, #78a22f poudarek. Razredi s predpono gl-. */

:root {
    --gl-h: 64px;
    --gl-bg: #346c81;
    --gl-accent: #78a22f;
    --gl-ink: #1f2d33;
    --gl-heading: #346c82;
    --gl-line: #d1dde1;
    --gl-soft: #eef3f5;
}

.gl-skip {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff;
    color: var(--gl-heading);
    font-weight: 700;
}

    .gl-skip:focus {
        left: 8px;
    }

.gl-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* ---------- vrstica ---------- */
.gl {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--gl-bg);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

    .gl *, .gl *::before, .gl *::after {
        box-sizing: border-box;
    }

    .gl :focus-visible {
        outline: 3px solid #fff;
        outline-offset: 2px;
    }

    .gl [hidden] {
        display: none !important;
    }

/* domača stran: prosojna nad fotografijo, polna ob pomiku ali odprtem meniju/iskanju */
.gl--prozorna {
    position: fixed;
    left: 0;
    right: 0;
    background: transparent;
    box-shadow: none;
    transition: background-color .2s ease, box-shadow .2s ease;
}

    .gl--prozorna::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, 0) 100%);
        pointer-events: none;
    }

    .gl--prozorna.is-solid {
        background: var(--gl-bg);
        box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    }

        .gl--prozorna.is-solid::before {
            display: none;
        }

.gl-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1440px;
    height: var(--gl-h);
    margin: 0 auto;
    padding: 0 6px 0 16px;
}

.gl-logo {
    display: flex;
    align-items: center;
    flex: none;
    min-height: 44px;
}

    .gl-logo img {
        display: block;
        width: auto;
        height: 34px;
    }

.gl-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}

.gl-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

    .gl-icon:hover, .gl-icon[aria-expanded="true"] {
        background: rgba(255, 255, 255, .16);
    }

.gl-avatar {
    width: 38px;
    height: 38px;
    margin: 0 4px;
    border: 0;
    border-radius: 50%;
    background: var(--gl-accent);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.gl-chev {
    flex: none;
    transition: transform .15s ease;
}

[aria-expanded="true"] > .gl-chev {
    transform: rotate(180deg);
}

.gl-desktop {
    display: none;
}

/* ---------- predal z menijem (mobilno) ---------- */
.gl-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    width: min(360px, 88vw);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    color: var(--gl-ink);
    box-shadow: -8px 0 24px rgba(0, 0, 0, .2);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
}

    .gl-nav.is-open {
        transform: none;
        visibility: visible;
        transition: transform .2s ease;
    }

    .gl-nav:focus {
        outline: none;
    }

.gl-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 8px 20px;
    border-bottom: 1px solid var(--gl-line);
}

.gl-nav__title {
    color: var(--gl-heading);
    font-weight: 700;
    font-size: 17px;
}

.gl-nav .gl-icon {
    color: var(--gl-heading);
}

.gl-nav :focus-visible {
    outline-color: var(--gl-heading);
}

.gl-menu, .gl-sub, .gl-langs, .gl-account {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gl-menu {
    padding: 8px 0;
}

    .gl-menu > li {
        margin: 0;
    }

.gl-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-height: 48px;
    padding: 10px 20px;
    border: 0;
    background: none;
    color: var(--gl-ink);
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

    .gl-link:hover {
        background: var(--gl-soft);
    }

    .gl-link.is-active {
        color: var(--gl-heading);
        box-shadow: inset 4px 0 0 var(--gl-accent);
    }

.gl-sub {
    padding: 0 0 8px;
}

    .gl-sub a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 20px 8px 36px;
        color: #444;
        text-decoration: none;
    }

        .gl-sub a:hover {
            background: var(--gl-soft);
        }

        .gl-sub a.is-active {
            color: var(--gl-heading);
            font-weight: 700;
        }

.gl-nav__extra {
    margin-top: auto;
    padding: 8px 20px 28px;
    border-top: 1px solid var(--gl-line);
}

.gl-nav__label {
    margin: 14px 0 8px;
    color: #5c8899;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.gl-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

    .gl-langs a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 6px 14px;
        border: 1px solid var(--gl-line);
        border-radius: 999px;
        color: var(--gl-heading);
        font-weight: 600;
        text-decoration: none;
    }

        .gl-langs a.is-active {
            border-color: var(--gl-heading);
            background: var(--gl-heading);
            color: #fff;
        }

.gl-account a {
    display: flex;
    align-items: center;
    min-height: 44px;
    color: var(--gl-heading);
    text-decoration: none;
}

/* ozadje je v elementu .gl (isti kontekst nalaganja kot predal .gl-nav z z-index 1002) */
.gl-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, .45);
}

    .gl-backdrop[hidden] {
        display: none;
    }

body.gl-zaklenjeno {
    overflow: hidden;
}

/* ---------- iskanje ---------- */
.gl-search {
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
}

    .gl-search[hidden] {
        display: none;
    }

    .gl-search form {
        display: flex;
        gap: 8px;
        max-width: 820px;
        margin: 0 auto;
        padding: 10px 16px;
    }

    .gl-search input {
        flex: 1;
        min-width: 0;
        min-height: 46px;
        padding: 0 12px;
        border: 1px solid #bebebe;
        border-radius: 8px;
        background: #fff;
        color: #444;
        font: inherit;
        font-size: 16px;
    }

    .gl-search button {
        min-height: 46px;
        padding: 0 18px;
        border: 0;
        border-radius: 8px;
        background: #426b7f;
        color: #fff;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
    }

        .gl-search button:hover {
            background: var(--gl-accent);
        }

    .gl-search :focus-visible {
        outline-color: var(--gl-heading);
    }

/* ---------- namizje ---------- */
@media (min-width: 1100px) {
    :root {
        --gl-h: 72px;
    }

    .gl-bar {
        padding: 0 16px 0 24px;
    }

    .gl-logo img {
        height: 40px;
    }

    .gl-burger {
        display: none;
    }

    .gl-desktop {
        display: block;
        position: relative;
    }

    .gl-nav {
        position: static;
        z-index: auto;
        flex-direction: row;
        width: auto;
        margin-left: 20px;
        overflow: visible;
        background: none;
        color: inherit;
        box-shadow: none;
        transform: none;
        visibility: visible;
        transition: none;
    }

    .gl-nav__head, .gl-nav__extra {
        display: none;
    }

    .gl-menu {
        display: flex;
        gap: 2px;
        padding: 0;
    }

    .gl-has-sub {
        position: relative;
    }

    .gl-link {
        width: auto;
        min-height: 44px;
        padding: 8px 12px;
        border-radius: 8px;
        color: #fff;
        font-size: 15px;
        white-space: nowrap;
    }

        .gl-link:hover, .gl-sub-btn[aria-expanded="true"] {
            background: rgba(255, 255, 255, .16);
        }

        .gl-link.is-active {
            color: #fff;
            box-shadow: inset 0 -3px 0 var(--gl-accent);
        }

    .gl-nav :focus-visible {
        outline-color: #fff;
    }

    .gl-sub, .gl-dd .gl-sub {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        z-index: 1003;
        min-width: 230px;
        padding: 6px;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
    }

    .gl-sub--right {
        left: auto;
        right: 0;
        min-width: 180px;
    }

        .gl-sub a, .gl-dd .gl-sub a {
            min-height: 40px;
            padding: 8px 12px;
            border-radius: 6px;
            color: var(--gl-ink);
            white-space: nowrap;
        }

            .gl-sub a:hover {
                background: var(--gl-soft);
            }

    .gl-sub :focus-visible {
        outline-color: var(--gl-heading);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gl-nav, .gl--prozorna, .gl-chev {
        transition: none;
    }
}
