/*
Theme Name:        Learning Hub Kids
Description:       A bright, playful theme made for the Family Learning Hub plugin. Big friendly fonts, a sky-and-hills background and a full-width games page for every family.
Version:           1.1.0
Requires at least: 5.8
Requires PHP:      7.4
Author:            Raul Vasquez
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       learning-hub-kids
*/

:root {
	--lhk-ink: #1e293b;
	--lhk-muted: #64748b;
	--lhk-purple: #8b5cf6;
	--lhk-orange: #f59e0b;
	--lhk-pink: #ec4899;
	--lhk-blue: #3b82f6;
	--lhk-green: #22c55e;
	--lhk-card: #ffffff;
	--lhk-radius: 28px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--lhk-ink);
	font-family: 'Fredoka', 'Comic Sans MS', 'Segoe UI Rounded', system-ui, sans-serif;
	font-size: 18px;
	line-height: 1.55;
	background-color: #bfe6ff;
	background-image:
		radial-gradient(ellipse 120px 46px at 12% 14%, rgba(255,255,255,.95) 98%, transparent),
		radial-gradient(ellipse 80px 34px at 17% 11%, rgba(255,255,255,.95) 98%, transparent),
		radial-gradient(ellipse 140px 50px at 84% 22%, rgba(255,255,255,.9) 98%, transparent),
		radial-gradient(ellipse 90px 38px at 79% 19%, rgba(255,255,255,.9) 98%, transparent),
		radial-gradient(ellipse 100px 40px at 55% 8%, rgba(255,255,255,.75) 98%, transparent),
		linear-gradient(180deg, #a5dcff 0%, #d9f0ff 45%, #fdf4ff 100%);
	background-attachment: fixed;
}

/* Rolling hills along the bottom of the page */
body::after {
	content: '';
	position: fixed;
	left: 0; right: 0; bottom: 0;
	height: 140px;
	z-index: -1;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 140' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C240 10 420 120 720 60 S1200 20 1440 70 V140 H0Z' fill='%2386efac'/%3E%3Cpath d='M0 100 C300 50 520 140 860 90 S1260 70 1440 105 V140 H0Z' fill='%234ade80'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
	pointer-events: none;
}

a { color: var(--lhk-purple); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--lhk-pink); }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important; top: 10px; left: 10px; width: auto; height: auto; clip: auto;
	z-index: 1000; background: #fff; padding: 10px 16px; border-radius: 12px;
}

