/**
 * La Spunta Legal — frontend (aligned with ls-hub / site pages).
 */

.ls-legal {
	--ls-blue: #2563eb;
	--ls-blue-deep: #1d4ed8;
	--ls-navy: #12305e;
	--ls-ink: #111111;
	--ls-muted: #64748b;
	--ls-line: #e2e8f0;
	--ls-panel: #eef3fb;
	--ls-panel-soft: #f7f9fc;
	max-width: 1120px;
	width: 100%;
	margin: 0 auto 3.5rem;
	padding: 0;
	color: var(--ls-ink);
	font-family: var(--ls-sans, "Work Sans", system-ui, sans-serif);
	box-sizing: border-box;
}

.ls-legal *,
.ls-legal *::before,
.ls-legal *::after {
	box-sizing: border-box;
}

.ls-legal h1,
.ls-legal h2,
.ls-legal h3,
.ls-legal .ls-legal-hero__title,
.ls-legal .ls-legal-card__title,
.ls-legal .ls-legal-feed__title,
.ls-legal .ls-legal-contact__title {
	font-family: var(--ls-sans, "Work Sans", system-ui, sans-serif) !important;
}

/* Hide duplicate WP title on legal hub (shortcode carries headline). */
body.ls-legal-hub-page .the-page-heading,
body.ls-legal-hub-page .post-header .main-heading,
body.ls-legal-hub-page .ls-page-fullwidth > header.post-header {
	display: none;
}

/*
 * Full template width — override Smart Mag .the-post-modern (~67.5% / 790px).
 * Matches header .wrap (1200px) and ls-hub layout.
 */
body.ls-legal-page .ls-legal-fullwidth,
body.ls-legal-page .ls-page-fullwidth.ls-legal-fullwidth {
	width: 100% !important;
	max-width: 100% !important;
}

@media (min-width: 1201px) {
	body.ls-legal-page .ls-legal-fullwidth.the-post-modern,
	body.ls-legal-page .the-post-modern.ls-legal-fullwidth {
		width: 100% !important;
	}
}

@media (min-width: 941px) and (max-width: 1200px) {
	body.ls-legal-page .ls-legal-fullwidth.the-post-modern {
		max-width: 100% !important;
	}
}

body.ls-legal-hub-page .entry-content,
body.ls-legal-corrections-page .entry-content {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	--post-content-width: 100% !important;
}

/* Institutional prose pages: readable measure inside full column */
body.ls-legal-page:not(.ls-legal-hub-page):not(.ls-legal-corrections-page) .entry-content {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	color: #334155;
	font-size: 1.05rem;
	line-height: 1.75;
}

body.ls-legal-page .entry-content > :first-child {
	margin-top: 0;
}

body.ls-legal-page .entry-content h2 {
	font-family: var(--ls-sans, "Work Sans", system-ui, sans-serif) !important;
	font-size: clamp(1.35rem, 2.2vw, 1.65rem);
	color: #0f172a;
	margin: 2.25rem 0 0.85rem;
	font-weight: 700;
	line-height: 1.25;
}

body.ls-legal-page .entry-content h3 {
	font-family: var(--ls-sans, "Work Sans", system-ui, sans-serif) !important;
	font-size: 1.15rem;
	color: #0f172a;
	margin: 1.75rem 0 0.65rem;
}

body.ls-legal-page .entry-content p,
body.ls-legal-page .entry-content li {
	line-height: 1.75;
}

