/*
 * AJRFED Institutional Design
 * Scoped under body.ajrfed-design-on so disabling the plugin restores the site.
 */

body.ajrfed-design-on {
    --ajrfed-white: #ffffff;
    --ajrfed-muted: #697087;
    --ajrfed-border: rgba(107, 42, 144, 0.13);
    --ajrfed-shadow-sm: 0 8px 24px rgba(32, 35, 58, 0.07);
    --ajrfed-shadow-md: 0 18px 48px rgba(32, 35, 58, 0.11);
    --ajrfed-radius-sm: 10px;
    --ajrfed-radius-md: 18px;
    --ajrfed-radius-lg: 28px;
    --ajrfed-content: 1240px;

    direction: rtl;
    color: var(--ajrfed-ink);
    background: var(--ajrfed-surface);
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: 17px;
    line-height: 1.9;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.ajrfed-design-on *,
body.ajrfed-design-on *::before,
body.ajrfed-design-on *::after {
    box-sizing: border-box;
}

body.ajrfed-design-on :where(h1, h2, h3, h4, h5, h6),
body.ajrfed-design-on :where(.site-title, .main-header-menu, button, .button, .wp-block-button__link, input[type="submit"], .elementor-button, .uagb-buttons-repeater, .premium-blog-entry-title) {
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
}

body.ajrfed-design-on :where(h1, h2, h3, h4, h5, h6) {
    color: var(--ajrfed-ink);
    letter-spacing: 0;
    line-height: 1.45;
}

body.ajrfed-design-on h1 { font-size: clamp(1.9rem, 3.4vw, 3.1rem); font-weight: 700; }
body.ajrfed-design-on h2 { font-size: clamp(1.45rem, 2.5vw, 2.15rem); font-weight: 700; }
body.ajrfed-design-on h3 { font-size: clamp(1.25rem, 2.1vw, 1.7rem); font-weight: 650; }

body.ajrfed-design-on a {
    color: var(--ajrfed-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color .22s ease, background-color .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
body.ajrfed-design-on a:hover { color: var(--ajrfed-secondary); }
body.ajrfed-design-on a:focus-visible,
body.ajrfed-design-on button:focus-visible,
body.ajrfed-design-on input:focus-visible,
body.ajrfed-design-on textarea:focus-visible,
body.ajrfed-design-on select:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ajrfed-secondary) 45%, transparent);
    outline-offset: 3px;
}

body.ajrfed-design-on img {
    max-width: 100%;
    height: auto;
}

/* Header and navigation */
body.ajrfed-design-on :where(.site-header, #masthead, .ast-primary-header-bar, .main-header-bar) {
    background: rgba(255, 255, 255, .96) !important;
    border-bottom: 1px solid var(--ajrfed-border) !important;
}

body.ajrfed-design-on.ajrfed-sticky-header :where(#masthead, .site-header) {
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 6px 28px rgba(32, 35, 58, .08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

body.admin-bar.ajrfed-design-on.ajrfed-sticky-header :where(#masthead, .site-header) {
    top: 32px;
}

body.ajrfed-design-on :where(.ast-builder-grid-row, .site-header .ast-container) {
    width: min(100% - 36px, var(--ajrfed-content));
    min-height: 88px;
}

body.ajrfed-design-on :where(.custom-logo, .site-logo-img img, .ast-site-identity img) {
    width: clamp(76px, 7vw, 104px) !important;
    max-height: 104px !important;
    object-fit: contain;
    filter: drop-shadow(0 7px 13px rgba(32, 35, 58, .11));
}

body.ajrfed-design-on :where(.site-title, .site-title a) {
    color: var(--ajrfed-ink) !important;
    font-size: clamp(1rem, 1.35vw, 1.28rem) !important;
    font-weight: 700 !important;
    line-height: 1.65 !important;
}

body.ajrfed-design-on :where(.main-header-menu > .menu-item > .menu-link, .ast-builder-menu-1 .menu-item > .menu-link) {
    min-height: 52px;
    padding-inline: 12px !important;
    color: var(--ajrfed-ink) !important;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.5;
    border-radius: 9px;
}

body.ajrfed-design-on :where(.main-header-menu > .menu-item > .menu-link, .ast-builder-menu-1 .menu-item > .menu-link):hover,
body.ajrfed-design-on :where(.main-header-menu > .current-menu-item > .menu-link, .main-header-menu > .current-menu-ancestor > .menu-link, .ast-builder-menu-1 .current-menu-item > .menu-link) {
    color: var(--ajrfed-primary) !important;
    background: color-mix(in srgb, var(--ajrfed-primary) 8%, white) !important;
}

body.ajrfed-design-on :where(.main-header-menu .sub-menu, .ast-builder-menu-mobile .main-navigation) {
    border: 1px solid var(--ajrfed-border) !important;
    border-radius: 14px !important;
    box-shadow: var(--ajrfed-shadow-md) !important;
    overflow: hidden;
}

body.ajrfed-design-on :where(.menu-toggle, .ast-mobile-menu-trigger-minimal) {
    color: var(--ajrfed-primary) !important;
    border-radius: 10px;
}

/* Main page frame */
body.ajrfed-design-on :where(#content, .site-content) {
    background: transparent;
}

body.ajrfed-design-on :where(.ast-container, .site-content > .ast-container) {
    max-width: var(--ajrfed-content);
}

body.ajrfed-design-on:not(.home) :where(.site-main > article, .ast-article-single) {
    background: var(--ajrfed-white);
    border: 1px solid var(--ajrfed-border);
    border-radius: var(--ajrfed-radius-md);
    box-shadow: var(--ajrfed-shadow-sm);
}

body.ajrfed-design-on:not(.home) :where(.ast-article-single, .site-main > article) {
    padding: clamp(24px, 4vw, 52px);
    margin-block: 40px;
}

body.ajrfed-design-on :where(.entry-title, .page-title, .ast-archive-title) {
    color: var(--ajrfed-ink) !important;
    font-weight: 700;
}

body.ajrfed-design-on :where(.entry-content p, .entry-content li) {
    color: #373b4d;
    line-height: 2;
}

body.ajrfed-design-on .entry-content :where(ul, ol) {
    padding-inline-start: 1.45em;
}

body.ajrfed-design-on .entry-content li::marker {
    color: var(--ajrfed-secondary);
    font-weight: 700;
}

/* Buttons */
body.ajrfed-design-on :where(.button, button:not(.menu-toggle), input[type="submit"], .wp-block-button__link, .elementor-button, .uagb-buttons-repeater) {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--ajrfed-primary), var(--ajrfed-secondary)) !important;
    border: 0 !important;
    border-radius: 11px !important;
    box-shadow: 0 9px 22px color-mix(in srgb, var(--ajrfed-primary) 24%, transparent) !important;
    font-size: 15px;
    font-weight: 650;
    text-decoration: none !important;
}

body.ajrfed-design-on :where(.button, button:not(.menu-toggle), input[type="submit"], .wp-block-button__link, .elementor-button, .uagb-buttons-repeater):hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--ajrfed-primary) 31%, transparent) !important;
}

/* Homepage hero: existing Elementor section retained, only restyled. */
body.home.ajrfed-design-on .elementor-element-134ac7a9 {
    min-height: clamp(520px, 67vh, 720px) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    overflow: hidden;
    border-radius: 0 0 clamp(28px, 4vw, 54px) clamp(28px, 4vw, 54px);
    box-shadow: 0 24px 60px rgba(32, 35, 58, .17);
    background-position: center !important;
}

body.home.ajrfed-design-on .elementor-element-134ac7a9::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    opacity: .86 !important;
    background:
        radial-gradient(circle at 15% 18%, rgba(214, 180, 92, .25), transparent 27%),
        linear-gradient(118deg, rgba(32, 35, 58, .95) 0%, color-mix(in srgb, var(--ajrfed-primary) 88%, black) 48%, color-mix(in srgb, var(--ajrfed-secondary) 79%, black) 100%) !important;
}

body.home.ajrfed-design-on .elementor-element-134ac7a9 > * {
    position: relative;
    z-index: 2;
}

body.home.ajrfed-design-on .elementor-element-df3580f :where(h1, h2, span, div) {
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
}

body.home.ajrfed-design-on .elementor-element-df3580f :where(h1, .premium-dual-header-first-header, .premium-dual-header-first-span) {
    max-width: 1050px;
    margin-inline: auto !important;
    color: #fff !important;
    font-size: clamp(2.15rem, 5vw, 4.35rem) !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 7px 28px rgba(0, 0, 0, .28);
}

body.home.ajrfed-design-on .elementor-element-65b15fd .elementor-heading-title {
    max-width: 850px;
    margin: 22px auto 0;
    color: rgba(255,255,255,.93) !important;
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: clamp(1rem, 1.9vw, 1.25rem) !important;
    font-weight: 500;
    line-height: 1.9;
    text-align: center;
}

body.home.ajrfed-design-on .elementor-element-f3d5919 .elementor-button {
    margin-top: 22px;
    background: linear-gradient(135deg, var(--ajrfed-accent), #f0d487) !important;
    color: var(--ajrfed-ink) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,.2) !important;
}

/* About block */
body.home.ajrfed-design-on .elementor-element-45q2ogh {
    max-width: min(100% - 32px, var(--ajrfed-content));
    margin: clamp(50px, 7vw, 92px) auto 0 !important;
    padding: clamp(36px, 6vw, 72px) !important;
    background: #fff !important;
    border: 1px solid var(--ajrfed-border);
    border-radius: var(--ajrfed-radius-lg);
    box-shadow: var(--ajrfed-shadow-md);
    position: relative;
    overflow: hidden;
}

body.home.ajrfed-design-on .elementor-element-45q2ogh::after {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    inset-inline-start: -95px;
    inset-block-end: -115px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--ajrfed-secondary) 15%, transparent), transparent 70%);
    pointer-events: none;
}

body.home.ajrfed-design-on .elementor-element-e7d1eaf .elementor-heading-title {
    color: var(--ajrfed-primary) !important;
    font-size: clamp(1.65rem, 3vw, 2.45rem) !important;
    text-align: right !important;
}

body.home.ajrfed-design-on .elementor-element-ab3ce48 .elementor-divider-separator {
    width: 92px !important;
    border-top-width: 4px !important;
    border-color: var(--ajrfed-secondary) !important;
    border-radius: 999px;
}

body.home.ajrfed-design-on .elementor-element-01dd3f1 {
    max-width: 1000px;
}
body.home.ajrfed-design-on .elementor-element-01dd3f1 p {
    color: #3a3f52 !important;
    font-size: clamp(1rem, 1.45vw, 1.13rem);
    line-height: 2.15;
    text-align: justify !important;
}

body.home.ajrfed-design-on .elementor-element-f4454ec .elementor-social-icon {
    width: 44px;
    height: 44px;
    background: color-mix(in srgb, var(--ajrfed-primary) 9%, white) !important;
    color: var(--ajrfed-primary) !important;
    border: 1px solid var(--ajrfed-border);
}
body.home.ajrfed-design-on .elementor-element-f4454ec .elementor-social-icon:hover {
    background: var(--ajrfed-primary) !important;
    color: #fff !important;
    transform: translateY(-3px);
}

/* Vision / Mission tabs */
body.home.ajrfed-design-on .elementor-element-a2a4885 {
    max-width: min(100% - 32px, var(--ajrfed-content));
    margin: clamp(34px, 5vw, 64px) auto 0;
    padding: clamp(26px, 4.5vw, 52px);
    background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--ajrfed-primary) 4%, white));
    border: 1px solid var(--ajrfed-border);
    border-radius: var(--ajrfed-radius-lg);
    box-shadow: var(--ajrfed-shadow-sm);
}

body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
    gap: 10px !important;
}

body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tab-title, [role="tab"]) {
    min-height: 48px;
    padding: 10px 20px !important;
    color: var(--ajrfed-ink) !important;
    background: #fff !important;
    border: 1px solid var(--ajrfed-border) !important;
    border-radius: 10px !important;
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-weight: 600 !important;
    box-shadow: 0 5px 16px rgba(32,35,58,.05);
}

body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tab-title[aria-selected="true"], [role="tab"][aria-selected="true"], .e-active) {
    color: #fff !important;
    background: linear-gradient(135deg, var(--ajrfed-primary), var(--ajrfed-secondary)) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--ajrfed-primary) 22%, transparent);
}

body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-content, [role="tabpanel"]) {
    margin-top: 18px;
    padding: clamp(22px, 4vw, 40px) !important;
    background: #fff;
    border: 1px solid var(--ajrfed-border);
    border-radius: 16px;
}

body.home.ajrfed-design-on .elementor-element-072bcf0 :where(p, li) {
    color: #3a3f52;
    line-height: 2.05;
}

/* Latest news */
body.home.ajrfed-design-on .elementor-element-8038233 {
    max-width: min(100% - 32px, var(--ajrfed-content));
    margin: clamp(44px, 7vw, 92px) auto;
    padding: clamp(20px, 3vw, 36px) 0;
}

body.home.ajrfed-design-on .elementor-element-31f4971 .elementor-heading-title {
    color: var(--ajrfed-ink) !important;
    font-size: clamp(1.75rem, 3vw, 2.6rem) !important;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}
body.home.ajrfed-design-on .elementor-element-31f4971 .elementor-heading-title::after {
    content: "";
    position: absolute;
    width: 82px;
    height: 4px;
    inset-inline-start: 50%;
    bottom: 0;
    transform: translateX(50%);
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ajrfed-primary), var(--ajrfed-secondary));
}

body.ajrfed-design-on :where(.premium-blog-post-outer-container, .premium-blog-post-container, .ast-article-post, .blog-layout-1, .wp-block-post) {
    background: #fff !important;
    border: 1px solid var(--ajrfed-border) !important;
    border-radius: var(--ajrfed-radius-md) !important;
    box-shadow: var(--ajrfed-shadow-sm) !important;
    overflow: hidden;
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

body.ajrfed-design-on :where(.premium-blog-post-outer-container, .premium-blog-post-container, .ast-article-post, .blog-layout-1, .wp-block-post):hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--ajrfed-primary) 28%, transparent) !important;
    box-shadow: var(--ajrfed-shadow-md) !important;
}

body.ajrfed-design-on :where(.premium-blog-thumbnail-container img, .post-thumb img, .wp-post-image) {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover !important;
    transition: transform .45s ease;
}
body.ajrfed-design-on :where(.premium-blog-post-outer-container, .premium-blog-post-container, .ast-article-post):hover :where(.premium-blog-thumbnail-container img, .post-thumb img, .wp-post-image) {
    transform: scale(1.035);
}

body.ajrfed-design-on :where(.premium-blog-content-wrapper, .ast-blog-featured-section + .entry-header, .ast-article-post .entry-header, .ast-article-post .entry-content) {
    padding-inline: clamp(18px, 2vw, 26px) !important;
}

body.ajrfed-design-on :where(.premium-blog-entry-title, .entry-title) a {
    color: var(--ajrfed-ink) !important;
    font-weight: 700;
    line-height: 1.75;
    text-decoration: none;
}
body.ajrfed-design-on :where(.premium-blog-entry-title, .entry-title) a:hover {
    color: var(--ajrfed-primary) !important;
}

body.ajrfed-design-on :where(.premium-blog-entry-meta, .entry-meta, .posted-on, .cat-links, .comments-link) {
    color: var(--ajrfed-muted) !important;
    font-size: 13px;
}

body.home.ajrfed-design-on.ajrfed-clean-home-meta :where(.premium-blog-post-author, .premium-blog-post-comments, .premium-blog-post-categories, .entry-meta .author, .entry-meta .comments-link, .entry-meta .cat-links) {
    display: none !important;
}

body.ajrfed-design-on :where(.premium-blog-excerpt-link, .read-more a, .ast-button, .premium-blog-post-content a.read-more) {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ajrfed-primary) !important;
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none !important;
}

body.ajrfed-design-on :where(.slick-dots li button::before, .premium-carousel-dots li button::before) {
    color: var(--ajrfed-primary) !important;
}

/* Forms, subscription, contact */
body.ajrfed-design-on :where(input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), textarea, select) {
    min-height: 50px;
    padding: 11px 15px !important;
    color: var(--ajrfed-ink) !important;
    background: #fff !important;
    border: 1px solid rgba(32,35,58,.16) !important;
    border-radius: 10px !important;
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: 15px !important;
    text-align: right;
    box-shadow: inset 0 1px 2px rgba(32,35,58,.025);
}
body.ajrfed-design-on textarea { min-height: 150px; resize: vertical; }
body.ajrfed-design-on :where(input, textarea, select):focus {
    border-color: var(--ajrfed-primary) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ajrfed-primary) 10%, transparent) !important;
    outline: none;
}
body.ajrfed-design-on :where(label, .uagb-forms-input-label, .sureforms-field-label) {
    color: var(--ajrfed-ink) !important;
    font-weight: 600;
}
body.ajrfed-design-on :where(.uagb-forms-success-message, .sureforms-success-message) {
    color: #155b3f !important;
    background: #edf9f3 !important;
    border: 1px solid #bce6d1 !important;
    border-radius: 10px;
}
body.ajrfed-design-on :where(.uagb-forms-failed-message, .sureforms-error-message) {
    color: #8a2432 !important;
    background: #fff1f3 !important;
    border: 1px solid #f1bdc5 !important;
    border-radius: 10px;
}

/* Tables */
body.ajrfed-design-on table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ajrfed-border);
    border-radius: 13px;
}
body.ajrfed-design-on th {
    color: #fff;
    background: linear-gradient(135deg, var(--ajrfed-primary), color-mix(in srgb, var(--ajrfed-primary) 78%, black));
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}
body.ajrfed-design-on :where(th, td) {
    padding: 13px 16px;
    border-color: rgba(32,35,58,.1) !important;
    text-align: right;
}
body.ajrfed-design-on tbody tr:nth-child(even) { background: var(--ajrfed-surface); }

