/* ===== Glass Blog Cards - Main Stylesheet ===== */

@keyframes gbcBgShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

.gbc-wrapper {
	direction: rtl;
	font-family: inherit;
	padding: 60px 20px;
	min-height: 60vh;
	position: relative;
}

.gbc-container {
	max-width: 1200px;
	margin: 0 auto;
}

/* ===== Toolbar: Filters + Search ===== */
.gbc-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 36px;
}

.gbc-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.gbc-filter-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #f1f5f9;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 14px;
	cursor: pointer;
	transition: all 0.25s ease;
}

.gbc-filter-btn:hover {
	background: rgba(255, 255, 255, 0.16);
}

.gbc-filter-btn.active {
	background: linear-gradient(90deg, var(--gbc-grad-1), var(--gbc-grad-2));
	border-color: transparent;
	font-weight: 600;
}

.gbc-search input {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #f1f5f9;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 14px;
	min-width: 220px;
	outline: none;
}

.gbc-search input::placeholder {
	color: rgba(241, 245, 249, 0.6);
}

/* ===== Grid ===== */
.gbc-grid {
	display: grid;
	grid-template-columns: repeat(var(--gbc-cols, 3), 1fr);
	gap: 26px;
}

@media (max-width: 900px) {
	.gbc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.gbc-grid { grid-template-columns: 1fr; }
}

/* ===== Glass Card ===== */
.gbc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: #f8fafc;
	border-radius: var(--gbc-radius, 20px);
	overflow: hidden;
	background: linear-gradient(145deg, color-mix(in srgb, var(--card-grad-1) 35%, transparent), color-mix(in srgb, var(--card-grad-2) 35%, transparent));
	border: 1px solid rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(var(--gbc-blur, 14px));
	-webkit-backdrop-filter: blur(var(--gbc-blur, 14px));
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
	transform-style: preserve-3d;
	will-change: transform;
}

.gbc-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 60%);
	opacity: 0.6;
	pointer-events: none;
}

.gbc-card:hover {
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.gbc-card-featured {
	grid-column: span 2;
}
@media (max-width: 900px) {
	.gbc-card-featured { grid-column: span 1; }
}

.gbc-card-media {
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.gbc-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.gbc-card:hover .gbc-card-media img {
	transform: scale(1.08);
}

.gbc-card-body {
	padding: 20px 22px 24px;
	position: relative;
	z-index: 1;
}

.gbc-card-cat {
	display: inline-block;
	font-size: 12px;
	background: rgba(255, 255, 255, 0.2);
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 12px;
}

.gbc-card-title {
	font-size: 20px;
	line-height: 1.5;
	margin: 0 0 10px;
	font-weight: 700;
}

.gbc-card-subtitle {
	font-size: 14px;
	line-height: 1.8;
	opacity: 0.88;
	margin: 0 0 16px;
}

.gbc-card-meta {
	font-size: 12px;
	opacity: 0.75;
	display: flex;
	gap: 8px;
	align-items: center;
}

.gbc-dot { opacity: 0.5; }

/* ===== Pagination ===== */
.gbc-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
	flex-wrap: wrap;
}

.gbc-page-btn {
	min-width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 14px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(8px);
	color: #f1f5f9;
	text-decoration: none;
	font-size: 14px;
	transition: all 0.2s ease;
}

.gbc-page-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.gbc-page-active {
	background: linear-gradient(90deg, var(--gbc-grad-1), var(--gbc-grad-2));
	border-color: transparent;
	font-weight: 700;
}

.gbc-no-posts {
	text-align: center;
	color: #cbd5e1;
	padding: 40px 0;
}

/* ===== Reading Progress Bar ===== */
#gbc-reading-progress {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	height: 4px;
	background: rgba(255, 255, 255, 0.1);
	z-index: 9999;
}

#gbc-reading-progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--gbc-grad-1, #6366f1), var(--gbc-grad-2, #ec4899));
	transition: width 0.1s ease;
}

/* ===== Single Article ===== */
.gbc-single-wrapper {
	padding-top: 40px;
}

.gbc-single-article {
	max-width: 1100px;
	margin: 0 auto;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gbc-single-header {
	padding: 50px 50px 0;
	color: #f8fafc;
	text-align: center;
	background: linear-gradient(160deg, color-mix(in srgb, var(--card-grad-1) 25%, transparent), transparent 60%);
}

.gbc-single-cats {
	margin-bottom: 16px;
}

.gbc-single-cat {
	display: inline-block;
	background: linear-gradient(90deg, var(--card-grad-1), var(--card-grad-2));
	padding: 6px 16px;
	border-radius: 999px;
	font-size: 13px;
	margin: 0 4px;
}

.gbc-single-title {
	font-size: 36px;
	line-height: 1.6;
	margin: 0 0 18px;
	font-weight: 800;
}

.gbc-single-meta {
	font-size: 14px;
	opacity: 0.8;
	margin-bottom: 30px;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.gbc-single-thumb {
	border-radius: 18px;
	overflow: hidden;
	margin-bottom: -1px;
}

.gbc-single-thumb img {
	width: 100%;
	max-height: 480px;
	object-fit: cover;
	display: block;
}

.gbc-single-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 40px;
	padding: 50px;
}

@media (max-width: 900px) {
	.gbc-single-layout { grid-template-columns: 1fr; padding: 30px 24px; }
	.gbc-single-header { padding: 36px 24px 0; }
	.gbc-single-title { font-size: 26px; }
}

.gbc-toc {
	position: relative;
}

.gbc-toc-inner {
	position: sticky;
	top: 30px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 16px;
	padding: 20px;
}

.gbc-toc-inner h4 {
	margin: 0 0 14px;
	font-size: 15px;
}

.gbc-toc-inner ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gbc-toc-inner li {
	margin-bottom: 10px;
}

.gbc-toc-level-3 {
	padding-right: 16px;
	font-size: 13px;
	opacity: 0.85;
}

.gbc-toc-inner a {
	color: #e2e8f0;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.6;
	transition: color 0.2s;
}

.gbc-toc-inner a:hover,
.gbc-toc-inner a.gbc-toc-active {
	color: var(--card-grad-2, #ec4899);
}

.gbc-single-content {
	color: #f1f5f9;
	font-size: 17px;
	line-height: 2.1;
}

.gbc-single-content h2,
.gbc-single-content h3 {
	color: #ffffff;
	margin-top: 40px;
	scroll-margin-top: 30px;
}

.gbc-single-content img {
	max-width: 100%;
	border-radius: 14px;
	margin: 20px 0;
}

.gbc-single-content a {
	color: var(--card-grad-2, #ec4899);
}

.gbc-share-buttons {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
	font-size: 14px;
}

.gbc-share-buttons a {
	background: rgba(255, 255, 255, 0.1);
	padding: 8px 18px;
	border-radius: 999px;
	color: #f1f5f9;
	text-decoration: none;
	transition: background 0.2s;
}

.gbc-share-buttons a:hover {
	background: rgba(255, 255, 255, 0.2);
}

.gbc-related {
	padding: 0 50px 50px;
}

@media (max-width: 900px) {
	.gbc-related { padding: 0 24px 30px; }
}

.gbc-related h3 {
	color: #fff;
	margin-bottom: 24px;
}

/* ===== Filter hidden state (JS controlled) ===== */
.gbc-card.gbc-hidden {
	display: none !important;
}
