/* ==========================================================================
   Página /planes — CostalGO
   Estilos namespaced bajo .cg-planes para no afectar al resto del sitio.
   Tokens de marca tomados de la web actual (header Elementor + tarjetas).
   ========================================================================== */

.cg-planes {
	--cg-purple-1: #682860;
	--cg-purple-2: #62398D;
	--cg-purple-solid: #762763;
	--cg-yellow: #FCC107;
	--cg-ink: #1a1a1a;
	--cg-muted: #54595F;
	--cg-line: #e7e7ef;
	--cg-soft: #F8FAFF;
	--cg-soft-2: #EDF2FF;

	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	color: var(--cg-ink);
	overflow-x: clip;
}

.cg-planes *,
.cg-planes *::before,
.cg-planes *::after { box-sizing: border-box; }

.cg-container {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ===== Hero ===== */
.cg-hero {
	background: linear-gradient(90deg, var(--cg-purple-1) 0%, var(--cg-purple-2) 100%);
	color: #fff;
	/* El header de Elementor solapa ~120px (margin-bottom:-120px); dejamos aire. */
	padding: 158px 0 72px;
	text-align: center;
}
.cg-eyebrow {
	text-transform: uppercase;
	letter-spacing: .18em;
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 14px;
	color: var(--cg-yellow);
}
.cg-hero__title {
	margin: 0 0 14px;
	font-size: clamp(30px, 5vw, 50px);
	font-weight: 800;
	line-height: 1.08;
	color: #fff;
}
.cg-hero__sub {
	margin: 0 auto 30px;
	max-width: 620px;
	font-size: clamp(16px, 2vw, 19px);
	line-height: 1.5;
	color: rgba(255,255,255,.92);
}

/* Toggle mensual / anual */
.cg-toggle {
	display: inline-flex;
	gap: 4px;
	padding: 5px;
	background: rgba(255,255,255,.14);
	border-radius: 999px;
	backdrop-filter: blur(2px);
}
.cg-toggle button {
	appearance: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	color: #fff;
	background: transparent;
	padding: 10px 22px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: background .2s, color .2s;
}
.cg-toggle button.is-active {
	background: var(--cg-yellow);
	color: #1a1a1a;
}
.cg-toggle__save {
	font-size: 12px;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255,255,255,.25);
	color: #fff;
}
.cg-toggle button.is-active .cg-toggle__save {
	background: rgba(0,0,0,.12);
	color: #1a1a1a;
}

/* ===== Secciones ===== */
.cg-section { padding: 76px 0; background: #fff; }
/* Offset para las anclas del submenú: el header sticky no debe tapar la sección. */
.cg-section[id] { scroll-margin-top: 130px; }
.cg-section--alt { background: var(--cg-soft); }
.cg-section__head { text-align: center; margin: 0 auto 42px; max-width: 680px; }
.cg-section__title {
	margin: 0 0 10px;
	font-size: clamp(26px, 3.4vw, 36px);
	font-weight: 800;
	color: var(--cg-purple-solid);
}
.cg-section__sub { margin: 0; font-size: 17px; line-height: 1.5; color: var(--cg-muted); }

/* ===== Grid de tarjetas ===== */
.cg-grid { display: grid; gap: 22px; align-items: stretch; }
.cg-grid--4 { grid-template-columns: repeat(4, 1fr); }
.cg-grid--3 { grid-template-columns: repeat(3, 1fr); max-width: 900px; margin: 0 auto; }

/* ===== Tarjeta ===== */
.cg-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background: #fff;
	border: 1px solid var(--cg-line);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0,0,0,.08);
	padding: 34px 22px 26px;
	transition: transform .18s ease, box-shadow .18s ease;
}
.cg-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 16px 38px rgba(0,0,0,.14);
}
.cg-card--destacada {
	border-color: var(--cg-yellow);
	box-shadow: 0 16px 40px rgba(98,57,141,.18);
}
.cg-card__badge {
	position: absolute;
	top: -13px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--cg-yellow);
	color: #1a1a1a;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 5px 14px;
	border-radius: 999px;
}
.cg-card__nombre {
	margin: 4px 0 14px;
	font-size: 20px;
	font-weight: 700;
	color: var(--cg-purple-2);
}
.cg-price {
	font-weight: 800;
	font-size: 40px;
	line-height: 1;
	color: var(--cg-ink);
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
}
.cg-price-num { font-size: 46px; }
.cg-price-per { font-size: 16px; font-weight: 600; color: var(--cg-muted); }
.cg-price--gratis { color: var(--cg-purple-solid); }
.cg-price-note,
.cg-price-per + .cg-price-note { font-size: 13px; color: var(--cg-muted); margin: 6px 0 0; min-height: 18px; }
/* La nota "facturado anualmente" solo aparece en modo anual */
.cg-planes[data-periodo="mensual"] .cg-card .cg-price-note { visibility: hidden; }

