/* ============================================================
   EngMats v1.2 — Main Stylesheet
   Design: Dark Industrial / Precision Engineering
   Fonts: Barlow Condensed (headings) + Outfit (body) + JetBrains Mono (data)
   Author: Nuhić Tarik + Claude
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800&family=Outfit:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Variables ───────────────────────────────────────────── */
:root {
  --bg:          #0b0e1a;
  --bg2:         #111523;
  --surface:     #161b2e;
  --surface2:    #1d2340;
  --surface3:    #242a4a;
  --border:      #2a3158;
  --border-s:    #1e2540;

  --primary:     #f5a623;
  --primary-d:   rgba(245,166,35,.18);
  --primary-g:   rgba(245,166,35,.35);

  --accent:      #2fcaa8;
  --accent-d:    rgba(47,202,168,.15);

  --success:     #27c785;
  --danger:      #e05252;

  --text:        #d0d8ee;
  --text-dim:    #7c87a6;
  --text-muted:  #4a5270;

  --fh:  'Barlow Condensed', sans-serif;
  --fb:  'Outfit', sans-serif;
  --fm:  'JetBrains Mono', monospace;

  --r:   6px;
  --rl:  12px;
  --sh:  0 4px 24px rgba(0,0,0,.45);

  --header-h: 62px;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--fb);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(47,202,168,.04) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(245,166,35,.04) 0%, transparent 70%);
}

body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(42,49,88,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,49,88,.18) 1px, transparent 1px);
  background-size: 40px 40px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: #ffc55a; }
img { max-width: 100%; display: block; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── ══════════════════════════════════════════════════════ ── */
/*    HEADER — single row, fully responsive                     */
/* ── ══════════════════════════════════════════════════════ ── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(11,14,26,.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-s);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-h);
  gap: 8px;
  /* container already sets padding */
}

/* Logo */
.logo {
  font-family: var(--fh);
  font-size: 1.55rem; font-weight: 800;
  color: #fff; letter-spacing: .3px;
  white-space: nowrap; flex-shrink: 0;
}
.logo-bracket { color: var(--primary); }
.logo:hover { color: #fff; }

/* Desktop nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 24px;
}

.nav-link {
  font-family: var(--fb);
  font-size: .875rem; font-weight: 500;
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: var(--r);
  transition: all .2s;
  white-space: nowrap;
  border: none; background: none; cursor: pointer;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-d);
}

/* Dropdown */
.nav-dropdown { position: relative; }

.nav-drop-btn {
  display: flex; align-items: center; gap: 4px;
}

.nav-caret {
  font-size: .6rem; opacity: .6;
  transition: transform .2s;
}
.nav-drop-btn[aria-expanded="true"] .nav-caret { transform: rotate(180deg); }

.nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rl);
  box-shadow: var(--sh);
  padding: 6px;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: all .18s ease;
  z-index: 300;
}
.nav-drop-menu.open {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}
.drop-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r);
  color: var(--text-dim); font-size: .875rem;
  transition: all .15s;
}
.drop-item:hover { color: var(--text); background: var(--surface2); }
.drop-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}

/* Right side of header */
.header-right {
  display: flex; align-items: center; gap: 8px;
  margin-left: auto;
}

