/* header-v2.css - zaglavlje i izbornik (v3, 2026-11-12).
   Zaglavlje je isto na svim širinama: logo, KALENDAR, lupa, hamburger. Izbornik je običan popis stranica
   u bočnoj ploči (na mobitelu preko cijelog zaslona). Učitava se NAKON public-shared.css i samo na hss-web
   (kalendar.archery.hr učitava produkcijski public-shared.css pa se taj fajl ne dira).
   Boje: navy #002B5C, zlatna #ffd700 (samo na tamnoj podlozi ili kao crta, nikad kao tekst na bijelom:
   kontrast 1.4:1), crvena #dc2626. */

/* ---------- zaglavlje ---------- */
header.hv2 {
    padding: 8px 20px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(0, 43, 92, .09);
    box-shadow: 0 2px 14px rgba(0, 28, 61, .06);
}
header.hv2 .header-top {
    width: 100%;
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    text-align: left;
}
header.hv2 .logo-link { flex: 0 0 auto; }
header.hv2 .logo-link img { height: 44px; margin-right: 10px; }
header.hv2 .header-actions { flex-wrap: nowrap; justify-content: flex-end; gap: 8px; }

/* zajednički izgled gumba u zaglavlju: manji, zaobljeni, mekane sjene (nadjačava .menu-toggle iz public-shared.css) */
header.hv2 .menu-toggle {
    height: 40px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    font: 700 13px/1 'Cuprum', Arial, sans-serif;
    font-size: 15px;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 28, 61, .18), inset 0 1px 0 rgba(255, 255, 255, .18);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
header.hv2 .menu-toggle:hover { transform: translateY(-1px); box-shadow: 0 5px 12px rgba(0, 28, 61, .24), inset 0 1px 0 rgba(255, 255, 255, .22); }
header.hv2 .menu-toggle:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(0, 28, 61, .2); }