/* Pagination */
body.ajrfed-design-on :where(.ast-pagination, .nav-links, .page-numbers) {
    gap: 8px;
}
body.ajrfed-design-on .page-numbers:not(.dots) {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--ajrfed-border);
    border-radius: 9px;
    text-decoration: none;
}
body.ajrfed-design-on .page-numbers.current,
body.ajrfed-design-on .page-numbers:hover {
    color: #fff !important;
    background: var(--ajrfed-primary);
    border-color: var(--ajrfed-primary);
}

/* Footer */
body.ajrfed-design-on :where(.site-footer, #colophon, .site-below-footer-wrap, .ast-small-footer) {
    color: rgba(255,255,255,.84) !important;
    background:
        radial-gradient(circle at 80% -10%, color-mix(in srgb, var(--ajrfed-secondary) 34%, transparent), transparent 32%),
        linear-gradient(145deg, #20233a, color-mix(in srgb, var(--ajrfed-primary) 62%, #20233a)) !important;
}
body.ajrfed-design-on :where(.site-footer, #colophon) {
    border-top: 4px solid var(--ajrfed-accent);
}
body.ajrfed-design-on :where(.site-footer h2, .site-footer h3, .site-footer h4, .site-footer .widget-title, #colophon h2, #colophon h3) {
    color: #fff !important;
}
body.ajrfed-design-on :where(.site-footer a, #colophon a) {
    color: rgba(255,255,255,.88) !important;
    text-decoration: none;
}
body.ajrfed-design-on :where(.site-footer a, #colophon a):hover {
    color: #fff !important;
}
body.ajrfed-design-on :where(.site-below-footer-wrap, .ast-small-footer) {
    border-top: 1px solid rgba(255,255,255,.12) !important;
}

/* Existing WhatsApp bubble */
body.ajrfed-design-on .wa-label {
    color: var(--ajrfed-ink) !important;
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
    border: 1px solid rgba(32,35,58,.08);
}

/* Responsive refinements */
@media (max-width: 1100px) {
    body.ajrfed-design-on :where(.main-header-menu > .menu-item > .menu-link, .ast-builder-menu-1 .menu-item > .menu-link) {
        padding-inline: 8px !important;
        font-size: 13.5px;
    }
}

@media (max-width: 921px) {
    body.ajrfed-design-on :where(.ast-builder-grid-row, .site-header .ast-container) {
        min-height: 76px;
    }
    body.ajrfed-design-on :where(.ast-builder-menu-mobile .main-navigation, .ast-mobile-popup-drawer .ast-mobile-popup-inner) {
        background: #fff !important;
    }
    body.ajrfed-design-on :where(.ast-builder-menu-mobile .menu-item > .menu-link) {
        min-height: 48px;
        color: var(--ajrfed-ink) !important;
        border-bottom: 1px solid rgba(32,35,58,.07);
        font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    }
    body.home.ajrfed-design-on .elementor-element-134ac7a9 {
        min-height: 560px !important;
        padding-inline: 24px !important;
    }
}

@media (max-width: 782px) {
    body.admin-bar.ajrfed-design-on.ajrfed-sticky-header :where(#masthead, .site-header) { top: 46px; }
}

@media (max-width: 767px) {
    body.ajrfed-design-on { font-size: 16px; line-height: 1.85; }
    body.ajrfed-design-on :where(.ast-builder-grid-row, .site-header .ast-container) {
        width: min(100% - 24px, var(--ajrfed-content));
    }
    body.ajrfed-design-on :where(.custom-logo, .site-logo-img img, .ast-site-identity img) {
        width: 68px !important;
        max-height: 68px !important;
    }
    body.home.ajrfed-design-on .elementor-element-134ac7a9 {
        min-height: 500px !important;
        border-radius: 0 0 26px 26px;
    }
    body.home.ajrfed-design-on .elementor-element-df3580f :where(h1, .premium-dual-header-first-header, .premium-dual-header-first-span) {
        font-size: clamp(1.85rem, 9vw, 2.65rem) !important;
        line-height: 1.65 !important;
    }
    body.home.ajrfed-design-on :where(.elementor-element-45q2ogh, .elementor-element-a2a4885, .elementor-element-8038233) {
        max-width: calc(100% - 22px);
    }
    body.home.ajrfed-design-on .elementor-element-45q2ogh,
    body.home.ajrfed-design-on .elementor-element-a2a4885 {
        border-radius: 19px;
    }
    body.home.ajrfed-design-on .elementor-element-01dd3f1 p {
        text-align: right !important;
    }
    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    body.ajrfed-design-on:not(.home) :where(.ast-article-single, .site-main > article) {
        margin-block: 20px;
        border-radius: 15px;
    }
    body.ajrfed-design-on .wa-float {
        bottom: 18px;
        left: 14px;
    }
    body.ajrfed-design-on .wa-label { display: none; }
}

@media (max-width: 480px) {
    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
        grid-template-columns: 1fr;
    }
}

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

/* ================================================================
 * Version 1.1.0 — news archive, Arabic joining and precise typography
 * ================================================================ */

/* Arabic letters must remain naturally joined in buttons, tabs and menus. */
body.ajrfed-design-on :where(
    .button,
    button,
    input[type="submit"],
    .wp-block-button__link,
    .elementor-button,
    .elementor-button-text,
    .uagb-buttons-repeater,
    .ast-custom-button,
    .ast-custom-button-link,
    .e-n-tab-title,
    .e-n-tab-title-text,
    [role="tab"],
    .menu-link
) {
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    font-kerning: normal;
    font-variant-ligatures: common-ligatures contextual;
    font-feature-settings: "liga" 1, "calt" 1;
}

body.ajrfed-design-on :where(
    .button,
    button:not(.menu-toggle),
    input[type="submit"],
    .wp-block-button__link,
    .elementor-button,
    .uagb-buttons-repeater,
    .ast-custom-button,
    .ast-custom-button-link
) {
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    line-height: 1.6 !important;
}

/* Astra header CTA: a proper-sized, single-line “اتصل بنا” button. */
body.ajrfed-design-on :where(
    .ast-builder-button-wrap .ast-custom-button,
    .ast-header-button-1 .ast-custom-button,
    .ast-custom-button-link .ast-custom-button,
    .site-header .ast-custom-button-link,
    .site-header .ast-custom-button
) {
    min-width: 126px !important;
    min-height: 48px !important;
    width: auto !important;
    padding: 10px 22px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    color: #fff !important;
    background: linear-gradient(135deg, var(--ajrfed-primary), var(--ajrfed-secondary)) !important;
    border: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    border-radius: 11px !important;
    box-shadow: 0 9px 22px color-mix(in srgb, var(--ajrfed-primary) 24%, transparent) !important;
    text-decoration: none !important;
}

body.ajrfed-design-on :where(
    .ast-builder-button-wrap .ast-custom-button *,
    .ast-header-button-1 .ast-custom-button *,
    .site-header .ast-custom-button-link *,
    .site-header .ast-custom-button *
) {
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    white-space: nowrap !important;
}

/* Homepage institutional tabs: equal, readable boxes on every screen. */
body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 10px !important;
}

body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tab-title, [role="tab"]) {
    flex: 1 1 145px !important;
    min-width: 132px !important;
    min-height: 54px !important;
    width: auto !important;
    padding: 11px 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
}

body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tab-title-text, [role="tab"] > span, [role="tab"] > div) {
    display: inline !important;
    white-space: nowrap !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
}

/* Prevent archive and carousel post titles from inheriting oversized global H2 rules. */
body.ajrfed-design-on :where(
    .premium-blog-entry-title,
    .wp-block-post-title,
    .wp-block-query .wp-block-post-title,
    .ast-article-post .entry-title,
    .blog-layout-1 .entry-title
) {
    margin-block: 0 10px !important;
    font-size: clamp(1rem, 1.45vw, 1.2rem) !important;
    line-height: 1.75 !important;
    letter-spacing: 0 !important;
}

body.ajrfed-design-on :where(
    .premium-blog-entry-title a,
    .wp-block-post-title a,
    .wp-block-query .wp-block-post-title a,
    .ast-article-post .entry-title a
) {
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: 0 !important;
}

/* Homepage latest-news section: compact institutional hierarchy. */
body.home.ajrfed-design-on .elementor-element-31f4971 .elementor-heading-title {
    font-size: clamp(1.65rem, 2.65vw, 2.25rem) !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
}

body.home.ajrfed-design-on .elementor-element-962ed8f :where(.premium-blog-entry-title, .premium-blog-entry-title a) {
    font-size: clamp(1rem, 1.35vw, 1.16rem) !important;
    line-height: 1.8 !important;
}

body.home.ajrfed-design-on .elementor-element-962ed8f :where(.premium-blog-post-content, .premium-blog-post-content p) {
    font-size: 15px !important;
    line-height: 1.9 !important;
}

body.home.ajrfed-design-on .elementor-element-962ed8f :where(.premium-blog-post-container, .premium-blog-post-outer-container) {
    height: 100%;
}

body.ajrfed-design-on .ajrfed-home-news-more {
    display: flex;
    justify-content: center;
    margin-top: clamp(24px, 3vw, 38px);
}

body.ajrfed-design-on .ajrfed-home-news-more__link {
    min-width: 220px;
    min-height: 50px;
    padding: 11px 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--ajrfed-primary), var(--ajrfed-secondary));
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--ajrfed-primary) 22%, transparent);
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0;
    text-decoration: none !important;
}

body.ajrfed-design-on .ajrfed-home-news-more__link:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--ajrfed-primary) 30%, transparent);
}

/* Dedicated professional news and announcements archive. */
body.ajrfed-design-on.ajrfed-news-page :where(.entry-title, .page-title, .ast-archive-title) {
    margin-bottom: clamp(22px, 3vw, 34px) !important;
    color: var(--ajrfed-ink) !important;
    font-size: clamp(1.65rem, 2.6vw, 2.2rem) !important;
    line-height: 1.55 !important;
    letter-spacing: 0 !important;
    text-align: right !important;
}

body.ajrfed-design-on.ajrfed-news-page :where(.ast-article-single, .site-main > article) {
    padding: clamp(22px, 3.6vw, 46px) !important;
}

body.ajrfed-design-on .ajrfed-news-archive {
    width: 100%;
    direction: rtl;
}

body.ajrfed-design-on .ajrfed-news-archive__intro {
    margin-bottom: clamp(24px, 3vw, 38px);
    padding: 16px 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--ajrfed-primary) 6%, white), #fff);
    border: 1px solid var(--ajrfed-border);
    border-inline-start: 4px solid var(--ajrfed-primary);
    border-radius: 12px;
}

body.ajrfed-design-on .ajrfed-news-archive__intro p {
    margin: 0;
    color: #4b5063;
    font-size: 15px;
    line-height: 1.9;
}

body.ajrfed-design-on .ajrfed-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2.4vw, 28px);
    align-items: stretch;
}

body.ajrfed-design-on .ajrfed-news-card {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--ajrfed-border);
    border-radius: 17px;
    box-shadow: var(--ajrfed-shadow-sm);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

body.ajrfed-design-on .ajrfed-news-card:hover {
    transform: translateY(-5px);
    border-color: color-mix(in srgb, var(--ajrfed-primary) 28%, transparent);
    box-shadow: var(--ajrfed-shadow-md);
}

body.ajrfed-design-on .ajrfed-news-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(145deg, color-mix(in srgb, var(--ajrfed-primary) 7%, white), #fff);
    text-decoration: none !important;
}

body.ajrfed-design-on .ajrfed-news-card__image {
    width: 100%;
    height: 100% !important;
    display: block;
    object-fit: cover !important;
    transition: transform .42s ease;
}

body.ajrfed-design-on .ajrfed-news-card:hover .ajrfed-news-card__image {
    transform: scale(1.035);
}

body.ajrfed-design-on .ajrfed-news-card__fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 30px;
}

body.ajrfed-design-on .ajrfed-news-card__fallback img {
    width: min(46%, 150px);
    max-height: 150px;
    object-fit: contain;
    opacity: .72;
}

body.ajrfed-design-on .ajrfed-news-card__body {
    flex: 1;
    min-width: 0;
    padding: 19px 20px 21px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

body.ajrfed-design-on .ajrfed-news-card__date {
    margin-bottom: 9px;
    color: var(--ajrfed-muted);
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
}

body.ajrfed-design-on .ajrfed-news-card__title {
    margin: 0 0 10px !important;
    color: var(--ajrfed-ink) !important;
    font-size: clamp(1rem, 1.3vw, 1.16rem) !important;
    font-weight: 700 !important;
    line-height: 1.8 !important;
    letter-spacing: 0 !important;
}

body.ajrfed-design-on .ajrfed-news-card__title a {
    color: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
}

body.ajrfed-design-on .ajrfed-news-card__title a:hover {
    color: var(--ajrfed-primary) !important;
}

body.ajrfed-design-on .ajrfed-news-card__excerpt {
    margin: 0 0 16px;
    color: #555b6e !important;
    font-size: 14.5px !important;
    line-height: 1.95 !important;
}

body.ajrfed-design-on .ajrfed-news-card__more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ajrfed-primary) !important;
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: 0;
    text-decoration: none !important;
}

body.ajrfed-design-on .ajrfed-news-card__more:hover {
    color: var(--ajrfed-secondary) !important;
}

body.ajrfed-design-on .ajrfed-news-pagination {
    margin-top: clamp(30px, 4vw, 48px);
}

body.ajrfed-design-on .ajrfed-news-pagination ul.page-numbers {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none;
}

body.ajrfed-design-on .ajrfed-news-pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
}

body.ajrfed-design-on .ajrfed-news-pagination .page-numbers {
    min-width: 44px;
    min-height: 44px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ajrfed-ink) !important;
    background: #fff;
    border: 1px solid var(--ajrfed-border);
    border-radius: 10px;
    font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
}

body.ajrfed-design-on .ajrfed-news-pagination .page-numbers.current,
body.ajrfed-design-on .ajrfed-news-pagination a.page-numbers:hover {
    color: #fff !important;
    background: linear-gradient(135deg, var(--ajrfed-primary), var(--ajrfed-secondary));
    border-color: transparent;
}

body.ajrfed-design-on .ajrfed-news-empty {
    padding: 34px 24px;
    color: var(--ajrfed-muted);
    background: #fff;
    border: 1px dashed var(--ajrfed-border);
    border-radius: 14px;
    text-align: center;
}

@media (max-width: 980px) {
    body.ajrfed-design-on .ajrfed-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.ajrfed-design-on :where(
        .ast-builder-button-wrap .ast-custom-button,
        .ast-header-button-1 .ast-custom-button,
        .ast-custom-button-link .ast-custom-button,
        .site-header .ast-custom-button-link,
        .site-header .ast-custom-button
    ) {
        min-width: 112px !important;
        min-height: 44px !important;
        padding: 9px 16px !important;
        font-size: 14px !important;
    }

    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tab-title, [role="tab"]) {
        min-width: 0 !important;
        width: 100% !important;
        min-height: 52px !important;
        padding-inline: 12px !important;
        font-size: 14px !important;
    }

    body.ajrfed-design-on.ajrfed-news-page :where(.entry-title, .page-title, .ast-archive-title) {
        font-size: clamp(1.45rem, 7vw, 1.85rem) !important;
    }

    body.ajrfed-design-on .ajrfed-news-grid {
        grid-template-columns: 1fr;
    }

    body.ajrfed-design-on .ajrfed-news-card__body {
        padding: 18px;
    }

    body.ajrfed-design-on .ajrfed-home-news-more__link {
        width: 100%;
        max-width: 340px;
    }
}

@media (max-width: 420px) {
    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
        grid-template-columns: 1fr !important;
    }
}


/* Avoid a doubled background if Astra wraps the styled button in an anchor. */
body.ajrfed-design-on .site-header .ast-custom-button-link:has(.ast-custom-button) {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ================================================================
 * Version 1.2.0 — richer news cards, homepage news block and mobile fixes
 * ================================================================ */

/* Center the institutional logo / SVG / site title more precisely. */
body.ajrfed-design-on :where(.site-branding, .ast-site-identity, .site-logo-img, .custom-logo-link) {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.ajrfed-design-on :where(.site-branding svg, .ast-site-identity svg, .custom-logo-link svg) {
    display: block;
    margin-inline: auto;
}

/* Shared image sizing for archive and homepage news cards. */
body.ajrfed-design-on :where(.ajrfed-news-grid, .ajrfed-home-news-grid) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2.4vw, 28px);
    align-items: stretch;
}

body.ajrfed-design-on .ajrfed-home-news {
    width: 100%;
}

body.ajrfed-design-on .ajrfed-news-card__media {
    min-height: 300px;
    aspect-ratio: 4 / 3;
}

body.ajrfed-design-on .ajrfed-home-news-card .ajrfed-news-card__title {
    font-size: clamp(1rem, 1.25vw, 1.14rem) !important;
}

body.ajrfed-design-on .ajrfed-home-news-card .ajrfed-news-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* If the original Premium Addons widget still renders, make its image bigger. */
body.ajrfed-design-on :where(.premium-blog-thumbnail-container, .premium-blog-post-outer-container .premium-blog-thumbnail-container) {
    min-height: 300px !important;
    overflow: hidden;
}

body.ajrfed-design-on :where(.premium-blog-thumbnail-container img, .premium-blog-post-outer-container img) {
    min-height: 300px !important;
    object-fit: cover !important;
}

/* Improve mobile alignment and avoid broken header layout. */
@media (max-width: 921px) {
    body.ajrfed-design-on :where(.site-branding, .ast-site-identity) {
        width: 100%;
        justify-content: center !important;
        text-align: center !important;
    }

    body.ajrfed-design-on :where(.site-title, .site-title a, .ast-site-identity-wrap, .ast-builder-site-identity) {
        text-align: center !important;
        justify-content: center !important;
        margin-inline: auto !important;
    }

    body.ajrfed-design-on :where(.ast-mobile-popup-content, .ast-mobile-popup-inner, .ast-builder-menu-mobile .main-navigation) {
        width: 100%;
        max-width: 100%;
    }

    body.ajrfed-design-on :where(.ast-builder-grid-row, .site-header .ast-container) {
        width: min(100% - 24px, var(--ajrfed-content));
    }

    body.ajrfed-design-on :where(.main-header-menu, .ast-builder-menu-mobile .main-header-menu, .ast-builder-menu-mobile .menu) {
        width: 100%;
    }

    body.ajrfed-design-on :where(.ast-builder-menu-mobile .menu-item > .menu-link, .ast-mobile-popup-drawer .menu-item > .menu-link) {
        white-space: normal !important;
        line-height: 1.7 !important;
        padding-block: 12px !important;
    }
}

