/* Javne (klijentske) stranice — mobile-first, centrirano. Koristi theme.css tokene. */

/* overflow-x: clip (ne hidden) — skriva horiz. overflow BEZ stvaranja scroll-containera koji bi slomio position:sticky (.pub-toolbar) */
html, body { max-width: 100%; overflow-x: clip; }

/* Nav podstranica — isti dizajn kao home (.lp-nav), drugačiji linkovi. */
.pub-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(20px, 5vw, 40px);
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.pub-toolbar .brand-logo { height: 26px; }  /* prati temu (invert u svijetloj, isto kao home) */
.pub-toolbar-right { display: flex; align-items: center; gap: clamp(12px, 3vw, 26px); }

.pub-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color .2s;
}
.pub-home:hover { color: var(--accent); }
@media (max-width: 460px) {
    .pub-home { font-size: .85rem; }
}

.pub-wrap {
    min-height: 100dvh;
    max-width: 560px;
    margin: 0 auto;
    padding: 32px 22px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.pub-wrap .brand-logo { height: 40px; }

.pub-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin-top: 8px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pub-title {
    font-size: clamp(1.6rem, 6vw, 2.1rem);
    font-weight: 600;
}

.pub-lead { font-size: 1.05rem; margin: 0; }
.pub-muted { color: var(--muted); font-size: .92rem; margin: 0; }
.pub-card a { color: var(--accent); }
.pub-cover { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow); margin-top: 4px; }

/* Široka javna stranica (prijava: slika lijevo, obrazac desno) */
.pub-wrap-wide { max-width: 940px; text-align: left; align-items: stretch; }
.reg-head { width: 100%; margin: 6px 0 20px; }
.reg { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(20px, 4vw, 40px); align-items: start; width: 100%; }
.reg-media { position: sticky; top: 20px; }
.reg-img { width: 100%; display: block; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.reg-ph { aspect-ratio: 1 / 1; border-radius: var(--radius); display: grid; place-items: center;
    background: radial-gradient(120% 120% at 70% 20%, rgba(242, 106, 33, .28), transparent 55%), linear-gradient(160deg, #12314f, #0B1F3A); }
.reg-ph img { height: 46px; width: auto; }
.reg-main { min-width: 0; }
.fb.reg-form { margin-top: 0; }   /* poravnaj vrh forme s vrhom slike (nadjača .fb margin-top) */
.reg-meta { color: var(--muted); font-size: .95rem; margin-top: 12px; }
.reg-info { margin-top: 16px; color: var(--muted); font-size: .95rem; line-height: 1.6; }
.reg-full-tag { display: inline-block; background: var(--accent); color: var(--on-accent); font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; padding: 5px 12px; border-radius: 8px; }
.reg-full-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; margin: 14px 0 10px; }
.reg-full-text { color: var(--muted); line-height: 1.6; margin: 0; }

/* Waitlist forma (popunjena radionica) */
.wl-row { display: flex; gap: 10px; margin-top: 14px; }
.wl-row input { flex: 1 1 auto; min-width: 0; padding: 11px 13px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; }
.wl-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.wl-row button { flex: 0 0 auto; padding: 11px 18px; border: 0; border-radius: 10px;
    background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600; cursor: pointer; }
.wl-row button:hover { background: var(--accent-hover); }
@media (max-width: 480px) { .wl-row { flex-direction: column; } .wl-row button { width: 100%; } }
@media (max-width: 720px) {
    .reg { grid-template-columns: 1fr; }
    .reg-media { position: static; }
}
.pub-foot { margin-top: auto; padding-top: 30px; font-size: .78rem; color: var(--muted); letter-spacing: .02em; }
.pub-foot { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.pub-foot a { color: var(--muted); font-weight: 600; }
.pub-foot a:hover { color: var(--accent); }
.pub-foot-links a { margin: 0 2px; }

/* Landing — kartice radionica */
.r-list { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: 4px; }
.r-card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 18px; text-align: left; }
.r-card .r-meta { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.r-card h3 { font-size: 1.02rem; font-weight: 600; margin: 3px 0 6px; }
.r-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.pub-hint {
    margin-top: 6px;
    font-size: .82rem;
    color: var(--muted);
}

/* ---- Feedback anketa ---- */
.fb {
    width: 100%;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 20px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.fb-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.fb-field legend,
.fb-label {
    font-weight: 600;
    font-size: .98rem;
    margin-bottom: 10px;
    padding: 0;
    display: block;
}
.fb-opt { color: var(--muted); font-weight: 400; }

.fb textarea,
.fb .fb-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink);
    padding: 10px 12px;
    font: inherit;
    resize: vertical;
}
.fb textarea:focus,
.fb .fb-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--ring);
}

