/* ==========================================================================
   Tayseer Alfalah — front-end styles
   Logical properties throughout: the same rules lay out RTL (Arabic) and LTR (English).
   ========================================================================== */

:root {
	--tx-ink: #1c2528;
	--tx-ink-2: #46545a;
	--tx-muted: #77858a;
	--tx-line: #e8e4dc;
	--tx-surface: #ffffff;
	--tx-surface-2: #f4f2ed;
	--tx-on-accent: #ffffff;
	--tx-shadow: 0 1px 2px rgba(20, 30, 32, .05), 0 8px 24px -12px rgba(20, 30, 32, .18);
	--tx-shadow-lg: 0 2px 4px rgba(20, 30, 32, .06), 0 24px 48px -20px rgba(20, 30, 32, .28);
	--tx-wrap: 1200px;
	--tx-gutter: clamp(16px, 4vw, 28px);
	--tx-ease: cubic-bezier(.2, .7, .2, 1);
	--tx-lh: 2.05;
	--tx-frame: color-mix(in srgb, var(--tx-accent-soft) 100%, transparent);
}
html[lang="en"] { --tx-lh: 1.8; }

html[data-theme="dark"] {
	--tx-ink: #e7ecea;
	--tx-ink-2: #c2cbc8;
	--tx-muted: #8f9c99;
	--tx-line: #2b3436;
	--tx-surface: #192022;
	--tx-surface-2: #151b1d;
	--tx-paper: #111618 !important;
	--tx-accent-soft: color-mix(in srgb, var(--tx-accent) 22%, #111618) !important;
	--tx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
	--tx-shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .7);
	color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
	html:not([data-theme="light"]) {
		--tx-ink: #e7ecea;
		--tx-ink-2: #c2cbc8;
		--tx-muted: #8f9c99;
		--tx-line: #2b3436;
		--tx-surface: #192022;
		--tx-surface-2: #151b1d;
		--tx-paper: #111618 !important;
		--tx-accent-soft: color-mix(in srgb, var(--tx-accent) 22%, #111618) !important;
		--tx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
		--tx-shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .7);
		color-scheme: dark;
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
	margin: 0;
	background: var(--tx-paper);
	color: var(--tx-ink);
	font-family: var(--tx-font-body);
	font-size: 16px;
	line-height: 1.75;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; transition: color .2s, background-color .2s, border-color .2s, opacity .2s; }
a:hover { color: var(--tx-accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--tx-accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--tx-font-head); color: var(--tx-ink); font-weight: 700; line-height: 1.45; margin: 0 0 .6em; }
p { margin: 0 0 1.1em; }
.screen-reader-text, .tx-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tx-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--tx-accent); color: var(--tx-on-accent); padding: 10px 16px; border-radius: 8px; }
.tx-skip:focus { top: 12px; color: var(--tx-on-accent); }
.tx-container { width: 100%; max-width: var(--tx-wrap); margin-inline: auto; padding-inline: var(--tx-gutter); }
.tx-i { flex: none; vertical-align: middle; }
.tx-center { text-align: center; }

/* ---------- Buttons, chips, meta ---------- */
.tx-btn {
	display: inline-flex; align-items: center; gap: .5em; justify-content: center;
	background: var(--tx-accent); color: var(--tx-on-accent);
	border: 0; border-radius: 999px; padding: .7em 1.6em; font-weight: 600; font-size: 14px;
	cursor: pointer; transition: transform .2s var(--tx-ease), box-shadow .2s, background-color .2s;
	box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--tx-accent) 70%, transparent);
}
.tx-btn:hover { color: var(--tx-on-accent); transform: translateY(-1px); background: color-mix(in srgb, var(--tx-accent) 88%, #000); }
.tx-btn-soft { background: var(--tx-accent-soft); color: color-mix(in srgb, var(--tx-accent) 75%, var(--tx-ink)); box-shadow: none; }
.tx-btn-soft:hover { background: var(--tx-accent); color: var(--tx-on-accent); }
.tx-chip, .tx-kicker {
	display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
	color: color-mix(in srgb, var(--tx-accent) 80%, var(--tx-ink)); background: var(--tx-accent-soft);
	padding: .2em .85em; border-radius: 999px; margin-block-end: .7em;
}
html[lang="en"] .tx-chip, html[lang="en"] .tx-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }
.tx-chip:hover { background: var(--tx-accent); color: var(--tx-on-accent); }
.tx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35em 1.1em; color: var(--tx-muted); font-size: 13px; }
.tx-meta span { display: inline-flex; align-items: center; gap: .4em; }
.tx-meta time { white-space: nowrap; }

