/* =====================================================================
   FABRICA DE FIRME - Stil custom peste Bootstrap 5.3
   Design: modern minimalist, accente portocalii #FF5722
   ===================================================================== */

:root {
  --ff-primary: #FF5722;
  --ff-primary-dark: #E64A19;
  --ff-primary-light: #FFCCBC;
  --ff-dark: #1A1A1A;
  --ff-gray: #6C757D;
  --ff-gray-light: #F8F9FA;
  --ff-border: #E5E7EB;
  --ff-success: #10B981;
  --ff-danger: #EF4444;
  --ff-radius: 10px;
  --ff-radius-lg: 16px;
  --ff-shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --ff-shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --ff-shadow-lg: 0 10px 30px rgba(0,0,0,.1);
  --ff-transition: .2s ease;
  --ff-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Suprascrie variabilele Bootstrap */
.btn-primary { --bs-btn-bg: var(--ff-primary); --bs-btn-border-color: var(--ff-primary); --bs-btn-hover-bg: var(--ff-primary-dark); --bs-btn-hover-border-color: var(--ff-primary-dark); --bs-btn-active-bg: var(--ff-primary-dark); --bs-btn-active-border-color: var(--ff-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--ff-primary); --bs-btn-border-color: var(--ff-primary); --bs-btn-hover-bg: var(--ff-primary); --bs-btn-hover-border-color: var(--ff-primary); --bs-btn-active-bg: var(--ff-primary-dark); }
.text-primary { color: var(--ff-primary) !important; }
.bg-primary { background-color: var(--ff-primary) !important; }
.border-primary { border-color: var(--ff-primary) !important; }
.link-primary { color: var(--ff-primary) !important; }
a { color: var(--ff-primary); text-decoration: none; transition: color var(--ff-transition); }
a:hover { color: var(--ff-primary-dark); }

/* -------- Baza -------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-font);
  color: var(--ff-dark);
  background: #fff;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--ff-dark); }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.2; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); line-height: 1.3; }
p { color: #374151; }
.lead { font-size: 1.125rem; color: #4B5563; }

/* -------- Navbar -------- */
.fdf-navbar {
  background: #fff;
  border-bottom: 1px solid var(--ff-border);
  padding: .75rem 0;
  transition: box-shadow var(--ff-transition);
  z-index: 1030;
}
.fdf-navbar.scrolled { box-shadow: var(--ff-shadow-sm); }
.fdf-navbar .navbar-brand img { height: 44px; width: auto; }
.fdf-navbar .nav-link {
  font-weight: 500;
  color: var(--ff-dark);
  padding: .5rem 1rem !important;
  border-radius: 6px;
  transition: color var(--ff-transition), background var(--ff-transition);
}
.fdf-navbar .nav-link:hover,
.fdf-navbar .nav-link:focus,
.fdf-navbar .nav-link.active { color: var(--ff-primary); background: #FFF5F2; }
.fdf-navbar .dropdown-menu {
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  box-shadow: var(--ff-shadow-lg);
  padding: .5rem;
  /* margin-top 0 + padding-top transparent bridge — evita gap-ul care declanseaza mouseleave */
  margin-top: 0;
  padding-top: .75rem;
}
/* Punte invizibila deasupra dropdown-ului ca cursorul sa nu paraseasca zona hover */
.fdf-navbar .dropdown-menu::before {
  content: '';
  position: absolute;
  top: -.5rem;
  left: 0;
  right: 0;
  height: .5rem;
}
.fdf-navbar .dropdown-item {
  border-radius: 6px;
  padding: .55rem .75rem;
  font-weight: 500;
  white-space: normal;
}
.fdf-navbar .dropdown-item:hover,
.fdf-navbar .dropdown-item:focus { background: #FFF5F2; color: var(--ff-primary); }
.fdf-navbar .dropdown-submenu { position: relative; }
@media (min-width: 992px) {
  .fdf-navbar .dropdown-submenu .dropdown-menu {
    top: 0; left: 100%; margin-top: -.5rem; margin-left: 0;
    min-width: 420px;
  }
  /* Punte invizibila laterala pentru submeniu — acopera spatiul dintre item si panou */
  .fdf-navbar .dropdown-submenu .dropdown-menu::before {
    top: 0; bottom: 0; left: -.5rem; right: auto;
    width: .5rem; height: 100%;
  }
  .fdf-navbar .dropdown-submenu > .dropdown-item::after {
    content: "›"; float: right; font-weight: 700; color: var(--ff-gray); margin-left: .5rem;
  }
}

/* CTA din navbar */
.fdf-navbar .btn-nav-cta {
  background: var(--ff-primary);
  color: #fff;
  font-weight: 600;
  padding: .6rem 1.25rem;
  border-radius: 8px;
  transition: background var(--ff-transition), transform var(--ff-transition);
}
.fdf-navbar .btn-nav-cta:hover { background: var(--ff-primary-dark); color: #fff; transform: translateY(-1px); }

/* -------- Hero -------- */
.fdf-hero {
  background: linear-gradient(135deg, #FFF9F5 0%, #FFFFFF 60%);
  padding: clamp(3rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}
.fdf-hero-title { font-weight: 800; letter-spacing: -0.02em; }
.fdf-hero-title .accent { color: var(--ff-primary); }
.fdf-hero-subtitle { font-size: 1.15rem; color: #4B5563; margin: 1rem 0 2rem; }
.fdf-hero-stats { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 2.5rem; }
.fdf-hero-stats .stat-num { font-size: 2rem; font-weight: 800; color: var(--ff-primary); line-height: 1; }
.fdf-hero-stats .stat-label { color: var(--ff-gray); font-size: .9rem; margin-top: .25rem; }

/* -------- Cards -------- */
.fdf-card {
  background: #fff;
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-lg);
  padding: 1.75rem;
  height: 100%;
  transition: transform var(--ff-transition), box-shadow var(--ff-transition), border-color var(--ff-transition);
}

#functionare .fdf-card  {min-height: 220px;}

.fdf-card:hover { transform: translateY(-4px); box-shadow: var(--ff-shadow-md); border-color: var(--ff-primary-light); }
.fdf-card .icon-wrap {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: #FFF5F2; border-radius: 12px; color: var(--ff-primary); margin-bottom: 1rem;
  font-size: 1.5rem;
}
.fdf-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.fdf-card p { color: var(--ff-gray); margin: 0; }
.fdf-card .stretched-link::after { border-radius: var(--ff-radius-lg); }

/* Service grid card with link */
.fdf-service-card {
  display: flex; flex-direction: column;
  gap: .5rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius);
  transition: all var(--ff-transition);
  position: relative;
  height: 100%;
}
.fdf-service-card:hover { border-color: var(--ff-primary); box-shadow: var(--ff-shadow-md); transform: translateY(-2px); }
.fdf-service-card h3 { font-size: 1.1rem; color: var(--ff-dark); margin: 0; }
.fdf-service-card p { color: var(--ff-gray); font-size: .925rem; margin: 0; flex-grow: 1; }
.fdf-service-card .price { color: var(--ff-primary); font-weight: 700; }
.fdf-service-card .arrow { color: var(--ff-primary); font-weight: 600; margin-top: .5rem; }

/* -------- Sections -------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--ff-gray-light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 3rem; }
.section-eyebrow { color: var(--ff-primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: .85rem; margin-bottom: .5rem; }

/* -------- Footer -------- */
.fdf-footer {
  background: var(--ff-dark);
  color: #D1D5DB;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
.fdf-footer h5 { color: #fff; font-size: 1rem; margin-bottom: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.fdf-footer a { color: #D1D5DB; transition: color var(--ff-transition); }
.fdf-footer a:hover { color: var(--ff-primary); }
.fdf-footer ul { list-style: none; padding: 0; margin: 0; }
.fdf-footer ul li { margin-bottom: .5rem; }
.fdf-footer .brand img { height: 50px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.fdf-footer .social a {
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); border-radius: 50%; margin-right: .5rem;
  transition: background var(--ff-transition);
}
.fdf-footer .social a:hover { background: var(--ff-primary); color: #fff; }
.fdf-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: .875rem;
  color: #9CA3AF;
}

/* -------- Wizard -------- */
.wizard-container { max-width: 860px; margin: 0 auto; }
.wizard-progress {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 3rem; gap: .5rem; overflow-x: auto;
}
.wizard-step-indicator {
  display: flex; flex-direction: column; align-items: center;
  flex: 1; min-width: 60px; position: relative;
}
.wizard-step-indicator .circle {
  width: 34px; height: 34px; border-radius: 50%;
  background: #E5E7EB; color: var(--ff-gray);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  transition: all var(--ff-transition);
  position: relative; z-index: 2;
}
.wizard-step-indicator.active .circle { background: var(--ff-primary); color: #fff; }
.wizard-step-indicator.done .circle { background: var(--ff-success); color: #fff; }
.wizard-step-indicator .label { font-size: .7rem; color: var(--ff-gray); margin-top: .5rem; text-align: center; }
.wizard-step-indicator.active .label,
.wizard-step-indicator.done .label { color: var(--ff-dark); font-weight: 600; }
.wizard-step-indicator:not(:last-child)::after {
  content: ''; position: absolute; top: 17px; left: 50%; width: 100%; height: 2px;
  background: #E5E7EB; z-index: 1;
}
.wizard-step-indicator.done:not(:last-child)::after { background: var(--ff-success); }

.wizard-step-panel {
  background: #fff; border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-lg); padding: 2rem; box-shadow: var(--ff-shadow-sm);
}
.wizard-step-panel h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.wizard-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 2rem; gap: 1rem; flex-wrap: wrap;
}

.form-info {
  background: #FFF9F5; border-left: 3px solid var(--ff-primary);
  padding: .75rem 1rem; border-radius: 6px; font-size: .925rem;
  color: #4B5563; margin-bottom: 1rem;
}

.page-contact .fdf-card {max-height: 280px !important;}

/* -------- Float CTA -------- */
.float-cta {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1040;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--ff-primary); color: #fff;
  padding: .85rem 1.25rem; border-radius: 50px;
  font-weight: 600; box-shadow: var(--ff-shadow-lg);
  transition: transform var(--ff-transition), background var(--ff-transition);
}
.float-cta:hover { background: var(--ff-primary-dark); color: #fff; transform: scale(1.03); }

/* -------- Cookie banner -------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem;
  max-width: 720px; margin: 0 auto; padding: 1.25rem 1.5rem;
  background: #fff; border: 1px solid var(--ff-border); border-radius: var(--ff-radius-lg);
  box-shadow: var(--ff-shadow-lg); z-index: 1050;
  display: none; /* controlat prin JS */
}
.cookie-banner.show { display: block; }
.cookie-banner h5 { font-size: 1rem; margin-bottom: .5rem; }
.cookie-banner p { font-size: .875rem; color: var(--ff-gray); margin: 0 0 1rem; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* -------- Breadcrumbs -------- */
.breadcrumb-wrap { background: var(--ff-gray-light); border-bottom: 1px solid var(--ff-border); }
.breadcrumb-wrap .breadcrumb-item a { color: var(--ff-gray); }
.breadcrumb-wrap .breadcrumb-item.active { color: var(--ff-dark); font-weight: 500; }

/* -------- Utilitati -------- */
.rounded-lg { border-radius: var(--ff-radius-lg) !important; }
.shadow-sm-custom { box-shadow: var(--ff-shadow-sm); }
.text-orange { color: var(--ff-primary); }
.bg-light-warm { background: #FFF9F5; }
.divider-line {
  width: 60px; height: 3px; background: var(--ff-primary);
  margin: 1rem auto 2rem; border-radius: 3px;
}

.fdf-footer p {color:#FFF;}

/* -------- Responsive tweaks -------- */
@media (max-width: 991.98px) {
  .fdf-navbar .navbar-collapse {
    background: #fff; padding: 1rem; border-top: 1px solid var(--ff-border);
    margin: 0 -1rem -.75rem;
  }
  .fdf-navbar .dropdown-menu {
    box-shadow: none; border: 0; padding-left: 1rem; margin-top: 0;
  }
  .wizard-step-indicator .label { display: none; }
  .float-cta span { display: none; }
  .float-cta { padding: .85rem; }
}

/* Print-friendly */
@media print {
  .fdf-navbar, .fdf-footer, .float-cta, .cookie-banner { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Animatii subtile */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
.fade-up-2 { animation: fadeUp .6s .1s ease both; }
.fade-up-3 { animation: fadeUp .6s .2s ease both; }

/* Focus states (accesibilitate) */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--ff-primary-light);
  outline-offset: 2px;
}

/* -------- Wizard sidebar + stepper (M7) -------- */
.wizard-sidebar { position: sticky; top: 90px; }
.wizard-stepper { counter-reset: wiz; }
.wizard-stepper .wizard-step { position: relative; }
.wizard-stepper .wizard-step + .wizard-step { margin-top: .5rem; }
.wizard-stepper .wizard-step a,
.wizard-stepper .wizard-step > span {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: 10px;
  color: var(--ff-dark); text-decoration: none;
  transition: background var(--ff-transition), color var(--ff-transition);
}
.wizard-stepper .wizard-step a:hover { background: #FFF9F5; color: var(--ff-primary-dark); }
.wizard-stepper .wizard-step-bubble {
  width: 32px; height: 32px; flex-shrink: 0;
  background: #E5E7EB; color: var(--ff-gray);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
}
.wizard-stepper .wizard-step-done .wizard-step-bubble { background: var(--ff-success, #22C55E); color: #fff; }
.wizard-stepper .wizard-step-active .wizard-step-bubble { background: var(--ff-primary); color: #fff; box-shadow: 0 0 0 4px rgba(255,87,34,.15); }
.wizard-stepper .wizard-step-active a,
.wizard-stepper .wizard-step-active > span { background: #FFF9F5; font-weight: 600; }
.wizard-stepper .wizard-step-locked > span { color: #9CA3AF; cursor: not-allowed; }
.wizard-stepper .wizard-step-locked .wizard-step-bubble { opacity: .6; }
.wizard-stepper .wizard-step-body small { font-size: .78rem; }

.wizard-resume { border: 1px dashed var(--ff-border); }

.wizard-content .wizard-step-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: #FFF3EC; color: var(--ff-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}

.person-row { transition: box-shadow var(--ff-transition); }
.person-row:hover { box-shadow: var(--ff-shadow-sm); }

/* radio "card" selection (pas 2) */
.fdf-choice-group { display: grid; gap: .75rem; }
.fdf-choice {
  display: block; cursor: pointer;
  padding: 1rem 1.1rem; border: 2px solid var(--ff-border);
  border-radius: 12px; transition: all var(--ff-transition);
  background: #fff;
}
.fdf-choice:hover { border-color: var(--ff-primary-light); }
.fdf-choice input { display: none; }
.fdf-choice-title { font-weight: 600; display: block; margin-bottom: .25rem; }
.fdf-choice-desc { color: var(--ff-gray); display: block; font-size: .875rem; }
.fdf-choice.is-selected { border-color: var(--ff-primary); background: #FFF9F5; }
.fdf-choice.is-selected .fdf-choice-title { color: var(--ff-primary-dark); }

.wizard-errors ul { padding-left: 1.25rem; }

@media (max-width: 991.98px) {
  .wizard-sidebar { position: static; }
}
