/* ═══════════════════════════════════════════════════════
   LAB.CSS — WebClic Lab (herramientas.html)
   Cotizador · ROI Ads · Test digital · Paleta de marca
   WebClic Studio v5.0
   ═══════════════════════════════════════════════════════ */

/* ─── Hero ───────────────────────────────────────────── */
.lab-hero {
    background: #0B0B0F;
    padding: calc(var(--topbar-h) + var(--nav-h) + 72px) 0 80px;
    text-align: center;
    color: #fff;
}
.lab-hero__inner { max-width: 760px; margin: 0 auto; }
.lab-hero h1 {
    font-size: clamp(34px, 5.6vw, 60px);
    font-weight: 900; line-height: 1.08;
    margin: 22px 0 18px;
}
.lab-hero p { font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.55); max-width: 600px; margin: 0 auto; }

.lab-hero__stats {
    display: flex; justify-content: center; gap: 48px;
    margin-top: 44px; flex-wrap: wrap;
}
.lab-hero__stats strong { display: block; font-size: 30px; font-weight: 900; color: #FF4B52; }
.lab-hero__stats span   { font-size: 13px; color: rgba(255,255,255,.45); }

/* ─── Tabs ───────────────────────────────────────────── */
.lab-tabs {
    position: sticky; top: 0; z-index: 600;
    background: rgba(13,13,15,.92);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.lab-tabs__row { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 0; }
.lab-tabs__row::-webkit-scrollbar { display: none; }

.lab-tab {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 18px; border-radius: 13px;
    color: rgba(255,255,255,.55); white-space: nowrap;
    font-family: var(--font); cursor: pointer;
    border: 1px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
    flex: 1; justify-content: center; min-width: max-content;
}
.lab-tab i { font-size: 16px; color: rgba(255,255,255,.35); transition: color .2s; }
.lab-tab span { display: flex; flex-direction: column; align-items: flex-start; font-size: 14px; font-weight: 700; line-height: 1.2; }
.lab-tab span small { font-size: 11px; font-weight: 500; color: rgba(255,255,255,.35); }
.lab-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.lab-tab.active {
    color: #fff; background: rgba(224,18,27,.13);
    border-color: rgba(224,18,27,.38);
}
.lab-tab.active i { color: #FF4B52; }

/* ─── Panel base ─────────────────────────────────────── */
.lab-tool { background: #0B0B0F; padding: 56px 0 88px; min-height: 60vh; }
.lab-tool[hidden] { display: none; }

.lab-panel {
    max-width: 980px; margin: 0 auto;
    background: rgba(255,255,255,.028);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 26px;
    padding: 44px clamp(20px, 5vw, 52px);
}
.lab-panel__head { margin-bottom: 34px; }
.lab-panel__head h2 {
    font-size: clamp(22px, 3vw, 30px); font-weight: 900; color: #fff;
    display: flex; align-items: center; gap: 14px;
}
.lab-panel__head h2 i {
    width: 46px; height: 46px; flex: none; font-size: 19px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(224,18,27,.20), rgba(224,18,27,.05));
    border: 1px solid rgba(224,18,27,.32); border-radius: 13px; color: #FF4B52;
}
.lab-panel__head p { margin-top: 10px; color: rgba(255,255,255,.5); font-size: 15px; }

/* ═══════════ 1) COTIZADOR ═══════════ */
.quote-progress {
    height: 5px; border-radius: 3px;
    background: rgba(255,255,255,.07);
    margin-bottom: 36px; overflow: hidden;
}
.quote-progress__bar {
    height: 100%; width: 25%;
    background: linear-gradient(90deg, #E0121B, #FF7A45);
    border-radius: 3px; transition: width .45s cubic-bezier(.22,.61,.36,1);
}

.quote-step { display: none; animation: v5PageIn .35s ease both; }
.quote-step.active { display: block; }
.quote-step h3 {
    font-size: 19px; font-weight: 800; color: #fff;
    display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.quote-num {
    width: 30px; height: 30px; flex: none; font-size: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #E0121B; color: #fff; border-radius: 9px; font-weight: 800;
}

.quote-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 13px; }
.quote-opt {
    text-align: left; padding: 19px 18px;
    background: rgba(255,255,255,.035);
    border: 1.5px solid rgba(255,255,255,.09);
    border-radius: 16px; cursor: pointer; color: #fff;
    font-family: var(--font);
    transition: border-color .18s, background .18s, transform .18s;
}
.quote-opt:hover  { border-color: rgba(224,18,27,.5); transform: translateY(-2px); }
.quote-opt.sel {
    border-color: #E0121B; background: rgba(224,18,27,.12);
    box-shadow: 0 0 0 1px #E0121B inset, 0 12px 30px -14px rgba(224,18,27,.5);
}
.quote-opt i { font-size: 19px; color: #FF4B52; margin-bottom: 11px; display: block; }
.quote-opt strong { display: block; font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.quote-opt span   { font-size: 12.5px; color: rgba(255,255,255,.48); line-height: 1.45; }

.quote-next { margin-top: 28px; }

.quote-result { text-align: center; padding: 8px 0; }
.quote-result__label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.quote-result__price {
    font-size: clamp(46px, 8vw, 72px); font-weight: 900; line-height: 1.1;
    margin: 10px 0 4px;
    background: linear-gradient(110deg, #fff, #FF4B52);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.quote-result__range { color: rgba(255,255,255,.5); font-size: 14.5px; margin-bottom: 26px; }
.quote-result__items {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 9px;
    margin-bottom: 30px;
}
.quote-result__items li {
    font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75);
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.11);
    padding: 7px 14px; border-radius: 999px;
}
.quote-result__items li i { color: #FF4B52; margin-right: 6px; }
.quote-result__ctas { display: flex; justify-content: center; gap: 13px; flex-wrap: wrap; }
.quote-result__note { margin-top: 22px; font-size: 12px; color: rgba(255,255,255,.35); }

/* ═══════════ 2) ROI ADS ═══════════ */
.roi-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; }
@media (max-width: 880px) { .roi-grid { grid-template-columns: 1fr; } }

.roi-field { margin-bottom: 26px; }
.roi-field label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 10px; gap: 12px;
}
.roi-field output { color: #FF4B52; font-weight: 900; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.roi-field small { display: block; margin-top: 7px; font-size: 12px; color: rgba(255,255,255,.38); line-height: 1.5; }

.roi-field input[type="range"] {
    width: 100%; height: 6px; -webkit-appearance: none; appearance: none;
    background: linear-gradient(90deg, #E0121B var(--fill, 30%), rgba(255,255,255,.1) var(--fill, 30%));
    border-radius: 3px; outline: none; cursor: pointer;
}
.roi-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 21px; height: 21px; border-radius: 50%;
    background: #fff; border: 5px solid #E0121B;
    box-shadow: 0 2px 10px rgba(224,18,27,.5);
    transition: transform .15s;
}
.roi-field input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.roi-field input[type="range"]::-moz-range-thumb {
    width: 21px; height: 21px; border-radius: 50%;
    background: #fff; border: 5px solid #E0121B;
    box-shadow: 0 2px 10px rgba(224,18,27,.5);
}

.roi-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 22px; }
.roi-card {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
    border-radius: 15px; padding: 15px 14px; text-align: center;
}
.roi-card span   { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.42); margin-bottom: 6px; }
.roi-card strong { font-size: 23px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; }
.roi-card--hero {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(224,18,27,.16), rgba(255,122,69,.07));
    border-color: rgba(224,18,27,.4);
}
.roi-card--hero strong { font-size: 34px; background: linear-gradient(110deg, #fff, #FF7A45); -webkit-background-clip: text; background-clip: text; color: transparent; }
.roi-card--hero em { display: block; font-style: normal; font-size: 13px; font-weight: 700; color: #FF4B52; margin-top: 3px; }

.roi-chart-wrap {
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px; padding: 18px; margin-bottom: 18px;
}
.roi-chart-wrap canvas { width: 100%; height: auto; display: block; }
.roi-note { font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.55); margin-bottom: 20px; min-height: 44px; }
.roi-note strong { color: #FF4B52; }

/* ═══════════ 3) TEST DIGITAL ═══════════ */
.test-progress { height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.test-progress__bar { height: 100%; width: 12.5%; background: linear-gradient(90deg, #E0121B, #FF7A45); border-radius: 3px; transition: width .4s cubic-bezier(.22,.61,.36,1); }
.test-counter { margin: 18px 0 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: rgba(255,255,255,.4); }
.test-question { font-size: clamp(19px, 2.6vw, 25px); font-weight: 800; color: #fff; margin-bottom: 26px; line-height: 1.35; }

.test-answers { display: grid; gap: 11px; }
.test-answer {
    text-align: left; padding: 17px 20px;
    background: rgba(255,255,255,.035); border: 1.5px solid rgba(255,255,255,.09);
    border-radius: 14px; cursor: pointer; color: rgba(255,255,255,.85);
    font-family: var(--font); font-size: 15px; font-weight: 600;
    display: flex; align-items: center; gap: 13px;
    transition: border-color .15s, background .15s, transform .15s;
}
.test-answer:hover { border-color: rgba(224,18,27,.55); transform: translateX(4px); }
.test-answer b {
    width: 28px; height: 28px; flex: none; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid rgba(255,255,255,.2); border-radius: 8px;
    color: rgba(255,255,255,.5); font-weight: 800;
}
.test-answer:hover b { border-color: #E0121B; color: #FF4B52; }

.test-score { display: flex; align-items: center; gap: 38px; margin-bottom: 30px; flex-wrap: wrap; }
.test-gauge { width: 180px; flex: none; }
#test-gauge-arc { transition: stroke-dashoffset 1.2s cubic-bezier(.22,.61,.36,1); }
.test-verdict h3 { font-size: 26px; font-weight: 900; color: #fff; margin-bottom: 9px; }
.test-verdict p  { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,.55); max-width: 480px; }

.test-recos { display: grid; gap: 11px; margin-bottom: 30px; }
.test-reco {
    display: flex; gap: 14px; align-items: flex-start;
    background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.09);
    border-left: 3px solid #E0121B; border-radius: 13px; padding: 15px 18px;
}
.test-reco i { color: #FF4B52; font-size: 15px; margin-top: 2px; }
.test-reco div strong { display: block; font-size: 14.5px; color: #fff; margin-bottom: 3px; }
.test-reco div span   { font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.55; }
.test-reco a { color: #FF4B52; font-weight: 700; }
.test-reco a:hover { text-decoration: underline; }

/* ═══════════ 4) PALETA ═══════════ */
.pal-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 44px; }
@media (max-width: 880px) { .pal-grid { grid-template-columns: 1fr; } }

.pal-picker-row { display: flex; gap: 13px; align-items: stretch; margin-bottom: 20px; flex-wrap: wrap; }
.pal-picker {
    display: flex; align-items: center; gap: 13px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px; padding: 10px 16px; cursor: pointer; flex: 1;
    color: #fff; font-size: 14px; font-weight: 700;
}
.pal-picker input[type="color"] {
    width: 44px; height: 44px; border: none; border-radius: 11px;
    background: none; cursor: pointer; padding: 0;
}
.pal-picker input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.pal-picker input[type="color"]::-webkit-color-swatch { border: 2px solid rgba(255,255,255,.25); border-radius: 11px; }

.pal-harmony { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 24px; }
.pal-h {
    padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 700;
    color: rgba(255,255,255,.55); background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1); cursor: pointer; font-family: var(--font);
    transition: all .15s;
}
.pal-h:hover { color: #fff; }
.pal-h.active { color: #fff; background: rgba(224,18,27,.14); border-color: rgba(224,18,27,.45); }

.pal-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-bottom: 22px; }
.pal-swatch {
    border-radius: 13px; border: 1px solid rgba(255,255,255,.12);
    cursor: pointer; padding: 0; overflow: hidden; font-family: var(--font);
    transition: transform .15s; background: none;
}
.pal-swatch:hover { transform: translateY(-3px); }
.pal-swatch b { display: block; height: 64px; }
.pal-swatch span {
    display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
    color: rgba(255,255,255,.65); padding: 7px 4px; text-align: center;
    background: rgba(255,255,255,.04); text-transform: uppercase;
}

/* Mock de marca */
.pal-mock {
    border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    background: var(--pm-bg, #FFFFFF);
    box-shadow: 0 26px 60px -20px rgba(0,0,0,.55);
    transition: background .3s;
}
.pal-mock__nav {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 18px; border-bottom: 1px solid rgba(0,0,0,.07);
}
.pal-mock__logo { font-weight: 900; font-size: 14px; color: var(--pm-primary, #E0121B); transition: color .3s; }
.pal-mock__links { display: flex; gap: 7px; margin-left: auto; }
.pal-mock__links i { width: 30px; height: 7px; border-radius: 4px; background: rgba(0,0,0,.10); }
.pal-mock__cta {
    font-size: 11px; font-weight: 800; color: #fff;
    background: var(--pm-primary, #E0121B); border-radius: 7px; padding: 6px 12px;
    transition: background .3s;
}
.pal-mock__hero {
    padding: 36px 26px;
    background: linear-gradient(135deg, var(--pm-soft, #FFF0F0), transparent);
    transition: background .3s;
}
.pal-mock__hero strong { display: block; font-size: 21px; font-weight: 900; line-height: 1.25; color: var(--pm-dark, #16161B); max-width: 320px; margin-bottom: 8px; }
.pal-mock__hero em { display: block; font-style: normal; font-size: 12.5px; color: rgba(0,0,0,.5); margin-bottom: 18px; }
.pal-mock__btn {
    display: inline-block; font-size: 12px; font-weight: 800; color: #fff;
    background: var(--pm-primary, #E0121B); padding: 9px 18px; border-radius: 9px;
    box-shadow: 0 8px 20px -6px var(--pm-primary, #E0121B);
    transition: background .3s, box-shadow .3s;
}
.pal-mock__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; padding: 0 26px 26px; }
.pal-mock__card { background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 12px; padding: 13px; }
.pal-mock__card b { display: block; width: 26px; height: 26px; border-radius: 8px; background: var(--pm-accent, #FF7A45); margin-bottom: 9px; transition: background .3s; }
.pal-mock__card i { display: block; height: 6px; border-radius: 3px; background: rgba(0,0,0,.10); margin-bottom: 5px; }
.pal-mock__card i:last-child { width: 60%; }

.pal-tip { margin-top: 18px; font-size: 13px; color: rgba(255,255,255,.5); line-height: 1.6; }
.pal-tip i { color: #FBBF24; margin-right: 6px; }
.pal-tip a { color: #FF4B52; font-weight: 700; }
.pal-tip a:hover { text-decoration: underline; }

/* ═══════════ CTA FINAL ═══════════ */
.lab-cta {
    position: relative; text-align: center;
    background: linear-gradient(135deg, #1A0507, #2A0A0E 50%, #1A0507);
    border: 1px solid rgba(224,18,27,.3);
    border-radius: 28px; padding: clamp(40px, 7vw, 72px) 24px;
    overflow: hidden;
}
.lab-cta h2 { font-size: clamp(24px, 3.6vw, 38px); font-weight: 900; color: #fff; max-width: 640px; margin: 0 auto 14px; }
.lab-cta p  { color: rgba(255,255,255,.55); font-size: 16px; max-width: 520px; margin: 0 auto 30px; }
.lab-cta__btns { display: flex; justify-content: center; gap: 13px; flex-wrap: wrap; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
    .lab-hero { padding-top: calc(var(--topbar-h) + var(--nav-h) + 44px); padding-bottom: 56px; }
    .lab-hero__stats { gap: 28px; }
    .lab-panel { padding: 28px 18px; border-radius: 20px; }
    .lab-tab span small { display: none; }
    .lab-tab { padding: 10px 14px; }
    .roi-cards { grid-template-columns: repeat(2, 1fr); }
    .pal-swatches { grid-template-columns: repeat(5, 1fr); }
    .test-score { gap: 22px; justify-content: center; text-align: center; }
    .quote-result__ctas .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .quote-step { animation: none; }
    #test-gauge-arc { transition: none; }
}
