/* JustGroupLink theme — design tokens & layout
   Palette: primary blue, purple-gradient secondary, light-gray background,
   white cards, rounded professional buttons, per project spec. */

:root {
	--jglt-blue: #3B82F6;
	--jglt-purple: #8B5CF6;
	--jglt-bg: #F4F6FB;
	--jglt-card: #FFFFFF;
	--jglt-card-glass: rgba(255, 255, 255, 0.7);
	--jglt-border: rgba(15, 23, 42, 0.08);
	--jglt-text: #0F172A;
	--jglt-muted: #64748B;
	--jglt-radius-lg: 22px;
	--jglt-radius-md: 14px;
	--jglt-radius-full: 999px;
	--jglt-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
	--jglt-gradient: linear-gradient(135deg, var(--jglt-blue), var(--jglt-purple));
	--jglt-max-width: 1120px;
}

html.jglt-dark {
	--jglt-bg: #0B1120;
	--jglt-card: #131C2E;
	--jglt-card-glass: rgba(19, 28, 46, 0.65);
	--jglt-border: rgba(255, 255, 255, 0.08);
	--jglt-text: #F1F5F9;
	--jglt-muted: #94A3B8;
	--jglt-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--jglt-bg);
	color: var(--jglt-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.6;
	transition: background 0.2s ease, color 0.2s ease;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--jglt-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.jglt-container {
	max-width: var(--jglt-max-width);
	margin: 0 auto;
	padding: 0 24px;
}

.jglt-sr-only, .screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.jglt-skip-link {
	position: fixed; top: -100px; left: 8px; z-index: 100000;
	background: var(--jglt-card); color: var(--jglt-text);
	padding: 10px 16px; border-radius: 8px;
}
.jglt-skip-link:focus { top: 8px; }

/* ---------- Header ---------- */
.jglt-site-header {
	position: sticky; top: 0; z-index: 1000;
	background: var(--jglt-card-glass);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--jglt-border);
}
.jglt-header-inner {
	display: flex; align-items: center; gap: 24px;
	padding-top: 14px; padding-bottom: 14px;
}
.jglt-site-title { font-weight: 700; font-size: 1.25rem; color: var(--jglt-text); }
.jglt-branding img { max-height: 40px; width: auto; }

.jglt-primary-nav { margin-left: 12px; flex: 1; }
.jglt-menu { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
.jglt-menu > .menu-item { position: relative; }
.jglt-menu a { color: var(--jglt-muted); font-weight: 500; font-size: 0.95rem; }
.jglt-menu a:hover { color: var(--jglt-text); text-decoration: none; }

/* Parent items with a dropdown get a small caret */
.jglt-menu .menu-item-has-children > a,
.jglt-mobile-menu-list .menu-item-has-children > a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.jglt-menu .menu-item-has-children > a::after,
.jglt-mobile-menu-list .menu-item-has-children > a::after {
	content: '';
	width: 7px; height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.18s ease;
	opacity: 0.7;
}
.jglt-menu .menu-item-has-children.is-open > a::after,
.jglt-menu .menu-item-has-children:hover > a::after,
.jglt-menu .menu-item-has-children:focus-within > a::after,
.jglt-mobile-menu-list .menu-item-has-children.is-open > a::after {
	transform: rotate(225deg) translateY(2px);
}

/* Desktop dropdown panel — hidden by default, revealed on hover, keyboard
   focus (:focus-within), or the .is-open class set by theme.js for touch. */
.jglt-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 10px;
	position: absolute;
	top: calc(100% + 14px);
	left: 50%;
	transform: translate(-50%, 6px);
	min-width: 240px;
	background: var(--jglt-card);
	border: 1px solid var(--jglt-border);
	border-radius: var(--jglt-radius-md);
	box-shadow: var(--jglt-shadow);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
	z-index: 500;
}
.jglt-menu .sub-menu::before {
	content: '';
	position: absolute;
	top: -6px; left: 50%;
	transform: translateX(-50%) rotate(45deg);
	width: 12px; height: 12px;
	background: var(--jglt-card);
	border-left: 1px solid var(--jglt-border);
	border-top: 1px solid var(--jglt-border);
}
.jglt-menu .menu-item-has-children:hover > .sub-menu,
.jglt-menu .menu-item-has-children:focus-within > .sub-menu,
.jglt-menu .menu-item-has-children.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate(-50%, 0);
}
.jglt-menu .sub-menu li { margin: 0; }
.jglt-menu .sub-menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 0.9rem;
	white-space: nowrap;
	color: var(--jglt-text);
}
.jglt-menu .sub-menu a:hover {
	background: rgba(139, 92, 246, 0.1);
	text-decoration: none;
}
.jglt-menu .sub-menu .menu-item-all {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px solid var(--jglt-border);
}
.jglt-menu .sub-menu .menu-item-all a {
	color: var(--jglt-blue);
	font-weight: 600;
}