@media (max-width: 980px) {
    body.ajrfed-design-on :where(.ajrfed-news-grid, .ajrfed-home-news-grid) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    body.ajrfed-design-on :where(.ajrfed-news-grid, .ajrfed-home-news-grid) {
        grid-template-columns: 1fr;
    }

    body.ajrfed-design-on .ajrfed-news-card__media,
    body.ajrfed-design-on :where(.premium-blog-thumbnail-container, .premium-blog-post-outer-container .premium-blog-thumbnail-container),
    body.ajrfed-design-on :where(.premium-blog-thumbnail-container img, .premium-blog-post-outer-container img) {
        min-height: 300px !important;
    }

    body.home.ajrfed-design-on .elementor-element-8038233 {
        margin: 28px auto 34px;
        padding-inline: 0;
    }

    body.home.ajrfed-design-on .elementor-element-31f4971 .elementor-heading-title {
        font-size: clamp(1.35rem, 6vw, 1.75rem) !important;
        line-height: 1.65 !important;
    }

    body.home.ajrfed-design-on :where(.elementor-widget, .elementor-container, .elementor-column, .elementor-section) {
        max-width: 100%;
    }

    body.ajrfed-design-on :where(.entry-content, .elementor-widget-container, .premium-blog-content-wrapper) {
        overflow-wrap: anywhere;
    }
}

/* ================================================================
 * Version 1.2.1 — mobile-only precision refinements
 * Desktop rules are intentionally untouched.
 * ================================================================ */
@media (max-width: 767px) {
    body.ajrfed-design-on {
        overflow-x: hidden;
        font-size: 15.5px;
        line-height: 1.9;
    }

    /* Keep Arabic reading content full-width and naturally RTL. */
    body.ajrfed-design-on :where(
        .entry-content,
        .entry-content p,
        .entry-content li,
        .elementor-widget-text-editor,
        .elementor-widget-text-editor .elementor-widget-container,
        .elementor-widget-text-editor p,
        .elementor-widget-text-editor li,
        .e-n-tabs-content,
        .e-n-tab-content,
        [role="tabpanel"],
        [role="tabpanel"] p,
        [role="tabpanel"] li
    ) {
        direction: rtl !important;
        width: 100% !important;
        max-width: none !important;
        margin-inline: 0 !important;
        overflow-wrap: break-word;
        word-break: normal;
    }

    body.ajrfed-design-on :where(
        .entry-content p,
        .elementor-widget-text-editor p,
        .e-n-tab-content p,
        [role="tabpanel"] p
    ) {
        text-align: justify !important;
        text-align-last: right !important;
        text-justify: inter-word;
        line-height: 2 !important;
        letter-spacing: 0 !important;
        word-spacing: normal !important;
    }

    body.ajrfed-design-on :where(
        .entry-content li,
        .elementor-widget-text-editor li,
        .e-n-tab-content li,
        [role="tabpanel"] li
    ) {
        text-align: right !important;
        line-height: 1.95 !important;
    }

    /* Remove inherited centered alignment from ordinary body text only. */
    body.ajrfed-design-on :where(
        .elementor-widget-text-editor .elementor-widget-container,
        .elementor-widget-text-editor,
        .premium-blog-post-content,
        .premium-blog-post-content p,
        .ajrfed-news-card__body,
        .ajrfed-news-card__title,
        .ajrfed-news-card__excerpt
    ) {
        text-align: right !important;
    }

    /* Homepage sections: use nearly the full handset width. */
    body.home.ajrfed-design-on :where(
        .elementor-element-45q2ogh,
        .elementor-element-a2a4885,
        .elementor-element-8038233
    ) {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin-inline: auto !important;
    }

    body.home.ajrfed-design-on .elementor-element-45q2ogh {
        padding: 24px 17px !important;
        margin-top: 28px !important;
        border-radius: 17px !important;
    }

    body.home.ajrfed-design-on .elementor-element-a2a4885 {
        padding: 20px 14px !important;
        margin-top: 22px !important;
        border-radius: 17px !important;
    }

    body.home.ajrfed-design-on .elementor-element-8038233 {
        margin-block: 30px !important;
        padding: 8px 0 0 !important;
    }

    /* The introductory paragraph should not collapse into a narrow centered column. */
    body.home.ajrfed-design-on .elementor-element-01dd3f1,
    body.home.ajrfed-design-on .elementor-element-01dd3f1 .elementor-widget-container,
    body.home.ajrfed-design-on .elementor-element-01dd3f1 h4,
    body.home.ajrfed-design-on .elementor-element-01dd3f1 p {
        width: 100% !important;
        max-width: none !important;
        margin-inline: 0 !important;
    }

    body.home.ajrfed-design-on .elementor-element-01dd3f1 :where(h4, p) {
        text-align: justify !important;
        text-align-last: right !important;
        line-height: 2 !important;
    }

    /* Hero: compact and balanced rather than overly tall on a phone. */
    body.home.ajrfed-design-on .elementor-element-134ac7a9 {
        min-height: auto !important;
        padding: 78px 18px 62px !important;
        background-position: center center !important;
        border-radius: 0 0 22px 22px !important;
    }

    body.home.ajrfed-design-on .elementor-element-df3580f :where(
        h1,
        .premium-dual-header-first-header,
        .premium-dual-header-first-span
    ) {
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: auto !important;
        font-size: clamp(1.65rem, 7.6vw, 2.15rem) !important;
        line-height: 1.6 !important;
        text-align: center !important;
    }

    /* Tabs: two clean columns, full-width content below. */
    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
        width: 100% !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tab-title, [role="tab"]) {
        min-height: 48px !important;
        padding: 9px 8px !important;
        font-size: 13px !important;
        white-space: normal !important;
        text-align: center !important;
    }

    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-content, [role="tabpanel"]) {
        width: 100% !important;
        margin-top: 12px !important;
        padding: 18px 14px !important;
        border-radius: 13px !important;
    }

    /* News cards: full width, readable body and consistent 300px visual. */
    body.ajrfed-design-on :where(.ajrfed-news-grid, .ajrfed-home-news-grid) {
        width: 100% !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px !important;
    }

    body.ajrfed-design-on .ajrfed-news-card {
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
        border-radius: 15px !important;
    }

    body.ajrfed-design-on .ajrfed-news-card__media {
        width: 100% !important;
        min-height: 300px !important;
        aspect-ratio: auto !important;
    }

    body.ajrfed-design-on .ajrfed-news-card__body {
        width: 100% !important;
        padding: 18px 16px 20px !important;
        align-items: stretch !important;
    }

    body.ajrfed-design-on .ajrfed-news-card__date {
        align-self: flex-start;
    }

    body.ajrfed-design-on .ajrfed-news-card__title {
        font-size: 1.05rem !important;
        line-height: 1.8 !important;
    }

    body.ajrfed-design-on .ajrfed-news-card__excerpt {
        width: 100%;
        font-size: 14px !important;
        line-height: 1.95 !important;
    }

    body.ajrfed-design-on .ajrfed-news-card__more {
        align-self: flex-start;
    }

    /* Interior pages should not become a narrow floating card. */
    body.ajrfed-design-on:not(.home) :where(.ast-article-single, .site-main > article) {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 14px auto 24px !important;
        padding: 21px 16px !important;
        border-radius: 14px !important;
    }

    body.ajrfed-design-on.ajrfed-news-page :where(.ast-article-single, .site-main > article) {
        padding: 20px 12px 24px !important;
    }

    body.ajrfed-design-on.ajrfed-news-page :where(.entry-title, .page-title, .ast-archive-title) {
        text-align: right !important;
        margin-inline: 4px !important;
    }

    /* Header: balanced identity and mobile drawer without horizontal overflow. */
    body.ajrfed-design-on :where(.ast-mobile-header-wrap, .ast-primary-header-bar, .site-header, #masthead) {
        max-width: 100vw !important;
        overflow-x: clip;
    }

    body.ajrfed-design-on :where(.ast-mobile-header-wrap .ast-builder-grid-row, .site-header .ast-container) {
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        min-height: 70px !important;
        margin-inline: auto !important;
        align-items: center !important;
    }

    body.ajrfed-design-on :where(.ast-mobile-header-wrap .site-branding, .ast-mobile-header-wrap .ast-site-identity) {
        min-width: 0 !important;
        justify-content: center !important;
        margin-inline: auto !important;
    }

    body.ajrfed-design-on :where(.ast-mobile-header-wrap .custom-logo, .ast-mobile-header-wrap .site-logo-img img, .ast-mobile-header-wrap .ast-site-identity img) {
        width: 58px !important;
        max-height: 58px !important;
    }

    body.ajrfed-design-on :where(.ast-mobile-header-wrap .site-title, .ast-mobile-header-wrap .site-title a) {
        max-width: 210px !important;
        font-size: 12.5px !important;
        line-height: 1.65 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    body.ajrfed-design-on :where(.ast-mobile-popup-drawer, .ast-mobile-popup-inner, .ast-mobile-popup-content) {
        max-width: 100vw !important;
    }

    body.ajrfed-design-on :where(.ast-mobile-popup-drawer .menu-item > .menu-link, .ast-builder-menu-mobile .menu-item > .menu-link) {
        width: 100% !important;
        min-height: 46px !important;
        padding: 11px 16px !important;
        text-align: right !important;
        justify-content: flex-start !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
    }

    /* Media and forms must never force horizontal scrolling. */
    body.ajrfed-design-on :where(iframe, video, embed, object, figure, table) {
        max-width: 100% !important;
    }

    body.ajrfed-design-on :where(iframe, video, embed, object) {
        height: auto;
    }

    body.ajrfed-design-on .entry-content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.ajrfed-design-on :where(
        input:not([type="checkbox"]):not([type="radio"]),
        textarea,
        select,
        .uagb-forms-main-submit-button-wrap,
        .sureforms-field-wrap
    ) {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 420px) {
    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tabs-heading, .e-n-tabs-heading > div) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.home.ajrfed-design-on .elementor-element-072bcf0 :where(.e-n-tab-title, [role="tab"]) {
        font-size: 12.5px !important;
    }
}

/* ================================================================
 * Version 1.3.0 — subscription, Iraqi flag, centered mobile menu,
 * institutional subtitle, and full Arabic text justification
 * ================================================================ */

/* Second institution name on the homepage: centered, refined and distinct. */
body.home.ajrfed-design-on .elementor-element-e7d1eaf,
body.home.ajrfed-design-on .elementor-element-e7d1eaf .elementor-widget-container {
    width: 100% !important;
    text-align: center !important;
}

body.home.ajrfed-design-on .elementor-element-e7d1eaf .elementor-heading-title {
    width: 100% !important;
    margin-inline: auto !important;
    text-align: center !important;
}

body.home.ajrfed-design-on .ajrfed-institution-subtitle {
    width: fit-content;
    max-width: 100%;
    margin: 12px auto 5px;
    padding: 7px 20px 8px;
    position: relative;
    color: var(--ajrfed-secondary);
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    font-size: clamp(.92rem, 1.25vw, 1.06rem);
    font-weight: 700;
    line-height: 1.7;
    letter-spacing: 0;
    text-align: center;
}

body.home.ajrfed-design-on .ajrfed-institution-subtitle::before,
body.home.ajrfed-design-on .ajrfed-institution-subtitle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 34px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ajrfed-accent), var(--ajrfed-secondary));
    opacity: .9;
}

body.home.ajrfed-design-on .ajrfed-institution-subtitle::before {
    right: 100%;
}

body.home.ajrfed-design-on .ajrfed-institution-subtitle::after {
    left: 100%;
}

/* Center the university SVG/divider directly below the second institution name. */
body.home.ajrfed-design-on .elementor-element-ab3ce48,
body.home.ajrfed-design-on .elementor-element-ab3ce48 .elementor-widget-container,
body.home.ajrfed-design-on .elementor-element-ab3ce48 .elementor-divider {
    width: 100% !important;
    text-align: center !important;
}

body.home.ajrfed-design-on .elementor-element-ab3ce48 .elementor-divider-separator {
    margin-inline: auto !important;
}

body.home.ajrfed-design-on .elementor-element-ab3ce48 :where(svg, .elementor-icon, .elementor-divider__element) {
    margin-inline: auto !important;
}

/* Full, continuous Arabic lines across ordinary site body content. */
body.ajrfed-design-on :where(
    .entry-content p,
    .entry-content h4,
    .entry-content li,
    .elementor-widget-text-editor p,
    .elementor-widget-text-editor h4,
    .elementor-widget-text-editor li,
    .e-n-tab-content p,
    .e-n-tab-content h4,
    .e-n-tab-content li,
    [role="tabpanel"] p,
    [role="tabpanel"] h4,
    [role="tabpanel"] li,
    .premium-blog-post-content p,
    .ajrfed-news-card__excerpt,
    .wp-block-post-excerpt,
    .wp-block-post-excerpt__excerpt
) {
    text-align: justify !important;
    text-align-last: right !important;
    text-justify: inter-word;
    direction: rtl;
    line-height: 2 !important;
    word-break: normal !important;
    overflow-wrap: break-word;
}

/* Keep short UI labels, headings and buttons out of paragraph justification. */
body.ajrfed-design-on :where(
    .entry-title,
    .page-title,
    .elementor-heading-title,
    .ajrfed-news-card__title,
    .menu-link,
    button,
    .button,
    .elementor-button,
    .wp-block-button__link,
    .ajrfed-news-card__more
) {
    text-justify: auto;
}

/* Newsletter: use our Arabic feedback and suppress the obsolete Spectra messages. */
body.ajrfed-design-on .ajrfed-newsletter-form :where(
    .uagb-forms-failed-message,
    .uagb-forms-success-message,
    .uagb-forms-submit-message,
    .uagb-forms-error-message
) {
    display: none !important;
}

body.ajrfed-design-on .ajrfed-subscribe-message {
    width: 100%;
    margin-top: 12px;
    padding: 0;
    color: var(--ajrfed-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.8;
    text-align: right;
}

body.ajrfed-design-on .ajrfed-subscribe-message.is-success,
body.ajrfed-design-on .ajrfed-subscribe-message.is-error {
    padding: 11px 14px;
    border-radius: 10px;
}

body.ajrfed-design-on .ajrfed-subscribe-message.is-success {
    color: #155b3f;
    background: #edf9f3;
    border: 1px solid #bce6d1;
}

body.ajrfed-design-on .ajrfed-subscribe-message.is-error {
    color: #8a2432;
    background: #fff1f3;
    border: 1px solid #f1bdc5;
}

/* Current official Iraqi flag in the Arabic language selector. */
body.ajrfed-design-on :where(
    .trp-language-switcher img[data-ajrfed-iraq-flag="1"],
    .trp-ls-shortcode-current-language img[data-ajrfed-iraq-flag="1"],
    .trp-ls-shortcode-language img[data-ajrfed-iraq-flag="1"],
    .trp-language-switcher-container img[data-ajrfed-iraq-flag="1"],
    .trp-floating-switcher img[data-ajrfed-iraq-flag="1"],
    .trp-floater-ls img[data-ajrfed-iraq-flag="1"],
    .menu-item-object-language_switcher img[data-ajrfed-iraq-flag="1"]
) {
    width: 29px !important;
    height: 19px !important;
    min-width: 29px !important;
    object-fit: cover !important;
    border: 1px solid rgba(32,35,58,.13);
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(32,35,58,.1);
}

/* Hamburger drawer: centered words, softer institutional palette. */
@media (max-width: 921px) {
    body.ajrfed-design-on :where(
        .ast-mobile-popup-drawer .ast-mobile-popup-inner,
        .ast-mobile-popup-drawer .ast-mobile-popup-content,
        .ast-builder-menu-mobile .main-navigation
    ) {
        background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--ajrfed-primary) 5%, white) 100%) !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-popup-drawer .menu-item,
        .ast-builder-menu-mobile .menu-item
    ) {
        width: 100% !important;
        text-align: center !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-popup-drawer .menu-item > .menu-link,
        .ast-builder-menu-mobile .menu-item > .menu-link
    ) {
        width: 100% !important;
        min-height: 48px !important;
        padding: 12px 18px !important;
        justify-content: center !important;
        text-align: center !important;
        color: #4f335f !important;
        background: transparent !important;
        border-bottom: 1px solid color-mix(in srgb, var(--ajrfed-primary) 10%, transparent) !important;
        font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
        font-size: 14px !important;
        font-weight: 650 !important;
        line-height: 1.7 !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-popup-drawer .menu-item > .menu-link:hover,
        .ast-mobile-popup-drawer .current-menu-item > .menu-link,
        .ast-builder-menu-mobile .menu-item > .menu-link:hover,
        .ast-builder-menu-mobile .current-menu-item > .menu-link
    ) {
        color: var(--ajrfed-primary) !important;
        background: color-mix(in srgb, var(--ajrfed-primary) 8%, white) !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-popup-drawer .menu-item-has-children .ast-menu-toggle,
        .ast-builder-menu-mobile .menu-item-has-children .ast-menu-toggle
    ) {
        color: var(--ajrfed-primary) !important;
    }
}

@media (max-width: 767px) {
    body.home.ajrfed-design-on .ajrfed-institution-subtitle {
        margin-top: 9px;
        padding-inline: 15px;
        font-size: .88rem;
    }

    body.home.ajrfed-design-on .ajrfed-institution-subtitle::before,
    body.home.ajrfed-design-on .ajrfed-institution-subtitle::after {
        width: 22px;
    }

    /* Preserve the successful mobile layout while extending paragraph lines cleanly. */
    body.ajrfed-design-on :where(
        .entry-content p,
        .entry-content h4,
        .elementor-widget-text-editor p,
        .elementor-widget-text-editor h4,
        .e-n-tab-content p,
        .e-n-tab-content h4,
        [role="tabpanel"] p,
        [role="tabpanel"] h4,
        .ajrfed-news-card__excerpt
    ) {
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
        text-align: justify !important;
        text-align-last: right !important;
        line-height: 1.95 !important;
    }
}

