/*
Theme Name: Astra Child - FedLeb
Theme URI: https://fedleb.org/
Description: Child theme for the Federal Republic of Lebanon project. Adds inline video playback from post listings and mobile header adjustments.
Author: FedLeb
Template: astra
Version: 1.76.0
Text Domain: astra-child
*/

/* ---------------------------------------------------------------
   1. Header: site title / logo / mobile menu sizing
   --------------------------------------------------------------- */

/* ---------------------------------------------------------------
   STICKY HEADER — EXPERIMENTAL, Christian asked to "try it and see".
   ROLLBACK: delete just the #masthead rule immediately below (the one
   setting position:sticky) to fully revert to the original, non-sticky
   header — assets/sticky-header-reveal.js checks the header's own computed
   position before doing anything, so it automatically stops acting once
   this rule is gone; nothing else needs to change.

   Astra's own "Sticky Header" (Header Builder → Primary → Sticky) and its
   "hide on scroll down / reveal on scroll up" behavior both require the
   paid Astra Addon (gated behind ASTRA_EXT_VER + the 'sticky-header'
   extension, confirmed absent from this install) — this reimplements both
   from scratch for the free theme.

   The language switcher is part of this same #masthead element (rendered
   as its first child via functions.php's astra_masthead_top hook), so it
   sticks and hides/reveals along with the header automatically — no extra
   rule needed here. (An earlier attempt wrapped the two in a separate new
   <div> instead; that caused erratic scroll behaviour and was reverted.)

   No CSS transition here on purpose: assets/sticky-header-reveal.js sets
   the header's transform directly on every scroll frame, proportional to
   the actual scroll delta, so the header's motion is glued 1:1 to the
   scroll gesture instead of playing a fixed-duration animation that can
   feel detached from how fast the page is actually moving.
   --------------------------------------------------------------- */

#masthead {
	position: sticky;
	top: 0;
	z-index: 99;
}

/* Desktop site title: a touch larger than Astra's 26px. */
.ast-site-title-wrap .site-title,
.ast-site-title-wrap .site-title a {
	font-size: 1.9rem;
}

/* Logo: slightly larger than the 50px source image. */
.site-logo-img .custom-logo,
.ast-header-break-point .site-logo-img .custom-logo {
	width: 62px;
	height: 62px;
	max-width: 62px;
}

/* Mobile hamburger: a larger tap target and a bigger icon, with the circular
   background Astra draws behind it removed (that circle was off-centre and
   stayed on screen behind the "close" X once the menu opened). The icon now
   sits on its own, centred, in both the closed and open states. Only the
   button chrome is touched — the menu / close icon swap is left to Astra. */
.ast-header-break-point .main-header-bar .menu-toggle,
.ast-mobile-menu-buttons .menu-toggle,
.main-header-menu-toggle,
.ast-mobile-menu-trigger-minimal,
.ast-mobile-menu-trigger-fill {
	min-width: 2.6em;
	min-height: 2.6em;
	padding: 0.35em;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* The header row's own padding (Astra's dynamic CSS) already lines up with
   the Outer gutter — 20px, matching every block below it (see the "Page
   Anatomy" reference). Two separate things were keeping the icon off that
   line, both from Astra's own dynamic CSS, at higher specificity than the
   first attempt at this fix (four classes deep —
   .ast-mobile-header-wrap .ast-button-wrap .menu-toggle.main-header-menu-toggle
   — beats the two-class version that used to be here, so it never applied):
     1. This button is a flex container (Astra sets display:flex on it) but
        only centres its icon vertically (align-items:center); with no
        justify-content set, the icon sits at the flex START, and the
        min-width below (2.6em, for a decent tap target) piles its leftover
        space on the END side instead of the icon's edge landing there.
     2. The remaining end-padding, on top of that slack.
   Fixed by matching Astra's own selector (so this wins on specificity, not
   just hoping !important saves it) and pushing the icon to the flex END —
   flush against zero end-padding, which is now flush against the header's
   20px. padding/justify-content use the -inline-end / flex-end logical
   forms so this stays correct on Arabic (RTL) pages, where the toggle's
   leading/trailing sides mirror. */
.ast-mobile-header-wrap .ast-button-wrap .menu-toggle,
.ast-mobile-header-wrap .menu-toggle,
.ast-mobile-header-wrap .ast-mobile-menu-trigger-minimal,
.ast-mobile-header-wrap .ast-mobile-menu-trigger-fill {
	padding-inline-end: 0 !important;
	justify-content: flex-end !important;
}

/* The "ugly square": a dotted focus outline that Astra / the browser draws
   around the toggle and leaves on screen after a tap (it stays until the next
   click elsewhere). Drop it for pointer focus; keyboard users still get a
   clean ring via :focus-visible. Same for the submenu (chevron) toggles. */
.ast-header-break-point .main-header-bar .menu-toggle:focus,
.ast-mobile-menu-buttons .menu-toggle:focus,
.main-header-menu-toggle:focus,
.ast-mobile-menu-trigger-minimal:focus,
.ast-mobile-menu-trigger-fill:focus,
.main-navigation .ast-menu-toggle:focus,
.main-navigation .ast-menu-toggle:hover,
.main-navigation .ast-menu-toggle {
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	border-radius: 0 !important;
}

.main-header-menu-toggle:focus-visible,
.ast-mobile-menu-trigger-minimal:focus-visible {
	outline: 2px solid var(--ast-global-color-0, #046bd2) !important;
	outline-offset: 2px;
}

/* !important because Astra's own dynamic CSS sets this icon's size via
   [data-section="section-header-mobile-trigger"] .ast-button-wrap
   .mobile-menu-toggle-icon .ast-mobile-svg — four selectors deep, more
   specific than any plain class combination here, so plain specificity
   alone can't win this one. That rule (20px) is what was actually
   rendering — the 1.7em previously here never won either, so it wasn't a
   valid baseline. 50% larger than the 20px that was really showing: 30px. */
.ast-mobile-menu-buttons .menu-toggle .ast-mobile-svg,
.mobile-menu-toggle-icon .ast-mobile-svg,
.main-header-bar .menu-toggle .ast-mobile-svg {
	width: 30px !important; /* 20px + 50% */
	height: 30px !important;
}

@media (max-width: 768px) {

	.ast-site-title-wrap .site-title,
	.ast-site-title-wrap .site-title a {
		font-size: 20px;
		line-height: 1.25;
		display: block;
		white-space: normal;
	}

	.site-logo-img .custom-logo,
	.ast-header-break-point .site-logo-img .custom-logo {
		width: 56px;
		height: 56px;
		max-width: 56px;
	}

	/* Give the title all the room the header row has to give, so "The
	   Federal Republic of Lebanon" wraps to at most two lines instead of
	   being squeezed by the logo on one side and the (now bigger)
	   hamburger on the other.

	   The previous attempt at this used flexbox properties
	   (flex / min-width) on the header sections — those did nothing,
	   because Astra's header row is CSS GRID, not flex:
	   .ast-builder-grid-row{display:grid;grid-template-columns:auto auto}.
	   Both columns size to their own content ("auto"), so the title's
	   column never grows to fill leftover space — it only grows if its
	   content is forced wider, which drags the row's total width past the
	   viewport and pushes the other ("auto") column with it (exactly what
	   happened testing a fixed width directly on .site-title).

	   Fix: make the title's column the flexible one (1fr = "take whatever
	   is left") and the hamburger's column stay sized to its own content
	   (auto) so it stays anchored to the row's right edge regardless of
	   title length. Scoped to .ast-builder-grid-row-has-sides specifically
	   — the two-column ("has sides") header variant — not the base
	   .ast-builder-grid-row class, which Astra reuses for other layouts
	   (a 3-column centred logo variant, footer rows, etc.) this must not
	   touch. Desktop is untouched: this whole block is phone/tablet only,
	   same breakpoint as the font-size rule above. */
	.ast-mobile-header-wrap .ast-builder-grid-row-has-sides {
		grid-template-columns: 1fr auto !important;
		grid-column-gap: 8px !important;
	}

	/* The hamburger's own min-width (2.6em, set above for a comfortable tap
	   target) computes to ~57px here — well past what the 30px icon plus its
	   padding actually needs (~38px), because it's sized off the button's own
	   font-size, not a fixed value. That's what's now driving the size of
	   its grid column (auto = sized to content). Every pixel trimmed off the
	   hamburger's column hands straight to the title's (1fr) column, so pin
	   this to the accessibility floor for a touch target (WCAG 2.5.5,
	   44x44px) rather than the icon's own minimum — smaller would reclaim a
	   little more width but at the cost of tap accuracy. min-height (also
	   2.6em) is untouched; only width was ever the constraint here. */
	.ast-mobile-header-wrap .menu-toggle,
	.ast-mobile-header-wrap .ast-mobile-menu-trigger-minimal,
	.ast-mobile-header-wrap .ast-mobile-menu-trigger-fill {
		min-width: 44px !important;
	}

	/* With the column itself now flexible, the things inside it must
	   actually use that width instead of shrinking to their own content.
	   .ast-site-identity is inline-flex by default (sizes to content); make
	   it a full-width flex row so its child .ast-site-title-wrap has
	   something to grow into. */
	.ast-logo-title-inline .ast-site-identity {
		display: flex !important;
		width: 100% !important;
		min-width: 0 !important;
	}

	.ast-site-title-wrap {
		flex: 1 1 auto !important;
		min-width: 0 !important;
	}
}

/* Astra's hover-zoom on the thumbnail forces touchscreens to need a
   first tap just to "resolve" :hover before a second tap registers as
   a click. Disabling it on non-hover-capable (touch) devices lets a
   single tap start the video immediately. */
@media not all and (hover: hover) {

	.ast-article-post:hover .post-thumb-img-content img {
		transform: none !important;
	}
}

/* ---------------------------------------------------------------
   2. Featured images: fill their frame instead of stretching
   --------------------------------------------------------------- */

.ast-blog-featured-section img,
.post-thumb img,
.wp-post-image {
	object-fit: cover;
	width: 100%;
	height: 100%;
}

/* Video posts: the thumbnail box is forced to 16:9 (the shape of a YouTube /
   Vimeo frame) and the image is contained inside it on black — so the whole
   video frame is visible, exactly the way the player letterboxes it once
   tapped, and it is never cropped. (Non-video thumbnails keep the cover fit
   above.) */
.fedleb-has-video .post-thumb-img-content,
.fedleb-has-video .ast-blog-featured-section .post-thumb {
	aspect-ratio: 16 / 9;
	height: auto;
}

.fedleb-has-video .ast-blog-featured-section img,
.fedleb-has-video .post-thumb img,
.fedleb-has-video .wp-post-image {
	object-fit: contain;
	background: #000;
}

/* ---------------------------------------------------------------
   3. Play badge on posts that hold a video
   --------------------------------------------------------------- */

.fedleb-has-video .ast-blog-featured-section,
.fedleb-has-video .post-thumb {
	position: relative;
}

.fedleb-has-video .ast-blog-featured-section > a::after,
.fedleb-has-video .post-thumb > a::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	margin: -32px 0 0 -32px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.62);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 54% 50%;
	background-size: 28px 28px;
	transition: background-color 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.fedleb-has-video .ast-blog-featured-section > a:hover::after,
