/**
 * Giturn Tech Magazine — luxury light UI, layered 3D depth, white-first palette.
 * Loaded after Extendable base styles.
 */

/* --- Luxury tokens (light-first; dark remains optional if toggle returns) --- */
:root {
	--giturn-bg: #ffffff;
	--giturn-bg-soft: #fafbfd;
	--giturn-bg-warm: #fdfcfa;
	--giturn-fg: #0f1020;
	--giturn-fg-soft: #3d3f5c;
	--giturn-accent: var(--wp--preset--color--accent, #b8860b);
	--giturn-accent-soft: #d4af37;
	--giturn-border: rgba(15, 16, 32, 0.08);
	--giturn-border-glow: rgba(212, 175, 55, 0.22);
	--giturn-code-bg: #f4f5fb;
	--giturn-header-h: 0px;
	--giturn-elev-1: 0 1px 2px rgba(15, 23, 42, 0.04),
		0 4px 16px rgba(15, 23, 42, 0.06);
	--giturn-elev-2: 0 2px 4px rgba(15, 23, 42, 0.05),
		0 12px 36px rgba(15, 23, 42, 0.09),
		0 0 0 1px rgba(15, 23, 42, 0.04);
	--giturn-elev-hover: 0 8px 24px rgba(15, 23, 42, 0.12),
		0 20px 48px rgba(15, 23, 42, 0.1),
		0 0 0 1px rgba(212, 175, 55, 0.28);
	--giturn-inset: inset 0 2px 6px rgba(15, 23, 42, 0.06),
		inset 0 -1px 0 rgba(255, 255, 255, 0.85);
}

html {
	color-scheme: light;
}

html[data-theme='light'],
html.giturn-light-ui {
	color-scheme: light;
}

html[data-theme='dark'] {
	color-scheme: dark;
	--giturn-bg: #12131c;
	--giturn-bg-soft: #181926;
	--giturn-fg: #f4f5fb;
	--giturn-border: rgba(244, 245, 251, 0.12);
	--giturn-code-bg: #1e2030;
}

html[data-theme='dark'] body {
	background-color: var(--giturn-bg);
	color: var(--giturn-fg);
}

/* --- Page: bright white luxury canvas --- */
body.giturn-luxury {
	background-color: #ffffff;
	background-image: linear-gradient(
		165deg,
		#ffffff 0%,
		#fafbfd 38%,
		#f5f7fc 72%,
		#ffffff 100%
	);
	background-attachment: fixed;
	color: var(--giturn-fg);
}

body.giturn-luxury .wp-site-blocks {
	position: relative;
	z-index: 0;
}

/* Skip link */
.skip-link.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	inset-inline-start: 1rem;
	top: 1rem;
	z-index: 100000;
	padding: 0.75rem 1rem;
	background: linear-gradient(135deg, #2a1859 0%, #381d92 50%, #4a3fb8 100%);
	color: #fff;
	text-decoration: none;
	border-radius: 10px;
	box-shadow: var(--giturn-elev-2);
}

/* Theme toggle hidden — UI locked to bright white (remove rule to restore toggle) */
.giturn-theme-toggle {
	display: none !important;
}

/* --- Sticky header: glass + floating 3D lip --- */
.giturn-header-sticky {
	position: sticky;
	top: 0;
	z-index: 100;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.97) 0%,
		rgba(252, 253, 255, 0.94) 100%
	) !important;
	backdrop-filter: blur(14px) saturate(1.15);
	-webkit-backdrop-filter: blur(14px) saturate(1.15);
	border-bottom: 1px solid rgba(255, 255, 255, 0.65);
	box-shadow: 0 4px 6px rgba(15, 23, 42, 0.04),
		0 18px 44px rgba(15, 23, 42, 0.07),
		inset 0 -1px 0 rgba(255, 255, 255, 0.9);
	transition: box-shadow 0.35s ease, background 0.35s ease;
}

.giturn-header-inner {
	border-bottom: 1px solid var(--giturn-border);
}

.giturn-header-cats {
	padding-top: 0.65rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid var(--giturn-border);
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.5) 0%,
		rgba(248, 250, 255, 0.85) 100%
	);
}

.giturn-header-cats .wp-block-categories-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 1.15rem;
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 500;
	letter-spacing: 0.02em;
}

.giturn-header-cats a {
	text-decoration: none;
	white-space: nowrap;
	color: var(--giturn-fg-soft);
	transition: color 0.2s ease, text-shadow 0.2s ease;
}

