/* ===========================
   DIZAJNO — Main CSS v3
   Professional. No emojis.
   =========================== */

:root {
  --bg:          #f9f7f4;
  --surface:     #ffffff;
  --surface2:    #f2eeea;
  --border:      #e5dfd8;
  --text:        #1a1510;
  --text-2:      #5a5048;
  --text-3:      #9a8e82;
  --accent:      #c8a96e;
  --accent-dark: #a8893e;
  --accent-bg:   #f7f0e3;
  --accent-light:#f7f0e3;
  --black:       #0f0d0a;
  --font-body:   'DM Sans', sans-serif;
  --radius:      10px;
  --radius-sm:   6px;
  --radius-lg:   16px;
  --shadow:      0 1px 8px rgba(0,0,0,0.07);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.10);
  --font:        'DM Sans', sans-serif;
  --font-display:'Playfair Display', serif;
  --nav-h:       68px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; overflow-x: hidden; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.1rem; font-weight: 700; font-family: var(--font); }
p  { color: var(--text-2); }
a  { text-decoration: none; color: inherit; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--black); color: #fff;
  padding: 13px 26px; border-radius: var(--radius);
  font-family: var(--font); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none; transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none; letter-spacing: 0.01em;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.18); }
.btn-primary.large { padding: 16px 36px; font-size: 1rem; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text);
  padding: 13px 26px; border-radius: var(--radius);
  font-family: var(--font); font-weight: 500; font-size: 0.95rem;
  cursor: pointer; border: 1.5px solid var(--border);
  transition: border-color 0.15s, background 0.15s; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--text); background: var(--surface2); }

.btn-primary-sm {
  display: inline-flex; align-items: center;
  background: var(--black); color: #fff;
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-family: var(--font); font-weight: 600; font-size: 0.85rem;
  cursor: pointer; border: none; transition: opacity 0.15s; text-decoration: none;
}
.btn-primary-sm:hover { opacity: 0.85; }

.btn-outline-sm {
  display: inline-flex; align-items: center;
  background: transparent; color: var(--text);
  padding: 7px 16px; border-radius: var(--radius-sm);
  font-family: var(--font); font-weight: 500; font-size: 0.85rem;
  cursor: pointer; border: 1.5px solid var(--border);
  transition: border-color 0.15s; text-decoration: none;
}
.btn-outline-sm:hover { border-color: var(--text); }
.full-width { width: 100%; justify-content: center; }

