/* ============================================================
   Dezmembrări Opel & VAG Cluj — styles.css
   Paletă "Elegant Classic": primar #1E40AF, secundar #64748B
   Mobile-first · WCAG 2.1 AA
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Brand — primar (albastru) */
  --primary-900: #16307e;
  --primary-800: #1a3794;
  --primary-700: #1E40AF; /* primar de bază */
  --primary-600: #2a4fc4;
  --primary-500: #3b5fd4;
  --primary-100: #e5ebfb;
  --primary-050: #f2f5fe;

  /* Brand — secundar (gri ardezie) */
  --slate-900: #1f2733;
  --slate-700: #3f4a5a;
  --slate-600: #64748B; /* secundar de bază */
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-050: #f8fafc;

  /* Suprafețe & text */
  --bg: #ffffff;
  --bg-alt: var(--slate-050);
  --surface: #ffffff;
  --border: var(--slate-200);
  --text: #0f172a;       /* contrast ~16:1 pe alb */
  --text-muted: #475569; /* contrast ~7:1 pe alb */
  --text-on-primary: #ffffff;

  /* Stări */
  --focus: #f59e0b;
  --error: #b91c1c;
  --success: #15803d;

  /* Formă & spațiere */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 44px rgba(15, 23, 42, .14);

  --container: 1120px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6rem);

  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;

  /* Easing — autorat, exponential ease-out */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Suprafețe de browser temate din paletă */
::selection { background: var(--primary-700); color: #fff; }
:root { accent-color: var(--primary-700); caret-color: var(--primary-700); }
* { scrollbar-color: var(--slate-400) transparent; }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-thumb { background: var(--slate-400); border: 3px solid var(--bg); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--slate-600); }
.hero-trust dt { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* Un singur moment autorat: intrarea secțiunilor */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; padding: 0; }

/* ---------- Helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 1000;
  background: var(--primary-700);
  color: var(--text-on-primary);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* Focus visibil pe toate elementele interactive */
:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Butoane ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform .12s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary-700); color: var(--text-on-primary); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--primary-800); box-shadow: var(--shadow); }
.btn-secondary { background: transparent; color: var(--primary-700); border-color: var(--primary-700); }
.btn-secondary:hover { background: var(--primary-050); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  background: var(--primary-700);
  color: var(--text-on-primary);
  font-weight: 800;
  letter-spacing: .02em;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; }
.brand-city { font-size: .8rem; color: var(--text-muted); font-weight: 500; }

/* Navigație */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px; height: 48px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bar { display: block; width: 22px; height: 2px; margin-inline: auto; background: var(--text); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
  position: fixed;
  inset: 68px 0 auto 0;
  display: grid;
  gap: .25rem;
  padding: 1rem var(--gutter) 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateY(-120%);
  transition: transform .25s ease;
}
.nav-menu.open { transform: translateY(0); }
.nav-menu a {
  display: block;
  padding: .85rem .5rem;
  min-height: 44px;
  text-decoration: none;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.nav-menu a:hover { background: var(--slate-100); }
.nav-cta {
  margin-top: .25rem;
  text-align: center;
  background: var(--primary-700);
  color: var(--text-on-primary) !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(30, 64, 175, .35);
}
.nav-cta:hover { background: var(--primary-800) !important; box-shadow: 0 4px 12px rgba(30, 64, 175, .45); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: var(--text-on-primary);
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(160deg, var(--primary-800), var(--primary-700) 55%, var(--primary-600));
  padding-block: clamp(3.5rem, 10vw, 6.5rem);
  overflow: hidden;
}
.hero-inner { max-width: 820px; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6.8vw, 4rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.04em;
  text-wrap: balance;
  margin-bottom: 1.1rem;
}
.hero-subtitle { font-size: clamp(1.08rem, 2.5vw, 1.3rem); color: #e7ecff; max-width: 60ch; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.hero .btn-secondary { color: #fff; border-color: rgba(255,255,255,.7); }
.hero .btn-secondary:hover { background: rgba(255,255,255,.12); }
.btn-icon { flex: none; }

.hero-trust {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.18);
  max-width: 640px;
}
.hero-trust div { display: flex; flex-direction: column; gap: .15rem; }
.hero-trust dt { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; }
.hero-trust dd { font-size: .9rem; color: #c7d2fe; }

/* ---------- Secțiuni generice ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.8vw, 2.75rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.035em;
  text-wrap: balance;
  color: var(--slate-900);
}
.section-lead { margin-top: .9rem; color: var(--text-muted); font-size: 1.08rem; line-height: 1.6; max-width: 62ch; }
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: var(--primary-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}
.inline-link:hover { color: var(--primary-800); }

/* ---------- Despre / feature grid ---------- */
.feature-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), border-color .25s var(--ease-out);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-100); }
.feature-icon {
  flex: none;
  width: 22px; height: 22px;
  color: var(--primary-700);
  vertical-align: -3px;
  margin-right: .5rem;
}
.feature-card h3 {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--slate-900);
  margin-bottom: .5rem;
}
.feature-card p { color: var(--text-muted); }