/* ================================================================
 * Version 1.4.0 — bilingual switcher, US flag, LTR English, stronger
 * mobile drawer centering and corrected newsletter presentation.
 * ================================================================ */

/* TranslatePress switcher: enough room for the complete English label. */
body.ajrfed-design-on :where(
    .trp-language-switcher,
    .trp-ls-shortcode-current-language,
    .trp-ls-shortcode-language,
    .trp-language-switcher-container,
    .trp-floating-switcher,
    .trp-floater-ls,
    .ajrfed-language-switcher
) {
    width: auto !important;
    min-width: 112px !important;
    max-width: none !important;
    overflow: visible !important;
}

body.ajrfed-design-on :where(
    .trp-language-switcher a,
    .trp-ls-shortcode-current-language a,
    .trp-ls-shortcode-language a,
    .trp-language-switcher-container a,
    .trp-floating-switcher a,
    .trp-floater-ls a,
    .ajrfed-language-switcher a
) {
    min-width: 108px !important;
    width: auto !important;
    max-width: none !important;
    min-height: 34px !important;
    padding: 6px 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-family: "Noto Sans Arabic", Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
}

body.ajrfed-design-on :where(
    .trp-language-switcher img,
    .trp-ls-shortcode-current-language img,
    .trp-ls-shortcode-language img,
    .trp-language-switcher-container img,
    .trp-floating-switcher img,
    .trp-floater-ls img,
    .menu-item-object-language_switcher img
) {
    width: 28px !important;
    height: 18px !important;
    min-width: 28px !important;
    flex: 0 0 28px !important;
    object-fit: cover !important;
    border: 1px solid rgba(32,35,58,.13) !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 6px rgba(32,35,58,.10) !important;
}

/* Correct mail links remain visually obvious and clickable. */
body.ajrfed-design-on a[href^="mailto:"] {
    unicode-bidi: isolate;
    word-break: normal !important;
    overflow-wrap: anywhere;
}

/* Newsletter: suppress all legacy Spectra validation messages in the detected block. */
body.ajrfed-design-on :where(
    .ajrfed-newsletter-wrapper,
    .ajrfed-newsletter-form,
    .uagb-block-d276cdda
) :where(
    .uagb-forms-failed-message,
    .uagb-forms-success-message,
    .uagb-forms-submit-message,
    .uagb-forms-error-message,
    .uagb-forms-field-error,
    .uagb-forms-input-message
) {
    display: none !important;
}

body.ajrfed-design-on .ajrfed-newsletter-form input[type="email"] {
    direction: ltr !important;
    text-align: left !important;
}