/* ── NAVBAR ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(249,247,244,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled { border-color: var(--border); box-shadow: 0 2px 16px rgba(0,0,0,0.06); }
.nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.logo img { height: 38px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 500; font-size: 0.9rem; color: var(--text-2); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); transition: 0.3s; }
.mobile-menu { display: none; flex-direction: column; padding: 16px 24px 20px; gap: 14px; border-top: 1px solid var(--border); background: var(--bg); }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-weight: 500; font-size: 0.95rem; }

/* ── HERO ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  position: relative; overflow: hidden;
}
.hero-bg-shapes { position: absolute; inset: 0; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.35; }
.shape-1 { width: 600px; height: 600px; background: radial-gradient(circle, #f0e8d8, transparent); top: -150px; right: -100px; }
.shape-2 { width: 400px; height: 400px; background: radial-gradient(circle, #e8d8c0, transparent); bottom: 0; left: -50px; }

.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; position: relative; z-index: 1; }
.hero-badge {
  display: inline-block; background: var(--accent-bg);
  color: var(--accent-dark); padding: 6px 16px; border-radius: 100px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; margin-bottom: 24px;
}
.hero-content h1 { margin-bottom: 20px; }
.hero-content h1 .accent { color: var(--accent-dark); font-style: italic; }
.hero-sub { font-size: 1.05rem; color: var(--text-2); margin-bottom: 36px; max-width: 440px; line-height: 1.75; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; align-items: center; gap: 24px; }
.stat strong { display: block; font-size: 1.2rem; font-weight: 700; }
.stat span { font-size: 0.78rem; color: var(--text-3); }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* Hero visual */
.hero-visual { display: flex; justify-content: center; align-items: center; }
.card-showcase { display: flex; flex-direction: column; gap: 12px; }
.showcase-card {
  border-radius: 10px; padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
  width: 280px; box-shadow: var(--shadow-lg);
  animation: float 5s ease-in-out infinite;
}
.showcase-card:nth-child(2) { animation-delay: 1.5s; align-self: flex-end; width: 240px; }
.showcase-card:nth-child(3) { animation-delay: 3s; width: 200px; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
.showcase-card.dark { background: #1a1510; }
.showcase-card.light { background: #ffffff; border: 1px solid var(--border); }
.showcase-card.gold { background: var(--accent); }
.sc-logo { width: 32px; height: 32px; border-radius: 6px; background: var(--accent); flex-shrink: 0; }
.sc-logo.light-logo { background: var(--surface2); }
.sc-logo.sm { width: 24px; height: 24px; background: rgba(255,255,255,0.4); }
.sc-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.sc-line { height: 7px; border-radius: 4px; background: rgba(255,255,255,0.35); }
.sc-line.bold { height: 9px; background: rgba(255,255,255,0.85); }
.sc-line.dark-line { background: rgba(26,21,16,0.2); }
.sc-line.dark-line.bold { background: rgba(26,21,16,0.7); }
.sc-line.short { width: 55%; }

/* ── SECTION HEADERS ── */
.section-header { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.section-header.center { flex-direction: column; align-items: center; text-align: center; }
.section-tag {
  display: inline-block; background: var(--surface2);
  color: var(--text-3); padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.see-all { margin-left: auto; font-size: 0.875rem; color: var(--text-2); font-weight: 500; border-bottom: 1px solid var(--border); padding-bottom: 1px; transition: color 0.15s; }
.see-all:hover { color: var(--text); }

/* ── CATEGORIES ── */
.categories { padding: 100px 0; }
.categories-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 20px 24px;
  text-align: center; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative; text-decoration: none; color: inherit; display: block;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.cat-card.featured { border-color: var(--accent); background: var(--accent-bg); }
.cat-label {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--accent-dark); color: #fff;
  padding: 2px 12px; border-radius: 100px; font-size: 0.7rem; font-weight: 700; white-space: nowrap;
}
.cat-icon-wrap { display: flex; justify-content: center; margin-bottom: 14px; color: var(--text-2); }
.cat-card.featured .cat-icon-wrap { color: var(--accent-dark); }
.cat-card h3 { font-size: 0.95rem; margin-bottom: 8px; }
.cat-card p { font-size: 0.78rem; color: var(--text-3); margin-bottom: 14px; line-height: 1.5; }
.cat-count { font-size: 0.72rem; font-weight: 700; color: var(--accent-dark); background: var(--surface2); padding: 3px 10px; border-radius: 100px; }
.cat-card.featured .cat-count { background: rgba(255,255,255,0.6); }

/* ── TEMPLATES GRID ── */
.featured { padding: 0 0 100px; }
.templates-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.templates-grid.large { grid-template-columns: repeat(3, 1fr); gap: 22px; }

.template-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; position: relative;
}
.template-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.template-preview { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--surface2); }
.template-preview-placeholder {
  width: 100%; aspect-ratio: 4/3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; color: var(--text-3);
}
.template-preview-placeholder svg { opacity: 0.4; }
.template-preview-placeholder span { font-size: 0.75rem; color: var(--text-3); }
.template-info-bar { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.template-info-bar h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 3px; font-family: var(--font); }
.template-cat-badge { font-size: 0.7rem; color: var(--text-3); background: var(--surface2); padding: 2px 8px; border-radius: 100px; }
.template-edit-btn {
  background: var(--black); color: #fff; padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 0.78rem; font-weight: 600; border: none; cursor: pointer; transition: opacity 0.15s; white-space: nowrap;
}
.template-edit-btn:hover { opacity: 0.85; }
.template-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,0);
  display: flex; align-items: center; justify-content: center; transition: background 0.2s;
}
.template-card:hover .template-overlay { background: rgba(0,0,0,0.28); }
.template-overlay-btn {
  opacity: 0; transform: scale(0.9); background: #fff; color: var(--black);
  padding: 10px 22px; border-radius: var(--radius); font-weight: 700; font-size: 0.875rem;
  border: none; cursor: pointer; transition: opacity 0.2s, transform 0.2s;
}
.template-card:hover .template-overlay-btn { opacity: 1; transform: scale(1); }
.featured-badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--accent-dark); color: #fff;
  padding: 3px 10px; border-radius: 100px; font-size: 0.68rem; font-weight: 700;
}

