.ec-wrap {
	--ec-blue: #eb2127;
	--ec-blue-dark: #1B1C6E;
	--ec-text: #2b2b2b;
	--ec-muted: #6b7280;
	--ec-border: #e5e7eb;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ec-text);
	max-width: 1100px;
	margin: 0 auto;
}

/* Search box */
.ec-search {
	position: relative;
	margin-bottom: 18px;
}
.ec-search input[type="search"] {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 16px;
	font-size: 15px;
	border: 1px solid var(--ec-border);
	border-radius: 8px;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.ec-search input[type="search"]:focus {
	border-color: var(--ec-blue);
	box-shadow: 0 0 0 3px rgba(75,168,201,.15);
}
.ec-search-results {
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--ec-border);
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,.12);
	max-height: 360px;
	overflow-y: auto;
}
.ec-search-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	border-bottom: 1px solid var(--ec-border);
	border-radius: 10px;
	padding: 10px 14px;
	cursor: pointer;
	font-size: 13.5px;
	line-height: 1.5em;
	color: var(--ec-text);
}
.ec-search-row:last-child { border-bottom: none; }
.ec-search-row:hover { 
	background: #f2f4ff;
	border-radius: 10px;
	color: var(--ec-text);
}
.ec-search-row-icon { flex: none; margin-top: 2px; }
.ec-search-row-text strong { font-size: 14.5px; }
.ec-search-empty {
	padding: 14px;
	color: var(--ec-muted);
	font-size: 13.5px;
}

/* A-Z row */
.ec-letters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 22px;
}
.ec-letter-btn {
	background: var(--ec-blue);
	color: #fff;
	border: none;
	border-radius: 6px;
	min-width: 44px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .18s ease, transform .12s ease;
}
.ec-letter-btn:hover { background: var(--ec-blue-dark); transform: translateY(-1px); }
.ec-letter-btn.is-active { background: #fff; color: var(--ec-blue-dark); box-shadow: inset 0 0 0 2px var(--ec-blue); }

/* Category pills (multiple categories under one letter) */
.ec-category-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.ec-pill {
	background: #f3f4f6;
	border: 1px solid var(--ec-border);
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 14px;
	cursor: pointer;
	transition: all .15s ease;
}
.ec-pill:hover { background: #e9ecef; }
.ec-pill.is-active { background: var(--ec-blue); color: #fff; border-color: var(--ec-blue); }

/* Subcategory / post tabs (underline style) */
.ec-subcat-tabs, .ec-post-tabs {
	display: flex;
	flex-wrap: wrap;
	border-bottom: 2px solid var(--ec-border);
	margin-bottom: 20px;
}
.ec-tab {
	background: none;
	border: none;
	padding: 12px 18px;
	font-size: 14.5px;
	color: var(--ec-muted);
	cursor: pointer;
	position: relative;
	transition: color .15s ease;
	white-space: nowrap;
}
/* .ec-tab:hover { color: var(--ec-text); } */

.ec-tab:hover { 
	color: var(--ec-blue-dark);
	background:none;
}
.ec-tab.is-active { color: var(--ec-blue-dark); font-weight: 600; 	background:none;
}
.ec-tab.is-active:hover { 
	background:none;
}

.ec-tab.is-active::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -2px;
	height: 2px;
	background: var(--ec-blue);
}

/* All panels are pre-rendered in the page at once; only the active one shows.
   No fade/opacity transition here on purpose — switching is instant. */
.ec-letter-panel,
.ec-category-panel,
.ec-subcat-panel,
.ec-post-panel {
	display: none;
}
.ec-letter-panel.is-active,
.ec-category-panel.is-active,
.ec-subcat-panel.is-active,
.ec-post-panel.is-active {
	display: block;
}
.ec-body { min-height: 120px; }
.ec-empty { color: var(--ec-muted); padding: 24px 4px; }

/* Video grid */
.ec-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}
.ec-video-card { display: flex; flex-direction: column; }
.ec-video-heading {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 10px;
	color: var(--ec-text);
}
.ec-video-thumb {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background-size: cover;
	background-position: center;
	border-radius: 8px;
	overflow: hidden;
	text-decoration: none;
	box-shadow: 0 1px 4px rgba(0,0,0,.15);
	transition: transform .15s ease, box-shadow .15s ease;
}
.ec-video-thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.ec-video-thumb::before {
	content: "";
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 45%);
}
.ec-play {
	position: absolute; top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	width: 56px; height: 56px;
	background: rgba(255,0,0,.85);
	color: #fff;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 20px;
	z-index: 2;
}
.ec-video-title {
	position: absolute; left: 10px; bottom: 34px; right: 10px;
	color: #fff; font-size: 13px; font-weight: 600; z-index: 2;
	text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.ec-watch-btn {
	position: absolute; right: 8px; bottom: 8px;
	background: rgba(0,0,0,.6);
	color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 4px;
	z-index: 2;
}

/* Text article */
.ec-article {
	font-size: 15.5px;
	line-height: 1.75;
	max-width: auto;
}
.ec-article h2, .ec-article h3 { color: var(--ec-text); margin-top: 1.4em; }
.ec-article p { margin: 0 0 1em; }

@media (max-width: 600px) {
	.ec-letter-btn { min-width: 38px; padding: 8px; font-size: 13px; }
	.ec-video-grid { grid-template-columns: 1fr; }
}
