/* PageSpeed and accessibility fixes (Nov 27, 2026). Loaded after styles.css, see lib/scripts.php. */

/* Featured slider: show the first slide before the slider script starts, so the page
   doesn't jump when the slider starts (layout shift) and the main image appears sooner.
   FlexSlider sets its own inline styles on every slide once it runs. */
.flexslider .slides > li:first-child {
    display: block;
}

/* Featured slider (Nov 28, 2026): FlexSlider makes each slide position: relative when it
   starts. Before that, the caption (absolutely positioned) was placed against the slider
   box instead of the slide, and the switch counted as a layout shift (0.04 on phones)
   even though the caption ends up in the same place. Setting it from the start removes it. */
.flexslider .slides > li {
    position: relative;
}

/* Slider dots: more space between them so each one is easy to tap (24 px rule). */
.flex-control-paging li {
    margin: 0 8px;
}

/* Video carousel arrows: a 24 x 24 px tap area each, not overlapping.
   The arrow picture (12 x 23 sprite) stays the same size; the extra area is transparent padding. */
.jcarousel-control-prev,
.jcarousel-control-next {
    width: 12px;
    height: 23px;
    padding: 1px 6px 0;
    box-sizing: content-box;
    background-origin: content-box;
    background-clip: content-box;
}
.jcarousel-control-prev {
    right: 40px;
}

/* Homepage MarketPlace box: the listing links sat 20 px apart, too close to tap
   (24 px rule). A little space under each one makes it 26 px. */
.marketplace .market-list li {
    margin-bottom: 6px;
}

/* Homepage small section links (More events, Submit events, Subscribe to feed): a slightly
   darker blue so the small text is readable (4.7:1 instead of 4.0:1; was #237bde). */
.home .link {
    color: #1f6fc8;
}

/* Latest News headings and titles: a slightly darker green so they are readable on the
   grey background (contrast 3.2:1 instead of 2.8:1; was #61a60e). */
.home .news h2,
.home .news h2 a,
.home .news h3,
.home .news h3 a {
    color: #5a9a0d;
}

/* Latest News small links (More news, Contribute content, Subscribe to feed): small text
   needs more contrast, so a darker green (4.8:1 instead of 2.8:1; was #61a60e). */
.home .news .link {
    color: #477a0a;
}

/* Article share bar: darker WhatsApp green so the white "WhatsApp" label is readable
   (contrast 5.1:1 instead of 3.3:1; was #25a244). */
.social-block .aa-wa {
    background: #1b7f34;
}

/* Header social icons on phones (Nov 28, 2026): the icons keep their original 32 x 33 px
   size, but sat only 2 px apart, so it was easy to tap the wrong one. 8 px between them now.
   (44 px icons were tried the same night and were too big for Aziz.) Desktop and tablets
   are unchanged. */
@media only screen and (max-width: 480px) {
    .center .social {
        width: 200px;
    }
    .center .social li {
        margin: 0 4px;
    }
}

/* Menu button on phones and tablets (Nov 28, 2026): 42 px tall instead of 34 so it is
   easier to tap. The menu icon (sprite) moves down 4 px to stay centred, and the Contact /
   Advertise / Support links on the same green bar get the same line height. */
@media only screen and (max-width: 768px) {
    .menu-btn {
        line-height: 42px;
        background-position: -161px -340px;
    }
    .header-top .auth li,
    .header-top .auth a {
        line-height: 42px;
    }
}

/* Header banner close button (Nov 28, 2026): it sat at the far right of the page, about
   220 px from the banner, so it didn't look like part of the ad. It is now inside the
   banner box (templates/header.php): 8 px right of the banner's top corner on wide screens,
   and just above the banner's right corner when the banner fills the screen (phones and
   small tablets; the green band gets 10 px more room on top for it). These rules override
   the older #ads-close rules in styles.css. */
.ads-block .ads-in #ads-close {
    top: 0;
    right: -32px;
}
@media only screen and (max-width: 820px) {
    .ads-block {
        padding-top: 32px;
    }
    .ads-block .ads-in #ads-close {
        top: -28px;
        right: 0;
    }
}

/* Fonts (Nov 28, 2026, PageSpeed "Font display"): show the text right away in a
   fallback font and switch to the site font when it arrives, instead of hiding the
   text while the font downloads. Same fonts and files as styles.css and FlexSlider;
   these rules come later, so the browser uses them (identical family/weight/style).
   Old IE formats (eot, svg) are left out: no browser in use needs them. */