/* Strong mobile drawer rules override Astra/Premium Addons alignment conflicts. */
@media (max-width: 921px) {
    body.ajrfed-design-on .ast-mobile-popup-drawer .ast-mobile-popup-inner,
    body.ajrfed-design-on .ast-mobile-popup-drawer .ast-mobile-popup-content,
    body.ajrfed-design-on .ast-builder-menu-mobile .main-navigation {
        background:
            linear-gradient(180deg, #ffffff 0%, #fbf8fd 52%, #f7f1fa 100%) !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .main-header-menu,
    body.ajrfed-design-on .ast-builder-menu-mobile .main-header-menu,
    body.ajrfed-design-on .ast-builder-menu-mobile .menu {
        width: 100% !important;
        padding: 8px 12px 18px !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .main-header-menu > .menu-item,
    body.ajrfed-design-on .ast-builder-menu-mobile .main-header-menu > .menu-item,
    body.ajrfed-design-on .ast-builder-menu-mobile .menu > .menu-item {
        width: 100% !important;
        margin: 3px 0 !important;
        position: relative !important;
        text-align: center !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link,
    body.ajrfed-design-on .ast-builder-menu-mobile .main-header-menu .menu-item > .menu-link,
    body.ajrfed-design-on .ast-builder-menu-mobile .menu .menu-item > .menu-link {
        width: 100% !important;
        min-height: 50px !important;
        padding: 12px 46px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        color: #513764 !important;
        background: rgba(255,255,255,.80) !important;
        border: 1px solid rgba(107,42,144,.08) !important;
        border-radius: 10px !important;
        box-shadow: 0 4px 14px rgba(32,35,58,.035) !important;
        font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Arial, sans-serif !important;
        font-size: 13.5px !important;
        font-weight: 650 !important;
        line-height: 1.65 !important;
        letter-spacing: 0 !important;
        white-space: normal !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link :where(.menu-text, span),
    body.ajrfed-design-on .ast-builder-menu-mobile .main-header-menu .menu-item > .menu-link :where(.menu-text, span) {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        margin: 0 auto !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .main-header-menu .menu-item > .menu-link:hover,
    body.ajrfed-design-on .ast-mobile-popup-drawer .main-header-menu .current-menu-item > .menu-link,
    body.ajrfed-design-on .ast-builder-menu-mobile .main-header-menu .menu-item > .menu-link:hover,
    body.ajrfed-design-on .ast-builder-menu-mobile .main-header-menu .current-menu-item > .menu-link {
        color: var(--ajrfed-primary) !important;
        background: linear-gradient(135deg, rgba(107,42,144,.09), rgba(214,20,110,.055)) !important;
        border-color: rgba(107,42,144,.16) !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .menu-item-has-children > .ast-menu-toggle,
    body.ajrfed-design-on .ast-builder-menu-mobile .menu-item-has-children > .ast-menu-toggle {
        position: absolute !important;
        inset-inline-end: 10px !important;
        top: 8px !important;
        width: 34px !important;
        height: 34px !important;
        display: grid !important;
        place-items: center !important;
        color: var(--ajrfed-primary) !important;
        background: rgba(107,42,144,.06) !important;
        border-radius: 8px !important;
        z-index: 2;
    }
}

/* English version: genuine LTR layout and western typography. */
html[lang^="en"],
html.ajrfed-lang-en,
html[lang^="en"] body.ajrfed-design-on,
body.ajrfed-design-on.ajrfed-design-en {
    direction: ltr !important;
}

html[lang^="en"] body.ajrfed-design-on,
body.ajrfed-design-on.ajrfed-design-en {
    font-family: Arial, "Helvetica Neue", sans-serif !important;
}

html[lang^="en"] body.ajrfed-design-on :where(h1,h2,h3,h4,h5,h6,.site-title,.main-header-menu,button,.button,.elementor-button),
body.ajrfed-design-on.ajrfed-design-en :where(h1,h2,h3,h4,h5,h6,.site-title,.main-header-menu,button,.button,.elementor-button) {
    font-family: Arial, "Helvetica Neue", sans-serif !important;
}

html[lang^="en"] body.ajrfed-design-on :where(
    .entry-content p,
    .entry-content h4,
    .entry-content li,
    .elementor-widget-text-editor p,
    .elementor-widget-text-editor h4,
    .elementor-widget-text-editor li,
    .e-n-tab-content p,
    .e-n-tab-content h4,
    .e-n-tab-content li,
    [role="tabpanel"] p,
    [role="tabpanel"] h4,
    [role="tabpanel"] li,
    .premium-blog-post-content p,
    .ajrfed-news-card__excerpt,
    .wp-block-post-excerpt,
    .wp-block-post-excerpt__excerpt
),
body.ajrfed-design-on.ajrfed-design-en :where(
    .entry-content p,
    .entry-content h4,
    .entry-content li,
    .elementor-widget-text-editor p,
    .elementor-widget-text-editor h4,
    .elementor-widget-text-editor li,
    .e-n-tab-content p,
    .e-n-tab-content h4,
    .e-n-tab-content li,
    [role="tabpanel"] p,
    [role="tabpanel"] h4,
    [role="tabpanel"] li,
    .premium-blog-post-content p,
    .ajrfed-news-card__excerpt,
    .wp-block-post-excerpt,
    .wp-block-post-excerpt__excerpt
) {
    direction: ltr !important;
    text-align: justify !important;
    text-align-last: left !important;
    text-justify: inter-word !important;
    line-height: 1.85 !important;
}

html[lang^="en"] body.ajrfed-design-on :where(.entry-title,.page-title,.elementor-heading-title,.ajrfed-news-card__title),
body.ajrfed-design-on.ajrfed-design-en :where(.entry-title,.page-title,.elementor-heading-title,.ajrfed-news-card__title) {
    direction: ltr !important;
}

html[lang^="en"] body.ajrfed-design-on .ajrfed-news-card__body,
body.ajrfed-design-on.ajrfed-design-en .ajrfed-news-card__body {
    align-items: flex-start !important;
    text-align: left !important;
}

html[lang^="en"] body.ajrfed-design-on .ajrfed-news-card__date,
body.ajrfed-design-on.ajrfed-design-en .ajrfed-news-card__date {
    direction: ltr !important;
}

html[lang^="en"] body.home.ajrfed-design-on .ajrfed-institution-subtitle,
body.home.ajrfed-design-on.ajrfed-design-en .ajrfed-institution-subtitle {
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    letter-spacing: .02em;
}

@media (max-width: 767px) {
    body.ajrfed-design-on :where(
        .trp-language-switcher,
        .trp-ls-shortcode-current-language,
        .trp-ls-shortcode-language,
        .trp-language-switcher-container,
        .ajrfed-language-switcher
    ) {
        min-width: 101px !important;
    }

    body.ajrfed-design-on :where(
        .trp-language-switcher a,
        .trp-ls-shortcode-current-language a,
        .trp-ls-shortcode-language a,
        .trp-language-switcher-container a,
        .ajrfed-language-switcher a
    ) {
        min-width: 98px !important;
        padding-inline: 7px !important;
        gap: 5px !important;
        font-size: 11.5px !important;
    }
}

/* ================================================================
 * Version 1.5.0 — language correctness, sharper news imagery,
 * refined mobile navigation and bilingual editorial direction.
 * ================================================================ */

/* Keep the subtitle language tied to the active site language only. */
body.ajrfed-design-on .ajrfed-institution-subtitle {
    width: fit-content;
    max-width: calc(100% - 24px);
    margin: 12px auto 0 !important;
    padding: 7px 18px 8px !important;
    display: block !important;
    color: var(--ajrfed-primary) !important;
    background: linear-gradient(135deg, rgba(107,42,144,.07), rgba(214,20,110,.045)) !important;
    border: 1px solid rgba(107,42,144,.12) !important;
    border-radius: 999px !important;
    box-shadow: 0 7px 18px rgba(32,35,58,.05) !important;
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Arial, sans-serif !important;
    font-size: clamp(.82rem, 1.3vw, .98rem) !important;
    font-weight: 700 !important;
    line-height: 1.65 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
}

html[lang^="en"] body.ajrfed-design-on .ajrfed-institution-subtitle,
body.ajrfed-design-on.ajrfed-design-en .ajrfed-institution-subtitle {
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    font-size: .93rem !important;
    letter-spacing: .01em !important;
}

/* Language selector: full labels, Iraqi flag for Arabic and US flag for English. */
body.ajrfed-design-on :where(
    .trp-language-switcher,
    .trp-ls-shortcode-current-language,
    .trp-ls-shortcode-language,
    .trp-language-switcher-container,
    .trp-floating-switcher,
    .trp-floater-ls,
    .ajrfed-language-switcher
) {
    min-width: 126px !important;
}

body.ajrfed-design-on :where(
    .trp-language-switcher a,
    .trp-ls-shortcode-current-language a,
    .trp-ls-shortcode-language a,
    .trp-language-switcher-container a,
    .trp-floating-switcher a,
    .trp-floater-ls a,
    .ajrfed-language-switcher a
) {
    min-width: 122px !important;
    max-width: none !important;
    padding: 6px 10px !important;
    gap: 7px !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
}

body.ajrfed-design-on :where(
    .trp-language-switcher a[data-ajrfed-language="en"],
    .trp-ls-shortcode-current-language a[data-ajrfed-language="en"],
    .trp-ls-shortcode-language a[data-ajrfed-language="en"]
) {
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    font-size: 11px !important;
}

/* News card images: use full-resolution source without zooming or blur-producing filters. */
body.ajrfed-design-on .ajrfed-news-card__media {
    min-height: 300px !important;
    height: 300px !important;
    aspect-ratio: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    padding: 0 !important;
}

body.ajrfed-design-on .ajrfed-news-card__image {
    width: 100% !important;
    height: 100% !important;
    min-height: 300px !important;
    max-height: 300px !important;
    object-fit: contain !important;
    object-position: center center !important;
    filter: none !important;
    transform: none !important;
    image-rendering: auto !important;
    opacity: 1 !important;
    backface-visibility: hidden;
}

body.ajrfed-design-on .ajrfed-news-card:hover .ajrfed-news-card__image {
    transform: none !important;
    filter: none !important;
}

/* Complete English article body, preserving comfortable academic reading width. */
body.ajrfed-design-on .ajrfed-english-article {
    width: 100%;
    max-width: 100%;
    direction: ltr !important;
    text-align: left !important;
    font-family: Arial, "Helvetica Neue", sans-serif !important;
}

body.ajrfed-design-on .ajrfed-english-article :where(p, li) {
    direction: ltr !important;
    text-align: justify !important;
    text-align-last: left !important;
    line-height: 1.9 !important;
    font-size: clamp(1rem, 1.15vw, 1.08rem) !important;
}

body.ajrfed-design-on .ajrfed-english-article :where(ul, ol) {
    padding-left: 1.35rem !important;
    padding-right: 0 !important;
}

body.ajrfed-design-on .ajrfed-english-article-media {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

body.ajrfed-design-on .ajrfed-english-article-media :where(figure, img, video, iframe) {
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
}

/* Newsletter: reliable direct email fallback, visually integrated with the form. */
body.ajrfed-design-on .ajrfed-newsletter-direct-email {
    width: fit-content;
    max-width: 100%;
    margin: 12px auto 0 !important;
    padding: 6px 12px !important;
    display: block !important;
    color: var(--ajrfed-primary) !important;
    background: rgba(255,255,255,.72) !important;
    border: 1px solid rgba(107,42,144,.10) !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    font-weight: 650 !important;
    line-height: 1.6 !important;
    text-decoration: none !important;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Mobile navigation: centered institutional drawer with balanced color hierarchy. */
@media (max-width: 921px) {
    body.ajrfed-design-on .ast-mobile-popup-drawer .ast-mobile-popup-overlay {
        background: rgba(20,14,31,.48) !important;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .ast-mobile-popup-inner {
        width: min(88vw, 390px) !important;
        max-width: 390px !important;
        background: linear-gradient(180deg, #ffffff 0%, #fbf8fd 48%, #f5eef9 100%) !important;
        border-inline-start: 1px solid rgba(107,42,144,.12) !important;
        box-shadow: 0 0 42px rgba(31,23,44,.22) !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .ast-mobile-popup-header {
        min-height: 64px !important;
        padding: 12px 16px !important;
        background: linear-gradient(135deg, rgba(107,42,144,.08), rgba(214,20,110,.045)) !important;
        border-bottom: 1px solid rgba(107,42,144,.10) !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .ast-mobile-popup-content,
    body.ajrfed-design-on .ast-builder-menu-mobile .main-navigation {
        padding: 12px 14px 22px !important;
        text-align: center !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer :where(.main-header-menu, .menu),
    body.ajrfed-design-on .ast-builder-menu-mobile :where(.main-header-menu, .menu) {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 6px !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer :where(.main-header-menu, .menu) > .menu-item,
    body.ajrfed-design-on .ast-builder-menu-mobile :where(.main-header-menu, .menu) > .menu-item {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .menu-item > .menu-link,
    body.ajrfed-design-on .ast-builder-menu-mobile .menu-item > .menu-link {
        width: 100% !important;
        min-height: 48px !important;
        padding: 11px 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        color: #4b355b !important;
        background: rgba(255,255,255,.86) !important;
        border: 1px solid rgba(107,42,144,.09) !important;
        border-radius: 12px !important;
        box-shadow: 0 5px 16px rgba(32,35,58,.045) !important;
        font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Arial, sans-serif !important;
        font-size: 13.5px !important;
        font-weight: 700 !important;
        line-height: 1.7 !important;
        letter-spacing: 0 !important;
        white-space: normal !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .menu-item > .menu-link :where(.menu-text, span),
    body.ajrfed-design-on .ast-builder-menu-mobile .menu-item > .menu-link :where(.menu-text, span) {
        width: 100% !important;
        margin: 0 auto !important;
        display: block !important;
        text-align: center !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .menu-item > .menu-link:hover,
    body.ajrfed-design-on .ast-mobile-popup-drawer .current-menu-item > .menu-link,
    body.ajrfed-design-on .ast-builder-menu-mobile .menu-item > .menu-link:hover,
    body.ajrfed-design-on .ast-builder-menu-mobile .current-menu-item > .menu-link {
        color: #fff !important;
        background: linear-gradient(135deg, #6B2A90, #8c3a9f 55%, #b33c83) !important;
        border-color: transparent !important;
        box-shadow: 0 8px 20px rgba(107,42,144,.18) !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .sub-menu,
    body.ajrfed-design-on .ast-builder-menu-mobile .sub-menu {
        margin: 6px 8px 2px !important;
        padding: 7px !important;
        background: rgba(107,42,144,.035) !important;
        border: 1px solid rgba(107,42,144,.08) !important;
        border-radius: 11px !important;
        box-shadow: none !important;
    }

    body.ajrfed-design-on .ast-mobile-popup-drawer .sub-menu .menu-link,
    body.ajrfed-design-on .ast-builder-menu-mobile .sub-menu .menu-link {
        min-height: 42px !important;
        padding: 9px 36px !important;
        font-size: 12.8px !important;
        background: #fff !important;
    }

    html[lang^="en"] body.ajrfed-design-on .ast-mobile-popup-drawer .menu-item > .menu-link,
    body.ajrfed-design-on.ajrfed-design-en .ast-mobile-popup-drawer .menu-item > .menu-link,
    html[lang^="en"] body.ajrfed-design-on .ast-builder-menu-mobile .menu-item > .menu-link,
    body.ajrfed-design-on.ajrfed-design-en .ast-builder-menu-mobile .menu-item > .menu-link {
        font-family: Arial, "Helvetica Neue", sans-serif !important;
        text-align: center !important;
        direction: ltr !important;
    }

    body.ajrfed-design-on :where(
        .trp-language-switcher,
        .trp-ls-shortcode-current-language,
        .trp-ls-shortcode-language,
        .trp-language-switcher-container,
        .ajrfed-language-switcher
    ) {
        min-width: 116px !important;
    }

    body.ajrfed-design-on :where(
        .trp-language-switcher a,
        .trp-ls-shortcode-current-language a,
        .trp-ls-shortcode-language a,
        .trp-language-switcher-container a,
        .ajrfed-language-switcher a
    ) {
        min-width: 112px !important;
        padding: 6px 8px !important;
        font-size: 10.8px !important;
    }
}

@media (max-width: 767px) {
    body.ajrfed-design-on .ajrfed-news-card__media,
    body.ajrfed-design-on .ajrfed-news-card__image {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
    }
}

/* ================================================================
 * Version 1.5.0 — final bilingual precision, sharper news media and
 * professional Astra mobile navigation.
 * ================================================================ */

/* Language labels are generated by the companion script so each row keeps
   exactly one flag and one complete label. */
body.ajrfed-design-on .ajrfed-language-label {
    display: inline-block !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.3 !important;
}

body.ajrfed-design-on :where(
    .trp-language-switcher,
    .trp-ls-shortcode-current-language,
    .trp-ls-shortcode-language,
    .trp-language-switcher-container,
    .trp-floating-switcher,
    .trp-floater-ls,
    .ajrfed-language-switcher
) {
    min-width: 136px !important;
}

body.ajrfed-design-on :where(
    .trp-language-switcher a,
    .trp-ls-shortcode-current-language a,
    .trp-ls-shortcode-language a,
    .trp-language-switcher-container a,
    .trp-floating-switcher a,
    .trp-floater-ls a,
    .ajrfed-language-switcher a
) {
    min-width: 132px !important;
    padding-inline: 10px !important;
    justify-content: center !important;
}

body.ajrfed-design-on :where(
    .trp-language-switcher a[data-ajrfed-language="en"],
    .trp-ls-shortcode-current-language a[data-ajrfed-language="en"],
    .trp-ls-shortcode-language a[data-ajrfed-language="en"],
    .trp-language-switcher-container a[data-ajrfed-language="en"]
) .ajrfed-language-label {
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

/* Arabic root must always show the Arabic subtitle; English is isolated to /en/. */
body.ajrfed-design-on:not(.ajrfed-design-en) .ajrfed-institution-subtitle {
    direction: rtl !important;
    font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
    text-align: center !important;
}

body.ajrfed-design-on.ajrfed-design-en .ajrfed-institution-subtitle {
    direction: ltr !important;
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    text-align: center !important;
}

/* High-resolution news media. Do not zoom, blur or request a thumbnail-sized
   source. The PHP renderer now supplies the original full image URL. */
body.ajrfed-design-on :where(.ajrfed-news-card__media, .ajrfed-home-news-card .ajrfed-news-card__media) {
    height: 320px !important;
    min-height: 320px !important;
    max-height: 320px !important;
    background: #ffffff !important;
    overflow: hidden !important;
}

body.ajrfed-design-on :where(.ajrfed-news-card__image, .ajrfed-home-news-card .ajrfed-news-card__image) {
    width: 100% !important;
    height: 100% !important;
    min-height: 320px !important;
    max-height: 320px !important;
    object-fit: contain !important;
    object-position: center !important;
    filter: none !important;
    -webkit-filter: none !important;
    transform: translateZ(0) !important;
    image-rendering: auto !important;
    opacity: 1 !important;
}

body.ajrfed-design-on .ajrfed-news-card:hover .ajrfed-news-card__image {
    transform: translateZ(0) !important;
}

/* Complete English page/body direction. Arabic stays RTL via the base theme. */
body.ajrfed-design-on.ajrfed-design-en :where(
    #content,
    .site-content,
    .site-main,
    article,
    .entry-content,
    .elementor,
    .elementor-section,
    .elementor-container,
    .elementor-widget-container,
    .e-con,
    .e-con-inner,
    .e-n-tabs,
    .e-n-tabs-content,
    [role="tabpanel"],
    .ajrfed-news-archive,
    .ajrfed-home-news
) {
    direction: ltr !important;
}

body.ajrfed-design-on.ajrfed-design-en :where(
    .entry-content p,
    .entry-content h4,
    .entry-content li,
    .elementor-widget-text-editor p,
    .elementor-widget-text-editor h4,
    .elementor-widget-text-editor li,
    .e-n-tab-content p,
    .e-n-tab-content h4,
    .e-n-tab-content li,
    [role="tabpanel"] p,
    [role="tabpanel"] h4,
    [role="tabpanel"] li,
    .ajrfed-news-card__excerpt
) {
    direction: ltr !important;
    text-align: justify !important;
    text-align-last: left !important;
    unicode-bidi: plaintext !important;
}

@media (max-width: 921px) {
    /* Astra can render either an off-canvas drawer or an in-header dropdown.
       Style both paths so the three-line menu is consistently professional. */
    body.ajrfed-design-on :where(
        .ast-mobile-header-content,
        .ast-builder-menu-mobile,
        .ast-builder-menu-mobile .main-navigation
    ) {
        background: linear-gradient(180deg, #ffffff 0%, #fbf8fd 52%, #f6eff9 100%) !important;
    }

    body.ajrfed-design-on .ast-mobile-header-content {
        margin-top: 8px !important;
        padding: 12px !important;
        border: 1px solid rgba(107,42,144,.10) !important;
        border-radius: 0 0 18px 18px !important;
        box-shadow: 0 18px 38px rgba(32,35,58,.15) !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-header-content .main-header-menu,
        .ast-builder-menu-mobile .main-header-menu,
        .ast-mobile-popup-drawer .main-header-menu
    ) {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 7px !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-header-content .menu-item,
        .ast-builder-menu-mobile .menu-item,
        .ast-mobile-popup-drawer .menu-item
    ) {
        position: relative !important;
        width: 100% !important;
        margin: 0 !important;
        text-align: center !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-header-content .menu-item > .menu-link,
        .ast-builder-menu-mobile .menu-item > .menu-link,
        .ast-mobile-popup-drawer .menu-item > .menu-link
    ) {
        width: 100% !important;
        min-height: 50px !important;
        padding: 11px 46px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #56376a !important;
        background: rgba(255,255,255,.94) !important;
        border: 1px solid rgba(107,42,144,.11) !important;
        border-radius: 13px !important;
        box-shadow: 0 6px 17px rgba(40,26,54,.055) !important;
        font-family: "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, Arial, sans-serif !important;
        font-size: 13.2px !important;
        font-weight: 700 !important;
        line-height: 1.75 !important;
        letter-spacing: 0 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-header-content .menu-item > .menu-link .menu-text,
        .ast-builder-menu-mobile .menu-item > .menu-link .menu-text,
        .ast-mobile-popup-drawer .menu-item > .menu-link .menu-text,
        .ast-mobile-header-content .menu-item > .menu-link > span:not(.ast-icon),
        .ast-builder-menu-mobile .menu-item > .menu-link > span:not(.ast-icon),
        .ast-mobile-popup-drawer .menu-item > .menu-link > span:not(.ast-icon)
    ) {
        width: 100% !important;
        display: block !important;
        margin: 0 auto !important;
        text-align: center !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-header-content .menu-item > .menu-link:hover,
        .ast-mobile-header-content .current-menu-item > .menu-link,
        .ast-builder-menu-mobile .menu-item > .menu-link:hover,
        .ast-builder-menu-mobile .current-menu-item > .menu-link,
        .ast-mobile-popup-drawer .menu-item > .menu-link:hover,
        .ast-mobile-popup-drawer .current-menu-item > .menu-link
    ) {
        color: #ffffff !important;
        background: linear-gradient(135deg, #6B2A90 0%, #853796 54%, #B03C82 100%) !important;
        border-color: transparent !important;
        box-shadow: 0 9px 22px rgba(107,42,144,.20) !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-header-content .menu-item-has-children > .ast-menu-toggle,
        .ast-builder-menu-mobile .menu-item-has-children > .ast-menu-toggle,
        .ast-mobile-popup-drawer .menu-item-has-children > .ast-menu-toggle
    ) {
        position: absolute !important;
        inset-inline-end: 8px !important;
        top: 8px !important;
        width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        display: grid !important;
        place-items: center !important;
        color: #6B2A90 !important;
        background: rgba(107,42,144,.065) !important;
        border: 0 !important;
        border-radius: 9px !important;
        box-shadow: none !important;
        z-index: 3 !important;
    }

    body.ajrfed-design-on :where(
        .ast-mobile-header-content .sub-menu,
        .ast-builder-menu-mobile .sub-menu,
        .ast-mobile-popup-drawer .sub-menu
    ) {
        margin: 6px 7px 2px !important;
        padding: 7px !important;
        background: rgba(107,42,144,.045) !important;
        border: 1px solid rgba(107,42,144,.08) !important;
        border-radius: 12px !important;
        box-shadow: none !important;
    }

    body.ajrfed-design-on.ajrfed-design-en :where(
        .ast-mobile-header-content .menu-item > .menu-link,
        .ast-builder-menu-mobile .menu-item > .menu-link,
        .ast-mobile-popup-drawer .menu-item > .menu-link
    ) {
        direction: ltr !important;
        font-family: Arial, "Helvetica Neue", sans-serif !important;
        text-align: center !important;
    }

    body.ajrfed-design-on :where(
        .trp-language-switcher,
        .trp-ls-shortcode-current-language,
        .trp-ls-shortcode-language,
        .trp-language-switcher-container,
        .ajrfed-language-switcher
    ) {
        min-width: 126px !important;
    }

    body.ajrfed-design-on :where(
        .trp-language-switcher a,
        .trp-ls-shortcode-current-language a,
        .trp-ls-shortcode-language a,
        .trp-language-switcher-container a,
        .ajrfed-language-switcher a
    ) {
        min-width: 122px !important;
        padding: 6px 8px !important;
        gap: 6px !important;
    }
}

@media (max-width: 767px) {
    body.ajrfed-design-on :where(.ajrfed-news-card__media, .ajrfed-home-news-card .ajrfed-news-card__media),
    body.ajrfed-design-on :where(.ajrfed-news-card__image, .ajrfed-home-news-card .ajrfed-news-card__image) {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
    }
}

/* ================================================================
 * Version 1.6.0 — requested precision fixes
 * ================================================================ */

/* Second homepage identity: elegant crimson subtitle, visible on desktop/mobile. */
body.home.ajrfed-design-on .elementor-element-e7d1eaf .elementor-widget-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

body.home.ajrfed-design-on .ajrfed-institution-subtitle {
    width: fit-content !important;
    max-width: calc(100% - 20px) !important;
    margin: 12px auto 0 !important;
    padding: 7px 18px 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #b4233a !important;
    background: linear-gradient(135deg, rgba(180,35,58,.065), rgba(214,180,92,.075)) !important;
    border: 1px solid rgba(180,35,58,.18) !important;
    border-bottom: 2px solid rgba(214,180,92,.70) !important;
    border-radius: 999px !important;
    box-shadow: 0 8px 20px rgba(95,31,48,.07) !important;
    font-size: clamp(.84rem, 1.25vw, 1rem) !important;
    font-weight: 800 !important;
    line-height: 1.65 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.home.ajrfed-design-on.ajrfed-design-en .ajrfed-institution-subtitle {
    color: #a92b3f !important;
    font-family: Arial, "Helvetica Neue", sans-serif !important;
    font-weight: 700 !important;
}

/* Language switcher: show exactly one clean label. Native secondary/small labels
   are hidden after JS adds the canonical ajrfed-language-label. */
body.ajrfed-design-on :where(
    .trp-language-switcher a[data-ajrfed-language],
    .trp-ls-shortcode-current-language a[data-ajrfed-language],
    .trp-ls-shortcode-language a[data-ajrfed-language],
    .trp-language-switcher-container a[data-ajrfed-language],
    .trp-floating-switcher a[data-ajrfed-language],
    .trp-floater-ls a[data-ajrfed-language]
) > :not(img):not(.ajrfed-language-label) {
    display: none !important;
}

body.ajrfed-design-on .ajrfed-language-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
}

body.ajrfed-design-on a[data-ajrfed-language="en"] .ajrfed-language-label {
    font-size: 10.5px !important;
    font-family: Arial, "Helvetica Neue", sans-serif !important;
}

/* News headings: disciplined lines and consistent card rhythm. */
body.ajrfed-design-on .ajrfed-news-card__title,
body.ajrfed-design-on .ajrfed-news-card__title a {
    width: 100% !important;
    direction: rtl !important;
    text-align: justify !important;
    text-align-last: right !important;
    text-justify: inter-word !important;
    line-height: 1.82 !important;
    letter-spacing: 0 !important;
    word-spacing: 0 !important;
    hyphens: none !important;
    overflow-wrap: normal !important;
}

body.ajrfed-design-on .ajrfed-news-card__title {
    min-height: 5.45em !important;
}

body.ajrfed-design-on.ajrfed-design-en .ajrfed-news-card__title,
body.ajrfed-design-on.ajrfed-design-en .ajrfed-news-card__title a {
    direction: ltr !important;
    text-align: justify !important;
    text-align-last: left !important;
}

/* Native newsletter form: independent from the old Spectra email settings. */
body.ajrfed-design-on .ajrfed-native-newsletter {
    width: min(100%, 760px);
    margin-inline: auto;
}

body.ajrfed-design-on .ajrfed-newsletter-form--native {
    width: 100%;
    margin: 0 !important;
}

body.ajrfed-design-on .ajrfed-newsletter-row {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

body.ajrfed-design-on .ajrfed-newsletter-email {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 52px !important;
    margin: 0 !important;
}

body.ajrfed-design-on .ajrfed-newsletter-submit {
    min-width: 126px !important;
    min-height: 52px !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

body.ajrfed-design-on .ajrfed-newsletter-honeypot {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

body.ajrfed-design-on .ajrfed-subscribe-message {
    min-height: 0;
    margin-top: 10px;
    padding: 0;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

body.ajrfed-design-on .ajrfed-subscribe-message:not(:empty) {
    padding: 9px 12px;
    border-radius: 9px;
}

body.ajrfed-design-on .ajrfed-subscribe-message.is-success {
    color: #14603f !important;
    background: #eef9f3 !important;
    border: 1px solid #b9e5cf !important;
}

body.ajrfed-design-on .ajrfed-subscribe-message.is-error {
    color: #8b2435 !important;
    background: #fff1f3 !important;
    border: 1px solid #efbdc5 !important;
}

/* Full English membership page: clear LTR institutional hierarchy. */
body.ajrfed-design-on .ajrfed-english-page,
body.ajrfed-design-on .ajrfed-membership-en {
    width: 100%;
    max-width: 100%;
    direction: ltr !important;
    text-align: left !important;
    font-family: Arial, "Helvetica Neue", sans-serif !important;
}

body.ajrfed-design-on .ajrfed-membership-en h2 {
    margin: 0 0 20px !important;
    color: var(--ajrfed-primary) !important;
    font-size: clamp(1.45rem, 2.3vw, 2rem) !important;
    line-height: 1.45 !important;
    text-align: left !important;
}

body.ajrfed-design-on .ajrfed-membership-en p {
    direction: ltr !important;
    text-align: justify !important;
    text-align-last: left !important;
    line-height: 1.9 !important;
}

body.ajrfed-design-on .ajrfed-membership-en__action,
body.ajrfed-design-on .ajrfed-membership-en__note {
    padding: 16px 18px !important;
    border: 1px solid var(--ajrfed-border) !important;
    border-radius: 12px !important;
    background: #fff !important;
}

/* Any Astra mobile menu instance, including sticky/late-rendered clones, gets
   the same institutional surface. This prevents the “old” menu appearance on
   a later hamburger click. */
@media (max-width: 921px) {
    body.home.ajrfed-design-on .ajrfed-institution-subtitle {
        display: inline-flex !important;
        margin-top: 10px !important;
        padding: 6px 14px 7px !important;
        font-size: 12.5px !important;
        line-height: 1.65 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel {
        background: linear-gradient(180deg, #ffffff 0%, #fbf7fd 50%, #f5eef9 100%) !important;
        text-align: center !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel .ajrfed-mobile-menu-list {
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 12px 18px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 7px !important;
        list-style: none !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel .menu-item {
        width: 100% !important;
        margin: 0 !important;
        text-align: center !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel .ajrfed-mobile-menu-link {
        width: 100% !important;
        min-height: 50px !important;
        padding: 11px 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #553768 !important;
        background: rgba(255,255,255,.95) !important;
        border: 1px solid rgba(107,42,144,.12) !important;
        border-radius: 13px !important;
        box-shadow: 0 6px 18px rgba(49,31,62,.055) !important;
        font-size: 13.2px !important;
        font-weight: 700 !important;
        line-height: 1.75 !important;
        letter-spacing: 0 !important;
        text-align: center !important;
        white-space: normal !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel .ajrfed-mobile-menu-link :where(.menu-text, span:not(.ast-icon)) {
        width: 100% !important;
        display: block !important;
        margin-inline: auto !important;
        text-align: center !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel :where(.current-menu-item > .ajrfed-mobile-menu-link, .ajrfed-mobile-menu-link:hover) {
        color: #fff !important;
        background: linear-gradient(135deg, #6B2A90 0%, #843897 54%, #b13d84 100%) !important;
        border-color: transparent !important;
        box-shadow: 0 9px 22px rgba(107,42,144,.20) !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel .sub-menu {
        margin: 6px 7px 2px !important;
        padding: 7px !important;
        background: rgba(107,42,144,.045) !important;
        border: 1px solid rgba(107,42,144,.08) !important;
        border-radius: 12px !important;
        box-shadow: none !important;
    }

    body.ajrfed-design-on .ajrfed-mobile-menu-panel .sub-menu .ajrfed-mobile-menu-link {
        min-height: 42px !important;
        padding: 9px 34px !important;
        background: #fff !important;
        font-size: 12.6px !important;
    }

    body.ajrfed-design-on.ajrfed-design-en .ajrfed-mobile-menu-panel .ajrfed-mobile-menu-link {
        direction: ltr !important;
        font-family: Arial, "Helvetica Neue", sans-serif !important;
    }
}

@media (max-width: 767px) {
    body.ajrfed-design-on .ajrfed-newsletter-row {
        grid-template-columns: 1fr !important;
    }

    body.ajrfed-design-on .ajrfed-newsletter-submit {
        width: 100% !important;
    }

    body.ajrfed-design-on .ajrfed-news-card__title {
        min-height: 0 !important;
    }
}

/* ========================================================================
   AJRFED Institutional Design 1.7.0 — managed institutional sections
   ======================================================================== */

body.ajrfed-design-on .ajrfed-institution-page,
body.ajrfed-design-on .ajrfed-membership-portal,
body.ajrfed-design-on .ajrfed-home-publications {
    --ajrfed-v170-line: rgba(107,42,144,.14);
    --ajrfed-v170-soft: #fbf9fd;
    --ajrfed-v170-soft-2: #f5f0f9;
    --ajrfed-v170-card: #ffffff;
    --ajrfed-v170-shadow: 0 18px 50px rgba(47,31,59,.09);
    --ajrfed-v170-shadow-soft: 0 9px 28px rgba(47,31,59,.065);
    width: min(1180px, calc(100% - 34px));
    margin-inline: auto;
    color: var(--ajrfed-ink, #20233A);
    font-family: "Noto Sans Arabic", system-ui, sans-serif;
}

body.ajrfed-design-on .ajrfed-section-hero,
body.ajrfed-design-on .ajrfed-membership-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin: 8px 0 30px;
    padding: clamp(28px, 5vw, 58px);
    border: 1px solid rgba(107,42,144,.14);
    border-radius: 26px;
    background:
        radial-gradient(circle at 12% 12%, rgba(214,20,110,.085), transparent 34%),
        radial-gradient(circle at 88% 88%, rgba(214,180,92,.13), transparent 31%),
        linear-gradient(135deg, #ffffff 0%, #fbf8fd 56%, #f7f1fa 100%);
    box-shadow: var(--ajrfed-v170-shadow);
}

body.ajrfed-design-on .ajrfed-section-hero::before,
body.ajrfed-design-on .ajrfed-membership-hero::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: clamp(28px, 5vw, 58px);
    width: 86px;
    height: 4px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(90deg, var(--ajrfed-secondary, #D4146E), var(--ajrfed-accent, #D6B45C));
}

body.ajrfed-design-on .ajrfed-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--ajrfed-secondary, #D4146E);
    font-family: "Noto Kufi Arabic", system-ui, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

body.ajrfed-design-on .ajrfed-section-hero h2,
body.ajrfed-design-on .ajrfed-membership-hero h2,
body.ajrfed-design-on .ajrfed-directory-heading h3,
body.ajrfed-design-on .ajrfed-contact-panel h3,
body.ajrfed-design-on .ajrfed-home-publications h2 {
    margin: 0 0 14px !important;
    color: var(--ajrfed-ink, #20233A) !important;
    font-family: "Noto Kufi Arabic", system-ui, sans-serif !important;
    font-weight: 800 !important;
    line-height: 1.65 !important;
    text-shadow: none !important;
}

body.ajrfed-design-on .ajrfed-section-hero h2,
body.ajrfed-design-on .ajrfed-membership-hero h2 {
    font-size: clamp(25px, 4.1vw, 42px) !important;
}

body.ajrfed-design-on .ajrfed-section-hero > p,
body.ajrfed-design-on .ajrfed-membership-hero > p {
    max-width: 1000px;
    margin: 0 !important;
    color: #4b4252 !important;
    font-size: clamp(14px, 1.5vw, 17px) !important;
    font-weight: 500 !important;
    line-height: 2.15 !important;
    text-align: justify !important;
    text-align-last: start !important;
}

/* Membership application ------------------------------------------------- */
body.ajrfed-membership-page .site-content,
body.ajrfed-membership-page .ast-container,
body.ajrfed-membership-page .content-area,
body.ajrfed-membership-page .site-main,
body.ajrfed-membership-page .entry-content {
    width: 100% !important;
    max-width: none !important;
}

body.ajrfed-design-on .ajrfed-membership-portal {
    padding-block: 16px 50px;
}

body.ajrfed-design-on .ajrfed-membership-form {
    display: grid;
    gap: 20px;
    margin: 0;
}

body.ajrfed-design-on .ajrfed-form-section {
    padding: clamp(20px, 3.8vw, 34px);
    border: 1px solid var(--ajrfed-v170-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--ajrfed-v170-shadow-soft);
}

body.ajrfed-design-on .ajrfed-form-section__heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(107,42,144,.10);
}

body.ajrfed-design-on .ajrfed-form-section__heading > span {
    flex: 0 0 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--ajrfed-primary, #6B2A90), #8b3daa);
    box-shadow: 0 7px 18px rgba(107,42,144,.22);
    font: 800 12px/1 "Noto Kufi Arabic", system-ui, sans-serif;
}

body.ajrfed-design-on .ajrfed-form-section__heading h3 {
    margin: 0 0 5px !important;
    color: var(--ajrfed-ink, #20233A) !important;
    font: 800 clamp(17px, 2.3vw, 22px)/1.65 "Noto Kufi Arabic", system-ui, sans-serif !important;
}

body.ajrfed-design-on .ajrfed-form-section__heading p {
    margin: 0 !important;
    color: #706776 !important;
    font-size: 13px !important;
    line-height: 1.8 !important;
}

body.ajrfed-design-on .ajrfed-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

body.ajrfed-design-on .ajrfed-field--full {
    grid-column: 1 / -1;
}

body.ajrfed-design-on .ajrfed-field label,
body.ajrfed-design-on .ajrfed-upload-card label {
    display: block;
    margin-bottom: 8px;
    color: #332c39;
    font-size: 13.5px;
    font-weight: 750;
    line-height: 1.8;
}

body.ajrfed-design-on .ajrfed-field label b {
    color: #c92745;
}

body.ajrfed-design-on .ajrfed-field input,
body.ajrfed-design-on .ajrfed-field select {
    width: 100% !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    color: #24202a !important;
    background: #fcfbfd !important;
    border: 1px solid #d9d1df !important;
    border-radius: 12px !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease !important;
}

body.ajrfed-design-on .ajrfed-field input:focus,
body.ajrfed-design-on .ajrfed-field select:focus {
    background: #fff !important;
    border-color: rgba(107,42,144,.62) !important;
    box-shadow: 0 0 0 4px rgba(107,42,144,.085) !important;
}

body.ajrfed-design-on .ajrfed-other-input[hidden] {
    display: none !important;
}

body.ajrfed-design-on .ajrfed-other-input:not([hidden]) {
    display: block !important;
    margin-top: 9px !important;
}

body.ajrfed-design-on .ajrfed-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 14px;
}

body.ajrfed-design-on .ajrfed-upload-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    min-height: 168px;
    padding: 18px;
    border: 1px dashed rgba(107,42,144,.32);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff, #faf7fc);
}

body.ajrfed-design-on .ajrfed-upload-card label {
    margin: 0 0 14px;
}

body.ajrfed-design-on .ajrfed-upload-card label strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ajrfed-primary, #6B2A90);
    font-size: 13px;
}

body.ajrfed-design-on .ajrfed-upload-card label span {
    display: block;
    color: #786f7d;
    font-size: 11.8px;
    font-weight: 500;
    line-height: 1.75;
}

body.ajrfed-design-on .ajrfed-upload-card input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 9px;
    border: 1px solid #e1dbe5;
    border-radius: 10px;
    background: #fff;
    color: #49404f;
    font-size: 11px;
}

body.ajrfed-design-on .ajrfed-server-limit-note {
    margin: 14px 0 0 !important;
    padding: 11px 14px;
    border-radius: 10px;
    background: #fff8e8;
    color: #6b5630 !important;
    font-size: 11.8px !important;
    line-height: 1.75 !important;
}

body.ajrfed-design-on .ajrfed-membership-consent {
    padding: 17px 20px;
    border: 1px solid rgba(214,180,92,.38);
    border-radius: 14px;
    background: #fffdf6;
    color: #4e4637;
    font-size: 13px;
    line-height: 1.9;
}

body.ajrfed-design-on .ajrfed-membership-consent label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

body.ajrfed-design-on .ajrfed-membership-consent input {
    width: 18px;
    height: 18px;
    margin-top: 5px;
    accent-color: var(--ajrfed-primary, #6B2A90);
}

body.ajrfed-design-on .ajrfed-membership-submit {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 13px 28px;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--ajrfed-primary, #6B2A90), #7f339d 58%, var(--ajrfed-secondary, #D4146E));
    box-shadow: 0 13px 28px rgba(107,42,144,.23);
    font: 800 14px/1.5 "Noto Kufi Arabic", system-ui, sans-serif;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

body.ajrfed-design-on .ajrfed-membership-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(107,42,144,.29);
}

body.ajrfed-design-on .ajrfed-form-alert {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 14px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.8;
}
body.ajrfed-design-on .ajrfed-form-alert.is-success { background:#f0faf4; border:1px solid #bfe5cc; color:#1f6840; }
body.ajrfed-design-on .ajrfed-form-alert.is-error { background:#fff4f5; border:1px solid #efc7cd; color:#9b263b; }
body.ajrfed-design-on .ajrfed-form-trap { position:absolute !important; inline-size:1px !important; block-size:1px !important; opacity:0 !important; pointer-events:none !important; inset-inline-start:-9999px !important; }

/* Training --------------------------------------------------------------- */
body.ajrfed-design-on .ajrfed-training-page {
    padding-block: 16px 52px;
}
body.ajrfed-design-on .ajrfed-training-grid {
    counter-reset: training;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 15px;
}
body.ajrfed-design-on .ajrfed-training-card {
    position: relative;
    min-height: 155px;
    display: grid;
    grid-template-columns: 54px 1fr;
    align-items: start;
    gap: 15px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--ajrfed-v170-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--ajrfed-v170-shadow-soft);
}
body.ajrfed-design-on .ajrfed-training-card__number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--ajrfed-primary, #6B2A90);
    background: #f4edf8;
    border: 1px solid rgba(107,42,144,.13);
    font: 800 12px/1 "Noto Kufi Arabic", system-ui, sans-serif;
}
body.ajrfed-design-on .ajrfed-training-card p {
    margin: 0 !important;
    color: #453d4b !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 2 !important;
    text-align: justify !important;
    text-align-last: start !important;
}
body.ajrfed-design-on .ajrfed-contact-panel {
    margin-top: 22px;
    padding: clamp(22px, 4vw, 34px);
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #33263e, #552b69 60%, #6B2A90);
    box-shadow: 0 18px 42px rgba(45,28,56,.18);
}
body.ajrfed-design-on .ajrfed-contact-panel .ajrfed-eyebrow { color:#f0cf7f; }
body.ajrfed-design-on .ajrfed-contact-panel h3,
body.ajrfed-design-on .ajrfed-contact-panel p { color:#fff !important; }
body.ajrfed-design-on .ajrfed-contact-panel p { margin:0 0 18px !important; opacity:.92; line-height:2 !important; text-align:justify !important; text-align-last:start !important; }
body.ajrfed-design-on .ajrfed-contact-actions { display:flex; flex-wrap:wrap; gap:10px; }
body.ajrfed-design-on .ajrfed-contact-actions a { display:inline-flex; align-items:center; min-height:42px; padding:8px 14px; color:#fff !important; border:1px solid rgba(255,255,255,.22); border-radius:11px; background:rgba(255,255,255,.08); text-decoration:none !important; font-weight:700; }

/* Advisory Board --------------------------------------------------------- */
body.ajrfed-design-on .ajrfed-advisory-page {
    padding-block: 16px 52px;
}
body.ajrfed-design-on .ajrfed-advisory-responsibilities {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 12px;
    margin-bottom: 32px;
}
body.ajrfed-design-on .ajrfed-advisory-responsibilities article {
    position: relative;
    padding: 18px 20px;
    border: 1px solid rgba(107,42,144,.11);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(50,31,61,.05);
}
body.ajrfed-design-on .ajrfed-advisory-responsibilities article::before {
    content:"";
    position:absolute;
    inset-block:17px;
    inset-inline-start:0;
    width:3px;
    border-radius:5px;
    background:linear-gradient(var(--ajrfed-secondary, #D4146E),var(--ajrfed-accent, #D6B45C));
}
body.ajrfed-design-on .ajrfed-advisory-responsibilities p { margin:0 !important; color:#4c4351 !important; font-size:13.2px !important; line-height:1.95 !important; text-align:justify !important; text-align-last:start !important; }
body.ajrfed-design-on .ajrfed-directory-heading { display:flex; justify-content:space-between; align-items:end; gap:20px; margin:34px 0 18px; padding:0 4px; }
body.ajrfed-design-on .ajrfed-directory-heading p { margin:0 !important; max-width:820px; color:#6a6170 !important; font-size:13px !important; line-height:1.9 !important; }
body.ajrfed-design-on .ajrfed-advisor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
}
body.ajrfed-design-on .ajrfed-advisor-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(107,42,144,.13);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--ajrfed-v170-shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}
body.ajrfed-design-on .ajrfed-advisor-card:hover { transform: translateY(-3px); box-shadow:0 17px 40px rgba(47,31,59,.12); }
body.ajrfed-design-on .ajrfed-advisor-card__photo { position:relative; aspect-ratio: 4/3; overflow:hidden; background:linear-gradient(135deg,#f3edf7,#f8f4fa); }
body.ajrfed-design-on .ajrfed-advisor-card__photo::after { content:""; position:absolute; inset-inline:0; bottom:0; height:35%; background:linear-gradient(transparent,rgba(36,24,44,.20)); pointer-events:none; }
body.ajrfed-design-on .ajrfed-advisor-card__photo img { width:100% !important; height:100% !important; display:block; object-fit:cover !important; object-position:center 20% !important; filter:none !important; opacity:1 !important; }
body.ajrfed-design-on .ajrfed-photo-placeholder { width:100%; height:100%; display:grid; place-items:center; color:#fff; background:linear-gradient(135deg,#6B2A90,#9d4bb7); }
body.ajrfed-design-on .ajrfed-photo-placeholder span { width:82px; height:82px; display:grid; place-items:center; border:1px solid rgba(255,255,255,.34); border-radius:50%; font:800 24px/1 system-ui,sans-serif; }
body.ajrfed-design-on .ajrfed-advisor-card__body { padding:19px 20px 21px; text-align:center; }
body.ajrfed-design-on .ajrfed-advisor-card__rank { display:inline-block; margin-bottom:7px; color:var(--ajrfed-secondary,#D4146E); font-size:11.5px; font-weight:800; }
body.ajrfed-design-on .ajrfed-advisor-card h4 { margin:0 0 7px !important; color:var(--ajrfed-ink,#20233A) !important; font:800 16px/1.75 "Noto Kufi Arabic",system-ui,sans-serif !important; }
body.ajrfed-design-on .ajrfed-advisor-card p { margin:0 !important; color:#6a6170 !important; font-size:12.5px !important; line-height:1.8 !important; text-align:center !important; }

/* Publications ----------------------------------------------------------- */
body.ajrfed-design-on .ajrfed-publications-page { padding-block:16px 54px; }
body.ajrfed-design-on .ajrfed-publication-stat {
    width:max-content;
    max-width:100%;
    display:flex;
    align-items:center;
    gap:13px;
    margin-top:22px;
    padding:10px 15px;
    border:1px solid rgba(107,42,144,.12);
    border-radius:14px;
    background:rgba(255,255,255,.78);
}
body.ajrfed-design-on .ajrfed-publication-stat strong { color:var(--ajrfed-primary,#6B2A90); font:800 25px/1 system-ui,sans-serif; }
body.ajrfed-design-on .ajrfed-publication-stat span { color:#554b5d; font-size:12.5px; font-weight:700; }
body.ajrfed-design-on .ajrfed-publication-services {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:13px;
    margin-bottom:34px;
}
body.ajrfed-design-on .ajrfed-publication-services article {
    display:grid;
    grid-template-columns:46px 1fr;
    gap:14px;
    align-items:start;
    padding:20px;
    border:1px solid rgba(107,42,144,.11);
    border-radius:16px;
    background:#fff;
    box-shadow:0 7px 22px rgba(50,31,61,.05);
}
body.ajrfed-design-on .ajrfed-publication-services article > span { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:#fff; background:linear-gradient(135deg,var(--ajrfed-primary,#6B2A90),#8c3fab); font:800 11px/1 system-ui,sans-serif; }
body.ajrfed-design-on .ajrfed-publication-services p { margin:0 !important; color:#4b4251 !important; font-size:13px !important; line-height:1.95 !important; text-align:justify !important; text-align-last:start !important; }
body.ajrfed-design-on .ajrfed-publication-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}
body.ajrfed-design-on .ajrfed-publication-card {
    min-width:0;
    overflow:hidden;
    border:1px solid rgba(107,42,144,.13);
    border-radius:20px;
    background:#fff;
    box-shadow:var(--ajrfed-v170-shadow-soft);
    transition:transform .2s ease,box-shadow .2s ease;
}
body.ajrfed-design-on .ajrfed-publication-card:hover { transform:translateY(-3px); box-shadow:0 18px 42px rgba(47,31,59,.12); }
body.ajrfed-design-on .ajrfed-publication-card__cover { position:relative; aspect-ratio: 4/5; overflow:hidden; background:#eee7f1; }
body.ajrfed-design-on .ajrfed-publication-card__cover > img { width:100% !important; height:100% !important; display:block; object-fit:cover !important; filter:none !important; opacity:1 !important; }
body.ajrfed-design-on .ajrfed-publication-card__number { position:absolute; inset-block-start:13px; inset-inline-start:13px; min-height:31px; display:inline-flex; align-items:center; padding:5px 10px; border-radius:10px; color:#fff; background:rgba(44,29,53,.88); backdrop-filter:blur(7px); font-size:11px; font-weight:800; }
body.ajrfed-design-on .ajrfed-book-placeholder { width:100%; height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:30px; color:#fff; text-align:center; background:linear-gradient(145deg,#382443,#6B2A90 58%,#8e3faa); }
body.ajrfed-design-on .ajrfed-book-placeholder::before { content:""; width:52px; height:2px; background:var(--ajrfed-accent,#D6B45C); border-radius:4px; }
body.ajrfed-design-on .ajrfed-book-placeholder span { font:800 25px/1 system-ui,sans-serif; letter-spacing:.08em; }
body.ajrfed-design-on .ajrfed-book-placeholder b { font:700 12px/1.7 "Noto Kufi Arabic",system-ui,sans-serif; opacity:.92; }
body.ajrfed-design-on .ajrfed-publication-card__body { padding:19px 19px 21px; }
body.ajrfed-design-on .ajrfed-publication-card h4 { min-height:3.5em; margin:0 0 9px !important; color:var(--ajrfed-ink,#20233A) !important; font:800 14.5px/1.75 "Noto Kufi Arabic",system-ui,sans-serif !important; text-align:start !important; }
body.ajrfed-design-on .ajrfed-publication-card__author { min-height:1.8em; margin:0 0 10px !important; color:#6b6171 !important; font-size:12px !important; line-height:1.7 !important; }
body.ajrfed-design-on .ajrfed-publication-card__meta { display:flex; flex-wrap:wrap; gap:6px; min-height:28px; margin-bottom:12px; }
body.ajrfed-design-on .ajrfed-publication-card__meta span { display:inline-flex; align-items:center; padding:4px 8px; border-radius:8px; color:#675a6d; background:#f5f0f7; font-size:10.5px; font-weight:700; }
body.ajrfed-design-on .ajrfed-publication-card__action { display:inline-flex; align-items:center; gap:7px; color:var(--ajrfed-primary,#6B2A90) !important; font-size:12px; font-weight:800; text-decoration:none !important; }

body.ajrfed-design-on .ajrfed-home-publications {
    margin-block:52px 30px;
    padding:clamp(24px,4vw,40px);
    border:1px solid rgba(107,42,144,.11);
    border-radius:25px;
    background:linear-gradient(180deg,#fbf9fd,#f7f3fa);
    box-shadow:0 18px 48px rgba(47,31,59,.07);
}
body.ajrfed-design-on .ajrfed-home-publications__head { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin-bottom:22px; }
body.ajrfed-design-on .ajrfed-home-publications__head p { margin:0 !important; max-width:760px; color:#6a6170 !important; font-size:13px !important; line-height:1.9 !important; }
body.ajrfed-design-on .ajrfed-home-publications__count { display:inline-flex; align-items:center; gap:8px; margin-top:12px; padding:6px 10px; border:1px solid rgba(107,42,144,.12); border-radius:10px; background:#fff; }
body.ajrfed-design-on .ajrfed-home-publications__count strong { color:var(--ajrfed-primary,#6B2A90); font-size:18px; }
body.ajrfed-design-on .ajrfed-home-publications__count span { color:#625768; font-size:11px; font-weight:700; }
body.ajrfed-design-on .ajrfed-section-link { flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; min-height:42px; padding:8px 14px; border:1px solid rgba(107,42,144,.15); border-radius:11px; color:var(--ajrfed-primary,#6B2A90) !important; background:#fff; text-decoration:none !important; font-size:12px; font-weight:800; }
body.ajrfed-design-on .ajrfed-home-publications .ajrfed-publication-card:nth-child(n+7) { display:none; }

body.ajrfed-design-on .ajrfed-empty-state {
    grid-column:1 / -1;
    min-height:180px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:7px;
    padding:30px;
    border:1px dashed rgba(107,42,144,.25);
    border-radius:18px;
    background:#fbf8fd;
    text-align:center;
}
body.ajrfed-design-on .ajrfed-empty-state__icon { width:46px; height:46px; display:grid; place-items:center; border-radius:50%; color:var(--ajrfed-primary,#6B2A90); background:#eee5f4; font-size:20px; }
body.ajrfed-design-on .ajrfed-empty-state strong { color:var(--ajrfed-ink,#20233A); font-size:14px; }
body.ajrfed-design-on .ajrfed-empty-state span { max-width:580px; color:#746b79; font-size:12px; line-height:1.8; }

/* Homepage Vision / Mission / Who we are / Contact / Objectives tabs ----- */
body.ajrfed-design-on.home .elementor-element-072bcf0,
body.ajrfed-design-on.home .elementor-element-a2a4885 {
    isolation:isolate;
}
body.ajrfed-design-on.home .elementor-element-072bcf0 :where(.e-n-tabs-content,.e-n-tabs-content > .e-con,.e-n-tabs-content > [role="tabpanel"],.e-n-tab-content),
body.ajrfed-design-on.home .elementor-element-a2a4885 :where(.e-n-tabs-content,.e-n-tabs-content > .e-con,.e-n-tabs-content > [role="tabpanel"],.e-n-tab-content) {
    background:#ffffff !important;
    background-image:none !important;
    border-color:rgba(107,42,144,.12) !important;
    color:var(--ajrfed-ink,#20233A) !important;
    filter:none !important;
    opacity:1 !important;
    mix-blend-mode:normal !important;
    text-shadow:none !important;
}
body.ajrfed-design-on.home .elementor-element-072bcf0 :where(.e-n-tabs-content > .e-con,.e-n-tabs-content > [role="tabpanel"],.e-n-tab-content),
body.ajrfed-design-on.home .elementor-element-a2a4885 :where(.e-n-tabs-content > .e-con,.e-n-tabs-content > [role="tabpanel"],.e-n-tab-content) {
    padding:clamp(22px,4vw,34px) !important;
    border:1px solid rgba(107,42,144,.12) !important;
    border-radius:0 0 18px 18px !important;
    box-shadow:0 13px 34px rgba(47,31,59,.065) !important;
}
body.ajrfed-design-on.home .elementor-element-072bcf0 :where(h4,p,li,strong,a),
body.ajrfed-design-on.home .elementor-element-a2a4885 :where(h4,p,li,strong,a) {
    color:#29232f !important;
    filter:none !important;
    opacity:1 !important;
    text-shadow:none !important;
}
body.ajrfed-design-on.home .elementor-element-072bcf0 h4,
body.ajrfed-design-on.home .elementor-element-a2a4885 h4 {
    margin:0 !important;
    font-size:clamp(13px,1.5vw,15px) !important;
    font-weight:500 !important;
    line-height:2.15 !important;
    text-align:justify !important;
    text-align-last:start !important;
}
body.ajrfed-design-on.home .elementor-element-072bcf0 h4 > img,
body.ajrfed-design-on.home .elementor-element-a2a4885 h4 > img {
    float:none !important;
    width:100% !important;
    max-width:280px !important;
    height:165px !important;
    display:block !important;
    margin:0 auto 18px !important;
    border-radius:14px !important;
    object-fit:cover !important;
    filter:none !important;
    opacity:1 !important;
    box-shadow:0 9px 24px rgba(47,31,59,.10) !important;
}
body.ajrfed-design-on.home .elementor-element-072bcf0 :where(.e-n-tab-title,[role="tab"]),
body.ajrfed-design-on.home .elementor-element-a2a4885 :where(.e-n-tab-title,[role="tab"]) {
    color:#563664 !important;
    background:#f7f2f9 !important;
    border-color:rgba(107,42,144,.10) !important;
    font-weight:750 !important;
    text-shadow:none !important;
}
body.ajrfed-design-on.home .elementor-element-072bcf0 :where(.e-n-tab-title,[role="tab"])[aria-selected="true"],
body.ajrfed-design-on.home .elementor-element-a2a4885 :where(.e-n-tab-title,[role="tab"])[aria-selected="true"] {
    color:#fff !important;
    background:linear-gradient(135deg,var(--ajrfed-primary,#6B2A90),#7d3898) !important;
    box-shadow:0 7px 18px rgba(107,42,144,.18) !important;
}

/* Newsletter — replaces the failing legacy SureForms footer form ---------- */
body.ajrfed-design-on .ajrfed-newsletter-wrapper.ajrfed-newsletter-fixed-v170 .srfm-error-message,
body.ajrfed-design-on .ajrfed-newsletter-wrapper.ajrfed-newsletter-fixed-v170 .srfm-form-error,
body.ajrfed-design-on .ajrfed-newsletter-wrapper.ajrfed-newsletter-fixed-v170 [class*="form-error" i] {
    display:none !important;
}
body.ajrfed-design-on .ajrfed-newsletter-form--v170,
body.ajrfed-design-on .ajrfed-newsletter-form--native {
    width:100% !important;
    max-width:760px !important;
    margin-inline:auto !important;
}
body.ajrfed-design-on .ajrfed-newsletter-form--v170 .ajrfed-newsletter-row,
body.ajrfed-design-on .ajrfed-newsletter-form--native .ajrfed-newsletter-row {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:9px !important;
}
body.ajrfed-design-on .ajrfed-newsletter-form--v170 .ajrfed-newsletter-email,
body.ajrfed-design-on .ajrfed-newsletter-form--native .ajrfed-newsletter-email {
    min-width:0 !important;
    min-height:50px !important;
    padding:10px 15px !important;
    border:1px solid rgba(107,42,144,.20) !important;
    border-radius:12px !important;
    background:#fff !important;
    color:#26212b !important;
    box-shadow:0 5px 18px rgba(47,31,59,.045) !important;
}
body.ajrfed-design-on .ajrfed-newsletter-form--v170 .ajrfed-newsletter-submit,
body.ajrfed-design-on .ajrfed-newsletter-form--native .ajrfed-newsletter-submit {
    min-width:112px !important;
    min-height:50px !important;
    padding:10px 18px !important;
    border:0 !important;
    border-radius:12px !important;
    color:#fff !important;
    background:linear-gradient(135deg,var(--ajrfed-primary,#6B2A90),var(--ajrfed-secondary,#D4146E)) !important;
    box-shadow:0 8px 20px rgba(107,42,144,.20) !important;
    font-weight:800 !important;
    cursor:pointer !important;
}
body.ajrfed-design-on .ajrfed-newsletter-honeypot { position:absolute !important; inline-size:1px !important; block-size:1px !important; overflow:hidden !important; opacity:0 !important; pointer-events:none !important; inset-inline-start:-9999px !important; }
body.ajrfed-design-on .ajrfed-subscribe-message { margin-top:8px !important; min-height:20px !important; font-size:12px !important; line-height:1.7 !important; }
body.ajrfed-design-on .ajrfed-subscribe-message.is-success { color:#237245 !important; }
body.ajrfed-design-on .ajrfed-subscribe-message.is-error { color:#b12842 !important; }

/* English editorial page direction and typography ------------------------- */
body.ajrfed-design-on.ajrfed-design-en .ajrfed-editorial-page,
html.ajrfed-lang-en body.ajrfed-design-on .ajrfed-editorial-page {
    direction:ltr !important;
    text-align:left !important;
}
body.ajrfed-design-on .ajrfed-editorial-page h2,
body.ajrfed-design-on .ajrfed-editorial-page h3,
body.ajrfed-design-on .ajrfed-editorial-page h4 { color:var(--ajrfed-ink,#20233A) !important; font-family:system-ui,-apple-system,"Segoe UI",sans-serif !important; line-height:1.45 !important; text-align:start !important; }
body.ajrfed-design-on .ajrfed-editorial-page h2 { font-size:clamp(26px,4vw,40px) !important; margin:0 0 20px !important; }
body.ajrfed-design-on .ajrfed-editorial-page h3 { margin:30px 0 13px !important; font-size:22px !important; }
body.ajrfed-design-on .ajrfed-editorial-page h4 { margin:24px 0 10px !important; font-size:17px !important; }
body.ajrfed-design-on .ajrfed-editorial-page p,
body.ajrfed-design-on .ajrfed-editorial-page li { color:#433b49 !important; font-size:15px !important; line-height:1.85 !important; text-align:justify !important; text-align-last:start !important; }
body.ajrfed-design-on .ajrfed-editorial-page li { margin-bottom:7px; }

@media (max-width: 921px) {
    body.ajrfed-design-on .ajrfed-upload-grid,
    body.ajrfed-design-on .ajrfed-advisor-grid,
    body.ajrfed-design-on .ajrfed-publication-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    body.ajrfed-design-on .ajrfed-training-grid,
    body.ajrfed-design-on .ajrfed-publication-services,
    body.ajrfed-design-on .ajrfed-advisory-responsibilities { grid-template-columns:1fr; }
}

@media (max-width: 640px) {
    body.ajrfed-design-on .ajrfed-institution-page,
    body.ajrfed-design-on .ajrfed-membership-portal,
    body.ajrfed-design-on .ajrfed-home-publications { width:min(100% - 22px,1180px); }
    body.ajrfed-design-on .ajrfed-section-hero,
    body.ajrfed-design-on .ajrfed-membership-hero { border-radius:19px; padding:24px 19px; }
    body.ajrfed-design-on .ajrfed-section-hero::before,
    body.ajrfed-design-on .ajrfed-membership-hero::before { inset-inline-start:20px; }
    body.ajrfed-design-on .ajrfed-form-grid,
    body.ajrfed-design-on .ajrfed-upload-grid,
    body.ajrfed-design-on .ajrfed-advisor-grid,
    body.ajrfed-design-on .ajrfed-publication-grid { grid-template-columns:1fr; }
    body.ajrfed-design-on .ajrfed-form-section { padding:18px 14px; border-radius:17px; }
    body.ajrfed-design-on .ajrfed-form-section__heading { gap:11px; }
    body.ajrfed-design-on .ajrfed-form-section__heading > span { flex-basis:39px; width:39px; min-height:39px; }
    body.ajrfed-design-on .ajrfed-training-card { grid-template-columns:44px 1fr; gap:12px; padding:17px 15px; }
    body.ajrfed-design-on .ajrfed-training-card__number { width:40px; height:40px; border-radius:11px; }
    body.ajrfed-design-on .ajrfed-home-publications { padding:21px 14px; border-radius:20px; }
    body.ajrfed-design-on .ajrfed-home-publications__head { align-items:flex-start; flex-direction:column; gap:14px; }
    body.ajrfed-design-on .ajrfed-section-link { width:100%; justify-content:center; }
    body.ajrfed-design-on .ajrfed-newsletter-form--v170 .ajrfed-newsletter-row,
    body.ajrfed-design-on .ajrfed-newsletter-form--native .ajrfed-newsletter-row { grid-template-columns:1fr !important; }
    body.ajrfed-design-on .ajrfed-newsletter-form--v170 .ajrfed-newsletter-submit,
    body.ajrfed-design-on .ajrfed-newsletter-form--native .ajrfed-newsletter-submit { width:100% !important; }
    body.ajrfed-design-on.home .elementor-element-072bcf0 h4 > img,
    body.ajrfed-design-on.home .elementor-element-a2a4885 h4 > img { max-width:100% !important; height:150px !important; }
}

/* ================================================================
   AJRFED Institutional Design v1.8.0 — Unified Executive Identity
   ================================================================ */
:root{
  --ajrfed-deep:#352343;
  --ajrfed-primary:#6B2A90;
  --ajrfed-secondary:#D4146E;
  --ajrfed-gold:#D6B45C;
  --ajrfed-ink:#20233A;
  --ajrfed-soft:#F6F2F8;
  --ajrfed-line:#E7DDEB;
}
body.ajrfed-design-on a[href*="86up.dev"]{display:none!important}
body.ajrfed-design-on .ajrfed-official-logo-link{display:flex!important;align-items:center;justify-content:center;text-decoration:none!important}
body.ajrfed-design-on img.ajrfed-official-logo,
body.ajrfed-design-on .site-logo-img img.custom-logo,
body.ajrfed-design-on .custom-logo-link img{width:auto!important;height:78px!important;max-width:92px!important;object-fit:contain!important;filter:none!important;opacity:1!important}

body.ajrfed-design-on .ajrfed-v180-page,
body.ajrfed-design-on .ajrfed-v180-standard-page,
body.ajrfed-design-on .ajrfed-v180-addon-section,
body.ajrfed-design-on .ajrfed-home-section{width:min(1180px,calc(100% - 36px));margin:34px auto 44px}
body.ajrfed-design-on .ajrfed-v180-panel{position:relative;overflow:hidden;padding:36px 42px;border-radius:24px;background:linear-gradient(120deg,#332240 0%,#4d2a5d 48%,#6b2a90 100%);box-shadow:0 18px 50px rgba(48,28,61,.16);color:#fff;text-align:start}
body.ajrfed-design-on .ajrfed-v180-panel::after{content:"";position:absolute;inset-inline-start:0;inset-block-end:0;width:180px;height:4px;background:linear-gradient(90deg,var(--ajrfed-secondary),var(--ajrfed-gold));border-radius:0 8px 0 0}
body.ajrfed-design-on .ajrfed-v180-panel>span{position:relative;z-index:2;display:block;margin-bottom:10px;color:#F6C95E!important;font:800 13px/1.5 "Noto Kufi Arabic",system-ui,sans-serif;letter-spacing:.01em}
body.ajrfed-design-on .ajrfed-v180-panel h2{position:relative;z-index:2;margin:0 0 12px!important;color:#fff!important;font:800 clamp(24px,3vw,38px)/1.55 "Noto Kufi Arabic",system-ui,sans-serif!important;text-align:start!important;text-shadow:none!important}
body.ajrfed-design-on .ajrfed-v180-panel p{position:relative;z-index:2;max-width:920px;margin:0!important;color:#F3EDF5!important;font-size:15px!important;line-height:2!important;text-align:justify!important;text-align-last:start!important}
body.ajrfed-design-on .ajrfed-v180-panel__watermark{position:absolute;z-index:1;inset-inline-end:-35px;inset-block-start:-48px;width:230px!important;height:230px!important;object-fit:contain!important;opacity:.09!important;filter:grayscale(1) brightness(3)!important;pointer-events:none}

body.ajrfed-design-on .ajrfed-v180-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:22px}
body.ajrfed-design-on .ajrfed-v180-card{overflow:hidden;border:1px solid var(--ajrfed-line);border-radius:20px;background:#fff;box-shadow:0 12px 34px rgba(47,31,59,.075);transition:transform .22s ease,box-shadow .22s ease}
body.ajrfed-design-on .ajrfed-v180-card:hover{transform:translateY(-4px);box-shadow:0 19px 44px rgba(47,31,59,.13)}
body.ajrfed-design-on .ajrfed-v180-card__image{height:245px;background:linear-gradient(145deg,#f8f4fa,#eee6f2);display:grid;place-items:center;overflow:hidden}
body.ajrfed-design-on .ajrfed-v180-card__image img{width:100%!important;height:100%!important;display:block;object-fit:cover!important;filter:none!important;opacity:1!important}
body.ajrfed-design-on .ajrfed-v180-card__body{padding:21px 21px 23px}
body.ajrfed-design-on .ajrfed-v180-card__body h3{margin:8px 0 10px!important;color:var(--ajrfed-ink)!important;font:800 16px/1.75 "Noto Kufi Arabic",system-ui,sans-serif!important;text-align:start!important}
body.ajrfed-design-on .ajrfed-v180-card__body p{margin:0 0 13px!important;color:#615769!important;font-size:13px!important;line-height:1.95!important;text-align:justify!important;text-align-last:start!important}
body.ajrfed-design-on .ajrfed-gold-label{display:inline-flex;align-items:center;min-height:28px;padding:4px 9px;border:1px solid rgba(214,180,92,.45);border-radius:9px;background:#fff9e9;color:#765c1e!important;font-size:10.5px!important;font-weight:800!important}
body.ajrfed-design-on .ajrfed-chip-row{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 14px}
body.ajrfed-design-on .ajrfed-chip-row span,
body.ajrfed-design-on .ajrfed-chip-row a{display:inline-flex;align-items:center;padding:5px 8px;border-radius:8px;background:#f5f0f7;color:#675a6d!important;font-size:10.5px;font-weight:700;text-decoration:none!important}
body.ajrfed-design-on .ajrfed-v180-action,
body.ajrfed-design-on .ajrfed-card-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 13px;border:1px solid #d7c8df;border-radius:10px;color:var(--ajrfed-primary)!important;background:#fff;font-size:11.5px;font-weight:800;text-decoration:none!important}
body.ajrfed-design-on .ajrfed-card-actions{display:flex;flex-wrap:wrap;gap:8px}
body.ajrfed-design-on .ajrfed-card-actions a:hover,
body.ajrfed-design-on .ajrfed-v180-action:hover{background:var(--ajrfed-primary);border-color:var(--ajrfed-primary);color:#fff!important}
body.ajrfed-design-on .ajrfed-empty-state{grid-column:1/-1;padding:32px;border:1px dashed #d9cadf;border-radius:18px;background:#faf7fb;color:#756a7c;text-align:center;font-weight:700}

/* Journals and partners preserve the entire cover/logo instead of cropping it. */
body.ajrfed-design-on .ajrfed-journal-card .ajrfed-v180-card__image,
body.ajrfed-design-on .ajrfed-partner-card__logo{height:245px;padding:18px;background:#fbf9fc;display:grid;place-items:center;overflow:hidden}
body.ajrfed-design-on .ajrfed-journal-card .ajrfed-v180-card__image img,
body.ajrfed-design-on .ajrfed-partner-card__logo img{width:100%!important;height:100%!important;object-fit:contain!important;filter:none!important;opacity:1!important}
body.ajrfed-design-on .ajrfed-partner-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
body.ajrfed-design-on .ajrfed-partner-card__logo{height:190px}
body.ajrfed-design-on .ajrfed-partner-card .ajrfed-v180-card__body h3{font-size:13.5px!important}

/* Publications: full cover + functioning DOI + scalable multi-author books. */
body.ajrfed-design-on .ajrfed-publication-card__cover{background:linear-gradient(145deg,#f8f4fa,#eee6f2)!important;padding:13px!important}
body.ajrfed-design-on .ajrfed-publication-card__cover>img{object-fit:contain!important;background:#fff!important;border-radius:10px!important;box-shadow:0 6px 22px rgba(40,25,48,.08)!important}
body.ajrfed-design-on .ajrfed-doi-link{display:inline-flex!important;align-items:center;padding:4px 8px;border-radius:8px;background:#f3edf7;color:var(--ajrfed-primary)!important;font-size:10.5px;font-weight:800;text-decoration:none!important}
body.ajrfed-design-on .ajrfed-doi-link:hover{text-decoration:underline!important}
body.ajrfed-design-on .ajrfed-book-authors{margin-top:14px;padding-top:12px;border-top:1px solid #eee6f1}
body.ajrfed-design-on .ajrfed-book-authors>summary{cursor:pointer;color:var(--ajrfed-primary);font-size:11.5px;font-weight:800;list-style:none}
body.ajrfed-design-on .ajrfed-book-authors>summary::-webkit-details-marker{display:none}
body.ajrfed-design-on .ajrfed-book-authors>div{display:grid;gap:7px;margin-top:10px}
body.ajrfed-design-on .ajrfed-book-authors article{padding:8px 10px;border-radius:9px;background:#faf7fb}
body.ajrfed-design-on .ajrfed-book-authors article b{display:block;color:#3d3143;font-size:10.5px}
body.ajrfed-design-on .ajrfed-book-authors article span{display:block;color:#756b7a;font-size:9.5px;margin-top:3px}

/* Leadership / Chairman */
body.ajrfed-design-on .ajrfed-chairman-card{display:grid;grid-template-columns:minmax(250px,32%) 1fr;gap:34px;margin-top:24px;padding:28px;border:1px solid var(--ajrfed-line);border-radius:24px;background:linear-gradient(145deg,#fff 0%,#fbf8fc 100%);box-shadow:0 17px 48px rgba(49,30,60,.09)}
body.ajrfed-design-on .ajrfed-chairman-card__photo{min-height:410px;padding:13px;border-radius:20px;background:linear-gradient(160deg,#40264f,#702c91);display:grid;place-items:center;overflow:hidden}
body.ajrfed-design-on .ajrfed-chairman-card__photo img{width:100%!important;height:100%!important;max-height:500px!important;object-fit:cover!important;border-radius:14px!important;background:#fff!important}
body.ajrfed-design-on .ajrfed-chairman-card__body h1{margin:8px 0 8px!important;color:#2d2134!important;font:800 clamp(24px,3vw,36px)/1.65 "Noto Kufi Arabic",system-ui,sans-serif!important;text-align:start!important}
body.ajrfed-design-on .ajrfed-chairman-card__aff{margin:0 0 5px!important;color:#65596b!important;font-weight:800!important}
body.ajrfed-design-on .ajrfed-chairman-card__spec{margin:0 0 18px!important;color:#8a3b83!important;font-weight:700!important}
body.ajrfed-design-on .ajrfed-chairman-card__bio{padding:16px 18px;border-inline-start:4px solid var(--ajrfed-secondary);border-radius:12px;background:#fff;color:#4e4653;line-height:2.05;text-align:justify}
body.ajrfed-design-on .ajrfed-chairman-card__bio p{margin:0!important;color:inherit!important}
body.ajrfed-design-on .ajrfed-leader-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
body.ajrfed-design-on .ajrfed-leader-facts section{padding:15px;border:1px solid #eadfed;border-radius:13px;background:#fff}
body.ajrfed-design-on .ajrfed-leader-facts h3{margin:0 0 8px!important;color:var(--ajrfed-primary)!important;font-size:13px!important}
body.ajrfed-design-on .ajrfed-leader-facts ul{margin:0;padding-inline-start:20px;color:#5c5262;font-size:12px;line-height:1.9}
body.ajrfed-design-on .ajrfed-leader-mini{display:grid;grid-template-columns:105px 1fr;gap:15px;align-items:center;margin-top:14px;padding:14px;border:1px solid #e8deec;border-radius:16px;background:#fff}
body.ajrfed-design-on .ajrfed-leader-mini__photo{width:105px;height:105px;border-radius:14px;overflow:hidden;background:#f2edf4}
body.ajrfed-design-on .ajrfed-leader-mini__photo img{width:100%!important;height:100%!important;object-fit:cover!important}
body.ajrfed-design-on .ajrfed-leader-mini span{color:#a16625;font-size:10.5px;font-weight:800}
body.ajrfed-design-on .ajrfed-leader-mini h3{margin:3px 0!important;color:#33253a!important;font-size:14px!important}
body.ajrfed-design-on .ajrfed-leader-mini p{margin:0!important;color:#756c79!important;font-size:11px!important}

/* Standard pages & legacy homepage tabs use the same identity language. */
body.ajrfed-design-on .ajrfed-v180-standard-content{margin-top:22px;padding:28px;border:1px solid var(--ajrfed-line);border-radius:20px;background:#fff;box-shadow:0 12px 35px rgba(47,31,59,.07)}
body.ajrfed-design-on .ajrfed-v180-standard-content p,
body.ajrfed-design-on .ajrfed-v180-standard-content h4,
body.ajrfed-design-on .ajrfed-v180-standard-content li{color:#4d4452!important;line-height:2!important;text-align:justify!important;text-align-last:start!important}
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content>.e-con,
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tab-content{border-radius:20px!important;background:linear-gradient(120deg,#382547,#5c2b70)!important;padding:28px!important;box-shadow:0 14px 38px rgba(49,31,61,.13)!important;filter:none!important;backdrop-filter:none!important}
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content h1,
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content h2,
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content h3,
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content h4,
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content p,
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content li{color:#fff!important;text-shadow:none!important;filter:none!important;opacity:1!important}
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content p,
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content h4{line-height:2!important;text-align:justify!important;text-align-last:start!important}
body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content img{border-radius:14px!important;filter:none!important;opacity:1!important;box-shadow:0 10px 25px rgba(0,0,0,.15)!important}

/* Home section spacing and link */
body.ajrfed-design-on .ajrfed-home-institutional-sections{margin-top:24px}
body.ajrfed-design-on .ajrfed-home-section{padding-bottom:10px}
body.ajrfed-design-on .ajrfed-center-link{display:flex!important;width:max-content;margin:18px auto 0!important}

/* News: old and new galleries become a clean high-resolution grid. */
body.ajrfed-design-on.single-post .entry-content img{filter:none!important;opacity:1!important;image-rendering:auto!important;max-width:100%!important;height:auto!important;border-radius:12px}
body.ajrfed-design-on.single-post .entry-content p.ajrfed-image-gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
body.ajrfed-design-on.single-post .entry-content p.ajrfed-image-gallery br{display:none!important}
body.ajrfed-design-on.single-post .entry-content p.ajrfed-image-gallery img{width:100%!important;height:250px!important;object-fit:cover!important;margin:0!important}
body.ajrfed-design-on .ajrfed-news-assets{margin:34px 0;padding:24px;border:1px solid var(--ajrfed-line);border-radius:20px;background:#fff;box-shadow:0 12px 34px rgba(47,31,59,.06)}
body.ajrfed-design-on .ajrfed-news-assets h3{margin:24px 0 12px!important;color:#3b2a45!important;font:800 16px/1.6 "Noto Kufi Arabic",system-ui,sans-serif!important}
body.ajrfed-design-on .ajrfed-news-assets h3:first-child{margin-top:0!important}
body.ajrfed-design-on .ajrfed-news-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.ajrfed-design-on .ajrfed-news-gallery a{display:block;overflow:hidden;border-radius:13px;background:#f4eff6}
body.ajrfed-design-on .ajrfed-news-gallery img{display:block;width:100%!important;height:260px!important;object-fit:cover!important;border-radius:0!important;transition:transform .25s ease}
body.ajrfed-design-on .ajrfed-news-gallery a:hover img{transform:scale(1.02)}
body.ajrfed-design-on .ajrfed-news-videos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
body.ajrfed-design-on .ajrfed-news-videos iframe,
body.ajrfed-design-on .ajrfed-news-videos video{width:100%!important;aspect-ratio:16/9;height:auto!important;border:0;border-radius:13px}
body.ajrfed-design-on .ajrfed-news-files{display:flex;flex-wrap:wrap;gap:9px}
body.ajrfed-design-on .ajrfed-news-files a{display:inline-flex;align-items:center;min-height:38px;padding:8px 12px;border-radius:10px;background:#f4eff6;color:var(--ajrfed-primary)!important;font-size:11.5px;font-weight:800;text-decoration:none!important}

/* Membership refinements */
body.ajrfed-design-on .ajrfed-membership-form select#ajrfed_country,
body.ajrfed-design-on .ajrfed-membership-form select#ajrfed_country_code{direction:inherit}
body.ajrfed-design-on .ajrfed-form-section--support{border-color:#e5d7ea;background:linear-gradient(145deg,#fff,#fbf8fc)}

/* Contact WhatsApp */
body.ajrfed-design-on .ajrfed-whatsapp-link{display:inline-flex!important;align-items:center;gap:6px;direction:ltr!important;unicode-bidi:embed;padding:6px 10px;border-radius:9px;background:#eef8f1;color:#167840!important;font-weight:800;text-decoration:none!important}
body.ajrfed-design-on .ajrfed-whatsapp-link::before{content:"WhatsApp";font-size:10px;font-weight:700}

/* Footer credit controlled by Foundation IT Department. */
body.ajrfed-design-on .ajrfed-copyright-strip{margin-top:28px;padding:18px 24px;background:#241a2b;color:#eee4f1;border-top:3px solid var(--ajrfed-gold)}
body.ajrfed-design-on .ajrfed-copyright-strip>div{width:min(1180px,100%);margin:auto;display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
body.ajrfed-design-on .ajrfed-copyright-strip span{font-size:11px;line-height:1.8;color:#eee4f1}

/* Desktop/mobile parity. Same information, scaled layout. */
@media (max-width:1024px){
 body.ajrfed-design-on .ajrfed-v180-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.ajrfed-design-on .ajrfed-partner-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.ajrfed-design-on .ajrfed-chairman-card{grid-template-columns:280px 1fr;gap:24px}
 body.ajrfed-design-on .ajrfed-leader-facts{grid-template-columns:1fr}
 body.ajrfed-design-on.single-post .entry-content p.ajrfed-image-gallery,
 body.ajrfed-design-on .ajrfed-news-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:767px){
 body.ajrfed-design-on img.ajrfed-official-logo,
 body.ajrfed-design-on .site-logo-img img.custom-logo,
 body.ajrfed-design-on .custom-logo-link img{height:58px!important;max-width:66px!important}
 body.ajrfed-design-on .ajrfed-v180-page,
 body.ajrfed-design-on .ajrfed-v180-standard-page,
 body.ajrfed-design-on .ajrfed-v180-addon-section,
 body.ajrfed-design-on .ajrfed-home-section{width:calc(100% - 24px);margin:20px auto 30px}
 body.ajrfed-design-on .ajrfed-v180-panel{padding:24px 20px;border-radius:18px}
 body.ajrfed-design-on .ajrfed-v180-panel h2{font-size:21px!important;line-height:1.7!important;text-align:center!important}
 body.ajrfed-design-on .ajrfed-v180-panel>span{text-align:center!important;font-size:11px}
 body.ajrfed-design-on .ajrfed-v180-panel p{font-size:12.5px!important;line-height:1.95!important;text-align:justify!important;text-align-last:start!important}
 body.ajrfed-design-on .ajrfed-v180-panel__watermark{width:150px!important;height:150px!important;inset-inline-end:-35px;inset-block-start:-28px}
 body.ajrfed-design-on .ajrfed-v180-card-grid,
 body.ajrfed-design-on .ajrfed-partner-grid{grid-template-columns:1fr;gap:14px}
 body.ajrfed-design-on .ajrfed-v180-card__image{height:220px}
 body.ajrfed-design-on .ajrfed-partner-card__logo{height:170px}
 body.ajrfed-design-on .ajrfed-chairman-card{grid-template-columns:1fr;padding:16px;gap:18px;border-radius:18px}
 body.ajrfed-design-on .ajrfed-chairman-card__photo{min-height:310px;max-height:420px}
 body.ajrfed-design-on .ajrfed-chairman-card__body h1{text-align:center!important;font-size:23px!important}
 body.ajrfed-design-on .ajrfed-chairman-card__body>.ajrfed-gold-label,
 body.ajrfed-design-on .ajrfed-chairman-card__aff,
 body.ajrfed-design-on .ajrfed-chairman-card__spec{text-align:center!important;display:block}
 body.ajrfed-design-on .ajrfed-v180-standard-content{padding:18px;border-radius:16px}
 body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tabs-content>.e-con,
 body.ajrfed-design-on .elementor-widget-n-tabs .e-n-tab-content{padding:18px!important;border-radius:16px!important}
 body.ajrfed-design-on.single-post .entry-content p.ajrfed-image-gallery,
 body.ajrfed-design-on .ajrfed-news-gallery,
 body.ajrfed-design-on .ajrfed-news-videos{grid-template-columns:1fr}
 body.ajrfed-design-on.single-post .entry-content p.ajrfed-image-gallery img,
 body.ajrfed-design-on .ajrfed-news-gallery img{height:auto!important;max-height:none!important;object-fit:contain!important;background:#f5f1f7}
 body.ajrfed-design-on .ajrfed-copyright-strip>div{justify-content:center;text-align:center}
 body.ajrfed-design-on .ajrfed-copyright-strip span{width:100%;text-align:center}
}
body.ajrfed-design-on .ajrfed-news-archive>.ajrfed-v180-panel{margin-bottom:24px}