/* Inline search (non-homepage) */
.header-search-form {
  display: flex; align-items: stretch;
}
.header-search-form input {
  width: 230px;
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-right: none;
  border-radius: var(--r) 0 0 var(--r);
  color: var(--text); font-family: var(--fb); font-size: .82rem;
  padding: 7px 12px;
  outline: none; transition: border-color .2s;
}
.header-search-form input:focus { border-color: var(--primary); }
.header-search-form input::placeholder { color: var(--text-muted); }
.header-search-form button {
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 0 var(--r) var(--r) 0;
  color: #000; cursor: pointer; font-size: .8rem;
  padding: 7px 12px; transition: background .2s;
}
.header-search-form button:hover { background: #ffc048; }

/* Language switcher */
.lang-sw {
  display: flex; align-items: center; gap: 3px;
  font-size: .78rem; font-family: var(--fm);
  color: var(--text-muted);
  flex-shrink: 0;
}
.lang-btn {
  color: var(--text-muted); padding: 3px 5px;
  border-radius: 4px; font-weight: 500;
  transition: all .2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.on {
  color: var(--primary);
  background: var(--primary-d);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; justify-content: space-between;
  width: 28px; height: 20px;
  background: none; border: none; cursor: pointer;
  padding: 0; flex-shrink: 0;
}
.hamburger span {
  display: block; height: 2px;
  background: var(--text-dim); border-radius: 2px;
  transition: all .25s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  max-height: 0; overflow: hidden;
  transition: max-height .3s ease;
  background: var(--surface);
  border-top: 1px solid var(--border-s);
}
.mobile-nav.open { max-height: 80vh; overflow-y: auto; }

.mob-inner { padding: 12px 16px 20px; }
.mob-link {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--r);
  color: var(--text-dim); font-size: .9rem;
  transition: all .15s;
}
.mob-link:hover, .mob-link.active { color: var(--primary); background: var(--primary-d); }
.mob-indent { padding-left: 24px; font-size: .875rem; }
.mob-group-label {
  font-family: var(--fm); font-size: .68rem;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px;
  padding: 12px 12px 4px;
}
.mob-divider { border-top: 1px solid var(--border-s); margin: 10px 0; }
.mob-search-form {
  display: flex; gap: 0; margin-top: 4px;
}
.mob-search-form input {
  flex: 1; background: var(--surface2);
  border: 1px solid var(--border-s); border-right: none;
  border-radius: var(--r) 0 0 var(--r);
  color: var(--text); font-family: var(--fb); font-size: .875rem;
  padding: 8px 12px; outline: none;
}
.mob-search-form button {
  background: var(--primary); border: none; border-radius: 0 var(--r) var(--r) 0;
  color: #000; cursor: pointer; font-size: .85rem; padding: 8px 14px;
}

/* ── ══════════════════════════════════════════════════════ ── */
/*    HOMEPAGE                                                   */
/* ── ══════════════════════════════════════════════════════ ── */
.hero {
  padding: 64px 0 56px;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  font-family: var(--fm); font-size: .78rem; font-weight: 500;
  color: var(--primary); letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--fh);
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800; color: #fff;
  line-height: 1; letter-spacing: -1px;
  margin-bottom: 18px;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
  font-size: 1.05rem; color: var(--text-dim);
  max-width: 580px; margin-bottom: 36px;
  line-height: 1.7;
}

/* Big search on homepage */
.hero-search {
  display: flex; align-items: stretch;
  max-width: 640px;
  margin-bottom: 48px;
  box-shadow: 0 0 0 1px var(--border-s), var(--sh);
  border-radius: var(--rl);
  overflow: hidden;
}
.hero-search input {
  flex: 1;
  background: var(--surface);
  border: none;
  color: var(--text); font-family: var(--fb); font-size: 1rem;
  padding: 14px 20px;
  outline: none;
}
.hero-search input::placeholder { color: var(--text-muted); }
.hero-search input:focus { background: var(--surface2); }
.hero-search button {
  background: var(--primary); border: none;
  color: #000; font-family: var(--fb); font-size: .9rem; font-weight: 600;
  padding: 14px 24px; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: background .2s; white-space: nowrap;
}
.hero-search button:hover { background: #ffc048; }

/* Stats */
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 32px;
}
.stat-item { }
.stat-num {
  font-family: var(--fh); font-size: 2rem; font-weight: 800;
  color: var(--primary); line-height: 1;
}
.stat-label { font-size: .78rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .8px; margin-top: 2px; }

/* Section headings */
.section { padding: 48px 0; position: relative; z-index: 1; }
.section-title {
  font-family: var(--fh); font-size: 1.5rem; font-weight: 700;
  color: #fff; letter-spacing: .3px; margin-bottom: 4px;
}
.section-sub { font-size: .88rem; color: var(--text-dim); margin-bottom: 24px; }

/* Category cards */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-radius: var(--rl);
  padding: 20px;
  display: flex; gap: 14px; align-items: flex-start;
  transition: all .22s ease;
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
}
.category-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--cat-color, var(--primary));
}
.category-card:hover {
  border-color: var(--border);
  background: var(--surface2);
  transform: translateY(-2px);
  box-shadow: var(--sh);
  color: inherit;
}
.cat-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--cat-dim, var(--primary-d));
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  color: var(--cat-color, var(--primary)); font-size: .95rem;
}
.cat-name {
  font-family: var(--fh); font-size: 1.1rem; font-weight: 700;
  color: #fff; margin-bottom: 4px;
}
.cat-desc { font-size: .82rem; color: var(--text-dim); line-height: 1.4; }
.cat-count {
  margin-left: auto; flex-shrink: 0;
  font-family: var(--fm); font-size: .72rem; color: var(--text-muted);
  background: var(--surface3); border-radius: 20px; padding: 2px 8px;
}

