/* ===========================================================================
   Soluții Electrice Integrate — sistem vizual „alb și tehnic"
   Culorile se schimbă doar din blocul :root de mai jos.
   =========================================================================== */

:root {
  --ink:      #0f1c2e;   /* bleumarin foarte închis */
  --navy:     #14375c;   /* bleumarin */
  --blue:     #1a5fa8;   /* accent, folosit rar */
  --blue-dk:  #134b86;
  --blue-lt:  #eef3f9;

  --paper:    #ffffff;
  --paper-2:  #f5f7f9;
  --line:     #e0e5ea;
  --line-2:   #cdd5dd;

  --text:     #14202d;
  --muted:    #5b6a79;
  --on-dark:  #e9eef3;
  --on-dark-2:#9dacba;

  --head: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --page-max: 1760px;         /* lățimea maximă a paginii pe monitoare late */
  --page: min(100vw, 1760px);
  --wrap: 1760px;             /* conținutul ține pasul cu antetul și cu banda */
  --gut: 44px;                /* marginea laterală; aceeași pentru antet și pentru conținut */
  --hdr: 86px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 24px); }
body {
  margin: 0;
  max-width: var(--page-max);
  margin-inline: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
/* height:auto — altfel atributul height="…" din HTML forțează înălțimea
   și imaginea se deformează când lățimea coloanei e mai mică. */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-dk); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Tipografie ---------- */
h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 .55em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.35rem); letter-spacing: -0.028em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -0.024em; }
h3 { font-size: 1.16rem; letter-spacing: -0.012em; }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.lead { font-size: clamp(1.04rem, 1.5vw, 1.2rem); color: var(--muted); line-height: 1.58; }
.muted { color: var(--muted); }
.small { font-size: .87rem; }

