/*!
 * FILE-11 of 13 — assets/frontend.css
 *
 * Complete visual layer for TechTroves Advanced Glass Archive v5.0.
 * All selectors are prefixed .ttga- and/or scoped inside .ttga-wrap,
 * so this stylesheet cannot leak into the rest of the theme.
 *
 * ORGANIZATION
 *   1.  CSS Variables (light mode)                 — design tokens
 *   2.  Dark mode variable overrides
 *   3.  Accessibility: reduced motion, high contrast
 *   4.  Base & wrapper
 *   5.  Top bar (controls, filters, toggles)
 *   6.  Body layout (sidebar + main)
 *   7.  Sidebar widgets
 *   8.  Results bar
 *   9.  Grid layout
 *   10. Carousel layout  (+ arrow escape from Elementor overflow)
 *   11. Masonry layout
 *   12. Timeline layout
 *   13. List layout
 *   14. Magazine layout
 *   15. Map layout
 *   16. Card (shared across layouts, CPT-aware badges)
 *   17. Skeleton loader
 *   18. Empty state
 *   19. Pagination / load-more
 *   20. Animations (reveal, glow, shimmer)
 *   21. RTL
 *   22. Responsive breakpoints
 */

/* =========================================================================
   1. CSS VARIABLES — LIGHT MODE (design tokens)
   ========================================================================= */
.ttga-wrap {
	/* Accent — overridable per-instance via inline style */
	--ttga-accent: #1e3a8a;
	--ttga-accent-rgb: 30, 58, 138;
	--ttga-accent-lite: rgba(var(--ttga-accent-rgb), 0.08);
	--ttga-accent-mid:  rgba(var(--ttga-accent-rgb), 0.25);

	/* Surfaces */
	--ttga-surface:       rgba(255, 255, 255, 0.72);
	--ttga-surface-hover: rgba(255, 255, 255, 0.92);
	--ttga-surface-solid: #ffffff;

	/* Borders */
	--ttga-border:      rgba(255, 255, 255, 0.55);
	--ttga-border-hard: rgba(15, 23, 42, 0.10);

	/* Text */
	--ttga-title: #0f172a;
	--ttga-body:  #334155;
	--ttga-muted: #64748b;
	--ttga-on-accent: #ffffff;

	/* Shadows */
	--ttga-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
	--ttga-shadow-md: 0 8px 28px rgba(15, 23, 42, 0.08);
	--ttga-shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.14);

	/* Glass */
	--ttga-blur: blur(18px) saturate(180%);

	/* Radii */
	--ttga-radius-sm: 10px;
	--ttga-radius-md: 16px;
	--ttga-radius-lg: 24px;

	/* Typography */
	--ttga-font-body:    "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--ttga-font-display: "DM Serif Display", Georgia, "Times New Roman", serif;

	--ttga-fs-title: clamp(17px, 1.3vw + 0.6rem, 22px);
	--ttga-fs-body:  clamp(13.5px, 0.35vw + 0.7rem, 15px);
	--ttga-fs-small: clamp(11px, 0.2vw + 0.6rem, 12.5px);

	/* Motion */
	--ttga-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	--ttga-spring:     all 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);

	/* Sizing (populated inline by Renderer::build_wrapper_inline_vars) */
	--ttga-cols-desk: 3;
	--ttga-cols-tab:  2;
	--ttga-cols-mob:  1;
	--ttga-img-h: 220px;
	--ttga-gap: 26px;

	/* Per-card glow (overridden by inline style from Color_Extractor) */
	--ttga-card-glow: var(--ttga-accent);

	font-family: var(--ttga-font-body);
	font-size: var(--ttga-fs-body);
	color: var(--ttga-body);
	width: 100%;
	box-sizing: border-box;
}

/* =========================================================================
   2. DARK MODE
   ========================================================================= */
.ttga-wrap.ttga-dark {
	--ttga-surface:       rgba(30, 41, 59, 0.82);
	--ttga-surface-hover: rgba(30, 41, 59, 0.98);
	--ttga-surface-solid: #1e293b;

	--ttga-border:      rgba(255, 255, 255, 0.14);
	--ttga-border-hard: rgba(255, 255, 255, 0.22);

	--ttga-title: #f8fafc;
	--ttga-body:  #cbd5e1;
	--ttga-muted: #94a3b8;

	--ttga-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45);
	--ttga-shadow-md: 0 8px 28px rgba(0, 0, 0, 0.55);
	--ttga-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.70);
}

/* =========================================================================
   3. ACCESSIBILITY — reduced motion + high contrast
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
	.ttga-wrap *,
	.ttga-wrap *::before,
	.ttga-wrap *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

@media (prefers-contrast: more) {
	.ttga-wrap {
		--ttga-border:      rgba(0, 0, 0, 0.7);
		--ttga-border-hard: rgba(0, 0, 0, 0.9);
	}
	.ttga-wrap.ttga-dark {
		--ttga-border:      rgba(255, 255, 255, 0.8);
		--ttga-border-hard: rgba(255, 255, 255, 1);
	}
}

/* Ensure focus states are always visible */
.ttga-wrap :focus-visible {
	outline: 2px solid var(--ttga-accent) !important;
	outline-offset: 2px !important;
	border-radius: 4px;
}

/* Screen-reader-only text */
.ttga-wrap .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* =========================================================================
   4. BASE & WRAPPER
   ========================================================================= */
.ttga-wrap *,
.ttga-wrap *::before,
.ttga-wrap *::after {
	box-sizing: border-box;
}
.ttga-wrap img { max-width: 100%; display: block; }
.ttga-wrap ul, .ttga-wrap ol { list-style: none; margin: 0; padding: 0; }
.ttga-wrap a { text-decoration: none; color: inherit; }
.ttga-wrap button { font-family: inherit; cursor: pointer; }

