/* =====================================================
   PG CARS MNE — Shared layout (header, footer, banner)
   ===================================================== */

body {
    padding-top: var(--header-h);
}

/* ============= SITE HEADER ============= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid transparent;
    z-index: 100;
    transition: background var(--transition), border-color var(--transition);
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.92);
    border-bottom-color: var(--border);
}

.site-header-inner {
    height: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.site-logo img {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(232, 98, 26, 0.4));
}

.site-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
}

.logo-main {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(180deg, #fff, #ddd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--orange-bright);
    letter-spacing: 0.25em;
    margin-top: 2px;
}

/* Desktop nav (unutar headera, samo desktop) */
.desktop-nav {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.desktop-nav a {
    padding: 9px 16px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: all var(--transition);
    text-decoration: none;
}

.desktop-nav a:hover {
    color: var(--text);
    background: var(--bg-elev);
}

.desktop-nav a.active {
    color: var(--orange-bright);
    background: var(--orange-soft);
}

/* Mobile nav (van headera, position:fixed radi ispravno) */
.site-nav {
    display: flex;
    gap: 8px;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff !important;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
    transition: all var(--transition);
    text-decoration: none;
}

.header-wa:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.4);
}

/* Hamburger */
.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Desktop: sakrij mobilne elemente */
.nav-contact { display: none; }
.nav-links { display: contents; }
.site-nav { display: none; }

/* Mobile nav */
@media (max-width: 1024px) {
    .desktop-nav { display: none; }
    .site-nav { display: flex; }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(360px, 100%);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        background: linear-gradient(180deg, #0F0F0F 0%, #0A0A0A 100%);
        border-left: 1px solid var(--border-orange);
        padding: calc(var(--header-h) + 16px) 18px 24px;
        transform: translateX(110%);
        transition: transform 0.35s cubic-bezier(.22,.61,.36,1);
        z-index: 99;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: -20px 0 60px rgba(0,0,0,0.5);
    }
    .site-nav.open { transform: translateX(0); }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-bottom: 18px;
        margin-bottom: 18px;
        border-bottom: 1px solid var(--border);
    }

    .site-nav a {
        padding: 16px 18px;
        font-size: 17px;
        font-weight: 600;
        border-radius: 12px;
        text-align: left;
        color: var(--text);
        background: transparent;
        position: relative;
        display: flex;
        align-items: center;
        gap: 12px;
        transition: background var(--transition), color var(--transition), transform var(--transition);
    }
    .site-nav a span { flex: 1; }
    .site-nav a::after {
        content: '→';
        opacity: 0;
        transform: translateX(-6px);
        transition: opacity .25s ease, transform .25s ease;
        color: var(--orange-bright);
        font-weight: 700;
    }
    .site-nav a:active,
    .site-nav a:hover {
        background: var(--bg-card);
        transform: translateX(4px);
    }
    .site-nav a:active::after,
    .site-nav a:hover::after { opacity: 1; transform: translateX(0); }

    .site-nav a.active {
        background: linear-gradient(135deg, rgba(232,98,26,.18), rgba(232,98,26,.06));
        color: var(--orange-bright);
        border: 1px solid var(--border-orange);
    }
    .site-nav a.active::after { opacity: 1; transform: translateX(0); }

    /* Kontakt rows u mobilnom meniju */
    .nav-contact {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .nav-contact-row {
        display: flex !important;
        align-items: center;
        gap: 14px;
        padding: 12px 14px;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        text-decoration: none;
        transition: all var(--transition);
    }
    .nav-contact-row:hover,
    .nav-contact-row:active {
        border-color: var(--border-orange);
        transform: translateX(2px);
    }
    .nav-contact-row.nav-contact-static { cursor: default; }
    .nav-contact-row.nav-contact-static:hover { transform: none; border-color: var(--border); }

    .nav-contact-icon {
        width: 40px; height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--orange-soft);
        border-radius: 10px;
        font-size: 18px;
        flex-shrink: 0;
    }
    .nav-contact-row span:last-child {
        display: flex;
        flex-direction: column;
        gap: 2px;
        line-height: 1.2;
    }
    .nav-contact-row strong {
        color: var(--text);
        font-size: 14px;
        font-weight: 600;
    }
    .nav-contact-row em {
        font-style: normal;
        color: var(--text-dim);
        font-size: 12px;
    }

    .hamburger { display: flex; }
    .header-wa span { display: none; }
    .header-wa {
        padding: 10px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }
}

/* Nav overlay (backdrop) */
#nav-overlay {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 98;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity .3s ease;
}
#nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ============= SCROLL REVEAL ANIMACIJE ============= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .8s cubic-bezier(.22,.61,.36,1), transform .8s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 480px) {
    .logo-main { font-size: 16px; }
    .logo-sub { font-size: 10px; }
    .site-logo img { height: 38px; }
    .site-header-inner { padding: 0 14px; gap: 12px; }
}

/* ============= SITE FOOTER ============= */
.site-footer {
    background: #050505;
    border-top: 1px solid var(--border);
    padding: 60px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 16px;
    max-width: 320px;
    line-height: 1.6;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.footer-logo img {
    height: 56px;
}

.footer-logo span {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-logo strong {
    font-size: 20px;
    color: var(--text);
}

.footer-logo em {
    font-style: normal;
    color: var(--orange-bright);
    font-size: 12px;
    letter-spacing: 0.3em;
    margin-top: 4px;
}

.footer-col h4 {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    padding: 5px 0;
    transition: color var(--transition);
}

.footer-col a:hover {
    color: var(--orange-bright);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.footer-contact {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

.footer-icon {
    width: 24px;
    text-align: center;
}

.footer-small {
    font-size: 12px !important;
    color: var(--text-dim) !important;
    margin-top: 8px;
}

.footer-small a {
    color: var(--text-dim);
    display: inline !important;
    padding: 0 !important;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13px;
}

.footer-bottom a {
    color: var(--text-dim);
    transition: color var(--transition);
}

.footer-bottom a:hover { color: var(--orange-bright); }

@media (max-width: 800px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ============= COOKIE BANNER ============= */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 90;
    background: var(--bg-card);
    border: 1px solid var(--border-orange);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: cookieUp 0.4s ease;
}

@keyframes cookieUp {
    from { transform: translateY(120%); }
    to { transform: translateY(0); }
}

.cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    flex-wrap: wrap;
}

.cookie-banner p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    flex: 1;
    min-width: 240px;
}