/* ---------- Top bar ---------- */
.tx-topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--tx-surface) 92%, transparent); backdrop-filter: saturate(160%) blur(10px); -webkit-backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--tx-line); }
.admin-bar .tx-topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .tx-topbar { top: 46px; } }
.tx-topbar.is-scrolled { box-shadow: var(--tx-shadow); }
.tx-topbar-in { display: flex; align-items: center; gap: 22px; min-height: 66px; }
.tx-navlogo { display: inline-flex; align-items: center; flex: none; }
.tx-navlogo .tx-logo-img { height: 34px; width: auto; }
.tx-navlogo .tx-logo-text { font-family: var(--tx-font-head); font-size: 20px; font-weight: 700; }
.tx-nav { flex: 1; min-width: 0; }
.tx-menu, .tx-menu ul { list-style: none; margin: 0; padding: 0; }
.tx-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.tx-menu > li { position: relative; }
.tx-menu a { display: block; padding: 10px 11px; font-size: 14.5px; color: var(--tx-ink-2); border-radius: 8px; white-space: nowrap; }
.tx-menu > li > a { position: relative; }
.tx-menu > li > a::after { content: ""; position: absolute; inset-inline: 12px; bottom: 4px; height: 2px; background: var(--tx-accent); border-radius: 2px; transform: scaleX(0); transition: transform .25s var(--tx-ease); }
.tx-menu > li > a:hover::after, .tx-menu > .current-menu-item > a::after, .tx-menu > .current-menu-parent > a::after, .tx-menu > .current-menu-ancestor > a::after { transform: scaleX(1); }
.tx-menu .current-menu-item > a, .tx-menu a:hover { color: var(--tx-ink); }
.tx-menu .sub-menu { position: absolute; inset-inline-start: 0; top: 100%; min-width: 220px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 12px; box-shadow: var(--tx-shadow-lg); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--tx-ease); z-index: 5; }
.tx-menu .sub-menu .sub-menu { top: -9px; inset-inline-start: 100%; }
.tx-menu li:hover > .sub-menu, .tx-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.tx-menu .sub-menu a { padding: 9px 12px; }
.tx-menu .sub-menu a:hover { background: var(--tx-surface-2); }
.tx-menu .menu-item-has-children > a { padding-inline-end: 24px; }
.tx-menu .menu-item-has-children > a::before { content: ""; position: absolute; inset-inline-end: 9px; top: 50%; width: 6px; height: 6px; border-inline-end: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); opacity: .6; }
.tx-tools { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.tx-iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--tx-ink-2); }
.tx-iconbtn:hover { background: var(--tx-surface-2); color: var(--tx-ink); }
.tx-menu-toggle { display: none; }
.tx-theme-toggle .tx-i-sun { display: none; }
html[data-theme="dark"] .tx-theme-toggle .tx-i-sun { display: block; }
html[data-theme="dark"] .tx-theme-toggle .tx-i-moon { display: none; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .tx-theme-toggle .tx-i-sun { display: block; } html:not([data-theme="light"]) .tx-theme-toggle .tx-i-moon { display: none; } }
.tx-lang { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 7px 12px; border: 1px solid var(--tx-line); border-radius: 999px; color: var(--tx-ink-2); margin-inline-start: 4px; }
.tx-lang:hover { border-color: var(--tx-accent); color: var(--tx-accent); }
.tx-lang[lang="ar"] span { font-family: 'TX Plex', var(--tx-font-body); }

/* Drawer (mobile menu) */
.tx-drawer { position: fixed; inset: 0; z-index: 60; background: rgba(10, 16, 18, .45); }
.tx-drawer[hidden] { display: none; }
.tx-drawer-panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(86vw, 360px); background: var(--tx-surface); padding: 18px 20px 28px; overflow-y: auto; box-shadow: var(--tx-shadow-lg); animation: txSlideIn .28s var(--tx-ease); }
html[dir="rtl"] .tx-drawer-panel { animation-name: txSlideInR; }
@keyframes txSlideIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes txSlideInR { from { transform: translateX(100%); } to { transform: none; } }
.tx-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tx-menu-mobile, .tx-menu-mobile ul { list-style: none; margin: 0; padding: 0; }
.tx-menu-mobile a { display: block; padding: 12px 6px; border-bottom: 1px solid var(--tx-line); font-size: 16px; }
.tx-menu-mobile .sub-menu a { padding-inline-start: 22px; font-size: 15px; color: var(--tx-ink-2); }
.tx-social-drawer { margin-top: 20px; }

/* Search overlay */
.tx-search-overlay { position: fixed; inset-inline: 0; top: 0; z-index: 70; background: var(--tx-surface); border-bottom: 1px solid var(--tx-line); box-shadow: var(--tx-shadow-lg); padding: 22px 0; animation: txDrop .25s var(--tx-ease); }
.tx-search-overlay[hidden] { display: none; }
@keyframes txDrop { from { transform: translateY(-100%); } to { transform: none; } }
.tx-search-in { display: flex; gap: 12px; align-items: center; }
.tx-searchform { position: relative; display: flex; flex: 1; }
.tx-search-field { width: 100%; font: inherit; font-size: 17px; padding: 14px 20px; padding-inline-end: 54px; border: 1.5px solid var(--tx-line); border-radius: 999px; background: var(--tx-paper); color: var(--tx-ink); }
.tx-search-field:focus { outline: none; border-color: var(--tx-accent); box-shadow: 0 0 0 4px var(--tx-accent-soft); }
.tx-search-submit { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--tx-accent); color: var(--tx-on-accent); display: grid; place-items: center; cursor: pointer; }