.fedleb-has-video .post-thumb > a:hover::after {
	background-color: rgba(200, 16, 16, 0.85);
	transform: scale(1.06);
}

/* ---------------------------------------------------------------
   4. Inline video playback (plays in place of the thumbnail)
   --------------------------------------------------------------- */

/* Only the innermost box (which the video actually fills) should clip
   content. Applying overflow:hidden to the outer wrapper too clips the
   inner box right back to the outer's own (narrower) width whenever the
   inner box is deliberately widened for the full-bleed layout below. */
.fedleb-has-video .post-thumb-img-content {
	overflow: hidden;
}

/* The player keeps the featured-image box exactly as it is and sits on a
   black ground; a video with a different aspect ratio is boxed by its own
   player (YouTube / Vimeo) rather than cropped by us. */
.fedleb-video-active {
	background: #000 !important;
}

.fedleb-inline-video {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.fedleb-inline-video-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 18px;
	line-height: 32px;
	cursor: pointer;
}

.fedleb-inline-video-close:hover,
.fedleb-inline-video-close:focus {
	background: rgba(200, 16, 16, 0.85);
}

/* ---------------------------------------------------------------
   5. Language switcher bar — now the first thing inside the header
      block itself (functions.php hooks it onto astra_masthead_top),
      so it sticks/hides/reveals together with #masthead automatically.
   --------------------------------------------------------------- */

.fedleb-lang-switcher {
	background: #f4f4f4;
	border-bottom: 1px solid #e0e0e0;
	/* Vertical padding halved from 6px (Christian, 2026-09-19) to make room
	   for the new header search bar (section further down) without the
	   header growing taller overall — this is the only spacer between the
	   switcher and the logo/title/hamburger row below it, so it covers
	   both "before" (top) and "after" (bottom, i.e. the gap down to the
	   logo row) in one change. */
	padding: 3px 16px;
}

