/* ============================================================
   CR WOTS — Front-end Styles
   ============================================================ */

/* ── Layout ──────────────────────────────────────────────── */
.crwots-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 0 2.5%;
	align-items: flex-start;
	width: 100%;
	box-sizing: border-box;
}

.crwots-col-main {
	flex: 0 0 72.6%;
	max-width: 72.6%;
	box-sizing: border-box;
}

.crwots-col-sidebar {
	flex: 0 0 24.9%;
	max-width: 24.9%;
	box-sizing: border-box;
	background: #f8f8f8 !important;
	border: 1px solid #e4e4e4 !important;
	border-radius: 3px !important;
	padding: 16px 18px !important;
	position: sticky;
	top: 30px;
	align-self: flex-start;
	margin-top: 60px;
}

/* ── Sidebar Content Block wrapper (cr_wots_sidebar shortcode) ── */
/* Mirrors .crwots-col-sidebar so the Blocksy Content Block has the same background */
.crwots-sidebar-wrap {
	background: #f8f8f8 !important;
	border: 1px solid #e4e4e4 !important;
	border-radius: 3px !important;
	padding: 16px 18px !important;
	box-sizing: border-box !important;
	width: 100% !important;
	position: sticky;
	top: 30px;
}

/* ── Sections ────────────────────────────────────────────── */
.crwots-section {
	width: 100%;
	margin-bottom: 40px;
	box-sizing: border-box;
}

/* ── Logo ────────────────────────────────────────────────── */
.crwots-logo-img {
	width: 100%;
	height: auto;
	display: block;
}

.crwots-no-logo {
	color: #888;
	font-style: italic;
}

/* ── Filter bar ──────────────────────────────────────────── */
.crwots-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	width: 100%;
}

.crwots-filter-col {
	flex: 1 1 0;
	min-width: 0;
}

.crwots-filter-submit-btn {
	flex: 0 0 auto;
}

/* ── Buttons ─────────────────────────────────────────────── */
.crwots-btn {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 4px;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.4;
	transition: background 0.2s, border-color 0.2s;
}

.crwots-btn-primary {
	background: #A31F34;
	color: #ffffff;
	border: none;
}

.crwots-btn-primary:hover {
	background: #000000;
	color: #ffffff !important;
	border: none;
}

.crwots-btn-secondary {
	background: #A31F34;
	color: #ffffff;
	border: none;
}

.crwots-btn-secondary:hover {
	background: #8a1a2b;
	color: #ffffff !important;
	border: none;
}

/* ── Selects ─────────────────────────────────────────────── */
.crwots-select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9rem;
	background: #fff;
	appearance: auto;
	cursor: pointer;
	box-sizing: border-box;
}

.crwots-select:focus {
	outline: 2px solid #1a1a1a;
	outline-offset: 1px;
}

/* ── Search input ────────────────────────────────────────── */
.crwots-search-wrap {
	position: relative;
	width: 100%;
}

.crwots-search-icon {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	color: #888;
	pointer-events: none;
	display: flex;
	align-items: center;
}

.crwots-search-input {
	width: 100%;
	padding: 8px 34px 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.9rem;
	box-sizing: border-box;
}

.crwots-search-input:focus {
	outline: 2px solid #1a1a1a;
	outline-offset: 1px;
}

/* ── Post listing ────────────────────────────────────────── */
.crwots-listing-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 16px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Cards: usp-box style — shadowed box per card */
.crwots-cards {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 40px;
}

.crwots-card {
	padding: 15px;
	margin-bottom: 40px;
	background: #fff;
	border: 1px solid #333333 !important;
	/* box-shadow color is set inline via plugin settings (card_shadow_color) */
}

/* Title: larger, bold, linked */
.crwots-card-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 8px;
	line-height: 1.3;
}

.crwots-card-title a {
	text-decoration: none;
	color: inherit;
}

.crwots-card-title a:hover {
	text-decoration: underline;
}

/* Excerpt: plain paragraph text */
.crwots-card-excerpt {
	margin: 0 0 10px;
	font-size: 0.9rem;
	line-height: 1.55;
	color: inherit;
}

/* Meta: inline with pipe separators */
.crwots-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
	font-size: 0.8rem;
	color: inherit;
}

.crwots-meta-sep {
	color: #bbb;
}

.crwots-card-date {
	color: inherit;
}

.crwots-card-cats {
	color: inherit;
	font-weight: 700;
}

.crwots-card-cats a {
	color: inherit;
	text-decoration: none;
}