/* KALENDAR: glavna radnja, zlatna s tamnoplavim tekstom (kontrast 10:1) */
header.hv2 .hv2-cal {
    background: linear-gradient(180deg, #ffe14d 0%, #ffd700 55%, #f3c300 100%);
    color: #002B5C;
}
header.hv2 .hv2-cal:hover { background: linear-gradient(180deg, #ffe970 0%, #ffdc1a 55%, #f7c800 100%); color: #001c3d; }
header.hv2 .hv2-cal i { font-size: 14px; }

/* LUPA: okrugla, obrubljena; na prijelazu se puni tamnoplavom */
header.hv2 .hv2-search-btn {
    width: 40px;
    min-width: 40px;
    padding: 0;
    background: #fff;
    color: #002B5C;
    box-shadow: inset 0 0 0 2px #002B5C, 0 2px 6px rgba(0, 28, 61, .12);
    font-size: 16px;
}
header.hv2 .hv2-search-btn:hover { background: #002B5C; color: #ffd700; box-shadow: inset 0 0 0 2px #002B5C, 0 5px 12px rgba(0, 28, 61, .24); }

/* HAMBURGER: tamnoplava, zlatne crtice nejednake duljine */
header.hv2 .hv2-burger {
    background: linear-gradient(180deg, #0b3f7d 0%, #002B5C 100%);
    color: #fff;
    gap: 9px;
    padding: 0 16px 0 14px;
}
header.hv2 .hv2-burger:hover { background: linear-gradient(180deg, #0f4b94 0%, #04336b 100%); }
.hv2-burger-icon { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; width: 18px; }
.hv2-burger-icon span { display: block; height: 2.5px; border-radius: 2px; background: #ffd700; transition: width .2s ease; }
.hv2-burger-icon span:nth-child(1) { width: 18px; }
.hv2-burger-icon span:nth-child(2) { width: 13px; }
.hv2-burger-icon span:nth-child(3) { width: 18px; }
.hv2-burger:hover .hv2-burger-icon span:nth-child(2) { width: 18px; }
.hv2-burger-text { letter-spacing: .08em; }

.menu-toggle:focus-visible,
.hv2-close:focus-visible,
.hv2-search-go:focus-visible,
#main-nav a:focus-visible,
#search-input:focus-visible,
.hv2-res:focus-visible {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px #002B5C;
}

/* ---------- izbornik: bočna ploča (izvan <header>) ---------- */
.hv2-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 45, .28);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility 0s linear .25s;
    z-index: 1150;
}
.hv2-backdrop.active { opacity: 1; visibility: visible; transition: opacity .25s ease; }

#main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    left: auto;
    width: min(420px, 100vw);
    min-width: 0;
    max-width: none;
    /* visina prati sadržaj (bez prazne površine ispod popisa); ako popis ne stane, lista se unutra */
    height: auto;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    /* blago prozirna bijela s zamućenjem pozadine (kao prije redizajna) */
    background: rgba(255, 255, 255, .78);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-radius: 0;
    border-left: 4px solid #ffd700;
    border-bottom-left-radius: 16px;
    box-shadow: -8px 8px 32px rgba(0, 28, 61, .3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: normal;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform .28s ease, visibility 0s linear .28s;
    z-index: 1200;
    box-sizing: border-box;
}
/* pokazatelj da popis ima još stavki ispod: svijetli gradijent pri dnu + strelica koja lagano poskakuje */
#main-nav::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 84px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, .97) 65%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}
#main-nav::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 38px;
    height: 38px;
    margin-left: -19px;
    border-radius: 50%;
    background: #002B5C url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23ffd700' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
    box-shadow: 0 3px 10px rgba(0, 28, 61, .35);
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}
#main-nav.has-more::after { opacity: 1; }
#main-nav.has-more::before { opacity: 1; animation: hv2-bounce 1.4s ease-in-out infinite; }
@keyframes hv2-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

#main-nav.active {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition: transform .28s ease;
}
#main-nav .hv2-panel-top {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    background: transparent;
    padding: 10px 8px 10px 12px;
    border-bottom: 1px solid rgba(0, 43, 92, .14);
}
#main-nav .hv2-panel-actions { display: flex; flex-wrap: nowrap; gap: 6px; min-width: 0; }
#main-nav .hv2-pa {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 11px;
    margin: 0;
    width: auto;
    border-radius: 999px;
    font: 700 13px 'Cuprum', Arial, sans-serif;
    letter-spacing: .04em;
    white-space: nowrap;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    box-shadow: 0 2px 5px rgba(0, 28, 61, .15);
}
#main-nav .hv2-pa-login { background: #dc2626; color: #fff; }
#main-nav .hv2-pa-kutak { background: #002B5C; color: #ffd700; }
#main-nav .hv2-pa-lang { background: #e2e8f0; color: #002B5C; }
#main-nav .hv2-pa:hover { filter: brightness(1.12); }
#main-nav .hv2-close { position: static; flex: 0 0 auto; }
#main-nav .nav-container {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    padding: 4px 0 calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
#main-nav .nav-container a {
    display: flex;
    align-items: center;
    width: auto;
    min-height: 52px;
    margin: 0;
    padding: 13px 20px;
    border-bottom: 1px solid rgba(0, 43, 92, .09);
    border-left: 4px solid transparent;
    border-radius: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    background: none;
}
/* poveznica na naslovnicu: prvi redak, istaknut (navy + zlatno) */
#main-nav .nav-container a.hv2-home {
    background: #002B5C;
    color: #ffd700;
    border-left-color: #ffd700;
    margin-bottom: 4px;
}
#main-nav .nav-container a.hv2-home:hover,
#main-nav .nav-container a.hv2-home:focus-visible { background: #001c3d; color: #fff; border-left-color: #ffd700; }

#main-nav .nav-container a:hover,
#main-nav .nav-container a:focus-visible {
    background: rgba(0, 43, 92, .08);
    color: #002B5C;
    border-left-color: #ffd700;
}

