/* =============================================================================
   COSMOBEAUTY — CHROME (footer propio)
   Sustituye al footer del Theme Builder. Identidad: #710C7E · #81B850 · Poppins
   ============================================================================= */

.cosmo-footer {
	--cf-purple: #710C7E;
	--cf-purple-deep: #3F0449;
	--cf-purple-ink: #24022A;
	--cf-green: #81B850;
	--cf-gold: #C2860F;
	--cf-gold-soft: #F4E031;
	--cf-on-dark: #FFFFFF;
	--cf-on-dark-muted: #CBB6D1;
	--cf-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	background: linear-gradient(160deg, var(--cf-purple-deep) 0%, var(--cf-purple-ink) 100%);
	color: var(--cf-on-dark);
	font-family: var(--cf-font);
	font-size: 0.95rem;
	line-height: 1.6;
	margin-top: 0;
}

.cosmo-footer *,
.cosmo-footer *::before,
.cosmo-footer *::after { box-sizing: border-box; }

.cosmo-footer h2 {
	font-family: var(--cf-font);
}

.cosmo-footer__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: clamp(40px, 5vw, 64px) clamp(20px, 4vw, 32px) clamp(28px, 4vw, 44px);
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}

/* ---------- Marca ---------- */
/* inline-flex (no inline-block): evita el colapso circular de
   width:auto + max-width:100% que dejaba el logo en 0×0. */
.cosmo-footer__logo-link {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
}

/* Astra aplica `img{max-width:100%;height:auto}` con alta prioridad:
   se refuerza el tamaño del logo para que respete la altura de diseño. */
.cosmo-footer .cosmo-footer__logo {
	display: block;
	width: auto !important;
	height: clamp(34px, 4vw, 44px) !important;
	max-width: min(220px, 100%) !important;
	/* El logo original es oscuro: se aclara sin pixelar sobre el fondo morado */
	filter: brightness(0) invert(1);
	opacity: .96;
}

.cosmo-footer__tagline {
	margin: 18px 0 10px;
	color: var(--cf-on-dark-muted);
	font-size: 0.9rem;
	max-width: 34ch;
}

.cosmo-footer__meta {
	margin: 0;
	color: var(--cf-on-dark-muted);
	font-size: 0.82rem;
	letter-spacing: .02em;
}

/* ---------- Columnas ---------- */
.cosmo-footer__title {
	margin: 0 0 14px;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cf-gold-soft);
}

.cosmo-footer__title--social { margin-top: 26px; }

.cosmo-footer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cosmo-footer__list a {
	color: var(--cf-on-dark);
	text-decoration: none;
	font-size: 0.92rem;
	display: inline-block;
	padding: 3px 0;
	border-bottom: 1px solid transparent;
	transition: color .18s ease, border-color .18s ease;
}

.cosmo-footer__list a:hover,
.cosmo-footer__list a:focus-visible {
	color: var(--cf-gold-soft);
	border-bottom-color: rgba(244, 224, 49, .5);
}

.cosmo-footer__list--contact a { word-break: break-word; }

/* ---------- Redes ---------- */
.cosmo-footer__social {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cosmo-footer__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	color: var(--cf-on-dark);
	text-decoration: none;
	font-weight: 600;
	font-size: 1rem;
	transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

.cosmo-footer__social-link:hover,
.cosmo-footer__social-link:focus-visible {
	background: var(--cf-purple);
	border-color: var(--cf-green);
	color: #fff;
	transform: translateY(-2px);
}

/* ---------- Línea inferior ---------- */
.cosmo-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	max-width: 1140px;
	margin: 0 auto;
	padding: 18px clamp(20px, 4vw, 32px) 26px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px 28px;
	align-items: center;
	justify-content: space-between;
}

.cosmo-footer__copy {
	margin: 0;
	font-size: 0.82rem;
	color: var(--cf-on-dark-muted);
}

.cosmo-footer__copy strong { color: var(--cf-on-dark); font-weight: 600; }

