/*
Theme Name:   Kadence Puns Child
Theme URI:    https://www.kadencewp.com/
Description:  Fast, playful child theme for a puns & wordplay blog. Auto-configures Kadence (colors, fonts, header, footer, layouts), creates the essential pages and menus, and adds a table of contents, pun-list styling with copy buttons, FAQ schema and share buttons. No extra plugins needed.
Author:       Najam
Template:     kadence
Version:      1.0.2
Requires at least: 6.3
Requires PHP: 7.4
Text Domain:  kadence-puns
License:      GPL-2.0-or-later
*/

/* ---------- Brand tokens (colors come from the Kadence palette) ---------- */
:root {
	--kp-sun: #9CCB4E;
	--kp-sun-soft: #E6F3D1;
	--kp-radius: 16px;
	--kp-radius-sm: 10px;
}

/* ---------- Global polish ---------- */
body { -webkit-font-smoothing: antialiased; }
.entry-content img,
.entry-content figure img { border-radius: var(--kp-radius-sm); height: auto; }
.site-header .site-title { letter-spacing: -0.01em; }
.site-branding .custom-logo { max-height: 44px; width: auto; }
.site-header-row-container-inner { border-bottom: 1px solid var(--global-palette7); }

/* Rounded cards everywhere Kadence draws boxes */
.content-bg.loop-entry,
.entry.single-entry,
.entry-related-inner-content .entry,
.comment-respond { border-radius: var(--kp-radius); overflow: hidden; }
.loop-entry .post-thumbnail { border-radius: var(--kp-radius) var(--kp-radius) 0 0; }
.loop-entry { transition: transform .18s ease, box-shadow .18s ease; }
.loop-entry:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(42, 23, 64, .35); }
.loop-entry .entry-title a { text-decoration: none; }
.loop-entry .more-link-wrap a { font-weight: 600; }

/* ---------- Home hero ---------- */
.kp-hero {
	background:
		radial-gradient(circle at 12% 20%, var(--kp-sun-soft) 0 90px, transparent 91px),
		radial-gradient(circle at 88% 78%, rgba(232, 73, 42, .10) 0 140px, transparent 141px),
		var(--global-palette8);
	padding: clamp(40px, 7vw, 84px) 16px clamp(34px, 6vw, 64px);
	text-align: center;
	border-bottom: 1px solid var(--global-palette7);
}
.kp-hero-inner { max-width: 760px; margin: 0 auto; }
.kp-hero-eyebrow {
	display: inline-block; background: var(--global-palette9); color: var(--global-palette1);
	border: 1px solid var(--global-palette7); border-radius: 999px;
	padding: 6px 14px; font-size: 14px; font-weight: 600; margin-bottom: 18px;
}
.kp-hero-title {
	font-size: clamp(34px, 6vw, 58px); line-height: 1.08; margin: 0 0 14px;
	color: var(--global-palette3);
}
.kp-hero-title .kp-underline {
	background: linear-gradient(transparent 62%, var(--kp-sun) 62%, var(--kp-sun) 90%, transparent 90%);
	padding: 0 4px;
}
.kp-hero-text { font-size: clamp(17px, 2.2vw, 20px); color: var(--global-palette5); margin: 0 auto 26px; max-width: 560px; }
.kp-hero .search-form { max-width: 520px; margin: 0 auto; position: relative; }
.kp-hero .search-form input.search-field {
	width: 100%; border-radius: 999px; padding: 16px 64px 16px 24px; font-size: 17px;
	border: 2px solid var(--global-palette7); background: var(--global-palette9);
	box-shadow: 0 10px 30px -18px rgba(42, 23, 64, .4);
}
.kp-hero .search-form input.search-field:focus { border-color: var(--global-palette1); outline: none; }
.kp-hero .search-form .search-submit[type=submit] {
	right: 6px; top: 6px; bottom: 6px; width: 52px; border-radius: 999px; padding: 0; cursor: pointer;
}
.kp-hero .search-form .search-submit[type=submit]:hover ~ .kadence-search-icon-wrap { color: #fff; background: var(--global-palette2); }
.kp-hero .search-form .kadence-search-icon-wrap {
	position: absolute; right: 6px; top: 6px; bottom: 6px; height: auto; width: 52px; border-radius: 999px;
	background: var(--global-palette1); color: #fff; display: flex; align-items: center; justify-content: center;
	pointer-events: none;
}

/* Pun of the day */
.kp-potd {
	max-width: 620px; margin: 30px auto 0; background: var(--global-palette9);
	border: 2px dashed var(--kp-sun); border-radius: var(--kp-radius); padding: 18px 22px; text-align: left;
}
.kp-potd-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--global-palette1); margin-bottom: 6px; }
.kp-potd-text { font-size: 18px; color: var(--global-palette3); margin: 0 0 8px; }
.kp-potd-link { font-size: 14px; font-weight: 600; }