/* honeypot */
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* rating (1–5, 0–10) */
.rate { display: grid; gap: 8px; }
.rate-5 { grid-template-columns: repeat(5, 1fr); }
.rate-11 { grid-template-columns: repeat(11, 1fr); }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.rate-11 label { font-size: .82rem; min-height: 42px; }
.rate label:hover { border-color: var(--accent); }
.rate input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rate input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.rate-ends { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 6px; }

/* sljedeća tema */
.fb-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-topics input { position: absolute; opacity: 0; pointer-events: none; }
.fb-topics label {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 50px;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 500;
    font-size: .9rem;
    cursor: pointer;
}
.fb-topics input:checked + label { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.fb-topics input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.fb-submit {
    margin-top: 2px;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: var(--on-accent);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color .12s ease;
}
.fb-submit:hover { background: var(--accent-hover); }
.fb-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- materijali (nakon ankete) ---- */
.pub-materials {
    width: 100%;
    max-width: 460px;
    margin: 18px auto 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}
.pub-materials-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .95rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}
.mat-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
    text-decoration: none;
    transition: border-color .12s ease, transform .12s ease;
}
.mat-link:hover { border-color: var(--accent); transform: translateY(-1px); }
.mat-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mat-ico {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
    font-size: 1.1rem;
}
.mat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.mat-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-desc { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 3D Print Manager promo (samo 3D print radionice) */
.pub-promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    background: var(--surface-2);
    color: var(--ink);
    text-decoration: none;
    transition: border-color .12s ease, transform .12s ease;
}
.pub-promo:hover { border-left-color: var(--accent-hover); transform: translateY(-1px); }
.pub-promo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pub-promo-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pub-promo-title { font-weight: 700; }
.pub-promo-text { color: var(--muted); font-size: .9rem; }
.pub-promo-cta { font-weight: 600; color: var(--accent); white-space: nowrap; }

/* Prijava — greške i privola */
.fb-error { display: block; margin-top: 5px; color: #d64545; font-size: .85rem; }
.fb-consent label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; line-height: 1.45; }
.fb-consent input[type="checkbox"] { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); }
.fb-consent a { color: var(--accent); }
.fb-privacy { margin: 4px 0 0; font-size: .82rem; line-height: 1.5; color: var(--muted); }
.fb-privacy a { color: var(--accent); }
.fb-hint { margin: 5px 0 0; font-size: .82rem; line-height: 1.45; color: var(--muted); }

/* Izjava o privatnosti / dokument */
.pub-doc { margin-top: 8px; text-align: left; }
.pub-doc h2 { font-size: 1.05rem; margin: 22px 0 6px; }
.pub-doc h3 { font-size: .92rem; margin: 14px 0 4px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pub-doc p { margin: 0 0 10px; line-height: 1.6; }
.pub-doc ul { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; }
.pub-doc li { margin-bottom: 4px; }
.pub-doc a { color: var(--accent); }

/* Gumbi za upravljanje privolom (Izjava o privatnosti) — sekundarni, uz .fb-submit stil. */
.pub-btn {
    min-height: 42px;
    padding: 0 16px;
    margin: 0 8px 8px 0;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: .92rem;
    cursor: pointer;
    transition: border-color .12s ease, color .12s ease, opacity .12s ease;
}
.pub-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pub-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pub-btn:disabled { opacity: .45; cursor: default; }
