/*
Theme Name: Edgebrook Community Association
Theme URI: https://edgebrookcommunity.org/
Author: Ironistic
Author URI: https://www.ironistic.com/
Description: Classic WordPress theme converted from the static edgebrookcommunity.org site. Keeps the original boxed homepage (news column + green sidebar) and the interior layout (green branding bar, address tagline, left section navigation), rebuilt with menus, widgets, Customizer settings and a responsive layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edgebrook
Tags: two-columns, left-sidebar, right-sidebar, custom-menu, custom-header, custom-logo, featured-images, threaded-comments
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
	--eca-green: #70bc00;          /* ECA brand green (interior branding bar) */
	--eca-green-light: #b7dd7f;    /* tagline bar */
	--eca-green-dark: #2d862d;     /* homepage nav + footer bars */
	--eca-green-deep: #206020;     /* homepage links + headings */
	--eca-green-mint: #d8f3d8;     /* homepage sidebar */
	--eca-plum: #985d6a;           /* homepage sidebar link hover */
	--eca-navy: #000080;           /* interior link hover background */
	--eca-paper: #f9f8f6;
	--eca-text: #000;
	--eca-muted: #666;
	--eca-rule: #eee;
	--font-body: "Open Sans", Verdana, Arial, sans-serif;
	--font-head: "Open Sans Condensed", "Open Sans", "Trebuchet MS", Arial, sans-serif;
	--font-home: Georgia, Times, serif;
	--nav-width: 180px;
	--gutter: 16px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	padding: 0;
	font-family: var(--font-body);
	font-weight: 400;
	font-size: 115%;
	line-height: 1.45;
	color: var(--eca-text);
	background: #fff;
}

img { max-width: 100%; height: auto; }
iframe, video, embed, object { max-width: 100%; }

h1, h2, h3 {
	font-family: var(--font-head);
	font-weight: 700;
	line-height: 1.25;
	padding: 0;
}
h1 { font-size: 150%; margin: 0 0 .5em; }
h2 { font-size: 125%; }
h3 { font-size: 110%; }

p { color: var(--eca-text); }

