/* carom-sa.ro – stiluri site public. Teme: luminoasă, întunecată, automat (după dispozitiv). 2026-10-23 */
:root {
  --bg: #ffffff; --bg-alt: #f3f6fb; --surface: #ffffff; --surface-2: #eef3fb;
  --text: #16202e; --muted: #556275; --line: #dde4ee;
  --brand: #2f6fd6; --brand-ink: #ffffff; --brand-soft: #e5eefc; --brand-text: #1f58b5;
  --hero-1: #0f2a55; --hero-2: #2f6fd6; --hero-text: #ffffff;
  --shadow: 0 1px 2px rgba(16, 32, 60, .06), 0 8px 24px rgba(16, 32, 60, .06);
  --radius: 14px; --ok: #1d7a46; --err: #b42318;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1724; --bg-alt: #131d2d; --surface: #172235; --surface-2: #1d2a40;
    --text: #e7edf6; --muted: #9eacc0; --line: #283750;
    --brand: #5b95f0; --brand-ink: #0b1220; --brand-soft: #1c2d4a; --brand-text: #8db6f7;
    --hero-1: #0b1a33; --hero-2: #173d7a; --hero-text: #f2f6fc;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --ok: #4cc985; --err: #ff8a7a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1724; --bg-alt: #131d2d; --surface: #172235; --surface-2: #1d2a40;
  --text: #e7edf6; --muted: #9eacc0; --line: #283750;
  --brand: #5b95f0; --brand-ink: #0b1220; --brand-soft: #1c2d4a; --brand-text: #8db6f7;
  --hero-1: #0b1a33; --hero-2: #173d7a; --hero-text: #f2f6fc;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --ok: #4cc985; --err: #ff8a7a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img { max-width: 100%; height: auto; }
a { color: var(--brand-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.btn { display: inline-flex; align-items: center; gap: .5em; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand);
  padding: .7em 1.15em; border-radius: 10px; font: 600 15px/1.2 var(--font); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--brand-text); border-color: currentColor; }
.linklike { background: none; border: 0; padding: 0; color: var(--brand-text); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; gap: .4em; align-items: center; }

/* Bara de sus */
.topbar { background: var(--hero-1); color: #cfdcf2; font-size: 14px; }
.topbar .wrap { display: flex; gap: 22px; align-items: center; min-height: 38px; flex-wrap: wrap; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.topbar a:hover { color: #fff; }
.topbar .hours { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }

/* Antet */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 84px; }
.brand { display: flex; flex-direction: column; text-decoration: none; }
.brand img { width: 170px; display: block; }
.brand-sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; text-align: center; }
.brand img.logo-dark, img.logo-dark { display: none; }
:root[data-theme="dark"] img.logo-light { display: none; }
:root[data-theme="dark"] img.logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) img.logo-light { display: none; }
  :root:not([data-theme="light"]) img.logo-dark { display: block; }
}
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--brand-text); background: var(--brand-soft); }
.header-tools { display: flex; gap: 6px; align-items: center; }
.theme-btn, .menu-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 20px; }
.theme-btn:hover, .menu-btn:hover { background: var(--surface-2); }
.theme-btn span { display: none; line-height: 0; }
.theme-btn[data-mode="light"] [data-i="light"], .theme-btn[data-mode="dark"] [data-i="dark"], .theme-btn[data-mode="auto"] [data-i="auto"],
.theme-btn:not([data-mode]) [data-i="auto"] { display: block; }
.menu-btn { display: none; }
.theme-wrap { position: relative; }
.theme-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 230px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; }
.theme-menu[hidden] { display: none; }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 8px; padding: 9px 10px;
  font: 15px var(--font); color: var(--text); cursor: pointer; text-align: left; }
