:root {
    --psfm-red: var(--psfm-color-brand, #d71920);
    --psfm-red-dark: var(--psfm-color-brand-strong, #aa1118);
    --psfm-red-accessible: var(--psfm-color-brand-strong, #c8101e);
    --psfm-red-soft: var(--psfm-color-brand-soft, #fff1f2);
    --psfm-navy: var(--psfm-color-navy, #071a33);
    --psfm-navy-soft: var(--psfm-color-navy-soft, #102846);
    --psfm-ink: var(--psfm-color-ink, #102038);
    --psfm-muted: var(--psfm-color-muted, #5f6f85);
    --psfm-surface: var(--psfm-color-surface, #ffffff);
    --psfm-surface-soft: var(--psfm-color-surface-soft, #f5f7fa);
    --psfm-border: var(--psfm-color-border, #dce3ec);
    --psfm-success: var(--psfm-color-success, #087a55);
    --psfm-focus: var(--psfm-color-focus, #0b63ce);
    --psfm-space-1: 4px;
    --psfm-space-2: 8px;
    --psfm-space-3: 12px;
    --psfm-space-4: 16px;
    --psfm-space-5: 24px;
    --psfm-space-6: 32px;
    --psfm-space-7: 48px;
    --psfm-space-8: 64px;
    --psfm-radius-sm: 10px;
    --psfm-radius-md: 16px;
    --psfm-radius-lg: 24px;
    --psfm-shadow-sm: 0 8px 24px rgba(7, 26, 51, 0.08);
    --psfm-shadow-md: 0 18px 48px rgba(7, 26, 51, 0.12);
    --psfm-content: 1240px;
}

html {
    max-width: 100%;
    scroll-padding-top: 96px;
    overflow-x: clip;
}

html[lang^="en"] body,
body.site-locale-en {
    font-family: "Inter", Arial, sans-serif;
}

html[lang^="ar"] body,
body.site-locale-ar {
    font-family: "Noto Sans Arabic", "Inter", Arial, sans-serif;
}

body {
    max-width: 100%;
    color: var(--psfm-ink);
    background: var(--psfm-surface);
    line-height: 1.65;
    overflow-wrap: anywhere;
    overflow-x: clip;
}

:where(h1, h2, h3, h4, h5, h6) {
    color: var(--psfm-ink);
}

:where(.theme-btn, .btn-primary) {
    border-color: var(--psfm-red-accessible) !important;
    background: var(--psfm-red-accessible) !important;
    color: #fff !important;
}

:where(.theme-btn, .btn-primary):hover {
    border-color: var(--psfm-red-dark) !important;
    background: var(--psfm-red-dark) !important;
    color: #fff !important;
}

:where(.theme-btn-white, .btn-outline-primary) {
    border: 1px solid var(--psfm-red-accessible) !important;
    background: #fff !important;
    color: var(--psfm-red-dark) !important;
}

:where(.theme-btn-white, .btn-outline-primary):hover {
    border-color: var(--psfm-red-accessible) !important;
    background: var(--psfm-red-soft) !important;
    color: var(--psfm-red-dark) !important;
}

:where(.theme-btn, .theme-btn-white, .btn-primary, .btn-outline-primary) i {
    color: currentColor !important;
}

.main > :where(section, div) .container,
.footer-area .container,
.header .container {
    width: min(100% - 32px, var(--psfm-content));
    max-width: var(--psfm-content);
    margin-inline: auto;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--psfm-focus) !important;
    outline-offset: 3px;
}

:where(button, .btn, .theme-btn, .header-contact-chip, .psfm-mobile-action-bar a) {
    min-height: 44px;
}

:where(input, select, textarea, .form-control, .form-select) {
    min-height: 48px;
    border-radius: var(--psfm-radius-sm);
    border-color: #c8d2df;
    color: var(--psfm-ink);
}

textarea,
textarea.form-control {
    min-height: 132px;
}

:where(input, select, textarea, .form-control, .form-select):focus {
    border-color: var(--psfm-focus);
    box-shadow: 0 0 0 4px rgba(11, 99, 206, 0.14);
}

.form-label {
    display: inline-block;
    margin-bottom: var(--psfm-space-2);
    color: var(--psfm-ink);
    font-weight: 700;
}

.invalid-feedback,
.field-error {
    color: #a30d14;
    font-weight: 650;
}

.site-heading,
.psfm-ui-section-heading {
    max-width: 780px;
    margin-inline: auto;
    margin-bottom: var(--psfm-space-6);
}

.site-heading .site-title,
.psfm-ui-section-heading h2 {
    margin-bottom: var(--psfm-space-4);
    color: var(--psfm-ink);
    font-size: clamp(1.75rem, 2.4vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

html[dir="rtl"] .site-heading .site-title,
html[dir="rtl"] .psfm-ui-section-heading h2 {
    letter-spacing: 0;
    line-height: 1.35;
}

.psfm-ui-page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-block: clamp(54px, 7vw, 96px);
    background:
        linear-gradient(112deg, rgba(154, 12, 23, 0.97), rgba(200, 16, 30, 0.9)),
        var(--psfm-breadcrumb-bg, none) center / cover no-repeat !important;
    color: #fff !important;
}

.psfm-ui-page-hero::after {
    position: absolute;
    z-index: -1;
    inset-inline-end: -80px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(215, 25, 32, 0.2), transparent 68%);
    content: "";
}

.psfm-ui-page-hero__inner {
    display: grid;
    gap: var(--psfm-space-5);
    justify-items: center;
    max-width: 920px;
    text-align: center;
}

.psfm-ui-page-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #fff !important;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-shadow: 0 2px 18px rgba(57, 0, 7, 0.32);
}

html[dir="rtl"] .psfm-ui-page-hero h1 {
    letter-spacing: 0;
    line-height: 1.32;
}

.psfm-ui-page-hero p {
    max-width: 780px;
    margin: 0;
    color: #fff !important;
    font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.psfm-ui-breadcrumbs,
.psfm-ui-hero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--psfm-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.psfm-ui-breadcrumbs li,
.psfm-ui-breadcrumbs a,
.psfm-ui-hero-chips span {
    display: inline-flex;
    align-items: center;
    gap: var(--psfm-space-2);
}

.psfm-ui-breadcrumbs {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.psfm-ui-breadcrumbs a,
.psfm-ui-breadcrumbs li {
    color: #fff !important;
    font-weight: 700;
}

.psfm-ui-breadcrumbs li + li::before {
    margin-inline-end: var(--psfm-space-2);
    color: rgba(255, 255, 255, 0.55);
    content: "/";
}

.psfm-ui-hero-chips span {
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    font-weight: 700;
}

.psfm-ui-page-hero :where(i, svg) {
    color: currentColor !important;
}

.psfm-ui-page-hero :where(.psfm-ui-breadcrumbs, .psfm-ui-hero-chips span) {
    box-shadow: 0 8px 22px rgba(77, 0, 8, 0.14);
    backdrop-filter: blur(8px);
}

/* Final specificity lock: legacy visual layers use high-specificity !important rules. */
html body main.main .psfm-ui-page-hero h1,
html body main.main .psfm-ui-page-hero p,
html body main.main .psfm-ui-page-hero .psfm-ui-breadcrumbs,
html body main.main .psfm-ui-page-hero .psfm-ui-breadcrumbs li,
html body main.main .psfm-ui-page-hero .psfm-ui-breadcrumbs a,
html body main.main .psfm-ui-page-hero .psfm-ui-hero-chips span {
    color: #fff !important;
}

html body main.main .psfm-ui-page-hero .psfm-ui-breadcrumbs i,
html body main.main .psfm-ui-page-hero .psfm-ui-hero-chips span i {
    color: #fff !important;
}

html body main.main .psfm-ui-page-hero .psfm-ui-breadcrumbs,
html body main.main .psfm-ui-page-hero .psfm-ui-hero-chips span {
    border-color: rgba(255, 255, 255, 0.42) !important;
    background: rgba(92, 0, 9, 0.25) !important;
}

.psfm-ui-listing-shell {
    display: grid;
    gap: var(--psfm-space-6);
}

.psfm-ui-listing-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(180px, 0.7fr));
    gap: var(--psfm-space-3);
    align-items: end;
    padding: var(--psfm-space-5);
    border: 1px solid var(--psfm-border);
    border-radius: var(--psfm-radius-md);
    background: var(--psfm-surface);
    box-shadow: var(--psfm-shadow-sm);
}

.psfm-ui-listing-toolbar :where(input, select) {
    border-color: #b8c4d2 !important;
    background: #fff !important;
    color: var(--psfm-ink) !important;
}

.psfm-ui-listing-toolbar :where(input, select)::placeholder {
    color: #6b778a !important;
    opacity: 1;
}

html body main.main .psfm-service-filter-tab {
    border-color: var(--psfm-border) !important;
    background: #fff !important;
    color: var(--psfm-ink) !important;
}

html body main.main .psfm-service-filter-tab i {
    color: var(--psfm-red-accessible) !important;
}

html body main.main .psfm-service-filter-tab:is(.is-active, [aria-selected="true"]) {
    border-color: var(--psfm-red-accessible) !important;
    background: var(--psfm-red-accessible) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(200, 16, 30, 0.2) !important;
}

html body main.main .psfm-service-filter-tab:is(.is-active, [aria-selected="true"]) i {
    color: #fff !important;
}

.psfm-ui-listing-field {
    display: grid;
    gap: var(--psfm-space-2);
}

.psfm-ui-listing-field label {
    color: var(--psfm-ink);
    font-size: 0.88rem;
    font-weight: 800;
}

.psfm-ui-listing-search {
    position: relative;
}

.psfm-ui-listing-search i {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    color: var(--psfm-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.psfm-ui-listing-search input {
    width: 100%;
    padding-inline: 44px 16px;
}

.psfm-ui-listing-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--psfm-space-3);
    min-height: 44px;
}

.psfm-ui-listing-count {
    margin: 0;
    color: var(--psfm-muted);
    font-weight: 750;
}

.psfm-ui-clear,
.psfm-ui-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--psfm-space-2);
    padding: 11px 18px;
    border: 1px solid var(--psfm-border);
    border-radius: 999px;
    background: #fff;
    color: var(--psfm-ink);
    font-weight: 800;
}

.psfm-ui-clear:hover,
.psfm-ui-load-more:hover {
    border-color: var(--psfm-red);
    color: var(--psfm-red-dark);
}

.psfm-ui-load-more-wrap {
    display: flex;
    justify-content: center;
    padding-top: var(--psfm-space-4);
}

.psfm-ui-load-more {
    min-width: 190px;
    border-color: var(--psfm-red);
    background: var(--psfm-red);
    color: #fff;
}

.psfm-ui-load-more:hover {
    background: var(--psfm-red-dark);
    color: #fff;
}

.psfm-ui-empty {
    padding: var(--psfm-space-6);
    border: 1px dashed #b8c5d5;
    border-radius: var(--psfm-radius-md);
    background: var(--psfm-surface-soft);
    text-align: center;
}

[data-psfm-listing-item][hidden],
[data-psfm-listing-group][hidden],
[data-psfm-listing-empty][hidden],
[data-psfm-listing-more-wrap][hidden] {
    display: none !important;
}

.psfm-ui-listing-shell[data-psfm-listing-ready="1"] .psfm-ui-pagination-fallback {
    display: none;
}

.psfm-service-card,
.seo-link-card,
.blog-item,
.career-opening-card,
.psfm-faq-item {
    background: #fff;
    border-color: var(--psfm-border);
    border-radius: var(--psfm-radius-md);
    box-shadow: var(--psfm-shadow-sm);
}

:where(
    .service-category-icon,
    .pillar-icon,
    .proof-icon,
    .trust-icon,
    .industry-icon,
    .psfm-recommendation-icon,
    .process-number,
    .psfm-service-icon,
    .seo-link-card .seo-chip
) {
    border: 1px solid rgba(200, 16, 30, 0.18) !important;
    background: var(--psfm-red-soft) !important;
    color: var(--psfm-red-accessible) !important;
}

:where(
    .service-category-icon,
    .pillar-icon,
    .proof-icon,
    .trust-icon,
    .industry-icon,
    .psfm-recommendation-icon,
    .process-number,
    .psfm-service-icon,
    .seo-link-card .seo-chip
) :where(i, svg) {
    color: currentColor !important;
}

:where(.psfm-service-card, .seo-link-card, .blog-item, .career-opening-card, .psfm-faq-item) :where(h2, h3, h4, strong) {
    color: var(--psfm-ink) !important;
}

:where(.psfm-service-card, .seo-link-card, .blog-item, .career-opening-card, .psfm-faq-item) :where(p, small) {
    color: var(--psfm-muted) !important;
}

.homepage-shell.is-dark {
    background: linear-gradient(135deg, var(--psfm-red-dark), var(--psfm-red-accessible)) !important;
}

.homepage-shell.is-dark .homepage-section-intro :where(.site-title-tagline, h2, p) {
    color: #fff !important;
}

.homepage-shell.is-dark .industry-card {
    border: 1px solid rgba(255, 255, 255, 0.58) !important;
    background: #fff !important;
    box-shadow: 0 14px 34px rgba(84, 0, 8, 0.18) !important;
}

.homepage-shell.is-dark .industry-card :where(h3, strong) {
    color: var(--psfm-ink) !important;
}

.homepage-shell.is-dark .industry-card p {
    color: var(--psfm-muted) !important;
}

.psfm-service-card,
.blog-item,
.career-opening-card {
    height: 100%;
}

.psfm-service-card:hover,
.seo-link-card:hover,
.blog-item:hover,
.career-opening-card:hover {
    border-color: rgba(215, 25, 32, 0.34);
    box-shadow: var(--psfm-shadow-md);
    transform: translateY(-3px);
}

.footer-area :where(a, button),
.header :where(a, button) {
    min-height: 44px;
}

.footer-contact li,
.footer-contact li > a {
    align-items: flex-start;
    gap: 12px;
}

.footer-contact li > i,
.footer-contact li > a > i {
    flex: 0 0 22px;
    margin-top: 3px;
    text-align: center;
}

.footer-floating-contact .footer-floating-contact-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.footer-floating-contact .btn {
    width: 48px;
    min-width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

@media (max-width: 1199.98px) {
    .header .navbar-nav .nav-link {
        padding-inline: 9px;
        font-size: 0.88rem;
    }

    .header-contact-chip {
        display: none !important;
    }
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    }

    .main > :where(section, div) .container,
    .footer-area .container,
    .header .container {
        width: min(100% - 24px, var(--psfm-content));
    }

    .psfm-ui-page-hero {
        padding-block: 48px 54px;
    }

    .psfm-ui-listing-toolbar {
        grid-template-columns: 1fr 1fr;
        padding: var(--psfm-space-4);
    }

    .psfm-ui-listing-field:first-child {
        grid-column: 1 / -1;
    }

    .footer-floating-contact {
        display: none !important;
    }

    #scroll-top {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .psfm-ai-launcher,
    .psfm-ai-assistant-launcher {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 575.98px) {
    .psfm-ui-page-hero,
    .psfm-ui-listing-shell,
    .psfm-ui-listing-toolbar {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    html[dir="rtl"] .psfm-ui-page-hero::after {
        display: none;
    }

    .main > :where(section, div) .container,
    .footer-area .container,
    .header .container {
        width: min(100% - 20px, var(--psfm-content));
    }

    .psfm-ui-page-hero__inner {
        justify-items: stretch;
        text-align: start;
    }

    .psfm-ui-page-hero h1 {
        font-size: clamp(1.85rem, 9vw, 2.55rem);
    }

    .psfm-ui-breadcrumbs,
    .psfm-ui-hero-chips {
        justify-content: flex-start;
    }

    .psfm-ui-listing-toolbar {
        grid-template-columns: 1fr;
    }

    .psfm-ui-listing-field:first-child {
        grid-column: auto;
    }

    .psfm-ui-listing-meta {
        align-items: stretch;
        flex-direction: column;
    }

    .psfm-ui-clear {
        width: 100%;
    }
}

html[dir="rtl"] .psfm-ui-page-hero__inner,
html[dir="rtl"] .psfm-ui-listing-toolbar,
html[dir="rtl"] .psfm-ui-listing-meta {
    direction: rtl;
}

html[dir="rtl"],
html[dir="rtl"] body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
}

/* Keep the browser viewport origin stable while page content remains RTL. */
html[dir="rtl"] {
    direction: ltr;
}

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .psfm-ui-listing-field,
html[dir="rtl"] .psfm-ui-empty {
    text-align: right;
}

html[dir="rtl"] .psfm-service-card,
html[dir="rtl"] .blog-item,
html[dir="rtl"] .career-opening-card,
html[dir="rtl"] .psfm-faq-item {
    text-align: right;
}

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