/* ================= MEDIALAB — SHARED STYLES ================= */

:root {
    --bg: #080b14;          /* dubinski tamnoplavi umjesto čiste crne */
    --bg-soft: #0b1120;
    --bg-panel: #0d1424;
}

html, body { margin: 0; padding: 0; box-sizing: border-box; width: 100%; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: #ffffff;
    position: relative;
    min-height: 100vh;
}

/* Ambijentalni plavi sjaj koji ostaje fiksan iza sadržaja — daje dubinu bez čiste crne */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(70% 55% at 12% -8%, rgba(0,117,208,0.16), transparent 55%),
        radial-gradient(55% 45% at 98% 8%, rgba(0,91,163,0.12), transparent 55%),
        radial-gradient(75% 60% at 50% 112%, rgba(0,60,110,0.20), transparent 65%);
    pointer-events: none;
}

/* Blaga zrnatost/vinjeta radi mekoće */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(120% 120% at 50% 0%, transparent 60%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.gradient-text {
    color: #4da3e8;
}

/* Suptilna mrežasta pozadina za odabrane sekcije */
.grid-bg {
    background-image:
        linear-gradient(rgba(0,117,208,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,117,208,0.055) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* Blaga svijetla traka za izmjenu ritma sekcija */
.section-soft {
    background: linear-gradient(180deg, rgba(255,255,255,0.025) 0%, rgba(255,255,255,0) 100%);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.glass-panel {
    background: rgba(8, 11, 20, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.card-bg {
    background: linear-gradient(180deg, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.015) 100%);
    border: 1px solid rgba(255,255,255,0.07);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-bg:hover {
    border-color: rgba(0, 117, 208, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 22px 55px -22px rgba(0, 117, 208, 0.45);
}

/* Kartice usluga — plavi obrub i glow po defaultu */
.card-service {
    border-color: rgba(0, 117, 208, 0.5);
    box-shadow: 0 0 30px -6px rgba(0, 117, 208, 0.35);
}
.card-service:hover {
    border-color: rgba(0, 117, 208, 0.8);
    box-shadow: 0 20px 50px -16px rgba(0, 117, 208, 0.55), 0 0 30px -6px rgba(0, 117, 208, 0.35);
}
.about-glass-card {
    background: rgba(13, 20, 36, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
}
.divider { height: 1px; background: linear-gradient(to right, transparent, #1a3a5c, transparent); }

/* Footer — čist tamnoplavi s blagim gornjim sjajem (bez fotografije) */
footer.relative {
    background:
        radial-gradient(90% 130% at 50% 0%, rgba(0,117,208,0.10), transparent 60%),
        linear-gradient(180deg, #0d1424 0%, #080b14 100%);
}

/* Zaglavlje podstranica */
.page-hero {
    position: relative;
    padding: 11rem 1.5rem 4rem;
    overflow: hidden;
    text-align: center;
}
.page-hero .glow {
    position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
    width: 900px; height: 500px; max-width: 120%;
    background: radial-gradient(closest-side, rgba(0,117,208,0.22), transparent 70%);
    pointer-events: none;
}

@keyframes pulse-slow { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.15; } }
@keyframes scroll-logos { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes scroll-logos-reverse { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }
@keyframes float-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.animate-pulse-slow { animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-scroll-logos { animation: scroll-logos 30s linear infinite; }
.animate-scroll-logos-reverse { animation: scroll-logos-reverse 35s linear infinite; }

.reveal {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); filter: blur(0); }

/* ---------- SLIDER ---------- */
.slider-container { position: relative; width: 100%; height: 100vh; min-height: 640px; overflow: hidden; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; transition: opacity 1s ease-in-out, transform 8s ease-out; transform: scale(1.05);
    z-index: 1;
}
.slide.active { opacity: 1; transform: scale(1); z-index: 2; }
.slide-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    filter: brightness(0.6);
}
.slide-content {
    position: relative; z-index: 3; height: 100%;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    padding: 0 20px;
}

.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2); color: white;
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; transition: all 0.3s;
}
.slider-btn:hover { background: #0075d0; border-color: #0075d0; }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

@media (max-width: 768px) {
    .slider-btn { width: 36px; height: 36px; background: rgba(0,0,0,0.5); }
    .slider-btn svg { width: 20px; height: 20px; }
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
}

.slider-dots {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 10;
}
/* Linije koje ujedno služe kao progress bar */
.dot {
    width: 42px; height: 4px; border-radius: 2px;
    background: rgba(255,255,255,0.28); cursor: pointer;
    position: relative; overflow: hidden; transition: background 0.3s;
}
.dot:hover { background: rgba(255,255,255,0.45); }
.dot-fill {
    display: block; height: 100%; width: 0; border-radius: 2px;
    background: #4da3e8;
}
@media (max-width: 768px) { .dot { width: 32px; } }

.scroll-indicator {
    position: absolute; bottom: 88px; left: 50%; transform: translateX(-50%);
    z-index: 10; animation: float-bob 2.5s ease-in-out infinite;
}
@media (max-width: 768px) { .scroll-indicator { display: none; } }

/* ---------- CLIENTS LOGOS ---------- */
.logo-track { display: flex; width: max-content; will-change: transform; }
.logo-item {
    flex-shrink: 0; margin-right: 3rem; padding: 1.25rem 2rem; border-radius: 1rem;
    background: rgba(255,255,255,0.03); border: none;
    display: flex; align-items: center; justify-content: center;
    min-width: 180px; height: 80px;
}
.logo-item img {
    max-height: 36px; max-width: 140px; width: auto; height: auto; object-fit: contain;
    filter: brightness(0.7) grayscale(0.3); transition: filter 0.4s ease;
}
.logo-item:hover img { filter: brightness(1) grayscale(0); }

/* Statička mreža logotipa (stranica klijenti) */
.logo-cell {
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; min-height: 120px;
    background: none;
    border: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.logo-cell:hover { transform: translateY(-4px); }

/* Kartice izdvojenih projekata */
.project-thumb {
    aspect-ratio: 16 / 10;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(120% 120% at 50% 0%, rgba(0,117,208,0.22), transparent 62%), #0b1120;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-thumb span {
    font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(255,255,255,0.35);
}
.logo-cell img {
    max-height: 52px; max-width: 170px; width: auto; height: auto; object-fit: contain;
    filter: brightness(0.75) grayscale(0.25); transition: filter 0.4s ease;
}
.logo-cell:hover img { filter: brightness(1) grayscale(0); }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid rgba(255,255,255,0.08); border-radius: 1rem; overflow: hidden; transition: border-color 0.3s ease; background: rgba(255,255,255,0.02); }
.faq-item[open] { border-color: rgba(0,117,208,0.35); }
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform 0.3s ease; }

/* ---------- MOBILE MENU ---------- */
.mobile-menu { transform: translateX(100%); transition: transform 0.3s ease-out; }
.mobile-menu.open { transform: translateX(0); }
/* Kad je mobilni izbornik otvoren, sakrij logo u nav traci (logo je unutar izbornika) */
body.menu-open #navbar a[aria-label="Medialab početna"] { opacity: 0; pointer-events: none; }
/* Kada je mobilni izbornik otvoren — bez trake/pozadine na vrhu */
body.menu-open #navbar { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; border-bottom-color: transparent !important; box-shadow: none !important; }

/* ---------- COOKIE BANNER ---------- */
.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(13, 20, 36, 0.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255,255,255,0.1);
    transform: translateY(120%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-banner.show { transform: translateY(0); }

/* ---------- POLICY / IMPRESSUM ---------- */
.policy h2 { font-size: 1.5rem; font-weight: 600; color: #fff; margin-top: 2.5rem; margin-bottom: 1rem; }
.policy p { color: #9ca3af; line-height: 1.75; margin-bottom: 1rem; }
.policy ul { color: #9ca3af; line-height: 1.75; margin-bottom: 1rem; padding-left: 1.25rem; list-style: none; }
.policy li { margin-bottom: 0.6rem; }
.policy a { color: #4da3e8; text-decoration: underline; }
.policy a:hover { color: #b3d9ff; }
.policy strong { color: #e5e7eb; font-weight: 600; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table td { padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); vertical-align: top; color: #9ca3af; }
.info-table td:first-child { color: #e5e7eb; font-weight: 500; width: 40%; padding-right: 1.5rem; }
@media (max-width: 640px) { .info-table td:first-child { width: 45%; } }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #080b14; }
::-webkit-scrollbar-thumb { background: #1a3a5c; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #0075d0; }

@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; opacity: 1; transform: none; filter: none; }
    .animate-scroll-logos, .animate-scroll-logos-reverse, .animate-pulse-slow, .scroll-indicator { animation: none; }
}
