/*
Theme Name: الفكر
Description: قالب مكتبة الفكر الإلكترونية — قالب فرعي من Twenty Twenty-Five بنفس توزيع وألوان قالب الحكمة.
Template: twentytwentyfive
Version: 4.5
Text Domain: alfeker
*/
/* ---------- Fixed right sidebar ---------- */
:root { --hk-sidebar-w: 264px; --hk-top: 0px; }
.admin-bar { --hk-top: 32px; }

.hk-sidebar {
	position: fixed;
	top: var(--hk-top);
	right: 0;
	bottom: 0;
	width: var(--hk-sidebar-w);
	z-index: 50;
	overflow-y: auto;
	border-left: 0.8px solid var(--wp--preset--color--line);
	box-sizing: border-box;
}
.hk-sidebar > * { width: 100%; }
.hk-sidebar__foot { margin-top: auto !important; padding-top: 14px; border-top: 0.8px solid var(--wp--preset--color--line); }

/* Push all page content away from the sidebar */
.wp-site-blocks { padding-right: var(--hk-sidebar-w); }

.hk-sidebar .wp-block-site-logo img { width: 60px; height: auto; }
.hk-sidebar .wp-block-site-title { font-weight: 200; line-height: 1.1; }
.hk-sidebar .wp-block-site-title a { text-decoration: none; color: inherit; }

.hk-sidebar__search .wp-block-search__inside-wrapper {
	background: var(--wp--preset--color--base);
	border: 0.8px solid var(--wp--preset--color--line);
	border-radius: 10px;
	padding: 2px;
}
.hk-sidebar__search input { border: 0; background: transparent; font: inherit; font-size: 15px; }
.hk-sidebar__search button { background: transparent; color: var(--wp--preset--color--contrast); padding: 4px 8px; }

.hk-sidebar__nav .wp-block-navigation__container { gap: 2px; width: 100%; }
.hk-sidebar__nav .wp-block-navigation-item { width: 100%; }
.hk-sidebar__nav .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 8px 14px;
	border-radius: 10px;
	box-sizing: border-box;
	transition: background .15s;
}
.hk-sidebar__nav .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--beige); }
.hk-sidebar__nav .is-active > .wp-block-navigation-item__content,
.hk-sidebar__nav .current-menu-item > .wp-block-navigation-item__content {
	background: var(--wp--preset--color--base);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	color: var(--wp--preset--color--ink);
}

/* Thin loading bar while a page is fetched */
.hk-progress {
	position: fixed; top: var(--hk-top); left: 0; height: 2px; width: 0;
	background: var(--wp--preset--color--ink); z-index: 100; opacity: 0;
	transition: width .4s ease, opacity .2s;
}
.hk-loading .hk-progress { width: 70%; opacity: 1; }
.hk-loading main { opacity: .5; transition: opacity .15s; }

@media (max-width: 781px) {
	:root { --hk-sidebar-w: 0px; }
	.admin-bar { --hk-top: 46px; }
	.hk-sidebar {
		position: sticky; width: auto; bottom: auto;
		flex-direction: row !important; flex-wrap: wrap; align-items: center !important;
		padding: 10px 16px !important; gap: 10px !important;
		border-left: 0; border-bottom: 0.8px solid var(--wp--preset--color--line);
		overflow: visible;
	}
	.hk-sidebar > * { width: auto; }
	.hk-sidebar__brand { flex-direction: row !important; order: 1; }
	.hk-sidebar__brand .wp-block-site-logo img { width: 38px; }
	.hk-sidebar__brand .wp-block-site-title { font-size: 22px !important; }
	.hk-sidebar__nav { order: 2; margin-inline-start: auto !important; }
	.hk-sidebar__search { order: 3; width: 100% !important; }
	.hk-sidebar__foot { display: none !important; }
}

.hk-icons a { color: var(--wp--preset--color--ink); display: inline-flex; }
.hk-icons svg { width: 18px; height: 18px; }

/* ---------- Tabs above the card ---------- */
.hk-tabs { gap: 2px !important; margin-bottom: 0 !important; }
.hk-tabs .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border-radius: 12px 12px 0 0;
	padding: 6px 16px;
	font-size: 16px;
	font-weight: 700;
}
.hk-tabs .wp-block-button:first-child .wp-block-button__link,
.hk-tabs .wp-block-button__link:hover {
	background: var(--wp--preset--color--card-head);
}

/* ---------- White card (table-like list) ---------- */
.hk-card {
	background: var(--wp--preset--color--base);
	border-radius: 0 0 14px 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	overflow: hidden;
}
.hk-card--round { border-radius: 14px; }

.hk-card__head {
	background: var(--wp--preset--color--card-head);
	color: var(--wp--preset--color--text-dark);
	font-size: 14px;
	font-weight: 600;
	padding: 6px 16px !important;
}

.hk-list .wp-block-post-template > li {
	display: grid;
	grid-template-columns: 1fr 180px 140px 110px;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	margin: 0;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--sage) 45%, transparent);
	color: var(--wp--preset--color--text-dark);
	font-size: 15px;
}
.hk-list .wp-block-post-template > li:nth-child(even) { background: var(--wp--preset--color--card-head); }
.hk-list .wp-block-post-template > li:last-child { border-bottom: 0; }
.hk-list .wp-block-post-title { font-size: 15px; font-weight: 700; margin: 0; }
.hk-list .wp-block-post-title a { text-decoration: none; color: inherit; }
.hk-list .wp-block-post-title a:hover { color: var(--wp--preset--color--ink); }
.hk-list .wp-block-post-date,
.hk-list .wp-block-post-terms,
.hk-list .wp-block-post-author-name { font-size: 14px; color: var(--wp--preset--color--muted); margin: 0; }
.hk-list .wp-block-post-terms a,
.hk-list .wp-block-post-author-name a { color: inherit; text-decoration: none; }
.hk-list .wp-block-query-no-results { padding: 24px; text-align: center; }

.hk-section-title {
	color: var(--wp--preset--color--muted);
	font-size: 17px !important;
	font-weight: 600 !important;
}

/* Single posts / pages sit on a white card too */
.hk-article {
	background: var(--wp--preset--color--base);
	border-radius: 14px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ---------- Tables (same look as hwza-table) ---------- */
.wp-block-table table,
.entry-content table { background: var(--wp--preset--color--base); color: var(--wp--preset--color--text-dark); font-size: 15px; }
.wp-block-table th { font-size: 14px; font-weight: 600; padding: 6px 12px; }
.wp-block-table td { padding: 7px 10px; }

/* ---------- Mobile: list becomes stacked cards like the reference ---------- */
@media (max-width: 781px) {
	.hk-header__top { padding-top: 6px !important; padding-bottom: 6px !important; }
	.hk-card__head { display: none !important; }
	.hk-list .wp-block-post-template > li {
		grid-template-columns: 1fr;
		gap: 4px;
		background: var(--wp--preset--color--base) !important;
		border-radius: 14px;
		margin-bottom: 14px;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	}
	.hk-card { background: transparent; box-shadow: none; }
}

.hk-card__head.is-layout-grid { grid-template-columns: 1fr 180px 140px 110px !important; }
.hk-card__head p { margin: 0; }
.hk-icons .wp-block-loginout { white-space: nowrap; }
.hk-icons .wp-block-loginout a { text-decoration: none; }