body.ls-legal-page .entry-content a {
	color: var(--ls-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.ls-legal-page .entry-content a:hover {
	color: var(--ls-blue-deep);
}

body.ls-legal-page .post-header .main-heading {
	font-family: var(--ls-sans, "Work Sans", system-ui, sans-serif) !important;
	font-size: clamp(1.85rem, 3vw, 2.35rem);
	color: #0f172a;
	margin-bottom: 1.25rem;
}

body.ls-legal-corrections-page .entry-content > :not(.ls-legal) {
	display: none;
}

/* —— Hero (hub) —— */
.ls-legal-hero {
	margin: 0.5rem 0 2.5rem;
	max-width: 52rem;
}

.ls-legal-hero__badge {
	display: inline-block;
	background: #e8f0ff;
	color: var(--ls-blue);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.4rem 0.85rem;
	border-radius: 999px;
	margin-bottom: 1rem;
}

.ls-legal-hero__title {
	font-size: clamp(1.85rem, 3.2vw, 2.45rem);
	line-height: 1.2;
	color: #0f172a;
	margin: 0 0 1rem;
	font-weight: 700;
}

.ls-legal-hero__text {
	color: var(--ls-muted);
	font-size: 1.05rem;
	line-height: 1.65;
	margin: 0;
}

/* —— Panel + cards —— */
.ls-legal-panel {
	margin-bottom: 1rem;
}

.ls-legal-panel__inner {
	background: var(--ls-panel);
	border-radius: 18px;
	padding: 2rem 1.75rem 1.75rem;
}

.ls-legal-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.25rem;
}

.ls-legal-card {
	background: #fff;
	border-radius: 14px;
	padding: 1.25rem 1.2rem 1.15rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	border: 1px solid rgba(226, 232, 240, 0.9);
	min-height: 100%;
}

.ls-legal-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: var(--ls-panel-soft);
	color: var(--ls-blue);
	margin-bottom: 0.85rem;
}

.ls-legal-card__title {
	margin: 0 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.ls-legal-card__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ls-legal-card__links li + li {
	margin-top: 0.55rem;
	padding-top: 0.55rem;
	border-top: 1px solid #f1f5f9;
}

.ls-legal-card__links a,
.ls-legal-card__links .ls-legal-manage-cookies {
	color: var(--ls-blue);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.45;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	display: inline;
	font-family: inherit;
}

.ls-legal-card__links a:hover,
.ls-legal-card__links .ls-legal-manage-cookies:hover {
	color: var(--ls-blue-deep);
	text-decoration: underline;
}

/* Never embed Complianz category UI inside hub cards. */
.ls-legal-card #cmplz-manage-consent-container,
.ls-legal-card .cmplz-manage-consent-container,
.ls-legal-card .cmplz-categories {
	display: none !important;
}

/* Cookie policy page: small blue chevrons on category toggles. */
.ls-legal-page #cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-category-toggle {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	width: auto !important;
	height: auto !important;
	box-shadow: none !important;
	color: var(--ls-blue) !important;
	cursor: pointer;
}

.ls-legal-page #cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-category-toggle .cmplz-icon.cmplz-open {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 16px !important;
	height: 16px !important;
	background: none !important;
}

.ls-legal-page #cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-category-toggle .cmplz-icon.cmplz-open svg {
	width: 14px !important;
	height: 14px !important;
	fill: var(--ls-blue) !important;
	color: var(--ls-blue) !important;
}

.ls-legal-page #cmplz-manage-consent-container.cmplz-manage-consent-container .cmplz-category-header {
	display: grid !important;
	grid-template-columns: 1fr auto 20px !important;
	align-items: center !important;
	gap: 8px !important;
}

/* —— Corrections lead + feed —— */
.ls-legal-lead {
	max-width: 42rem;
	margin: 0 0 1.75rem;
}

.ls-legal-lead__text {
	margin: 0;
	color: var(--ls-muted);
	font-size: 1.05rem;
	line-height: 1.65;
}

.ls-legal-empty {
	background: var(--ls-panel-soft);
	border: 1px dashed #cbd5e1;
	border-radius: 14px;
	padding: 2rem 1.5rem;
	text-align: center;
	color: var(--ls-muted);
}

.ls-legal-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #fff;
	color: var(--ls-blue);
	margin-bottom: 0.75rem;
}

.ls-legal-feed__list {
	display: grid;
	gap: 1rem;
}