.cg-card__limite {
	margin: 16px 0 22px;
	font-size: 15px;
	color: var(--cg-muted);
	font-weight: 600;
}

/* ===== Botones ===== */
.cg-btn {
	display: inline-block;
	margin-top: auto;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	padding: 13px 28px;
	border-radius: 25px;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.cg-btn--primary {
	background: var(--cg-yellow);
	color: #1a1a1a;
	box-shadow: 0 6px 16px rgba(252,193,7,.35);
}
.cg-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(252,193,7,.45); color: #1a1a1a; }
.cg-btn--soon {
	background: #f0f0f4;
	color: #9a9aa6;
	cursor: not-allowed;
}

/* ===== Notas (a medida / comisión) ===== */
.cg-notes {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin: 34px 0 8px;
}
.cg-note {
	background: var(--cg-soft);
	border: 1px solid var(--cg-line);
	border-radius: 12px;
	padding: 22px 24px;
}
.cg-note--accent { background: #fff8e6; border-color: #f6e1a6; }
.cg-note__title { margin: 0 0 8px; font-size: 16px; font-weight: 800; color: var(--cg-purple-solid); }
.cg-note p { margin: 0; font-size: 15px; line-height: 1.55; color: #3a3a44; }

/* ===== Incluido (lista de funciones) ===== */
.cg-incluido { margin-top: 40px; text-align: center; }
.cg-incluido__title {
	font-size: 14px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--cg-muted);
	margin: 0 0 18px;
}
.cg-features {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: 860px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 26px;
}
.cg-features li {
	position: relative;
	padding-left: 28px;
	font-size: 15px;
	font-weight: 600;
	color: #2c2c36;
}
.cg-features li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	background: var(--cg-purple-2);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px;
}

/* ===== Pasos ===== */
.cg-pasos {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 24px;
	align-items: center;
	background: #fff;
	border: 1px solid var(--cg-line);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0,0,0,.08);
	padding: 34px 36px;
	max-width: 920px;
	margin: 0 auto;
}
.cg-pasos__nombre { margin: 0 0 10px; font-size: 22px; font-weight: 800; color: var(--cg-purple-2); }
.cg-pasos__info p { margin: 0; font-size: 16px; line-height: 1.55; color: #3a3a44; }
.cg-pasos__precio { text-align: center; }
.cg-pasos__precio .cg-price { justify-content: center; }
.cg-pasos__precio .cg-btn { margin-top: 16px; }

/* ===== Nota legal ===== */
.cg-legal { background: var(--cg-soft-2); padding: 30px 0; }
.cg-legal p { margin: 0 auto; max-width: 820px; text-align: center; font-size: 14px; line-height: 1.6; color: var(--cg-muted); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
	.cg-grid--4 { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin: 0 auto; }
}
@media (max-width: 760px) {
	.cg-hero { padding: 140px 0 56px; }
	.cg-grid--4,
	.cg-grid--3 { grid-template-columns: 1fr; max-width: 420px; }
	.cg-notes { grid-template-columns: 1fr; }
	.cg-pasos { grid-template-columns: 1fr; text-align: center; padding: 28px 24px; }
	.cg-section { padding: 56px 0; }
}

/* Accesibilidad: foco visible y movimiento reducido */
.cg-planes a:focus-visible,
.cg-toggle button:focus-visible {
	outline: 3px solid var(--cg-yellow);
	outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
	.cg-card, .cg-btn { transition: none; }
}
