/*
Theme Name: Ahram GP VIP (Sahifa Look)
Template: generatepress
Description: GeneratePress child theme rebuilding Ahram's Sahifa-style homepage. This is the "VIP" lineage — forked from the stable v1.9.0 baseline (the version that reliably scored 95-98) after the earlier v1.10-v1.16 chain regressed and was abandoned. Named separately so it's never confused with the older/unstable versions. v1.9: reverted ALL logo-sizing and hamburger-position CSS overrides — logo width and mobile-menu icon position now controlled entirely by the theme's native Customizer settings, as requested (kept only the site-title/tagline hide rule). Added single-article page enhancements: full-bleed bigger featured image, pill-style tags, author box after content, and an LCP fetchpriority/eager fix for the article's featured image. A separate mu-plugin (ahram-theme-switcher.php) now serves this theme on mobile only / to the admin on preview, while desktop visitors keep seeing Sahifa. v1.9.1-vip: removed the white space above the header and closed the gap between the logo row and the menu-icon/search row (mobile only). v1.9.2-vip: replaced the breaking-news ticker's CSS marquee animation (unreliable across devices) with a vanilla-JS one-headline-at-a-time cycler (assets/js/breaking-news.js), fading/sliding to the next headline every 4 seconds; pauses on hover/focus, respects prefers-reduced-motion. v1.10.0-vip: FIRST PASS at a desktop skin (min-width: 992px only, mobile untouched) — boxed/centered page, navy+gold nav bar, hero slider + optional ad sidebar side by side, homepage category sections as a 2-column featured+list layout, and a new single-article sidebar (related posts + optional widgets) via two new optional widget areas registered in Appearance > Widgets. Goal: make this one theme look right on both desktop and mobile so ahram-theme-switcher.php can eventually be retired.
Version: 1.41.5-vip
v1.41.1-1.41.4-vip: category/archive listing page (صفحة الأقسام) fixes — removed the category/tags/"أضف تعليق" footer row under each excerpt; force-trimmed posts whose excerpt or content was showing in full (no reliable "read more" cutoff before) and guaranteed a real clickable "اقرأ المزيد" link in every case (missing link, suppressed native more-link, or plain non-linked "اقرأ المزيد" text); "بقلم" swapped to "نشر بواسطة" on archive listings; category description wrapped in a styled intro box; page title + each post's own title colored/sized to match the single-article title; image frame added around archive thumbnails.
v1.33.0-vip: added a footer "الأقسام" checkbox column to Appearance > أقسام الصفحة الرئيسية (same independent-selection/ordering pattern as the existing "في القائمة العلوية" nav column), so the admin can pick which categories appear in the site footer instead of relying on the automatic top-6-by-post-count fallback. The footer "روابط سريعة" quick-links fields already existed on this page and are unchanged.
v1.32.0-vip: PageSpeed "Improve image delivery" fix — category cards now request a dedicated small 480x270 crop ('ahram-cat-card', registered via add_image_size) instead of the 'full' original file, cutting the transferred image weight on the homepage. Falls back automatically to 'full' for any older image that doesn't have this size generated yet (run Regenerate Thumbnails to backfill). Cache key bumped to v3 so this takes effect immediately.
v1.30.0-vip: broken-image-icon defensive fixes (fallback gradient, onerror handler) — reported still broken even after full cache purge across multiple browsers/devices AND after rolling back to an older version, ruling out caching entirely. User confirmed the SAME specific categories fail every time (not random) and that their originals are native WebP files which LiteSpeed can't further optimize. v1.31.0-vip: root cause identified — the category-card image lookup requested a generated 'medium_large' sub-size, which can fail to build from a native WebP source on some server image-library configurations, leaving a broken file reference even though the original upload is completely fine. Switched to requesting 'full' size (the originally uploaded file itself, guaranteed to exist) instead of a derived sub-size. Also version-bumped the image cache key (v2) so any already-cached broken URLs from before this fix are invalidated immediately on deploy rather than lingering up to 6 hours.
v1.28.0-vip: nav text-wrap fix via inline style on each <a>. Confirmed working at 8 categories. v1.29.0-vip: added a SEPARATE "في القائمة العلوية" checkbox column on the settings page — the nav menu now has its own independent category selection (capped at 8), completely decoupled from the homepage-cards category list (still capped at 10). v1.30.0-vip: fixed broken-image icons showing inside several category cards on mobile. The gradient fallback background is now ALWAYS set on every card (previously only set when there was no image at all), and the <img> tag has an onerror handler that hides it if the URL fails to load — so a stale/broken cached image URL now falls back cleanly to the color gradient instead of showing a broken-image icon. Also shortened the per-category image cache from 24h to 6h as a defensive measure, in case the breakage is caused by an external image-optimization/CDN pipeline changing files without triggering the save_post cache-clear hook.
Text Domain: ahram-gp
*/

/* Component styles live in assets/css/sahifa-blocks.css, enqueued from functions.php */