.ls-legal-feed__item {
	background: #fff;
	border: 1px solid var(--ls-line);
	border-radius: 14px;
	padding: 1.25rem 1.35rem;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ls-legal-feed__item:hover {
	border-color: #cbd5e1;
	box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.ls-legal-feed__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-bottom: 0.5rem;
}

.ls-legal-feed__label {
	display: inline-block;
	background: #fee2e2;
	color: #991b1b;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
}

.ls-legal-feed__date {
	font-size: 0.8125rem;
	color: var(--ls-muted);
}

.ls-legal-feed__title {
	margin: 0 0 0.45rem;
	font-size: clamp(1.15rem, 2vw, 1.35rem);
	line-height: 1.3;
}

.ls-legal-feed__title a {
	color: #0f172a;
	text-decoration: none;
}

.ls-legal-feed__title a:hover {
	color: var(--ls-blue);
}

.ls-legal-feed__summary,
.ls-legal-feed__target {
	margin: 0.35rem 0 0;
	color: #475569;
	line-height: 1.55;
	font-size: 0.98rem;
}

.ls-legal-feed__target a {
	color: var(--ls-blue);
	font-weight: 600;
	text-decoration: none;
}

.ls-legal-feed__target a:hover {
	text-decoration: underline;
}

.ls-legal-feed__more {
	display: inline-block;
	margin-top: 0.85rem;
	color: var(--ls-blue);
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none;
}

.ls-legal-feed__more:hover {
	color: var(--ls-blue-deep);
	text-decoration: underline;
}

.ls-legal-contact {
	margin-top: 2rem;
	background: var(--ls-panel);
	border-radius: 14px;
	padding: 1.35rem 1.5rem;
	max-width: 42rem;
}

.ls-legal-contact__title {
	margin: 0 0 0.45rem;
	font-size: 1.1rem;
	color: #0f172a;
}

.ls-legal-contact__text {
	margin: 0;
	color: var(--ls-muted);
	line-height: 1.6;
}

.ls-legal-contact__text a {
	color: var(--ls-blue);
	font-weight: 600;
}

/* —— Footer legal bar —— */
.ls-legal-bar {
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	background: #f8fafc;
	font-family: var(--ls-sans, "Work Sans", system-ui, sans-serif);
	font-size: 0.8125rem;
}

.ls-legal-bar__inner {
	padding: 12px 0 16px;
}

.ls-legal-bar__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.ls-legal-bar__list a,
.ls-legal-bar .ls-legal-manage-cookies {
	color: #475569;
	text-decoration: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
	font-size: inherit;
}

.ls-legal-bar__list a:hover,
.ls-legal-manage-cookies:hover {
	color: #0f172a;
	text-decoration: underline;
}

/* —— Article notices / disclosures —— */
.ls-correction-notice {
	border-left: 4px solid #dc2626;
	background: #fef2f2;
	padding: 0.85rem 1rem;
	margin: 0 0 1.25rem;
	border-radius: 0 10px 10px 0;
}

.ls-correction-notice__label {
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	margin: 0 0 0.35rem;
	color: #991b1b;
}

.ls-correction-notice__text {
	margin: 0;
	color: #7f1d1d;
	line-height: 1.55;
}

.ls-correction-notice__text a {
	color: #991b1b;
	font-weight: 600;
}

.ls-advertorial-disclosure {
	border: 1px solid #fcd34d;
	background: #fffbeb;
	padding: 0.85rem 1rem;
	margin: 0 0 1rem;
	border-radius: 10px;
	font-size: 0.9375rem;
	line-height: 1.55;
}

.ls-advertorial-disclosure p {
	margin: 0;
}

.ls-advertorial-policy-link {
	margin: 0.5rem 0 0;
	font-size: 0.875rem;
}

.ls-advertorial-policy-link a {
	color: #b45309;
	font-weight: 600;
}

.ls-legal-editorial-link {
	margin-top: 0.75rem;
	font-size: 0.9375rem;
}

.ls-legal-editorial-link a {
	color: var(--ls-blue);
	text-decoration: none;
	font-weight: 600;
}

.ls-legal-editorial-link a:hover {
	text-decoration: underline;
}

.ls-correction-original {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ls-line);
}

.ls-correction-original a {
	color: var(--ls-blue);
	font-weight: 600;
	text-decoration: none;
}

.ls-correction-original a:hover {
	text-decoration: underline;
}

.ls-correction-badge {
	display: inline-block;
	background: #fecaca;
	color: #991b1b;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
}

@media (max-width: 1024px) {
	.ls-legal-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.ls-legal-grid {
		grid-template-columns: 1fr;
	}

	.ls-legal-panel__inner {
		padding: 1.35rem 1.1rem;
	}

	.ls-legal-bar__list {
		justify-content: flex-start;
	}
}
