/* MGraphics — Wycena (quote wizard)
   Tokens from design.md (Section 2):
   --brand:#ed1c24  --brand-hover:#e6121a
   --text:#262626   --muted:#666     --muted-soft:#b3b3b3
   --bg:#ffffff     --bg-alt:#F7F7F7 --border:#ececec --border-strong:#d9d9d9
*/

/* Full-width stage — breaks out of the Elementor column container
   so the animated background covers the entire row width (viewport).
   Relies on body{overflow-x:hidden} (theme already sets this). */
.mg-wyc-stage{
  position:relative;
  isolation:isolate;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  padding:70px calc(50vw - 50%);
  overflow:hidden;
}

/* Neutralise Elementor wrapper paddings around the stage so no
   white strip appears above / below the animated background. */
.elementor-widget-wrap:has(.mg-wyc-stage){
  padding-top:0 !important;
  padding-bottom:0 !important;
}
.elementor-widget-shortcode:has(.mg-wyc-stage){
  margin:0 !important;
}

.mg-wyc{
  --brand:#ed1c24;
  --brand-hover:#e6121a;
  --text:#262626;
  --muted:#666;
  --muted-soft:#b3b3b3;
  --bg:#fff;
  --bg-alt:#F7F7F7;
  --border:#ececec;
  --border-strong:#d9d9d9;
  font-family:'Open Sans',sans-serif;
  color:var(--text);
  max-width:1080px;
  margin:0 auto;
  font-size:14px;
  line-height:1.6;
  position:relative;
}