.giturn-header-cats a:hover {
	color: var(--giturn-fg);
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Mega-style submenus */
@media (min-width: 782px) {
	.giturn-primary-nav .wp-block-navigation__submenu-container {
		min-width: 15rem;
		padding: 0.85rem;
		border-radius: 14px;
		background: #ffffff !important;
		box-shadow: var(--giturn-elev-hover);
		border: 1px solid var(--giturn-border);
	}

	.giturn-nav-row .wp-block-navigation.items-justified-right {
		justify-content: flex-end;
	}
}

/* --- Ajax search: inset well + floating results --- */
.giturn-header-tools {
	gap: 0.85rem;
	align-items: center;
}

.giturn-search-wrap {
	position: relative;
	min-width: 10rem;
	max-width: 17rem;
	flex: 1;
}

.giturn-search-input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.55rem 0.85rem;
	border: none;
	border-radius: 12px;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	background: linear-gradient(180deg, #f3f5fb 0%, #ffffff 55%);
	color: var(--giturn-fg);
	box-shadow: var(--giturn-inset),
		0 1px 0 rgba(255, 255, 255, 0.95);
	transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.giturn-search-input:focus {
	outline: none;
	box-shadow: var(--giturn-inset), 0 0 0 2px rgba(212, 175, 55, 0.35),
		0 10px 28px rgba(56, 29, 146, 0.12);
	transform: translateY(-1px);
}

.giturn-search-results {
	position: absolute;
	top: calc(100% + 8px);
	inset-inline: 0;
	max-height: 18rem;
	overflow: auto;
	background: #ffffff;
	border-radius: 14px;
	border: 1px solid var(--giturn-border);
	box-shadow: var(--giturn-elev-hover);
	z-index: 200;
}

html[data-theme='dark'] .giturn-search-results {
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.giturn-search-results-list {
	list-style: none;
	margin: 0;
	padding: 0.4rem 0;
}

.giturn-search-results-list li {
	margin: 0;
	border-bottom: 1px solid var(--giturn-border);
}

.giturn-search-results-list li:last-child {
	border-bottom: 0;
}

.giturn-search-results-list a {
	display: block;
	padding: 0.6rem 0.95rem;
	text-decoration: none;
	font-size: 0.9rem;
	color: inherit;
	transition: background 0.15s ease;
}

.giturn-search-results-list a:hover,
.giturn-search-results-list a:focus {
	background: linear-gradient(
		90deg,
		rgba(212, 175, 55, 0.08) 0%,
		rgba(56, 29, 146, 0.06) 100%
	);
	outline: none;
}

[dir='rtl'] .giturn-search-results-list a:hover,
[dir='rtl'] .giturn-search-results-list a:focus {
	background: linear-gradient(
		270deg,
		rgba(212, 175, 55, 0.08) 0%,
		rgba(56, 29, 146, 0.06) 100%
	);
}

/* --- Magazine shell --- */
.giturn-shell {
	width: 100%;
}

/* --- Front / blog home: masthead ribbon --- */
.giturn-front-ribbon {
	position: relative;
	overflow: hidden;
	background: linear-gradient(
		108deg,
		#0a0618 0%,
		#150d2e 22%,
		#241456 48%,
		#381d92 78%,
		#4b32a8 100%
	);
	color: rgba(255, 255, 255, 0.94);
	box-shadow: 0 12px 40px rgba(56, 29, 146, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.giturn-front-ribbon::before {
	content: '';
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(
			ellipse 90% 100% at 100% -20%,
			rgba(212, 175, 55, 0.14) 0%,
			transparent 55%
		),
		radial-gradient(
			ellipse 70% 80% at 0% 100%,
			rgba(255, 255, 255, 0.06) 0%,
			transparent 48%
		);
}

.giturn-front-ribbon::after {
	content: '';
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		var(--giturn-accent-soft) 35%,
		var(--giturn-accent) 50%,
		var(--giturn-accent-soft) 65%,
		transparent 100%
	);
	pointer-events: none;
}

.giturn-front-ribbon .alignwide {
	position: relative;
	z-index: 1;
}

.giturn-ribbon-tagline {
	margin: 0 !important;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-size: 0.7rem !important;
	opacity: 0.94;
	line-height: 1.35;
	max-width: 28rem;
}

.giturn-front-ribbon .wp-block-shortcode {
	display: inline-flex;
	align-items: center;
	padding: 0.42rem 0.95rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.giturn-front-ribbon .wp-block-shortcode,
.giturn-ribbon-date-text {
	margin: 0;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 500;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.88);
}

.giturn-front-main {
	position: relative;
}

/* --- Hero: editorial mast + bento lead story --- */
.giturn-hero-head {
	max-width: 52rem;
}

.giturn-hero-kicker {
	margin: 0 !important;
	text-transform: uppercase;
	letter-spacing: 0.32em;
	font-size: 0.68rem !important;
	font-weight: 700;
	color: var(--giturn-accent);
}

.giturn-hero-head .has-foreground-alt-color,
.giturn-hero-head p.has-medium-font-size {
	color: var(--giturn-fg-soft) !important;
	line-height: 1.55;
}

.giturn-hero-card-meta {
	font-size: var(--wp--preset--font-size--small, 0.8125rem);
	opacity: 0.88;
}

.giturn-hero-card-meta time,
.giturn-hero-card-meta .wp-block-post-terms {
	font-weight: 500;
}

.giturn-hero-card-inner,
.giturn-category-card-inner {
	padding: 1rem 1.15rem 1.4rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30, 0.75rem);
	box-sizing: border-box;
}

.giturn-hero-card-inner .wp-block-post-excerpt,
.giturn-category-card-inner .wp-block-post-excerpt {
	flex-grow: 1;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--giturn-fg-soft);
}

.giturn-hero-card-inner .wp-block-post-excerpt__excerpt,
.giturn-category-card-inner .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

@media (min-width: 1100px) {
	.giturn-hero .wp-block-post-template.is-layout-grid {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		grid-auto-rows: minmax(0, auto);
		gap: 1.35rem !important;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child,
	.giturn-hero .wp-block-post-template.is-layout-grid > .wp-block-post:first-child {
		grid-column: 1 / span 2;
		grid-row: 1 / span 2;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child .giturn-hero-card-inner,
	.giturn-hero
		.wp-block-post-template.is-layout-grid
		> .wp-block-post:first-child
		.giturn-hero-card-inner {
		padding: 1.35rem 1.5rem 1.65rem;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child .wp-block-post-featured-image,
	.giturn-hero
		.wp-block-post-template.is-layout-grid
		> .wp-block-post:first-child
		.wp-block-post-featured-image {
		border-radius: 14px;
		overflow: hidden;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child .wp-block-post-featured-image img,
	.giturn-hero
		.wp-block-post-template.is-layout-grid
		> .wp-block-post:first-child
		.wp-block-post-featured-image
		img {
		min-height: clamp(220px, 32vh, 340px);
		object-fit: cover;
		aspect-ratio: 16 / 10;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child .wp-block-post-title,
	.giturn-hero
		.wp-block-post-template.is-layout-grid
		> .wp-block-post:first-child
		.wp-block-post-title {
		font-size: clamp(1.35rem, 1rem + 1.4vw, 2.05rem) !important;
		line-height: 1.12;
		font-weight: 700;
		letter-spacing: -0.03em;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child .wp-block-post-excerpt__excerpt,
	.giturn-hero
		.wp-block-post-template.is-layout-grid
		> .wp-block-post:first-child
		.wp-block-post-excerpt__excerpt {
		-webkit-line-clamp: 5;
	}
}

@media (max-width: 1099px) {
	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child,
	.giturn-hero .wp-block-post-template.is-layout-grid > .wp-block-post:first-child {
		grid-column: auto;
		grid-row: auto;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child .wp-block-post-featured-image img,
	.giturn-hero
		.wp-block-post-template.is-layout-grid
		> .wp-block-post:first-child
		.wp-block-post-featured-image
		img {
		min-height: 0;
		aspect-ratio: 16 / 9;
	}

	.giturn-hero .wp-block-post-template.is-layout-grid > li:first-child .wp-block-post-title,
	.giturn-hero
		.wp-block-post-template.is-layout-grid
		> .wp-block-post:first-child
		.wp-block-post-title {
		font-size: inherit !important;
		line-height: inherit;
	}
}

/* --- Category rows: section chrome --- */
.giturn-section-kicker {
	margin: 0 !important;
	text-transform: uppercase;
	letter-spacing: 0.24em;
	font-size: 0.65rem !important;
	font-weight: 700;
	color: var(--giturn-accent);
}

.giturn-section-head {
	padding-bottom: 1rem;
	margin-bottom: 0.35rem;
	border-bottom: 1px solid var(--giturn-border);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

.giturn-section-cta a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1.1rem;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	color: var(--wp--preset--color--primary, #381d92) !important;
	background: linear-gradient(180deg, #ffffff 0%, #f0f2fa 100%);
	border: 1px solid rgba(56, 29, 146, 0.18);
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.9) inset,
		0 6px 16px rgba(56, 29, 146, 0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.giturn-section-cta a:hover {
	transform: translateY(-2px);
	border-color: rgba(212, 175, 55, 0.55);
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.95) inset,
		0 12px 28px rgba(56, 29, 146, 0.14);
}

/* --- Sidebar: trending list polish --- */
.giturn-sidebar .wp-block-latest-posts__list > li {
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--giturn-border);
	transition: background 0.2s ease;
	border-radius: 8px;
	margin-inline: -0.35rem;
	padding-inline: 0.35rem;
}

.giturn-sidebar .wp-block-latest-posts__list > li:last-child {
	border-bottom: 0;
}

.giturn-sidebar .wp-block-latest-posts__list > li:hover {
	background: rgba(56, 29, 146, 0.04);
}

.giturn-sidebar .wp-block-latest-posts__featured-image {
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.giturn-sidebar {
	position: sticky;
	top: calc(var(--giturn-header-h, 72px) + 1rem);
	align-self: flex-start;
	padding: 1.35rem 1.35rem 1.5rem;
	border-radius: 20px;
	background: linear-gradient(
		145deg,
		#ffffff 0%,
		#f8faff 45%,
		#f2f5fc 100%
	);
	box-shadow: var(--giturn-elev-2),
		inset 0 1px 0 rgba(255, 255, 255, 0.95),
		inset 0 -2px 8px rgba(15, 23, 42, 0.03);
	border: 1px solid rgba(255, 255, 255, 0.85);
	transform: translateZ(0);
}

.giturn-sidebar .wp-block-heading {
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: 0.72rem !important;
	opacity: 0.72;
	font-weight: 700;
}

.giturn-sidebar .wp-block-latest-posts {
	padding-inline-start: 0;
}

.giturn-sidebar .wp-block-latest-posts__post-title {
	font-weight: 600;
}

/* Hero & category grids — 3D cards */
.giturn-hero .wp-block-post-template.is-layout-grid,
.giturn-category-row .wp-block-post-template.is-layout-grid {
	gap: var(--wp--preset--spacing--50, 1.5rem);
}

.giturn-hero .wp-block-post-template > li,
.giturn-category-row .wp-block-post-template > li,
.giturn-hero .wp-block-post-template > .wp-block-post,
.giturn-category-row .wp-block-post-template > .wp-block-post {
	border-radius: 18px;
	overflow: hidden;
	background: linear-gradient(
		180deg,
		#ffffff 0%,
		#fafcfe 100%
	) !important;
	box-shadow: var(--giturn-elev-1), 0 0 0 1px rgba(15, 23, 42, 0.05);
	transition: transform 0.4s cubic-bezier(0.34, 1.35, 0.64, 1),
		box-shadow 0.4s ease;
	transform: perspective(900px) translateZ(0);
	will-change: transform;
}

.giturn-hero .wp-block-post-template > li:hover,
.giturn-category-row .wp-block-post-template > li:hover,
.giturn-hero .wp-block-post-template > .wp-block-post:hover,
.giturn-category-row .wp-block-post-template > .wp-block-post:hover {
	transform: perspective(900px) translateY(-10px) rotateX(2deg)
		scale(1.015);
	box-shadow: var(--giturn-elev-hover);
}

.giturn-hero .wp-block-post-featured-image img,
.giturn-category-row .wp-block-post-featured-image img {
	transition: transform 0.5s ease;
}

.giturn-hero .wp-block-post-template li:hover .wp-block-post-featured-image img,
.giturn-category-row .wp-block-post-template li:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

@media (max-width: 781px) {
	.giturn-hero .wp-block-post-template.is-layout-grid,
	.giturn-category-row .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr !important;
	}

	.giturn-hero .wp-block-post-template > li:hover,
	.giturn-category-row .wp-block-post-template > li:hover {
		transform: translateY(-4px) scale(1.01);
	}
}

@media (min-width: 782px) and (max-width: 1023px) {
	.giturn-hero .wp-block-post-template.is-layout-grid,
	.giturn-category-row .wp-block-post-template.is-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 781px) {
	.giturn-sidebar {
		position: static;
		margin-top: var(--wp--preset--spacing--60, 3rem);
	}
}

/* Section headings — editorial shine */
.giturn-hero-head h2.wp-block-heading,
.giturn-category-row .giturn-section-head h2.wp-block-heading {
	font-weight: 700;
	letter-spacing: -0.03em;
	background: linear-gradient(
		120deg,
		#141428 0%,
		#2a2d48 40%,
		#4a3fb8 120%
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	text-shadow: 0 12px 36px rgba(74, 63, 184, 0.15);
}

/* Single article */
.giturn-entry-header .wp-block-post-title {
	line-height: 1.12;
	letter-spacing: -0.035em;
	font-weight: 800;
	background: linear-gradient(
		118deg,
		#0f1020 0%,
		#252842 55%,
		#381d92 130%
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
}

.giturn-prose {
	font-size: clamp(1rem, 0.35vw + 0.95rem, 1.125rem);
	line-height: 1.78;
	color: var(--giturn-fg-soft);
}

.giturn-prose .wp-block-post-content {
	max-width: 68ch;
	margin-inline: auto;
}

.giturn-prose .wp-block-post-content .wp-block-heading {
	margin-top: 1.75em;
	color: var(--giturn-fg);
}

/* Code blocks */
.giturn-prose pre,
.wp-block-preformatted,
.wp-block-code {
	border-radius: 14px;
	border: 1px solid var(--giturn-border);
	background: var(--giturn-code-bg);
	overflow-x: auto;
	box-shadow: inset 0 2px 10px rgba(15, 23, 42, 0.06),
		0 4px 16px rgba(15, 23, 42, 0.05);
}

.giturn-prose pre code,
.wp-block-code code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
		'Liberation Mono', monospace;
	font-size: 0.9em;
	tab-size: 4;
}

/* Share buttons — raised 3D chips */
.giturn-share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.giturn-share li {
	margin: 0;
}

.giturn-share a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.45rem;
	padding: 0 1rem;
	border-radius: 12px;
	border: none;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	font-weight: 600;
	text-decoration: none;
	color: var(--giturn-fg) !important;
	background: linear-gradient(180deg, #ffffff 0%, #eef1f8 100%);
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.95) inset,
		0 6px 14px rgba(15, 23, 42, 0.08),
		0 1px 3px rgba(15, 23, 42, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.giturn-share a:hover {
	transform: translateY(-3px);
	box-shadow: 0 3px 0 rgba(255, 255, 255, 0.95) inset,
		0 14px 28px rgba(56, 29, 146, 0.15),
		0 0 0 1px rgba(212, 175, 55, 0.35);
}

/* --- Global: buttons, read more, pagination, forms --- */
body.giturn-luxury .wp-block-button__link,
body.giturn-luxury .wp-element-button,
body.giturn-luxury .comment-form input[type='submit'],
body.giturn-luxury .form-submit input[type='submit'] {
	font-weight: 600;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
		transform 0.2s ease, border-color 0.2s ease;
}

body.giturn-luxury .wp-block-button__link:focus-visible,
body.giturn-luxury .wp-element-button:focus-visible,
body.giturn-luxury .wp-block-read-more__link:focus-visible,
body.giturn-luxury .wp-block-post-excerpt__more-link:focus-visible,
body.giturn-luxury .wp-block-query-pagination a:focus-visible,
body.giturn-luxury .wp-block-query-pagination-numbers a:focus-visible,
body.giturn-luxury .comment-form input[type='submit']:focus-visible,
body.giturn-luxury .form-submit input[type='submit']:focus-visible {
	outline: 2px solid var(--giturn-accent-soft);
	outline-offset: 3px;
}

body.giturn-luxury .wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary, #381d92);
	border: 2px solid var(--wp--preset--color--primary, #381d92);
	box-shadow: none;
}

body.giturn-luxury .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--tertiary, #f2f2fa);
	color: var(--wp--preset--color--primary, #381d92);
}

body.giturn-luxury .wp-block-read-more .wp-block-read-more__link,
body.giturn-luxury .wp-block-post-excerpt__more-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.45rem;
	padding: 0 1rem;
	border-radius: 12px;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	text-decoration: none;
	color: var(--giturn-fg) !important;
	background: linear-gradient(180deg, #ffffff 0%, #eef1f8 100%);
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.95) inset,
		0 6px 14px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.giturn-luxury .wp-block-read-more .wp-block-read-more__link:hover,
body.giturn-luxury .wp-block-post-excerpt__more-link:hover {
	transform: translateY(-2px);
	box-shadow: 0 3px 0 rgba(255, 255, 255, 0.95) inset,
		0 10px 22px rgba(56, 29, 146, 0.12),
		0 0 0 1px rgba(212, 175, 55, 0.28);
}

body.giturn-luxury .wp-block-query-pagination,
body.giturn-luxury .wp-block-query-pagination-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	justify-content: center;
}

body.giturn-luxury a.wp-block-query-pagination-previous,
body.giturn-luxury a.wp-block-query-pagination-next,
body.giturn-luxury .wp-block-query-pagination-previous a,
body.giturn-luxury .wp-block-query-pagination-next a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.45rem;
	min-width: 2.45rem;
	padding: 0 0.65rem;
	border-radius: 12px;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	text-decoration: none;
	border: 1px solid var(--giturn-border);
	background: linear-gradient(180deg, #ffffff 0%, #f0f3fb 100%);
	color: var(--giturn-fg) !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.giturn-luxury .wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.45rem;
	min-width: 2.45rem;
	padding: 0 0.65rem;
	border-radius: 12px;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	text-decoration: none;
	border: 1px solid var(--giturn-border);
	background: linear-gradient(180deg, #ffffff 0%, #f0f3fb 100%);
	color: var(--giturn-fg) !important;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.giturn-luxury a.wp-block-query-pagination-previous:hover,
body.giturn-luxury a.wp-block-query-pagination-next:hover,
body.giturn-luxury .wp-block-query-pagination-previous a:hover,
body.giturn-luxury .wp-block-query-pagination-next a:hover,
body.giturn-luxury .wp-block-query-pagination-numbers a.page-numbers:hover {
	transform: translateY(-2px);
	border-color: rgba(212, 175, 55, 0.45);
	box-shadow: 0 8px 18px rgba(56, 29, 146, 0.1);
}

body.giturn-luxury .wp-block-query-pagination-numbers .page-numbers.current {
	background: linear-gradient(135deg, #2a1859 0%, #381d92 100%);
	color: #fff !important;
	border-color: transparent;
}

body.giturn-luxury .comment-form input[type='submit'],
body.giturn-luxury .form-submit input[type='submit'] {
	min-height: 2.45rem;
	padding: 0.55em 1.25em;
	border-radius: 12px;
	border: none;
	cursor: pointer;
	color: var(--wp--preset--color--background, #fff) !important;
	background: linear-gradient(135deg, #2a1859 0%, #381d92 50%, #4a3fb8 100%);
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.2) inset,
		0 8px 20px rgba(56, 29, 146, 0.25);
}

body.giturn-luxury .comment-form input[type='submit']:hover,
body.giturn-luxury .form-submit input[type='submit']:hover {
	background: var(--wp--preset--color--secondary, #1c0a63);
}

/* Related posts grid */
.giturn-related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.35rem;
	margin-top: 1.15rem;
}

.giturn-related-card {
	border-radius: 16px;
	overflow: hidden;
	background: linear-gradient(180deg, #ffffff 0%, #f6f8fd 100%);
	box-shadow: var(--giturn-elev-1);
	border: 1px solid rgba(15, 23, 42, 0.06);
	transition: transform 0.35s cubic-bezier(0.34, 1.35, 0.64, 1),
		box-shadow 0.35s ease;
}

.giturn-related-card:hover {
	transform: translateY(-8px) scale(1.02);
	box-shadow: var(--giturn-elev-hover);
}

.giturn-related-card a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.giturn-related-card img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.giturn-related-card h3 {
	font-size: 1rem;
	margin: 0;
	padding: 0.95rem 1rem;
	line-height: 1.4;
	font-weight: 650;
}

.giturn-reading-time {
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	opacity: 0.75;
	white-space: nowrap;
}

.giturn-meta-row {
	flex-wrap: wrap;
	gap: 0.85rem 1.35rem;
	align-items: center;
}

/* Newsletter */
.giturn-newsletter {
	padding: 1.15rem 1.2rem;
	border-radius: 16px;
	font-size: var(--wp--preset--font-size--small, 0.875rem);
	background: linear-gradient(160deg, #ffffff 0%, #f4f6fc 100%);
	box-shadow: var(--giturn-inset), 0 4px 20px rgba(15, 23, 42, 0.05);
	border: 1px solid var(--giturn-border);
}

.giturn-newsletter input[type='email'] {
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.55rem;
	padding: 0.6rem 0.85rem;
	border-radius: 10px;
	border: 1px solid var(--giturn-border);
	background: #ffffff;
	color: inherit;
	box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.05);
}

.giturn-newsletter .wp-block-button__link {
	border-radius: 12px !important;
	font-weight: 600 !important;
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.85) inset,
		0 8px 20px rgba(56, 29, 146, 0.2) !important;
}

/* Footer — light luxe slab with depth (overrides dark preset) */
footer.giturn-footer-mega.wp-block-group,
.giturn-footer-mega.wp-block-group {
	background: linear-gradient(
		168deg,
		#fbfbfd 0%,
		#f0f3fb 38%,
		#e6eaf5 100%
	) !important;
	color: #12152a !important;
	border-top: 1px solid rgba(255, 255, 255, 0.9);
	box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.95),
		0 -24px 64px rgba(15, 23, 42, 0.08);
}

.giturn-footer-mega .has-text-color,
.giturn-footer-mega .has-background-color,
.giturn-footer-mega h3,
.giturn-footer-mega p,
.giturn-footer-mega li {
	color: #1a1d35 !important;
}

.giturn-footer-mega .wp-block-site-title a,
.giturn-footer-mega a {
	color: #252845 !important;
}

.giturn-footer-mega a:hover {
	color: #381d92 !important;
}

.giturn-footer-mega .wp-block-navigation-item__content {
	color: inherit !important;
}

.giturn-footer-mega .wp-block-social-links.is-style-logos-only .wp-block-social-link-anchor {
	color: #252845 !important;
}

.giturn-footer-mega hr {
	border-color: rgba(15, 23, 42, 0.1) !important;
	opacity: 1 !important;
}

.giturn-footer-mega .wp-block-navigation .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--small, 0.875rem);
}

/* Archive / search query cards — match magazine depth */
.giturn-shell .wp-block-query .wp-block-post-template > li {
	border-radius: 16px;
	padding-bottom: 0.25rem;
	margin-bottom: 0.5rem;
	background: linear-gradient(180deg, #ffffff 0%, #fafcfe 100%);
	box-shadow: var(--giturn-elev-1);
	border: 1px solid rgba(15, 23, 42, 0.05);
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.giturn-shell .wp-block-query .wp-block-post-template > li:hover {
	box-shadow: var(--giturn-elev-2);
	transform: translateY(-4px);
}

/* --- RTL: typography + quote border (theme.json uses physical left edge) --- */
html[dir='rtl'] body.giturn-luxury {
	font-family: 'Noto Sans Arabic', 'Noto Sans', 'Geeza Pro', 'Segoe UI', system-ui,
		sans-serif;
}

html[dir='rtl'] body.giturn-luxury .wp-block-quote {
	border-left-width: 0;
	border-left-style: none;
	border-right-width: 1px;
	border-right-style: solid;
	border-right-color: var(--wp--preset--color--primary, #381d92);
}

/* --- AJ-style editorial list (primary + content flow) — refined ---
   If you change perPage in the primary Query block, set offset in giturn/aj-content-flow to match.
*/
.giturn-aj-layout {
	max-width: 58rem;
	margin-inline: auto;
	padding-inline: clamp(0.85rem, 3.5vw, 1.5rem);
}

.giturn-aj-feed--primary {
	padding: clamp(1.35rem, 3.8vw, 2.35rem);
	border-radius: var(--giturn-pro-r-xl, 20px);
	background: linear-gradient(
		165deg,
		#ffffff 0%,
		#fcfcfd 44%,
		#f5f7fc 100%
	);
	border: 1px solid rgba(15, 23, 42, 0.065);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.98) inset,
		0 28px 56px -32px rgba(15, 23, 42, 0.14),
		0 0 0 1px rgba(255, 255, 255, 0.6);
}

.giturn-aj-feed--flow {
	padding: clamp(1.2rem, 3.2vw, 2rem);
	border-radius: var(--giturn-pro-r-xl, 20px);
	background: linear-gradient(
		180deg,
		#fdfdfe 0%,
		#f8fafc 100%
	);
	border: 1px solid rgba(15, 23, 42, 0.06);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset,
		0 20px 44px -28px rgba(15, 23, 42, 0.1);
}

.giturn-aj-page-title {
	margin: 0 0 clamp(1.35rem, 3vw, 1.85rem);
	padding: 0 0 1rem;
	line-height: 1.06;
	font-weight: 800;
	letter-spacing: -0.035em;
	font-size: clamp(1.95rem, 1.1rem + 2.4vw, 2.85rem);
	background: linear-gradient(102deg, #0c0d18 0%, #2a2660 38%, #4a38b0 72%, #381d92 105%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
	border-bottom: none;
	position: relative;
}

.giturn-aj-page-title::after {
	content: '';
	display: block;
	margin-top: 1rem;
	height: 4px;
	border-radius: 4px;
	background: linear-gradient(
		90deg,
		var(--giturn-accent-soft) 0%,
		var(--giturn-accent) 28%,
		var(--wp--preset--color--primary, #381d92) 100%
	);
	opacity: 0.95;
}

.giturn-aj-flow-title {
	margin: 0 0 0.4rem;
	padding-bottom: 0.85rem;
	font-weight: 700;
	letter-spacing: -0.028em;
	color: var(--giturn-fg);
	border-bottom: none;
	position: relative;
	font-size: clamp(1.45rem, 1rem + 1.25vw, 1.95rem);
}

.giturn-aj-flow-title::after {
	content: '';
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: linear-gradient(
		90deg,
		var(--wp--preset--color--primary, #381d92) 0%,
		var(--giturn-border) 72%,
		transparent 100%
	);
}

.giturn-aj-feed .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.giturn-aj-feed .wp-block-post-template > li,
.giturn-aj-feed .wp-block-post-template > .wp-block-post {
	margin: 0;
	padding: 0;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
	transform: none !important;
}

.giturn-aj-feed
	.wp-block-post-template
	> li:not(:last-child)
	.giturn-aj-card::after {
	content: '';
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(15, 23, 42, 0.08) 15%,
		rgba(15, 23, 42, 0.08) 85%,
		transparent 100%
	);
	pointer-events: none;
}

.giturn-aj-card {
	position: relative;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: clamp(1.05rem, 2.8vw, 1.85rem);
	padding: clamp(1.05rem, 2.4vw, 1.85rem)
		clamp(0.35rem, 1.5vw, 0.65rem);
	margin-inline: -0.15rem;
	border-radius: var(--giturn-pro-r-card, 14px);
	border-bottom: none;
	transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 0 0 0 transparent;
}

.giturn-aj-card:focus-within {
	outline: none;
	box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35),
		0 12px 32px rgba(56, 29, 146, 0.08);
}

.giturn-aj-card:hover {
	background: rgba(56, 29, 146, 0.035);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.giturn-aj-card:active {
	transform: translateY(0);
}

[dir='rtl'] .giturn-aj-card:hover {
	background: rgba(56, 29, 146, 0.035);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.giturn-aj-card__media {
	flex: 0 0 clamp(140px, 32%, 272px);
	max-width: 272px;
	min-width: 0;
	align-self: flex-start;
}

.giturn-aj-card--compact .giturn-aj-card__media {
	flex-basis: clamp(96px, 21%, 152px);
	max-width: 152px;
}

.giturn-aj-card__media .wp-block-post-featured-image {
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06),
		0 0 0 1px rgba(15, 23, 42, 0.05),
		inset 0 1px 0 rgba(255, 255, 255, 0.85);
	transition: transform 0.38s cubic-bezier(0.34, 1.2, 0.64, 1),
		box-shadow 0.28s ease;
	will-change: transform;
}

.giturn-aj-card:hover .giturn-aj-card__media .wp-block-post-featured-image,
.giturn-aj-card:focus-within .giturn-aj-card__media .wp-block-post-featured-image {
	box-shadow: 0 12px 28px rgba(56, 29, 146, 0.15),
		0 0 0 1px rgba(212, 175, 55, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	transform: translateY(-2px);
}

.giturn-aj-card__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	object-fit: cover;
	aspect-ratio: 4 / 3;
	transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
	box-shadow: none;
}

.giturn-aj-card--compact .giturn-aj-card__media img {
	aspect-ratio: 1 / 1;
}

.giturn-aj-card:hover .giturn-aj-card__media img,
.giturn-aj-card:focus-within .giturn-aj-card__media img {
	transform: scale(1.03);
}

.giturn-aj-card__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.42rem;
}

.giturn-aj-card__terms {
	margin: 0 !important;
}

.giturn-aj-card__terms a {
	display: inline-block;
	padding: 0.22rem 0.62rem;
	border-radius: 999px;
	font-size: 0.6875rem !important;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	background: linear-gradient(
		180deg,
		rgba(56, 29, 146, 0.1) 0%,
		rgba(56, 29, 146, 0.05) 100%
	);
	color: var(--wp--preset--color--primary, #381d92) !important;
	border: 1px solid rgba(56, 29, 146, 0.12);
	transition: border-color 0.2s ease, background 0.2s ease;
}

.giturn-aj-card:hover .giturn-aj-card__terms a {
	border-color: rgba(212, 175, 55, 0.45);
}

.giturn-aj-card__meta {
	margin-top: 0.1rem;
	font-size: 0.796875rem;
	color: rgba(61, 63, 92, 0.88);
	letter-spacing: 0.01em;
}

.giturn-aj-card__meta.is-layout-flex {
	column-gap: 0.85rem !important;
	row-gap: 0.35rem !important;
	flex-wrap: wrap;
	align-items: baseline;
}

.giturn-aj-card__meta time,
.giturn-aj-card__meta .wp-block-post-author-name {
	font-weight: 600;
}

.giturn-aj-card__meta a {
	text-decoration-color: transparent;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
	color: inherit;
}

.giturn-aj-card__meta a:hover {
	color: var(--wp--preset--color--primary, #381d92);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.giturn-aj-card__meta time {
	font-variant-numeric: tabular-nums;
	opacity: 0.92;
}

.giturn-aj-card__body .wp-block-post-title {
	margin: 0 !important;
}

.giturn-aj-card__body .wp-block-post-title a {
	display: inline-block;
	text-decoration: none;
	color: var(--giturn-fg);
	transition: color 0.2s ease;
	font-weight: 700;
	line-height: 1.22;
	text-wrap: balance;
}

.giturn-aj-card:hover .giturn-aj-card__body .wp-block-post-title a,
.giturn-aj-card__body .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary, #381d92);
}

.giturn-aj-card__excerpt {
	position: relative;
	margin: 0.4rem 0 0 !important;
	padding-inline-start: 0.9rem;
	font-size: 0.9375rem;
	line-height: 1.68;
	color: rgba(61, 63, 92, 0.92);
}

.giturn-aj-card__excerpt::before {
	content: '\201C';
	position: absolute;
	inset-inline-start: -0.05rem;
	top: -0.12em;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--giturn-accent);
	opacity: 0.48;
	font-family: Georgia, 'Times New Roman', serif;
	font-weight: 400;
}

.giturn-aj-card__excerpt .wp-block-post-excerpt__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.giturn-aj-card--compact .giturn-aj-card__excerpt .wp-block-post-excerpt__excerpt {
	-webkit-line-clamp: 3;
}

.giturn-aj-feed--primary .wp-block-query-pagination {
	margin-top: clamp(1.75rem, 4vw, 2.35rem);
	padding-top: 1rem;
	border-top: 1px solid rgba(15, 23, 42, 0.07);
	gap: 0.65rem !important;
}

@media (max-width: 781px) {
	.giturn-aj-card {
		flex-direction: column;
		flex-wrap: wrap;
		padding-inline: 0;
		margin-inline: 0;
	}

	.giturn-aj-card__media,
	.giturn-aj-card--compact .giturn-aj-card__media {
		flex: none;
		max-width: 100%;
		width: 100%;
	}

	.giturn-aj-feed--primary .alignwide.wp-block-query,
	.giturn-aj-feed--flow .alignwide.wp-block-query {
		max-width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.giturn-aj-card__media img,
	.giturn-aj-card__media .wp-block-post-featured-image,
	.giturn-aj-card {
		transition-duration: 0.01ms !important;
	}

	.giturn-aj-card:hover .giturn-aj-card__media img {
		transform: none;
	}
}

/* Pagination emphasis inside AJ primary feed */
body.giturn-luxury .giturn-aj-feed--primary a.wp-block-query-pagination-next {
	min-width: auto;
	padding-inline: 1.4rem !important;
	font-weight: 700;
	background: linear-gradient(135deg, #2f1a74 0%, #381d92 52%, #4a3aac 100%) !important;
	color: rgba(255, 255, 255, 0.97) !important;
	border-color: transparent !important;
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.25) inset,
		0 10px 28px rgba(56, 29, 146, 0.28) !important;
}

body.giturn-luxury .giturn-aj-feed--primary a.wp-block-query-pagination-next:hover {
	transform: translateY(-2px);
	border-color: transparent !important;
	box-shadow: 0 2px 0 rgba(255, 255, 255, 0.3) inset,
		0 14px 36px rgba(56, 29, 146, 0.32) !important;
	color: #fff !important;
}

body.giturn-luxury .giturn-aj-feed--primary a.wp-block-query-pagination-previous:not(:empty) {
	font-weight: 600;
	opacity: 0.88;
}