/* ── ══════════════════════════════════════════════════════ ── */
/*    CATEGORY PAGE                                             */
/* ── ══════════════════════════════════════════════════════ ── */
.page-hero {
  padding: 40px 0 32px;
  position: relative; z-index: 1;
}
.breadcrumb {
  display: flex; gap: 6px; align-items: center;
  font-size: .82rem; color: var(--text-muted); margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-muted); }
.page-title {
  font-family: var(--fh);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800; color: #fff; line-height: 1.05;
  letter-spacing: -.5px; margin-bottom: 8px;
}
.page-subtitle { font-size: 1rem; color: var(--text-dim); margin-bottom: 24px; }

/* Material cards */
.material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  position: relative; z-index: 1;
}
.material-card {
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-radius: var(--rl); overflow: hidden;
  transition: all .22s ease;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.material-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary-d), var(--sh);
  transform: translateY(-2px); color: inherit;
}
.card-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--border-s); }
.card-name { font-family: var(--fh); font-size: 1.3rem; font-weight: 700; color: #fff; }
.card-group { font-size: .8rem; color: var(--text-dim); margin-top: 2px; }
.card-body { padding: 12px 20px; flex: 1; }
.card-desc { font-size: .875rem; color: var(--text-dim); line-height: 1.5; }
.card-props {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 12px 20px;
  border-top: 1px solid var(--border-s);
  background: var(--bg2);
}
.prop-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.prop-val { font-family: var(--fm); font-size: .82rem; color: var(--primary); font-weight: 500; }
.card-footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border-s);
  display: flex; justify-content: space-between; align-items: center;
}
.cat-tag { font-size: .75rem; color: var(--text-muted); }
.arrow-lnk { font-size: .78rem; color: var(--primary); font-weight: 600; }

/* ── ══════════════════════════════════════════════════════ ── */
/*    MATERIAL DETAIL                                           */
/* ── ══════════════════════════════════════════════════════ ── */
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 32px;
}
.meta-chip {
  font-family: var(--fm); font-size: .76rem;
  padding: 4px 10px; border-radius: 20px;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.meta-chip.primary { border-color: var(--primary); color: var(--primary); background: var(--primary-d); }

/* Tabs */
.tabs-bar {
  position: sticky; top: var(--header-h); z-index: 90;
  background: rgba(11,14,26,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-s);
  margin-bottom: 28px;
}
.tabs-scroll {
  display: flex; overflow-x: auto; scrollbar-width: none;
}
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab-btn {
  font-family: var(--fb); font-size: .85rem; font-weight: 500;
  color: var(--text-dim); padding: 13px 18px;
  border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all .18s;
  flex-shrink: 0;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-radius: var(--rl); overflow: hidden;
  margin-bottom: 20px;
}
.panel-hd {
  padding: 13px 20px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border-s);
  display: flex; align-items: center; gap: 10px;
}
.panel-icon {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--primary-d); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; flex-shrink: 0;
}
.panel-title {
  font-family: var(--fh); font-size: 1rem; font-weight: 700; color: #fff;
}
.panel-bd { padding: 20px; }

/* Tables */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--rl);
  border: 1px solid var(--border-s);
  background: var(--surface);
}
.data-table {
  width: 100%; border-collapse: collapse; font-size: .88rem;
}
.data-table thead th {
  font-family: var(--fh); font-size: .72rem; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-dim); background: var(--surface2);
  padding: 9px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody tr { border-bottom: 1px solid var(--border-s); transition: background .15s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table td { padding: 9px 14px; vertical-align: middle; }
.val  { font-family: var(--fm); font-size: .84rem; color: var(--primary); }
.dim  { color: var(--text-muted); font-size: .8rem; }
.unit { font-family: var(--fm); font-size: .78rem; color: var(--text-muted); }
.std-body-badge {
  font-family: var(--fm); font-size: .7rem; font-weight: 500;
  padding: 2px 6px; border-radius: 4px;
  background: var(--surface3); color: var(--accent);
  display: inline-block;
}
.std-desig { font-family: var(--fm); font-size: .9rem; color: #fff; font-weight: 500; }

/* Chemical element tiles */
.chem-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 10px;
  margin-bottom: 24px;
}
.chem-tile {
  background: var(--surface2); border: 1px solid var(--border-s);
  border-radius: var(--r); padding: 10px 12px; text-align: center;
}
.elem-sym { font-family: var(--fh); font-size: 1.35rem; font-weight: 800; color: var(--accent); line-height: 1; }
.elem-name { font-size: .7rem; color: var(--text-muted); margin: 2px 0; }
.elem-range { font-family: var(--fm); font-size: .73rem; color: var(--primary); font-weight: 500; }

/* Physical props */
.phys-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px,1fr)); gap: 12px;
}
.phys-item {
  background: var(--surface2); border-radius: var(--r); padding: 14px;
}
.phys-label { font-size: .76rem; color: var(--text-muted); margin-bottom: 4px; }
.phys-val { font-family: var(--fm); font-size: 1.1rem; color: var(--primary); font-weight: 500; }
.phys-unit { font-size: .73rem; color: var(--text-muted); }