.crwots-card-cats a:hover {
	text-decoration: underline;
}

.crwots-card-readmore {
	color: #A31F34;
	font-weight: 700;
	text-decoration: none;
}

.crwots-card-readmore:hover {
	text-decoration: underline;
}

.crwots-viewall-wrap {
	margin-top: 20px;
	text-align: center;
}

.crwots-no-posts {
	color: #888;
	font-style: italic;
}

/* ── Form section ────────────────────────────────────────── */
.crwots-form-section {
	display: flex;
	justify-content: center;
	align-items: flex-start;
}

.crwots-form-section > * {
	width: 100%;
}

.crwots-no-form {
	color: #888;
	font-style: italic;
	text-align: center;
}

/* ── WPForms field container ────────────────────────────── */
/* Matches sidebar background/border/padding */
.crwots-form-section .wpforms-field-container {
	background: #f8f8f8 !important;
	border: 1px solid #e4e4e4 !important;
	border-radius: 3px !important;
	padding: 16px 18px !important;
	box-sizing: border-box !important;
}

/* ── Sidebar ─────────────────────────────────────────────── */
/* !important used throughout to override Blocksy theme defaults */

.crwots-sidebar-section {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	margin-bottom: 28px !important;
	box-shadow: none !important;
}

.crwots-sidebar-section:last-child {
	margin-bottom: 0 !important;
}

.crwots-sidebar-title {
	font-size: 20px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.06em !important;
	color: #A31F34 !important;
	margin: 0 0 4px !important;
	padding: 0 !important;
	border: none !important;
	line-height: 1.3 !important;
	background: none !important;
}

.crwots-sidebar-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.crwots-sidebar-item {
	padding: 2px 0 !important;
	border: none !important;
	border-bottom: none !important;
	font-size: 0.85rem !important;
	line-height: 1.45 !important;
	background: none !important;
}

.crwots-sidebar-item a {
	text-decoration: none !important;
	color: inherit !important;
	font-weight: normal !important;
	font-size: 16px !important;
}

.crwots-sidebar-item a:hover {
	text-decoration: underline !important;
}

.crwots-view-count {
	color: inherit !important;
	font-size: inherit !important;
	margin-left: 2px !important;
}

/* Latest: no bullet, date on line below */
.crwots-latest-list {
	list-style: none !important;
	padding-left: 0 !important;
}

.crwots-latest-list .crwots-sidebar-item {
	display: flex !important;
	flex-direction: column !important;
	gap: 0 !important;
}

.crwots-latest-date {
	font-size: 0.8rem !important;
	color: inherit !important;
	opacity: 0.7;
	display: block !important;
}

/* Sidebar ad slot */
.crwots-sidebar-ad {
	text-align: center !important;
	margin-bottom: 40px !important;
}

/* Sidebar image — locked size, never reflowed by sticky JS */
.crwots-sidebar-top-image {
	margin-bottom: 16px !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	box-shadow: none !important;
}

.crwots-sidebar-img {
	width: auto !important;
	max-width: 100% !important;
	height: auto !important;
	display: block !important;
}

/* Sidebar custom HTML block */
.crwots-sidebar-custom-html {
	margin-bottom: 16px !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
	box-shadow: none !important;
}

/* ── WPForms title ───────────────────────────────────────── */
.wpforms-title {
	display: none !important;
}

/* ── View All hover ──────────────────────────────────────── */
.crwots-viewall-wrap a:hover {
	background-color: #000000 !important;
	color: #ffffff !important;
}

/* ── Widget (shares sidebar CSS via crwots-sidebar-section) ── */
.crwots-widget-section {
	margin-bottom: 28px;
}

.crwots-widget-section:last-child {
	margin-bottom: 0;
}


/* ── Blocksy sticky sidebar fix ─────────────────────────────────────────── */
/* Blocksy sets overflow:hidden on these containers which breaks position:sticky.
   Overriding to overflow:visible allows native CSS sticky to work. */
.ct-sidebar,
.ct-sidebar > div,
.ct-sidebar .widget,
.widget-area,
.widget-area > div {
	overflow: visible !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
	.crwots-col-main,
	.crwots-col-sidebar {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.crwots-filter-form {
		flex-direction: column;
	}

	.crwots-filter-col,
	.crwots-filter-submit-btn {
		width: 100%;
		flex: 0 0 100%;
	}

	.crwots-btn {
		width: 100%;
		text-align: center;
	}
}
