/* ==========================================================================
   NUESTROS PRECIOS  (Figma 472:2)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Planes y tarifas  (Figma 472:33)
   -------------------------------------------------------------------------- */

.planes {
  padding: 96px 0 100px;
  background: linear-gradient(180deg, var(--color-white), var(--color-section-light) 55%);
}

.planes .sec-head {
  margin-bottom: 44px;
  gap: 13px;
}

.planes .sec-head__lead {
  max-width: 660px;
  font-size: 15px;
  line-height: 1.6;
}

/* --- Tira "cómo se calcula" --------------------------------------------- */

.regla {
  display: flex;
  gap: 36px;
  align-items: center;
  margin-bottom: 44px;
  padding: 26px 28px;
  background: var(--color-white);
  border: 1px solid #e4e6ea;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(14, 35, 64, 0.1);
}

.regla__main {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

/* Barra dorada vertical a la izquierda del texto */
.regla__main::before {
  flex: 0 0 3px;
  width: 3px;
  content: "";
  background: linear-gradient(180deg, var(--color-gold-light), var(--color-gold-dark));
}

.regla__main h2 {
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--color-navy);
}

.regla__main p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-gray-700);
}

.regla__casos {
  display: flex;
  flex: 1 1 auto;
  gap: 28px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.regla__caso {
  display: flex;
  gap: 12px;
  align-items: center;
}

.regla__num {
  display: flex;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--fw-bold);
  color: var(--color-gold);
  border: 1.2px solid var(--color-gold-light);
  border-radius: 50%;
}

.regla__kind {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.7px;
  color: var(--color-gray-500);
}

.regla__how {
  font-size: 15px;
  font-weight: var(--fw-bold);
  color: var(--color-navy);
}

.regla__divider {
  flex: 0 0 1px;
  width: 1px;
  height: 44px;
  background: #e4e6ea;
}

/* --- Tarjetas de plan --------------------------------------------------- */

.planes__rack {
  display: flex;
  gap: 24px;
  align-items: center;
}

.plan {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid #dadde0;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px rgba(14, 35, 64, 0.1);
}

/* Plan destacado: borde dorado y cintillo superior */
.plan--destacado {
  border: 4px solid var(--color-gold-light);
}

.plan__badge {
  padding: 9px;
  font-size: 10.5px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.945px;
  text-align: center;
  color: var(--color-white);
  background: linear-gradient(90deg, var(--color-gold-light), var(--color-gold-dark));
}

.plan__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 28px 30px;
}

.plan__name {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-navy);
}

.plan__desc {
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.72;
  color: var(--color-gray-700);
}

/* --- Tabla de tarifas --------------------------------------------------- */

.tarifas {
  width: 100%;
  margin-bottom: 14px;
  border-collapse: collapse;
  background: #f4f6f9;
  border-radius: 10px;
  overflow: hidden;
}

.tarifas th {
  padding: 11px 16px 9px;
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.665px;
  text-align: left;
  color: var(--color-gray-500);
}

.tarifas th:last-child,
.tarifas td:last-child {
  text-align: right;
}

.tarifas td {
  padding: 13px 16px;
  font-size: 13.5px;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  color: var(--color-navy);
  border-top: 1px solid #e2e6ec;
}

.tarifas td:last-child {
  font-size: 15px;
  font-weight: var(--fw-bold);
}

.plan__ejemplo {
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-gray-700);
}

.plan__ejemplo strong {
  font-weight: var(--fw-semibold);
  color: var(--color-navy);
}

.plan__vigencia {
  margin-top: 11px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  line-height: 1.5;
  color: var(--color-red);
}

/* Botón de contratar: fantasma en los planes normales, sólido en el destacado */
.btn--outline {
  justify-content: center;
  width: 100%;
  padding: 14px;
  font-size: 14px;
  color: var(--color-red);
  border: 1.2px solid rgba(169, 30, 34, 0.55);
  border-radius: 6px;
}

.btn--outline:hover {
  color: var(--color-white);
  background: var(--color-red);
  border-color: var(--color-red);
}

.plan .btn--primary {
  justify-content: center;
  width: 100%;
  padding: 14px;
  font-size: 14px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   Calculadora  (Figma 473:2)
   -------------------------------------------------------------------------- */

.calculadora {
  padding: 96px 0 100px;
  background: linear-gradient(180deg, var(--color-hero-bg) 0%, #0b1d37 60%, var(--color-navy) 100%);
}

.calculadora__inner {
  display: flex;
  gap: 72px;
  align-items: flex-start;
}

.calculadora__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 35px;
  min-width: 0;
}

.calculadora__title {
  margin: 18px 0;
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 400;
  line-height: 1;
  color: var(--color-white);
}

.calculadora__lead {
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--color-gray-100);
  opacity: 0.86;
}