.theme-menu button:hover { background: var(--surface-2); }
.theme-menu button[aria-checked="true"] { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.theme-menu .ic { font-size: 20px; }

/* Hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, var(--hero-2), transparent 60%), var(--hero-1); color: var(--hero-text); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; padding: 72px 20px 80px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 48px); }
.hero .lead { font-size: 19px; color: color-mix(in srgb, var(--hero-text) 82%, transparent); max-width: 40em; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 600; opacity: .8; margin: 0 0 12px; }
.hero-note { margin: 10px 0 0; font-size: 14px; color: rgba(255, 255, 255, .78); } /* pe fundalul închis al hero-ului */
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 16px; }
.hero .btn { background: #fff; color: #10306a; border-color: #fff; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero .linklike { color: #cfe0ff; }
.hero-card { display: grid; gap: 14px; }
.stat { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; align-items: baseline; }
.stat strong { font-size: 26px; white-space: nowrap; }
.stat span { opacity: .85; }

.page-hero { background: linear-gradient(180deg, var(--brand-soft), var(--bg)); border-bottom: 1px solid var(--line); }
.page-hero .wrap { padding: 52px 20px 36px; }
.page-hero h1 { font-size: clamp(28px, 3.6vw, 40px); }
.page-hero .lead { color: var(--muted); font-size: 18px; max-width: 46em; margin: 0; }

.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-title { font-size: 28px; margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  color: inherit; text-decoration: none; display: flex; flex-direction: column; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.card h3 { font-size: 18px; margin: 14px 0 6px; }
.card p { color: var(--muted); margin: 0 0 14px; flex: 1; }
.card-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); font-size: 24px; }
.more { color: var(--brand-text); font-weight: 600; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }

.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.steps { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.steps ol { padding-left: 1.2em; margin: 0 0 18px; }
.steps li { margin-bottom: 8px; }
.prose { font-size: 17px; }
.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 22px; margin-top: 1.6em; }
.prose .notice, .notice { background: var(--surface-2); border-left: 4px solid var(--brand); padding: 12px 16px; border-radius: 8px; font-size: 15px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.service h2 { margin-top: 0 !important; font-size: 21px; }
.service p:last-child { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips a { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; text-decoration: none; color: var(--text); font-size: 14px; }
.chips a:hover { border-color: var(--brand); color: var(--brand-text); }

.docs { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.docs a { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; color: var(--text); text-decoration: none; font-size: 20px; }
.docs a:hover { border-color: var(--brand); }
.docs a .ic:first-child { color: var(--brand-text); }
.docs span { flex: 1; font-size: 16px; }
.docs small { color: var(--muted); font-size: 13px; white-space: nowrap; }
.legislatie h2, .p-legislatie .wrap > h2 { margin-top: 28px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 32px; align-items: start; }
.contact-cards { display: grid; gap: 12px; }
.ccard { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; font-size: 22px; color: var(--brand-text); }
.ccard h3 { font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
.ccard p { margin: 0; font-size: 17px; color: var(--text); }
.lead-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.lead-form h2 { margin: 0; }
.lead-form p { margin: 0; color: var(--muted); }
.lead-form label { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
.lead-form input, .lead-form select, .lead-form textarea, .ai-form textarea {
  font: 16px/1.4 var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
.lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); }
.lead-form .check input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.lead-form .btn { justify-self: start; }
.hp { position: absolute !important; left: -9999px; }
.form-msg.ok { color: var(--ok); } .form-msg.err { color: var(--err); }
.map { margin-top: 32px; border: 1px dashed var(--line); border-radius: var(--radius); min-height: 220px; display: grid; place-items: center; text-align: center; gap: 10px; padding: 24px; color: var(--muted); background: var(--bg-alt); }
.map iframe { width: 100%; height: 380px; border: 0; border-radius: var(--radius); }
.map.loaded { padding: 0; border: 0; }

/* Subsol */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); margin-top: 24px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 24px; }
.site-footer h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--text); }
.site-footer a, .site-footer .linklike { color: var(--muted); }
.site-footer a:hover { color: var(--brand-text); }
.copy { border-top: 1px solid var(--line); padding-top: 16px; padding-bottom: 96px; font-size: 13px; }

/* Cookie */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; z-index: 60; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .2); padding: 18px 20px; }
.cookie p { margin: 0 0 12px; font-size: 15px; }
.cookie-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Asistent */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 10px; background: var(--brand); color: var(--brand-ink);
  border: 0; border-radius: 999px; padding: 14px 20px; font: 600 15px var(--font); box-shadow: 0 10px 30px rgba(20, 60, 140, .35); cursor: pointer; }