.cosmo-footer__legal {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
}

.cosmo-footer__legal a {
	color: var(--cf-on-dark-muted);
	text-decoration: none;
	font-size: 0.8rem;
}

.cosmo-footer__legal a:hover,
.cosmo-footer__legal a:focus-visible {
	color: var(--cf-gold-soft);
	text-decoration: underline;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.cosmo-footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
	.cosmo-footer__inner { grid-template-columns: 1fr; gap: 30px; }
	.cosmo-footer__bottom { flex-direction: column; align-items: flex-start; text-align: left; }
	.cosmo-footer__legal { gap: 6px 16px; }
	/* La barra móvil fija no debe tapar el footer */
	.cosmo-footer { padding-bottom: 72px; }
}

/* ---------- A11y ---------- */
.cosmo-footer a:focus-visible {
	outline: 3px solid var(--cf-green);
	outline-offset: 2px;
	border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
	.cosmo-footer__social-link:hover,
	.cosmo-footer__social-link:focus-visible { transform: none; }
}

/* ---------- Impresión ---------- */
@media print {
	.cosmo-footer { display: none !important; }
}

/* =============================================================================
   COSMOBEAUTY — HEADER PROPIO (sustituye al Header 471 de Pro Elements)
   Sin widget nav-menu Pro · sin sticky Pro · sin custom_css Pro
   ============================================================================= */

.cosmo-header {
	--ch-purple: #710C7E;
	--ch-purple-deep: #3F0449;
	--ch-green: #81B850;
	--ch-gold: #C2860F;
	--ch-gold-soft: #F4E031;
	--ch-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	position: sticky;
	top: 0;
	z-index: 999;
	background: linear-gradient(223deg, #710C7E 0%, #3F0449 100%);
	color: #fff;
	font-family: var(--ch-font);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
	transition: box-shadow .25s ease, background-color .25s ease;
}
.cosmo-header *,
.cosmo-header *::before,
.cosmo-header *::after { box-sizing: border-box; }

.cosmo-header.is-stuck { box-shadow: 0 10px 30px rgba(63, 4, 73, .35); }

.cosmo-header__inner {
	max-width: 1420px;
	margin: 0 auto;
	padding: 0 clamp(14px, 2.2vw, 24px);
	min-height: 74px;
	display: flex;
	align-items: center;
	gap: clamp(10px, 1.4vw, 18px);
}

/* Logo */
.cosmo-header__logo-link {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	text-decoration: none;
	max-width: 200px;
}
.cosmo-header__logo {
	display: block;
	width: auto;
	height: clamp(32px, 3.4vw, 42px);
	max-width: min(200px, 36vw);
	filter: brightness(0) invert(1);
}

/* Nav de escritorio */
.cosmo-header__nav { flex: 1 1 auto; display: flex; justify-content: center; }

.cosmo-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 2px;
}
.cosmo-menu > li { position: relative; flex: 0 0 auto; }

/* No comprimir los items: evita que el texto se corte/solape con el siguiente */
.cosmo-menu > li > a { flex: 0 0 auto; }

.cosmo-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 8px 10px;
	color: rgba(255, 255, 255, .92);
	text-decoration: none;
	font-size: .9rem;
	font-weight: 500;
	border-radius: 8px;
	white-space: nowrap;
	transition: color .18s ease, background-color .18s ease;
}
.cosmo-menu > li > a:hover,
.cosmo-menu > li > a:focus-visible,
.cosmo-menu > li.current-menu-item > a {
	color: #fff;
	background: rgba(255, 255, 255, .12);
}
.cosmo-menu > li.current-menu-item > a { box-shadow: inset 0 -3px 0 var(--ch-green); }

