/* ==========================================================================
   JobsFor Community (bbPress forum index) - implements forum design.png
   --------------------------------------------------------------------------
   bbPress renders forum content through theme compatibility (see
   codex.bbpress.org > Themes > Theme Compatibility): our bbpress.php wrapper
   outputs the navy hero + two-column layout, and the forum markup itself
   comes from bbPress core templates (loop-forums.php, loop-single-forum.php)
   via the_content(). This file restyles that core markup - never edit the
   plugin's templates directly or updates will wipe it.

   Structure rendered by bbpress.php:
     .jf-community (.jf-community--index on the forum archive only)
       .jf-community-hero (full-width gradient band)
       .jf-community-body (grid: main card + 320px sidebar)
   bbPress core markup restyled inside:
     ul.bbp-forums > li.bbp-header (column labels)
                   > li.bbp-body > ul.forum.loop-item-N (one row per forum)
                   > li.bbp-footer (empty spacer row, hidden)
   Per-forum icons key off bbPress' loop-item-N position classes
   (bbp_get_forum_class()): 1 = map pin (Local Job Forums), 2 = megaphone
   (Welcome & Announcements), 3+ = chat bubble. If forums are reordered the
   icons follow the position - swap the selectors below to pin icons to
   specific forums instead.
   ========================================================================== */

/* ---------- Page scaffold ---------- */

.jf-community {
	background: #f4f6fa;
	padding-bottom: 56px;
}

/* The hero already titles the page - hide WorkScout's photo titlebar (with
   its "Forum" H1 + breadcrumbs) on every bbPress page. bbPress adds the
   .bbpress body class via its body_class filter, so this never touches
   regular pages. */
.bbpress #titlebar {
	display: none;
}

.jf-community-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 24px;
	align-items: start;
	padding-top: 28px;
}

/* ---------- Hero ---------- */

.jf-community-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(100deg, #051641 0%, #0a2f7d 55%, #0f62d6 100%);
	color: #fff;
	padding: 52px 0 40px;
}

.jf-community-hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 40px;
	align-items: center;
}

.jf-community-hero__title {
	color: #fff;
	font-size: 40px;
	line-height: 1.15;
	font-weight: 800;
	margin: 0 0 8px;
	letter-spacing: -0.01em;
}

.jf-community-hero__subtitle {
	color: rgba(255, 255, 255, 0.85);
	font-size: 16px;
	margin: 0 0 20px;
}

/* Search: white pill bar with cyan button (mirrors bbPress form-search.php
   params: action=bbp-search-request + bbp_search, handled by core). */
.jf-community-search {
	display: flex;
	align-items: stretch;
	background: #fff;
	border-radius: 8px;
	padding: 4px;
	max-width: 560px;
	box-shadow: 0 8px 24px rgba(2, 12, 40, 0.25);
}

.jf-community-search__icon {
	display: flex;
	align-items: center;
	padding-left: 12px;
	color: #8a97a8;
}

.jf-community-search input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: #1c2942;
	font-size: 14px;
	padding: 10px 12px;
	margin: 0;
	box-shadow: none;
}

.jf-community-search input[type="search"]:focus {
	outline: none;
}

.jf-community-search button[type="submit"] {
	border: 0;
	border-radius: 6px;
	background: #0aa7e2;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	padding: 0 28px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.jf-community-search button[type="submit"]:hover,
.jf-community-search button[type="submit"]:focus-visible {
	background: #0889bb;
}

/* Hero stats: Forums / Topics / Replies with translucent icon chips. */
.jf-community-hero__stats {
	display: flex;
	margin: 0;
	padding: 0;
}

.jf-community-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin: 0;
	padding: 0 32px;
}

.jf-community-stat + .jf-community-stat {
	border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.jf-community-stat dt {
	margin: 0;
}

.jf-community-stat__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.jf-community-stat__number {
	margin: 8px 0 0;
	font-size: 24px;
	font-weight: 800;
	color: #fff;
}

.jf-community-stat__label {
	margin: 2px 0 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.85);
}

/* ---------- Main forum card (index) ---------- */

.jf-community-card {
	background: #fff;
	border: 1px solid #e4e9f1;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(16, 28, 51, 0.06);
	overflow: hidden;
}

.jf-community-card__title {
	font-size: 18px;
	font-weight: 700;
	color: #101c33;
	margin: 0;
	padding: 20px 24px;
	border-bottom: 1px solid #eef1f6;
}

/* Reset bbPress list scaffolding inside the card. */
.jf-community--index #bbpress-forums ul.bbp-forums,
.jf-community--index #bbpress-forums ul.forum-titles,
.jf-community--index #bbpress-forums .bbp-body > ul.forum {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jf-community--index #bbpress-forums ul.bbp-forums {
	background: transparent;
	border: 0;
}