/* ---------- Masthead (signature) ---------- */
.tx-masthead { text-align: center; padding: clamp(34px, 6vw, 64px) 0 clamp(26px, 4vw, 44px); }
.tx-masthead:not(.is-home) { padding: clamp(22px, 4vw, 40px) 0 clamp(12px, 2vw, 22px); }
.tx-site-logo { margin: 0; line-height: 1; font-size: inherit; }
.tx-site-logo a { display: inline-block; }
.tx-site-logo .tx-logo-img { width: var(--tx-logo-w); max-width: 70vw; }
.tx-masthead:not(.is-home) .tx-site-logo .tx-logo-img { width: calc(var(--tx-logo-w) * .72); }
.tx-site-logo .tx-logo-text { font-family: var(--tx-font-head); font-size: clamp(34px, 6vw, 56px); font-weight: 700; }
.tx-slogan { margin: 14px 0 0; color: var(--tx-ink-2); font-size: 14px; }
html[lang="en"] .tx-slogan { text-transform: uppercase; letter-spacing: .22em; font-size: 12.5px; }
.tx-masthead:not(.is-home) .tx-slogan { display: none; }
html[data-theme="dark"] .logo-invert .tx-logo-img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .logo-invert .tx-logo-img { filter: invert(1) hue-rotate(180deg); } }

/* ---------- Slider ---------- */
.tx-slider-wrap { margin-bottom: clamp(40px, 6vw, 72px); }
.tx-slider { position: relative; background: var(--tx-accent-soft); padding: clamp(10px, 1.8vw, 22px); border-radius: calc(var(--tx-radius) + 6px); }
.tx-slides { position: relative; width: 100%; overflow: hidden; border-radius: var(--tx-radius); aspect-ratio: 16 / 7.4; min-height: 360px; background: var(--tx-surface-2); }
.tx-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s var(--tx-ease), visibility .8s; }
.tx-slide.is-active { opacity: 1; visibility: visible; }
.tx-slide-media, .tx-slide-media img, .tx-slide-media .tx-ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tx-slide.is-active .tx-slide-media img { animation: txKen 9s ease-out both; }
@keyframes txKen { from { transform: scale(1.06); } to { transform: scale(1); } }
.tx-slide-card { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.tx-slide-card-in { position: relative; background: var(--tx-surface); max-width: 520px; width: 100%; text-align: center; padding: clamp(26px, 4vw, 44px) clamp(22px, 4vw, 48px); border-radius: calc(var(--tx-radius) - 4px); box-shadow: var(--tx-shadow-lg); }
.tx-slide-card-in::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--tx-accent-soft); border-radius: calc(var(--tx-radius) - 8px); pointer-events: none; }
.tx-slide-title { font-size: clamp(22px, 2.6vw, 32px); margin: .1em 0 .5em; }
.tx-slide-title a:hover { color: var(--tx-accent); }
.tx-slide-card .tx-meta { justify-content: center; margin-bottom: 18px; }
.tx-slider-btn { position: absolute; top: 50%; z-index: 3; width: 46px; height: 46px; margin-top: -23px; display: grid; place-items: center; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--tx-surface) 88%, transparent); color: var(--tx-ink); box-shadow: var(--tx-shadow); cursor: pointer; transition: .2s; }
.tx-slider-btn:hover { background: var(--tx-accent); color: var(--tx-on-accent); }
.tx-prev { inset-inline-start: clamp(18px, 3vw, 40px); }
.tx-next { inset-inline-end: clamp(18px, 3vw, 40px); }
html[dir="ltr"] .tx-prev svg, html[dir="rtl"] .tx-next svg { transform: scaleX(-1); }
.tx-dots { position: absolute; inset-inline: 0; bottom: clamp(20px, 3vw, 38px); display: flex; justify-content: center; gap: 8px; z-index: 3; }
.tx-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .6); cursor: pointer; transition: width .3s var(--tx-ease), background .3s; }
.tx-dot.is-active { width: 26px; background: #fff; }

/* ---------- Layout ---------- */
.tx-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 56px); align-items: start; margin-bottom: clamp(48px, 6vw, 80px); }
.has-sidebar .tx-layout { grid-template-columns: minmax(0, 1fr) 320px; }
.tx-content { min-width: 0; }
.tx-section-title { position: relative; font-size: clamp(20px, 2vw, 25px); margin: 0 0 26px; display: flex; align-items: center; gap: 16px; }
.tx-section-title::after { content: ""; flex: 1; height: 1px; background: var(--tx-line); }
.tx-section-title span { position: relative; padding-bottom: 6px; }
.tx-section-title span::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; width: 34px; height: 3px; border-radius: 3px; background: var(--tx-accent); }
.tx-section-title.tx-center { justify-content: center; }
.tx-section-title.tx-center::after { display: none; }
.tx-section-title.tx-center span::after { inset-inline-start: 50%; transform: translateX(-50%); }
html[dir="rtl"] .tx-section-title.tx-center span::after { transform: translateX(50%); }

