/*
 * GlobalSpeak Language — Legal pages (Privacy, Terms, Cookies, Accessibility)
 *
 * All design for the legal pages lives here. The page TEXT is edited in
 * WP Admin -> Pages with the normal block editor; nothing here needs to
 * be touched for content changes. Section numbers and the table of
 * contents are generated automatically.
 */

:root {
	--gsl-bg: #ffffff;
	--gsl-bg-soft: #f8f7ff;
	--gsl-text: #1e1b4b;
	--gsl-text-muted: #6b7280;
	--gsl-indigo: #6366f1;
	--gsl-purple: #8b5cf6;
	--gsl-border: rgba(99, 102, 241, 0.12);
	--gsl-radius: 16px;
}

/* Page wrapper */
.gsl-legal-main { margin: 0; padding: 0; }

/* ── Hero ─────────────────────────────────────────────── */
.gsl-legal-hero {
	position: relative;
	background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
	padding: 4.5rem 0 3.5rem;
	overflow: hidden;
}
.gsl-legal-hero__bg {
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(139, 92, 246, 0.25) 0%, transparent 70%),
		radial-gradient(ellipse 50% 80% at 20% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 60%);
}
.gsl-legal-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 1.5rem;
}
.gsl-legal-hero__breadcrumb {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	font-size: 0.85rem;
}
.gsl-legal-hero__breadcrumb a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.gsl-legal-hero__breadcrumb a:hover { color: #fff; }
.gsl-legal-hero__breadcrumb span { color: rgba(255,255,255,0.4); }
.gsl-legal-hero__breadcrumb [aria-current] { color: #a5b4fc; }
.gsl-legal-hero .wp-block-post-title,
.gsl-legal-hero__title {
	font-size: clamp(2rem, 5vw, 3.2rem);
	font-weight: 800;
	color: #fff;
	line-height: 1.1;
	margin: 0 0 1rem;
	letter-spacing: -0.02em;
}
.gsl-legal-hero__subtitle {
	font-size: clamp(1rem, 2vw, 1.15rem);
	color: rgba(255,255,255,0.75);
	max-width: 640px;
	line-height: 1.7;
	margin: 0 0 1.5rem;
}
.gsl-legal-hero__meta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 0; }
.gsl-legal-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	background: rgba(255,255,255,0.1);
	border: 1px solid rgba(255,255,255,0.15);
	color: rgba(255,255,255,0.85);
	font-size: 0.82rem;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	margin: 0;
}
/* "Last updated" badge is the page's real last-modified date (automatic). */
.gsl-legal-hero__badge--date::before { content: "Last updated: "; white-space: pre; }

/* ── Layout: sticky table of contents + content ───────── */
.gsl-legal-layout {
	max-width: 1140px;
	margin: 0 auto;
	padding: 3.5rem 1.5rem 4.5rem;
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 3rem;
	align-items: start;
}
@media (max-width: 860px) {
	.gsl-legal-layout { grid-template-columns: 1fr; gap: 2rem; }
}
.gsl-legal-toc {
	position: sticky;
	top: 110px;
	background: var(--gsl-bg-soft);
	border: 1px solid var(--gsl-border);
	border-radius: var(--gsl-radius);
	padding: 1.5rem;
}
@media (max-width: 860px) { .gsl-legal-toc { position: static; } }
.gsl-legal-toc__title {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--gsl-text-muted);
	margin: 0 0 1rem;
}
.gsl-legal-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; counter-reset: gsltoc; }
.gsl-legal-toc a {
	display: flex;
	gap: 0.55rem;
	color: var(--gsl-text-muted);
	text-decoration: none;
	font-size: 0.86rem;
	line-height: 1.45;
	padding: 0.3rem 0.5rem;
	border-radius: 8px;
	counter-increment: gsltoc;
	transition: color 0.2s, background 0.2s;
}
.gsl-legal-toc a::before { content: counter(gsltoc); font-weight: 700; color: var(--gsl-indigo); font-size: 0.78rem; min-width: 1.1rem; }
.gsl-legal-toc a:hover { color: var(--gsl-indigo); background: rgba(99,102,241,0.07); }

/* ── Content (styles the normal editor blocks) ────────── */
.gsl-legal-content { min-width: 0; counter-reset: gslsec; }