/* Hide the empty spacer footer row and (on the index only) the breadcrumb
   and inline search form - the hero already provides search. */
.jf-community--index #bbpress-forums .bbp-footer,
.jf-community--index #bbpress-forums > .bbp-breadcrumb,
.jf-community--index #bbpress-forums > .bbp-search-form {
	display: none;
}

/* Column labels + forum rows share one 4-column grid:
   Forum | Topics | Posts | Last post (matches the mockup header). */
.jf-community--index #bbpress-forums .forum-titles,
.jf-community--index #bbpress-forums .bbp-body > ul.forum {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 84px 84px 180px;
	gap: 16px;
	align-items: center;
}

.jf-community--index #bbpress-forums li.bbp-header {
	background: #f8fafc;
	border-bottom: 1px solid #eef1f6;
	padding: 12px 24px;
	font-size: 13px;
	font-weight: 600;
	color: #33415c;
}

.jf-community--index #bbpress-forums .bbp-body > ul.forum {
	padding: 22px 24px;
	border-bottom: 1px solid #eef1f6;
}

.jf-community--index #bbpress-forums .bbp-body > ul.forum:last-child {
	border-bottom: 0;
}

/* Undo bbPress default floats/widths on the grid cells. */
.jf-community--index #bbpress-forums li.bbp-forum-info,
.jf-community--index #bbpress-forums li.bbp-forum-topic-count,
.jf-community--index #bbpress-forums li.bbp-forum-reply-count,
.jf-community--index #bbpress-forums li.bbp-forum-freshness {
	float: none;
	width: auto;
	margin: 0;
	text-align: left;
}

.jf-community--index #bbpress-forums li.bbp-forum-topic-count,
.jf-community--index #bbpress-forums li.bbp-forum-reply-count {
	text-align: center;
	font-size: 15px;
	color: #33415c;
}

.jf-community--index .forum-titles .bbp-forum-topic-count,
.jf-community--index .forum-titles .bbp-forum-reply-count {
	text-align: center;
}

/* Forum icon chip: 48px pale-blue circle with a per-position glyph. */
.jf-community--index #bbpress-forums li.bbp-forum-info {
	position: relative;
	padding-left: 64px;
	min-height: 48px;
}

.jf-community--index #bbpress-forums li.bbp-forum-info::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: #e8f3fd;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 24px 24px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a7cc2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

.jf-community--index #bbpress-forums ul.loop-item-1 > li.bbp-forum-info::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a7cc2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.jf-community--index #bbpress-forums ul.loop-item-2 > li.bbp-forum-info::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a7cc2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l14-6v14L3 13v-2z'/%3E%3Cpath d='M17 8a4 4 0 0 1 0 8'/%3E%3Cline x1='7' y1='13' x2='7' y2='21'/%3E%3C/svg%3E");
}

.jf-community--index #bbpress-forums a.bbp-forum-title {
	font-size: 16px;
	font-weight: 700;
	color: #1470c8;
	text-decoration: none;
}

.jf-community--index #bbpress-forums a.bbp-forum-title:hover,
.jf-community--index #bbpress-forums a.bbp-forum-title:focus-visible {
	text-decoration: underline;
}

.jf-community--index #bbpress-forums .bbp-forum-content {
	font-size: 14px;
	line-height: 1.5;
	color: #5b6b82;
	margin-top: 4px;
}

.jf-community--index #bbpress-forums .bbp-forum-content p {
	margin: 0;
}

.jf-community--index #bbpress-forums li.bbp-forum-freshness {
	font-size: 13px;
	color: #8a97a8;
}

.jf-community--index #bbpress-forums li.bbp-forum-freshness a {
	color: #33415c;
}

/* ---------- Sidebar cards ---------- */

.jf-community-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

.jf-side-card {
	background: #fff;
	border: 1px solid #e4e9f1;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(16, 28, 51, 0.06);
	padding: 20px;
}

.jf-side-card__title {
	font-size: 16px;
	font-weight: 700;
	color: #101c33;
	margin: 0 0 14px;
}

.jf-side-welcome__row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-bottom: 16px;
}

.jf-side-welcome__row img.avatar,
.jf-side-welcome__avatar {
	border-radius: 50%;
	flex-shrink: 0;
}

.jf-side-welcome__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	background: #0aa7e2;
	color: #fff;
}

.jf-side-welcome__row p {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #5b6b82;
}

