/*
Theme Name: IDEA Center
Description: The look of the 2000s–2020s ideacenter.org site (header, top menu with drop-downs, section menu on the left, Related Links on the right), rebuilt for WordPress.
Version: 1.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: ideacenter
*/

:root {
	--navy: rgb(0, 51, 119);
	--blue: rgb(24, 85, 153);
	--sky: rgb(102, 136, 187);
	--link-blue: rgb(85, 119, 170);
	--olive: rgb(153, 153, 102);
	--khaki: rgb(170, 170, 136);
	--khaki-line: rgb(110, 110, 85);
	--cream: rgb(238, 238, 221);
	--red: rgb(170, 51, 51);
	--red-hover: rgb(221, 0, 0);
	--pale-blue: rgb(170, 221, 255);
	--sans: Verdana, Arial, sans-serif;
	--title: "Trebuchet MS", Trebuchet, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--khaki);
	font-family: var(--sans);
	color: var(--navy);
}

a { color: var(--red); text-decoration: none; }
a:hover, a:focus { color: var(--red-hover); }
img { max-width: 100%; height: auto; }
/* Old pages lay out images in tables; let them keep their size there on wide screens. */
.entry td img, .sidebar td img { max-width: none; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 1000; background: #fff; padding: 6px 10px; }

/* ---------------------------------------------------------------- Header */

.site-header {
	height: 118px;
	background: var(--navy) url(images/bg_header.gif) no-repeat;
	overflow: hidden;
}
.site-header a { display: inline-block; }
.site-header img { display: block; width: 364px; max-width: none; height: 118px; }

/* ---------------------------------------------------------------- Top menu */

.topnav {
	position: relative;
	z-index: 100;
	display: flex;
	flex-wrap: wrap;
	min-height: 28px;
	background: var(--blue) url(images/bg_topnav.gif) repeat-x;
	border-bottom: 5px solid var(--sky);
	font-family: var(--title);
}
.topnav ul { list-style: none; margin: 0; padding: 0; }
.topnav > .menu-toggle { display: none; }

.primary-menu { display: flex; flex-wrap: wrap; }
.primary-menu > li { position: relative; }
.primary-menu > li > a {
	display: block;
	height: 28px;
	padding: 0 9px;
	line-height: 28px;
	border-right: 1px solid rgba(255, 255, 255, 0.25);
	font-size: 12px;
	color: #fff;
	white-space: nowrap;
}
.primary-menu > li > a:hover,
.primary-menu > li:focus-within > a,
.primary-menu > li.section-current > a {
	background: var(--navy);
	color: #fff;
}

.utility-menu { display: flex; margin-left: 8px; padding-left: 8px; }
.utility-menu a {
	display: block;
	height: 28px;
	padding: 0 8px;
	line-height: 28px;
	font-family: var(--sans);
	font-size: 9px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
}
.utility-menu a:hover { color: var(--pale-blue); }

/* Drop-downs, as on the old site. */
.primary-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 200;
	display: none;
	width: 190px;
	padding: 0;
	background: var(--blue);
}
.primary-menu .sub-menu .sub-menu { top: 0; left: 100%; padding: 4px 0; background: var(--navy); }
.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu { display: block; }
.primary-menu .sub-menu li { position: relative; }
.primary-menu .sub-menu a {
	display: block;
	padding: 5px 8px;
	border-bottom: 1px solid var(--navy);
	line-height: 1.4;
	font-family: var(--sans);
	font-size: 10px;
	color: var(--pale-blue);
}
.primary-menu .sub-menu .sub-menu a { border-bottom: 0; padding: 3px 8px; }
.primary-menu .sub-menu a:hover { background: var(--navy); color: #fff; }
.primary-menu .sub-menu .menu-item-has-children > a {
	padding-right: 20px;
	background: url(images/arrow0.gif) no-repeat right 6px center;
}
.primary-menu .sub-menu .menu-item-has-children > a:hover {
	background: var(--navy) url(images/arrow1.gif) no-repeat right 6px center;
}

/* ---------------------------------------------------------------- Page body */

.site-body {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr) 190px;
	background: #fff;
	min-height: 60vh;
}
.site-body.no-sidenav { grid-template-columns: 30px minmax(0, 1fr) 190px; }
.site-body.no-sidebar { grid-template-columns: 160px minmax(0, 1fr) 30px; }
.site-body.no-sidenav.no-sidebar { grid-template-columns: 30px minmax(0, 1fr) 30px; }