/* Animated scene: 3 soft blobs + dotted grid behind the wizard */
.mg-wyc-scene{
  position:absolute;
  inset:0;
  z-index:-1;
  overflow:hidden;
  pointer-events:none;
}
.mg-wyc-blob{
  position:absolute;
  border-radius:50%;
  filter:blur(70px);
  will-change:transform;
  opacity:.7;
}
.mg-wyc-blob--1{
  width:620px;height:620px;top:-180px;left:-120px;
  background:radial-gradient(circle,rgba(237,28,36,.55) 0%,rgba(237,28,36,0) 70%);
  animation:mgFloat1 26s ease-in-out infinite alternate;
}
.mg-wyc-blob--2{
  width:560px;height:560px;bottom:-200px;right:-100px;
  background:radial-gradient(circle,rgba(38,38,38,.18) 0%,rgba(38,38,38,0) 70%);
  animation:mgFloat2 32s ease-in-out infinite alternate-reverse;
}
.mg-wyc-blob--3{
  width:380px;height:380px;top:30%;right:12%;
  background:radial-gradient(circle,rgba(237,28,36,.30) 0%,rgba(237,28,36,0) 70%);
  animation:mgFloat3 22s ease-in-out infinite;
}
.mg-wyc-blob--4{
  width:340px;height:340px;top:55%;left:8%;
  background:radial-gradient(circle,rgba(237,28,36,.22) 0%,rgba(237,28,36,0) 70%);
  animation:mgFloat2 28s ease-in-out infinite;
}
.mg-wyc-grid{
  position:absolute;inset:0;
  background-image:radial-gradient(circle,rgba(38,38,38,.08) 1px,transparent 1.5px);
  background-size:26px 26px;
  opacity:.4;
  -webkit-mask:radial-gradient(ellipse at center,#000 25%,transparent 75%);
  mask:radial-gradient(ellipse at center,#000 25%,transparent 75%);
  animation:mgGridDrift 60s linear infinite;
}
@keyframes mgFloat1{
  0%{transform:translate(0,0) scale(1)}
  50%{transform:translate(60px,40px) scale(1.1)}
  100%{transform:translate(20px,-30px) scale(.95)}
}
@keyframes mgFloat2{
  0%{transform:translate(0,0) scale(1)}
  50%{transform:translate(-50px,-30px) scale(1.15)}
  100%{transform:translate(-20px,40px) scale(.9)}
}
@keyframes mgFloat3{
  0%,100%{transform:translate(0,0) rotate(0deg)}
  50%{transform:translate(-40px,30px) rotate(35deg)}
}
@keyframes mgGridDrift{
  from{background-position:0 0}
  to{background-position:52px 52px}
}
@media (prefers-reduced-motion: reduce){
  .mg-wyc-blob,.mg-wyc-grid{animation:none !important}
}

/* head — uses shared .section-title / .section-subtitle / .section-accent from style.css */
.mg-wyc__head{text-align:center;margin-bottom:40px}

/* step indicator */
.mg-wyc__steps{
  list-style:none;padding:0;margin:0 0 40px;
  display:grid;grid-template-columns:repeat(4,1fr);gap:0;
  position:relative;
}
.mg-wyc__steps::before{
  content:"";position:absolute;top:18px;left:12.5%;right:12.5%;height:2px;
  background:var(--border);z-index:0;
}
.mg-wyc__step{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  position:relative;z-index:1;color:var(--muted-soft);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;
}
.mg-wyc__num{
  width:36px;height:36px;border-radius:50%;
  background:var(--bg);border:2px solid var(--border);
  display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:700;color:var(--muted-soft);
  transition:background .2s,border-color .2s,color .2s,box-shadow .2s;
}
.mg-wyc__step.is-done .mg-wyc__num{background:var(--brand);border-color:var(--brand);color:#fff}
.mg-wyc__step.is-active .mg-wyc__num{background:var(--brand);border-color:var(--brand);color:#fff;box-shadow:0 0 0 4px rgba(237,28,36,.15)}
.mg-wyc__step.is-active .mg-wyc__lbl,.mg-wyc__step.is-done .mg-wyc__lbl{color:var(--text)}

/* panels */
.mg-wyc__panel{display:none}
.mg-wyc__panel.is-active{display:block;animation:mgFadeIn .25s ease-out}
@keyframes mgFadeIn{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}

.mg-wyc__q{font-size:17px;font-weight:600;color:var(--text);text-align:center;margin:0 0 8px}
.mg-wyc__qs{font-size:13px;color:var(--muted);text-align:center;margin:0 0 24px;max-width:560px;margin-left:auto;margin-right:auto}

/* tiles (steps 1 + 2 with icons) */
.mg-wyc__tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:28px}
.mg-wyc__tiles--cols-4{grid-template-columns:repeat(4,1fr)}
@media (max-width:980px){.mg-wyc__tiles--cols-4{grid-template-columns:repeat(3,1fr)}}
@media (max-width:680px){.mg-wyc__tiles--cols-4{grid-template-columns:repeat(2,1fr)}}
@media (max-width:380px){.mg-wyc__tiles--cols-4{grid-template-columns:1fr}}

.mg-wyc__tile{
  background:var(--bg);border:2px solid var(--border);border-radius:8px;
  padding:22px 14px 18px;text-align:center;cursor:pointer;
  display:flex;flex-direction:column;gap:6px;align-items:center;
  font-family:inherit;color:var(--text);
  transition:border-color .2s,background .2s,transform .15s,box-shadow .2s;
  min-height:140px;justify-content:center;
}
.mg-wyc__tile-icon{display:block;height:48px;line-height:0;margin-bottom:6px}
.mg-wyc__tile-icon img{display:block;width:44px;height:44px;object-fit:contain}
.mg-wyc__tile strong{font-size:14px;font-weight:700;color:var(--text);line-height:1.3}
.mg-wyc__tile span{font-size:12px;color:var(--muted);line-height:1.4}
.mg-wyc__tile:hover{border-color:var(--brand);transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.06)}
.mg-wyc__tile.is-selected{border-color:var(--brand);background:rgba(237,28,36,.05)}
.mg-wyc__tile:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(237,28,36,.3)}

/* features (step 3) — 4 col grid */
.mg-wyc__features{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:28px}
@media (max-width:980px){.mg-wyc__features{grid-template-columns:repeat(3,1fr)}}
@media (max-width:680px){.mg-wyc__features{grid-template-columns:repeat(2,1fr)}}
@media (max-width:380px){.mg-wyc__features{grid-template-columns:1fr}}

.mg-wyc__feat{
  position:relative;
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 14px 14px 14px;
  border:1px solid var(--border);border-radius:6px;background:var(--bg);
  cursor:pointer;transition:border-color .2s,background .2s,box-shadow .2s;
  min-height:96px;
}
.mg-wyc__feat:hover{border-color:var(--brand);box-shadow:0 2px 8px rgba(0,0,0,.04)}
.mg-wyc__feat:has(input:checked){border-color:var(--brand);background:rgba(237,28,36,.04)}
.mg-wyc__feat input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.mg-wyc__feat-box{
  width:20px;height:20px;border:2px solid var(--border-strong);border-radius:3px;
  flex-shrink:0;position:relative;transition:background .15s,border-color .15s;margin-top:1px;
}
.mg-wyc__feat-box::after{
  content:"";position:absolute;left:5px;top:1px;width:6px;height:11px;
  border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg) scale(0);transition:transform .15s;
}
.mg-wyc__feat input:checked + .mg-wyc__feat-box{background:var(--brand);border-color:var(--brand)}
.mg-wyc__feat input:checked + .mg-wyc__feat-box::after{transform:rotate(45deg) scale(1)}
.mg-wyc__feat input:focus-visible + .mg-wyc__feat-box{box-shadow:0 0 0 3px rgba(237,28,36,.25)}
.mg-wyc__feat-body{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
.mg-wyc__feat-label{font-size:14px;font-weight:700;color:var(--text);line-height:1.3}
.mg-wyc__feat-desc{font-size:12px;color:var(--muted);line-height:1.5;font-weight:300}

/* note textarea — full width of features grid */
.mg-wyc__note{display:flex;flex-direction:column;gap:8px;margin:8px 0 24px}
.mg-wyc__note > span{font-size:12px;font-weight:600;color:var(--text);text-transform:uppercase;letter-spacing:.5px}
.mg-wyc__note textarea{
  background:var(--bg);border:1px solid var(--border);border-radius:4px;
  padding:14px 16px;font:300 14px/1.55 'Open Sans',sans-serif;color:var(--text);
  resize:vertical;min-height:96px;
}
.mg-wyc__note textarea::placeholder{color:var(--muted-soft)}
.mg-wyc__note textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(237,28,36,.12)}