.fedleb-lang-switcher ul {
	display: flex;
	/* Centred on every screen size, and always left-to-right so the order is
	   English · Français · العربية even on the RTL Arabic pages. */
	justify-content: center;
	direction: ltr;
	gap: 18px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.fedleb-lang-switcher li {
	margin: 0;
}

/* Every language is bold. The current one is plain black ("you are here");
   the other two are in the link colour. */
.fedleb-lang-switcher a {
	color: var(--ast-global-color-0, #046bd2);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.4;
	text-decoration: none;
	letter-spacing: 0.02em;
}

.fedleb-lang-switcher a:hover,
.fedleb-lang-switcher a:focus {
	color: var(--ast-global-color-1, #045cb4);
	text-decoration: underline;
}

.fedleb-lang-switcher li.fedleb-lang-current a {
	color: var(--ast-global-color-6, #111);
	border-bottom: 2px solid currentColor;
}

@media (max-width: 480px) {

	.fedleb-lang-switcher ul {
		gap: 14px;
	}
}

/* ---------------------------------------------------------------
   6. Progressive post loading (see assets/infinite-scroll.js)
   --------------------------------------------------------------- */

/* Once scroll-loading has taken over, drop Astra's numbered pager. It
   stays server-rendered as the no-JavaScript fallback; !important is
   needed because Astra sets an explicit display on it. */
body.fedleb-infinite-active .ast-pagination {
	display: none !important;
}

/* Invisible probe placed just below the list; when it scrolls into
   view the next page of posts is fetched. */
.fedleb-list-sentinel {
	width: 100%;
	height: 1px;
}

.fedleb-list-status {
	text-align: center;
}

.fedleb-list-status.is-loading {
	min-height: 48px;
	margin: 1.5em 0;
}

.fedleb-list-status.is-loading::after {
	content: "";
	display: inline-block;
	width: 28px;
	height: 28px;
	border: 3px solid var(--ast-global-color-7, #d1d5db);
	border-top-color: var(--ast-global-color-0, #046bd2);
	border-radius: 50%;
	animation: fedleb-spin 0.7s linear infinite;
}

@keyframes fedleb-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {

	.fedleb-list-status.is-loading::after {
		animation-duration: 2.4s;
	}
}

/* ---------------------------------------------------------------
   7. Listing cards, and the single-Post Title block: Categories /
      Tags rows. Match the post-meta typography and give each row
      a language-aware "Categories:" / "Tags:" label.
   --------------------------------------------------------------- */

:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links,
:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links {
	display: block;
	margin-top: 0.35em;
	font-size: 0.8125rem;
	line-height: 1.45;
	font-weight: 600;
	/* Label ("Categories:" / "Tags:") and separators in black; only the
	   term links are blue (rule below). */
	color: var(--ast-global-color-2, #1e293b);
}

:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links a,
:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links a {
	font-size: inherit;
	font-weight: inherit;
	color: var(--ast-global-color-0);
}

:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links a:visited,
:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links a:visited {
	color: var(--fedleb-visited, var(--ast-global-color-0));
}

:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links a:hover,
:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links a:focus,
:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links a:hover,
:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links a:focus {
	color: var(--ast-global-color-1);
}

:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links::before {
	content: "Categories: ";
}

:is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links::before {
	content: "Tags: ";
}

html[lang^="fr"] :is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links::before {
	content: "Catégories : ";
}

/* French: Christian's wording — "Tag", not "Étiquette". */
html[lang^="fr"] :is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links::before {
	content: "Tags : ";
}

html[lang^="ar"] :is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .cat-links::before {
	content: "التصنيفات: ";
}

html[lang^="ar"] :is(.ast-article-post, .fedleb-single-extra-meta, .fedleb-post-title-block) .tags-links::before {
	content: "الوسوم: ";
}

/* ---------------------------------------------------------------
   8. Phones: two distinct 20px gaps, both canonical, not to be
      confused with each other:
        (a) screen edge → block edge — this #content > .ast-container
            padding, the single source of that gap for every context;
        (b) block edge → its own text — each title/content block's
            OWN left/right padding (set to a flat 20px throughout
            this file, replacing several different per-block values —
            em, clamp(), a second 14px gutter — that used to disagree
            with each other and, in one pass, were wrongly zeroed to
            rely on gap (a) alone, collapsing gap (b) to nothing).
      The card's own look (background, rounding, shadow) is section
      21, the same on every screen size; here we only set the grey
      page band and the gaps.
   --------------------------------------------------------------- */

@media (max-width: 544px) {

	/* A small gutter so the cards clear the screen edge, and a 20px grey
	   band between the site header and the first card / title. */
	body.blog #content > .ast-container,
	body.home #content > .ast-container,
	body.archive #content > .ast-container,
	body.author #content > .ast-container,
	body.search #content > .ast-container,
	body.single #content > .ast-container,
	body.page #content > .ast-container {
		padding-left: 20px !important;
		padding-right: 20px !important;
		padding-top: 20px !important;
	}

	body.blog #primary,
	body.home #primary,
	body.archive #primary,
	body.author #primary,
	body.search #primary,
	body.single #primary,
	body.page #primary {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}

	/* Every title / content block gets its OWN 20px — the gap between the
	   block's edge and its text — separate from and in addition to the
	   20px gutter above (block's edge to the screen). Both are 20px, but
	   they are two different gaps, not one shared value. (Card text
	   padding lives on .ast-article-inner, the actual visible card,
	   untouched here — .ast-article-post above is just its transparent
	   grid wrapper.) */
	.fedleb-page-title-block,
	.fedleb-post-title-block,
	.ast-archive-description,
	.ast-article-single {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	/* 20px grey gap under every post / title / author box. */
	body.blog .ast-article-post,
	body.home .ast-article-post,
	body.archive .ast-article-post,
	body.search .ast-article-post,
	.ast-separate-container .ast-article-single,
	.ast-separate-container .ast-archive-description,
	.ast-separate-container .ast-author-box.ast-archive-description {
		margin-bottom: 20px !important;
	}
}

/* ---------------------------------------------------------------
   9. The Search page's extra meta under its heading (translations
      line), and the "language not available" state in the top
      switcher. (A single Post's own version of this is its Title
      block, section 25b.)
   --------------------------------------------------------------- */

.fedleb-single-extra-meta {
	margin: 0.15em 0 1.4em;
}

.fedleb-single-meta-row {
	margin: 0.4rem 0;
}

/* Post title + byline / date meta: everything reads black, only the actual
   links (author name, date archive, category / tag terms) are blue — except
   a listing *card's* own title link (rule further down), which Christian
   wants in the standard link colour instead (2026-09-19), per the site-wide
   rule in _Onboarding/03-formatting.md that every link uses the Customizer
   link colour unless it's explicitly flagged as an exception; the single
   post's own heading is that exception (it's a page heading, not primarily
   a navigation link, even though it happens to sit in an <a> here). Astra
   colours the whole .entry-meta row and .entry-title link with the accent
   by default. */
.entry-title a,
.entry-title a:visited,
.ast-article-single .entry-title a {
	color: var(--ast-global-color-2, #1e293b);
}

.entry-title a:hover,
.entry-title a:focus {
	color: var(--ast-global-color-0);
}

/* A listing card's title: the standard link colour (see comment above) —
   and the standard *visited*-link colour once the reader has actually
   opened it, same as the general a:visited rule further down; repeated
   here at matching specificity because the site-wide .entry-title rule
   above already sets an explicit colour on .entry-title a:visited, which
   would otherwise outrank a plain a:visited selector. */
.ast-article-post .entry-title a {
	color: var(--ast-global-color-0);
}

.ast-article-post .entry-title a:visited {
	color: var(--fedleb-visited, var(--ast-global-color-0));
}

.ast-article-post .entry-title a:hover,
.ast-article-post .entry-title a:focus {
	color: var(--ast-global-color-1);
}

/* Visited-link colour, site-wide (Christian, 2026-09-19 — see
   _Onboarding/03-formatting.md "Link colour"). The browser (not this site)
   decides what counts as "visited" from its own local history — see that
   doc section for the full explanation. Customizer: Appearance → Customize
   → "fedleb — Design" → "Visited link colour"
   (fedleb_design_dynamic_css() in functions.php sets --fedleb-visited when
   that field isn't empty); the var() fallback here means an empty field
   quietly falls back to the ordinary link colour instead of some
   unrequested default, i.e. no visible distinction until Christian actually
   sets one. */
a:visited {
	color: var(--fedleb-visited, var(--ast-global-color-0));
}

.entry-meta,
.entry-meta *,
.ast-blog-meta-container,
.ast-blog-meta-container * {
	color: var(--ast-global-color-2, #1e293b) !important;
}

.entry-meta a:not(.ast-button),
.entry-meta a:not(.ast-button) *,
.ast-blog-meta-container a,
.ast-blog-meta-container a * {
	color: var(--ast-global-color-0) !important;
}

.entry-meta a:not(.ast-button):visited,
.entry-meta a:not(.ast-button):visited *,
.ast-blog-meta-container a:visited,
.ast-blog-meta-container a:visited * {
	color: var(--fedleb-visited, var(--ast-global-color-0)) !important;
}

.entry-meta a:not(.ast-button):hover,
.entry-meta a:not(.ast-button):focus,
.ast-blog-meta-container a:hover,
.ast-blog-meta-container a:focus {
	color: var(--ast-global-color-1) !important;
}

/* Astra only sizes .entry-meta down to the small meta type (0.8125rem) when
   it is wrapped in a header.entry-header — true on a listing card, but the
   single-post Title block (fedleb_single_post_title_block()) prints a bare
   .entry-meta with no such wrapper, so it fell back to the default body size
   instead of matching the Categories / Tags rows right under it. */
.fedleb-post-title-meta,
.fedleb-post-title-meta * {
	font-size: 0.8125rem;
}

/* Post title block: the title (h1.page-title) has no margin rule of its own
   here, so it falls back to the browser's own (large) default heading
   margin — reset to 0 so it can't collapse-and-win against the byline's own
   margin-top below, which would otherwise swallow it completely. */
.fedleb-post-title-block h1.page-title {
	margin: 0;
}

/* The byline (.fedleb-post-title-meta) carries its own margin — 0.8rem on
   top (double .fedleb-single-meta-row's 0.4rem, for the title→byline gap)
   and 0.4rem on the bottom (matching the row's own margin-top exactly, so
   the two collapse to 0.4rem rather than the larger value winning — keeping
   byline→Categories the same as Categories→Tags). */
.fedleb-post-title-meta {
	margin-top: 0.8rem;
	margin-bottom: 0.4rem;
}

/* The "also / only available in …" line: same type as the post meta, black
   text, only the language links coloured. A thin rule above always sets it
   off from whatever comes before — the excerpt on a card, the title/meta on
   a Page/Post/Search-page Title block — regardless of which case it is. */
.fedleb-post-langs {
	display: block;
	font-size: 0.8125rem !important;
	line-height: 1.45 !important;
	color: var(--ast-global-color-2, #1e293b);
	margin-top: 0.75em;
	padding-top: 0.75em;
	border-top: 1px solid var(--ast-global-color-7, #D1D5DB);
}

.fedleb-post-langs a {
	color: var(--ast-global-color-0);
	font-weight: 600;
	text-decoration: none;
}

.fedleb-post-langs a:visited {
	color: var(--fedleb-visited, var(--ast-global-color-0));
}

.fedleb-post-langs a:hover,
.fedleb-post-langs a:focus {
	color: var(--ast-global-color-1);
	text-decoration: underline;
}

.fedleb-post-langs[dir="rtl"] {
	text-align: right;
}

/* Language in the top switcher that this post is not translated into. */
.fedleb-lang-switcher .fedleb-lang-unavailable span {
	color: #9aa2ac;
	font-size: 13px;
	letter-spacing: 0.02em;
	cursor: default;
}

/* ---------------------------------------------------------------
   10. Video cards: loading spinner + un-zoomed thumbnail while
       the video is playing.
   --------------------------------------------------------------- */

.fedleb-video-loading {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #0b0b0b;
}

.fedleb-video-loading::after {
	content: "";
	width: 40px;
	height: 40px;
	border: 3px solid rgba(255, 255, 255, 0.25);
	border-top-color: #fff;
	border-radius: 50%;
	animation: fedleb-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {

	.fedleb-video-loading::after {
		animation-duration: 2.4s;
	}
}

/* The theme's hover-zoom stays on the still thumbnail, but once the video
   is playing the image behind it must sit flat. */
.fedleb-video-active img,
.fedleb-video-active .wp-post-image {
	transform: none !important;
}

/* Hide the play badge on the card whose video is now playing. */
.post-thumb:has(.fedleb-video-active) > a::after,
.ast-blog-featured-section:has(.fedleb-video-active) > a::after {
	display: none !important;
}

/* ---------------------------------------------------------------
   11. Category / Tag / Author / Search title box: the H1 uses the
       exact same font, size, weight and colour as a post (card)
       title (.entry-title, 1.25rem / 600 / near-black), and there
       is exactly 20px of space above and below the box.
   --------------------------------------------------------------- */

.ast-archive-title,
.page-title.ast-archive-title,
.ast-archive-description .ast-archive-title,
.ast-archive-description .ast-archive-title *,
body.archive .ast-archive-description .ast-archive-title *,
body.search .ast-archive-description .page-title {
	font-size: 1.25rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: var(--ast-global-color-2, #1e293b) !important;
}

/* 20px gap above the white box (between it and the site header) and 20px
   below it (between it and the first post). Astra's own container adds top
   padding and the section a 2em bottom margin, so both are neutralised and
   set explicitly. */
@media (min-width: 545px) {

	body.archive #content > .ast-container,
	body.author #content > .ast-container,
	body.search #content > .ast-container,
	body.blog #content > .ast-container {
		padding-top: 20px !important;
	}
}

body.archive #primary,
body.author #primary,
body.search #primary,
body.blog #primary {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

.ast-separate-container .ast-archive-description,
.ast-separate-container .ast-author-box.ast-archive-description,
.site-content section.ast-archive-description {
	margin-top: 0 !important;
	margin-bottom: 20px !important;
}

/* Nomenclature: "Title block top margin" / "Title block bottom margin" — 20px
   of space inside the white box, above the Page title and below the Page title
   text (cross-language sub-line), on every screen size. Astra's own box padding
   (1.5em 1em on mobile, up to 3em on desktop) is overridden top/bottom only;
   the left/right box padding is left to Astra. The 20px grey margins around the
   box are section 8 / section 11 above. */
.ast-separate-container .ast-archive-description,
.ast-separate-container .ast-author-box.ast-archive-description,
body.search .ast-separate-container .ast-archive-description {
	padding-top: 20px !important;
	padding-bottom: 20px !important;
}

/* Search results: present the "Search Results for: …" banner exactly like a
   category / tag filter title — left-aligned (right in Arabic), same box,
   no centred breadcrumb trail cluttering it. */
body.search .ast-archive-description,
body.search .ast-archive-description * {
	text-align: left;
}

html[dir="rtl"] body.search .ast-archive-description,
html[dir="rtl"] body.search .ast-archive-description * {
	text-align: right;
}

body.search .ast-archive-description .ast-breadcrumbs-wrapper,
body.search .ast-archive-description .ast-breadcrumbs,
body.search .ast-archive-description nav.ast-breadcrumbs {
	display: none !important;
}

body.search .ast-archive-description .page-title span {
	color: var(--ast-global-color-0);
}

/* The term description, above the cross-language line, inside the white box.
   Reads as body copy; the "available in …" line then sits under it, smaller. */
.fedleb-archive-description {
	margin: 0.25em 0 0;
	line-height: 1.6;
	color: var(--ast-global-color-2, #1e293b);
}

.fedleb-archive-description p {
	margin: 0 0 0.5em;
}

.fedleb-archive-description p:last-child {
	margin-bottom: 0;
}

.fedleb-archive-description[dir="rtl"] {
	text-align: right;
}

/* Breadcrumb trail, directly above the category name inside the white title
   box. This is Astra's own native breadcrumb feature (Customizer > Layout >
   Breadcrumb), turned on 2026-09-22 and set to "Before Title"
   (astra-settings[breadcrumb-position] = astra_entry_top) which hooks it to
   astra_before_archive_title — exactly above the h1. Christian asked for
   this on category archive pages only, so it's hidden everywhere else via
   WordPress's own body class rather than left on site-wide, and its font is
   overridden to match the sub-category links / author-date byline exactly
   (0.8125rem, normal weight) instead of Astra's own default breadcrumb
   typography. */
.ast-breadcrumbs-wrapper {
	display: none !important;
}

body.category .ast-breadcrumbs-wrapper {
	display: block !important;
	margin-bottom: 0.4em;
}

body.category .ast-breadcrumbs-wrapper,
body.category .ast-breadcrumbs-wrapper * {
	font-size: 0.8125rem !important;
	font-weight: normal !important;
}

body.category .ast-breadcrumbs-wrapper a {
	color: var(--ast-global-color-0) !important;
}

body.category .ast-breadcrumbs-wrapper a:visited {
	color: var(--fedleb-visited, var(--ast-global-color-0)) !important;
}

/* Direct sub-category links, between the description and the Share button
   (functions.php: fedleb_archive_translation_notice()). Plain inline <li>s
   so they flow and wrap like a line of text — this is navigation, not a
   comma/"and"-joined sentence like .cat-links / .tags-links (section 7) or
   the cross-language line below. No bullet between them (Christian: an
   inline-block bullet with its own margin could end up stranded at the
   start of a wrapped line, reading as a stray indent) — margin-inline-end
   on each <li> is plain whitespace, so it wraps like any run of text and
   the block's own text-align (inherited, RTL-aware) handles the alignment. */
.fedleb-archive-subcats {
	margin: 0.6em 0 0;
	padding: 0;
	list-style: none;
	/* Match the author/date byline (.entry-meta / .fedleb-post-title-meta)
	   exactly: same 0.8125rem size, same normal weight. */
	font-size: 0.8125rem;
	line-height: 1.6;
	/* Opt back out of the site-wide mobile overflow-wrap:break-word rule
	   (section 29, meant for long unbreakable strings like URLs) — these
	   are short category names; letting it apply here just mid-word-breaks
	   a name like "Democracy" into "Democrac" / "y" at the wrap point. */
	overflow-wrap: normal;
}

.fedleb-archive-subcats li {
	display: inline;
	margin-inline-end: 1em;
}

.fedleb-archive-subcats a {
	color: var(--ast-global-color-0);
	font-weight: normal;
	text-decoration: none;
}

.fedleb-archive-subcats a:visited {
	color: var(--fedleb-visited, var(--ast-global-color-0));
}

.fedleb-archive-subcats a:hover,
.fedleb-archive-subcats a:focus {
	color: var(--ast-global-color-1);
	text-decoration: underline;
}

.fedleb-archive-subcats[dir="rtl"] {
	text-align: right;
}

/* Cross-language line under the archive title, inside the white box.
   Same font and size as the Categories / Tags rows on a post
   (0.8125rem), body colour with only the language links in accent. A thin
   rule above sets it off from the title / description above it, same
   treatment as .fedleb-post-langs. */
.fedleb-archive-xlang {
	display: block;
	margin-top: 0.75em;
	padding-top: 0.75em;
	border-top: 1px solid var(--ast-global-color-7, #D1D5DB);
	font-size: 0.8125rem !important;
	line-height: 1.45 !important;
	color: var(--ast-global-color-2, #1e293b);
}

.fedleb-archive-xlang a {
	color: var(--ast-global-color-0);
	font-weight: 600;
	text-decoration: none;
}

.fedleb-archive-xlang a:visited {
	color: var(--fedleb-visited, var(--ast-global-color-0));
}

.fedleb-archive-xlang a:hover,
.fedleb-archive-xlang a:focus {
	color: var(--ast-global-color-1);
	text-decoration: underline;
}

.fedleb-archive-xlang[dir="rtl"] {
	text-align: right;
}

/* ---------------------------------------------------------------
   11b. Author archive box: photo before the name, both on desktop
        (Astra puts the bio/name first, avatar second) and mobile.
   --------------------------------------------------------------- */

.ast-author-box.ast-archive-description {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.ast-author-box .ast-author-avatar {
	order: -1;
	margin: 0;
}

.ast-author-box .ast-author-avatar img.avatar {
	display: block;
	border-radius: 50%;
}

@media (min-width: 922px) {

	.ast-author-box.ast-archive-description {
		flex-direction: row;
		align-items: center;
		column-gap: 28px;
	}
}

/* ---------------------------------------------------------------
   11c. Desktop: drop the grey page background behind the white
        cards (mobile keeps its current full-bleed look).
   --------------------------------------------------------------- */

@media (min-width: 545px) {

	.ast-separate-container {
		background-color: #fff;
	}
}

/* ---------------------------------------------------------------
   12. Arabic desktop menu: align to the right edge (RTL).
   --------------------------------------------------------------- */

@media (min-width: 922px) {

	html[dir="rtl"] #mega-menu-wrap-primary .mega-menu,
	html[dir="rtl"] #mega-menu-wrap-primary #mega-menu-primary,
	html[dir="rtl"] #mega-menu-wrap-primary ul.mega-menu {
		justify-content: flex-end !important;
		text-align: right;
	}

	html[dir="rtl"] #mega-menu-wrap-primary #mega-menu-primary {
		margin-left: 0 !important;
		margin-right: auto !important;
	}
}

/* ---------------------------------------------------------------
   13. Contact form.
   --------------------------------------------------------------- */

/* Honeypot field: hidden from people, still in the DOM for bots. The old
   "left: -9999px" pushed a positioned element far outside the viewport, and on
   the RTL (Arabic) pages the browser counted that as 9999px of page width the
   reader could scroll into — the "very wide, positioned far left" bug. This is
   the clip-rect hide (same as WordPress's .screen-reader-text): no off-screen
   offset, no overflow. */
.fedleb-hp {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.fedleb-contact-form {
	max-width: 42em;
	margin: 1.5em 0;
}

.fedleb-contact-notice {
	padding: 0.9em 1.1em;
	border-radius: 12px;
	font-weight: 600;
}

.fedleb-contact-notice.is-success {
	background: #e7f6ec;
	color: #14532d;
}

.fedleb-contact-notice.is-error {
	background: #fdeaea;
	color: #7f1d1d;
}

.fedleb-contact-form .fedleb-field {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	margin: 0 0 1em;
}

.fedleb-contact-form label {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--ast-global-color-2, #1e293b);
}

.fedleb-contact-form input[type="text"],
.fedleb-contact-form input[type="email"],
.fedleb-contact-form textarea {
	width: 100%;
	padding: 0.7em 0.9em;
	border: 1px solid var(--ast-global-color-7, #d1d5db);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fedleb-contact-form input:focus,
.fedleb-contact-form textarea:focus {
	outline: none;
	border-color: var(--ast-global-color-0);
	box-shadow: 0 0 0 3px rgba(4, 107, 210, 0.15);
}

.fedleb-contact-form .fedleb-submit {
	margin-top: 0.5em;
}

.fedleb-contact-form button[type="submit"] {
	padding: 0.7em 1.6em;
	border: 0;
	border-radius: 999px;
	background: var(--ast-global-color-0);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.fedleb-contact-form button[type="submit"]:hover,
.fedleb-contact-form button[type="submit"]:focus {
	background: var(--ast-global-color-1);
}

.fedleb-contact-form button[type="submit"]:active {
	transform: scale(0.98);
}

.fedleb-contact-form[dir="rtl"] {
	text-align: right;
}

/* ---------------------------------------------------------------
   14. Visual design pass (rounded corners, soft depth, gentle
       motion) lives in its own file, assets/fedleb-design.css.
       Since iteration 10 it is always enqueued; its dials
       (accent colour, corner radius, shadow, hover lift, page
       transitions) are at Appearance → Customize → "fedleb — Design"
       and are fed in as inline custom properties by
       fedleb_design_dynamic_css() in functions.php.
   --------------------------------------------------------------- */

/* ---------------------------------------------------------------
   15. Share button (post lists + single posts). See assets/share.js.
   --------------------------------------------------------------- */

.fedleb-share {
	position: relative;
	display: flex;
}

/* Sits on its own line under the Categories / Tags row. justify-content is
   flex-start in the reading direction, so the button lands on the left in
   English / French and on the right in Arabic with no separate RTL rule. */
.fedleb-share--listing {
	margin-top: 0.75em;
	justify-content: flex-start;
}

.fedleb-share--single {
	margin-top: 1em;
	margin-bottom: 0.5em;
	justify-content: flex-start;
}

.fedleb-share-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	padding: 0.4em 0.9em;
	border: 1px solid var(--ast-global-color-7, #d1d5db);
	border-radius: 999px;
	background: #fff;
	color: var(--ast-global-color-2, #1e293b);
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.fedleb-share-toggle svg {
	flex: none;
}

.fedleb-share-toggle:hover,
.fedleb-share-toggle:focus {
	border-color: var(--ast-global-color-0);
	color: var(--ast-global-color-0);
}

.fedleb-share-menu {
	position: absolute;
	z-index: 20;
	top: calc(100% + 6px);
	left: 0;
	min-width: 190px;
	padding: 6px;
	border: 1px solid var(--ast-global-color-7, #d1d5db);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 12px 34px rgba(15, 23, 42, 0.16);
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.fedleb-share--single .fedleb-share-menu {
	left: 0;
	right: auto;
}

.fedleb-share-opt {
	display: flex;
	align-items: center;
	gap: 0.6em;
	width: 100%;
	padding: 0.55em 0.8em;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--ast-global-color-2, #1e293b);
	font: inherit;
	font-size: 0.875rem;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

/* Small brand / method logo before each label. */
.fedleb-share-opt svg {
	flex: none;
	width: 16px;
	height: 16px;
}

.fedleb-share-opt:hover,
.fedleb-share-opt:focus {
	background: var(--ast-global-color-5, #f0f5fa);
	color: var(--ast-global-color-0);
}

.fedleb-share-opt--copy.is-done {
	color: #14532d;
	font-weight: 600;
}

[dir="rtl"] .fedleb-share-menu {
	left: auto;
	right: 0;
}

[dir="rtl"] .fedleb-share-opt {
	text-align: right;
	flex-direction: row-reverse;
}

/* ---------------------------------------------------------------
   16. Smoother progressive loading: posts appended by
       assets/infinite-scroll.js ease in as they are scrolled to.
   --------------------------------------------------------------- */

.fedleb-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 0.55s ease, transform 0.55s ease;
	will-change: opacity, transform;
}

.fedleb-reveal.is-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {

	.fedleb-reveal {
		transition: opacity 0.2s linear;
		transform: none;
	}
}

/* ---------------------------------------------------------------
   17. PDF badge on list thumbnails (posts that embed a PDF),
       centred like the video play badge but not a play control.
   --------------------------------------------------------------- */

.fedleb-has-pdf .ast-blog-featured-section,
.fedleb-has-pdf .post-thumb {
	position: relative;
}

.fedleb-has-pdf .ast-blog-featured-section > a::after,
.fedleb-has-pdf .post-thumb > a::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	border-radius: 14px;
	background-color: rgba(180, 24, 24, 0.78);
	/* A plain white document sheet with a folded corner — no letters baked
	   in; the "PDF" label is drawn over the white area by the ::before. */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M6 2h8l6 6v12.5A1.5 1.5 0 0 1 18.5 22h-13A1.5 1.5 0 0 1 4 20.5v-17A1.5 1.5 0 0 1 5.5 2z'/%3E%3Cpath d='M14 2.2V7a1 1 0 0 0 1 1h4.6' fill='none' stroke='%23b41818' stroke-width='1.1'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 50% 42%;
	background-size: 40px 40px;
	pointer-events: none;
}

/* "PDF" label sitting in the white area of the sheet. */
.fedleb-has-pdf .ast-blog-featured-section > a::before,
.fedleb-has-pdf .post-thumb > a::before {
	content: "PDF";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, 3px);
	z-index: 2;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	color: rgba(180, 24, 24, 0.95);
	pointer-events: none;
}

/* The PDF badge is a shortcut to the document: clicking it downloads the
   PDF (wired up in assets/video-click.js → fedleb-pdf.js). Show the pointer
   and let the click through to the link underneath. */
.fedleb-has-pdf .ast-blog-featured-section > a,
.fedleb-has-pdf .post-thumb > a {
	cursor: pointer;
}

/* ---------------------------------------------------------------
   18. One shared corner-rounding, applied to every "card" surface
       on both desktop and mobile: the filter (category/tag/author)
       title box, the search-results title box, the post cards in a
       list, and the opened post. The radius itself is the
       "Post corner radius" dial (Appearance → Customize →
       "fedleb — Design"); see --fedleb-radius in
       assets/fedleb-design.css and fedleb_design_dynamic_css().

       Note: in a listing the visible card is .ast-article-inner
       (Astra's blog-layout-4 box), not .ast-article-post — the
       latter is a transparent grid wrapper with padding: 0 1em.
       See section 21.
   --------------------------------------------------------------- */

.ast-separate-container .ast-article-inner,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-archive-description,
.ast-separate-container .ast-author-box.ast-archive-description,
.ast-separate-container .comments-area,
body.search .ast-separate-container .ast-archive-description {
	border-radius: var(--fedleb-radius, 16px) !important;
}

/* The comment block's own children (the "Leave a Comment" form, any
   existing comments) must not draw their own square-cornered background
   past this radius — clip to it, the same way a listing card's featured
   image is clipped to the card (section 21). */
.ast-separate-container .comments-area {
	overflow: hidden;
}

/* ---------------------------------------------------------------
   21. Listing "Post block": the visible card is .ast-article-inner.
       Pin the whole card — the left/right padding strip and the
       content — to pure #ffffff so there is no seam, drop the stray
       background / padding on the transparent grid wrapper, and give
       the flush featured image the card's top rounding.
   --------------------------------------------------------------- */

.ast-separate-container .ast-blog-layout-4-grid .ast-article-post {
	background: transparent !important;
}

.ast-separate-container .ast-article-inner,
.ast-separate-container .ast-article-post .post-content,
.ast-separate-container .ast-article-post .entry-content,
.ast-separate-container .ast-article-post .ast-blog-single-element {
	background-color: #fff !important;
}

/* The card box: rounding is section 18, depth is assets/fedleb-design.css. */

/* The featured image is flush to the card's top and sides (Astra gives it
   negative margins), so round its top corners to the card radius. The card's
   bottom corners round on .ast-article-inner itself — no overflow:hidden on
   the card, so the Share menu is free to open past its edge. */
.ast-article-post .blog-layout-4 .post-thumb-img-content {
	border-radius: var(--fedleb-radius, 16px) var(--fedleb-radius, 16px) 0 0;
	overflow: hidden;
}

/* ---------------------------------------------------------------
   22. Mobile menu: an extension of the header that rolls down.
       Astra's mobile header is data-type="dropdown" (in normal flow,
       full width, directly under the header bar). assets/mobile-menu.js
       animates it open/closed by height; here we keep it in the layout
       so that animation has something to transition, and style it as a
       seamless continuation of the header. The it.11 floating side
       panel (old section 19) is gone.
   --------------------------------------------------------------- */

@media (max-width: 921px) {

	/* Only once mobile-menu.js has taken over (.fedleb-menu-js). It keeps the
	   dropdown rendered and in normal flow so that (a) opening it grows the
	   header and pushes the page down — "the header block extends" — and
	   (b) the height change can be animated. The script owns `height`: 0
	   when closed, and — while open — always exactly however much vertical
	   room is left below the (sticky) header bar down to the bottom of the
	   viewport, not just however tall the menu's own content happens to
	   be. Two things follow from that, both deliberate (Christian): a menu
	   shorter than the screen still covers the full screen (this white
	   background fills the rest); a menu taller than the screen scrolls
	   inside itself (overflow-y here) instead of growing #masthead past
	   the viewport — #masthead is position:sticky (section above), and
	   without this cap a menu taller than the screen turns the whole
	   sticky header+menu box into one oversized sticky element: it pins to
	   the top and doesn't budge until the user has scrolled past its
	   *entire* height, so the page underneath scrolls instead of the menu.
	   overscroll-behavior stops a swipe that reaches the top/bottom of the
	   menu's own scroll from chaining into the page scroll behind it. */
	.fedleb-menu-js .ast-mobile-header-content {
		display: block !important;
		position: static !important;
		height: 0;
		overflow-y: auto;
		overflow-x: hidden;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		background: var(--ast-global-color-4, #fff);
		box-shadow: 0 14px 24px rgba(15, 23, 42, 0.12);
		transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
	}

	@media (prefers-reduced-motion: reduce) {

		.fedleb-menu-js .ast-mobile-header-content {
			transition: none;
		}
	}

	/* Row height: Astra sets the whole row's height on .menu-link via an
	   inherited *unitless* line-height of 3 (from the ancestor rule
	   `.ast-header-break-point .main-header-bar-navigation { line-height:
	   3; }`), which resolves to 3 × the link's own font-size. Keep that
	   same "3em" baseline (so it still scales if the menu's font size is
	   ever changed from the Customizer) but 10px shorter, per Christian. */
	.fedleb-menu-js .ast-mobile-header-content .menu-item > .menu-link {
		line-height: calc( 3em - 10px );
	}

	/* Thin separator line under every option, shorter one nesting level at
	   a time. Astra already ships a .menu-link border-bottom for exactly
	   this spot, but a Customizer-generated inline rule
	   (`.ast-hfb-header .ast-builder-menu-mobile .main-navigation
	   .menu-item .menu-link { border-style: none; }`) turns it off
	   site-wide. Re-enable it here on the <li> instead of the <a> — the
	   <a> is deliberately `width: 100%` (the full-width tap target) so
	   adding an inset margin to shorten a border drawn on it would just
	   overflow. margin-inline-start (a logical property) keeps the inset
	   on the correct side in the Arabic RTL layout too. The 10px-per-level
	   step matches Astra's own existing text-indent steps for these same
	   depths (.menu-link padding-right: 20px / 30px / 40px, elsewhere in
	   main.min.css).
	   Don't touch `display` here — Astra already makes .menu-item a flex
	   column (`display:flex;flex-direction:column;justify-content:center;`,
	   unscoped, so it applies on mobile too) and a sibling rule gives the
	   top-level .menu-link `height:100%`. That combination only resolves
	   sanely (menu-link hugs its own row) because flex's default
	   stretch/content sizing keeps the li's own height from being definite
	   when empty of an open submenu. Overriding display to `block` here
	   once made a *definite* height available once a submenu opened,
	   which the link's height:100% then filled completely — the open
	   submenu rendering as one giant blank clickable box was that bug. */
	.fedleb-menu-js .ast-mobile-header-content .menu-item {
		border-bottom: 1px solid var(--ast-border-color);
	}

	/* Each depth also needs its own matching `width: calc(100% - Npx)`
	   alongside the margin — Astra gives every <li> here an explicit
	   `width: 100%` (`.stack-on-mobile li { width: 100%; }`, main.min.css),
	   which a margin-inline-start alone doesn't shrink (width:100% is
	   independent of margin; adding margin on top of a *fixed* 100% width
	   just pushes the whole box sideways until it overflows past the
	   screen edge, rather than insetting it). That overflow is exactly
	   what was throwing off every deeper level's separator-line length
	   *and* its expand/collapse chevron (position:absolute; right:20px —
	   relative to that overflowing box, so it drifted further off-column
	   at every depth) — caught from a screenshot showing the arrows no
	   longer lined up once nested two levels deep. */
	.fedleb-menu-js .ast-mobile-header-content .main-header-menu > .menu-item > .sub-menu > .menu-item {
		margin-inline-start: 10px;
		width: calc( 100% - 10px );
	}

	.fedleb-menu-js .ast-mobile-header-content .main-header-menu > .menu-item > .sub-menu > .menu-item > .sub-menu > .menu-item {
		margin-inline-start: 20px;
		width: calc( 100% - 20px );
	}

	.fedleb-menu-js .ast-mobile-header-content .main-header-menu > .menu-item > .sub-menu > .menu-item > .sub-menu > .menu-item > .sub-menu > .menu-item {
		margin-inline-start: 30px;
		width: calc( 100% - 30px );
	}

	/* The line between an option and its first sub-option, when opened.
	   The border-bottom above lives on each <li> itself, but a parent
	   <li> with an open submenu now *contains* that whole submenu in
	   normal flow (the height:100% fix above), so its own border-bottom
	   renders way down past the *last* sub-option, not right under the
	   parent's own row — there's nothing marking the parent-to-first-
	   child transition at all. Give the first child in every sub-menu a
	   matching border-top instead: same <li>, so it automatically gets
	   the exact same margin-inline-start inset as the between-sibling
	   lines at that depth — same length, same position, no separate
	   depth-by-depth bookkeeping needed here. */
	.fedleb-menu-js .ast-mobile-header-content .sub-menu > .menu-item:first-child {
		border-top: 1px solid var(--ast-border-color);
	}

	/* Split row (Christian, after testing with phone users who never found
	   the small arrow): the label still opens the category page, the
	   arrow becomes its own full-height button at the row's end, set off
	   by a vertical divider. Astra places .ast-menu-toggle absolutely
	   (top:0; right:20px; 50×44, taller than the row) — pin it to the
	   row's end edge instead, exactly the row's height (same
	   calc(3em - 10px) as the link above, same font-size), and keep the
	   label text clear of it. Arrow larger, flipped up while its submenu
	   is open, tinted while pressed/open. */
	.fedleb-menu-js .ast-mobile-header-content .menu-item-has-children > .menu-link {
		padding-inline-end: 72px;
	}

	.fedleb-menu-js .ast-mobile-header-content .menu-item > .ast-menu-toggle {
		top: 0;
		right: 0;
		left: auto;
		width: 60px;
		height: calc( 3em - 10px );
		padding: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		border-inline-start: 1px solid var(--ast-border-color);
		border-radius: 0;
	}

	.rtl .fedleb-menu-js .ast-mobile-header-content .menu-item > .ast-menu-toggle {
		right: auto;
		left: 0;
	}

	.fedleb-menu-js .ast-mobile-header-content .menu-item > .ast-menu-toggle .ast-arrow-svg {
		width: 18px;
		height: auto;
		margin: 0; /* Astra's 10px left margin pulled it off-centre */
		transition: transform 0.2s ease;
	}

	.fedleb-menu-js .ast-mobile-header-content .ast-submenu-expanded > .ast-menu-toggle .ast-arrow-svg {
		transform: rotate( 180deg );
	}

	.fedleb-menu-js .ast-mobile-header-content .menu-item > .ast-menu-toggle:active,
	.fedleb-menu-js .ast-mobile-header-content .ast-submenu-expanded > .ast-menu-toggle {
		background: var(--ast-global-color-5, #f0f5fa);
	}

	/* "Menu" word under the hamburger (Christian: users did not recognise
	   the icon alone). Under, not beside: beside it pushed the site title
	   onto three lines. CSS-only, per language via <html lang>; the
	   button's aria-label already names it for screen readers. Remove
	   this pair of rules to drop the word again. */
	#ast-mobile-header .menu-toggle.main-header-menu-toggle {
		width: auto;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
	}

	#ast-mobile-header .menu-toggle.main-header-menu-toggle::before {
		content: "Menu";
		order: 2;
		font-size: 11px;
		font-weight: 600;
		line-height: 1;
	}

	html[lang^="ar"] #ast-mobile-header .menu-toggle.main-header-menu-toggle::before {
		content: "القائمة";
	}
}

/* ---------------------------------------------------------------
   23. Single post: let an embedded video (or any embed) run the full
       width of the post. Astra's gutter stays on the article
       (.type-post / .ast-article-single) only; the inner wrappers
       lose their left/right padding and embeds are pulled out to the
       card edge.
   --------------------------------------------------------------- */

.ast-article-single [class*="ast-post-format-"],
.ast-article-single .entry-title,
.ast-article-single .entry-header {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* Astra's article gutter is 2.5em on every screen down to 545px, then 1em. */
.ast-article-single .entry-content > .wp-block-embed,
.ast-article-single .entry-content > figure.wp-block-embed,
.ast-article-single .entry-content > .wp-block-video {
	margin-left: -2.5em;
	margin-right: -2.5em;
	width: calc(100% + 5em);
	max-width: none;
}

@media (max-width: 544px) {

	.ast-article-single .entry-content > .wp-block-embed,
	.ast-article-single .entry-content > figure.wp-block-embed,
	.ast-article-single .entry-content > .wp-block-video {
		margin-left: -1em;
		margin-right: -1em;
		width: calc(100% + 2em);
	}
}

/* ---------------------------------------------------------------
   24. Search: the title + search field share one Title block, on
       both the /search/ page (no query) and the results page
       (fedleb_search_box() in functions.php). The results below use
       the normal Post block presentation, Share button and all.
   --------------------------------------------------------------- */

/* /search/ (no query) is a plain-container Page, so it has no card of its
   own — give the article the Title-block look explicitly. */
body.fedleb-search-page #primary .ast-article-single {
	background: var(--ast-global-color-4, #fff);
	border-radius: var(--fedleb-radius, 16px);
	box-shadow: var(--fedleb-shadow, 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.07));
	margin-top: 20px;
	padding: 20px clamp(16px, 4vw, 40px) !important;
}

/* Phone: a flat 20px instead of this clamp() — the gap between this block's
   edge and its text, on top of (not instead of) the 20px gutter (section 8)
   that already sits between the block's edge and the screen. Vertical 20px
   unchanged. */
@media (max-width: 544px) {

	body.fedleb-search-page #primary .ast-article-single {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

body.fedleb-search-page #primary .entry-title {
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ast-global-color-2, #1e293b);
}

body.fedleb-search-page #primary .ast-article-single .entry-header {
	margin-bottom: 0;
}

.fedleb-search-box {
	margin: 0.9em 0 0;
}

body.search .ast-archive-description .fedleb-search-box {
	margin-top: 0.6em;
}

.fedleb-search-box .wp-block-search__inside-wrapper {
	display: flex;
	gap: 0.5em;
	max-width: 100%;
}

.fedleb-search-box .wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------------------------------------------------------------
   20 (cont.). Automatic menu sections (see inc/dynamic-menu.php):
       the "Authors" row is a heading that only opens its submenu,
       not a link. (Categories now sit directly on the menu bar at
       level 0, so there is no "Categories" heading any more.)
   --------------------------------------------------------------- */

.fedleb-dynamic-heading > a {
	cursor: default;
}

/* ---------------------------------------------------------------
   25. Standard content Page layout ("Contact", "About us").
       fedleb_is_standard_layout_page() forces Astra's boxed
       container on these pages and prints a Title block
       (.fedleb-page-title-block) at the top of #primary; the page
       article below it is the Post block. So a Page reads exactly
       like the rest of the site: Page title in a Title block, the
       Share button under it, page content in a Post block — same
       rounding, shadow and white background as everywhere else.
   --------------------------------------------------------------- */

/* The Title block is emitted with Astra's .ast-archive-description
   class, so it already inherits the card look (sections 11, 18,
   fedleb-design.css). The page title matches a Post title. */
/* "Tap for sound" hint over an auto-started single-post video (see
   assets/video-click.js). Removed on the first interaction. */
.fedleb-video-sound-hint {
	position: absolute;
	left: 50%;
	bottom: 12px;
	transform: translateX(-50%);
	z-index: 5;
	padding: 0.5em 1em;
	border: 0;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.82);
	color: #fff;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.35);
}

.fedleb-video-sound-hint:hover,
.fedleb-video-sound-hint:focus {
	background: rgba(15, 23, 42, 0.95);
}

.fedleb-page-title-block .page-title.ast-archive-title {
	font-size: 1.25rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	color: var(--ast-global-color-2, #1e293b) !important;
	margin: 0;
}

/* The "also / only available in …" line, directly under the Share button
   (fedleb_standard_page_title_block() / fedleb_single_post_title_block()).
   Type / colour come from .fedleb-post-langs (section 9). */
.fedleb-page-title-block .fedleb-page-title-langs {
	margin: 0.5em 0 0;
}

/* The Share button sits on its own line, directly under the title (and,
   where there is one, the description / avatar) — every Title block on the
   site shares this one rule: Page and Post (.fedleb-page-title-block) and
   category / tag / author / search (plain .ast-archive-description). */
.ast-archive-description .fedleb-share-slot {
	margin-top: 0.75em;
}

.ast-archive-description .fedleb-share-slot:empty {
	display: none;
}

.fedleb-page-title-block .fedleb-share--single {
	margin: 0;
}

/* The page title now lives in the Title block, so hide the article's
   own header (Astra still prints it inside the card). */
body.fedleb-standard-page .ast-article-single > .entry-header,
body.fedleb-standard-page .ast-article-single > .ast-single-post-order .entry-header {
	display: none;
}

/* Task 5 (Christian): the Page title must start at the same left / right edge
   as the page body text — the way a post's title and body already line up.
   Astra pads the Title block (.ast-archive-description) by ~1em but the Post
   block (.ast-article-single) by 3em from 545px up, so the H1 looked inset
   less than the text. Match the Post block's padding at each width. */
body.fedleb-standard-page .fedleb-page-title-block {
	padding-left: 3em !important;
	padding-right: 3em !important;
}

@media (max-width: 544px) {

	/* A flat 20px between this block's own edge and its text — was 1em,
	   one of several different mobile values found here; this is on top
	   of, not instead of, the 20px gutter (section 8) from screen to
	   block edge. */
	body.fedleb-standard-page .fedleb-page-title-block {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* Give the page article the same card treatment as a single post and
   an even inner padding. */
body.fedleb-standard-page .ast-separate-container .ast-article-single {
	background-color: var(--fedleb-block-bg, #fff);
	margin-top: 20px;
}

@media (max-width: 544px) {

	body.fedleb-standard-page #primary {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}

	body.fedleb-standard-page .fedleb-page-title-block {
		margin-top: 0 !important;
	}
}

/* ---------------------------------------------------------------
   26. Phones: the Post block's outer edge lines up with the Title
       block's outer edge.

       On desktop the layout is unchanged. On phones Astra insets
       every listing card by an extra ~20px (.ast-grid-common-col
       padding) + ~1em (dynamic .ast-article-post padding) inside the
       grid row, while the Title block (.ast-archive-description)
       sits flush at the #primary edge. Zero that extra inset and the
       grid row's negative margin so both blocks share the one 14px
       grey page gutter — "for the eye, equally wide". The card keeps
       its own inner padding (section 21 / Astra).
   --------------------------------------------------------------- */

@media (max-width: 544px) {

	.ast-separate-container .site-main > .ast-row {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.ast-separate-container .ast-blog-layout-4-grid .ast-article-post,
	.ast-separate-container .site-main .ast-grid-common-col.ast-article-post {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* ---------------------------------------------------------------
   26b. Single Post Title block (fedleb_single_post_title_block()):
        same treatment as the Page Title block above — same left /
        right padding as the Post block's own edges, same
        background, so both blocks read as one continuous width and
        colour. Astra's own native header is hidden since the Title
        block replaces it entirely.
   --------------------------------------------------------------- */

body.single-post article.ast-article-single .entry-header {
	display: none;
}

body.single-post .fedleb-post-title-block {
	padding-left: 3em !important;
	padding-right: 3em !important;
}

@media (max-width: 544px) {

	/* A flat 20px between this block's own edge and its text — see the
	   Page Title block note above for why. */
	body.single-post .fedleb-post-title-block {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* ---------------------------------------------------------------
   26c. Category / Tag / Author archive title banner and the
        Search-results title banner — both are Astra's native
        .ast-archive-description. Desktop padding is untouched
        (Christian: only mobile was wrong); on mobile they rely on
        the shared #content gutter (section 8) like everything else.
   --------------------------------------------------------------- */

body.single-post .ast-separate-container .ast-article-single {
	background-color: var(--fedleb-block-bg, #fff);
	margin-top: 20px;
}

/* ---------------------------------------------------------------
   27. One button colour across the whole site.

       Every button obeys --fedleb-btn / --fedleb-btn-hover /
       --fedleb-btn-text (set by fedleb_design_dynamic_css() from the
       "Button colour" dial in Appearance → Customize → "fedleb —
       Design"). This covers the search buttons (the /search/ page's
       own core/search button, previously red, and the results-page
       field), Astra's "scroll to top" button, the contact form's
       "Send message" button and the pagination links.
   --------------------------------------------------------------- */

.wp-block-search__button,
.wp-block-search__button.has-background,
.wp-block-search__button.has-vivid-red-background-color,
.fedleb-contact-form button[type="submit"],
#ast-scroll-top,
.ast-scroll-to-top-wrapper,
.ast-pagination .page-numbers.current,
.ast-pagination a:hover,
.wp-block-button__link {
	background-color: var(--fedleb-btn, #046bd2) !important;
	color: var(--fedleb-btn-text, #fff) !important;
	border-color: var(--fedleb-btn, #046bd2) !important;
}

.wp-block-search__button:hover,
.wp-block-search__button:focus,
.fedleb-contact-form button[type="submit"]:hover,
.fedleb-contact-form button[type="submit"]:focus,
#ast-scroll-top:hover,
#ast-scroll-top:focus,
.ast-scroll-to-top-wrapper:hover {
	background-color: var(--fedleb-btn-hover, #045cb4) !important;
	border-color: var(--fedleb-btn-hover, #045cb4) !important;
	color: var(--fedleb-btn-text, #fff) !important;
}

/* Astra's scroll-to-top can render as an <a>/<div> with an icon; make
   sure the arrow glyph takes the button text colour too. */
#ast-scroll-top svg,
#ast-scroll-top .ast-icon,
.ast-scroll-to-top-wrapper svg {
	fill: var(--fedleb-btn-text, #fff) !important;
	color: var(--fedleb-btn-text, #fff) !important;
}

/* ---------------------------------------------------------------
   28. "Article not available in this language" page
       (fedleb_render_unavailable_notice()). A single Title block
       whose only content is a regular cross-language line — same
       font/links as a post's .fedleb-post-langs (section 9), not a
       button. It's the box's only / first element, so its usual
       top border + spacing (meant to separate it from something
       above) is stripped here — nothing above it to separate from.
   --------------------------------------------------------------- */

.fedleb-na-block {
	margin-top: 20px;
}

.fedleb-na-block .fedleb-post-langs {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* ---------------------------------------------------------------
   29. No horizontal scrolling — especially the Arabic (RTL) pages.
       A wide child (a form field, an embed, a pre) must never make
       the whole document pannable sideways on a phone.

       Only html gets overflow-x:hidden. Setting it on body too (as this
       rule used to, and as Astra core's own CSS still does on body)
       turns body into a scroll container that silently breaks
       position:sticky on #masthead (section 30 below) — the sticky
       element's computed style still reads "sticky" but never actually
       sticks. body is set back to visible here to override that Astra
       core rule (same specificity, later in the cascade, so this wins).
   --------------------------------------------------------------- */

html {
	overflow-x: hidden;
	max-width: 100%;
}

body {
	overflow-x: visible;
	max-width: 100%;
}

@media (max-width: 921px) {

	#page,
	#content,
	.site-content,
	.ast-container,
	#primary,
	.entry-content {
		max-width: 100%;
		overflow-wrap: break-word;
	}

	.entry-content > * {
		max-width: 100%;
	}

	/* Inputs / textareas inside our forms use border-box so a 100% width
	   never overflows its padding. Covers our contact form, the injected
	   results-page field, and the /search/ page's own core/search block. */
	.fedleb-contact-form input,
	.fedleb-contact-form textarea,
	.fedleb-search-box input,
	.wp-block-search,
	.wp-block-search__inside-wrapper,
	.wp-block-search__input {
		box-sizing: border-box;
		max-width: 100%;
	}

	.wp-block-search__input {
		flex: 1 1 auto;
		min-width: 0;
	}
}

/* ---------------------------------------------------------------
   30. Author archive box (extends 11b): a larger avatar on phones,
       and the picture on the right in Arabic (RTL).
   --------------------------------------------------------------- */

.ast-author-box .ast-author-avatar img.avatar,
.ast-author-box .ast-author-avatar img {
	width: 96px !important;
	height: 96px !important;
	max-width: 96px;
}

@media (min-width: 922px) {

	.ast-author-box .ast-author-avatar img.avatar,
	.ast-author-box .ast-author-avatar img {
		width: 120px !important;
		height: 120px !important;
		max-width: 120px;
	}

	/* Arabic desktop: picture on the right, name to its left. */
	html[dir="rtl"] .ast-author-box.ast-archive-description {
		flex-direction: row-reverse;
	}
}

/* ---------------------------------------------------------------
   31. Block (card) background colour dial. Every white card surface
       reads --fedleb-block-bg (default #ffffff) so the "Block
       background colour" dial recolours them all at once.
   --------------------------------------------------------------- */

.ast-separate-container .ast-article-inner,
.ast-separate-container .ast-article-post .post-content,
.ast-separate-container .ast-article-post .entry-content,
.ast-separate-container .ast-article-post .ast-blog-single-element,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-archive-description,
.ast-separate-container .ast-author-box.ast-archive-description,
.fedleb-page-title-block,
body.fedleb-search-page #primary .ast-article-single {
	background-color: var(--fedleb-block-bg, #fff) !important;
}

/* ---------------------------------------------------------------
   32. Single post: no previous / next pager.

       fedleb functions.php turns Astra's own post navigation off via
       the astra_single_post_navigation_enabled filter; this is the
       belt-and-braces hide in case a plugin prints its own.
   --------------------------------------------------------------- */

.single .post-navigation,
.single nav.post-navigation,
.single .ast-single-related-posts-container + .post-navigation {
	display: none !important;
}

/* ---------------------------------------------------------------
   33. One text alignment for every block (Christian, it.14).

       The Title blocks (archive / page / search / "not available"),
       the Post summary blocks, the opened post's header and the
       comment block all read from the start edge — left in English
       and French, right in Arabic. The site header, the footer and
       the centred language-switcher bar are exempt, and author
       formatting inside .entry-content is left untouched.
   --------------------------------------------------------------- */

body .ast-archive-description,
body .ast-archive-description > *,
body .fedleb-page-title-block,
body .fedleb-page-title-block > *,
body .fedleb-na-block,
body .fedleb-na-block > *,
body.fedleb-search-page #primary .ast-article-single > .entry-header,
body.fedleb-search-page #primary .ast-article-single > .entry-header > *,
body .ast-article-post .entry-title,
body .ast-article-post .ast-blog-meta-container,
body .ast-article-post .ast-blog-meta-container *,
body .ast-article-post .cat-links,
body .ast-article-post .tags-links,
body .ast-article-post .fedleb-listing-langs,
body .ast-article-single > .entry-header,
body .ast-article-single > .entry-header > *,
body .comments-area > .comments-title,
body .comments-area .comment-body,
body .comments-area .comment-respond {
	text-align: left !important;
}

html[dir="rtl"] body .ast-archive-description,
html[dir="rtl"] body .ast-archive-description > *,
html[dir="rtl"] body .fedleb-page-title-block,
html[dir="rtl"] body .fedleb-page-title-block > *,
html[dir="rtl"] body .fedleb-na-block,
html[dir="rtl"] body .fedleb-na-block > *,
html[dir="rtl"] body.fedleb-search-page #primary .ast-article-single > .entry-header,
html[dir="rtl"] body.fedleb-search-page #primary .ast-article-single > .entry-header > *,
html[dir="rtl"] body .ast-article-post .entry-title,
html[dir="rtl"] body .ast-article-post .ast-blog-meta-container,
html[dir="rtl"] body .ast-article-post .ast-blog-meta-container *,
html[dir="rtl"] body .ast-article-post .cat-links,
html[dir="rtl"] body .ast-article-post .tags-links,
html[dir="rtl"] body .ast-article-post .fedleb-listing-langs,
html[dir="rtl"] body .ast-article-single > .entry-header,
html[dir="rtl"] body .ast-article-single > .entry-header > *,
html[dir="rtl"] body .comments-area > .comments-title,
html[dir="rtl"] body .comments-area .comment-body,
html[dir="rtl"] body .comments-area .comment-respond {
	text-align: right !important;
}

/* ---------------------------------------------------------------
   34. Listing / search cards: the "also / only available in …" line
       (assets/list-langs.js), sitting at the end of the card, after
       the excerpt. Colours + type come from .fedleb-post-langs
       (section 9).
   --------------------------------------------------------------- */

.fedleb-listing-langs {
	margin: 0.35em 0 0;
}

/* The same line under the search field in the results Title block — spacing
   and the divider above it both come from .fedleb-archive-xlang. */

/* ---------------------------------------------------------------
   35. Comment block: one card, 20px padding like every other block.

       #comments.comments-area is now the card (radius/shadow/clip —
       section 18 above and assets/fedleb-design.css). Astra's own
       padding — 2.5em on the "Leave a Comment" form, plus another 2em
       of its own below that on .comments-area — doesn't match the
       site's flat 20px rule, and, sitting inside a .comments-area that
       had no padding of its own, is what left the form's square
       corners and that extra bottom padding visible past the card's
       rounding (fixed above by the overflow: hidden clip too).
       Individual existing comments (.comment-body) keep their own
       rounding — same variable, so a future radius-dial change still
       applies everywhere at once.
   --------------------------------------------------------------- */

.ast-separate-container .comments-area {
	padding-left: 20px !important;
	padding-right: 20px !important;
	padding-bottom: 20px !important;
}

/* .comments-area (above) is the card and already carries the site's one
   20px left/right padding — exactly like a Post/Title block's own padding.
   Its children must not add a second layer of their own on top of that,
   the same stacking mistake corrected sitewide in it33 (§10→§11): the
   "Leave a Comment" form's Astra padding (2.5em) and each posted comment's
   top-level <li> (also 2.5em) both get zeroed on the sides, not re-padded,
   so there is exactly one 20px gutter, not two. Top/bottom padding is left
   as Astra has it — only left/right was ever the issue. The avatar/meta
   internal offsets (.ast-comment-meta, .ast-comment-content's own
   padding-left) are untouched: those clear the avatar image, they are not
   the card gutter. */
.ast-separate-container #comments > #respond.comment-respond {
	background-color: transparent !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.ast-separate-container .ast-comment-list li.depth-1 {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.ast-separate-container .ast-comment-list .comment-body {
	border-radius: var(--fedleb-radius, 16px);
}

/* ---------------------------------------------------------------
   36. "About the project" page (body.fedleb-about-page — the about
       page, its translations and the static front page).

       Layout is left to the page's own blocks — Christian arranges
       the images and text in the editor. This section only drops the
       empty spacer paragraphs and, on phones, trims the Post-block
       padding and the gap above it so the page is less airy.
   --------------------------------------------------------------- */

.fedleb-about-page .entry-content p:empty {
	display: none !important;
}

@media (max-width: 768px) {

	.fedleb-about-page .ast-separate-container .ast-article-single {
		padding: 1.4em !important;
		margin-top: 12px !important;
	}

	.fedleb-about-page .fedleb-page-title-block {
		margin-bottom: 12px !important;
	}

	/* Keep the title aligned with the body text: on this page the Post block
	   drops to 1.4em padding up to 768px (above), so match it here, overriding
	   the section-25 values. `body.` matches section 25's specificity and this
	   rule comes later, so it wins on the about page. */
	body.fedleb-about-page .fedleb-page-title-block {
		padding-left: 1.4em !important;
		padding-right: 1.4em !important;
	}
}

@media (max-width: 544px) {

	/* At phone width specifically, a flat 20px between this block's own
	   edge and its text, instead of the 768px tablet value above (1.4em ≈
	   22px) — one canonical number instead of several different ones. */
	.fedleb-about-page .ast-separate-container .ast-article-single,
	body.fedleb-about-page .fedleb-page-title-block {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}
}

/* ---------------------------------------------------------------
   37. Share button states (Christian, it.15).

       • Resting: the neutral white pill from section 15 — hover and
         plain (pointer) focus must not recolour it.
       • Menu open: share.js adds .is-open to the .fedleb-share wrap
         and sets aria-expanded="true"; the button then takes the
         "fedleb — Design" button colour with white text / icon.
       • On a listing card the menu opens upward, so it is not clipped
         by the bottom edge of the card.
   --------------------------------------------------------------- */

.fedleb-share-toggle:hover,
.fedleb-share-toggle:focus {
	background: #fff;
	border-color: var(--ast-global-color-7, #d1d5db);
	color: var(--ast-global-color-2, #1e293b);
}

.fedleb-share-toggle:focus-visible {
	outline: 2px solid var(--fedleb-btn, #046bd2);
	outline-offset: 2px;
}

.fedleb-share.is-open .fedleb-share-toggle,
.fedleb-share-toggle[aria-expanded="true"] {
	background: var(--fedleb-btn, #046bd2) !important;
	border-color: var(--fedleb-btn, #046bd2) !important;
	color: var(--fedleb-btn-text, #fff) !important;
}

.fedleb-share.is-open .fedleb-share-toggle svg,
.fedleb-share-toggle[aria-expanded="true"] svg {
	fill: var(--fedleb-btn-text, #fff) !important;
	color: var(--fedleb-btn-text, #fff) !important;
}

/* Listing card: open the menu above the button. */
.fedleb-share--listing .fedleb-share-menu {
	top: auto;
	bottom: calc(100% + 6px);
}

/* ---------------------------------------------------------------
   38. Footer: thin, and at the bottom of the screen on short pages
       (Christian, 2026-09-28).

       Astra's own stretch is kept: #page is a min-height:100vh flex
       column and .site-content grows, so on a page shorter than the
       screen (empty category, one post) the footer sits at the
       bottom; on longer pages it follows the content as usual.
       Logged in, the admin bar's height is taken off so no scrollbar
       appears on a short page.

       The footer row is one line of copyright text: exactly 20px
       above and below it. Astra's 60px row minimum, the stacked
       section's 10px bottom margin and the paragraph's own bottom
       margin are dropped.
   --------------------------------------------------------------- */

.admin-bar #page {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

.site-below-footer-wrap[data-section="section-below-footer-builder"],
.site-below-footer-wrap[data-section="section-below-footer-builder"] .ast-builder-grid-row {
	min-height: 0 !important;
}

.site-below-footer-wrap[data-section="section-below-footer-builder"] {
	padding-top: 20px !important;
	padding-bottom: 20px !important;
}

.site-below-footer-wrap[data-section="section-below-footer-builder"] .site-footer-section,
.site-below-footer-wrap[data-section="section-below-footer-builder"] .ast-footer-copyright p {
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}

/* ---------------------------------------------------------------
   39. Persistent header search bar (Christian, 2026-09-19). Printed via
       astra_masthead_bottom (functions.php: fedleb_header_search_bar()),
       a direct child of <header id="masthead"> right after the logo/
       title/hamburger row — so it's full-bleed for free (that row's own
       containers carry the padding/max-width, #masthead itself has
       none) and needs no extra width plumbing here.

       Always visible, on every screen size, every device — no hide/show
       logic left at all (an earlier "only while the mobile menu is open"
       version showed it in the wrong place and wasn't wanted anyway).
       assets/mobile-menu.js still repositions this element on mobile, to
       sit right after the logo/hamburger row and before the expandable
       dropdown — that's what keeps it pinned at the *top* there, whether
       the dropdown itself is open or collapsed.

       .fedleb-header-search itself stays full-bleed (edge to edge), but
       the field/button are wrapped in Astra's own .ast-container (same
       class the Title block and every card on the site already uses for
       its own max-width/centering) — so the field's start and the
       button's end line up with the Title block's own edges at *every*
       screen width, not just the one breakpoint a hardcoded padding
       value would've been measured at. The button ends up touching the
       *container's* trailing edge (not the screen's, since 2026-09-19's
       revision) simply because it's the flex row's last child with zero
       extra padding on anything between it and that edge — flexbox's
       `row` axis already mirrors under the Arabic page's dir="rtl", so
       this needs no separate RTL rule to land on the *start* edge there
       instead.

       Second pass of visual refinements (Christian, same day): thinner
       (30px, down from 40px), no border (that was reading as two
       horizontal lines, one along the field's top edge and one along its
       bottom), both field and button fully rounded to match each other,
       and an explicit height on the button so it matches the field's own
       interior exactly rather than derive from the button's own padding
       (which happened to render 2px taller than the field before this
       pass, and considerably taller again on wider screens where Astra's
       block styles give buttons more padding by default).
   --------------------------------------------------------------- */

.fedleb-header-search {
	width: 100%;
	/* Christian: opaque white, not whatever shows through from behind
	   (the header itself is opaque white already, but this makes it
	   explicit/guaranteed regardless of what ever sits behind #masthead). */
	background-color: var(--ast-global-color-4, #fff);
	/* Thin line under the whole bar, same weight/colour as every other
	   hairline divider on the site (mobile menu separators, the
	   cross-language line). */
	border-bottom: 1px solid var(--ast-global-color-7, #D1D5DB);
}

.fedleb-header-search .ast-container {
	padding-top: 0;
	padding-bottom: 0;
}

.fedleb-header-search .fedleb-search-box {
	margin: 0;
	width: 100%;
}

.fedleb-header-search .wp-block-search__inside-wrapper {
	gap: 10px;
	width: 100%;
	max-width: 100%;
}

.fedleb-header-search .wp-block-search__input {
	height: 30px;
	line-height: 30px;
	border: none;
	/* Square again (Christian, 2026-09-19, second pass — reversing the
	   fully-rounded pill from the first pass). */
	border-radius: 0;
	margin: 0;
	padding: 0 16px;
}

.fedleb-header-search .wp-block-search__button {
	height: 30px;
	border: none;
	/* Slightly rounded (Christian, 2026-09-19, third pass) — not the fully-
	   rounded pill from the first pass. The site's own "small" radius
	   token (--fedleb-radius-sm, 10px) turned out to read as a full pill
	   too at this button's 30px height (radius = a third of the height);
	   a flat 4px stays visibly "slight" instead. */
	border-radius: 4px !important;
	margin: 0;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 921px) {

	/* Christian measured .ast-site-identity's own padding at 14.592px
	   (top/bottom only — it's already 0 left/right; that's Astra's own
	   `1em 0` computed at this element's font-size), first asked for 5px,
	   now 3px, to free up more header height now the search bar sits in
	   it permanently. Scoped to mobile since that's the value he
	   measured; desktop's own default (16px) is untouched. `!important`
	   plus matching Astra's own `.ast-logo-title-inline .ast-site-identity`
	   selector (main.min.css) exactly, belt and suspenders — a bare
	   `.ast-site-identity` here loses to that rule's specificity and
	   silently does nothing; this still needs to win even if some other
	   page/header-layout combination ever carries a *different* set of
	   body classes than the one this was checked against. */
	.ast-logo-title-inline .ast-site-identity {
		padding: 3px !important;
	}
}

/* ==========================================================================
   Desktop mega-menu dropdowns: white, rounded panels
   Max Mega Menu's flyout sub-menus default to a square grey (#f1f1f1)
   panel with grey item backgrounds. Here: one white panel per sub-menu,
   the site-wide corner radius (Customizer → "fedleb — Design"), the same soft card shadow, and a light
   rounded hover highlight per item. No overflow:hidden on the panel —
   nested flyouts must still pop out sideways — so the panel gets a small
   vertical padding instead to keep item hovers off the rounded corners.
   Desktop only: MMM switches to its mobile layout at 768px.
   ========================================================================== */
@media only screen and (min-width: 769px) {

	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu {
		background-color: #fff;
		border-radius: var(--fedleb-radius, 16px);
		/* The stronger of the two Customizer shadow tokens ("Shadow depth"
		   dial) — the plain card shadow was too faint to read as a
		   floating menu. */
		box-shadow: var(--fedleb-shadow-hover, 0 2px 6px rgba(15, 23, 42, 0.08), 0 16px 40px rgba(15, 23, 42, 0.12));
		padding: 6px;
	}

	/* A thin line between items (not above the first one). */
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item + li.mega-menu-item {
		border-top: 1px solid var(--ast-global-color-7, #d1d5db);
	}

	/* Nested flyouts: line the first item up with the parent item. */
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item ul.mega-sub-menu,
	#mega-menu-wrap-primary #mega-menu-primary li.mega-menu-flyout.mega-align-bottom-right ul.mega-sub-menu li.mega-menu-item ul.mega-sub-menu {
		top: -6px;
	}

	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link {
		background-color: transparent;
		/* Concentric with the panel: site radius minus the 6px panel padding. */
		border-radius: calc(var(--fedleb-radius, 16px) - 6px);
	}

	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link:hover,
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item a.mega-menu-link:focus,
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout ul.mega-sub-menu li.mega-menu-item.mega-toggle-on > a.mega-menu-link {
		background-color: var(--ast-global-color-5, #f0f5fa);
	}

	/* Top-level item whose dropdown is open (or hovered): same highlight
	   as a selected sub-menu item, instead of MMM's plain white. */
	/* The align-bottom-left/right + toggle-on selectors match (and beat) MMM's
	   own rule that squares the corners of an item whose dropdown is open. */
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link,
	#mega-menu-wrap-primary #mega-menu-primary li.mega-align-bottom-left.mega-toggle-on > a.mega-menu-link,
	#mega-menu-wrap-primary #mega-menu-primary li.mega-align-bottom-right.mega-toggle-on > a.mega-menu-link {
		/* Not nested in a padded panel, so the full site radius applies. */
		border-radius: var(--fedleb-radius, 16px);
	}

	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover,
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:focus,
	#mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item.mega-toggle-on > a.mega-menu-link {
		background-color: var(--ast-global-color-5, #f0f5fa);
	}
}

/* ---------------------------------------------------------------
   40. Mobile menu tutorial (assets/menu-tutorial.js): a big
       transparent red pulsing dot centred on the hamburger icon, then
       on the first category's arrow icon (Christian: dot only, no
       bubble). One-shot per browser; ?fedleb_tour=reset brings it
       back. The script only runs at ≤ 921px, so no media query here.
   --------------------------------------------------------------- */

.fedleb-tour-icon {
	position: relative;
	overflow: visible !important;
}

.fedleb-tour-dot {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(220, 38, 38, 0.45);
	pointer-events: none;
	z-index: 2;
	transform: translate(-50%, -50%);
	animation: fedleb-tour-pulse 1.2s ease-in-out infinite alternate;
}

/* Arrow button (60px wide, one row high): a little smaller. */
.ast-menu-toggle .fedleb-tour-dot {
	width: 48px;
	height: 48px;
}

@keyframes fedleb-tour-pulse {
	from {
		transform: translate(-50%, -50%) scale(0.8);
		opacity: 1;
	}
	to {
		transform: translate(-50%, -50%) scale(1.15);
		opacity: 0.45;
	}
}

@media (prefers-reduced-motion: reduce) {

	.fedleb-tour-dot {
		animation: none;
	}
}

/* ---------------------------------------------------------------
   41. News menu entry: dark text on a yellow background
       (Christian). The class is added by inc/dynamic-menu.php to
       the top-level News item only; Max Mega Menu prefixes it
       ("mega-fedleb-menu-news"), the Astra mobile menu keeps it as
       is. Desktop corners come from § mega-menu above (site radius).
   --------------------------------------------------------------- */

#mega-menu-wrap-primary #mega-menu-primary > li.mega-fedleb-menu-news > a.mega-menu-link,
.fedleb-menu-news > a.menu-link {
	background-color: #ffd400 !important;
	color: #1f2937 !important;
	font-weight: 700;
}

#mega-menu-wrap-primary #mega-menu-primary > li.mega-fedleb-menu-news > a.mega-menu-link:hover,
#mega-menu-wrap-primary #mega-menu-primary > li.mega-fedleb-menu-news > a.mega-menu-link:focus,
.fedleb-menu-news > a.menu-link:hover,
.fedleb-menu-news > a.menu-link:focus {
	background-color: #ffc400 !important;
}

/* ---------------------------------------------------------------
   42. Featured image at the top of a single post
       (fedleb_single_featured_image()): up to the full width of the
       text column, never enlarged beyond its own size (no blur),
       centred, square like the other images in post text.
   --------------------------------------------------------------- */

.single-post .fedleb-single-featured {
	margin: 0 0 1.5em;
	text-align: center;
}

.single-post .fedleb-single-featured img {
	display: inline-block;
	width: auto;
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------
   43. Category picture banner (fedleb_term_image_banner()): after the
       breadcrumb, above the title; max 600 px on desktop, full width
       of the block on phones; start-aligned (right in Arabic, the
       block follows dir); site corner radius.
   --------------------------------------------------------------- */

.category .fedleb-category-banner {
	display: block;
	width: 100%;
	max-width: 600px;
	height: auto;
	margin: 0.5em 0 1em;
	border-radius: var(--fedleb-radius, 16px);
}