.sidenav {
	grid-column: 1;
	padding: 20px;
	font-size: 11px;
}
.sidenav ul { margin: 0; padding: 0; list-style: none; }
.sidenav ul ul { padding-left: 0.9em; }
.sidenav a { display: block; padding: 0.35em 0; color: var(--link-blue); }
.sidenav a:hover, .sidenav .current > a { color: #000; }
.sidenav .section-top {
	display: block;
	margin-bottom: 0.4em;
	padding: 0.8em 0;
	border-bottom: 1px solid #ccc;
	font-weight: bold;
}
.sidenav ul ul a { padding: 0 0 0.45em; }

.content {
	grid-column: 2;
	padding: 0 30px 40px 0;
	min-width: 0;
}
.no-sidenav .content { padding-left: 0; }

.sidebar {
	grid-column: 3;
	padding: 20px;
	background: var(--sky);
	line-height: 1.7;
	font-size: 11px;
	color: #fff;
}
.sidebar a { color: #fff; }
.sidebar a:hover { color: var(--pale-blue); }
.sidebar table { border-collapse: collapse; }
.sidebar td { vertical-align: middle; padding-right: 6px; }
.sidebar li { margin-left: 1em; }
.sidebar .related-title { display: block; margin-bottom: 1.2em; }
.no-sidebar .sidebar { display: none; }

/* ---------------------------------------------------------------- Content */

h1, .entry-title {
	margin: 20px 0 1em;
	padding: 0.5em 0 0.05em;
	font-family: var(--title);
	font-weight: normal;
	font-size: 21px;
	line-height: 1.25;
	color: var(--olive);
}
h1 a { color: var(--olive); }

.entry h2, .entry-subtitle {
	margin: 1.5em 0 0;
	padding: 0;
	line-height: 1.5;
	font-size: 12px;
	color: var(--navy);
}
.entry h2 a { color: var(--olive); }
.entry-subtitle { margin: -1em 0 1.2em; }
.entry h3 {
	margin: 1.7em 0 0;
	line-height: 1.7;
	font-size: 12px;
	font-weight: bold;
	color: #000;
}

.entry {
	font-size: 12px;
	line-height: 1.5;
	color: var(--navy);
	overflow-wrap: anywhere;
}
.entry p { margin: 0 0 1em; }
.entry .bodytext { margin: 0 0 1.7em; }
.entry .bodytext2 { margin: 0 0 1.3em; line-height: 1.4; }
.entry table { max-width: 100%; }
.entry td, .entry th { font-size: inherit; }
.entry blockquote, .entry dir {
	display: block;
	margin: 1em 3em;
	padding: 0.5em 0;
	font-style: italic;
	line-height: 1.4;
	color: rgb(102, 102, 102);
}
.entry dir { font-style: normal; color: inherit; margin: 1em 0 1em 2.5em; padding: 0; }
.entry img.right, .entry img.alignright { float: right; margin: 0 0 20px 20px; }
.entry img.left, .entry img.alignleft { float: left; margin: 0 20px 20px 0; }
.entry .aligncenter { display: block; margin: 0 auto; }
.entry::after { content: ""; display: table; clear: both; }

.post-meta { margin: -0.8em 0 1.5em; font-size: 11px; color: var(--olive); }

/* Lists of posts (category pages, search). */
.post-list { margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.5; }
.post-list li { margin: 0 0 1.3em; }
.post-list .post-list-title { font-weight: bold; color: var(--navy); }
.post-list .post-list-title:hover { color: var(--red-hover); }
.post-list .post-list-date { color: var(--olive); font-size: 11px; }
.post-list .post-list-excerpt { margin: 0.2em 0 0; color: var(--navy); }
.pagination { margin: 2em 0; font-size: 12px; }
.pagination .page-numbers { padding: 0 0.4em; }

/* Forms. */
.search-form, .contact-form { margin: 1em 0 2em; font-size: 12px; }
.search-form input[type="search"] { width: min(320px, 100%); padding: 4px 6px; font: inherit; }
.contact-form label { display: block; margin: 0.8em 0 0.2em; font-weight: bold; }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
	width: min(480px, 100%);
	padding: 4px 6px;
	font: inherit;
	border: 1px solid var(--sky);
}
.contact-form textarea { height: 10em; }
.contact-form .hp { position: absolute; left: -9999px; }
.search-form button, .contact-form button {
	margin-top: 0.8em;
	padding: 4px 14px;
	border: 0;
	background: var(--navy);
	color: #fff;
	font: inherit;
	cursor: pointer;
}
.notice { padding: 0.6em 1em; margin: 1em 0; border-left: 4px solid var(--sky); background: #eef2f8; }
.notice.error { border-color: var(--red); background: #f8eeee; }

/* ---------------------------------------------------------------- Front page */

.home-body {
	display: grid;
	grid-template-columns: minmax(0, 491px) minmax(0, 1fr);
	background: var(--sky) url(images/bg_home.gif) repeat-y;
}
.home-left { background: #fff; }
.home-right { padding: 20px; color: #fff; max-width: 330px; }
.home-right .welcome { display: block; margin-bottom: 0.6em; }
.home-right .welcome-text {
	margin: 0 0 3.2em;
	line-height: 1.4;
	font-size: 11px;
	color: rgb(204, 221, 238);
}
.home-right .welcome-text a { color: #fff; font-weight: bold; }
.quick-links { margin: 0; padding: 0; list-style: none; max-width: 245px; }
.quick-links a {
	display: block;
	padding: 9px 0 9px 22px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.35);
	font-family: var(--title);
	font-size: 13px;
	color: #fff;
	position: relative;
}
.quick-links a::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 50%;
	border: 4px solid transparent;
	border-left: 6px solid rgba(255, 255, 255, 0.6);
	transform: translateY(-50%);
}
.quick-links a:hover { color: var(--pale-blue); }

.feature { margin: 25px 21px; font-size: 12px; line-height: 1.4; }
.feature img { border: 1px solid var(--sky); padding: 2px; }
.feature h1 { margin: 0.6em 0 0.4em; padding: 0; line-height: 1; }
.feature p { margin: 0.2em 0; }
.feature a.details { color: rgb(170, 58, 61); }

.selections { display: flex; flex-wrap: wrap; gap: 0 37px; padding: 0 21px 30px; clear: both; }
.selections > div { width: 206px; }
.selections h2 { margin: 0 0 0.6em; font-size: 10px; }
.selections h2 a {
	display: inline-block;
	padding: 3px 8px 4px;
	background: var(--khaki);
	color: #fff;
}
.selections ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--khaki); }
.selections li { padding: 0.55em 0; line-height: 1.4; font-size: 11px; }
.selections li a { color: var(--navy); }
.selections li a:hover { color: var(--red-hover); }

/* ---------------------------------------------------------------- Footer */

.site-footer {
	padding: 0 1em;
	border-top: 1px solid var(--khaki-line);
	line-height: 3;
	font-size: 11px;
	color: var(--cream);
	background: var(--khaki);
}
.site-footer a { color: var(--cream); white-space: nowrap; }
.site-footer a:hover { color: #fff; }
.site-footer .divider { padding: 0 1em; }

/* ---------------------------------------------------------------- Phones and narrow windows */

@media (max-width: 760px) {
	.site-header { height: 78px; background-size: auto 78px; }
	.site-header img { width: 241px; height: 78px; }

	.topnav > .menu-toggle {
		display: block;
		width: 100%;
		padding: 0 16px;
		height: 34px;
		border: 0;
		background: none;
		color: #fff;
		font: 13px var(--title);
		text-align: left;
		cursor: pointer;
	}
	.topnav .primary-menu, .topnav .utility-menu { display: none; width: 100%; }
	.topnav.open .primary-menu, .topnav.open .utility-menu { display: block; }
	.primary-menu > li > a { height: auto; padding: 8px 16px; border-right: 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
	.primary-menu .sub-menu, .primary-menu .sub-menu .sub-menu { position: static; display: block; width: auto; padding: 0 0 0 16px; background: none; }
	.primary-menu .sub-menu a { padding: 6px 16px; border: 0; font-size: 12px; }
	.utility-menu { margin: 0; padding: 0 0 6px; }
	.utility-menu a { padding: 6px 16px; height: auto; line-height: 1.4; }

	/* Content first, then Related Links, then the section menu. */
	.site-body, .site-body.no-sidenav, .site-body.no-sidebar, .site-body.no-sidenav.no-sidebar {
		display: flex;
		flex-direction: column;
		padding: 0 16px;
	}
	.content { order: 1; }
	.sidebar { order: 2; }
	.sidenav { order: 3; }
	.content, .no-sidenav .content { padding: 0 0 24px; }
	.sidebar { margin: 0 -16px; }
	.sidenav { margin: 0 -16px; padding: 12px 16px 20px; border-top: 1px solid #ddd; background: #f6f6f0; }
	.entry blockquote { margin: 1em 1em; }
	.entry table, .entry td { width: auto !important; }
	.entry table[align], .entry img[align] { float: none !important; }
	.entry td img { max-width: 100%; }

	.home-body { display: block; background: var(--sky); }
	.home-left { display: flow-root; }
	.home-right { max-width: none; padding: 20px 16px; }
	.feature { margin: 16px; }
	.selections { padding: 0 16px 24px; }
	.selections > div { width: 100%; }
}
