/* ============================================
   NEXiiO — Components — Elegant Modern
   Loads after tokens.css, before style.css
   ============================================ */

/* ---------- Buttons — Pill, magnetic, elegant ---------- */
.btn {
  --btn-h: 44px;
  --btn-px: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 var(--btn-px);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all 320ms var(--ease-spring), transform 160ms var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn.btn-lg { --btn-h: 52px; --btn-px: 28px; font-size: var(--text-base); }
.btn.btn-sm { --btn-h: 36px; --btn-px: 16px; font-size: var(--text-xs); }

/* Primary — accent */
.btn.btn-orange,
.btn.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(255,107,46,.28);
}
.btn.btn-orange:hover,
.btn.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-accent);
  color: #fff;
  transform: translateY(-1px);
}
.btn.btn-orange.arrow-left,
.btn.btn-primary.arrow-left {
  padding-left: 46px;
}
.btn.btn-orange.arrow-left::after {
  content: "←";
  font-family: inherit;
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  transition: transform 260ms var(--ease-spring);
  background: none !important;
  width: auto !important; height: auto !important;
}
.btn.btn-orange.arrow-left:hover::after { transform: translateY(-50%) translateX(-3px); }

/* Ghost / secondary */
.btn.btn-ghost,
.btn.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn.btn-ghost:hover { border-color: var(--ink-2); background: var(--surface); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

/* Custom 1 — keep alias compat, now pill */
.btn.btn-custom-1 {
  position: relative;
  isolation: isolate;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 0 18px 0 42px;
  height: 42px;
  font-size: var(--text-sm);
  overflow: hidden;
}
.btn.btn-custom-1 span {
  position: relative;
  z-index: 1;
  color: inherit;
  transition: color 220ms var(--ease-out);
}
.btn.btn-custom-1::before {
  content:"";
  position:absolute;
  left:6px; top:50%;
  transform: translateY(-50%);
  width:30px; height:30px;
  border-radius: var(--r-pill);
  background: var(--accent);
  transition: all 420ms var(--ease-spring);
  z-index: 0;
}
.btn.btn-custom-1::after {
  content:"←";
  position:absolute;
  left:14px; top:50%;
  transform: translateY(-50%);
  color:#fff;
  font-size:12px;
  background:none !important;
  width:auto !important; height:auto !important;
  z-index: 1;
}
.btn.btn-custom-1:hover { color:#fff !important; border-color: var(--accent); background: var(--accent); padding-right: 22px; }
.btn.btn-custom-1:hover span { color:#fff !important; }
.btn.btn-custom-1:hover::before { width:100%; left:0; height:100%; border-radius: var(--r-pill); }
.btn.btn-custom-1:hover::after { color:#fff; }

/* ---------- Chips / Pills ---------- */
.pill, .portfolio-type-badge {
  display:inline-flex;
  align-items:center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing:.02em;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.portfolio-type-badge {
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent) 0%, #FF8A50 100%);
  color: #fff;
  border-color: var(--accent);
  height: 24px;
  padding: 0 11px;
  font-size: 11px;
}
.pill--accent { background: var(--accent-soft); border-color: var(--line-accent); color: var(--accent); }

/* ---------- Cards — universal elegant ---------- */
.card,
.product-box,
.blog-list,
.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 520ms var(--ease-spring), box-shadow 420ms var(--ease-out), border-color 320ms var(--ease-out);
}
.card:hover,
.product-box:hover,
.blog-list:hover,
.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

/* ---------- Badges ---------- */
.badge-elegant {
  display:inline-flex;
  align-items:center;
  height:22px;
  padding:0 9px;
  border-radius: var(--r-pill);
  font-size:10px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform: uppercase;
  background: var(--ink);
  color:#fff;
}

/* ---------- Section header ---------- */
.section-head {
  margin-bottom: var(--space-8);
}
.section-head__eyebrow {
  display:inline-flex;
  align-items:center;
  gap: 10px;
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing:.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head__eyebrow::before {
  content:"";
  display:inline-block;
  width:28px; height:1px;
  background: var(--accent);
  opacity:.9;
}
.section-head__title {
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: var(--leading-tight);
  color: var(--ink);
  letter-spacing:-.02em;
  margin:0;
}
.section-head__desc {
  color: var(--muted);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  margin-top: 10px;
  max-width: 56ch;
}

/* Legacy alias */
.orange-light-title { color: var(--accent) !important; font-size: var(--text-xs) !important; letter-spacing:.14em; text-transform:uppercase; font-weight:800; }
.orange-light-title span { padding-right: 38px !important; }
.orange-light-title span:before { width:28px !important; background: var(--accent) !important; }
.custom-title { font-size: var(--text-2xl) !important; font-weight:900; letter-spacing:-.02em; line-height: var(--leading-tight); }

/* ---------- Filters sidebar ---------- */
.filters,
.portfolio-filter-wrapper,
.portfolio-detail-sidebar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.filter-title {
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing:.02em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  margin:0;
  background: var(--surface-soft);
}
.filters .ul-categories,
.filters .tree-view,
.filters .ul-blog-categories { padding: 10px 8px 14px; }

/* Chips for portfolio filter */
.portfolio-chip span {
  border-radius: var(--r-pill) !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
  color: var(--ink-2) !important;
  font-weight:700 !important;
  transition: all 260ms var(--ease-spring) !important;
}
.portfolio-chip span:hover { border-color: var(--ink) !important; color: var(--ink) !important; }
.portfolio-chip.active span {
  background: var(--ink) !important;
  color:#fff !important;
  border-color: var(--ink) !important;
  box-shadow: var(--shadow-sm);
}

/* ---------- Forms — elegant ---------- */
.form-control {
  height: 46px;
  border-radius: var(--r-md) !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--surface) !important;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ink);
  padding: 0 14px;
  transition: border-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms;
  box-shadow: none !important;
}
.form-control::placeholder { color: var(--muted-2); }
.form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px rgba(255,107,46,.14) !important;
  background: #fff !important;
}
textarea.form-control { height: auto !important; padding: 12px 14px; min-height: 120px; }

/* ---------- Prose — for Html.Raw content ---------- */
.prose, .blog-single-post, .portfolio-detail-content, .product-detail .text-justify {
  color: var(--ink-2);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
}
.prose h1, .prose h2, .prose h3,
.blog-single-post h1, .blog-single-post h2, .blog-single-post h3 {
  color: var(--ink);
  font-weight: 900;
  letter-spacing:-.015em;
  line-height: var(--leading-tight);
  margin: 1.2em 0 .5em;
}
.prose p, .blog-single-post p { margin: 0 0 1em; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--accent-hover); }
.prose img { border-radius: var(--r-lg); max-width:100%; height:auto; }

/* ---------- Utilities ---------- */
.container { max-width: var(--container-max) !important; width: min(92%, var(--container-max)) !important; }
.container-wide { max-width: var(--container-wide); width: min(94%, var(--container-wide)); margin-inline:auto; }
.section-gap { padding: clamp(56px, 7vw, 110px) 0 !important; }
.eyebrow { color: var(--accent); font-size: var(--text-xs); font-weight:800; letter-spacing:.14em; text-transform:uppercase; }
.divider { height:1px; background: var(--line); border:0; margin: var(--space-8) 0; }

/* Keep legacy .n-fs-60 */
.n-fs-60 { font-size: var(--text-hero) !important; line-height: var(--leading-tight); font-weight: 900; letter-spacing:-.03em; }