/* ---------- pretraga ---------- */
.hv2-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(0, 20, 45, .55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 16px;
    overflow-y: auto;
}
.hv2-overlay[hidden] { display: none; }
.hv2-search {
    position: relative;
    width: min(640px, 100%);
    background: #fff;
    border-radius: 14px;
    border-top: 4px solid #ffd700;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .35);
    padding: 22px 22px 18px;
    box-sizing: border-box;
}
.hv2-search h2 { margin: 0 44px 14px 0; font: 700 26px/1.2 'Cuprum', Arial, sans-serif; color: #002B5C; }
.hv2-search label { display: block; font-weight: 700; margin-bottom: 8px; color: #1f2937; }
.hv2-search-row { display: flex; gap: 8px; }
#search-input {
    flex: 1;
    min-width: 0;
    font-size: 17px;
    padding: 13px 14px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #111827;
    font-family: inherit;
}
#search-input:focus { border-color: #002B5C; background: #fff; }
.hv2-search-go {
    background: #002B5C;
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 0 20px;
    font: 700 16px Arial, sans-serif;
    cursor: pointer;
}
.hv2-search-go:hover { background: #001c3d; }
.hv2-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    background: #eef2f7;
    border: 0;
    font-size: 26px;
    line-height: 1;
    color: #002B5C;
    cursor: pointer;
    border-radius: 50%;
    transition: background .18s ease, color .18s ease;
}
.hv2-close:hover { background: #002B5C; color: #ffd700; }
#search-results { margin-top: 16px; }
#search-results .hv2-msg { margin: 8px 0; color: #475569; }
.hv2-res-group h3, .hv2-useful h3 {
    margin: 18px 0 6px;
    font: 700 13px/1.2 'Cuprum', Arial, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #002B5C;
    border-bottom: 3px solid #ffd700;
    padding-bottom: 5px;
}
.hv2-res, .hv2-useful a {
    display: block;
    padding: 11px 10px;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
    cursor: pointer;
}
.hv2-res:hover, .hv2-useful a:hover { background: #eef2f7; }
.hv2-res strong { display: block; font-size: 16px; color: #002B5C; }
.hv2-res-meta { display: block; font-size: 13px; color: #475569; margin-top: 2px; }
.hv2-res-sum { display: block; font-size: 14px; color: #334155; margin-top: 3px; }
.hv2-res mark { background: #fff0a6; color: inherit; padding: 0 1px; border-radius: 2px; }
.hv2-useful a { font-weight: 600; border-bottom: 1px solid #e2e8f0; border-radius: 0; }
.hv2-useful[hidden] { display: none; }

/* ---------- mobitel ---------- */
@media (max-width: 768px) {
    #main-nav { width: 100vw; border-left: 0; border-top: 4px solid #ffd700; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }
    header.hv2 { padding: 7px 12px; }
    header.hv2 .logo-link img { height: 38px; margin: 0; }
    header.hv2 .header-actions { gap: 6px; }
    header.hv2 .menu-toggle { height: 38px; min-height: 38px; font-size: 14px; }
    header.hv2 .hv2-cal { padding: 0 13px; gap: 6px; }
    header.hv2 .hv2-search-btn { width: 38px; min-width: 38px; }
    header.hv2 .hv2-burger { padding: 0 13px 0 11px; }
    /* gušći popis na mobitelu: niži redci (i dalje ≥44 px za dodir) */
    #main-nav .nav-container a { min-height: 44px; padding: 9px 20px; font-size: 17px; }

    /* pretraga: pun zaslon na malim ekranima */
    /* flex-start (ne stretch): kartica raste sa sadržajem, pa bijela pozadina prati sve rezultate */
    .hv2-overlay { padding: 0; align-items: flex-start; }
    .hv2-search { width: 100%; min-height: 100%; border-radius: 0; box-sizing: border-box; }
}

/* najuži ekrani (320 px): kraći naziv gumba u izborniku i zbijeno zaglavlje da MENI stane */
@media (max-width: 345px) {
    #main-nav .hv2-long { display: none; }
    header.hv2 { padding: 7px 8px; }
    header.hv2 .logo-link img { height: 32px; }
    header.hv2 .header-actions { gap: 4px; }
    header.hv2 .hv2-cal i { display: none; }
    header.hv2 .hv2-cal { padding: 0 11px; }
    header.hv2 .hv2-burger { padding: 0 11px 0 9px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    #main-nav, #main-nav.active, .hv2-backdrop { transition: none; }
    #main-nav.has-more::before { animation: none; }
}