.ai-fab .ic { font-size: 22px; }
.ai-panel { position: fixed; right: 20px; bottom: 20px; z-index: 55; width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 40px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .28);
  display: flex; flex-direction: column; overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--hero-1); color: #fff; }
.ai-head small { display: block; opacity: .75; font-size: 12px; }
.ai-x { background: transparent; border: 0; color: #fff; font-size: 22px; cursor: pointer; line-height: 0; padding: 6px; border-radius: 8px; }
.ai-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-alt); }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.5; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.me { background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.typing { color: var(--muted); font-style: italic; }
.msg a { color: var(--brand-text); }
.msg .fb { display: flex; gap: 6px; margin-top: 6px; }
.msg .fb button { background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; padding: 2px 8px; color: var(--muted); }
.msg .fb button.on { border-color: var(--brand); color: var(--brand-text); }
.ai-examples { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ai-examples button { background: var(--surface); border: 1px solid var(--brand); color: var(--brand-text); border-radius: 999px; padding: 6px 12px;
  font: 14px var(--font); cursor: pointer; text-align: left; }
.ai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.ai-form textarea { resize: none; max-height: 120px; }
.ai-mic, .ai-send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  display: grid; place-items: center; cursor: pointer; font-size: 20px; }
.ai-send { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.ai-mic.rec { background: var(--err); color: #fff; border-color: var(--err); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--err) 25%, transparent); } }
.ai-foot { display: flex; justify-content: space-between; gap: 10px; padding: 0 12px 10px; font-size: 13px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.ai-foot label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .about, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { padding: 48px 20px 56px; gap: 28px; }
}
@media (max-width: 820px) {
  .menu-btn { display: grid; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .header-tools { margin-left: auto; }
  .topbar .hours { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .cards, .row2 { grid-template-columns: 1fr; }
  .topbar .wrap { gap: 14px; font-size: 13px; }
  .topbar .hours { display: none; } /* 2026-10-23: pe mobil rămân e-mailul și „Vreau să fiu contactat” */
  .ai-fab { right: 14px; bottom: 14px; padding: 12px 16px; gap: 8px; font-size: 15px; } /* textul „Asistență” rămâne vizibil și pe mobil (cerere Alin) */
  .ai-panel { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; }
  .hero-grid { padding: 40px 16px 48px; }
  .page-hero .wrap { padding: 36px 16px 28px; }
  .section { padding: 40px 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Asistentul de administrare: altă culoare și icoană (2026-10-23) */
.ai-fab.ai-admin { background: #1f4e79; color: #fff; }
.ai-panel.ai-admin .ai-head { background: #1f4e79; }
.ai-panel.ai-admin .ai-head .ic { vertical-align: -5px; margin-right: 4px; }
.ai-examples .ai-all { font-weight: 600; }

/* Documente atașate la formularul de contact (2026-10-23) */
.file-field { display: grid; gap: 8px; }
.file-label { font-weight: 500; font-size: 15px; }
.lead-form .file-drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px; border: 2px dashed var(--line); border-radius: 12px; color: var(--brand-text, var(--brand)); font-weight: 600; cursor: pointer; text-align: center; }
.lead-form .file-drop:hover, .lead-form .file-drop:focus-within { border-color: var(--brand); background: var(--brand-soft); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.lead-form .file-hint { font-size: 13px; line-height: 1.45; }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: var(--surface-2, transparent); }
.file-list .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .fs { color: var(--muted); white-space: nowrap; font-size: 13px; }
.file-list button { border: 0; background: none; color: var(--err, #c0392b); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }

/* Pagina Legislație: legi în vigoare cu linkuri oficiale (2026-10-23) */
.prose ul.laws { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.prose ul.laws li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.5; }
.prose ul.laws li::before { content: none; }
.prose ul.laws a { text-decoration: none; }
.prose ul.laws a:hover strong { text-decoration: underline; }

/* Subsol: link Facebook (2026-10-23) */
.site-footer .social a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 500; }
