/* FILE: /var/www/onlineconvertfile.com/home.css */
/* D-01: početna stranica (učitava se samo na /). Boje i tema iz style.css tokena — tamna tema radi sama. */

.hm {
  --hm-btn-bg: #564ecc;
  --hm-btn-fg: #ffffff;
  --hm-btn-hover: #4840b3;
  --c-image: var(--ink-6c63ff);
  --c-video: var(--ink-f59e0b);
  --c-audio: var(--ink-a78bfa);
  --c-docs: var(--ink-22c55e);
  --c-text: var(--ink-06b6d4);
  --c-dev: var(--ink-ff6584);
  --c-misc: var(--ink-f7971e);
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px 96px;
}
:root[data-theme="dark"] .hm { --hm-btn-bg: #8c85ff; --hm-btn-fg: #12121c; --hm-btn-hover: #a49fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hm { --hm-btn-bg: #8c85ff; --hm-btn-fg: #12121c; --hm-btn-hover: #a49fff; }
}

.hm .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hm svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ── Hero ─────────────────────────────────────────── */
.hm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
  gap: 56px;
  align-items: center;
  padding: 56px 0 24px;
}
.hm-hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 3.9vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  color: var(--text);
}
.hm-l2 { display: block; }
.hm-lead {
  margin: 20px 0 28px;
  max-width: 42ch;
  font-size: 1.06rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.hm-facts { list-style: none; display: grid; gap: 10px; }
.hm-facts li { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; color: var(--text); }
.hm-facts svg { width: 18px; height: 18px; stroke-width: 2.4; color: var(--ok-text); }

/* Panel: drop-zona + četiri smjera */
.hm-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 12px;
  box-shadow: 0 1px 2px var(--shadow-sm), 0 18px 48px -20px var(--shadow-xl);
}
.hm .home-drop {
  max-width: none;
  margin: 0;
  padding: 34px 24px 26px;
  border-radius: 14px;
  border-width: 1.5px;
  background: var(--bg);
}
.hm .home-drop:hover, .hm .home-drop.drag-over { border-color: var(--accent1); background: var(--accent1-subtle); }
.hm .home-drop.drag-over { border-style: solid; box-shadow: inset 0 0 0 3px var(--accent1-border); }
.hm-drop-icon.hm-drop-icon { width: 30px; height: 30px; color: var(--accent1-text); stroke-width: 1.8; margin: 0 auto 10px; display: block; }
.hm .home-drop-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em;
  color: var(--text); margin: 0 0 6px;
}
.hm .home-drop-sub { margin: 0 auto 18px; max-width: 42ch; font-size: 0.9rem; color: var(--text-muted); }
.hm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: var(--hm-btn-bg); color: var(--hm-btn-fg);
  font: 600 0.95rem 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
}
.hm-btn:hover { background: var(--hm-btn-hover); }
.hm .home-drop.busy { cursor: progress; }
.hm .home-drop.busy .hm-btn { opacity: 0.55; pointer-events: none; }
.home-drop-status { min-height: 1.3em; margin-top: 12px; font-size: 0.84rem; color: var(--text-muted); }
.home-drop-status:empty { min-height: 0; margin-top: 0; }
.home-drop-status.is-error { color: var(--err-text); }

.hm-routes { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 10px; }
.hm-route {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border-radius: 12px;
  text-decoration: none; color: var(--text);
  transition: background 0.15s;
}
.hm-route:hover { background: var(--surface2); }
.hm-route svg {
  width: 38px; height: 38px; padding: 8px; border-radius: 10px;
  color: var(--route); background: color-mix(in srgb, var(--route) 12%, transparent);
}
.hm-route strong { display: block; font-size: 0.95rem; font-weight: 600; }
.hm-route small { display: block; margin-top: 2px; font-size: 0.8rem; line-height: 1.45; color: var(--text-muted); }
.r-image { --route: var(--c-image); }
.r-video { --route: var(--c-video); }
.r-audio { --route: var(--c-audio); }
.r-docs  { --route: var(--c-docs); }