/* ---------- Cards ---------- */
.tx-grid { display: grid; gap: clamp(20px, 2.4vw, 30px); }
.tx-grid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-grid-list { grid-template-columns: minmax(0, 1fr); }
.tx-grid-overlay { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tx-sections .tx-grid-grid, .tx-grid-related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tx-card { position: relative; display: flex; flex-direction: column; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius); overflow: hidden; transition: transform .3s var(--tx-ease), box-shadow .3s var(--tx-ease), border-color .3s; }
.tx-card:hover { transform: translateY(-3px); box-shadow: var(--tx-shadow-lg); border-color: transparent; }
.tx-card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--tx-surface-2); }
.tx-card-media img, .tx-card-media .tx-ph { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--tx-ease); }
.tx-card:hover .tx-card-media img { transform: scale(1.04); }
.tx-ph { display: grid !important; place-items: center; background: linear-gradient(135deg, var(--tx-accent-soft), color-mix(in srgb, var(--tx-accent) 30%, var(--tx-accent-soft))); }
.tx-card-media:has(.tx-ph) { aspect-ratio: 3 / 1.15; }
.tx-card-wide .tx-card-media:has(.tx-ph), .tx-card-list .tx-card-media:has(.tx-ph) { aspect-ratio: auto; }
.tx-ph { background-image: radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--tx-accent) 22%, transparent) 0 2px, transparent 3px), radial-gradient(circle at 70% 70%, color-mix(in srgb, var(--tx-accent) 18%, transparent) 0 2px, transparent 3px), linear-gradient(135deg, var(--tx-accent-soft), color-mix(in srgb, var(--tx-accent) 30%, var(--tx-accent-soft))) !important; background-size: 26px 26px, 34px 34px, auto !important; }
.tx-ph span { font-family: var(--tx-font-head); font-size: 64px; color: color-mix(in srgb, var(--tx-accent) 60%, #fff); line-height: 1; }
.tx-play { position: absolute; inset-inline-end: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.tx-card-body { display: flex; flex-direction: column; align-items: flex-start; padding: 20px 22px 22px; flex: 1; }
.tx-card-title { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; margin: 0 0 .45em; }
html[lang="en"] .tx-card-title, .tx-card[lang="en"] .tx-card-title { line-height: 1.35; }
.tx-card-title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--tx-ease), color .2s; }
html[dir="rtl"] .tx-card-title a { background-position: 100% 100%; }
.tx-card-title a:hover { background-size: 100% 1px; color: var(--tx-ink); }
.tx-card-excerpt { color: var(--tx-ink-2); font-size: 15px; line-height: 1.85; margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tx-card .tx-meta { margin-top: auto; }

.tx-card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; }
.tx-card-wide .tx-card-media { aspect-ratio: auto; min-height: 320px; height: 100%; }
.tx-card-wide .tx-card-body { justify-content: center; padding: clamp(24px, 3vw, 40px); }
.tx-card-wide .tx-card-title { font-size: clamp(22px, 2.3vw, 30px); }
.tx-card-wide .tx-card-excerpt { -webkit-line-clamp: 4; font-size: 16px; }

.tx-card-list { display: grid; grid-template-columns: minmax(180px, 38%) 1fr; }
.tx-card-list .tx-card-media { aspect-ratio: auto; height: 100%; min-height: 190px; }

.tx-card-overlay { border: 0; min-height: 300px; color: #fff; }
.tx-card-overlay .tx-card-media { position: absolute; inset: 0; aspect-ratio: auto; }
.tx-card-overlay .tx-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8, 14, 16, .88) 0%, rgba(8, 14, 16, .35) 55%, rgba(8, 14, 16, .1) 100%); }
.tx-card-overlay .tx-card-body { position: relative; z-index: 1; margin-top: auto; flex: none; padding: 24px; pointer-events: none; }
.tx-card-overlay .tx-card-body a { pointer-events: auto; }
.tx-card-overlay .tx-card-title, .tx-card-overlay .tx-card-title a, .tx-card-overlay .tx-card-title a:hover { color: #fff; }
.tx-card-overlay .tx-meta { color: rgba(255, 255, 255, .78); }
.tx-card-overlay .tx-chip { background: rgba(255, 255, 255, .18); color: #fff; backdrop-filter: blur(6px); }

/* ---------- Home sections, popular, newsletter ---------- */
.tx-sections .tx-grid-grid.tx-cols-4, .tx-sections .tx-grid-overlay.tx-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tx-sections .tx-grid-grid.tx-cols-2, .tx-sections .tx-grid-overlay.tx-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-sections .tx-grid-grid.tx-cols-1, .tx-sections .tx-grid-overlay.tx-cols-1 { grid-template-columns: minmax(0, 1fr); }
.tx-sections .tx-cols-4 .tx-card-title { font-size: 17px; }
.tx-sections .tx-cols-4 .tx-card-excerpt { -webkit-line-clamp: 2; }
.tx-sections .tx-grid-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-sections { margin-bottom: clamp(32px, 5vw, 64px); }
.tx-section { margin-bottom: clamp(40px, 5vw, 64px); }
.tx-section-head { display: flex; align-items: baseline; gap: 16px; }
.tx-section-head .tx-section-title { flex: 1; }
.tx-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tx-accent); white-space: nowrap; }
html[dir="rtl"] .tx-more svg, html[dir="rtl"] .tx-i-arrow { transform: scaleX(-1); }
.tx-popular { background: var(--tx-surface-2); padding: clamp(48px, 6vw, 80px) 0; border-block: 1px solid var(--tx-line); }
.tx-popular .tx-cols-1 { grid-template-columns: minmax(0, 520px); justify-content: center; }
.tx-popular .tx-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-newsletter { background: var(--tx-accent-soft); padding: clamp(44px, 6vw, 72px) 0; }
.tx-newsletter-in > * { min-width: 0; }
.tx-newsletter-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 460px); gap: 28px 48px; align-items: center; }
.tx-newsletter h2 { font-size: clamp(22px, 2.4vw, 30px); margin-bottom: .3em; }
.tx-newsletter p { margin: 0; color: var(--tx-ink-2); }
.tx-newsletter-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tx-surface); color: var(--tx-accent); margin-bottom: 14px; box-shadow: var(--tx-shadow); }
.tx-subscribe { display: flex; gap: 8px; min-width: 0; max-width: 100%; background: var(--tx-surface); padding: 6px; border-radius: 999px; box-shadow: var(--tx-shadow); }
.tx-subscribe input[type="email"] { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; padding: 10px 16px; color: var(--tx-ink); }
.tx-subscribe input[type="email"]:focus { outline: none; }
.widget .tx-subscribe { border: 1px solid var(--tx-line); box-shadow: none; }
.tx-note { padding: 10px 14px; border-radius: 10px; background: var(--tx-surface-2); font-size: 14px; }
.tx-note-ok { background: color-mix(in srgb, #2e9e6b 14%, var(--tx-surface)); }
.tx-note-err { background: color-mix(in srgb, #d14 12%, var(--tx-surface)); }

/* ---------- Archive head, pagination, empty ---------- */
.tx-archive-head { text-align: center; max-width: 820px; margin: 0 auto clamp(30px, 4vw, 52px); }
.tx-archive-title { font-size: clamp(28px, 4vw, 44px); margin-bottom: .2em; }
.tx-archive-desc { color: var(--tx-ink-2); font-size: 17px; }
.tx-archive-count { color: var(--tx-muted); font-size: 14px; margin: 0; }
.tx-archive-cover img { width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--tx-radius); margin-bottom: 26px; }
.tx-archive-search { max-width: 560px; margin: 22px auto 0; }
.tx-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 44px; }
.tx-pagination .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; display: inline-grid; place-items: center; border-radius: 999px; border: 1px solid var(--tx-line); background: var(--tx-surface); font-weight: 600; font-size: 15px; }
.tx-pagination .page-numbers.current { background: var(--tx-accent); color: var(--tx-on-accent); border-color: var(--tx-accent); }
.tx-pagination a.page-numbers:hover { border-color: var(--tx-accent); color: var(--tx-accent); }
html[dir="ltr"] .tx-pagination .prev svg, html[dir="rtl"] .tx-pagination .next svg { transform: scaleX(-1); }
.tx-pagination .dots { border: 0; background: none; }
.tx-empty { text-align: center; padding: 40px; background: var(--tx-surface); border: 1px dashed var(--tx-line); border-radius: var(--tx-radius); }
.tx-404 { text-align: center; padding-bottom: 60px; }
.tx-404-num { font-family: var(--tx-font-head); font-size: clamp(90px, 16vw, 160px); line-height: 1; margin: 0; color: var(--tx-accent-soft); -webkit-text-stroke: 1.5px var(--tx-accent); }
.tx-404 .tx-btn { margin: 22px 0 56px; }
.tx-404 .tx-section-title { text-align: start; }

/* ---------- Sidebar & widgets ---------- */
.tx-sidebar { display: grid; gap: 34px; }
.widget { min-width: 0; }
.widget-title { text-align: center; font-size: 15px; font-family: var(--tx-font-body); font-weight: 700; margin: 0 0 18px; padding: 12px 0; border-top: 2px solid var(--tx-ink); border-bottom: 1px solid var(--tx-line); }
html[lang="en"] .widget-title { text-transform: uppercase; letter-spacing: .16em; font-size: 12.5px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget_categories li, .widget_archive li, .widget_recent_entries li, .widget_pages li, .widget_recent_comments li, .widget_meta li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--tx-line); font-size: 15px; }
.widget_categories li a, .widget_archive li a { flex: 1; }
.widget select { width: 100%; padding: 10px 12px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-surface); color: var(--tx-ink); font: inherit; }
.widget .tagcloud a, .tx-tags a { display: inline-block; margin: 0 0 8px; margin-inline-end: 6px; padding: 4px 12px; font-size: 13px !important; border-radius: 999px; background: var(--tx-surface-2); border: 1px solid var(--tx-line); }
.widget .tagcloud a:hover, .tx-tags a:hover { background: var(--tx-accent); color: var(--tx-on-accent); border-color: var(--tx-accent); }
.tx-mini li { border-bottom: 1px solid var(--tx-line); }
.tx-mini li:last-child { border-bottom: 0; }
.tx-mini-link { display: flex; gap: 14px; align-items: center; padding: 12px 0; }
.tx-mini-img { flex: none; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--tx-surface-2); }
.tx-mini-img img, .tx-mini-img .tx-ph { width: 100%; height: 100%; object-fit: cover; }
.tx-mini-img .tx-ph span { font-size: 28px; }
.tx-mini-body { display: flex; flex-direction: column; min-width: 0; }
.tx-mini-title { font-weight: 600; font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tx-mini-date { font-size: 12.5px; color: var(--tx-muted); }
.tx-about { text-align: center; }
.tx-about-photo { width: 180px; height: 180px; margin: 0 auto 18px; overflow: hidden; border-radius: var(--tx-radius); box-shadow: 0 0 0 6px var(--tx-surface), 0 0 0 7px var(--tx-line); }
.tx-about-photo.is-round { border-radius: 50%; }
.tx-about-photo img { width: 100%; height: 100%; object-fit: cover; }
.tx-about-greeting { font-family: var(--tx-font-head); font-size: 22px; font-weight: 700; margin-bottom: .4em; }
.tx-about-text { color: var(--tx-ink-2); font-size: 15px; line-height: 1.95; }
.tx-about-sig { width: 150px; margin: 4px auto 16px; display: block; }
.tx-feature img { border-radius: var(--tx-radius); margin-bottom: 14px; width: 100%; }
.tx-feature h3 { font-size: 19px; }
.tx-widget-note { color: var(--tx-ink-2); font-size: 15px; }
.tx-social { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tx-soc { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink-2); cursor: pointer; }
.tx-soc:hover { background: var(--tx-accent); border-color: var(--tx-accent); color: var(--tx-on-accent); }
.tx-social-top .tx-soc { width: 34px; height: 34px; border: 0; background: transparent; }

/* ---------- Single article ---------- */
.tx-single-head { text-align: center; max-width: 900px; margin-bottom: clamp(22px, 3vw, 36px); }
.tx-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tx-single-title { font-size: clamp(28px, 4.4vw, 48px); line-height: 1.4; margin: .1em 0 .45em; }
.tx-single[lang="en"] .tx-single-title { line-height: 1.2; }
.tx-single-head .tx-meta { justify-content: center; font-size: 14px; }
.tx-translation { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--tx-accent); }
.tx-single-media { margin-bottom: clamp(30px, 4vw, 52px); }
.tx-post-cover { margin: 0; }
.tx-post-cover img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--tx-radius); display: block; }
.tx-post-cover figcaption, .tx-gallery figcaption { text-align: center; color: var(--tx-muted); font-size: 13px; padding-top: 10px; }
.tx-gallery { background: transparent; padding: 0; }
.tx-gallery .tx-slides { aspect-ratio: 16 / 8; }
.tx-gallery .tx-slide { margin: 0; }
.tx-gallery .tx-slide img { width: 100%; height: 100%; object-fit: cover; }
.tx-gallery figcaption { position: absolute; inset-inline: 0; bottom: 0; color: #fff; background: linear-gradient(to top, rgba(0, 0, 0, .6), transparent); padding: 30px 16px 40px; }
.tx-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--tx-radius); overflow: hidden; background: #000; }
.tx-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.has-sidebar .tx-single .tx-layout { grid-template-columns: minmax(0, 1fr) 300px; }
.tx-single .tx-content { max-width: 780px; margin-inline: auto; width: 100%; }