/* El punto rojo va absoluto para no partir el párrafo en ítems de flex */
.calculadora__hint {
  position: relative;
  padding-top: 12px;
  padding-left: 17px;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  line-height: 1.5;
  color: var(--color-gray-100);
}

.calculadora__hint::before {
  position: absolute;
  top: 18px;
  left: 0;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--color-red);
  border-radius: 50%;
}

.calculadora__photo {
  position: relative;
  max-width: 465px;
  height: 322px;
  overflow: hidden;
  border-radius: 18px;
}

.calculadora__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.calculadora__photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(
    180deg,
    rgba(14, 35, 64, 0) 0%,
    rgba(14, 35, 64, 0.35) 53%,
    rgba(14, 35, 64, 0.92) 100%
  );
}

/* --- Tarjeta de la calculadora ------------------------------------------ */

.calc-card {
  display: flex;
  flex: 0 0 600px;
  flex-direction: column;
  gap: 22px;
  padding: 34px;
  background: var(--color-card-dark);
  border: 1px solid var(--color-gold-light);
  border-radius: var(--radius-lg);
}

.calc-card h2 {
  font-size: 22px;
  font-weight: var(--fw-bold);
  line-height: 1.24;
  color: var(--color-white);
}

.calc-card__row {
  display: flex;
  gap: 18px;
}

.calc-field {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.calc-field > label {
  font-size: 12.5px;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  color: var(--color-white);
}

.calc-field__help {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--color-gray-500);
}

.calc-field select,
.calc-field input {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 13.5px;
  color: var(--color-white);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  appearance: none;
}

.calc-field select {
  background-image: url("../assets/icons/precios/chevron.svg");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 38px;
}

.calc-field select:focus,
.calc-field input:focus {
  outline: none;
  border-color: var(--color-gold-light);
}

.calc-field option {
  color: var(--color-navy);
  background: var(--color-white);
}

.calc-field input::placeholder {
  color: var(--color-gray-500);
}

.calc-card__hairline {
  width: 100%;
  height: 1px;
  margin: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
}

/* --- Resumen y total ----------------------------------------------------- */

.calc-resumen {
  display: flex;
  gap: 26px;
  align-items: flex-start;
}

.calc-resumen__left {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.calc-resumen__label {
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.84px;
  color: var(--color-white);
  opacity: 0.7;
}

.calc-resumen__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.8px;
}

.calc-resumen__row dt {
  color: var(--color-gray-100);
  opacity: 0.8;
}

.calc-resumen__row dd {
  margin: 0;
  font-weight: var(--fw-semibold);
  color: var(--color-gray-500);
}

.calc-total {
  display: flex;
  flex: 0 0 190px;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  color: var(--color-white);
  background: rgba(169, 30, 34, 0.16);
  border: 1px solid rgba(169, 30, 34, 0.5);
  border-radius: 6px;
}

.calc-total__label {
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.7px;
  line-height: 1.5;
  opacity: 0.8;
}

.calc-total__value {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.calc-card__actions {
  display: flex;
  gap: 12px;
  padding-top: 4px;
}

.calc-card__actions .btn--primary {
  flex: 1 1 auto;
  justify-content: center;
  padding: 15px;
  font-size: 14.5px;
  border-radius: 6px;
}

.btn--ghost {
  flex: 0 0 160px;
  justify-content: center;
  padding: 15px;
  font-size: 14.5px;
  color: var(--color-white);
  border: 1.2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
}

.btn--ghost:hover {
  border-color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  .regla {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .regla__casos {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .planes__rack {
    flex-wrap: wrap;
  }

  .plan {
    flex: 1 1 45%;
  }

  .calculadora__inner {
    flex-direction: column;
    gap: 40px;
  }

  .calc-card {
    flex: 1 1 auto;
    width: 100%;
  }

  .calculadora__photo {
    max-width: none;
  }

  .calculadora__title {
    font-size: 42px;
  }
}

@media (max-width: 639px) {
  .planes,
  .calculadora {
    padding: 64px 0;
  }

  .plan {
    flex: 1 1 100%;
  }

  .regla__casos {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .regla__divider {
    display: none;
  }

  .calculadora__title {
    font-size: 34px;
  }

  .calc-card {
    padding: 24px;
  }

  .calc-card__row,
  .calc-resumen,
  .calc-card__actions {
    flex-direction: column;
  }

  .calc-total,
  .btn--ghost {
    flex: 1 1 auto;
    width: 100%;
  }
}