/* ── Sekcije ──────────────────────────────────────── */
.hm-section { margin-top: 96px; }
.hm-head { margin-bottom: 32px; max-width: 62ch; }
.hm h2 {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.025em;
  color: var(--text);
}
.hm-head p { margin-top: 10px; font-size: 1rem; line-height: 1.6; color: var(--text-muted); }
.hm-head a, .hm-file-way a { color: var(--accent1-text); text-decoration: underline; text-underline-offset: 2px; }

/* Svi alati */
.hm-directory { columns: 3; column-gap: 40px; }
.hm-group { break-inside: avoid; margin-bottom: 44px; }
.hm-group h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.98rem; font-weight: 700; color: var(--text);
  padding-bottom: 12px; border-bottom: 2px solid var(--text);
}
.hm-group h3::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--grp); }
.hm-group ul { list-style: none; }
.hm-group li + li { border-top: 1px solid var(--border); }
.hm-group a { display: block; padding: 11px 0; text-decoration: none; }
.hm-tool-name { display: block; font-size: 0.95rem; font-weight: 600; color: var(--text); }
.hm-tool-desc { display: block; margin-top: 2px; font-size: 0.83rem; line-height: 1.45; color: var(--text-muted); }
.hm-group a:hover .hm-tool-name { color: var(--accent1-text); text-decoration: underline; text-underline-offset: 2px; }
.hm-group.video { --grp: var(--c-video); }
.hm-group.docs  { --grp: var(--c-docs); }
.hm-group.image { --grp: var(--c-image); }
.hm-group.text  { --grp: var(--c-text); }
.hm-group.dev   { --grp: var(--c-dev); }
.hm-group.misc  { --grp: var(--c-misc); }

/* Popularne konverzije */
.hm-popular { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hm-popular a {
  display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  font-size: 0.95rem; font-weight: 600; color: var(--text); text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.hm-popular a span[aria-hidden] { color: var(--text-muted); font-weight: 400; }
.hm-popular a:hover { border-color: var(--accent1); color: var(--accent1-text); }

/* Šta se dešava sa fajlovima */
.hm-files-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.hm-file-way { padding-top: 20px; border-top: 2px solid var(--text); }
.hm-file-way svg { width: 26px; height: 26px; color: var(--accent1-text); margin-bottom: 14px; }
.hm-file-way h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.hm-file-way p { font-size: 0.93rem; line-height: 1.65; color: var(--text-muted); }

/* SEO tekst + FAQ */
.hm-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.hm .hm-about-text.format-content-block { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; }
.hm .hm-about-text h2 { margin-bottom: 16px; }
.hm .hm-about-text p { font-size: 0.95rem; line-height: 1.75; color: var(--text-muted); max-width: 64ch; }
.hm-faq h2 { margin-bottom: 16px; }
.hm-faq .format-faq { margin: 0; }

/* ── Manji ekrani ─────────────────────────────────── */
@media (max-width: 960px) {
  .hm-hero { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .hm-directory { columns: 2; }
  .hm-popular { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-about { grid-template-columns: 1fr; gap: 64px; }
}
@media (max-width: 640px) {
  .hm { padding: 0 16px 72px; }
  .hm-hero { padding-top: 24px; gap: 28px; }
  .hm-lead { margin: 16px 0 22px; }
  .hm-panel { border-radius: 18px; padding: 8px; }
  .hm .home-drop { padding: 26px 16px 22px; }
  .hm-routes { grid-template-columns: 1fr; }
  .hm-section { margin-top: 72px; }
  .hm-directory { columns: 1; }
  .hm-group { margin-bottom: 36px; }
  .hm-popular { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-files-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-route, .hm-btn, .hm-popular a { transition: none; }
}

/* UX-01: konverter na početnoj (js/ocf-flow.js) — smjerovi se kriju čim je fajl izabran */
.hm-panel.is-busy .hm-routes { display: none; }
.hm-panel .ocf-flow:not([data-state="empty"]) { padding: 18px 16px 12px; }
.hm-noscript { padding: 24px; text-align: center; color: var(--text-muted); }