/* Long-form text */
.tx-prose { font-size: var(--tx-fs); line-height: var(--tx-lh); color: var(--tx-ink); overflow-wrap: break-word; }
.tx-prose > * { max-width: 100%; }
.tx-prose p { margin: 0 0 1.15em; }
.tx-prose h1, .tx-prose h2, .tx-prose h3, .tx-prose h4, .tx-prose h5, .tx-prose h6 { margin: 1.6em 0 .6em; line-height: 1.55; }
.tx-prose h1 { font-size: 1.75em; } .tx-prose h2 { font-size: 1.55em; } .tx-prose h3 { font-size: 1.32em; } .tx-prose h4 { font-size: 1.15em; } .tx-prose h5, .tx-prose h6 { font-size: 1em; }
.tx-prose a { color: var(--tx-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tx-prose strong, .tx-prose b { font-weight: 700; color: var(--tx-ink); }
.tx-prose ul, .tx-prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.tx-prose li { margin-bottom: .4em; }
.tx-prose hr { border: 0; height: 1px; background: var(--tx-line); margin: 2.2em auto; width: 40%; }
.tx-prose img { border-radius: calc(var(--tx-radius) - 4px); }
.tx-prose .alignright { float: right; margin: .4em 0 1em 1.6em; max-width: 50%; }
.tx-prose .alignleft { float: left; margin: .4em 1.6em 1em 0; max-width: 50%; }
.tx-prose .aligncenter { display: block; margin: 1.6em auto; }
.tx-prose .wp-caption { max-width: 100% !important; }
.tx-prose .wp-caption-text, .tx-prose figcaption { font-size: 13.5px; color: var(--tx-muted); text-align: center; margin-top: 8px; }
.tx-prose::after { content: ""; display: table; clear: both; }
/* The original articles use quote blocks as reading panels. */
.tx-prose blockquote {
	margin: 0 0 1.6em; padding: clamp(18px, 2.6vw, 30px) clamp(20px, 3vw, 34px);
	background: color-mix(in srgb, var(--tx-accent-soft) 55%, var(--tx-surface));
	border-inline-start: 4px solid var(--tx-accent); border-radius: var(--tx-radius);
	font-style: normal; color: var(--tx-ink);
}
.tx-prose blockquote > :first-child { margin-top: 0; }
.tx-prose blockquote > :last-child { margin-bottom: 0; }
.tx-prose blockquote h3:first-child, .tx-prose blockquote h2:first-child { color: color-mix(in srgb, var(--tx-accent) 70%, var(--tx-ink)); }
.tx-prose table { width: 100% !important; border-collapse: collapse; margin: 0 0 1.6em; display: block; overflow-x: auto; border-radius: 10px; }
.tx-prose table tbody, .tx-prose table thead { display: table; width: 100%; }
.tx-prose td, .tx-prose th { padding: 10px 14px; border: 1px solid var(--tx-line); vertical-align: top; width: auto !important; height: auto !important; }
.tx-prose div[align="center"], .tx-prose center { text-align: center; }
html[data-theme="dark"] .tx-prose [style*="background"] { color: #1c2528 !important; }
html[data-theme="dark"] .tx-prose [style*="background"] * { color: #1c2528 !important; }
.tx-prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 1.6em; }
.tx-prose .gallery-item { margin: 0; }
.tx-prose .gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.tx-pagelinks { margin: 1.5em 0; font-weight: 600; }

.tx-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 34px 0 0; }
.tx-tags > span { font-weight: 700; margin-inline-end: 6px; }
.tx-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 30px 0; padding: 18px 0; border-block: 1px solid var(--tx-line); }
.tx-share-label { font-weight: 700; margin-inline-end: auto; }
.tx-soc-whatsapp:hover { background: #25d366; border-color: #25d366; }
.tx-about-author { display: flex; gap: 24px; align-items: center; text-align: start; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius); padding: 26px; margin: 34px 0; }
.tx-about-author .tx-about-photo { width: 110px; height: 110px; margin: 0; flex: none; }
.tx-about-author .tx-about-name { font-size: 22px; margin: .2em 0 .3em; }
.tx-about-author .tx-kicker { margin-bottom: 0; }
.tx-about-author .tx-about-greeting { font-size: 16px; font-family: var(--tx-font-body); color: var(--tx-ink-2); margin-bottom: .2em; }
.tx-about-author .tx-about-text { font-size: 14.5px; }
.tx-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 34px 0 48px; }
.tx-postnav a { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border: 1px solid var(--tx-line); border-radius: var(--tx-radius); background: var(--tx-surface); }
.tx-postnav a:hover { border-color: var(--tx-accent); }
.tx-postnav span { font-size: 12.5px; color: var(--tx-muted); }
.tx-postnav strong { font-family: var(--tx-font-head); font-size: 17px; line-height: 1.55; }
.tx-postnav-next { text-align: end; grid-column: 2; }
.tx-related { margin: 48px 0; }
.tx-single .tx-grid-related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.has-sidebar .tx-single .tx-grid-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-grid-related .tx-card-excerpt { display: none; }