.gsl-legal-content h2 {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	font-size: 1.45rem;
	font-weight: 800;
	color: var(--gsl-text);
	letter-spacing: -0.01em;
	margin: 2.5rem 0 1rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px solid var(--gsl-border);
	scroll-margin-top: 120px;
	counter-increment: gslsec;
}
.gsl-legal-content h2:first-child { margin-top: 0; }
/* Automatic section numbers — renumber themselves when sections are added/removed. */
.gsl-legal-content h2::before {
	content: counter(gslsec, decimal-leading-zero) ".";
	background: linear-gradient(135deg, var(--gsl-indigo), var(--gsl-purple));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	font-size: 1.1rem;
	font-weight: 800;
}
.gsl-legal-content h3 { font-size: 1.05rem; font-weight: 700; color: var(--gsl-text); margin: 1.5rem 0 0.6rem; }
.gsl-legal-content p { color: var(--gsl-text-muted); line-height: 1.8; font-size: 0.95rem; margin: 0 0 1rem; }
.gsl-legal-content ul { margin: 0 0 1rem; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.gsl-legal-content ul li { color: var(--gsl-text-muted); line-height: 1.7; font-size: 0.95rem; }
.gsl-legal-content ul li::marker { color: var(--gsl-indigo); }
.gsl-legal-content a { color: var(--gsl-indigo); text-decoration: underline; text-underline-offset: 2px; }
.gsl-legal-content strong { color: var(--gsl-text); }

/* Tables (plain tables from the Classic Editor, or the Table block) */
.gsl-legal-content .wp-block-table { border: none; overflow-x: auto; margin: 0 0 1rem; }
.gsl-legal-content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.88rem;
	margin: 0 0 1rem;
	border: 1px solid var(--gsl-border);
	border-radius: 12px;
	overflow: hidden;
}
.gsl-legal-content th { background: var(--gsl-bg-soft); color: var(--gsl-text); font-weight: 700; text-align: left; padding: 0.75rem 1rem; border: none; border-bottom: 1px solid var(--gsl-border); }
.gsl-legal-content td { color: var(--gsl-text-muted); padding: 0.75rem 1rem; border: none; border-bottom: 1px solid var(--gsl-border); line-height: 1.6; vertical-align: top; }
.gsl-legal-content tr:last-child td { border-bottom: none; }

/* Callout note (plain blockquote from the Classic Editor, or Quote block) */
.gsl-legal-content blockquote {
	background: var(--gsl-bg-soft);
	border: 1px solid var(--gsl-border);
	border-left: 4px solid var(--gsl-indigo);
	border-radius: 12px;
	padding: 1.1rem 1.25rem;
	margin: 0 0 1rem;
	font-style: normal;
}
.gsl-legal-content blockquote p { margin: 0; font-size: 0.9rem; }

/* Contact card (a Group block with the "gsl-legal-contact-card" class) */
.gsl-legal-content .gsl-legal-contact-card {
	background: linear-gradient(135deg, #1e1b4b, #312e81);
	border-radius: var(--gsl-radius);
	padding: 2rem;
	color: #fff;
	margin: 0 0 1rem;
}
.gsl-legal-content .gsl-legal-contact-card h3 { color: #fff; margin: 0 0 0.5rem; font-size: 1.15rem; }
.gsl-legal-content .gsl-legal-contact-card p { color: rgba(255,255,255,0.75); margin: 0 0 1rem; }
.gsl-legal-content .gsl-legal-contact-card ul { list-style: none; padding: 0; margin: 0; gap: 0.5rem; }
.gsl-legal-content .gsl-legal-contact-card ul li { color: rgba(255,255,255,0.85); font-size: 0.92rem; }
.gsl-legal-content .gsl-legal-contact-card a { color: #a5b4fc; text-decoration: none; }
.gsl-legal-content .gsl-legal-contact-card a:hover { text-decoration: underline; }

/* ── Override WordPress is-layout-flow that kills display:grid ────────── */
.wp-block-group.gsl-legal-layout,
.gsl-legal-layout.is-layout-flow,
.gsl-legal-layout {
	display: grid !important;
	grid-template-columns: 260px minmax(0, 1fr) !important;
	max-width: 1140px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 3.5rem 1.5rem 4.5rem !important;
	gap: 3rem !important;
	align-items: start !important;
}
@media (max-width: 860px) {
	.wp-block-group.gsl-legal-layout,
	.gsl-legal-layout {
		grid-template-columns: 1fr !important;
		gap: 2rem !important;
	}
}