@font-face {
    font-family: 'OpenSansSemiBold';
    src: url('fonts/opensans-semibold-webfont.woff') format('woff'),
         url('fonts/opensans-semibold-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'OpenSansBold';
    src: url('fonts/opensans-bold-webfont.woff') format('woff'),
         url('fonts/opensans-bold-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'OpenSansExtraBold';
    src: url('fonts/opensans-extrabold-webfont.woff') format('woff'),
         url('fonts/opensans-extrabold-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ArcherSemibold';
    src: url('fonts/archer-semibold.woff2') format('woff2'),
         url('fonts/archer-semibold.woff') format('woff'),
         url('fonts/archer-semibold.ttf') format('truetype');
    font-display: swap;
}
@font-face {
    font-family: 'ArcherBold';
    src: url('fonts/archer-bold.woff2') format('woff2'),
         url('fonts/archer-bold.woff') format('woff'),
         url('fonts/archer-bold.ttf') format('truetype');
    font-display: swap;
}
/* Slider arrow icons (FlexSlider's icon font). */
@font-face {
    font-family: flexslider-icon;
    src: url('../vendor/flexslider/fonts/flexslider-icon.woff') format('woff'),
         url('../vendor/flexslider/fonts/flexslider-icon.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Phone and tablet menu (Nov 28, 2026): the menu used to sit at the top of the page and
   push the whole site 210 px to the right, so on a phone the page was squeezed, the menu
   scrolled away and an empty grey band was left. It is now a panel that slides in over
   the page from the left: most of the screen wide, full height, scrolls inside itself,
   with the page dimmed and locked behind it. Rows are 44 px tall, and About and Arab
   Americans get a button that opens their sub-pages. The script is in
   assets/js/functions.js ("Phone and tablet menu"). These rules override the older
   .nav-block / .nav-opened rules in styles.css. Desktop (wider than 768 px) is unchanged. */
@media only screen and (max-width: 768px) {
    .nav-block {
        display: block;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 100001;
        width: 85%;
        max-width: 320px;
        box-sizing: border-box;
        padding: 56px 0 24px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.28s;
    }
    .nav-opened .nav-block {
        position: fixed;
        visibility: visible;
        transform: none;
        box-shadow: 6px 0 24px rgba(0, 0, 0, 0.3);
        transition-delay: 0s;
    }
    /* The page stays where it is (it used to move 210 px to the right). */
    .nav-opened .container {
        position: static;
        left: auto;
        top: auto;
    }
    /* The page behind the open menu does not scroll. */
    html.aa-nav-lock,
    html.aa-nav-lock body {
        overflow: hidden;
    }
    /* Dimmed page behind the menu; tapping it closes the menu. */
    .aa-nav-backdrop {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 100000;
        background: rgba(0, 0, 0, 0.55);
        opacity: 0;
        visibility: hidden;
        touch-action: none;
        -webkit-tap-highlight-color: transparent;
        transition: opacity 0.28s ease-out, visibility 0s linear 0.28s;
    }
    .nav-opened .aa-nav-backdrop {
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }
    /* Close button (an X drawn with two bars), 44 x 44 px. */
    .aa-nav-close {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        cursor: pointer;
    }
    .aa-nav-close:before,
    .aa-nav-close:after {
        content: '';
        position: absolute;
        top: 21px;
        left: 11px;
        width: 22px;
        height: 2px;
        background: #fff;
        transform: rotate(45deg);
    }
    .aa-nav-close:after {
        transform: rotate(-45deg);
    }
    /* Menu rows: 44 px tall (were 34). */
    .nav-block .menu {
        margin-bottom: 14px;
    }
    .nav-block .menu > li {
        padding-bottom: 2px;
    }
    .nav-block .menu > li > a {
        padding: 0 16px 0 24px;
        font-size: 14px;
        line-height: 44px;
    }
    .nav-block .menu > li > a i {
        margin-top: 10px;
    }
    /* Sub-pages (About, Arab Americans): opened by their own button, not by hover. */
    .nav-block .menu > li.dropdown > a {
        margin-right: 52px;
        padding-right: 0;
    }
    .aa-sub-toggle {
        position: absolute;
        top: 0;
        right: 6px;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        cursor: pointer;
    }
    .aa-sub-toggle:before {
        content: '';
        position: absolute;
        top: 14px;
        left: 17px;
        width: 8px;
        height: 8px;
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
        transform: rotate(45deg);
        transition: transform 0.2s ease-out;
    }
    .aa-sub-open > .aa-sub-toggle:before {
        transform: translateY(5px) rotate(-135deg);
    }
    .nav-block .menu li:hover .sub-menu {
        display: none;
    }
    .nav-block .menu li.aa-sub-open > .sub-menu {
        display: block;
    }
    .nav-block .sub-menu {
        width: auto;
        min-width: 0;
        margin: 2px 0 6px;
        padding: 6px 0;
    }
    .nav-block .sub-menu li a {
        padding: 0 16px 0 61px;
        font-size: 14px;
        line-height: 44px;
    }
    /* Social icons line up with the menu labels. */
    .nav-block .social {
        width: auto;
        margin: 0 0 0 14px;
    }
    /* X icon: a white circle like the other four (it was a black square). The picture is a
       white X on black; inverting it gives a black X on a white circle. (A blend mode that
       also turned the X green was removed the same day: Aziz saw the About sub-pages grey
       out on his phone once the panel became scrollable.) */
    .nav-block .social li.twitter a {
        border-radius: 50%;
        filter: invert(1);
    }
    /* Colour (Aziz's choice, Nov 28, 2026): the dark green of the header bar instead of
       mid-grey (#6c6c6c), with the sub-pages on a darker green (was #3c3c3c). The current
       page and the row under the finger get a lighter band and stay white; they used to
       turn black, which was hard to read. The doubled .nav-block only makes these two
       icon rules as strong as the per-item ones in styles.css, so the white icons stay. */
    .nav-block {
        background: #056839;
    }
    .nav-block .sub-menu {
        background: #04502c;
    }
    .nav-block .menu > li:hover > a,
    .nav-block .menu > li > a:hover,
    .nav-block .menu > li.active > a {
        color: #fff;
    }
    .nav-block .menu > li.active > a {
        background: rgba(255, 255, 255, 0.14);
    }
    .nav-block.nav-block .menu li.active a i,
    .nav-block.nav-block .menu li:hover a i {
        background-position-y: -180px;
    }
    .nav-block .sub-menu li:hover {
        background: none;
    }
    .nav-block .sub-menu li:hover a {
        background: rgba(255, 255, 255, 0.14);
    }
    /* Keyboard focus. */
    .nav-block a:focus-visible,
    .nav-block button:focus-visible {
        outline: 2px solid #fff;
        outline-offset: -2px;
    }
}
@media only screen and (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .nav-block,
    .nav-opened .nav-block,
    .aa-nav-backdrop,
    .nav-opened .aa-nav-backdrop,
    .aa-sub-toggle:before {
        transition: none;
    }
}

/* Article headline on phones and tablets (Nov 28, 2026, Aziz's choice): 22 px instead of
   28 (line height 28 instead of 34), so a long headline takes fewer lines and more of the
   first picture shows. Desktop (wider than 768 px) keeps 28 px. Overrides h1.aa-title in
   styles.css. */
@media only screen and (max-width: 768px) {
    h1.aa-title {
        font-size: 22px;
        line-height: 28px;
    }
}

/* Green bar on phones and tablets (Nov 28, 2026): the bar was 1 px taller than the Menu
   button (43 vs 42 px), which left a thin green line under the button. The Contact /
   Advertise / Support links are in a smaller font than their list items, and that pushed
   each line 1 px taller. Aligning the links to the top of the line makes the bar 42 px. */
@media only screen and (max-width: 768px) {
    .header-top .auth a {
        vertical-align: top;
    }
}

/* Green bar on narrow phones (Nov 29, 2026, Aziz: the red Menu button must always be the
   full height of the green bar). Below about 360 px the Contact / Advertise / Support links
   no longer fit next to the button and dropped to a second line, which made the bar 84 px
   tall next to a 42 px button. Slightly smaller links and gaps keep them on one line down
   to 320 px wide. */
@media only screen and (max-width: 379px) {
    .header-top .center {
        padding-right: 8px;
    }
    .header-top .menu-btn {
        padding-right: 10px;
    }
    .header-top .auth li {
        margin-left: 6px;
    }
    .header-top .auth a {
        font-size: 11px;
    }
}

/* Admin bar on phones (Nov 29, 2026, logged-in users only): WordPress leaves 46 px at the
   top of the page for its toolbar, but the theme's body is position: relative, so the
   toolbar was placed 46 px lower, under that gap. That left a grey strip at the top and
   the toolbar covered the top of the NRS banner. Moving it up 46 px puts it back in its
   own space. (On wider screens the toolbar is fixed to the window and was already right.) */
@media screen and (max-width: 600px) {
    .admin-bar #wpadminbar {
        top: -46px;
    }
}

/* Photo captions in articles: smaller and grey, below the 18px article text (Nov 28, 2026).
   Block captions and classic [caption] captions; not the white captions laid over gallery images. */
.single .print .wp-element-caption:not(.wp-block-gallery figure *),
.single .print .wp-caption-text {
    font-size: 14px;
    line-height: 20px;
    color: #6c6c6c;
}

/* Newsletter sign-up button (Nov 28, 2026, Aziz asked): white text on WordPress's light
   grey-blue (#abb8c3, contrast 2.0:1) with fully rounded ends was hard to read. Now the
   Arab America green with square corners, like the share bar under articles (6.9:1), and
   a darker green on hover. Same size everywhere (16 px text, about 48 px tall): the
   articles had it at 13 px in most posts and 20 px in the reusable block. Only the
   newsletter button uses the "cyan-bluish-gray" colour (the About page, 29 articles and
   the "Newsletter" reusable block); other buttons in articles are unchanged. !important
   is needed to beat WordPress's colour and font-size classes. */
.wp-block-button__link.has-cyan-bluish-gray-background-color {
    background-color: #056839 !important;
    color: #fff !important;
    border-radius: 0;
    padding: 14px 28px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px !important;
    line-height: 20px;
    font-weight: 700;
    text-decoration: none;
}
.wp-block-button__link.has-cyan-bluish-gray-background-color:hover,
.wp-block-button__link.has-cyan-bluish-gray-background-color:focus-visible {
    background-color: #04502c !important;
    color: #fff !important;
}
.wp-block-button__link.has-cyan-bluish-gray-background-color:focus-visible {
    outline: 2px solid #056839;
    outline-offset: 2px;
}