/* ── HOW IT WORKS ── */
.how-it-works { padding: 100px 0; background: var(--surface2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 0; }
.step { flex: 1; text-align: center; padding: 32px 28px; max-width: 280px; }
.step-num { font-family: var(--font-display); font-size: 3.5rem; font-weight: 900; color: var(--border); line-height: 1; margin-bottom: 16px; }
.step h3 { margin-bottom: 10px; font-size: 1.1rem; }
.step p { font-size: 0.875rem; line-height: 1.7; }
.step-arrow { display: flex; align-items: flex-start; padding-top: 56px; color: var(--border); flex-shrink: 0; }

/* ── CTA BANNER ── */
.cta-banner { padding: 100px 0; background: var(--black); }
.cta-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.cta-inner h2 { color: #fff; margin-bottom: 16px; }
.cta-inner p { color: rgba(255,255,255,0.55); margin-bottom: 36px; font-size: 1rem; }
.cta-inner .btn-primary { background: var(--accent); color: var(--black); font-weight: 700; }
.cta-inner .btn-primary:hover { box-shadow: 0 8px 32px rgba(200,169,110,0.35); }

/* ── FOOTER ── */
.footer { background: var(--surface2); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer.minimal { padding: 0; border-top: 1px solid var(--border); }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--border); }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-logo { height: 36px; width: auto; }
.footer-brand p { font-size: 0.875rem; max-width: 280px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 4px; font-family: var(--font); }
.footer-links a { font-size: 0.875rem; color: var(--text-2); transition: color 0.15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom { padding: 22px 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: var(--text-3); }
.tagline { font-style: italic; font-family: var(--font-display); font-size: 0.9rem; }

/* ── PAGE HEADER ── */
.page-header { background: var(--surface2); border-bottom: 1px solid var(--border); padding: calc(var(--nav-h) + 48px) 0 40px; text-align: center; }
.page-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 10px; }
.page-header p { font-size: 0.95rem; color: var(--text-2); }

/* ── TEMPLATES PAGE ── */
.templates-page { padding: 40px 0 80px; }
.filters-bar { display: flex; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab {
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text-2); padding: 7px 18px; border-radius: 100px;
  font-family: var(--font); font-weight: 500; font-size: 0.85rem;
  cursor: pointer; transition: all 0.15s;
}
.filter-tab:hover { border-color: var(--text); color: var(--text); }
.filter-tab.active { background: var(--black); border-color: var(--black); color: #fff; }
.search-box { position: relative; }
.search-box input {
  padding: 9px 38px 9px 16px; border: 1.5px solid var(--border);
  border-radius: 100px; font-family: var(--font); font-size: 0.85rem;
  background: var(--surface); color: var(--text); width: 210px; transition: border-color 0.15s;
}
.search-box input:focus { outline: none; border-color: var(--accent); }
.search-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.results-info { font-size: 0.82rem; color: var(--text-3); margin-bottom: 20px; }
.empty-state { text-align: center; padding: 80px 0; }
.empty-icon-wrap { display: flex; justify-content: center; margin-bottom: 20px; color: var(--border); }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { margin-bottom: 24px; }

/* ── FORM ELEMENTS ── */
input, select, textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font); font-size: 0.9rem;
  background: var(--surface); color: var(--text); transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type="color"] { width: 48px; height: 40px; padding: 4px; cursor: pointer; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(60px);
  background: var(--black); color: #fff; padding: 11px 22px; border-radius: var(--radius);
  font-size: 0.875rem; font-weight: 500; z-index: 9999; opacity: 0;
  transition: transform 0.3s, opacity 0.3s; pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: #1a6b42; }
.toast.error { background: #b5311e; }

/* ── LOADING ── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(249,247,244,0.92);
  display: none; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9998; gap: 16px;
}
.loading-spinner {
  width: 36px; height: 36px; border: 2.5px solid var(--border);
  border-top-color: var(--black); border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .templates-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .templates-grid, .templates-grid.large { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-direction: column; align-items: center; }
  .step-arrow { padding-top: 0; transform: rotate(90deg); }
  .filters-bar { flex-direction: column; align-items: flex-start; }
  .search-box input { width: 100%; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}
@media (max-width: 480px) {
  .categories-grid { grid-template-columns: 1fr 1fr; }
  .templates-grid, .templates-grid.large { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
}