.jglt-header-actions { display: flex; align-items: center; gap: 10px; }

.jglt-darkmode-toggle, .jglt-menu-toggle {
	background: var(--jglt-card);
	border: 1px solid var(--jglt-border);
	border-radius: var(--jglt-radius-full);
	width: 42px; height: 42px;
	cursor: pointer;
	display: none;
	align-items: center; justify-content: center;
}
.jglt-darkmode-toggle { display: inline-flex; }

.jglt-hamburger, .jglt-hamburger::before, .jglt-hamburger::after {
	content: ''; display: block; width: 18px; height: 2px; background: var(--jglt-text);
	position: relative; transition: 0.2s ease;
}
.jglt-hamburger::before { position: absolute; top: -6px; }
.jglt-hamburger::after { position: absolute; top: 6px; }

.jglt-mobile-menu { display: none; }
.jglt-mobile-menu-list { list-style: none; margin: 0; padding: 16px 24px; }
.jglt-mobile-menu-list li { padding: 10px 0; border-bottom: 1px solid var(--jglt-border); }
.jglt-mobile-menu-list a { color: var(--jglt-text); }
.jglt-mobile-menu-list .menu-item-has-children { border-bottom: none; }
.jglt-mobile-menu-list .menu-item-has-children > a { justify-content: space-between; width: 100%; }
.jglt-mobile-menu-list .sub-menu {
	list-style: none;
	margin: 4px 0 8px;
	padding: 4px 0 4px 14px;
	border-left: 2px solid var(--jglt-border);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.22s ease;
}
.jglt-mobile-menu-list .menu-item-has-children.is-open > .sub-menu {
	max-height: 480px;
}
.jglt-mobile-menu-list .sub-menu li { border-bottom: none; padding: 6px 0; }
.jglt-mobile-menu-list .sub-menu a { color: var(--jglt-muted); font-size: 0.92rem; }
.jglt-mobile-menu-list .menu-item-all { border-top: 1px solid var(--jglt-border); margin-top: 4px; padding-top: 10px !important; }
.jglt-mobile-menu-list .menu-item-all a { color: var(--jglt-blue); font-weight: 600; }

@media (max-width: 860px) {
	.jglt-primary-nav { display: none; }
	.jglt-menu-toggle { display: inline-flex; }
	.jglt-mobile-menu:not([hidden]) { display: block; border-top: 1px solid var(--jglt-border); }
}

/* ---------- Breadcrumbs ---------- */
.jglt-breadcrumbs { font-size: 0.85rem; color: var(--jglt-muted); padding: 16px 0 0; }
.jglt-breadcrumbs a { color: var(--jglt-muted); }
.jglt-breadcrumbs span:last-child { color: var(--jglt-text); }