/* Shared glass-surface utility */
.ttga-wrap .ttga-topbar,
.ttga-wrap .ttga-sidebar-inner,
.ttga-wrap .ttga-card,
.ttga-wrap .ttga-empty,
.ttga-wrap .ttga-pagination {
	background: var(--ttga-surface);
	-webkit-backdrop-filter: var(--ttga-blur);
	backdrop-filter: var(--ttga-blur);
	border: 1px solid var(--ttga-border);
	border-radius: var(--ttga-radius-md);
	box-shadow: var(--ttga-shadow-md);
}

/* Solid card variant */
.ttga-wrap.ttga-card-style-solid .ttga-card {
	background: var(--ttga-surface-solid);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.ttga-wrap.ttga-card-style-outline .ttga-card {
	background: transparent;
	box-shadow: none;
	border: 1px solid var(--ttga-border-hard);
}

/* =========================================================================
   5. TOP BAR
   ========================================================================= */
.ttga-wrap .ttga-topbar {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	padding: 12px 18px;
	margin-bottom: 24px;
	border-radius: var(--ttga-radius-lg);
	box-shadow: var(--ttga-shadow-sm);
}

.ttga-wrap .ttga-type-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--ttga-accent-mid);
	background: var(--ttga-accent-lite);
	color: var(--ttga-accent);
	font-size: var(--ttga-fs-small);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}
.ttga-wrap.ttga-dark .ttga-type-pill {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	border-color: var(--ttga-accent);
}

/* Filter bar */
.ttga-wrap .ttga-filter-bar {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	flex: 1 1 auto;
	min-width: 0;
}
.ttga-wrap .ttga-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: transparent;
	border: 1px solid var(--ttga-border-hard);
	color: var(--ttga-body);
	padding: 5px 13px;
	border-radius: 999px;
	font-size: var(--ttga-fs-small);
	font-weight: 500;
	transition: var(--ttga-transition);
	white-space: nowrap;
}
.ttga-wrap .ttga-filter-btn:hover,
.ttga-wrap .ttga-filter-btn.is-active {
	background: var(--ttga-accent);
	border-color: var(--ttga-accent);
	color: var(--ttga-on-accent);
}
.ttga-wrap .ttga-filter-count {
	font-size: 10px;
	opacity: 0.8;
}