/* Submenús (escritorio) */
.cosmo-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 240px;
	list-style: none;
	margin: 0;
	padding: 8px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 18px 44px rgba(63, 4, 73, .22);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
	z-index: 1000;
}
.cosmo-menu > li:hover > .sub-menu,
.cosmo-menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.cosmo-menu .sub-menu a {
	display: block;
	padding: 10px 12px;
	min-height: 42px;
	color: #2B2B2B;
	text-decoration: none;
	font-size: .88rem;
	border-radius: 8px;
}
.cosmo-menu .sub-menu a:hover,
.cosmo-menu .sub-menu a:focus-visible {
	background: rgba(113, 12, 126, .08);
	color: var(--ch-purple);
}

/* CTAs */
.cosmo-header__cta { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.cosmo-header__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 15px;
	border-radius: 100px;
	font-family: var(--ch-font);
	font-size: .84rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.cosmo-header__btn--whatsapp {
	background: var(--ch-green);
	color: #0B2606;
	box-shadow: 0 6px 16px rgba(129, 184, 80, .28);
}
.cosmo-header__btn--whatsapp:hover { transform: translateY(-2px); }
.cosmo-header__btn--subscribe {
	background: linear-gradient(135deg, var(--ch-gold-soft) 0%, var(--ch-gold) 100%);
	color: #3A2400;
	box-shadow: 0 6px 16px rgba(194, 134, 15, .28);
}
.cosmo-header__btn--subscribe:hover { transform: translateY(-2px); }

/* Hamburguesa */
.cosmo-burger {
	display: none;
	width: 46px;
	height: 46px;
	margin-left: auto;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 12px;
	background: rgba(255, 255, 255, .10);
	cursor: pointer;
	align-items: center;
	justify-content: center;
}
.cosmo-burger__box { position: relative; width: 22px; height: 16px; display: block; }
.cosmo-burger__bar {
	position: absolute;
	left: 0;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	transition: transform .22s ease, opacity .22s ease;
}
.cosmo-burger__bar:nth-child(1) { top: 0; }
.cosmo-burger__bar:nth-child(2) { top: 7px; }
.cosmo-burger__bar:nth-child(3) { top: 14px; }
.cosmo-burger[aria-expanded="true"] .cosmo-burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cosmo-burger[aria-expanded="true"] .cosmo-burger__bar:nth-child(2) { opacity: 0; }
.cosmo-burger[aria-expanded="true"] .cosmo-burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Panel móvil */
.cosmo-mobile-nav {
	background: #3F0449;
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding: 10px clamp(16px, 4vw, 24px) 22px;
	max-height: calc(100vh - 74px);
	overflow-y: auto;
}
.cosmo-mobile-nav[hidden] { display: none; }

.cosmo-menu--mobile { flex-direction: column; align-items: stretch; gap: 0; }
.cosmo-menu--mobile > li > a {
	min-height: 50px;
	padding: 12px 8px;
	border-bottom: 1px solid rgba(255, 255, 255, .10);
	border-radius: 0;
	font-size: 1rem;
}
.cosmo-menu--mobile .sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	background: rgba(255, 255, 255, .06);
	box-shadow: none;
	padding: 4px 0 4px 12px;
	border-radius: 0;
}
.cosmo-menu--mobile .sub-menu a { color: rgba(255, 255, 255, .88); min-height: 46px; }
.cosmo-menu--mobile .sub-menu a:hover,
.cosmo-menu--mobile .sub-menu a:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }

.cosmo-mobile-nav__cta {
	display: flex;
	gap: 10px;
	margin-top: 16px;
	flex-wrap: wrap;
}
.cosmo-mobile-nav__cta .cosmo-header__btn { flex: 1 1 auto; }