.jf-side-welcome__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Buttons (also reused for bbPress submit buttons below). */
.jf-community .jf-btn {
	display: inline-block;
	border: 0;
	border-radius: 6px;
	background: #0aa7e2;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	padding: 11px 20px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.jf-community .jf-btn:hover,
.jf-community .jf-btn:focus-visible {
	background: #0889bb;
	color: #fff;
	text-decoration: none;
}

.jf-community .jf-btn--block {
	display: block;
	width: 100%;
}

.jf-community .jf-btn--ghost {
	background: #eef6fb;
	color: #0a7cc2;
}

.jf-community .jf-btn--ghost:hover,
.jf-community .jf-btn--ghost:focus-visible {
	background: #ddeef8;
	color: #0a7cc2;
}

/* Guidelines list. */
.jf-side-guidelines ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.jf-side-guidelines li {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0;
}

.jf-side-guidelines__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #e8f3fd;
	color: #0a7cc2;
}

.jf-side-guidelines li strong {
	display: block;
	font-size: 14px;
	color: #101c33;
}

.jf-side-guidelines li div span {
	display: block;
	font-size: 13px;
	color: #5b6b82;
}

/* Recent activity list. */
.jf-side-activity__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.jf-side-activity__list li,
.jf-side-activity__empty {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.jf-side-activity__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #e8f3fd;
	color: #0a7cc2;
}

.jf-side-activity__list a {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #1470c8;
	text-decoration: none;
	line-height: 1.4;
}

.jf-side-activity__list a:hover {
	text-decoration: underline;
}

.jf-side-activity__meta {
	display: block;
	font-size: 12px;
	color: #8a97a8;
	margin-top: 2px;
}

.jf-side-activity__empty p {
	margin: 4px 0 0;
	font-size: 13px;
	color: #5b6b82;
}

/* ---------- Topic / reply pages (single column) ---------- */

.jf-community-single {
	background: #fff;
	border: 1px solid #e4e9f1;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(16, 28, 51, 0.06);
	padding: 28px;
	min-width: 0;
}

.jf-community-single #bbpress-forums ul {
	list-style: none;
}

.jf-community-single #bbpress-forums .bbp-breadcrumb {
	font-size: 13px;
	color: #8a97a8;
	margin-bottom: 16px;
}

.jf-community-single #bbpress-forums fieldset {
	border: 1px solid #e4e9f1;
	border-radius: 8px;
	padding: 20px;
	margin: 0 0 20px;
}

.jf-community-single #bbpress-forums legend {
	font-size: 15px;
	font-weight: 700;
	color: #101c33;
	padding: 0 8px;
}

.jf-community-single #bbpress-forums input[type="text"],
.jf-community-single #bbpress-forums textarea,
.jf-community-single #bbpress-forums select {
	border: 1px solid #d5dce6;
	border-radius: 6px;
	padding: 10px 12px;
	font-size: 14px;
	max-width: 100%;
}

.jf-community-single #bbpress-forums input[type="text"]:focus,
.jf-community-single #bbpress-forums textarea:focus {
	border-color: #0aa7e2;
	outline: none;
}

/* Cyan submit buttons on all bbPress forms (new topic, reply, search). */
.jf-community #bbpress-forums button[type="submit"],
.jf-community #bbpress-forums input[type="submit"],
.jf-community #bbpress-forums .button {
	border: 0;
	border-radius: 6px;
	background: #0aa7e2;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	padding: 11px 24px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.jf-community #bbpress-forums button[type="submit"]:hover,
.jf-community #bbpress-forums input[type="submit"]:hover,
.jf-community #bbpress-forums .button:hover {
	background: #0889bb;
	color: #fff;
}

/* ---------- Responsive ---------- */

@media (max-width: 990px) {
	.jf-community-body {
		grid-template-columns: 1fr;
	}

	.jf-community-hero__inner {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.jf-community-hero__stats {
		justify-content: flex-start;
	}

	.jf-community-stat {
		padding: 0 24px;
	}

	.jf-community-stat:first-child {
		padding-left: 0;
	}
}

@media (max-width: 767px) {
	.jf-community-hero {
		padding: 36px 0 28px;
	}

	.jf-community-hero__title {
		font-size: 30px;
	}

	.jf-community-search button[type="submit"] {
		padding: 0 18px;
	}

	.jf-community-stat {
		padding: 0 16px;
	}

	/* Stack forum rows: hide the label row, inline the counts/meta. */
	.jf-community--index #bbpress-forums li.bbp-header {
		display: none;
	}

	.jf-community--index #bbpress-forums .bbp-body > ul.forum {
		grid-template-columns: 1fr;
		gap: 8px;
	}

	.jf-community--index #bbpress-forums li.bbp-forum-topic-count,
	.jf-community--index #bbpress-forums li.bbp-forum-reply-count,
	.jf-community--index #bbpress-forums li.bbp-forum-freshness {
		text-align: left;
		font-size: 13px;
		color: #8a97a8;
	}

	.jf-community-single {
		padding: 20px 16px;
	}
}