/* fields (step 4) */
.mg-wyc__fields{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-bottom:18px;max-width:680px;margin-left:auto;margin-right:auto}
@media (max-width:560px){.mg-wyc__fields{grid-template-columns:1fr}}
.mg-wyc__field{display:flex;flex-direction:column;gap:6px}
.mg-wyc__field:first-child{grid-column:1 / -1}
.mg-wyc__field > span{font-size:12px;font-weight:600;color:var(--text);text-transform:uppercase;letter-spacing:.5px}
.mg-wyc__field input{
  background:var(--bg);border:1px solid var(--border);border-radius:4px;
  padding:12px 14px;font:300 14px/1.4 'Open Sans',sans-serif;color:var(--text);
}
.mg-wyc__field input::placeholder{color:var(--muted-soft)}
.mg-wyc__field input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(237,28,36,.12)}

.mg-wyc__consents{display:flex;flex-direction:column;gap:10px;margin:0 auto 24px;max-width:680px}
.mg-wyc__consent{display:flex;align-items:flex-start;gap:10px;font-size:13px;color:var(--muted);line-height:1.5;cursor:pointer}
.mg-wyc__consent input{margin-top:3px;accent-color:var(--brand);width:16px;height:16px;flex-shrink:0}

/* nav */
.mg-wyc__nav{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}
.mg-wyc__btn{
  font:700 13px/1 'Open Sans',sans-serif;text-transform:uppercase;letter-spacing:.5px;
  padding:14px 28px;border-radius:3px;border:none;cursor:pointer;
  transition:background .2s,color .2s,opacity .2s;
}
.mg-wyc__btn--prev{background:transparent;color:var(--muted);border:1px solid var(--border)}
.mg-wyc__btn--prev:hover{color:var(--text);border-color:var(--border-strong)}
.mg-wyc__btn--next,.mg-wyc__btn--submit{background:var(--brand);color:#fff}
.mg-wyc__btn--next:hover:not(:disabled),.mg-wyc__btn--submit:hover:not(:disabled){background:var(--brand-hover)}
.mg-wyc__btn:disabled{opacity:.4;cursor:default}

.mg-wyc__err{color:var(--brand);font-size:13px;text-align:right;margin:10px 0 0}

/* success */
.mg-wyc__panel--ok{text-align:center;padding:20px 10px}
.mg-wyc__panel--ok h4{font:300 28px/1.2 'Roboto',sans-serif;color:var(--text);margin:0 0 12px}
.mg-wyc__panel--ok p{font-size:15px;color:var(--muted);max-width:520px;margin:0 auto 24px}
.mg-wyc__panel--ok p strong{color:var(--text)}
.mg-wyc__ctas{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.mg-wyc__cta{
  font:700 14px/1 'Open Sans',sans-serif;text-decoration:none;
  padding:14px 24px;border-radius:3px;
}
.mg-wyc__cta--phone{background:var(--brand);color:#fff}
.mg-wyc__cta--phone:hover{background:var(--brand-hover);color:#fff}
.mg-wyc__cta--email{background:var(--bg-alt);color:var(--text);border:1px solid var(--border)}
.mg-wyc__cta--email:hover{border-color:var(--brand);color:var(--brand)}

@media (max-width:640px){
  .mg-wyc__title{font-size:28px}
  .mg-wyc__steps{margin-bottom:30px}
  .mg-wyc__step .mg-wyc__lbl{font-size:10px}
  .mg-wyc__num{width:30px;height:30px;font-size:12px}
  .mg-wyc__steps::before{top:14px}
  .mg-wyc__nav{flex-direction:column-reverse}
  .mg-wyc__btn{width:100%}
}