/* ------- Barra móvil inferior (sustituye .icon-menu) ------- */
.cosmo-bottombar {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 998;
	background: rgba(36, 2, 42, .9);
	backdrop-filter: saturate(180%) blur(18px);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding-bottom: env(safe-area-inset-bottom, 0);
	font-family: var(--ch-font);
}
.cosmo-bottombar__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: stretch;
}
.cosmo-bottombar__item { flex: 1 1 0; }
.cosmo-bottombar__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 58px;
	padding: 8px 4px;
	color: rgba(255, 255, 255, .82);
	text-decoration: none;
	font-size: .68rem;
	font-weight: 500;
	letter-spacing: .01em;
	transition: color .18s ease, background-color .18s ease;
}
.cosmo-bottombar__link:hover,
.cosmo-bottombar__link:focus-visible { color: #fff; background: rgba(255, 255, 255, .07); }
.cosmo-bottombar__link[aria-current="page"] { color: var(--ch-gold-soft); }
.cosmo-bottombar__icon { display: inline-flex; line-height: 0; }
.cosmo-bottombar__icon svg { width: 22px; height: 22px; }

/* ---------- Responsive ----------
   El nav tiene 5 items + logo + 2 CTAs: necesita ~1200px para respirar.
   Por debajo de 1150 se pasa a modo móvil (hamburguesa + barra inferior). */
@media (max-width: 1360px) {
	.cosmo-header__logo-link { max-width: 170px; }
	.cosmo-header__logo { max-width: min(170px, 34vw); }
	.cosmo-menu > li > a { padding: 7px 7px; font-size: .84rem; }
	.cosmo-header__btn { padding: 0 11px; font-size: .79rem; }
}

@media (max-width: 1240px) {
	.cosmo-header__inner { gap: 8px; }
	.cosmo-header__logo-link { max-width: 150px; }
	.cosmo-header__logo { max-width: min(150px, 30vw); }
	.cosmo-menu > li > a { padding: 6px 5px; font-size: .78rem; }
	.cosmo-header__btn { padding: 0 9px; font-size: .74rem; }
}

@media (max-width: 1180px) {
	.cosmo-header__nav,
	.cosmo-header__cta { display: none; }
	.cosmo-burger { display: inline-flex; }
	.cosmo-bottombar { display: block; }
	/* Que la barra inferior no tape contenido ni footer */
	body { padding-bottom: 58px; }
}

@media (max-width: 480px) {
	.cosmo-header__inner { min-height: 64px; }
	.cosmo-header__logo { height: 30px; max-width: 58vw; }
}

/* ---------- A11y ---------- */
.cosmo-header a:focus-visible,
.cosmo-burger:focus-visible,
.cosmo-bottombar__link:focus-visible {
	outline: 3px solid var(--ch-green);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.cosmo-header,
	.cosmo-menu .sub-menu,
	.cosmo-burger__bar,
	.cosmo-header__btn { transition: none; }
	.cosmo-header__btn:hover { transform: none; }
}

@media print {
	.cosmo-header, .cosmo-bottombar { display: none !important; }
}

/* =============================================================================
   BLOG SINGLE (sustituye la plantilla 185 de Pro Elements)
   ============================================================================= */

.cosmo-entry,
.cosmo-related {
	--cs-purple: #710C7E;
	--cs-purple-deep: #3F0449;
	--cs-green: #81B850;
	--cs-gold: #C2860F;
	--cs-ink: #1E1E24;
	--cs-muted: #5C5C63;
	--cs-border: #E6E6EA;
	--cs-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-family: var(--cs-font);
	color: var(--cs-ink);
}

/* Migas */
.cosmo-breadcrumb {
	max-width: 780px;
	margin: 0 auto 18px;
	font-size: .82rem;
	color: var(--cs-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.cosmo-breadcrumb a { color: var(--cs-purple); text-decoration: none; }
.cosmo-breadcrumb a:hover, .cosmo-breadcrumb a:focus-visible { text-decoration: underline; }

/* Artículo */
.cosmo-entry { max-width: 780px; margin: 0 auto; }

.cosmo-entry__header { margin-bottom: 22px; }

.cosmo-entry__cats { margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }

.cosmo-entry__cat {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 4px 14px;
	border-radius: 100px;
	background: rgba(113, 12, 126, .08);
	color: var(--cs-purple);
	text-decoration: none;
	font-size: .74rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.cosmo-entry__cat:hover, .cosmo-entry__cat:focus-visible { background: var(--cs-purple); color: #fff; }

.cosmo-entry__title {
	margin: 0 0 16px;
	font-size: clamp(1.6rem, 4.2vw, 2.5rem);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -.015em;
	color: var(--cs-purple-deep);
}

.cosmo-entry__meta {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	align-items: center;
	font-size: .84rem;
	color: var(--cs-muted);
	border-top: 1px solid var(--cs-border);
	border-bottom: 1px solid var(--cs-border);
	padding: 12px 0;
}
.cosmo-entry__meta-item { display: inline-flex; align-items: center; gap: 7px; }
.cosmo-entry__meta-icon { display: inline-flex; color: var(--cs-green); line-height: 0; }
.cosmo-entry__meta a { color: var(--cs-purple); text-decoration: none; }

/* Imagen destacada */
.cosmo-entry__thumb {
	margin: 26px 0 0;
	padding: 0;
	border-radius: 16px;
	overflow: hidden;
	background: #F4F1F6;
}
.cosmo-entry__img { display: block; width: 100%; height: auto; }
.cosmo-entry__caption {
	margin: 0;
	padding: 10px 14px;
	font-size: .78rem;
	color: var(--cs-muted);
	background: #FAF9FB;
}

/* Contenido */
.cosmo-entry__content {
	margin-top: 28px;
	font-size: 1.03rem;
	line-height: 1.78;
	color: #2B2B2B;
}
.cosmo-entry__content > *:first-child { margin-top: 0; }
.cosmo-entry__content h2 {
	font-size: clamp(1.25rem, 2.6vw, 1.6rem);
	color: var(--cs-purple-deep);
	margin: 2em 0 .6em;
	line-height: 1.3;
}
.cosmo-entry__content h3 {
	font-size: clamp(1.1rem, 2.1vw, 1.3rem);
	color: var(--cs-purple);
	margin: 1.7em 0 .5em;
	line-height: 1.35;
}
.cosmo-entry__content a { color: var(--cs-purple); text-decoration: underline; text-underline-offset: 2px; }
.cosmo-entry__content a:hover, .cosmo-entry__content a:focus-visible { color: var(--cs-green); }
.cosmo-entry__content img { max-width: 100%; height: auto; border-radius: 12px; }
.cosmo-entry__content figure { margin: 1.6em 0; }
.cosmo-entry__content figcaption { font-size: .8rem; color: var(--cs-muted); text-align: center; margin-top: 8px; }
.cosmo-entry__content ul, .cosmo-entry__content ol { padding-left: 1.3em; }
.cosmo-entry__content li { margin-bottom: .5em; }
.cosmo-entry__content blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--cs-green);
	color: var(--cs-muted);
	font-style: italic;
}
.cosmo-entry__content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cosmo-entry__content th, .cosmo-entry__content td { border: 1px solid var(--cs-border); padding: 10px 12px; text-align: left; }
.cosmo-entry__content th { background: #F7F4F8; }
.cosmo-entry__content iframe { max-width: 100%; }

/* Compartir */
.cosmo-share { margin: 38px 0 0; padding-top: 22px; border-top: 1px solid var(--cs-border); }
.cosmo-share__title {
	margin: 0 0 14px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cs-muted);
}
.cosmo-share__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cosmo-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: #F4F1F6;
	color: var(--cs-purple);
	text-decoration: none;
	transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.cosmo-share__link:hover, .cosmo-share__link:focus-visible {
	background: var(--cs-purple);
	color: #fff;
	transform: translateY(-2px);
}
.cosmo-share__link--whatsapp:hover, .cosmo-share__link--whatsapp:focus-visible { background: var(--cs-green); color: #0B2606; }

/* Navegación anterior / siguiente */
.cosmo-entry__footer { margin-top: 34px; }
.cosmo-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	border-top: 1px solid var(--cs-border);
	padding-top: 24px;
}
.cosmo-postnav__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cosmo-postnav__item--next { text-align: right; }
.cosmo-postnav__label { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cs-muted); }
.cosmo-postnav__link { color: var(--cs-purple); text-decoration: none; font-weight: 600; font-size: .95rem; line-height: 1.4; }
.cosmo-postnav__link:hover, .cosmo-postnav__link:focus-visible { color: var(--cs-green); text-decoration: underline; }

/* Relacionados */
.cosmo-related { max-width: 1140px; margin: 48px auto 0; }

/* Responsive */
@media (max-width: 640px) {
	.cosmo-entry__meta { gap: 8px 16px; font-size: .8rem; }
	.cosmo-entry__content { font-size: 1rem; line-height: 1.75; }
	.cosmo-postnav { grid-template-columns: 1fr; }
	.cosmo-postnav__item--next { text-align: left; }
	.cosmo-share__link { width: 44px; height: 44px; }
}

/* A11y */
.cosmo-entry a:focus-visible,
.cosmo-share__link:focus-visible,
.cosmo-entry__cat:focus-visible {
	outline: 3px solid var(--cs-green);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.cosmo-share__link { transition: none; }
	.cosmo-share__link:hover, .cosmo-share__link:focus-visible { transform: none; }
}

/* =============================================================================
   ARCHIVE (sustituye la plantilla 243 de Pro Elements + bloque PostX)
   ============================================================================= */

/* Astra marca el content-area con .ast-grid-N (layout de blog en rejilla).
   Con nuestro archive propio eso convierte .cosmo-archive en una celda de esa
   rejilla y encoge las tarjetas a 1/3. Se neutraliza SOLO en la página del
   archivo propio, donde Astra ya no pinta las tarjetas. */
.content-area.ast-grid-1,
.content-area.ast-grid-2,
.content-area.ast-grid-3,
.content-area.ast-grid-4 { display: block; grid-template-columns: none; }
.content-area > .cosmo-archive { grid-column: 1 / -1; width: 100%; }

/* La tarjeta debe llenar siempre su celda de rejilla */
.cosmo-cards > .cosmo-card { width: 100%; justify-self: stretch; align-self: stretch; }

.cosmo-archive {
	--ca-purple: #710C7E;
	--ca-purple-deep: #3F0449;
	--ca-green: #81B850;
	--ca-gold: #C2860F;
	--ca-ink: #1E1E24;
	--ca-muted: #5C5C63;
	--ca-border: #E6E6EA;
	--ca-font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

	max-width: 1140px;
	margin: 0 auto;
	font-family: var(--ca-font);
	color: var(--ca-ink);
}

/* ---------- Cabecera del archivo ---------- */
.cosmo-archive__header { margin: 6px 0 24px; }

.cosmo-archive__eyebrow {
	margin: 0 0 6px;
	font-size: .74rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--ca-gold);
}

.cosmo-archive__title {
	margin: 0 0 10px;
	font-size: clamp(1.6rem, 3.6vw, 2.3rem);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -.015em;
	color: var(--ca-purple-deep);
}

.cosmo-archive__desc {
	color: var(--ca-muted);
	font-size: .96rem;
	line-height: 1.7;
	margin-bottom: 10px;
}

.cosmo-archive__count {
	margin: 0;
	font-size: .82rem;
	color: var(--ca-muted);
}

/* ---------- Filtro de categorías ---------- */
.cosmo-filters { margin: 0 0 26px; }

.cosmo-filters__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.cosmo-filters__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px;
	border-radius: 100px;
	border: 1px solid var(--ca-border);
	background: #fff;
	color: var(--ca-purple);
	text-decoration: none;
	font-size: .84rem;
	font-weight: 600;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.cosmo-filters__link:hover,
.cosmo-filters__link:focus-visible { border-color: var(--ca-green); }

.cosmo-filters__link.is-active {
	background: var(--ca-purple);
	border-color: var(--ca-purple);
	color: #fff;
}

.cosmo-filters__count {
	font-size: .72rem;
	font-weight: 600;
	opacity: .75;
}

/* ---------- Rejilla de tarjetas ---------- */
.cosmo-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.cosmo-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: #fff;
	border: 1px solid var(--ca-border);
	border-radius: 16px;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cosmo-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(63, 4, 73, .12); border-color: rgba(113, 12, 126, .2); }