.eyebrow {
  font-family: var(--body);
  font-size: .73rem; font-weight: 600;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 16px;
}
.on-dark .eyebrow { color: #7fb3e6; }

/* ---------- Structură ---------- */
.wrap { width: min(100% - var(--gut) * 2, var(--wrap)); margin-inline: auto; }
.sec { padding: clamp(56px, 7.5vw, 108px) 0; }
.sec--alt { background: var(--paper-2); }
.sec--dark { background: var(--ink); color: var(--on-dark); }
.sec--dark h2, .sec--dark h3 { color: #fff; }
.sec--dark .lead, .sec--dark .muted { color: var(--on-dark-2); }
.sec-head { max-width: 62ch; margin-bottom: clamp(34px, 4.5vw, 56px); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px;
  font-family: var(--body); font-size: .95rem; font-weight: 500;
  border: 1px solid transparent; border-radius: 2px;
  transition: .16s ease; cursor: pointer;
  text-decoration: none !important;
}
.btn--primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.sec--dark .btn--ghost { color: #fff; border-color: rgba(255,255,255,.32); }
.sec--dark .btn--ghost:hover { border-color: #fff; }
.btn--sm { padding: 9px 16px; font-size: .87rem; }

/* ---------- Antet ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  flex: none;
  height: var(--hdr);
  background: rgba(255,255,255,.97);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; }

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none !important; }
.brand__mark { width: 62px; height: 62px; flex: none; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.16; }
.brand__name {
  font-family: var(--head); font-weight: 600; font-size: 1.05rem;
  letter-spacing: -.008em; color: var(--ink);
}
.brand__sub {
  margin-top: 3px;
  font-size: .645rem; font-weight: 500; letter-spacing: .135em;
  text-transform: uppercase; color: var(--muted);
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 9px 14px; font-size: .95rem; color: var(--muted);
  text-decoration: none !important; border-radius: 2px; transition: .15s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); font-weight: 500; }
.nav a.btn { margin-left: 14px; color: #fff; }
.nav a.btn:hover { color: #fff; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 19px; height: 1.5px; background: var(--ink); transition: .2s;
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4.5px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1px); }

/* ---------- Antet pagină (hero) ---------- */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
/* Grila iese pe toată lățimea ferestrei; textul se aliniază la coloana de conținut. */
.hero__grid {
  display: grid; grid-template-columns: 1fr 1fr; align-items: stretch;
  min-height: min(76vh, 660px);
}
.hero__txt {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(48px, 6vw, 92px);
  padding-left: max(var(--gut), calc((var(--page) - var(--wrap)) / 2));
  padding-right: clamp(32px, 5vw, 76px);
}
.hero__txt .lead { max-width: 46ch; margin-top: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__img { background: var(--ink); overflow: hidden; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 46%; }

/* mic desen tehnic: linie orizontală de accent */
.tick-row { display: flex; gap: 26px; margin-top: 40px; flex-wrap: wrap; }
.tick { padding-left: 14px; border-left: 2px solid var(--blue); }
.tick b { display: block; font-family: var(--head); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.tick span { font-size: .82rem; color: var(--muted); }

/* ---------- Grile ---------- */
.grid { display: grid; gap: 0; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }

/* Coloane despărțite de linii fine — registrul „producător european" */
.ruled { border-top: 1px solid var(--line); }
.ruled > * {
  padding: 34px 30px 34px 0;
  border-right: 1px solid var(--line);
}
.ruled > *:last-child { border-right: 0; }
.ruled > * { padding-left: 30px; }
.ruled > *:first-child { padding-left: 0; }

.num {
  font-family: var(--head); font-size: .78rem; font-weight: 600;
  letter-spacing: .1em; color: var(--line-2); display: block; margin-bottom: 16px;
}
.ruled h3 { margin-bottom: .45em; }
.ruled p { font-size: .95rem; color: var(--muted); }

/* ---------- Bandă foto lată ---------- */
.band { position: relative; background: var(--ink); }
.band img { width: 100%; height: clamp(280px, calc(var(--page) * .30), 500px); object-fit: cover; }
.band__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 0;
  background: linear-gradient(to top, rgba(15,28,46,.88), rgba(15,28,46,0));
  color: #fff;
}
.band__cap p { font-size: .95rem; color: #dbe3ea; max-width: 56ch; }

/* ---------- Elektroline ---------- */
.split {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(36px, 5vw, 72px); align-items: center;
}
.cat-list { border-top: 1px solid var(--line); margin-top: 4px; }
.cat {
  display: grid; grid-template-columns: 30px 1fr;
  gap: 18px; align-items: baseline;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.cat__n { font-family: var(--head); font-size: .8rem; font-weight: 600; color: var(--blue); letter-spacing: .06em; }
.cat h3 { margin-bottom: .28em; font-size: 1.06rem; }
.cat p { font-size: .93rem; color: var(--muted); margin: 0; }

.frame { border: 1px solid var(--line); padding: 10px; background: #fff; }
.frame img { width: 100%; }
.cap { font-size: .8rem; color: var(--muted); margin-top: 12px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.big-link {
  font-family: var(--head); font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  letter-spacing: -.02em; color: #fff; text-decoration: none;
  display: inline-block; margin-top: 4px;
}
.big-link:hover { color: #8dbdea; text-decoration: none; }
.field-lbl { font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); }
.contact-item + .contact-item { margin-top: 34px; }

/* ---------- Subsol ---------- */
main { flex: 1 0 auto; }
.site-footer { flex: none; border-top: 1px solid var(--line); padding: 42px 0; font-size: .88rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.site-footer nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* ---------- Utilitare ---------- */
.mt-1 { margin-top: 14px; } .mt-2 { margin-top: 28px; } .mt-3 { margin-top: 44px; }
.skip { position: absolute; left: 10px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; transition: top .18s; }
.skip:focus { top: 10px; }

.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .ruled > *:nth-child(2) { border-right: 0; }
  .ruled > *:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .ruled > *:nth-child(4) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  :root { --hdr: 68px; --gut: 22px; }
  .brand { gap: 10px; }
  .brand__mark { width: 46px; height: 46px; }
  .brand__name { font-size: .92rem; }
  .brand__sub { display: none; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--hdr) 0 auto 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 22px 22px; box-shadow: 0 18px 40px rgba(15,28,46,.10);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 15px 2px; border-bottom: 1px solid var(--line); }
  .nav a.btn { margin: 18px 0 0; justify-content: center; border-bottom: 1px solid var(--navy); }

  .hero__grid { grid-template-columns: 1fr; min-height: 0; }
  .hero__txt { padding: 44px var(--gut) 40px; order: 2; }
  .hero__img { order: 1; height: 58vw; max-height: 420px; }
  .hero__img::after { display: none; }

  .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .ruled > * { padding: 26px 0 !important; border-right: 0; border-top: 1px solid var(--line); }
  .ruled > *:first-child { border-top: 0; }
  .split { grid-template-columns: 1fr; }
  .split .frame { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer nav { margin-left: 0; }
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Autorizări ---------- */
.auth { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.auth li {
  position: relative;
  padding: 17px 0 17px 30px;
  border-bottom: 1px solid var(--line);
  font-size: .97rem;
}
.auth li::before {
  content: ""; position: absolute; left: 0; top: 1.62em;
  width: 16px; height: 1px; background: var(--blue);
}
.sec--alt .auth li { border-color: #dfe4e9; }

/* ---------- Tabel ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
table.tbl th, table.tbl td { padding: 15px 20px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.tbl thead th {
  background: var(--ink); color: #fff;
  font-family: var(--body); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
}
table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl td:first-child { font-weight: 500; white-space: nowrap; color: var(--ink); }

/* ---------- Antet pagini interioare ---------- */
.subhead { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: clamp(44px, 6vw, 80px) 0 clamp(36px, 5vw, 60px); }
.crumbs { font-size: .84rem; color: var(--muted); margin: 0 0 16px; }
.crumbs a { color: var(--muted); }
.crumbs span { opacity: .45; margin: 0 8px; }

/* ---------- Aliniere stânga-dreapta (justify) pentru textele curente ----------
   Se exclud etichetele scurte: supratitluri, firimituri, legendele de imagine.
   hyphens:auto reduce spațiile mari dintre cuvinte (funcționează cu lang="ro"). */
main p:not(.eyebrow):not(.crumbs):not(.cap):not(.field-lbl),
.auth li {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---------- Schița în creion, pe trei coloane ----------
   Desenul e decorativ (alt=""), stă în prima coloană, textul la mijloc,
   fotografia în dreapta. */
.trio {
  display: grid;
  grid-template-columns: .78fr 1.30fr 1.02fr;
  gap: clamp(24px, 3vw, 46px);
  align-items: center;
}
.trio__schita img { width: 100%; }

@media (max-width: 1000px) {
  .trio { grid-template-columns: 1fr 1fr; }
  .trio__schita { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .trio { grid-template-columns: 1fr; }
  .trio__schita { grid-column: auto; order: 3; }
  .trio .frame { order: 2; }
}

/* ---------- Pagini scurte ----------
   Ultima secțiune crește până la subsol, ca pagina să nu se termine cu o bandă
   albă goală pe ecranele înalte. Folosită la contact și la 404. */
.page-fill main { display: flex; flex-direction: column; }
.page-fill main > :last-child { flex: 1 0 auto; }

/* ---------- Pagina de componente ---------- */
.piese {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 3vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 3vw, 44px);
}
.piesa__img {
  background: var(--paper-2);
  border: 1px solid var(--line);
  margin-bottom: 22px;
}
/* inaltimea sta pe imagine, nu pe casetă: procentele nu se rezolvă fiabil
   pentru un <img> aflat într-o casetă cu înălțime dată. */
.piesa__img img,
.piesa__img:empty {
  display: block;
  width: 100%;
  height: clamp(190px, 17vw, 250px);
  object-fit: contain;
  padding: 18px;
}
/* pe pagina de componente titlurile fișelor sunt h2, dar păstrează mărimea de h3 */
.piesa h2 { font-size: 1.16rem; letter-spacing: -.012em; margin-bottom: .4em; }
.piesa p { font-size: .95rem; color: var(--muted); margin: 0; }

@media (max-width: 1000px) { .piese { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .piese { grid-template-columns: 1fr; } }
