/* calculadora.css — migrado 1:1 del demo _tmp-demo-tools/calculadora.html */

/* ============================================================
       HERO
    ============================================================ */
    .calc-hero {
      padding-top: calc(var(--nav-h) + 3rem);
      padding-bottom: 3rem;
      background: linear-gradient(160deg, var(--heading) 0%, var(--primary) 60%, #0D7A9F 100%);
      color: white;
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    .calc-hero::before {
      content: '';
      position: absolute;
      top: -80px;
      right: -80px;
      width: 320px;
      height: 320px;
      background: rgba(255,255,255,.05);
      border-radius: 50%;
    }
    .calc-hero::after {
      content: '';
      position: absolute;
      bottom: -100px;
      left: -60px;
      width: 280px;
      height: 280px;
      background: rgba(0,180,216,.1);
      border-radius: 50%;
    }
    .calc-hero .container { position: relative; z-index: 1; }
    .calc-hero__label {
      display: inline-flex;
      align-items: center;
      gap: .5rem;
      background: rgba(255,255,255,.12);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255,255,255,.2);
      border-radius: 999px;
      padding: .35rem 1rem;
      font-size: .78rem;
      font-weight: 600;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: rgba(255,255,255,.9);
      margin-bottom: 1.5rem;
    }
    .calc-hero__label svg { width: 14px; height: 14px; }
    .calc-hero h1 {
      color: white;
      font-size: clamp(1.8rem, 5vw, 3rem);
      margin-bottom: 1rem;
    }
    .calc-hero h1 span { color: var(--accent); }
    .calc-hero p {
      color: rgba(255,255,255,.8);
      font-size: clamp(.95rem, 2vw, 1.1rem);
      max-width: 580px;
      margin: 0 auto;
      line-height: 1.7;
    }

    /* ============================================================
       MAIN LAYOUT
    ============================================================ */
    .calc-main {
      padding: 3rem 0 5rem;
      background: var(--off-white);
    }
    .calc-grid {
      display: grid;
      gap: 2rem;
      align-items: start;
    }
    @media (min-width: 1024px) {
      .calc-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    }

    /* ============================================================
       INPUT PANEL
    ============================================================ */
    .calc-panel {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 2rem;
      box-shadow: var(--shadow-md);
    }
    .calc-panel__title {
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--heading);
      margin-bottom: .3rem;
      display: flex;
      align-items: center;
      gap: .6rem;
    }
    .calc-panel__title svg { width: 20px; height: 20px; color: var(--accent); }
    .calc-panel__sub {
      font-size: .85rem;
      color: var(--text-light);
      margin-bottom: 1.75rem;
    }

    /* Field group */
    .calc-field {
      margin-bottom: 1.75rem;
    }
    .calc-field:last-child { margin-bottom: 0; }
    .calc-field__label {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: .75rem;
    }
    .calc-field__label-text {
      font-size: .88rem;
      font-weight: 600;
      color: var(--heading);
    }
    .calc-field__value {
      font-size: 1rem;
      font-weight: 700;
      color: var(--primary);
      background: linear-gradient(135deg, #EBF5F9, #D6EEF5);
      padding: .25rem .75rem;
      border-radius: var(--radius);
      min-width: 90px;
      text-align: right;
    }

    /* Slider */
    .calc-slider {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 6px;
      border-radius: 999px;
      background: var(--border);
      outline: none;
      cursor: pointer;
      position: relative;
    }
    .calc-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--primary);
      border: 3px solid white;
      box-shadow: 0 2px 8px rgba(10,94,125,.3);
      cursor: pointer;
      transition: transform .15s, box-shadow .15s;
    }
    .calc-slider::-webkit-slider-thumb:hover {
      transform: scale(1.15);
      box-shadow: 0 4px 16px rgba(10,94,125,.4);
    }
    .calc-slider::-moz-range-thumb {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      background: var(--primary);
      border: 3px solid white;
      box-shadow: 0 2px 8px rgba(10,94,125,.3);
      cursor: pointer;
    }
    .calc-slider-track {
      position: relative;
    }
    .calc-slider-fill {
      position: absolute;
      top: 50%;
      left: 0;
      height: 6px;
      border-radius: 999px;
      background: linear-gradient(90deg, var(--primary), var(--accent));
      transform: translateY(-50%);
      pointer-events: none;
    }

    /* Presets */
    .calc-presets {
      display: flex;
      gap: .5rem;
      flex-wrap: wrap;
      margin-top: .85rem;
    }
    .calc-preset {
      background: var(--off-white);
      border: 1.5px solid var(--border);
      border-radius: 999px;
      padding: .3rem .85rem;
      font-family: inherit;
      font-size: .75rem;
      font-weight: 500;
      color: var(--text);
      cursor: pointer;
      transition: all .2s;
      white-space: nowrap;
    }
    .calc-preset:hover {
      border-color: var(--primary);
      color: var(--primary);
      background: #EBF5F9;
    }
    .calc-preset.active {
      background: var(--primary);
      border-color: var(--primary);
      color: white;
    }

    /* ============================================================
       RESULTS PANEL
    ============================================================ */
    .calc-results {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
    }

    /* Big number cards */
    .calc-number-cards {
      display: grid;
      gap: 1rem;
    }
    @media (min-width: 640px) {
      .calc-number-cards { grid-template-columns: 1fr 1fr; }
    }

    .calc-number-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1.25rem;
      box-shadow: var(--shadow);
    }
    .calc-number-card--accent {
      background: linear-gradient(135deg, var(--heading) 0%, var(--primary) 100%);
      border-color: transparent;
      color: white;
    }
    .calc-number-card__label {
      font-size: .75rem;
      font-weight: 600;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: var(--text-light);
      margin-bottom: .5rem;
    }
    .calc-number-card--accent .calc-number-card__label {
      color: rgba(255,255,255,.7);
    }
    .calc-number-card__amount {
      font-size: clamp(1.4rem, 3vw, 1.9rem);
      font-weight: 700;
      color: var(--heading);
      line-height: 1.1;
      margin-bottom: .2rem;
    }
    .calc-number-card--accent .calc-number-card__amount { color: white; }
    .calc-number-card__sub {
      font-size: .78rem;
      color: var(--text-light);
      line-height: 1.4;
    }
    .calc-number-card--accent .calc-number-card__sub { color: rgba(255,255,255,.7); }

    /* Total lifetime card */
    .calc-total-card {
      background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
      border: 2px solid var(--gold);
      border-radius: var(--radius-lg);
      padding: 1.25rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      flex-wrap: wrap;
    }
    .calc-total-card__label {
      font-size: .8rem;
      font-weight: 600;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: #a07a30;
      margin-bottom: .3rem;
    }
    .calc-total-card__amount {
      font-size: clamp(1.6rem, 4vw, 2.2rem);
      font-weight: 700;
      color: #7a5a10;
      line-height: 1;
    }
    .calc-total-card__icon {
      width: 52px;
      height: 52px;
      min-width: 52px;
      background: rgba(201,169,98,.2);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #a07a30;
    }
    .calc-total-card__icon svg { width: 26px; height: 26px; }

    /* ============================================================
       COMPARISON CHART (CSS only)
    ============================================================ */
    .calc-chart-card {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1.5rem;
      box-shadow: var(--shadow);
    }
    .calc-chart-title {
      font-size: .9rem;
      font-weight: 700;
      color: var(--heading);
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: .5rem;
    }
    .calc-chart-title svg { width: 18px; height: 18px; color: var(--accent); }

    .calc-bar-row {
      margin-bottom: 1.25rem;
    }
    .calc-bar-row:last-child { margin-bottom: 0; }
    .calc-bar-meta {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: .5rem;
    }
    .calc-bar-name {
      font-size: .82rem;
      font-weight: 600;
      color: var(--heading);
      display: flex;
      align-items: center;
      gap: .5rem;
    }
    .calc-bar-name-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }
    .calc-bar-amount {
      font-size: .82rem;
      font-weight: 700;
      color: var(--heading);
    }
    .calc-bar-track {
      height: 28px;
      background: var(--off-white);
      border-radius: 999px;
      overflow: hidden;
      position: relative;
    }
    .calc-bar-fill {
      height: 100%;
      border-radius: 999px;
      transition: width .8s cubic-bezier(.4,0,.2,1);
      display: flex;
      align-items: center;
      padding-left: 12px;
      min-width: 8px;
      position: relative;
    }
    .calc-bar-fill--lenses {
      background: linear-gradient(90deg, #E12E40, #FF6B6B);
    }
    .calc-bar-fill--surgery {
      background: linear-gradient(90deg, var(--primary), var(--accent));
    }
    .calc-bar-fill--future {
      background: linear-gradient(90deg, #F97316, #FBBF24);
    }

    .calc-bar-label {
      font-size: .7rem;
      font-weight: 700;
      color: white;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Break-even */
    .calc-breakeven {
      display: flex;
      align-items: center;
      gap: .75rem;
      background: linear-gradient(135deg, #EBF5F9, #D6EEF5);
      border-radius: var(--radius-lg);
      padding: 1.25rem;
    }
    .calc-breakeven__icon {
      width: 48px;
      height: 48px;
      min-width: 48px;
      background: linear-gradient(135deg, var(--primary), var(--accent));
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
    }
    .calc-breakeven__icon svg { width: 24px; height: 24px; }
    .calc-breakeven__text { flex: 1; }
    .calc-breakeven__label {
      font-size: .78rem;
      font-weight: 600;
      letter-spacing: 1.2px;
      text-transform: uppercase;
      color: var(--primary);
      margin-bottom: .2rem;
    }
    .calc-breakeven__value {
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--heading);
      line-height: 1.2;
    }
    .calc-breakeven__sub {
      font-size: .78rem;
      color: var(--text-light);
    }

    /* ============================================================
       GAINS SECTION
    ============================================================ */
    .calc-gains {
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 2rem;
      box-shadow: var(--shadow-md);
      margin-top: 2rem;
    }
    .calc-gains__title {
      font-size: 1.15rem;
      font-weight: 700;
      color: var(--heading);
      margin-bottom: 1.5rem;
      display: flex;
      align-items: center;
      gap: .6rem;
    }
    .calc-gains__title svg { width: 22px; height: 22px; color: var(--accent); }
    .calc-gains-grid {
      display: grid;
      gap: 1rem;
    }
    @media (min-width: 640px) {
      .calc-gains-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (min-width: 1024px) {
      .calc-gains-grid { grid-template-columns: repeat(4, 1fr); }
    }
    .calc-gain-item {
      background: var(--off-white);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 1.25rem 1rem;
      text-align: center;
      transition: all .2s;
    }
    .calc-gain-item:hover {
      border-color: var(--accent);
      transform: translateY(-2px);
      box-shadow: var(--shadow);
    }
    .calc-gain-item__icon {
      width: 48px;
      height: 48px;
      margin: 0 auto .75rem;
      background: linear-gradient(135deg, #EBF5F9, #D6EEF5);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--primary);
    }
    .calc-gain-item__icon svg { width: 24px; height: 24px; }
    .calc-gain-item__value {
      font-size: 1.3rem;
      font-weight: 700;
      color: var(--primary);
      margin-bottom: .25rem;
    }
    .calc-gain-item__label {
      font-size: .8rem;
      color: var(--text-light);
      line-height: 1.4;
    }

    /* ============================================================
       CTA SECTION
    ============================================================ */
    .calc-cta {
      background: linear-gradient(135deg, var(--heading) 0%, var(--primary) 60%, #0D7A9F 100%);
      border-radius: var(--radius-xl);
      padding: 3rem 2rem;
      text-align: center;
      color: white;
      margin-top: 2.5rem;
      position: relative;
      overflow: hidden;
    }
    .calc-cta::before {
      content: '';
      position: absolute;
      top: -60px;
      right: -60px;
      width: 240px;
      height: 240px;
      background: rgba(255,255,255,.05);
      border-radius: 50%;
    }
    .calc-cta .container { position: relative; z-index: 1; }
    .calc-cta h2 {
      color: white;
      font-size: clamp(1.4rem, 4vw, 2rem);
      margin-bottom: .75rem;
    }
    .calc-cta p {
      color: rgba(255,255,255,.8);
      margin-bottom: 2rem;
      font-size: 1rem;
    }
    .calc-cta-btns {
      display: flex;
      gap: 1rem;
      justify-content: center;
      flex-wrap: wrap;
    }

    /* Count-up animation */
    .counting { transition: all .05s ease-out; }

    /* Sticky result on mobile */
    @media (max-width: 1023px) {
      .calc-sticky {
        position: sticky;
        bottom: 1rem;
        z-index: 50;
      }
      .calc-sticky-bar {
        background: var(--heading);
        color: white;
        border-radius: var(--radius-lg);
        padding: 1rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        box-shadow: 0 8px 32px rgba(10,37,64,.3);
        margin: 0 -1rem;
      }
      .calc-sticky-bar__label { font-size: .75rem; color: rgba(255,255,255,.7); }
      .calc-sticky-bar__amount { font-size: 1.2rem; font-weight: 700; color: white; }
      .calc-sticky-bar a { flex-shrink: 0; }
    }
    @media (min-width: 1024px) {
      .calc-sticky-bar { display: none; }
    }

    /* Misc */
    .text-danger { color: #E12E40; }
    .text-success { color: #0A5E7D; }
    .surgery-price-note {
      font-size: .78rem;
      color: var(--text-light);
      margin-top: .75rem;
      display: flex;
      align-items: flex-start;
      gap: .4rem;
      line-height: 1.5;
    }
    .surgery-price-note svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }