/* ── Clone add-ons: a11y helper + investment calculator ─────────────────
   Visual language matched to bulldeq: Degular type, accent green #83f0b3,
   black text on the light (#F2F2F2) background. */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root { --calc-green: #83f0b3; --calc-green-600: #5fd996; }

/* smooth in-page scrolling (original used Lenis) with offset for the fixed nav */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.calc {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 64px;
  font-family: var(--font-degular, "Degular", system-ui, sans-serif);
  color: #1a1a1a;
}
@media (max-width: 900px) {
  .calc { grid-template-columns: 1fr; gap: 48px; }
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 48px;
}
@media (max-width: 560px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-span { grid-column: 1 / -1; }

.calc-field { display: flex; flex-direction: column; gap: 10px; }
.calc-field > span { font-size: 17px; line-height: 1.2; color: #1a1a1a; }
.calc-field > span strong { font-weight: 600; }

.calc-field input[type="number"] {
  appearance: auto;
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #b8b8b8;
  padding: 8px 2px;
  font: inherit;
  font-size: 17px;
  color: #1a1a1a;
  border-radius: 0;
  transition: border-color .2s ease;
}
.calc-field input[type="number"]:focus {
  outline: none;
  border-bottom-color: var(--calc-green-600);
}
.calc-field--inline { justify-content: flex-end; }

/* range sliders — green track + green thumb */
.calc-field--range { gap: 16px; }
.calc-field--range > span { display: flex; justify-content: space-between; align-items: baseline; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px;
  background: #d9d9d9; cursor: pointer; margin: 6px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--calc-green); border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--calc-green); border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
input[type="range"]:focus { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--calc-green-600); outline-offset: 2px; }

.calc-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 44px;
}
.calc-clear {
  color: #1a1a1a; text-decoration: underline; text-underline-offset: 4px;
  font-size: 17px;
}
.calc-clear:hover { color: var(--calc-green-600); }
.calc-btn {
  background: var(--calc-green);
  color: #0d3321;
  font-weight: 600; font-size: 18px;
  border: none; border-radius: 999px;
  padding: 16px 44px; cursor: pointer;
  transition: background .2s ease, transform .05s ease;
}
.calc-btn:hover { background: var(--calc-green-600); }
.calc-btn:active { transform: translateY(1px); }
.calc-btn:focus-visible { outline: 2px solid #0d3321; outline-offset: 2px; }

/* results column */
.calc-res-list { margin: 0; }
.calc-res {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  padding: 14px 0 10px;
  border-bottom: 1px solid var(--calc-green);
}
.calc-res dt { font-size: 17px; color: #1a1a1a; display: flex; align-items: center; gap: 6px; }
.calc-res dd { margin: 0; font-size: 18px; font-weight: 600; color: #1a1a1a; text-align: right; white-space: nowrap; }
.calc-res--hi dt, .calc-res--hi dd { font-size: 20px; }
.calc-res--hi dd { color: #0d3321; }

.calc-info {
  display: inline-flex; align-items: center; justify-content: center;
  color: #8a8a8a; cursor: help; font-size: 14px; line-height: 1;
}
.calc-info:hover, .calc-info:focus { color: var(--calc-green-600); outline: none; }

/* ── Accordions (Nuestros servicios) ─────────────────────────────────
   The original mounted the expandable body via React; here the body is
   injected from the CMS data and toggled by js/site.js. */
[data-acc-head] { cursor: pointer; }
[data-acc-head] svg[data-acc-icon] path { transition: d .2s ease; }
.bd-acc-body {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .55s ease, opacity .4s ease;
  font-family: var(--font-degular, system-ui, sans-serif);
}
[data-acc].open .bd-acc-body { max-height: 1400px; opacity: 1; }

.bd-acc-inner { padding: 4px 24px 28px 86px; }
.bd-acc-text p { font-size: 18px; line-height: 1.38; color: #1a1a1a; margin: 0 0 14px; max-width: 1000px; }
.bd-acc-text p:last-child { margin-bottom: 0; }
.bd-acc-more { display: inline-block; margin-top: 18px; font-size: 18px; color: #1a1a1a; text-decoration: none; }
.bd-acc-more:hover { text-decoration: underline; text-underline-offset: 4px; }

.bd-acc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 56px; padding: 8px 24px 30px 86px; }
.bd-acc-col h4 { font-weight: 600; font-size: 20px; margin: 0 0 10px; color: #1a1a1a; }
.bd-acc-col p { font-size: 16px; line-height: 1.4; margin: 0 0 12px; color: #1a1a1a; }
.bd-acc-col p:last-child { margin-bottom: 0; }

@media (min-width: 1024px) {
  .bd-acc-inner, .bd-acc-cols { padding-left: 184px; padding-right: 40px; }
  .bd-acc-text p { font-size: 22px; }
}
@media (max-width: 560px) { .bd-acc-cols { grid-template-columns: 1fr; } }

/* ── Carousel controls: green advance arrow + progress bar ───────────── */
.bd-car-wrap { position: relative; }
.bd-car-arrow {
  position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--calc-green); border: none; cursor: pointer; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  transition: background .2s ease, transform .2s ease;
}
.bd-car-arrow:hover { background: var(--calc-green-600); }
.bd-car-arrow:focus-visible { outline: 2px solid #0d3321; outline-offset: 2px; }
.bd-car-arrow svg { width: 24px; height: 24px; }
.bd-car-arrow.at-end svg { transform: scaleX(-1); }       /* points back when at the end */

.bd-car-track {
  position: relative; height: 1px; background: #cfcfcf;
  margin-top: 28px; touch-action: none;
}
.bd-car-bar {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 4px; background: #000; border-radius: 2px;
  left: 0; min-width: 40px; cursor: grab;
  transition: left .15s ease, width .15s ease;
}
.bd-car-bar:active { cursor: grabbing; }
@media (max-width: 1023px) { .bd-car-arrow { width: 44px; height: 44px; } }
