/* --- Nav --- */

.pricing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: 1080px;
  margin: 0 auto;
}

.pricing-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Salida de vuelta a la landing: desde esta pagina no habia forma de regresar. */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.nav-back:hover { color: var(--text); text-decoration: none; }
.nav-back svg { width: 15px; height: 15px; }

/* --- Hero --- */

.pricing-hero {
  text-align: center;
  max-width: 560px;
  margin: 40px auto 48px;
  padding: 0 20px;
}

.pricing-hero h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.pricing-hero p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* --- Grid de planes --- */

.pricing-grid {
  max-width: 1080px;
  margin: 0 auto 64px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan-card-featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.plan-head h2,
.plan-head h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
}

.plan-tagline {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.plan-price {
  margin: 20px 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  align-content: flex-start;
  min-height: 58px;
}

.plan-price .amount {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* El plan Clinica no lleva precio de lista (se cotiza segun cuantos doctores),
   asi que el texto es mas largo y no aguanta los 32px del resto. */
.plan-price .amount-quote {
  font-size: 22px;
}

.plan-price .period {
  font-size: 13px;
  color: var(--text-muted);
}

.plan-cta {
  width: 100%;
  text-align: center;
  padding: 11px;
}

.plan-features {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-features li {
  font-size: 13px;
  color: var(--text);
  padding-left: 24px;
  position: relative;
  line-height: 1.4;
}

.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-light);
  background-image: var(--plan-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5L9.5 17L19 7' stroke='%232F7573' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.pricing-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  border-top: 1px solid var(--border-soft);
  margin-top: 48px;
  padding: 24px 20px 40px;
  font-size: 12.5px;
  color: var(--text-soft);
}
.pricing-footer a { color: var(--text-muted); }
.pricing-footer a:hover { color: var(--text); }

/* En oscuro el check teal-700 queda casi invisible sobre el circulo oscuro:
   se cambia a la palomita en teal-300 via --plan-check (no se puede meter
   var() dentro del data-URI). Aplica por el switch manual y por el tema del SO. */
:root[data-theme='dark'] {
  --plan-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5L9.5 17L19 7' stroke='%2393C9C6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --plan-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5L9.5 17L19 7' stroke='%2393C9C6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}

@media (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .plan-card-featured { transform: none; }
}

@media (max-width: 560px) {
  .pricing-nav { padding: 16px 20px; }
  .pricing-nav-actions .btn-sm { padding: 7px 10px; font-size: 12px; }
  .pricing-hero h1 { font-size: 26px; }
  /* En movil el nav no da para las tres acciones: el regreso queda en la marca
     (que ya enlaza a "/") y en el pie. */
  .nav-back { display: none; }
}