/* ---------- Hero / Homepage ---------- */
.jglt-hero { text-align: center; padding: 56px 24px 24px; }
.jglt-hero-title {
	font-size: clamp(2.1rem, 5vw, 3.2rem);
	font-weight: 800;
	margin: 0 0 12px;
	background: var(--jglt-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.jglt-hero-desc { color: var(--jglt-muted); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }

.jglt-generator-section { padding: 24px 24px 48px; }

.jglt-section { padding: 40px 24px; max-width: 880px; margin: 0 auto; }
.jglt-section-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 20px; text-align: center; }

.jglt-style-chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.jglt-chip {
	background: var(--jglt-card);
	border: 1px solid var(--jglt-border);
	border-radius: var(--jglt-radius-full);
	padding: 8px 16px;
	font-size: 0.9rem;
	box-shadow: var(--jglt-shadow);
}

.jglt-faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.jglt-faq-item {
	background: var(--jglt-card);
	border: 1px solid var(--jglt-border);
	border-radius: var(--jglt-radius-md);
	padding: 16px 20px;
	box-shadow: var(--jglt-shadow);
}
.jglt-faq-item summary { cursor: pointer; font-weight: 600; }
.jglt-faq-item p { margin: 10px 0 0; color: var(--jglt-muted); }

/* ---------- Pages ---------- */
.jglt-page { padding: 32px 24px 64px; max-width: 820px; }
.jglt-page-header { margin-bottom: 24px; }
.jglt-page-title { font-size: 2.2rem; font-weight: 800; margin: 0 0 10px; }
.jglt-page-lede { color: var(--jglt-muted); font-size: 1.1rem; }
.jglt-page-meta { color: var(--jglt-muted); font-size: 0.85rem; }
.jglt-page-thumb { margin: 20px 0; border-radius: var(--jglt-radius-lg); overflow: hidden; }
.jglt-page-content { font-size: 1.05rem; }
.jglt-page-content h2 { margin-top: 2em; }
.jglt-page-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.jglt-page-content th, .jglt-page-content td { border: 1px solid var(--jglt-border); padding: 10px 12px; text-align: left; }

.jglt-author-box {
	display: flex; gap: 14px; align-items: flex-start;
	background: var(--jglt-card);
	border: 1px solid var(--jglt-border);
	border-radius: var(--jglt-radius-md);
	padding: 18px; margin-top: 40px;
	box-shadow: var(--jglt-shadow);
}
.jglt-author-box img { border-radius: 50%; }
.jglt-author-box-name { font-weight: 700; margin: 0 0 4px; }
.jglt-author-box-bio { color: var(--jglt-muted); margin: 0; font-size: 0.92rem; }

.jglt-404 { text-align: center; padding: 80px 24px; }

/* ---------- Buttons ---------- */
.jglt-btn {
	display: inline-block; padding: 12px 22px;
	border-radius: var(--jglt-radius-full);
	font-weight: 600; cursor: pointer; border: 1px solid transparent;
}
.jglt-btn-primary {
	background: var(--jglt-gradient);
	color: #fff;
}
.jglt-btn-primary:hover { text-decoration: none; opacity: 0.92; }
.jglt-btn-ghost { background: transparent; border-color: var(--jglt-border); color: var(--jglt-text); }

/* ---------- Footer ---------- */
.jglt-site-footer {
	position: relative;
	margin-top: 64px;
	background: #0B1120;
	color: #CBD5E1;
	overflow: hidden;
}
html.jglt-dark .jglt-site-footer { background: #060A14; }

.jglt-footer-glow {
	position: absolute;
	inset: -1px 0 auto 0;
	height: 3px;
	background: linear-gradient(90deg, var(--jglt-blue), var(--jglt-purple), #EC4899, var(--jglt-blue));
	background-size: 300% 100%;
	animation: jglt-footer-glow-move 8s linear infinite;
}
@keyframes jglt-footer-glow-move {
	to { background-position: 300% 0; }
}

.jglt-footer-grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr;
	gap: 40px;
	padding: 56px 24px 40px;
}

.jglt-footer-logo-wrap img { max-height: 36px; width: auto; filter: brightness(1.4); }
.jglt-footer-logo { font-weight: 800; font-size: 1.25rem; margin: 0 0 10px; color: #fff; }
.jglt-footer-tagline { color: #94A3B8; font-size: 0.92rem; max-width: 320px; margin: 10px 0 18px; line-height: 1.6; }

.jglt-footer-email {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(139, 92, 246, 0.14);
	border: 1px solid rgba(139, 92, 246, 0.35);
	color: #E9E3FF;
	font-weight: 600;
	font-size: 0.88rem;
	padding: 9px 16px;
	border-radius: var(--jglt-radius-full);
	text-decoration: none;
	transition: background 0.15s ease, transform 0.15s ease;
}
.jglt-footer-email:hover { background: rgba(139, 92, 246, 0.24); text-decoration: none; transform: translateY(-1px); }
.jglt-footer-email-icon { font-size: 0.95rem; }

.jglt-footer-social { display: flex; gap: 10px; margin-top: 20px; }
.jglt-footer-social-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #CBD5E1;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.jglt-footer-social-btn:hover {
	background: var(--jglt-gradient);
	color: #fff;
	transform: translateY(-2px);
	text-decoration: none;
}

.jglt-footer-col-title {
	color: #fff;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin: 0 0 16px;
}
.jglt-footer-menu { list-style: none; margin: 0; padding: 0; }
.jglt-footer-menu li { margin-bottom: 11px; }
.jglt-footer-menu a { color: #94A3B8; font-size: 0.9rem; }
.jglt-footer-menu a:hover { color: #fff; text-decoration: none; }
.jglt-footer-menu-all { color: var(--jglt-blue) !important; font-weight: 600; }

.jglt-footer-widgets { margin-top: 24px; }
.jglt-footer-widget-title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: #fff; margin: 0 0 8px; }

.jglt-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 20px 24px;
	font-size: 0.82rem;
	color: #64748B;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
}
.jglt-footer-bottom a { color: #94A3B8; }
.jglt-footer-bottom a:hover { color: #fff; }

@media (max-width: 900px) {
	.jglt-footer-grid { grid-template-columns: 1fr 1fr; }
	.jglt-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
	.jglt-footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Cookie banner ---------- */
.jglt-cookie-banner {
	position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 9999;
	max-width: 520px; margin: 0 auto;
	background: var(--jglt-card-glass);
	backdrop-filter: blur(16px);
	border: 1px solid var(--jglt-border);
	border-radius: var(--jglt-radius-lg);
	box-shadow: var(--jglt-shadow);
	padding: 18px 20px;
}
.jglt-cookie-banner p { margin: 0 0 12px; font-size: 0.88rem; color: var(--jglt-muted); }
.jglt-cookie-actions { display: flex; gap: 10px; }
.jglt-cookie-actions .jglt-btn { flex: 1; text-align: center; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
