/*
Theme Name:  Law Firm Luxury Legal Chambers Theme
Theme URI:   http://ilfirm.com
Author:      Atta Ullah KB
Author URI:  https://fastpro.ae
Description: Elite legal chambers and litigation theme for International Law Firm (ilfirm.com). High-intent legal practice areas, Dar-ul-Qaza Mingora Swat Bench & Supreme Court advocacy, overseas client portals, schema-driven Theme Options, and Elementor widget bridge. Built on Tailwind + GSAP.
Version:     1.8.3
Requires at least: 6.0
Tested up to:      7.1
Requires PHP:      8.0
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: casavogue
Tags:        law-firm, legal-chambers, attorney, litigation, custom-colors, custom-logo, custom-menu, featured-images, rtl-language-support, translation-ready, block-styles, wide-blocks

Designed & Developed by Atta Ullah KB — https://fastpro.ae
Author profile: https://fb.com/swatians

CHANGELOG
---------
1.8.2 — 2026-09-25
  · Fixed mobile navigation drawer scrolling: added body scroll-locking (mobile-nav-active), touch momentum scrolling (-webkit-overflow-scrolling: touch), overscroll containment, and 144px bottom padding clearance.
  · Embedded language switcher into mobile drawer server-side (SSR) eliminating race condition and delay.
  · Converted switcher interactions to global event delegation (removing jQuery dependency so it works reliably on front page).
  · Enforced top-level stacking context (z-index: 999999) on mobile navigation drawer and hid floating WhatsApp widget while drawer is active to prevent touch interception and visual bleed-through.
  · PageSpeed Optimization: Dequeued unused Elementor CSS/fonts on front page, loaded Google Fonts asynchronously, and deferred Site Kit scripts.

1.8.1 — 2026-09-25
  · Fixed hardcoded WhatsApp phone number on contact page (/contacts/) to dynamically read from Theme Options Customizer (Phone, WhatsApp & Email).
  · Added casavogue_whatsapp_display() helper with automatic UAE number formatting (+971 XX XXX XXXX).
  · Elevated mobile drawer stacking context (z-[9999]) to prevent desktop element bleed-through.

1.8.0 — 2026-09-25
  · Major Mobile Performance & Core Web Vitals (LCP/TBT/CLS) Overhaul:
    - Generated ultra-lightweight WebP assets (~83% payload reduction).
    - Injected mobile LCP hero image preload with fetchpriority="high".
    - Deferred Lucide icons, GSAP, and theme scripts.
    - Mobile-adaptive hero: scoped 1080p background video and 60fps particle canvas to desktop viewports (>=768px).
    - Streamlined Google Fonts weights (Cinzel, Josefin Sans, IBM Plex Mono) cutting font overhead by >60%.
    - Dequeued unused Gutenberg, Classic styles, Contact Form 7, and guest jQuery on front page.
    - Implemented layout stability (CLS prevention) on rotating headline and card tilt.
    - Added responsive picture tags and native lazy loading to all 6 pillar service cards.
    - Updated official theme screenshot and author credits.

1.7.4 — 2026-08-30
  · Cleaned up redundant styles and optimized widget wrappers.

1.7.3 — 2026-08-25
  · Fixed missing confirmation after submitting any inline form. The handlers
    hid the form then revealed #consultation-success / #palace-success — ids
    that only exist inside the modal templates — so the service sidebar,
    contact page, request page and hero forms all vanished silently.
  · cvShowFormSuccess() now scopes the confirmation to the submitted form,
    reusing a [data-cv-success] element in its container or injecting one.
  · Confirmation is announced to screen readers (role=status, aria-live).

1.7.2 — 2026-08-25
  · Service hero now renders the featured image. The section already had the
    relative/overflow-hidden/z-10 scaffolding for a background layer, but no
    image was ever output.
  · Layered scrim: brand tint + vertical wash + an elliptical scrim centred on
    the copy, so the photograph stays readable at the edges.
  · Services without a featured image keep the warm band and dark ink — the
    hero switches mode rather than duplicating the section.

1.7.1 — 2026-08-25
  · Hero: both overlay gradients softened from via-black/60 to via-black/15 so
    more of the background footage reads through.

1.7.0 — 2026-08-25
  · Release packaging: bin/package.sh (npm run package) builds the CSS, lints
    every PHP file, and writes ../dist/casavogue-theme-<version>.zip plus the
    companion plugin zip. Refuses to build if style.css and functions.php
    disagree on the version, or if the Tailwind build output is missing.
  · Companion plugin header rewritten and versioned in lockstep (1.7.0); it had
    been left at 1.0.0 despite substantial changes.

1.6.0 — 2026-08-25
  · Homepage widget areas now REPLACE their section instead of appending after
    it. Each of the 8 sections has a slot; a slot with widgets swaps the
    built-in block out, an empty slot renders the theme's own section.
  · Slots whose section is a dark feature band keep the dark treatment when
    replaced, so the page rhythm survives the swap.
  · Retired the v1.5.0 "home-after-*" area ids.

1.5.0 — 2026-08-25
  · 5 homepage widget areas: under the hero, after the pillars, after the video
    showcase, after the portfolio teaser, and before the closing CTA. Empty
    areas render nothing.
  · CV Video Showcase widget — sources from projects, journal posts, or a
    curated list. YouTube / Vimeo / MP4 detected from the URL.
  · Click-to-load video facades: no player is requested until the visitor
    presses play, and YouTube goes through youtube-nocookie.
  · CV Contact Card, CV CTA Banner and CV Recent Projects widgets.

1.4.1 — 2026-08-25
  · Fixed unstyled Service meta box: the field CSS was inlined inside the
    project meta box, so the Service screen rendered with labels running inline
    against tiny, misaligned inputs. Moved to admin/assets/admin.css and loaded
    on both CPTs.
  · Meta box fields stack to one column inside the block editor / Elementor
    meta-box panel, where the two-column grid was cramped.
  · Long textareas (scope, FAQs) now span the full grid width.

1.4.0 — 2026-08-24
  · Waisync WhatsApp API key moved out of plugin source into Theme Options,
    encrypted at rest with AES-256-GCM keyed off the wp-config.php salts.
  · Lead notification recipient is now an option — alerts can go to any number.
  · Instagram access token encrypted the same way.
  · Secrets are never echoed back into the Customizer markup; blank submission
    keeps the stored value; explicit "clear credentials" toggle added.
  · CRM bridge no longer counts an HTTP 4xx/5xx as a delivered notification —
    failures are logged and surfaced.

1.3.0 — 2026-08-24
  · Project editing rebuilt: sortable media-library gallery, before/after and
    video-poster pickers replace the old plain URL text fields.
  · Gallery now stores attachment IDs (srcset + domain-safe); legacy URL rows
    still read correctly.
  · 6 new Elementor widgets read the queried project — Gallery, Stats,
    Before/After, Testimonial, Scope List, Related Projects.
  · New option: apply one Elementor Library template to EVERY project
    (free-Elementor stand-in for Pro's Theme Builder).
  · Project gallery gained srcset, lazy-loading and lightbox links.

1.2.1 — 2026-08-24
  · Logo backdrop plate: 4 styles (none/soft/solid/outline) with configurable
    background, border colour, radius and padding — Customize → General &
    Contact → Logos & Award Badge.
  · Header phone pill moved to 2xl so the plate's padding cannot overflow the
    1280px container; the number already sits in the top bar above it.

1.2.0 — 2026-08-24
  · Tailwind moved off the Play CDN to a compiled build (tailwind.config.js +
    npm run build). 123 KB of render-blocking runtime compiler replaced by
    6.6 KB of gzipped CSS.
  · Brand colours compile to rgb(var(--cv-*-rgb) / <alpha-value>) so Customizer
    colours still apply at runtime, opacity modifiers included.
  · Fixed stylesheet ordering: the dynamic token block was printing before
    theme.css, so its :root fallbacks silently beat the Customizer.
  · Consolidated a duplicated Google Fonts request.

1.1.0 — 2026-08-24
  · Theme Options panel (General/Contact, Styling, Typography, Blog & Portfolio,
    404, Social & Instagram, Translate) driven by one schema.
  · Contact details centralised: phone, WhatsApp and email set once.
  · 9 widget areas + "CV Instagram Reels" widget (recent / pinned / most-commented).
  · Primary menu trimmed — Portfolio & Showroom moved under Company.
  · Award badge rebuilt as a vertical ribbon.
  · Documentation added at docs/THEME-GUIDE.md.

1.0.1 — 2026-08-24
  · Converted from all-dark to the warm-cream palette with dark feature bands.
  · Added page.php, single.php, archive.php, search.php, searchform.php, 404.php.
  · Elementor integration: full-canvas rule + editable content zones.
  · Fixed transparent mega-menu panel (ungenerated Tailwind opacity class).

1.0.0 — Initial build.
*/
