/* =====================================================================
   ZAJEDNIČKI STILOVI ZA SVE STRANE (meni i kartica u uglu)
   ===================================================================== */

/* ----- meni ----- */
nav.menu {
    display: flex;
    gap: 4px;
    padding: 5px;
    margin: 24px 12px 10px;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}
nav.menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 30px;
    background: transparent;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}
nav.menu a svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
nav.menu a:hover { background: rgba(255, 255, 255, 0.15); color: #ffffff; }
nav.menu a.aktivno,
nav.menu a.aktivno:hover {
    background: #ffffff;
    color: #1a3560;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(5, 15, 35, 0.25);
}

/* ----- kartica u uglu je link na naslovnu ----- */
a.slikakartice { display: block; cursor: pointer; }
a.slikakartice img { transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease; }
a.slikakartice:hover img,
a.slikakartice:focus-visible img {
    transform: rotate(-4deg) scale(1.04);
}
a.slikakartice:focus-visible { outline: none; }

/* ista veličina kartice na svim stranama, da ne ulazi u naslove */
@media only screen and (min-width: 769px) {
    a.slikakartice { position: absolute; z-index: 1; left: 3%; margin-top: -40px; }
    a.slikakartice img { width: 260px; }
}
@media only screen and (min-width: 1700px) {
    a.slikakartice img { width: 380px; }
}
@media only screen and (min-width: 769px) and (max-width: 1100px) {
    a.slikakartice { display: none; }
}

@media only screen and (max-width: 768px) {
    nav.menu {
        width: calc(100% - 24px);
        max-width: 420px;
        margin: 16px 12px 8px;
        gap: 2px;
        padding: 4px;
    }
    nav.menu a {
        flex: 1 1 0;
        padding: 9px 6px;
        font-size: 0.85rem;
        gap: 5px;
    }
    nav.menu a svg { width: 14px; height: 14px; }
    a.slikakartice { position: relative; left: 0; z-index: 1; margin-top: 20px; }
    a.slikakartice img { width: 150px; margin: 0 0 6px; }
    a.slikakartice:hover img { transform: rotate(-2deg) scale(1.03); }
}
@media only screen and (max-width: 360px) {
    nav.menu a svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    a.slikakartice img { transition: none; }
}

/* ===== MOBILNO ZAGLAVLJE: kartica levo nakošena, meni desno jedan ispod drugog ===== */
@media only screen and (max-width: 768px) {
    html body a.slikakartice {
        display: block; position: absolute; top: 18px; left: 16px; margin: 0; z-index: 3;
    }
    html body a.slikakartice img { display: block; width: 40vw; max-width: 190px; margin: 0; transform: rotate(-8deg); }
    html body a.slikakartice:hover img { transform: rotate(-5deg) scale(1.03); }
    nav.menu {
        flex-direction: column; align-self: flex-end;
        width: auto; min-width: 0; max-width: none;
        margin: 16px 16px 0 auto; padding: 4px; gap: 2px; border-radius: 22px;
    }
    nav.menu a { flex: none; justify-content: flex-start; padding: 8px 12px; font-size: 0.85rem; border-radius: 18px; }
    nav.menu a svg { display: inline-block; width: 15px; height: 15px; }
}

/* ===== kartica na velikim monitorima ne beži skroz levo, ostaje blizu sadržaja ===== */
@media only screen and (min-width: 1101px) {
    html body a.slikakartice { left: max(3%, calc(50% - 920px)); }
}