/* Sort select */
.ttga-wrap .ttga-sort-select {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 1px solid var(--ttga-border-hard);
	border-radius: var(--ttga-radius-sm);
	color: var(--ttga-body);
	font-family: inherit;
	font-size: var(--ttga-fs-small);
	padding: 6px 28px 6px 12px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'><path fill='%2364748b' d='M7 10l5 5 5-5z'/></svg>");
	background-repeat: no-repeat;
	background-position: right 8px center;
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-sort-select:focus { border-color: var(--ttga-accent); outline: none; }
.ttga-wrap.ttga-dark .ttga-sort-select { color: var(--ttga-title); }
.ttga-wrap.ttga-dark .ttga-sort-select option { background: #1e293b; color: #f8fafc; }

/* View toggle (grid ↔ list) */
.ttga-wrap .ttga-layout-toggle {
	display: flex;
	gap: 4px;
	background: var(--ttga-accent-lite);
	border: 1px solid var(--ttga-border-hard);
	border-radius: var(--ttga-radius-sm);
	padding: 3px;
}
.ttga-wrap .ttga-view-btn {
	background: transparent;
	border: none;
	color: var(--ttga-muted);
	width: 30px;
	height: 30px;
	border-radius: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-view-btn.is-active,
.ttga-wrap .ttga-view-btn:hover {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
}

/* Dark-mode toggle */
.ttga-wrap .ttga-theme-toggle {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--ttga-surface);
	border: 1px solid var(--ttga-border-hard);
	border-radius: 999px;
	padding: 5px 12px;
	box-shadow: var(--ttga-shadow-sm);
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-theme-toggle:hover { box-shadow: var(--ttga-shadow-md); }
.ttga-wrap .ttga-theme-sun,
.ttga-wrap .ttga-theme-moon { font-size: 12px; color: var(--ttga-muted); }
.ttga-wrap .ttga-theme-sun { color: #f59e0b; }
.ttga-wrap.ttga-dark .ttga-theme-sun  { opacity: 0.35; }
.ttga-wrap.ttga-dark .ttga-theme-moon { color: var(--ttga-accent); }
.ttga-wrap .ttga-theme-track {
	width: 38px;
	height: 20px;
	background: rgba(100, 116, 139, 0.25);
	border-radius: 999px;
	position: relative;
	transition: var(--ttga-transition);
}
.ttga-wrap.ttga-dark .ttga-theme-track { background: var(--ttga-accent-mid); }
.ttga-wrap .ttga-theme-dot {
	width: 14px;
	height: 14px;
	background: #fff;
	border-radius: 50%;
	position: absolute;
	top: 3px;
	left: 3px;
	transition: var(--ttga-spring);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.ttga-wrap.ttga-dark .ttga-theme-dot { left: 21px; background: var(--ttga-accent); }

/* =========================================================================
   6. BODY LAYOUT
   ========================================================================= */
.ttga-wrap .ttga-body {
	display: flex;
	align-items: flex-start;
	gap: 32px;
}
.ttga-wrap.ttga-no-sidebar .ttga-body { display: block; }
.ttga-wrap .ttga-main { flex: 1 1 auto; min-width: 0; }

/* =========================================================================
   7. SIDEBAR
   ========================================================================= */
.ttga-wrap .ttga-sidebar {
	flex: 0 0 300px;
	position: sticky;
	top: 80px;
	max-height: calc(100vh - 100px);
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--ttga-border-hard) transparent;
}
.ttga-wrap .ttga-sidebar::-webkit-scrollbar { width: 4px; }
.ttga-wrap .ttga-sidebar::-webkit-scrollbar-thumb { background: var(--ttga-border-hard); border-radius: 10px; }

.ttga-wrap .ttga-sidebar-inner {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 26px;
}

.ttga-wrap .ttga-widget-title {
	font-family: var(--ttga-font-display);
	font-style: italic;
	font-size: 17px;
	color: var(--ttga-title);
	margin: 0 0 14px;
}
.ttga-wrap.ttga-dark .ttga-widget-title { color: #f8fafc; }

/* Search */
.ttga-wrap .ttga-search-form { position: relative; display: flex; }
.ttga-wrap .ttga-search-input {
	width: 100%;
	padding: 10px 44px 10px 14px;
	background: rgba(0, 0, 0, 0.03);
	border: 1px solid var(--ttga-border-hard);
	border-radius: var(--ttga-radius-sm);
	color: var(--ttga-title);
	font-family: inherit;
	font-size: 14px;
	transition: var(--ttga-transition);
}
.ttga-wrap.ttga-dark .ttga-search-input { background: rgba(255, 255, 255, 0.05); color: #f8fafc; }
.ttga-wrap .ttga-search-input:focus {
	outline: none;
	border-color: var(--ttga-accent);
	box-shadow: 0 0 0 3px var(--ttga-accent-lite);
}
.ttga-wrap .ttga-search-btn {
	position: absolute;
	right: 0; top: 0; bottom: 0;
	width: 40px;
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	border: none;
	border-radius: 0 var(--ttga-radius-sm) var(--ttga-radius-sm) 0;
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-search-btn:hover { filter: brightness(1.1); }

/* Term list */
.ttga-wrap .ttga-term-list { display: flex; flex-direction: column; gap: 3px; }
.ttga-wrap .ttga-term-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 13px;
	border-radius: var(--ttga-radius-sm);
	color: var(--ttga-body);
	font-size: 14px;
	font-weight: 500;
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-term-link:hover {
	background: var(--ttga-accent-lite);
	color: var(--ttga-accent);
	transform: translateX(4px);
}
.ttga-wrap .ttga-term-count {
	font-size: 11px;
	font-weight: 700;
	background: var(--ttga-border-hard);
	color: var(--ttga-muted);
	padding: 2px 8px;
	border-radius: 999px;
}
.ttga-wrap .ttga-term-link:hover .ttga-term-count {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
}

/* Navigation widget — shown in child-page mode (post_type=page + parent_id) */
.ttga-wrap .ttga-nav-list { gap: 2px; }
.ttga-wrap .ttga-nav-overview .ttga-overview-link {
	font-weight: 600;
	color: var(--ttga-title);
	background: var(--ttga-accent-lite);
	margin-bottom: 6px;
}
.ttga-wrap .ttga-nav-overview .ttga-overview-link:hover {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	transform: none;
}
.ttga-wrap .ttga-nav-icon {
	display: inline-block;
	margin-right: 6px;
	color: var(--ttga-accent);
	font-size: 10px;
	opacity: 0.8;
	vertical-align: 1px;
}
.ttga-wrap .ttga-nav-overview .ttga-overview-link:hover .ttga-nav-icon {
	color: var(--ttga-on-accent);
	opacity: 1;
}
.ttga-wrap .ttga-nav-depth-1 .ttga-nav-link { padding-left: 28px; }
.ttga-wrap .ttga-nav-depth-2 .ttga-nav-link { padding-left: 42px; }
.ttga-wrap .ttga-nav-depth-3 .ttga-nav-link { padding-left: 56px; }
.ttga-wrap .ttga-nav-depth-4 .ttga-nav-link { padding-left: 70px; font-size: 13px; }
.ttga-wrap .ttga-nav-depth-5 .ttga-nav-link { padding-left: 84px; font-size: 13px; }

/* Active / current-page highlight on any nav or term link */
.ttga-wrap .ttga-term-link.is-current,
.ttga-wrap .ttga-nav-link.is-current,
.ttga-wrap .ttga-overview-link.is-current {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(var(--ttga-accent-rgb, 30, 58, 138), 0.25);
	transform: none;
}
.ttga-wrap .ttga-term-link.is-current:hover,
.ttga-wrap .ttga-nav-link.is-current:hover,
.ttga-wrap .ttga-overview-link.is-current:hover {
	filter: brightness(1.08);
	transform: none;
}
.ttga-wrap .ttga-nav-link.is-current::before {
	content: "▸";
	margin-right: 6px;
	font-size: 10px;
	vertical-align: 1px;
	opacity: 0.85;
}

/* Empty-state inside nav (no sub-pages yet) */
.ttga-wrap .ttga-nav-empty-msg {
	color: var(--ttga-muted);
	font-size: 13px;
	font-style: italic;
	padding: 8px 13px;
	cursor: default;
}
.ttga-wrap .ttga-nav-empty-msg:hover {
	background: transparent;
	color: var(--ttga-muted);
	transform: none;
}

/* Popular list */
.ttga-wrap .ttga-popular-list { display: flex; flex-direction: column; gap: 12px; }
.ttga-wrap .ttga-popular-link { display: flex; gap: 12px; align-items: center; color: var(--ttga-body); }
.ttga-wrap .ttga-popular-link:hover { color: var(--ttga-accent); }
.ttga-wrap .ttga-popular-thumb {
	width: 52px; height: 52px;
	border-radius: 8px;
	overflow: hidden;
	flex: 0 0 52px;
}
.ttga-wrap .ttga-popular-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ttga-wrap .ttga-popular-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ttga-wrap .ttga-popular-title {
	font-size: 13px; font-weight: 600; color: var(--ttga-title); line-height: 1.35;
	overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
	-webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.ttga-wrap .ttga-popular-date { font-size: 11px; color: var(--ttga-muted); }

/* Tag cloud */
.ttga-wrap .ttga-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.ttga-wrap .ttga-tag-chip {
	font-size: 12px;
	font-weight: 600;
	color: var(--ttga-body);
	background: var(--ttga-accent-lite);
	border: 1px solid var(--ttga-border-hard);
	padding: 4px 11px;
	border-radius: 999px;
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-tag-chip:hover {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	border-color: var(--ttga-accent);
}

/* =========================================================================
   8. RESULTS BAR
   ========================================================================= */
.ttga-wrap .ttga-results-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 10px;
}
.ttga-wrap .ttga-results-count {
	font-size: 13px;
	color: var(--ttga-muted);
	margin: 0;
}
.ttga-wrap .ttga-breadcrumb {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--ttga-muted);
	font-weight: 500;
}

/* Widget-mode adjustments: when topbar and/or results-bar are hidden, strip
   the padding the wrap would normally use to keep chrome breathing room.
   Lets the archive drop cleanly into a card / sidebar / hero section without
   visible empty-space above the first row of cards. */
.ttga-wrap.ttga-no-topbar { padding-top: 0; }
.ttga-wrap.ttga-no-results-bar .ttga-main > :first-child { margin-top: 0; }
.ttga-wrap.ttga-widget-mode {
	padding-top: 0;
	padding-bottom: 0;
}
.ttga-wrap.ttga-widget-mode .ttga-body {
	margin-top: 0;
}
.ttga-wrap.ttga-widget-mode .ttga-main > :first-child {
	margin-top: 0;
}

/* =========================================================================
   9. GRID LAYOUT
   ========================================================================= */
.ttga-wrap .ttga-grid {
	display: grid;
	grid-template-columns: repeat(var(--ttga-cols-desk), minmax(0, 1fr));
	gap: var(--ttga-gap);
}

/* List-view variant of the grid */
.ttga-wrap .ttga-view-list,
.ttga-wrap .ttga-grid.ttga-list-active {
	grid-template-columns: 1fr;
	gap: 16px;
}
.ttga-wrap .ttga-view-list .ttga-card,
.ttga-wrap .ttga-grid.ttga-list-active .ttga-card {
	flex-direction: row;
}
.ttga-wrap .ttga-view-list .ttga-card-thumb,
.ttga-wrap .ttga-grid.ttga-list-active .ttga-card-thumb {
	width: 260px;
	flex: 0 0 260px;
	height: auto;
	min-height: 180px;
	border-radius: var(--ttga-radius-md) 0 0 var(--ttga-radius-md);
}

/* =========================================================================
   10. CAROUSEL LAYOUT — Elementor-overflow-safe arrows
   ========================================================================= */
.ttga-wrap .ttga-swiper {
	width: 100%;
	/* overflow:visible is required so active-slide shadows aren't cropped by
	   Elementor wrappers (bugfix #4). On desktop that's harmless. On touch
	   devices, however, Swiper's gesture detection relies on the container
	   being the touch target — see touchEventsTarget:'container' in the JS.
	   We also need to tell the browser we want to capture horizontal gestures
	   while still allowing vertical page-scroll: touch-action:pan-y. */
	overflow: visible;
	padding: 4px 2px 20px;
	touch-action: pan-y;
	/* Hint to the compositor — carousels animate transforms, not layout. */
	will-change: transform;
	/* CRITICAL (v2.4): give .ttga-swiper an explicit min-height so the browser
	   can resolve its dimensions without waiting on Swiper's JS to measure.
	   This prevents a race condition that manifested only when the wrap has
	   a sidebar: on mobile breakpoints the body flips to `flex-direction:
	   column`, which caused `.ttga-main` (and its descendant swiper) to be
	   measured BEFORE Swiper had initialized, collapsing slide heights and
	   leaving the thumb container painted but the <img> inside invisible.
	   We base this on the image height CSS var plus a generous allowance for
	   the card body — the actual rendered height will exceed it and everything
	   settles correctly once Swiper measures on init. */
	min-height: calc(var(--ttga-img-h, 220px) + 180px);
}
.ttga-wrap .ttga-swiper .swiper-wrapper {
	align-items: stretch;
	/* Same touch-action on the wrapper is belt-and-braces — some Android
	   builds read touch-action from the nearest ancestor that has it set. */
	touch-action: pan-y;
	/* Match parent min-height so wrapper doesn't collapse during the same
	   race described above. */
	min-height: calc(var(--ttga-img-h, 220px) + 180px);
}
.ttga-wrap .ttga-swiper .swiper-slide {
	/* height:auto + align-items:stretch on the wrapper makes all slides
	   match the tallest card. display:flex on the slide itself lets the
	   inner .ttga-card fill the slide regardless of its own height. */
	height: auto;
	display: flex;
	/* CRITICAL for mobile: don't let the slide collapse to 0 width during
	   Swiper's init calculation. Swiper sets inline width in px, but on
	   some Android browsers the flex layout can resolve to zero BEFORE
	   Swiper paints, producing blank slides. width:100% is a belt. */
	width: 100%;
	min-width: 0;
	-webkit-tap-highlight-color: transparent;
}
.ttga-wrap .ttga-swiper .swiper-slide > .ttga-card {
	width: 100%;
	/* Force the card to be at least the slide's height so the thumb
	   doesn't get squeezed to zero when the archive has fewer items
	   than slidesPerView expects. */
	min-height: 100%;
	pointer-events: auto;
}
/* CRITICAL: inside a Swiper slide, the ttga-card-thumb was getting a
   computed height of 0 on some mobile browsers because the slide is
   `display: flex; align-items: stretch`, so its children try to fill
   but the thumb's `height: var(--ttga-img-h)` wasn't winning against
   the flex shrink. Lock the height as a min-height floor and let the
   image's own height:100% + object-fit:cover handle the rest. */
.ttga-wrap .ttga-swiper .swiper-slide .ttga-card-thumb {
	min-height: var(--ttga-img-h);
	flex-shrink: 0;
}
.ttga-wrap .ttga-swiper .swiper-slide .ttga-card-thumb img {
	width: 100%;
	height: 100%;
	min-height: var(--ttga-img-h);
	object-fit: cover;
	/* Render even when slide is briefly off-screen — prevents the blank
	   slide you saw in mobile when swiping to the next card. */
	opacity: 1;
}

/* Custom navigation — escape Elementor overflow:hidden constraints */
.ttga-wrap .ttga-swiper-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
	position: relative;
	z-index: 10; /* stack above Elementor overlays */
}
.ttga-wrap .ttga-swiper-prev,
.ttga-wrap .ttga-swiper-next {
	width: 44px;
	height: 44px;
	background: var(--ttga-surface);
	-webkit-backdrop-filter: var(--ttga-blur);
	backdrop-filter: var(--ttga-blur);
	border: 1px solid var(--ttga-border-hard);
	border-radius: 50%;
	color: var(--ttga-accent);
	font-size: 20px;
	font-weight: 700;
	box-shadow: var(--ttga-shadow-sm);
	transition: var(--ttga-transition);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* Minimum 44×44px hit target (WCAG 2.5.5 Target Size AAA). */
	min-width: 44px;
	min-height: 44px;
	/* Remove iOS default tap flash + Android long-press magnifier. */
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}
.ttga-wrap .ttga-swiper-prev:hover,
.ttga-wrap .ttga-swiper-next:hover {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	box-shadow: var(--ttga-shadow-md);
}
/* On touch devices, :hover "sticks" after a tap, making the button look
   permanently active. Scope hover effects to devices that actually hover. */
@media (hover: none) {
	.ttga-wrap .ttga-swiper-prev:hover,
	.ttga-wrap .ttga-swiper-next:hover {
		background: var(--ttga-surface);
		color: var(--ttga-accent);
		box-shadow: var(--ttga-shadow-sm);
	}
	.ttga-wrap .ttga-swiper-prev:active,
	.ttga-wrap .ttga-swiper-next:active {
		background: var(--ttga-accent);
		color: var(--ttga-on-accent);
		transform: scale(0.96);
	}
}
.ttga-wrap .ttga-swiper-prev.swiper-button-disabled,
.ttga-wrap .ttga-swiper-next.swiper-button-disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

.ttga-wrap .ttga-swiper-dots {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	/* Pagination bullets are ≥44×44px tappable via padding, without growing
	   the visible bullet. This helps thumbs land on them. */
	padding: 10px 4px;
}
.ttga-wrap .ttga-swiper-dots .swiper-pagination-bullet {
	width: 9px;
	height: 9px;
	background: var(--ttga-muted);
	opacity: 0.4;
	border-radius: 999px;
	transition: var(--ttga-transition);
	margin: 0;
	/* Expand touch target without visual change. */
	position: relative;
}
.ttga-wrap .ttga-swiper-dots .swiper-pagination-bullet::before {
	content: "";
	position: absolute;
	inset: -12px;
	border-radius: 999px;
}
.ttga-wrap .ttga-swiper-dots .swiper-pagination-bullet-active {
	background: var(--ttga-accent);
	opacity: 1;
	width: 22px;
}

/* =========================================================================
   11. MASONRY LAYOUT — pure CSS column-count
   ========================================================================= */
.ttga-wrap .ttga-masonry {
	column-count: var(--ttga-cols-desk);
	column-gap: var(--ttga-gap);
}
.ttga-wrap .ttga-masonry-item {
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	margin-bottom: var(--ttga-gap);
	display: block;
}

/* =========================================================================
   12. TIMELINE LAYOUT
   ========================================================================= */
.ttga-wrap .ttga-timeline {
	position: relative;
	padding-left: 40px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.ttga-wrap .ttga-timeline::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 14px;
	width: 2px;
	background: linear-gradient(180deg, var(--ttga-accent-mid), var(--ttga-accent-lite));
}
.ttga-wrap .ttga-timeline-item {
	position: relative;
	padding-left: 20px;
}
.ttga-wrap .ttga-timeline-marker {
	position: absolute;
	left: -32px;
	top: 10px;
	width: 14px;
	height: 14px;
	background: var(--ttga-accent);
	border: 3px solid var(--ttga-surface-solid);
	border-radius: 50%;
	box-shadow: 0 0 0 3px var(--ttga-accent-lite);
}
.ttga-wrap .ttga-timeline-date {
	font-size: 12px;
	font-weight: 700;
	color: var(--ttga-accent);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 8px;
}

/* =========================================================================
   13. LIST LAYOUT — handled in §9 via .ttga-view-list shared class
   ========================================================================= */

/* =========================================================================
   14. MAGAZINE LAYOUT
   ========================================================================= */
.ttga-wrap .ttga-magazine {
	display: grid;
	gap: var(--ttga-gap);
	grid-template-columns: 1fr;
}
.ttga-wrap .ttga-magazine-hero .ttga-card {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	min-height: 360px;
}
.ttga-wrap .ttga-magazine-hero .ttga-card-thumb {
	height: 100%;
	min-height: 360px;
	border-radius: var(--ttga-radius-md) 0 0 var(--ttga-radius-md);
}
.ttga-wrap .ttga-magazine-hero .ttga-card-title { font-size: clamp(22px, 2vw, 30px); }
.ttga-wrap .ttga-magazine-grid {
	display: grid;
	grid-template-columns: repeat(var(--ttga-cols-desk), minmax(0, 1fr));
	gap: var(--ttga-gap);
}

/* =========================================================================
   15. MAP LAYOUT
   ========================================================================= */
.ttga-wrap .ttga-map-container {
	position: relative;
	border-radius: var(--ttga-radius-md);
	overflow: hidden;
	box-shadow: var(--ttga-shadow-md);
}
.ttga-wrap .ttga-map-canvas {
	width: 100%;
	height: 500px;
	background: var(--ttga-accent-lite);
}

/* =========================================================================
   16. CARD — shared across grid/carousel/masonry/timeline/magazine
   ========================================================================= */
.ttga-wrap .ttga-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
	transition: var(--ttga-transition);
	height: 100%;
	scroll-margin-top: 100px; /* for in-page anchor targets */
}
.ttga-wrap .ttga-card:hover {
	transform: translateY(-5px);
	border-color: var(--ttga-accent-mid);
	box-shadow:
		var(--ttga-shadow-lg),
		0 10px 40px -10px color-mix(in srgb, var(--ttga-card-glow) 45%, transparent);
}
/* Fallback for older browsers that don't support color-mix */
@supports not (background: color-mix(in srgb, red, blue)) {
	.ttga-wrap .ttga-card:hover {
		box-shadow: var(--ttga-shadow-lg);
	}
}

/* Thumb */
.ttga-wrap .ttga-card-thumb {
	position: relative;
	overflow: hidden;
	height: var(--ttga-img-h);
	border-radius: var(--ttga-radius-md) var(--ttga-radius-md) 0 0;
}
.ttga-wrap .ttga-card-thumb a { display: block; height: 100%; }
.ttga-wrap .ttga-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.ttga-wrap .ttga-card:hover .ttga-card-thumb img { transform: scale(1.06); }

.ttga-wrap .ttga-thumb-fallback {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(135deg, var(--ttga-accent-lite), var(--ttga-accent-mid));
	color: var(--ttga-accent);
	font-size: 42px;
	opacity: 0.6;
}

/* Badges */
.ttga-wrap .ttga-badge {
	position: absolute;
	z-index: 2;
	padding: 4px 11px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.ttga-wrap .ttga-badge-sale,
.ttga-wrap .ttga-badge-oos,
.ttga-wrap .ttga-badge-readtime,
.ttga-wrap .ttga-badge-category {
	top: 12px;
	left: 12px;
}
.ttga-wrap .ttga-badge-sale    { background: #ef4444; color: #fff; }
.ttga-wrap .ttga-badge-oos     { background: #64748b; color: #fff; top: 12px; right: 12px; left: auto; }
.ttga-wrap .ttga-badge-readtime { background: rgba(0, 0, 0, 0.5); color: #fff; bottom: 12px; right: 12px; top: auto; left: auto; }
.ttga-wrap .ttga-badge-category { background: var(--ttga-accent); color: var(--ttga-on-accent); }

/* Event date stamp */
.ttga-wrap .ttga-badge-event {
	top: 12px; left: 12px;
	background: var(--ttga-surface-solid);
	color: var(--ttga-title);
	padding: 6px 12px;
	border-radius: var(--ttga-radius-sm);
	display: flex;
	flex-direction: column;
	align-items: center;
	line-height: 1;
	box-shadow: var(--ttga-shadow-sm);
	min-width: 46px;
	text-transform: none;
	letter-spacing: 0;
}
.ttga-wrap .ttga-event-day  { font-size: 22px; font-weight: 800; color: var(--ttga-accent); }
.ttga-wrap .ttga-event-mon  { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--ttga-muted); letter-spacing: 0.08em; margin-top: 2px; }

/* Card body */
.ttga-wrap .ttga-card-body {
	padding: 22px 22px 18px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.ttga-wrap .ttga-card-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ttga-accent);
	margin-bottom: 10px;
}
.ttga-wrap .ttga-card-eyebrow.ttga-price {
	text-transform: none;
	letter-spacing: 0;
	font-size: 15px;
	color: var(--ttga-title);
}
.ttga-wrap .ttga-card-title {
	font-family: var(--ttga-font-display);
	font-style: italic;
	font-size: var(--ttga-fs-title);
	line-height: 1.3;
	color: var(--ttga-title);
	margin: 0 0 10px;
	font-weight: 400;
}
.ttga-wrap .ttga-card-title a { color: inherit; transition: color 0.2s ease; }
.ttga-wrap .ttga-card-title a:hover { color: var(--ttga-accent); }
.ttga-wrap.ttga-dark .ttga-card-title a:hover { color: #60a5fa; }

.ttga-wrap .ttga-card-excerpt {
	font-size: 14px;
	line-height: 1.65;
	color: var(--ttga-body);
	margin: 0 0 18px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Footer */
.ttga-wrap .ttga-card-footer {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--ttga-border-hard);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.ttga-wrap .ttga-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.ttga-wrap .ttga-meta-author,
.ttga-wrap .ttga-meta-date,
.ttga-wrap .ttga-meta-views {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 500;
	color: var(--ttga-muted);
}
.ttga-wrap .ttga-meta-author { color: var(--ttga-body); font-weight: 600; }
.ttga-wrap .ttga-meta-author:hover { color: var(--ttga-accent); }
.ttga-wrap .ttga-avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

.ttga-wrap .ttga-read-more {
	width: 34px; height: 34px;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--ttga-accent-lite);
	color: var(--ttga-accent);
	font-size: 14px;
	transition: var(--ttga-spring);
}
.ttga-wrap .ttga-card:hover .ttga-read-more {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	transform: rotate(-45deg);
}

/* Hero card (magazine) */
.ttga-wrap .ttga-card-hero .ttga-card-body { padding: 40px; }

/* Optional tilt */
.ttga-wrap .ttga-card[data-ttga-tilt="1"] {
	transform-style: preserve-3d;
	will-change: transform;
}

/* =========================================================================
   17. SKELETON LOADER
   ========================================================================= */
.ttga-wrap .ttga-skeleton {
	display: grid;
	grid-template-columns: repeat(var(--ttga-cols-desk), minmax(0, 1fr));
	gap: var(--ttga-gap);
	margin-bottom: 20px;
}
.ttga-wrap .ttga-skeleton[hidden] { display: none; }
.ttga-wrap .ttga-skel-card {
	background: var(--ttga-surface);
	border: 1px solid var(--ttga-border);
	border-radius: var(--ttga-radius-md);
	overflow: hidden;
	-webkit-backdrop-filter: var(--ttga-blur);
	backdrop-filter: var(--ttga-blur);
}
.ttga-wrap .ttga-skel-thumb {
	height: var(--ttga-img-h);
	background: linear-gradient(90deg,
		var(--ttga-accent-lite) 0%,
		rgba(var(--ttga-accent-rgb), 0.15) 50%,
		var(--ttga-accent-lite) 100%);
	background-size: 200% 100%;
	animation: ttgaSkeletonPulse 1.6s ease-in-out infinite;
}
.ttga-wrap .ttga-skel-lines { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.ttga-wrap .ttga-skel-line {
	height: 12px;
	border-radius: 6px;
	background: linear-gradient(90deg,
		var(--ttga-accent-lite) 0%,
		rgba(var(--ttga-accent-rgb), 0.15) 50%,
		var(--ttga-accent-lite) 100%);
	background-size: 200% 100%;
	animation: ttgaSkeletonPulse 1.6s ease-in-out infinite;
}
.ttga-wrap .ttga-skel-line-lg { height: 18px; width: 85%; }
.ttga-wrap .ttga-skel-line-sm { width: 55%; }

@keyframes ttgaSkeletonPulse {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* When the outer wrap is in AJAX state, fade the grid & show the skeleton. */
.ttga-wrap.is-loading .ttga-grid,
.ttga-wrap.is-loading .ttga-masonry {
	opacity: 0.35;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* =========================================================================
   18. EMPTY STATE
   ========================================================================= */
.ttga-wrap .ttga-empty {
	padding: 56px 32px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}
.ttga-wrap .ttga-empty-icon {
	font-size: 48px;
	color: var(--ttga-muted);
	line-height: 1;
}
.ttga-wrap .ttga-empty-title {
	font-family: var(--ttga-font-display);
	font-style: italic;
	font-size: 22px;
	color: var(--ttga-title);
	margin: 0;
}
.ttga-wrap .ttga-empty-text {
	font-size: 14px;
	color: var(--ttga-muted);
	margin: 0;
}
.ttga-wrap .ttga-btn-primary {
	display: inline-block;
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	padding: 10px 22px;
	border-radius: var(--ttga-radius-sm);
	font-weight: 700;
	font-size: 14px;
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }

/* =========================================================================
   19. PAGINATION / LOAD-MORE
   ========================================================================= */
.ttga-wrap .ttga-pagination {
	margin-top: 32px;
	padding: 14px 18px;
}
.ttga-wrap .ttga-pagination .page-numbers {
	display: flex;
	gap: 6px;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
}
.ttga-wrap .ttga-pagination .page-numbers li { list-style: none; }
.ttga-wrap .ttga-pagination .page-numbers a,
.ttga-wrap .ttga-pagination .page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border-radius: var(--ttga-radius-sm);
	font-size: 14px;
	font-weight: 600;
	color: var(--ttga-title);
	border: 1px solid var(--ttga-border-hard);
	transition: var(--ttga-transition);
}
.ttga-wrap .ttga-pagination .page-numbers a:hover {
	background: var(--ttga-accent-lite);
	color: var(--ttga-accent);
	border-color: var(--ttga-accent-mid);
}
.ttga-wrap .ttga-pagination .page-numbers .current {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	border-color: var(--ttga-accent);
}
.ttga-wrap .ttga-pagination .page-numbers .dots {
	border: none;
	color: var(--ttga-muted);
}

.ttga-wrap .ttga-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}
.ttga-wrap .ttga-load-more {
	background: var(--ttga-accent);
	color: var(--ttga-on-accent);
	border: none;
	padding: 12px 32px;
	font-size: 14px;
	font-weight: 700;
	border-radius: var(--ttga-radius-sm);
	transition: var(--ttga-transition);
	box-shadow: var(--ttga-shadow-sm);
}
.ttga-wrap .ttga-load-more:hover:not(:disabled) {
	filter: brightness(1.08);
	box-shadow: var(--ttga-shadow-md);
	transform: translateY(-2px);
}
.ttga-wrap .ttga-load-more:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* =========================================================================
   20. CARD REVEAL ANIMATION (progressive disclosure on scroll)
   ========================================================================= */
.ttga-wrap .ttga-card.ttga-reveal-init {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.ttga-wrap .ttga-card.ttga-reveal-visible {
	opacity: 1;
	transform: translateY(0);
}

/* =========================================================================
   21. RTL SUPPORT
   ========================================================================= */
.ttga-wrap[dir="rtl"] .ttga-term-link:hover {
	transform: translateX(-4px);
}
.ttga-wrap[dir="rtl"] .ttga-timeline {
	padding-left: 0;
	padding-right: 40px;
}
.ttga-wrap[dir="rtl"] .ttga-timeline::before {
	left: auto;
	right: 14px;
}
.ttga-wrap[dir="rtl"] .ttga-timeline-item {
	padding-left: 0;
	padding-right: 20px;
}
.ttga-wrap[dir="rtl"] .ttga-timeline-marker {
	left: auto;
	right: -32px;
}
.ttga-wrap[dir="rtl"] .ttga-card:hover .ttga-read-more {
	transform: rotate(45deg);
}
.ttga-wrap[dir="rtl"] .ttga-view-list .ttga-card-thumb,
.ttga-wrap[dir="rtl"] .ttga-magazine-hero .ttga-card-thumb {
	border-radius: 0 var(--ttga-radius-md) var(--ttga-radius-md) 0;
}

/* Arabic / Hebrew — also apply when html lang dictates */
html[dir="rtl"] .ttga-wrap .ttga-term-link:hover { transform: translateX(-4px); }

/* =========================================================================
   22. RESPONSIVE BREAKPOINTS
   ========================================================================= */
@media (max-width: 1100px) {
	.ttga-wrap .ttga-grid,
	.ttga-wrap .ttga-magazine-grid {
		grid-template-columns: repeat(var(--ttga-cols-tab), minmax(0, 1fr));
	}
	.ttga-wrap .ttga-masonry { column-count: var(--ttga-cols-tab); }
	.ttga-wrap .ttga-skeleton { grid-template-columns: repeat(var(--ttga-cols-tab), minmax(0, 1fr)); }
	.ttga-wrap .ttga-sidebar { flex: 0 0 260px; }
	.ttga-wrap .ttga-magazine-hero .ttga-card {
		grid-template-columns: 1fr;
		min-height: auto;
	}
	.ttga-wrap .ttga-magazine-hero .ttga-card-thumb {
		border-radius: var(--ttga-radius-md) var(--ttga-radius-md) 0 0;
		min-height: 260px;
	}
}

@media (max-width: 860px) {
	.ttga-wrap .ttga-body { flex-direction: column; }
	.ttga-wrap .ttga-sidebar {
		position: static;
		width: 100%;
		max-height: none;
		overflow-y: visible;
		flex: none;
	}
	/* v2.4: When body is column-flex, .ttga-main needs an explicit width
	   declaration. Without it, the flex:1 1 auto makes .ttga-main wait for
	   flex resolution before measuring, which starves Swiper's init-time
	   dimension calculation (see the min-height block on .ttga-swiper for
	   the full explanation). */
	.ttga-wrap .ttga-main {
		width: 100%;
		flex: 1 1 100%;
	}
	.ttga-wrap .ttga-view-list .ttga-card,
	.ttga-wrap .ttga-grid.ttga-list-active .ttga-card {
		flex-direction: column;
	}
	.ttga-wrap .ttga-view-list .ttga-card-thumb,
	.ttga-wrap .ttga-grid.ttga-list-active .ttga-card-thumb {
		width: 100%;
		flex: none;
		height: var(--ttga-img-h);
		border-radius: var(--ttga-radius-md) var(--ttga-radius-md) 0 0;
	}
	.ttga-wrap .ttga-topbar { gap: 10px; }
	.ttga-wrap .ttga-filter-bar { display: none; }
	.ttga-wrap .ttga-timeline { padding-left: 30px; }
	.ttga-wrap .ttga-timeline-marker { left: -26px; }
}

@media (max-width: 600px) {
	.ttga-wrap .ttga-grid,
	.ttga-wrap .ttga-magazine-grid {
		grid-template-columns: repeat(var(--ttga-cols-mob), minmax(0, 1fr));
		gap: 16px;
	}
	.ttga-wrap .ttga-masonry { column-count: var(--ttga-cols-mob); column-gap: 16px; }
	.ttga-wrap .ttga-skeleton { grid-template-columns: repeat(var(--ttga-cols-mob), minmax(0, 1fr)); gap: 16px; }
	.ttga-wrap .ttga-card-body { padding: 18px 16px 14px; }
	.ttga-wrap .ttga-card-hero .ttga-card-body { padding: 24px; }
	.ttga-wrap .ttga-sort-wrap { display: none; }
	.ttga-wrap .ttga-map-canvas { height: 360px; }
	/* Mobile carousel sizing — tighter gap, smaller nav buttons, better dot pad. */
	.ttga-wrap .ttga-swiper { padding: 4px 0 16px; }
	.ttga-wrap .ttga-swiper-nav { gap: 12px; margin-top: 16px; }
	.ttga-wrap .ttga-swiper-prev,
	.ttga-wrap .ttga-swiper-next {
		width: 40px;
		height: 40px;
		min-width: 40px;
		min-height: 40px;
		font-size: 18px;
	}
	.ttga-wrap .ttga-card-title { font-size: clamp(18px, 4.5vw, 22px); }
}

/* Touch-device global hygiene: prevent double-tap zoom, kill hover persistence,
   remove iOS text-selection callouts on interactive chrome. Applied broadly so
   the whole UI feels native on phones, not just the carousel. */
@media (hover: none) and (pointer: coarse) {
	.ttga-wrap .ttga-card,
	.ttga-wrap .ttga-card a,
	.ttga-wrap .ttga-topbar button,
	.ttga-wrap .ttga-term-link,
	.ttga-wrap .ttga-tag-chip {
		-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
		-webkit-touch-callout: none;
	}
	/* On touch devices, cancel the hover-lift that would otherwise persist
	   between taps and look stuck. */
	.ttga-wrap .ttga-card:hover {
		transform: none;
	}
	/* Give :active a subtle press feedback so users know a tap registered. */
	.ttga-wrap .ttga-card:active {
		transform: scale(0.98);
		transition: transform 0.12s ease;
	}
}