/* Comments */
.tx-comments { margin-top: 48px; }
.tx-comment-list, .tx-comment-list .children { list-style: none; margin: 0; padding: 0; }
.tx-comment-list .children { padding-inline-start: clamp(16px, 4vw, 48px); }
.tx-comment-list .comment-body { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius); padding: 18px 20px; margin-bottom: 14px; }
.tx-comment-list .comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.tx-comment-list .comment-author img { border-radius: 50%; }
.tx-comment-list .says { display: none; }
.tx-comment-list .comment-metadata { font-size: 12.5px; color: var(--tx-muted); margin: 2px 0 8px; }
.tx-comment-list .reply a { font-size: 13px; font-weight: 600; color: var(--tx-accent); }
.comment-respond { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-radius); padding: clamp(20px, 3vw, 30px); margin-top: 24px; }
.comment-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.comment-form > p { margin: 0 0 14px; }
.comment-form-comment, .comment-form-cookies-consent, .form-submit, .comment-notes, .logged-in-as { grid-column: 1 / -1; }
.comment-form label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-paper); color: var(--tx-ink); }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--tx-accent); box-shadow: 0 0 0 3px var(--tx-accent-soft); }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; margin: 0; }

/* Reading progress */
.tx-progress { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 80; pointer-events: none; }
.admin-bar .tx-progress { top: 32px; }
.tx-progress span { display: block; height: 100%; width: 100%; background: var(--tx-accent); transform: scaleX(0); transform-origin: left; }
html[dir="rtl"] .tx-progress span { transform-origin: right; }