.kp-section-title { font-size: clamp(24px, 3vw, 30px); margin: 0 0 22px; display: flex; align-items: center; gap: 10px; }
.kp-section-title::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--kp-sun); box-shadow: 0 0 0 5px var(--kp-sun-soft); }

/* ---------- Single article ---------- */
.single-post .entry-content > h2 {
	margin-top: 2.2em; padding-top: .2em; scroll-margin-top: 90px;
}
.single-post .entry-content > h2::after {
	content: ""; display: block; width: 56px; height: 5px; border-radius: 5px;
	background: var(--kp-sun); margin-top: 10px;
}
.single-post .entry-content > h3 { scroll-margin-top: 90px; }

/* In-article images: smaller & centered (featured image at the top is not affected) */
.single-post .entry-content img {
	display: block; width: 100%; max-width: 520px; height: auto; margin: 1.4em auto;
	box-shadow: 0 12px 28px -18px rgba(42, 23, 64, .35);
}

/* Bold pun words get a highlighter */
.single-post .entry-content li strong,
.single-post .entry-content p strong {
	background: linear-gradient(transparent 58%, var(--kp-sun-soft) 58%);
	color: var(--global-palette3);
}

/* Pun lists -> tidy cards */
.single-post .entry-content > ul:not(.kp-toc-list) { list-style: none; padding: 0; margin: 1.2em 0 1.6em; }
.single-post .entry-content > ul:not(.kp-toc-list) > li {
	position: relative; background: var(--global-palette9); border: 1px solid var(--global-palette7);
	border-left: 4px solid var(--global-palette1); border-radius: var(--kp-radius-sm);
	padding: 12px 52px 12px 16px; margin: 0 0 10px; line-height: 1.55;
}
.single-post .entry-content > ol > li { margin-bottom: 8px; }

