/* ── IMPORT ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* ── VARIJABLE – LIGHT MODE ─────────────────────────── */
:root {
  --primary:       #6366f1;
  --primary-dark:  #4f46e5;
  --primary-light: #e0e7ff;
  --bg:            #f8f9fb;
  --surface:       #ffffff;
  --surface-2:     #f1f2f6;
  --text:          #111827;
  --text-2:        #4b5563;
  --text-3:        #9ca3af;
  --border:        #e5e7eb;
  --border-2:      #d1d5db;
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg:     0 4px 16px rgba(0,0,0,0.10);
  --font:          'Inter', system-ui, sans-serif;
  --header-h:      60px;
}

/* ── VARIJABLE – DARK MODE ──────────────────────────── */
html.dark {
  --bg:         #0f1117;
  --surface:    #1a1d27;
  --surface-2:  #22263a;
  --text:       #f1f5f9;
  --text-2:     #94a3b8;
  --text-3:     #475569;
  --border:     #2d3148;
  --border-2:   #3d4260;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg:  0 4px 16px rgba(0,0,0,0.5);
  --primary-light: #312e81;
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── HEADER ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
}
.site-header .logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.site-header .logo i { font-size: 1.2rem; }
.header-spacer { flex: 1; }
.header-controls { display: flex; align-items: center; gap: 8px; }

/* Gumb (dark mode, lang) */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.lang-btn {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font);
  transition: background 0.15s;
}
.lang-btn:hover { background: var(--surface-2); }
.lang-btn.active { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ── FOOTER ─────────────────────────────────────────── */
.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-3);
}
.site-footer a { color: var(--primary); }
.site-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.bmac-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1rem;
  padding: 8px 16px;
  background: #FFDD00;
  color: #000;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.bmac-btn:hover { opacity: 0.85; }

/* ── HOMEPAGE ───────────────────────────────────────── */
.homepage { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; width: 100%; }

.hero { text-align: center; padding: 3rem 0 2rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 600; margin-bottom: 0.75rem; }
.hero p { color: var(--text-2); font-size: 1.05rem; max-width: 520px; margin: 0 auto 1.75rem; }

.search-wrap {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}
.search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 0.9rem;
}
.search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* Filteri */
.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Grid */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 600px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }

/* Kartica */
.tool-card {
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}
.tool-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.tool-card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.tool-card-body { flex: 1; min-width: 0; }
.tool-card-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.tool-card-desc { font-size: 0.82rem; color: var(--text-2); line-height: 1.5; margin-bottom: 8px; }
.category-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Nema rezultata */
.no-results {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 0;
  color: var(--text-3);
  gap: 0.75rem;
}
.no-results i { font-size: 2rem; }

/* ── AD SLOTOVI ─────────────────────────────────────── */
.ad-slot {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 1.5rem 0;
  overflow: hidden;
}
.ad-placeholder {
  font-size: 0.8rem;
  color: var(--text-3);
  font-style: italic;
}
.ad-slot-top  { min-height: 90px; }
.ad-slot-bottom { min-height: 90px; }
.ad-slot-sidebar {
  min-height: 250px;
  margin: 0;
  width: 100%;
}

/* ── TOOL PAGE LAYOUT ────────────────────────────────── */
.tool-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}
.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .tool-layout { grid-template-columns: 1fr 300px; }
}

.tool-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.tool-main h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.tool-main .tool-desc {
  color: var(--text-2);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

/* Forma unutar toola */
.tool-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--text-2); }
.form-group input,
.form-group select {
  padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* Rezultat */
.tool-result {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--primary-light);
  border-radius: var(--radius-md);
  border: 1px solid rgba(99,102,241,0.2);
}
.tool-result .result-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.tool-result .result-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.tool-result .result-note {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-top: 6px;
}

/* Copy gumb */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.75rem;
  padding: 7px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover { border-color: var(--primary); color: var(--primary); }
.copy-btn.copied { background: #dcfce7; border-color: #16a34a; color: #15803d; }

/* Sidebar na tool stranici */
.tool-sidebar { display: flex; flex-direction: column; gap: 1rem; }

/* Affiliate box */
.affiliate-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.affiliate-box .aff-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.affiliate-box .aff-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.affiliate-box .aff-desc {
  font-size: 0.85rem;
  color: var(--text-2);
  margin-bottom: 0.85rem;
  line-height: 1.5;
}
.aff-link {
  display: block;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  transition: background 0.15s;
}
.aff-link:hover { background: var(--primary-dark); color: #fff; }

/* ── BREADCRUMB ─────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 1.25rem;
}
.breadcrumb a { color: var(--primary); }
.breadcrumb i { font-size: 0.65rem; }

/* ── UTILITY ────────────────────────────────────────── */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
[hidden] { display: none !important; }