/* ---------- Footer ---------- */
.tx-footer { background: var(--tx-surface); border-top: 1px solid var(--tx-line); }
.tx-footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; padding-block: 48px 0; }
.tx-footer-main { text-align: center; padding-block: clamp(40px, 5vw, 60px); }
.tx-footer-logo .tx-logo-img { width: 130px; }
.tx-footer-logo .tx-logo-text { font-family: var(--tx-font-head); font-size: 28px; font-weight: 700; }
.tx-footer-text { color: var(--tx-ink-2); max-width: 560px; margin: 16px auto 0; }
.tx-footer-menu { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; font-size: 14.5px; }
.tx-footer-menu a { color: var(--tx-ink-2); }
.tx-social-footer { margin-top: 24px; }
.tx-footer-bottom { border-top: 1px solid var(--tx-line); }
.tx-footer-bottom-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.tx-copy { margin: 0; color: var(--tx-muted); font-size: 13.5px; }
.tx-totop { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--tx-line); }
.tx-totop svg { transform: rotate(-90deg); }
.tx-totop:hover { background: var(--tx-accent); color: var(--tx-on-accent); border-color: var(--tx-accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.has-sidebar .tx-layout, .has-sidebar .tx-single .tx-layout { grid-template-columns: minmax(0, 1fr); }
	.tx-sidebar { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 34px 40px; }
	.tx-single .tx-content { max-width: 780px; }
}
@media (max-width: 960px) {
	.tx-nav { display: none; }
	.tx-menu-toggle { display: inline-grid; }
	.tx-topbar-in { gap: 8px; }
	.tx-navlogo { margin-inline: auto; }
	.tx-tools { margin-inline-start: 0; }
	.tx-social-top { display: none; }
	.tx-grid-overlay, .tx-sections .tx-grid-grid, .tx-sections .tx-grid-grid.tx-cols-4, .tx-sections .tx-grid-overlay.tx-cols-4, .tx-grid-related, .tx-single .tx-grid-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tx-sections .tx-grid-list { grid-template-columns: minmax(0, 1fr); }
	.tx-newsletter-in { grid-template-columns: minmax(0, 1fr); text-align: center; }
	.tx-newsletter-icon { margin-inline: auto; }
}
@media (max-width: 720px) {
	body { font-size: 15.5px; }
	.tx-grid-grid, .tx-grid-overlay, .tx-sections .tx-grid-grid, .tx-sections .tx-grid-grid.tx-cols-4, .tx-sections .tx-grid-grid.tx-cols-2, .tx-sections .tx-grid-overlay.tx-cols-4, .tx-sections .tx-grid-overlay.tx-cols-2, .tx-grid-related, .tx-single .tx-grid-related, .has-sidebar .tx-single .tx-grid-related, .tx-popular .tx-cols-2 { grid-template-columns: minmax(0, 1fr); }
	.tx-card-wide, .tx-card-list { display: flex; }
	.tx-card-wide .tx-card-media, .tx-card-list .tx-card-media { aspect-ratio: 3 / 2; min-height: 0; height: auto; }
	.tx-slides { aspect-ratio: auto; min-height: 0; height: 520px; }
	.tx-gallery .tx-slides { height: auto; aspect-ratio: 4 / 3; }
	.tx-slide-card { align-items: end; padding: 14px 14px 44px; }
	.tx-slide-card-in { padding: 24px 20px 26px; }
	.tx-slider-btn { display: none; }
	.tx-dots { bottom: 18px; }
	.tx-prose { font-size: calc(var(--tx-fs) - 1.5px); }
	.tx-prose .alignright, .tx-prose .alignleft { float: none; margin: 1em auto; max-width: 100%; display: block; }
	.tx-about-author { flex-direction: column; text-align: center; }
	.tx-postnav { grid-template-columns: 1fr; }
	.tx-postnav-next { grid-column: auto; }
	.comment-form { grid-template-columns: 1fr; }
	.tx-lang span { display: none; }
	.tx-lang { padding: 8px; border: 0; }
	.tx-share-label { width: 100%; }
	.tx-card-overlay { min-height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
	.tx-topbar, .tx-drawer, .tx-search-overlay, .tx-sidebar, .tx-share, .tx-related, .tx-comments, .tx-footer, .tx-newsletter, .tx-postnav, .tx-progress { display: none !important; }
	body { background: #fff; color: #000; }
}