.cosmo-card__media { display: block; background: #F4F1F6; overflow: hidden; }
/* Astra aplica `img{height:auto;max-width:100%}` y gana sobre un `height` fijo.
   Se usa aspect-ratio (convive con height:auto) + object-fit para recortar. */
.cosmo-cards .cosmo-card__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform .3s ease;
}
.cosmo-card:hover .cosmo-card__img { transform: scale(1.04); }

.cosmo-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 20px 20px;
	flex: 1 1 auto;
	min-width: 0;
}

.cosmo-card__cats { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.cosmo-card__cat {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 100px;
	background: rgba(113, 12, 126, .08);
	color: var(--ca-purple);
	text-decoration: none;
	font-size: .66rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.cosmo-card__cat:hover, .cosmo-card__cat:focus-visible { background: var(--ca-purple); color: #fff; }

.cosmo-card__title {
	margin: 0;
	font-size: 1.06rem;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ca-purple-deep);
	overflow-wrap: anywhere;
}
.cosmo-card__title a { color: inherit; text-decoration: none; }
.cosmo-card__title a:hover, .cosmo-card__title a:focus-visible { color: var(--ca-purple); text-decoration: underline; }

.cosmo-card__excerpt {
	margin: 0;
	font-size: .9rem;
	line-height: 1.62;
	color: var(--ca-muted);
	overflow-wrap: anywhere;
}

.cosmo-card__meta {
	list-style: none;
	margin: auto 0 0;
	padding: 12px 0 0;
	border-top: 1px solid var(--ca-border);
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	font-size: .76rem;
	color: var(--ca-muted);
}
.cosmo-card__meta li { min-width: 0; }

/* ---------- Paginación nativa ---------- */
.cosmo-pagination { margin-top: 36px; }

.cosmo-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	align-items: center;
}

.cosmo-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 14px;
	border-radius: 10px;
	border: 1px solid var(--ca-border);
	background: #fff;
	color: var(--ca-purple);
	text-decoration: none;
	font-size: .88rem;
	font-weight: 600;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.cosmo-pagination .page-numbers:hover,
.cosmo-pagination .page-numbers:focus-visible { border-color: var(--ca-green); background: rgba(129, 184, 80, .08); }
.cosmo-pagination .page-numbers.current {
	background: var(--ca-purple);
	border-color: var(--ca-purple);
	color: #fff;
}
.cosmo-pagination .page-numbers.dots { border-color: transparent; background: transparent; }
.cosmo-pagination .prev.page-numbers,
.cosmo-pagination .next.page-numbers { padding: 0 16px; }

.cosmo-archive__empty {
	padding: 40px 0;
	color: var(--ca-muted);
	text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.cosmo-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 640px) {
	.cosmo-cards { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.cosmo-card__img { height: 190px; }
	.cosmo-card__title { font-size: 1rem; }
	.cosmo-filters__list { gap: 8px; }
	.cosmo-filters__link { padding: 8px 13px; font-size: .8rem; }
	.cosmo-pagination .prev.page-numbers,
	.cosmo-pagination .next.page-numbers { padding: 0 12px; font-size: .82rem; }
}

/* ---------- A11y ---------- */
.cosmo-archive a:focus-visible {
	outline: 3px solid var(--ca-green);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.cosmo-card,
	.cosmo-card__img,
	.cosmo-filters__link,
	.cosmo-pagination .page-numbers { transition: none; }
	.cosmo-card:hover { transform: none; }
	.cosmo-card:hover .cosmo-card__img { transform: none; }
}

@media print {
	.cosmo-filters, .cosmo-pagination { display: none !important; }
}