a { font-weight: 700; color: #000; text-decoration: none; }
a:hover,
a:focus { color: #fff; background-color: var(--eca-navy); }
a:active { color: blue; }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff; clip: auto !important; clip-path: none; color: #000;
	display: block; font-size: .9rem; height: auto; left: 5px; top: 5px;
	padding: 12px 20px; width: auto; z-index: 100000;
}

/* ==========================================================================
   3. Interior header (branding bar, tagline, primary nav)
   ========================================================================== */
.site-branding {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 80px;
	padding: 4px 75px 4px 12px;
	background-color: var(--eca-green);
}
.site-branding .custom-logo-link,
.site-branding .site-logo { display: block; flex: 0 0 auto; line-height: 0; }
.site-branding .custom-logo-link:hover,
.site-branding .site-logo:hover { background: none; }
.site-branding img.custom-logo,
.site-branding .site-logo img { width: 72px; height: auto; }

.site-title {
	flex: 1 1 auto;
	min-width: 0;
	overflow-wrap: anywhere;
	margin: 0;
	font-size: 150%;
}
.site-title a { color: #000; }
.site-title a:hover { color: #fff; background: transparent; }

.join-badge { flex: 0 0 auto; line-height: 0; }
.join-badge:hover { background: none; }
.join-badge img { width: 86px; height: auto; }

.site-tagline {
	margin: 0;
	padding: 10px var(--gutter) 12px;
	font-weight: 700;
	font-size: 90%;
	text-align: center;
	background-color: var(--eca-green-light);
	border-bottom: 4px solid var(--eca-green);
}

/* ==========================================================================
   4. Primary navigation (shared by both layouts)
   ========================================================================== */
.primary-nav {
	background-color: var(--eca-green-dark);
	color: #fff;
	font-family: var(--font-home);
}
.primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 5px 0 5px 30px;
	display: flex;
	flex-wrap: wrap;
	column-gap: 40px;
	row-gap: 2px;
}
.primary-nav li { position: relative; font-size: 100%; }
.primary-nav a {
	display: inline-block;
	font-weight: 400;
	font-size: 15px;
	line-height: 20px;
	color: #fff;
}
.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-ancestor > a,
.primary-nav .current_page_ancestor > a { color: #000; background: transparent; }

/* dropdowns (only shown if the menu has children) */
.primary-nav ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: -12px;
	z-index: 50;
	min-width: 220px;
	padding: 6px 0;
	background: var(--eca-green-dark);
	box-shadow: 0 4px 10px rgba(0,0,0,.2);
	flex-direction: column;
}
.primary-nav ul ul a { display: block; padding: 4px 12px; }
.primary-nav li:hover > ul,
.primary-nav li:focus-within > ul { display: flex; }

.menu-toggle {
	display: none;
	width: 100%;
	padding: 8px var(--gutter);
	border: 0;
	background: var(--eca-green-dark);
	color: #fff;
	font: inherit;
	font-family: var(--font-home);
	text-align: left;
	cursor: pointer;
}
.menu-toggle::before { content: "\2630\00a0\00a0"; }

/* ==========================================================================
   5. Interior layout: left section navigation + body content
   ========================================================================== */
.site-body {
	display: flex;
	align-items: flex-start;
}

.section-nav {
	flex: 0 0 var(--nav-width);
	width: var(--nav-width);
	min-height: 484px;
	padding: 10px 0 20px;
	/* replaces images/backgrounds/navigation-fade.jpg */
	background: linear-gradient(to bottom, var(--eca-green) 0, #9fd44f 40%, #fff 100%);
	background-color: var(--eca-green);
}
.section-nav ul {
	list-style: none;
	margin: 0;
	padding: 0 0 0 20px;
}
.section-nav ul ul { padding-left: 12px; margin-top: 4px; }
.section-nav li {
	font-size: 80%;
	line-height: 1.25;
	padding-bottom: 4px;
	animation: .5s ease-out 0s 1 slideInFromLeft;
}
.section-nav ul ul li { font-size: 100%; }
.section-nav li.section-divider {
	margin: 6px 0;
	padding: 0;
	height: 0;
	width: 120px;
	border-top: 2px solid #000;
}
.section-nav a { color: #000; }
.section-nav .current_page_item > a,
.section-nav .current-menu-item > a,
.section-nav li.is-current > a {
	display: block;
	margin-left: -18px;
	padding-left: 18px;
	color: #fff;
	background-color: #000;
}

@keyframes slideInFromLeft {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
	.section-nav li { animation: none; }
}

#bodycontent,
.site-main {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 75px 40px 40px;
}

.entry-title,
h1.first { padding-top: 10px; }

/* ==========================================================================
   6. Content (classes carried over from -css/style1.css)
   ========================================================================== */
.entry-content li { font-size: 80%; }
.entry-content li li { font-size: 100%; }
.entry-content > ul,
.entry-content > ol { padding-left: 1.5em; }

.entry-content table {
	border-collapse: collapse;
	max-width: 100%;
}
.entry-content td,
.entry-content th { vertical-align: top; }

/* striped tables used on Board Meetings and similar pages */
.entry-content table.eca-striped { width: 100%; font-family: arial, sans-serif; }
.entry-content table.eca-striped td,
.entry-content table.eca-striped th { border: 1px solid #ddd; text-align: left; padding: 8px; }
.entry-content table.eca-striped tr:nth-child(even) { background-color: #ddd; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

h1.big { font-size: 225%; }
h1.section-head { padding: 15px 0 15px 15px; margin-bottom: 10px; background-color: var(--eca-green); }
h1.extra-bottom { padding-bottom: 15px; }
h1.center { text-align: center; }
h1.tab { padding-top: 0; margin-top: 0; }
h1.tight, h2.tight, p.tight { margin-top: 0; }
h2.first { padding-top: 10px; }
h3.tight { margin-bottom: 0; }
h3.board-space { padding-bottom: 0; margin-bottom: 0; }
p.small { font-size: 80%; }

img.tight { margin-top: 0; }
img.xtraspace { margin-top: 10px; }
img.left, img[align="left"], .alignleft { float: left; margin: 0 18px 10px 0; }
img[align="right"], .alignright { float: right; margin: 0 0 10px 18px; }
img.pad { padding: 0 18px 0 0; vertical-align: top; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.has-text-align-center, .eca-center { text-align: center; }

hr.green, hr.extra { border: 0; background-color: var(--eca-green); height: 2px; padding-top: 0; }
hr.green { margin-top: 0; }
hr.extra { margin-top: 10px; }
hr.clrfloat { clear: left; }

a.contact-board { font-style: italic; font-weight: 400; }
td.not_first { padding-left: 15px; }

table.pres-table { border-collapse: collapse; border: 1px solid #000; }
tr.pres { border-bottom: 1px solid #ddd; }
tr.pres:nth-child(even) { background-color: #f2f2f2; }
td.pres-space { padding: 15px; border: 1px solid #ddd; }

table.member { text-align: left; border-collapse: collapse; border: 2px solid #000; width: 100%; }
td.member-cell { width: 33%; vertical-align: top; padding: 5px 10px; font-size: 90%; }

table.paypal { border: 1px solid #000; width: auto; min-width: 320px; }
td.paypal1 { padding: 5px; }
td.paypal2 { padding: 6px; }
td.paypal3 { padding: 5px; }
table.paypal-land { border: 1px solid #000; width: auto; min-width: 420px; }
td.paypal-land1 { padding: 5px; }
td.paypal-land2 { padding: 6px; }
td.paypal-land3 { padding: 5px; }

table.cn { border: 0; padding: 5px; }
table.numbers { border: 0; padding: 0; width: 100%; }
td.rule { border-bottom: 1px solid #000; padding: 0 0 3px; }
td.right { text-align: right; padding-left: 10px; }

.entry-content figure { margin: 1em 0; }
.entry-content figure:has(img[align="right"]) { float: right; margin: 0 0 10px 18px; }
.entry-content figure:has(img[align="right"]) img { float: none; margin: 0; }
.entry-content figcaption,
.wp-caption-text { font-size: 85%; }

.entry-content iframe[src*="youtube"] { aspect-ratio: 16 / 9; width: 560px; height: auto; }

.entry-content::after,
.home-feature::after { content: ""; display: table; clear: both; }

.wp-block-image img { height: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.gallery-item { margin: 0; }

/* Forms (Community Notes listing form, search) */
.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="tel"],
.entry-content input[type="date"],
.entry-content input[type="time"],
.entry-content textarea,
.search-form input[type="search"] {
	max-width: 100%;
	padding: 6px 8px;
	border: 1px solid #999;
	font: inherit;
	font-size: 90%;
}
.search-form { display: flex; gap: 8px; margin: 1em 0; }
.search-form button,
.entry-content input[type="submit"] {
	padding: 6px 14px;
	border: 0;
	background: var(--eca-green-dark);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

/* Posts / archives (interior style) */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li { font-size: 100%; padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--eca-rule); }
.entry-meta { font-size: 80%; color: var(--eca-muted); margin: 0 0 .6em; }
.pagination, .posts-navigation { margin: 2em 0; font-size: 90%; }
.pagination .page-numbers { padding: 2px 8px; }

.visit-us { text-align: center; font-size: 100%; }

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer {
	clear: both;
	padding: 7px var(--gutter) 7px 20px;
	font-family: var(--font-home);
	font-size: 80%;
	text-align: center;
	color: #fff;
	background-color: var(--eca-green-dark);
}
.site-footer p { margin: 0; color: #fff; }
.site-footer a { color: #fff; font-weight: 700; }
.site-footer a:hover { color: #000; background: transparent; }
.footer-menu { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.footer-menu li { font-size: 100%; }

/* ==========================================================================
   8. Homepage layout (boxed 940px wrapper, news column + green aside)
   ========================================================================== */
body.eca-home-layout {
	color: var(--eca-muted);
	background-color: var(--eca-paper);
	background-position: center;
	font-family: var(--font-home);
	font-size: 100%;
	line-height: 1.4em;
}
body.eca-home-layout a { color: var(--eca-green-deep); font-weight: 400; }
body.eca-home-layout a:hover,
body.eca-home-layout a:focus { color: var(--eca-plum); background: transparent; }
body.eca-home-layout p { color: inherit; }
body.eca-home-layout h1,
body.eca-home-layout h2,
body.eca-home-layout h3 { font-family: var(--font-home); font-weight: normal; }

.wrapper {
	width: 940px;
	max-width: calc(100% - 2 * var(--gutter));
	margin: 20px auto;
	border: 2px solid #000;
	background-color: #fff;
}

.home-header { position: relative; background: var(--eca-green); }
.home-header .header-image { display: block; width: 100%; height: auto; max-height: 160px; object-fit: cover; object-position: left center; }
.home-header .home-title { margin: 0; }
.home-header .home-title a { display: block; line-height: 0; }
.home-header .home-title a:hover { background: transparent; }

body.eca-home-layout .primary-nav a,
body.eca-home-layout .primary-nav a:visited { color: #fff; }
body.eca-home-layout .primary-nav a:hover,
body.eca-home-layout .primary-nav .current-menu-item > a,
body.eca-home-layout .primary-nav .current_page_item > a { color: #000; }

.home-columns { display: flex; align-items: stretch; }

section.News {
	flex: 1 1 659px;
	min-width: 0;
	border-right: 1px solid var(--eca-rule);
}
.home-intro { padding: 10px 20px; }

.home-feature {
	overflow: auto;
	width: 100%;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--eca-rule);
}
.home-feature:last-child { border-bottom: 0; }
.home-feature > a { display: block; color: inherit; }
.home-feature > a:hover { background: transparent; color: inherit; }
.home-feature .feature-media {
	float: left;
	width: 290px;
	min-height: 220px;
	padding: 5px;
	margin: 20px;
	border: 1px solid var(--eca-rule);
	text-align: center;
}
.home-feature .feature-media img { width: auto; max-height: 260px; }
.home-feature .feature-media figcaption { font-size: 90%; text-align: left; }
.home-feature .feature-body { margin-top: 40px; padding-right: 20px; overflow: hidden; }
.home-feature h2 { margin: 10px 0 5px; padding: 0; font-size: 1.5em; color: var(--eca-green-deep); font-weight: bold; }
.home-feature .feature-body h3,
.home-feature .feature-body strong { color: var(--eca-green-deep); }
.home-feature .feature-body h3 { margin: 0 0 10px; }
.home-feature .feature-more { font-weight: bold; }
.home-feature.is-centered .feature-body { text-align: center; }

aside.home-aside {
	flex: 0 0 260px;
	width: 260px;
	padding: 0 10px 20px;
	background-color: var(--eca-green-mint);
}
.home-aside h2,
.home-aside .widget-title {
	margin: 0;
	padding: 30px 0 10px;
	font-size: 1.35em;
	font-weight: bold;
	color: #336633;
	text-decoration: underline;
}
.home-aside .widget { margin-bottom: 10px; }
.home-aside .widget:not(:last-child)::after {
	content: "- - - - - - - - - - - - - - -";
	display: block;
	margin-top: 18px;
	text-align: center;
	color: var(--eca-muted);
}
.home-aside ul { list-style: none; margin: 0; padding: 0; }
.home-aside li { font-size: 100%; }
.home-aside .widget a,
.home-aside .aside-link {
	display: block;
	padding: 10px;
	border-bottom: 1px solid var(--eca-rule);
	color: #336633;
	font-weight: bold;
}
.home-aside .widget a:hover,
.home-aside .aside-link:hover { color: var(--eca-plum); background-color: #efefef; }
.home-aside .calendar-link { padding: 10px 0 0; border: 0; }
.home-aside .calendar-link img { display: block; width: 230px; max-width: 100%; }
.home-aside .social-links a { display: flex; align-items: center; gap: 10px; }
.home-aside .social-links img { width: 36px; height: 30px; object-fit: contain; }
.home-aside .social-links .facebook-badge img { width: 145px; height: auto; }
.home-aside .aside-email { padding: 10px; font-weight: bold; color: #336633; }
.home-aside .aside-email a { display: inline; padding: 0; border: 0; }
.home-aside .newsletter-cta { font-size: 1.35em; text-align: center; }

body.eca-home-layout .site-footer { font-size: 80%; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 960px) {
	#bodycontent, .site-main { padding: 10px 24px 40px; }
	.site-branding { padding-right: 16px; }
}

@media (max-width: 782px) {
	body { font-size: 105%; }

	.menu-toggle { display: block; }
	.primary-nav .menu-wrap { display: none; }
	.primary-nav.is-open .menu-wrap { display: block; }
	.primary-nav ul { flex-direction: column; padding: 4px var(--gutter) 10px; }
	.primary-nav ul ul { display: flex; position: static; box-shadow: none; padding: 0 0 0 16px; min-width: 0; }
	.primary-nav a { padding: 6px 0; }

	.site-branding { gap: 12px; padding: 8px var(--gutter); }
	.site-title { font-size: 105%; }
	.site-branding img.custom-logo,
	.site-branding .site-logo img { width: 52px; }
	.join-badge img { width: 60px; }

	.site-body { flex-direction: column; }
	.section-nav {
		width: 100%;
		flex-basis: auto;
		min-height: 0;
		padding: 10px 0;
		background: var(--eca-green);
	}
	.section-nav ul { padding: 0 var(--gutter) 0 calc(var(--gutter) + 18px); }
	#bodycontent, .site-main { width: 100%; padding: 10px var(--gutter) 32px; }

	img[align="right"], .alignright,
	.entry-content figure:has(img[align="right"]) { float: none; display: block; margin: 10px auto; }

	.entry-content table:not(.paypal):not(.paypal-land) { display: block; overflow-x: auto; }
	table.paypal, table.paypal-land { min-width: 0; width: 100%; }

	.wrapper { margin: 0 auto; max-width: 100%; border-left: 0; border-right: 0; }
	.home-columns { flex-direction: column; }
	section.News { border-right: 0; }
	aside.home-aside { width: 100%; flex-basis: auto; padding: 0 var(--gutter) 20px; }
	.home-feature .feature-media { float: none; width: auto; min-height: 0; margin: 16px var(--gutter) 0; }
	.home-feature .feature-body { margin-top: 12px; padding: 0 var(--gutter); }
}