/* ---------- Galerie ---------- */
.gallery-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  color: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-item picture,
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item img { transition: transform .4s var(--ease-out); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item span {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 2;
  margin: 1rem;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  text-shadow: 0 1px 10px rgba(0,0,0,.6);
}
.gallery-item::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(10,15,30,.82) 0%, rgba(10,15,30,.5) 22%, rgba(10,15,30,.12) 48%, transparent 70%);
  pointer-events: none;
}

/* ---------- Recenzii ---------- */
.testimonial-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stars { color: #f59e0b; letter-spacing: .1em; font-size: 1.05rem; }
.testimonial-card blockquote { color: var(--text); font-size: 1.02rem; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; color: var(--text-muted); font-size: .92rem; font-style: normal; }
.avatar {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  background: var(--primary-100);
  color: var(--primary-800);
  font-weight: 700;
  font-size: .82rem;
  border-radius: 50%;
}

/* ---------- Hartă ---------- */
.map-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-wrap iframe { width: 100%; height: 340px; border: 0; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
.contact-list { display: grid; gap: 1rem; margin-top: 1.5rem; }
.contact-list li { display: flex; flex-direction: column; }
.contact-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.contact-list a { color: var(--primary-700); font-weight: 600; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: var(--shadow);
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .95rem; }
.field input,
.field textarea {
  font: inherit;
  width: 100%;
  min-height: 48px;
  padding: .7rem .85rem;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus,
.field textarea:focus {
  border-color: var(--primary-700);
  box-shadow: 0 0 0 3px var(--primary-100);
  outline: none;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .85rem; font-weight: 500; }
.form-status { font-weight: 600; }
.form-status.ok { color: var(--success); }
.form-status.err { color: var(--error); }
.form-honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-900); color: #e2e8f0; padding-block: 2.5rem; }
.footer-inner { display: grid; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-brand .brand-mark { background: var(--primary-600); }
.footer-name { font-weight: 700; color: #fff; }
.footer-tagline { font-size: .9rem; color: var(--slate-400); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: #cbd5e1; text-decoration: none; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-copy { font-size: .85rem; color: var(--slate-400); }

/* ---------- WhatsApp flotant ---------- */
.whatsapp-float {
  position: fixed;
  right: clamp(1rem, 4vw, 1.75rem);
  bottom: clamp(1rem, 4vw, 1.75rem);
  z-index: 200;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, box-shadow .2s ease;
}
.whatsapp-float:hover { transform: scale(1.06); }
.whatsapp-float:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ---------- Înapoi sus ---------- */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 4vw, 1.75rem);
  bottom: calc(clamp(1rem, 4vw, 1.75rem) + 56px + .75rem);
  z-index: 200;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  padding: 0;
  color: var(--primary-700);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), background-color .2s ease, color .2s ease;
}
.back-to-top.is-visible { opacity: 1; transform: none; }
.back-to-top:hover { background: var(--primary-700); color: #fff; }
.back-to-top:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ============================================================
   Breakpoints
   ============================================================ */

/* ---- ≥ 768px (tabletă) ---- */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    inset: auto;
    display: flex;
    align-items: center;
    gap: .25rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform: none;
  }
  .nav-menu a { padding: .6rem .85rem; }
  .nav-cta { margin-top: 0; margin-left: .5rem; padding: .6rem 1.2rem; }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-trust { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .contact-layout { grid-template-columns: 1fr 1fr; align-items: start; }
  .map-wrap iframe { height: 420px; }
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer-copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem; }
}

/* ---- ≥ 1024px (desktop) ---- */
@media (min-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-layout { grid-template-columns: 1fr 1.1fr; gap: 3.5rem; }
}
