.esd-wrap {
	--esd-primary: #006bc1;
	--esd-primary-dark: #004a87;
	--esd-primary-light: #e6f2fb;
	--esd-border: #d6e8f6;
	--esd-text: #0b2540;
	background: #f3f9fe;
	padding: 32px 24px;
	border-radius: 20px;
	box-sizing: border-box;
}
.esd-wrap *, .esd-wrap *::before, .esd-wrap *::after { box-sizing: border-box; }

/* ---------- Tabs ---------- */
.esd-wrap .esd-tabs {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0 0 28px;
}
.esd-wrap .esd-tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 34px;
	min-width: 170px;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--esd-primary-dark);
	background: #fff;
	border: 2px solid var(--esd-border);
	border-radius: 16px;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	box-shadow: 0 4px 14px rgba(0, 107, 193, .08);
	transition: all .25s ease;
}
.esd-wrap .esd-tab:hover,
.esd-wrap .esd-tab:focus-visible {
	color: #fff;
	background: linear-gradient(135deg, var(--esd-primary-dark), var(--esd-primary));
	border-color: var(--esd-primary);
	outline: none;
}
.esd-wrap .esd-tab.is-active {
	color: #fff;
	background: linear-gradient(135deg, var(--esd-primary-dark), var(--esd-primary));
	border-color: var(--esd-primary);
	box-shadow: 0 12px 28px rgba(0, 107, 193, .35);
}
.esd-tab-icon { display: inline-flex; align-items: center; font-size: 16px; line-height: 1; }
.esd-tab-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- Panels ---------- */
.esd-panel[hidden] { display: none !important; }
.esd-panel.is-active { animation: esdFade .35s ease; }
@keyframes esdFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Search ---------- */
.esd-search {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 520px;
	margin: 0 auto 30px;
	padding: 6px 6px 6px 16px;
	background: #fff;
	border: 2px solid var(--esd-border);
	border-radius: 16px;
	box-shadow: 0 6px 20px rgba(0, 107, 193, .08);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.esd-search:focus-within { border-color: var(--esd-primary); box-shadow: 0 8px 26px rgba(0, 107, 193, .18); }
.esd-search-icon { display: inline-flex; color: var(--esd-primary); flex: 0 0 auto; }
.esd-wrap .esd-input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 42px;
	padding: 0;
	margin: 0;
	font-size: 15px;
	color: var(--esd-text);
	background: transparent;
	border: 0 !important;
	box-shadow: none !important;
	outline: none;
}
.esd-wrap .esd-input::placeholder { color: #7b93a8; opacity: 1; }
.esd-wrap .esd-clear {
	flex: 0 0 auto;
	width: 28px; height: 28px;
	padding: 0;
	font-size: 20px; line-height: 1;
	color: #5b7a95;
	background: var(--esd-primary-light);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}
.esd-wrap .esd-clear[hidden] { display: none; }
.esd-wrap .esd-search-btn {
	flex: 0 0 auto;
	padding: 12px 26px;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: linear-gradient(135deg, var(--esd-primary-dark), var(--esd-primary));
	border: 0;
	border-radius: 12px;
	cursor: pointer;
	transition: filter .2s ease, transform .2s ease;
}
.esd-wrap .esd-search-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* ---------- Grid ---------- */
.esd-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 18px;
}
@media (max-width: 1024px) { .esd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
	.esd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.esd-wrap { padding: 22px 12px; }
	.esd-wrap .esd-tab { min-width: 0; padding: 12px 18px; font-size: 14px; }
}

/* ---------- Card ---------- */
.esd-wrap a.esd-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--esd-border);
	border-radius: 18px;
	text-decoration: none;
	color: inherit;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.esd-wrap a.esd-card:hover {
	transform: translateY(-5px);
	border-color: var(--esd-primary);
	box-shadow: 0 16px 34px rgba(0, 107, 193, .18);
}
.esd-wrap a.esd-card.is-hidden { display: none; }

.esd-card-media { position: relative; }
.esd-card-img-inner {
	position: relative;
	height: auto;
	overflow: hidden;
	border-radius: 18px 18px 0 0;
	background: var(--esd-primary-light);
}
.esd-card-img-inner { line-height: 0; margin: 0; padding: 0; }
.esd-card-img-inner::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.esd-wrap .esd-img { display: block; width: 100%; height: auto; max-width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: contain; transition: transform .5s ease; }
.esd-card:hover .esd-img { transform: scale(1.08); }

.esd-pin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px; height: 38px;
	color: #fff;
	background: linear-gradient(135deg, #0a8cf0, var(--esd-primary));
	border-radius: 11px;
	box-shadow: 0 6px 14px rgba(0, 107, 193, .35);
}
.esd-card-media .esd-pin { position: absolute; left: 16px; bottom: -19px; z-index: 2; }
.esd-pin-static { margin: 16px 0 0 16px; }

.esd-card-body { display: flex; flex-direction: column; padding: 14px; flex: 1 1 auto; }
.esd-card-row { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
.esd-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.esd-card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--esd-text); overflow-wrap: anywhere; }
.esd-card-sub { font-size: 12px; color: #5b7a95; }
.esd-card-foot { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.esd-pill {
	padding: 7px 14px;
	white-space: nowrap;
	font-size: 12px;
	font-weight: 700;
	color: var(--esd-primary);
	background: var(--esd-primary-light);
	border-radius: 999px;
	transition: all .25s ease;
}
.esd-arrow {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px;
	color: var(--esd-primary-dark);
	background: #eaf3fb;
	border-radius: 50%;
	transition: all .25s ease;
}
.esd-card:hover .esd-pill { background: var(--esd-primary); color: #fff; }
.esd-card:hover .esd-arrow { background: var(--esd-primary); color: #fff; transform: translateX(3px); }

/* ---------- No result ---------- */
.esd-noresult { margin: 24px 0 0; text-align: center; font-size: 15px; color: #5b7a95; }
.esd-noresult[hidden] { display: none; }

/* ================= v1.1 fixes (theme styles se bachne ke liye) ================= */

/* Card: image corners se flush, card ke radius me clip */
.esd-wrap a.esd-card { display: flex !important; flex-direction: column; padding: 0 !important; overflow: hidden !important; }
.esd-wrap .esd-card-media { position: relative; width: 100%; margin: 0; padding: 0; line-height: 0; }
.esd-wrap .esd-card-img-inner { margin: 0 !important; padding: 0 !important; border-radius: 0 !important; background: transparent; }
.esd-wrap .esd-img {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
}
/* Pin ab image ke andar (bottom-left) rehta hai taaki card clip na kare */
.esd-wrap .esd-card-media .esd-pin { left: 12px; bottom: 12px; }

/* Naam + View Stays hamesha ek line me */
.esd-wrap .esd-card-row {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: center !important;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
}
.esd-wrap .esd-card-text { flex: 1 1 0; min-width: 0; }
.esd-wrap .esd-card-title { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esd-wrap .esd-card-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.esd-wrap .esd-card-foot { flex: 0 0 auto !important; display: flex; align-items: center; }
.esd-wrap .esd-pill { white-space: nowrap; padding: 7px 12px; font-size: 11.5px; }

@media (max-width: 767px) {
	.esd-wrap .esd-card-title { white-space: normal; overflow: visible; text-overflow: clip; font-size: 14px; }
	.esd-wrap .esd-pill { padding: 6px 10px; font-size: 11px; }
}

/* Search filter: hidden card hamesha chhupa rahe */
.esd-wrap a.esd-card.is-hidden { display: none !important; }
.esd-wrap .esd-noresult[hidden], .esd-wrap .esd-clear[hidden] { display: none !important; }