.lhk-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.lhk-header { padding: 18px 0 8px; }
.lhk-header .lhk-wrap {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	background: rgba(255,255,255,.88);
	border-radius: 999px;
	padding: 10px 14px 10px 18px;
	box-shadow: 0 8px 24px rgba(30, 64, 175, .12);
	max-width: 1068px;
}
.lhk-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--lhk-ink); }
.lhk-brand:hover { color: var(--lhk-ink); }
.lhk-logo-emoji {
	width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 30px;
	background: conic-gradient(from 200deg, #f87171, #fbbf24, #4ade80, #60a5fa, #c084fc, #f87171);
	box-shadow: inset 0 0 0 5px #fff;
	flex: none;
}
.custom-logo-link img { max-height: 52px; width: auto; display: block; }
.lhk-site-title { font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; line-height: 1.1; }
.lhk-site-title span { display: inline-block; }
.lhk-site-title span:nth-child(5n+1) { color: #ef4444; }
.lhk-site-title span:nth-child(5n+2) { color: #f59e0b; }
.lhk-site-title span:nth-child(5n+3) { color: #22c55e; }
.lhk-site-title span:nth-child(5n+4) { color: #3b82f6; }
.lhk-site-title span:nth-child(5n+5) { color: #a855f7; }
.lhk-tagline { font-size: 14px; color: var(--lhk-muted); font-weight: 500; }

.lhk-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.lhk-nav a {
	display: block; padding: 8px 16px; border-radius: 999px; text-decoration: none;
	font-weight: 600; color: var(--lhk-ink); transition: background .15s, transform .15s;
}
.lhk-nav a:hover { background: #f3e8ff; color: var(--lhk-purple); transform: translateY(-2px); }
.lhk-nav .current-menu-item > a, .lhk-nav .current_page_item > a { background: var(--lhk-purple); color: #fff; }
.lhk-nav .lhk-parents a { background: #fef3c7; color: #92400e; font-size: 15px; }
.lhk-nav ul ul { display: none; } /* keep it simple: no dropdowns */

/* ---------- Greeting ---------- */
.lhk-hello { text-align: center; padding: 22px 0 6px; }
.lhk-hello h1 {
	margin: 0; font-size: clamp(30px, 5vw, 50px); line-height: 1.1; font-weight: 700;
	color: #5b21b6; text-shadow: 0 3px 0 #fff, 0 0 14px #fff, 0 0 4px #fff;
}
.lhk-hello p { margin: 8px 0 0; font-size: 20px; font-weight: 500; color: #334155; }
.lhk-sun { display: inline-block; animation: lhk-bob 3s ease-in-out infinite; }

/* ---------- Content ---------- */
.lhk-main { flex: 1; padding: 18px 0 170px; }
.lhk-card {
	background: var(--lhk-card); border-radius: var(--lhk-radius); padding: clamp(20px, 4vw, 40px);
	box-shadow: 0 12px 30px rgba(30, 64, 175, .10); margin-bottom: 24px;
}
.lhk-card > :first-child { margin-top: 0; }
.lhk-card > :last-child { margin-bottom: 0; }
.lhk-entry-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin: 0 0 12px; }
.lhk-entry-title a { color: inherit; text-decoration: none; }
.lhk-meta { color: var(--lhk-muted); font-size: 15px; margin-bottom: 14px; }
.entry-content h2, .entry-content h3 { line-height: 1.2; }
.entry-content blockquote { margin: 1em 0; padding: 12px 20px; background: #faf5ff; border-left: 6px solid var(--lhk-purple); border-radius: 12px; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content td, .entry-content th { border: 2px solid #e2e8f0; padding: 8px; }
.alignwide { margin-left: -5%; margin-right: -5%; max-width: 110%; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }

/* Pages that contain the games: no white card, the app is the star */
.has-learning-hub .lhk-card { background: transparent; box-shadow: none; padding: 0; }
.has-learning-hub .flh-app { box-shadow: 0 16px 40px rgba(91, 33, 182, .18); border: 6px solid #fff; }

.lhk-pagination { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.lhk-pagination a { background: #fff; padding: 10px 20px; border-radius: 999px; text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,.08); }

.lhk-btn, .wp-block-button__link, input[type=submit], button.lhk-btn {
	display: inline-block; border: 0; border-radius: 999px; padding: 12px 26px; font: inherit; font-weight: 700;
	background: var(--lhk-purple); color: #fff; text-decoration: none; cursor: pointer; box-shadow: 0 5px 0 #6d28d9;
}
.lhk-btn:hover, .wp-block-button__link:hover { color: #fff; transform: translateY(-2px); }

input[type=text], input[type=search], input[type=email], textarea {
	font: inherit; border: 3px solid #e2e8f0; border-radius: 16px; padding: 10px 14px; max-width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--lhk-purple); }

/* ---------- Footer ---------- */
.lhk-footer {
	position: relative; text-align: center; padding: 18px 16px 22px; font-weight: 600; color: #14532d;
	margin-top: -150px;
}
.lhk-footer a { color: #14532d; }

@keyframes lhk-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(10deg); } }

@media (max-width: 700px) {
	.lhk-header .lhk-wrap { border-radius: 28px; justify-content: center; text-align: center; }
	.lhk-nav ul { justify-content: center; }
	.lhk-tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
 * Home page: landing page
 * =================================================================== */
.lhk-hero { position: relative; text-align: center; padding: clamp(28px, 6vw, 64px) 16px 18px; overflow: hidden; }
.lhk-hero-hello { margin: 0 0 6px; font-size: 20px; font-weight: 600; color: #6d28d9; }
.lhk-hero-title { margin: 0; font-size: clamp(40px, 8vw, 84px); font-weight: 700; line-height: 1.05; text-shadow: 0 4px 0 rgba(255,255,255,.9), 0 10px 24px rgba(91,33,182,.18); }
.lhk-hero-title .lhk-w { display: inline-block; white-space: nowrap; }
.lhk-hero-title i { font-style: normal; }
.lhk-hero-title .c0 { color: #ef4444; }
.lhk-hero-title .c1 { color: #f59e0b; }
.lhk-hero-title .c2 { color: #22c55e; }
.lhk-hero-title .c3 { color: #3b82f6; }
.lhk-hero-title .c4 { color: #a855f7; }
.lhk-hero-sub { max-width: 640px; margin: 16px auto 26px; font-size: clamp(18px, 2.4vw, 22px); color: #334155; }
.lhk-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; position: relative; z-index: 1; }

.lhk-btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700; font-size: 18px; text-decoration: none;
	background: #fff; color: var(--lhk-purple); box-shadow: 0 5px 0 #ddd6fe; transition: transform .12s, box-shadow .12s; }
.lhk-btn:hover { transform: translateY(-3px); color: var(--lhk-purple); }
.lhk-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #ddd6fe; }
.lhk-btn-big { font-size: clamp(20px, 3vw, 26px); padding: 16px 34px; background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; box-shadow: 0 7px 0 #6d28d9; }
.lhk-btn-big:hover { color: #fff; }
.lhk-btn-big:active { box-shadow: 0 3px 0 #6d28d9; }
.lhk-btn-alt { align-self: center; }

/* Floating emojis behind the hero */
.lhk-float span { position: absolute; font-size: clamp(28px, 4vw, 46px); opacity: .85; animation: lhk-bob 6s ease-in-out infinite; }
.lhk-float span:nth-child(1) { left: 6%; top: 18%; }
.lhk-float span:nth-child(2) { left: 14%; top: 66%; animation-delay: -1s; }
.lhk-float span:nth-child(3) { left: 82%; top: 14%; animation-delay: -2s; }
.lhk-float span:nth-child(4) { left: 90%; top: 58%; animation-delay: -3s; }
.lhk-float span:nth-child(5) { left: 4%; top: 42%; animation-delay: -4s; }
.lhk-float span:nth-child(6) { left: 92%; top: 34%; animation-delay: -5s; }
.lhk-float span:nth-child(7) { left: 24%; top: 6%; animation-delay: -2.5s; }
.lhk-float span:nth-child(8) { left: 72%; top: 76%; animation-delay: -1.5s; }
@keyframes lhk-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(4deg); } }

.lhk-grades { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 10px auto 34px; max-width: 900px; }
.lhk-chip { background: rgba(255,255,255,.9); border-radius: 999px; padding: 6px 16px; font-weight: 600; box-shadow: 0 3px 10px rgba(0,0,0,.06); }

.lhk-section-title { text-align: center; font-size: clamp(26px, 4vw, 36px); margin: 0 0 18px; color: #4c1d95; }
.lhk-features { margin-bottom: 40px; }
.lhk-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.lhk-feature { background: #fff; border-radius: 24px; padding: 20px 22px; box-shadow: 0 8px 22px rgba(0,0,0,.08); border-top: 8px solid var(--c); }
.lhk-feature h3 { margin: 6px 0 6px; font-size: 21px; }
.lhk-feature p { margin: 0; color: #475569; font-size: 17px; }
.lhk-f-icon { font-size: 40px; line-height: 1; }

.lhk-steps { margin-bottom: 40px; }
.lhk-step-list { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 980px; }
.lhk-step-list li { display: flex; gap: 14px; align-items: flex-start; background: rgba(255,255,255,.92); border-radius: 22px; padding: 16px 18px; box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.lhk-step-n { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; color: #fff; background: linear-gradient(135deg, #f59e0b, #ec4899); }

.lhk-final { text-align: center; background: #fff; border-radius: var(--lhk-radius); padding: 30px 20px 34px; box-shadow: 0 10px 28px rgba(0,0,0,.08); max-width: 760px; margin: 0 auto; }
.lhk-final h2 { margin: 6px 0 18px; font-size: clamp(22px, 3.4vw, 30px); }
.lhk-final-emoji { font-size: 58px; line-height: 1; }

@media (max-width: 640px) {
	.lhk-float span:nth-child(n+5) { display: none; }
	.lhk-float span { opacity: .55; }
	.lhk-cta { flex-direction: column; align-items: center; }
	.lhk-btn-big { width: 100%; max-width: 360px; }
}
@media (prefers-reduced-motion: reduce) {
	.lhk-float span { animation: none; }
}
