/* ═══════════════════════════════════════════════
   COCO ARCHITECTURE — Tarjetas de Planes
   Prefijo: ca-*
   ═══════════════════════════════════════════════ */

/* ── Grid de 3 columnas ──────────────────────────── */
.ca-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem 1rem;
  align-items: center;
}

/* ── Tarjeta base ────────────────────────────────── */
.ca-card {
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ca-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.13);
}

/* Tarjeta destacada (Marketing Studio) */
.ca-card--featured {
  border: 2px solid #2fd3d6;
  transform: scale(1.05);
  z-index: 10;
  overflow: visible;
}

.ca-card--featured:hover {
  transform: scale(1.05) translateY(-0.5rem);
}

/* ── Cabecera con gradiente cyan ─────────────────── */
.ca-card-header {
  height: 9rem;
  background: linear-gradient(135deg, #2fd3d6 0%, #12b4b7 100%);
  border-radius: 2rem 2rem 0 0;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

/* Badge superior (BÁSICO / MÁS POPULAR / PREMIUM) */
.ca-card-top-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 2;
}

.ca-card-top-badge--outline {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.ca-card-top-badge--solid {
  background: #fff;
  color: #12b4b7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Onda SVG al fondo de la cabecera */
.ca-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  display: block;
  color: #fff;
  fill: currentColor;
}

/* ── Ícono flotante (superpuesto entre header y body) */
.ca-icon-float {
  position: absolute;
  top: 7.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 4rem;
  height: 4rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 20px -5px rgba(45, 211, 214, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.ca-icon-float--tilt-r { rotate: 3deg; }
.ca-icon-float--tilt-l { rotate: -3deg; }

.ca-icon-float svg {
  width: 2rem;
  height: 2rem;
  color: #12b4b7;
  stroke: currentColor;
  fill: none;
}

/* La tarjeta featured tiene overflow:visible; necesita header con clip */
.ca-card--featured .ca-card-header {
  overflow: hidden;
}

/* ── Cuerpo de la tarjeta ────────────────────────── */
.ca-card-body {
  padding: 4rem 2rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ca-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1c1733;
  text-align: center;
  margin: 0 0 0.25rem;
}

.ca-card-subtitle {
  font-size: 0.78rem;
  color: #9ca3af;
  text-align: center;
  font-style: italic;
  margin: 0 0 1.5rem;
}

/* ── Lista de características ────────────────────── */
.ca-features {
  list-style: none;
  padding: 0;
  margin: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  font-size: 0.84rem;
  color: #4b5563;
  flex: 1;
}

.ca-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  line-height: 1.4;
}

.ca-features li svg {
  width: 1.1rem;
  height: 1.1rem;
  color: #2fd3d6;
  fill: currentColor;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ca-features li.ca-feat-heading {
  font-weight: 600;
  color: #1c1733;
}

/* ── Botones ─────────────────────────────────────── */
.ca-btn {
  display: block;
  width: 100%;
  margin-top: 1.75rem;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
  border: none;
  font-family: inherit;
  text-decoration: none;
}

.ca-btn--outline {
  background: #e0fbfc;
  color: #12b4b7;
}

.ca-btn--outline:hover {
  background: #2fd3d6;
  color: #fff;
}

.ca-btn--primary {
  background: linear-gradient(90deg, #2fd3d6 0%, #12b4b7 100%);
  color: #fff;
}

.ca-btn--primary:hover {
  box-shadow: 0 8px 20px rgba(18, 180, 183, 0.45);
}

/* ── CTA link encima del grid ────────────────────── */
.ca-cta-link {
  text-align: center;
  margin-bottom: 2.5rem;
}
.ca-cta-link--top { margin-top: .5rem; }

.ca-cta-link__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 2px solid #12b4b7;
  color: #12b4b7;
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.ca-cta-link__btn:hover { background: #12b4b7; color: #fff; }

.ca-cta-link__btn--filled {
  background: #12b4b7;
  color: #fff;
  box-shadow: 0 4px 14px rgba(18,180,183,.35);
}
.ca-cta-link__btn--filled:hover { background: #0ea2a5; border-color: #0ea2a5; }

/* ── Botón Administrar plan (solo usuarios con plan activo) ── */
.ca-admin-zone {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: #f0fdfd;
  border-radius: 16px;
  border: 1.5px solid #a7f3f4;
}
.ca-admin-zone p {
  margin: 0 0 1rem;
  font-size: .9rem;
  color: #475569;
}
.ca-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #12b4b7;
  border: 2px solid #12b4b7;
  color: #fff;
  padding: .8rem 2rem;
  border-radius: 9999px;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.ca-admin-btn:hover { background: #0ea2a5; border-color: #0ea2a5; }

/* ── Dark mode ───────────────────────────────────── */
[data-theme="dark"] .ca-card {
  background: #1a1a2e;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .ca-icon-float {
  background: #22223a;
}

[data-theme="dark"] .ca-card-title {
  color: #f1f0ff;
}

[data-theme="dark"] .ca-features {
  color: #a0aec0;
}

[data-theme="dark"] .ca-features li.ca-feat-heading {
  color: #f1f0ff;
}

[data-theme="dark"] .ca-btn--outline {
  background: rgba(47, 211, 214, 0.12);
  color: #2fd3d6;
}

[data-theme="dark"] .ca-btn--outline:hover {
  background: #2fd3d6;
  color: #fff;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 900px) {
  .ca-grid {
    grid-template-columns: 1fr;
    max-width: 26rem;
    gap: 3rem;
  }

  .ca-card--featured {
    transform: scale(1);
  }

  .ca-card--featured:hover {
    transform: translateY(-0.5rem);
  }
}

@media (max-width: 700px) {
  .ca-grid {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    gap: 1rem;
    padding: 0 1rem 1rem;
    max-width: 100%;
    align-items: flex-start;
  }

  .ca-grid::-webkit-scrollbar { display: none; }

  .ca-card {
    flex: 0 0 84%;
    scroll-snap-align: center;
  }

  .ca-card--featured {
    transform: scale(1);
  }
}