/* Heat treatment */
.ht-list { display: flex; flex-direction: column; gap: 12px; }
.ht-item {
  background: var(--surface2); border: 1px solid var(--border-s);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--r) var(--r) 0; padding: 14px 16px;
}
.ht-type { font-family: var(--fh); font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.ht-specs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.ht-spec { font-size: .82rem; display: flex; gap: 5px; }
.ht-spec-lbl { color: var(--text-muted); }
.ht-spec-val { font-family: var(--fm); color: var(--accent); }
.ht-notes { font-size: .84rem; color: var(--text-dim); line-height: 1.55; margin-top: 6px; }

/* Machinability bar */
.mach-bar-wrap { margin-bottom: 24px; }
.mach-bar-top { display: flex; justify-content: space-between; margin-bottom: 5px; }
.mach-bar-label { font-size: .85rem; color: var(--text-dim); }
.mach-bar-val { font-family: var(--fm); font-size: 1.4rem; color: var(--primary); font-weight: 500; }
.mach-bar-track { background: var(--surface2); border-radius: 6px; height: 10px; overflow: hidden; }
.mach-bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg,var(--accent),var(--primary)); transition: width .8s ease; }

/* Notes */
.note-list { display: flex; flex-direction: column; gap: 12px; }
.note-item { border-radius: var(--r); padding: 14px 16px; display: flex; gap: 12px; border: 1px solid; }
.note-general    { background: rgba(74,158,255,.07);  border-color: rgba(74,158,255,.25); }
.note-warning    { background: rgba(224,82,82,.08);   border-color: rgba(224,82,82,.25); }
.note-tip        { background: rgba(39,199,133,.07);  border-color: rgba(39,199,133,.25); }
.note-weldability{ background: rgba(245,166,35,.07);  border-color: rgba(245,166,35,.25); }
.note-corrosion  { background: rgba(74,158,255,.07);  border-color: rgba(74,158,255,.25); }
.note-forming    { background: rgba(155,89,182,.07);  border-color: rgba(155,89,182,.25); }
.note-icon { font-size: 1.1rem; flex-shrink: 0; }
.note-title { font-family: var(--fh); font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.note-text { font-size: .875rem; color: var(--text-dim); line-height: 1.6; }

/* Applications */
.app-list { display: flex; flex-direction: column; gap: 8px; }
.app-item { background: var(--surface2); border-radius: var(--r); padding: 12px 16px; display: flex; gap: 10px; align-items: flex-start; }
.app-ind { font-family: var(--fm); font-size: .7rem; color: var(--primary); background: var(--primary-d); border-radius: 4px; padding: 2px 6px; flex-shrink: 0; margin-top: 2px; }
.app-text { font-size: .875rem; color: var(--text); line-height: 1.5; }

/* Diagrams */
.chart-wrap {
  position: relative; height: 320px;
  background: var(--surface2); border-radius: var(--r); padding: 16px;
  margin-bottom: 12px;
}

/* ── CONTACT PAGE ─────────────────────────────────────────── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 32px;
  align-items: start;
}
.contact-form-box {
  background: var(--surface); border: 1px solid var(--border-s);
  border-radius: var(--rl); overflow: hidden;
}
.contact-form-hd {
  padding: 16px 24px; background: var(--surface2);
  border-bottom: 1px solid var(--border-s);
}
.contact-form-hd-title { font-family: var(--fh); font-size: 1.1rem; font-weight: 700; color: #fff; }
.contact-form-bd { padding: 24px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.form-label { font-size: .8rem; color: var(--text-dim); font-weight: 500; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text);
  font-family: var(--fb); font-size: .9rem;
  padding: 9px 12px; outline: none; width: 100%;
  transition: border-color .2s;
}
.form-control:focus { border-color: var(--primary); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--surface2); }
textarea.form-control { resize: vertical; min-height: 120px; line-height: 1.6; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-submit {
  width: 100%; padding: 11px; background: var(--primary); border: none;
  border-radius: var(--r); color: #000; font-family: var(--fb);
  font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-submit:hover { background: #ffc048; }

.contact-info { position: sticky; top: calc(var(--header-h) + 20px); }
.info-card {
  background: var(--surface); border: 1px solid var(--border-s);
  border-radius: var(--rl); padding: 20px; margin-bottom: 16px;
}
.info-card-title { font-family: var(--fh); font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.info-card p { font-size: .875rem; color: var(--text-dim); line-height: 1.65; }
.alert { padding: 12px 16px; border-radius: var(--r); font-size: .875rem; margin-bottom: 16px; display: flex; gap: 8px; align-items: flex-start; }
.alert-success { background: rgba(39,199,133,.1); color: var(--success); border: 1px solid rgba(39,199,133,.25); }
.alert-danger  { background: rgba(224,82,82,.1);  color: var(--danger);  border: 1px solid rgba(224,82,82,.25); }

/* ── SEARCH ───────────────────────────────────────────────── */
.search-header { padding: 40px 0 24px; position: relative; z-index: 1; }
.search-kw { color: var(--primary); border-bottom: 1px dashed var(--primary); }
.no-results { text-align: center; padding: 64px 24px; color: var(--text-muted); }
.no-results i { font-size: 2.5rem; margin-bottom: 16px; display: block; }

/* ── BADGES / UTILITIES ───────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--fm); font-size: .7rem; font-weight: 500;
  padding: 2px 7px; border-radius: 4px;
}
.badge-primary { background: var(--primary-d); color: var(--primary); }
.badge-accent  { background: var(--accent-d);  color: var(--accent); }
.badge-muted   { background: var(--surface3);  color: var(--text-muted); }

.divider { border: none; border-top: 1px solid var(--border-s); margin: 20px 0; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; }
.mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; }

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  margin-top: 64px; border-top: 1px solid var(--border-s); padding: 32px 0;
  position: relative; z-index: 1;
}
.footer-inner-old { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { font-family: var(--fh); font-size: 1.2rem; font-weight: 800; color: var(--text-dim); }
.footer-brand span { color: var(--primary); }
.footer-note { font-size: .8rem; color: var(--text-muted); margin-top: 3px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: .82rem; color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }

/* ── ANIMATIONS ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim { animation: fadeUp .4s ease both; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .3s; }

/* ── ══════════════════════════════════════════════════════ ── */
/*    RESPONSIVE                                                */
/* ── ══════════════════════════════════════════════════════ ── */

/* Tablet / small desktop */

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — EngMats v1.0
   ════════════════════════════════════════════════════════════ */

/* ── Tablet (≤1024px) ──────────────────────────────────────── */
@media (max-width: 1024px) {
  .main-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .nav-link { white-space: nowrap; font-size: .82rem; padding: 6px 8px; }
  .hero h1 { font-size: 2.4rem; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .material-grid  { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* ── Mobile (≤768px) ───────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --header-h: 56px; }

  /* Header */
  .main-nav           { display: none; }
  .header-search-form { display: none; }
  .hamburger          { display: flex; }
  .mobile-nav         { display: block; }
  .header-inner       { padding: 0 14px; }

  /* Hero */
  .hero               { padding: 28px 0 24px; }
  .hero h1            { font-size: 1.75rem; line-height: 1.2; }
  .hero-sub           { font-size: .875rem; }
  .hero-search        { max-width: 100%; flex-direction: column; gap: 8px; }
  .hero-search input  { border-radius: var(--r); font-size: .9rem; }
  .hero-search button { border-radius: var(--r); width: 100%; justify-content: center; padding: 12px; }
  .hero-stats         { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .stat-num           { font-size: 1.5rem; }
  .stat-lbl           { font-size: .72rem; }

  /* Grids — single or 2-col */
  .category-grid  { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .material-grid  { grid-template-columns: 1fr; gap: 10px; }
  .cat-card       { padding: 16px 14px; }
  .cat-icon       { font-size: 1.1rem; width: 32px; height: 32px; }

  /* Page hero */
  .page-hero      { padding: 20px 0 16px; }
  .page-title     { font-size: 1.6rem; }
  .page-subtitle  { font-size: .85rem; }
  .breadcrumb     { font-size: .75rem; flex-wrap: wrap; }

  /* Material tabs — horizontal scroll */
  .material-tabs  {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 0 14px;
    border-radius: 0;
  }
  .material-tabs::-webkit-scrollbar { display: none; }
  .tab-btn {
    padding: 9px 12px;
    font-size: .78rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Data tables — horizontal scroll */
  .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -14px;
    padding: 0 14px;
  }
  .data-table { min-width: 480px; font-size: .82rem; }
  .data-table th, .data-table td { padding: 7px 10px; }

  /* Chemical / physical grids */
  .chem-grid  { grid-template-columns: repeat(2, 1fr); }
  .phys-grid  { grid-template-columns: 1fr 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }

  /* HT specs */
  .ht-specs   { gap: 8px; flex-wrap: wrap; }
  .ht-spec    { min-width: 140px; flex: 1; }

  /* Panel */
  .panel-hd   { padding: 11px 14px; gap: 8px; }
  .panel-bd   { padding: 14px; }
  .panel-icon { width: 28px; height: 28px; font-size: .75rem; }

  /* Calculator */
  .calc-grid  { grid-template-columns: 1fr; gap: 16px; }
  .dim-grid   { grid-template-columns: 1fr 1fr; }
  .shape-grid { grid-template-columns: repeat(3, 1fr); }

  /* Blog */
  .blog-layout  { grid-template-columns: 1fr; }
  .blog-grid    { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; order: 2; }
  .blog-cat-bar { gap: 6px; }
  .blog-cat-pill { font-size: .72rem; padding: 4px 10px; }
  .post-layout  { grid-template-columns: 1fr; }
  .post-title   { font-size: 1.5rem; }
  .post-sidebar { position: static; order: 2; }
  .post-sidebar-toc { display: none; }

  /* Standards/HT guide */
  .guide-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .guide-tab  { white-space: nowrap; flex-shrink: 0; }
  .ht-grid    { grid-template-columns: 1fr; }
  .ht-sidebar { position: static; }
  .ht-nav     { display: flex; overflow-x: auto; border-radius: var(--r); flex-wrap: nowrap; }
  .ht-nav-item { flex-shrink: 0; border-right: 1px solid var(--border-s); border-bottom: none; }

  /* Footer */
  .footer-grid    { grid-template-columns: 1fr; gap: 20px; padding: 24px 0 16px; }
  .footer-brand-col { order: -1; }
  .footer-desc    { max-width: 100%; }
  .footer-bottom  { flex-direction: column; text-align: center; gap: 10px; }
  .footer-col     { flex-direction: row; flex-wrap: wrap; gap: 12px 20px; }
  .footer-col-title { width: 100%; margin-bottom: 2px; }

  /* Search */
  .search-results-grid { grid-template-columns: 1fr; }

  .container { padding: 0 14px; }
}

/* ── Small mobile (≤480px) ─────────────────────────────────── */
@media (max-width: 480px) {
  .category-grid  { grid-template-columns: 1fr; }
  .chem-grid      { grid-template-columns: 1fr 1fr; }
  .phys-grid      { grid-template-columns: 1fr; }
  .shape-grid     { grid-template-columns: repeat(3, 1fr); }
  .dim-grid       { grid-template-columns: 1fr; }
  .hero h1        { font-size: 1.5rem; }
  .page-title     { font-size: 1.4rem; }
  .stat-num       { font-size: 1.3rem; }
  .tab-btn        { font-size: .72rem; padding: 8px 9px; }
  .hero-search button span { display: none; }
  .hero-search button { padding: 12px 14px; }
  .result-grid    { grid-template-columns: 1fr 1fr; }
  .result-item:nth-child(3) { grid-column: 1/-1; border-top: 1px solid var(--border-s); }
  .post-title     { font-size: 1.3rem; }
  .post-share     { flex-wrap: wrap; }
  .blog-card-featured { flex-direction: column; }
}

/* ── Utility classes ─────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }  .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }.mb-2 { margin-bottom: 16px; }.mb-3 { margin-bottom: 24px; }
.d-none { display: none; }
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