.kp-copy {
	position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
	width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--global-palette7);
	background: var(--global-palette8); color: var(--global-palette5); cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0; line-height: 1;
	transition: background .15s ease, color .15s ease;
}
.kp-copy:hover, .kp-copy:focus-visible { background: var(--global-palette1); color: #fff; border-color: var(--global-palette1); }
.kp-copy.is-copied { background: #13612e; color: #fff; border-color: #13612e; }
.kp-copy svg { width: 16px; height: 16px; }

/* Table of contents */
.kp-toc {
	background: var(--global-palette8); border: 1px solid var(--global-palette7);
	border-radius: var(--kp-radius); margin: 1.4em 0 2em; padding: 0;
}
.kp-toc summary {
	cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 700; color: var(--global-palette3);
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.kp-toc summary::-webkit-details-marker { display: none; }
.kp-toc summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--global-palette1); }
.kp-toc[open] summary::after { content: "–"; }
.kp-toc-list { margin: 0; padding: 0 18px 16px 38px; columns: 2 240px; column-gap: 28px; }
.kp-toc-list li { margin: 0 0 6px; break-inside: avoid; }
.kp-toc-list a { text-decoration: none; }
.kp-toc-list a:hover { text-decoration: underline; }

/* FAQ */
.single-post .entry-content h3.kp-faq-q {
	background: var(--global-palette9); border: 1px solid var(--global-palette7); border-radius: var(--kp-radius-sm) var(--kp-radius-sm) 0 0;
	padding: 14px 16px; margin: 14px 0 0; font-size: 19px;
}
.single-post .entry-content .kp-faq-a {
	background: var(--global-palette9); border: 1px solid var(--global-palette7); border-top: 0;
	border-radius: 0 0 var(--kp-radius-sm) var(--kp-radius-sm); padding: 12px 16px 14px; margin: 0;
}

/* "Want more laughs?" internal link boxes */
.single-post .entry-content .kp-more {
	background: var(--kp-sun-soft); border-left: 5px solid var(--kp-sun); border-radius: var(--kp-radius-sm);
	padding: 14px 18px; margin: 2em 0; font-weight: 600; color: var(--global-palette3);
}
.single-post .entry-content .kp-more a { color: var(--global-palette1); text-decoration: underline; text-underline-offset: 3px; }
.single-post .entry-content .kp-more a:hover { color: var(--global-palette2); }

/* Share bar */
.kp-share { margin: 2.2em 0 .6em; padding: 18px; border-radius: var(--kp-radius); background: var(--global-palette8); border: 1px solid var(--global-palette7); }
.kp-share-title { font-weight: 700; color: var(--global-palette3); margin: 0 0 10px; }
.kp-share-links { display: flex; flex-wrap: wrap; gap: 8px; }
.kp-share-links a, .kp-share-links button {
	display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 999px;
	font-size: 14px; font-weight: 600; text-decoration: none; color: #fff; border: 0; cursor: pointer; line-height: 1.2;
}
.kp-share-links svg { width: 16px; height: 16px; fill: currentColor; }
.kp-share-pinterest { background: #BD081C; }
.kp-share-facebook { background: #1877F2; }
.kp-share-x { background: #111; }
.kp-share-whatsapp { background: #128C4B; }
.kp-share-copy { background: var(--global-palette3); }

/* Related puns grid */
.kp-related { margin: 48px 0 8px; }
.kp-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.kp-related-card {
	display: flex; flex-direction: column; background: var(--global-palette9); border-radius: var(--kp-radius);
	overflow: hidden; text-decoration: none; box-shadow: 0 12px 28px -14px rgba(42, 23, 64, .18);
	transition: transform .18s ease;
}
.kp-related-card:hover { transform: translateY(-3px); }
.kp-related-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; height: auto; }
.kp-related-title {
	padding: 16px 18px 20px; font-family: var(--global-heading-font-family); font-weight: 600; font-size: 19px;
	line-height: 1.3; color: var(--global-palette3);
}
.kp-related-card:hover .kp-related-title { color: var(--global-palette1); }

/* Author box */
.entry-author-style-normal { border-radius: var(--kp-radius); }

/* ---------- Footer ---------- */
.site-footer .site-bottom-footer-inner-wrap { font-size: 14px; padding-top: 34px; padding-bottom: 30px; }
.site-footer .site-bottom-footer-inner-wrap .footer-navigation { margin-bottom: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Legal / info pages ---------- */
.page .entry-content h2 { margin-top: 1.6em; }

@media (max-width: 900px) {
	.kp-related-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 767px) {
	.single-post .entry-content > ul:not(.kp-toc-list) > li { padding-right: 48px; }
	.kp-toc-list { columns: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.loop-entry, .loop-entry:hover { transition: none; transform: none; }
}


/* =====================================================================
   Safari skin (Zoo Puns) — leafy hero, wave divider, chips, paw bullets
   ===================================================================== */
:root { --kp-leaf: #1F7A3A; --kp-orange: #F7A531; }
.site-header-row-container-inner { border-bottom: 0; }
.site-branding .custom-logo { max-height: 54px; }

.kp-hero {
	position: relative;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 260'%3E%3Cg transform='translate%28-20 60%29 rotate%2820%29 scale%281.3%29' opacity='0.55'%3E%3Cpath d='M0 0C40-50 120-60 180-20C130 30 50 40 0 0Z' fill='%235FA343'/%3E%3Cpath d='M0 0C60-15 120-25 180-20' stroke='%23ffffff' stroke-opacity='.35' stroke-width='3' fill='none'/%3E%3C/g%3E%3Cg transform='translate%28-10 170%29 rotate%28-10%29 scale%281.0%29' opacity='0.6'%3E%3Cpath d='M0 0C40-50 120-60 180-20C130 30 50 40 0 0Z' fill='%239CCB4E'/%3E%3Cpath d='M0 0C60-15 120-25 180-20' stroke='%23ffffff' stroke-opacity='.35' stroke-width='3' fill='none'/%3E%3C/g%3E%3Cg transform='translate%2840 10%29 rotate%2850%29 scale%280.9%29' opacity='0.35'%3E%3Cpath d='M0 0C40-50 120-60 180-20C130 30 50 40 0 0Z' fill='%231F7A3A'/%3E%3Cpath d='M0 0C60-15 120-25 180-20' stroke='%23ffffff' stroke-opacity='.35' stroke-width='3' fill='none'/%3E%3C/g%3E%3C/svg%3E") left top / clamp(160px, 24vw, 320px) auto no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 260'%3E%3Cg transform='translate%28320 200%29 rotate%28200%29 scale%281.3%29' opacity='0.55'%3E%3Cpath d='M0 0C40-50 120-60 180-20C130 30 50 40 0 0Z' fill='%235FA343'/%3E%3Cpath d='M0 0C60-15 120-25 180-20' stroke='%23ffffff' stroke-opacity='.35' stroke-width='3' fill='none'/%3E%3C/g%3E%3Cg transform='translate%28310 100%29 rotate%28170%29 scale%281.0%29' opacity='0.6'%3E%3Cpath d='M0 0C40-50 120-60 180-20C130 30 50 40 0 0Z' fill='%239CCB4E'/%3E%3Cpath d='M0 0C60-15 120-25 180-20' stroke='%23ffffff' stroke-opacity='.35' stroke-width='3' fill='none'/%3E%3C/g%3E%3Cg transform='translate%28260 250%29 rotate%28230%29 scale%280.9%29' opacity='0.35'%3E%3Cpath d='M0 0C40-50 120-60 180-20C130 30 50 40 0 0Z' fill='%231F7A3A'/%3E%3Cpath d='M0 0C60-15 120-25 180-20' stroke='%23ffffff' stroke-opacity='.35' stroke-width='3' fill='none'/%3E%3C/g%3E%3C/svg%3E") right 70px / clamp(160px, 24vw, 320px) auto no-repeat, linear-gradient(180deg, #EAF5DC 0%, #F4F9EA 100%);
	border-bottom: 0;
	padding-bottom: clamp(70px, 9vw, 110px);
}
.kp-hero::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30C240 70 480 0 720 25S1200 60 1440 20V60H0Z' fill='%23FFF9EF'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat; pointer-events: none;
}
.kp-hero-title { font-weight: 800; letter-spacing: -0.01em; }
.kp-hero-title .kp-underline {
	background: linear-gradient(transparent 64%, var(--kp-orange) 64%, var(--kp-orange) 88%, transparent 88%);
}
.kp-hero-eyebrow { background: var(--kp-leaf); color: #fff; border-color: var(--kp-leaf); }
.kp-hero .search-form input.search-field { border-color: #CFE3B6; }

.kp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 22px auto 0; max-width: 680px; }
.kp-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px;
	background: #fff; border: 2px solid #CFE3B6; color: var(--global-palette3);
	font-weight: 700; font-size: 15px; text-decoration: none; transition: all .15s ease;
}
.kp-chip:hover { background: var(--kp-leaf); border-color: var(--kp-leaf); color: #fff; transform: translateY(-2px); }

.kp-potd { border: 2px solid #CFE3B6; box-shadow: 0 14px 30px -22px rgba(19, 61, 42, .5); position: relative; }
.kp-potd::before {
	content: ""; position: absolute; right: 16px; top: 14px; width: 26px; height: 26px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23F7A531'%3E%3Cellipse cx='5' cy='9' rx='2.3' ry='3'/%3E%3Cellipse cx='9.3' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='14.7' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='19' cy='9' rx='2.3' ry='3'/%3E%3Cpath d='M12 10.5c3.6 0 6.6 3 6.6 6 0 2.5-2.1 3.6-4.1 3.1-1-.3-1.6-.6-2.5-.6s-1.5.3-2.5.6c-2 .5-4.1-.6-4.1-3.1 0-3 3-6 6.6-6z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; opacity: .9;
}

.kp-section-title::before { width: 26px; height: 26px; border-radius: 0; box-shadow: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23F7A531'%3E%3Cellipse cx='5' cy='9' rx='2.3' ry='3'/%3E%3Cellipse cx='9.3' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='14.7' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='19' cy='9' rx='2.3' ry='3'/%3E%3Cpath d='M12 10.5c3.6 0 6.6 3 6.6 6 0 2.5-2.1 3.6-4.1 3.1-1-.3-1.6-.6-2.5-.6s-1.5.3-2.5.6c-2 .5-4.1-.6-4.1-3.1 0-3 3-6 6.6-6z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }

.loop-entry { border: 2px solid #E4E8D2; }
.loop-entry:hover { border-color: #CFE3B6; box-shadow: 0 16px 30px -20px rgba(19, 61, 42, .45); }

/* Article headings: three paw prints instead of a bar */
.single-post .entry-content > h2::after {
	width: 66px; height: 20px; border-radius: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%23F7A531'%3E%3Cellipse cx='5' cy='9' rx='2.3' ry='3'/%3E%3Cellipse cx='9.3' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='14.7' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='19' cy='9' rx='2.3' ry='3'/%3E%3Cpath d='M12 10.5c3.6 0 6.6 3 6.6 6 0 2.5-2.1 3.6-4.1 3.1-1-.3-1.6-.6-2.5-.6s-1.5.3-2.5.6c-2 .5-4.1-.6-4.1-3.1 0-3 3-6 6.6-6z'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 22px 20px repeat-x;
}

/* Pun lists: paw-print bullets */
.single-post .entry-content > ul:not(.kp-toc-list) > li {
	border-left: 1px solid var(--global-palette7); padding-left: 48px; border-radius: 14px;
}
.single-post .entry-content > ul:not(.kp-toc-list) > li::before {
	content: ""; position: absolute; left: 16px; top: 15px; width: 20px; height: 20px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%2359A33E'%3E%3Cellipse cx='5' cy='9' rx='2.3' ry='3'/%3E%3Cellipse cx='9.3' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='14.7' cy='5' rx='2.3' ry='3.1'/%3E%3Cellipse cx='19' cy='9' rx='2.3' ry='3'/%3E%3Cpath d='M12 10.5c3.6 0 6.6 3 6.6 6 0 2.5-2.1 3.6-4.1 3.1-1-.3-1.6-.6-2.5-.6s-1.5.3-2.5.6c-2 .5-4.1-.6-4.1-3.1 0-3 3-6 6.6-6z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.single-post .entry-content li strong,
.single-post .entry-content p strong { background: linear-gradient(transparent 58%, #FDE3B5 58%); }

@media (max-width: 600px) {
	.kp-hero { background-size: 110px auto, 110px auto, auto; }
}
