/*
Theme Name: NileAxis
Theme URI: https://nileaxis.org/
Author: NileAxis
Description: Clean Generation 2 corporate front-end theme for NileAxis Business ERP.
Version: 1.5.2
Requires at least: 6.8
Requires PHP: 8.1
Text Domain: nileaxis-theme
*/
:root{--nx-navy:#06294b;--nx-deep:#031d36;--nx-gold:#dca91f;--nx-white:#fff;--nx-ink:#0b2442}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--nx-ink);background:#fff}
a{text-decoration:none;color:inherit}.nx-wrap{width:min(1180px,92%);margin:auto}
.nx-header{background:#fff;position:sticky;top:0;z-index:20;border-bottom:1px solid #e6e9ed}.nx-nav{min-height:78px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.nx-brand{display:flex;align-items:center;gap:12px;font-weight:800;letter-spacing:.16em;font-size:24px}.nx-mark{color:var(--nx-gold);font-size:30px}.nx-brand small{display:block;font-size:9px;letter-spacing:.28em}
.nx-menu{display:flex;gap:28px;align-items:center;font-weight:600}.nx-cta,.nx-primary{background:var(--nx-gold);padding:14px 22px;border-radius:8px;font-weight:800}.nx-secondary{border:2px solid var(--nx-gold);padding:12px 22px;border-radius:8px;color:#fff;font-weight:800}
.nx-hero{min-height:620px;background:linear-gradient(90deg,rgba(2,27,51,.96) 0%,rgba(2,27,51,.78) 42%,rgba(2,27,51,.10) 76%),url('assets/images/nileaxis-hero.png') center/cover no-repeat;display:flex;align-items:center;color:#fff}
.nx-copy{max-width:650px;padding:80px 0}.nx-kicker{color:#efbd36;letter-spacing:.24em;font-weight:800}.nx-copy h1{font-size:64px;line-height:.92;margin:18px 0 24px;max-width:640px}.nx-copy p{font-size:20px;line-height:1.55;max-width:610px}.nx-actions{display:flex;gap:16px;margin-top:30px}
.nx-strip{background:var(--nx-deep);color:#fff}.nx-strip-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0}.nx-stat{padding:26px;border-right:1px solid rgba(255,255,255,.15)}.nx-stat strong{display:block;color:#efbd36;margin-bottom:7px}
.nx-features{padding:70px 0 90px;text-align:center}.nx-features .nx-kicker{font-size:13px}.nx-features h2{font-size:40px;margin:10px 0 36px}.nx-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;text-align:left}.nx-card{padding:28px;border:1px solid #e3e6ea;border-radius:12px;box-shadow:0 8px 26px rgba(0,0,0,.04)}.nx-card b{font-size:19px}.nx-card p{line-height:1.5;color:#46566b}
.nx-footer{background:#061f39;color:#d9e3ee;padding:28px 0;text-align:center}
@media(max-width:850px){.nx-menu{display:none}.nx-copy h1{font-size:46px}.nx-strip-grid{grid-template-columns:1fr 1fr}.nx-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.nx-copy h1{font-size:38px}.nx-actions{flex-direction:column}.nx-strip-grid,.nx-grid{grid-template-columns:1fr}.nx-hero{background-position:62% center}.nx-copy{padding:60px 0}}

/* v1.1 corporate navigation and approved NileAxis identity */
.nx-header{background:#061f39;border-bottom:1px solid rgba(255,255,255,.12)}
.nx-nav{min-height:84px}.nx-logo-small{display:block;width:148px;height:58px;object-fit:cover;object-position:center;}
.nx-menu{color:#fff}.nx-menu a:hover{color:#e3b22e}.nx-login{border:1px solid rgba(255,255,255,.65);color:#fff;padding:12px 18px;border-radius:8px;font-weight:800}
.nx-login:hover{background:#fff;color:#061f39}.nx-logo-hero{width:min(430px,80vw);height:auto;display:block;margin:0 auto 24px}
.nx-hero-brand{display:flex;align-items:center;justify-content:center;min-height:360px}
.nx-pagehero{background:#061f39;color:#fff;padding:72px 0 62px}.nx-pagehero h1{font-size:46px;margin:0 0 12px}.nx-pagehero p{font-size:19px;max-width:760px;line-height:1.55}
.nx-section{padding:64px 0}.nx-section.alt{background:#f5f8fb}.nx-three{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.nx-info{border:1px solid #dce5ee;border-radius:12px;padding:26px;background:#fff}
.nx-contact{max-width:760px}.nx-contact a{color:#0b5d94;font-weight:700}
@media(max-width:850px){.nx-login{margin-left:auto}.nx-three{grid-template-columns:1fr}.nx-logo-small{width:120px;height:48px}}

/* v1.1.1 corrected header identity:
   symbol = white; NILEAXIS wordmark = gold. */
.nx-brand-header{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    width:150px;
    min-width:150px;
    text-decoration:none;
    line-height:1;
}
.nx-brand-symbol{
    width:70px;
    height:47px;
    background:#fff;
    -webkit-mask-image:url("assets/images/nileaxis-symbol-mask.png");
    mask-image:url("assets/images/nileaxis-symbol-mask.png");
    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;
    -webkit-mask-position:center;
    mask-position:center;
    -webkit-mask-size:contain;
    mask-size:contain;
}
.nx-brand-word{
    margin-top:3px;
    color:#caa052;
    font-size:17px;
    font-weight:400;
    letter-spacing:.18em;
    white-space:nowrap;
}
@media(max-width:850px){
    .nx-brand-header{width:126px;min-width:126px}
    .nx-brand-symbol{width:58px;height:39px}
    .nx-brand-word{font-size:14px}
}

/* v1.1.2 approved header identity.
   Exact user-supplied white symbol; NILEAXIS stays gold underneath. */
.nx-brand-header-v112{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    width:148px;
    min-width:148px;
    text-decoration:none !important;
    line-height:1;
}
.nx-brand-header-v112 .nx-header-symbol-img{
    display:block;
    width:92px;
    height:auto;
    object-fit:contain;
}
.nx-brand-header-v112 .nx-header-wordmark{
    display:block;
    margin-top:5px;
    color:#caa052;
    font-size:17px;
    font-weight:400;
    letter-spacing:.18em;
    line-height:1.1;
    white-space:nowrap;
}
@media(max-width:850px){
    .nx-brand-header-v112{width:126px;min-width:126px}
    .nx-brand-header-v112 .nx-header-symbol-img{width:76px}
    .nx-brand-header-v112 .nx-header-wordmark{font-size:14px;margin-top:4px}
}

/* v1.1.3 responsive density correction */
.nx-features{padding:46px 0 54px!important}
.nx-features .nx-logo-hero{
  width:min(220px,42vw)!important;
  max-height:220px;
  object-fit:contain;
  margin:0 auto 10px!important;
}
.nx-features .nx-kicker{margin-top:0!important;margin-bottom:5px!important}
.nx-features h2{margin-top:0!important;margin-bottom:22px!important}
.nx-features .nx-grid{margin-top:0!important}
.nx-hero{min-height:0}
.nx-hero .nx-wrap{min-height:0}
@media (max-width:1100px){
  .nx-nav{gap:12px}
  .nx-menu{gap:14px}
  .nx-menu a{font-size:13px}
  .nx-features{padding:38px 0 46px!important}
}
@media (max-width:850px){
  .nx-nav{min-height:70px;flex-wrap:wrap;padding-top:8px;padding-bottom:8px}
  .nx-menu{order:3;width:100%;overflow-x:auto;justify-content:flex-start;padding:7px 0;scrollbar-width:thin}
  .nx-menu a{white-space:nowrap}
  .nx-cta{display:none}
  .nx-login{margin-left:auto}
  .nx-hero{padding-top:48px;padding-bottom:48px}
  .nx-hero h1{font-size:clamp(38px,10vw,58px);line-height:.96}
  .nx-strip-grid{grid-template-columns:1fr 1fr}
  .nx-features .nx-logo-hero{width:min(180px,52vw)!important;max-height:180px}
}
@media (max-width:560px){
  .nx-wrap{width:min(92%,1200px)}
  .nx-strip-grid{grid-template-columns:1fr}
  .nx-grid{grid-template-columns:1fr!important}
  .nx-actions{display:grid;grid-template-columns:1fr;gap:10px}
  .nx-primary,.nx-secondary{text-align:center}
  .nx-features{padding:30px 0 38px!important}
  .nx-features .nx-logo-hero{width:145px!important;max-height:145px}
}

/* v1.2.0 global SaaS + multilingual + dense responsive layout */
.nx-features{padding:28px 0 38px!important}
.nx-feature-head{display:grid;grid-template-columns:82px 1fr;gap:20px;align-items:center;text-align:left;margin-bottom:20px}
.nx-feature-head .nx-logo-hero{width:82px!important;height:82px!important;max-height:82px!important;object-fit:cover;margin:0!important;border-radius:10px}
.nx-feature-head .nx-kicker{margin:0 0 4px!important}
.nx-feature-head h2{margin:0!important;font-size:clamp(28px,3vw,40px)}
.nx-grid{gap:14px!important}.nx-card{padding:20px!important}
.nx-lang{position:relative}.nx-lang select{background:#061f39;color:#fff;border:1px solid rgba(255,255,255,.45);border-radius:7px;padding:9px 26px 9px 10px;font-weight:700}
html[dir="rtl"] body{direction:rtl;font-family:Arial,Tahoma,sans-serif}
html[dir="rtl"] .nx-feature-head,html[dir="rtl"] .nx-grid,html[dir="rtl"] .nx-pagehero,html[dir="rtl"] .nx-section{text-align:right}
html[dir="rtl"] .nx-stat{border-right:0;border-left:1px solid rgba(255,255,255,.15)}
@media(max-width:850px){
 .nx-feature-head{grid-template-columns:64px 1fr;gap:14px}
 .nx-feature-head .nx-logo-hero{width:64px!important;height:64px!important}
 .nx-lang{margin-left:auto}
}
@media(max-width:560px){
 .nx-features{padding:22px 0 30px!important}
 .nx-feature-head{grid-template-columns:52px 1fr;gap:12px}
 .nx-feature-head .nx-logo-hero{width:52px!important;height:52px!important}
 .nx-feature-head h2{font-size:25px}
 .nx-card{padding:17px!important}
}

/* v1.2.1 dark module showcase requested */
.nx-features{background:var(--nx-deep)!important;color:var(--nx-white)!important}
.nx-feature-head .nx-logo-hero{object-fit:contain!important;background:transparent!important;border-radius:0!important}
.nx-feature-head h2{color:var(--nx-white)!important}
.nx-features .nx-kicker{color:#efbd36!important}
.nx-features .nx-grid .nx-card{background:var(--nx-gold)!important;border-color:rgba(255,255,255,.18)!important;color:var(--nx-deep)!important;box-shadow:0 10px 28px rgba(0,0,0,.18)!important}
.nx-features .nx-grid .nx-card b,.nx-features .nx-grid .nx-card p{color:var(--nx-deep)!important}
@media(max-width:560px){.nx-features .nx-grid .nx-card{min-height:auto}}


/* NileAxis v1.3.0 — extensible multilingual website architecture */
.nx-language-switcher{display:flex;align-items:center}
.nx-language-switcher select{
  min-width:112px;background:#082744;color:#fff;border:1px solid rgba(255,255,255,.38);
  border-radius:7px;padding:9px 30px 9px 11px;font:inherit;font-weight:700
}
.nx-language-switcher select:focus{outline:2px solid #e4ad16;outline-offset:2px}
html[dir="rtl"] .nx-nav{direction:rtl}
html[dir="rtl"] .nx-menu{direction:rtl}
html[dir="rtl"] .nx-actions{direction:rtl}
html[dir="rtl"] .nx-grid,html[dir="rtl"] .nx-three{direction:rtl}
@media(max-width:900px){
 .nx-language-switcher{order:8}
 .nx-language-switcher select{min-width:100px}
}

/* v1.3.4 critical recovery: safe public-page shell only */
.nx-public-page-hero{background:var(--nx-deep);color:#fff;padding:56px 0 42px}
.nx-public-page-hero h1{margin:0 0 14px;font-size:clamp(34px,5vw,58px)}
.nx-public-page-hero p{max-width:850px;font-size:19px;line-height:1.6}
.nx-public-page-body{background:#f4f6f8;padding:42px 0 64px}
body.rtl .nx-public-page-hero,body.rtl .nx-public-page-body{text-align:right}

/* v1.3.6 public pages and multilingual runtime */
.nx-public-page-hero{background:var(--nx-deep);color:#fff;padding:64px 0 48px}
.nx-public-page-hero h1{font-size:clamp(38px,5vw,62px);margin:10px 0 14px}
.nx-public-page-hero p{font-size:19px;line-height:1.65;max-width:900px}
.nx-public-page-body{background:#f3f5f7;padding:48px 0 72px}
.nx-public-page-body .nx-card h2{margin-top:0}
.nx-contact-cta{margin-top:28px}
body.rtl .nx-copy,body.rtl .nx-public-page-hero,body.rtl .nx-public-page-body,body.rtl .nx-card{text-align:right}
body.rtl .nx-nav,body.rtl .nx-menu,body.rtl .nx-actions,body.rtl .nx-feature-head{direction:rtl}
body.rtl .nx-header-wordmark,body.rtl .nx-module-code{direction:ltr;unicode-bidi:isolate}
@media(max-width:900px){.nx-public-page-hero{padding:46px 0 34px}.nx-public-page-hero p{font-size:17px}}

/* v1.3.7 complete public subpages */
.nx-public-page-hero{background:linear-gradient(135deg,var(--nx-deep),var(--nx-navy));color:#fff;padding:76px 0 58px;border-bottom:1px solid rgba(220,169,31,.35)}
.nx-public-page-hero .nx-kicker{color:var(--nx-gold);letter-spacing:.18em;font-weight:800}
.nx-public-page-hero h1{max-width:920px;font-size:clamp(38px,5.2vw,66px);line-height:1.05;margin:14px 0 20px}
.nx-public-page-hero p{max-width:900px;font-size:20px;line-height:1.65;margin:0}
.nx-public-page-body{background:#f4f6f8;padding:54px 0 78px}
.nx-public-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.nx-public-card{background:#fff;border:1px solid #d9e0e7;border-radius:16px;padding:28px;min-height:190px;box-shadow:0 8px 24px rgba(3,29,54,.06)}
.nx-public-card h2{color:var(--nx-navy);font-size:21px;line-height:1.25;margin:0 0 12px}
.nx-public-card p{color:#334b62;font-size:16px;line-height:1.6;margin:0}
.nx-public-cta{margin-top:34px}
body.rtl .nx-public-page-hero,body.rtl .nx-public-page-body,body.rtl .nx-public-card{text-align:right}
@media(max-width:980px){.nx-public-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.nx-public-page-hero{padding:48px 0 38px}.nx-public-page-hero p{font-size:17px}.nx-public-page-body{padding:34px 0 52px}.nx-public-card-grid{grid-template-columns:1fr}.nx-public-card{min-height:0;padding:22px}}

/* v1.3.9: universal gold public cards */
.nx-public-card{
 background:var(--nx-gold)!important;
 border-color:#c89512!important;
 color:var(--nx-deep)!important;
 box-shadow:0 8px 24px rgba(3,29,54,.12);
}
.nx-public-card h2,.nx-public-card p{color:var(--nx-deep)!important}
body.rtl .nx-public-card{direction:rtl;text-align:right}

/* v1.4.0 professional Arabic typography */
body.rtl{font-family:Tahoma,"Arial",sans-serif}
body.rtl .nx-copy,body.rtl .nx-public-page-hero,body.rtl .nx-public-page-body,
body.rtl .nx-public-card,body.rtl .nx-feature-copy{direction:rtl;text-align:right}
body.rtl .nx-public-page-hero h1,body.rtl .nx-copy h1{line-height:1.3}
body.rtl .nx-kicker{letter-spacing:0}

/* v1.4.3 — Arabic homepage recovery: RTL text without reversing page geometry */
body.rtl{font-family:Tahoma,Arial,sans-serif}
body.rtl .nx-copy,
body.rtl .nx-copy h1,
body.rtl .nx-copy p,
body.rtl .nx-copy .nx-kicker,
body.rtl .nx-feature-copy,
body.rtl .nx-feature-copy h2,
body.rtl .nx-feature-copy p,
body.rtl .nx-public-page-hero,
body.rtl .nx-public-page-hero h1,
body.rtl .nx-public-page-hero p,
body.rtl .nx-public-card,
body.rtl .nx-public-card h2,
body.rtl .nx-public-card p{
 direction:rtl;text-align:right;unicode-bidi:plaintext;
}
body.rtl .nx-kicker{letter-spacing:0}
body.rtl .nx-copy h1,body.rtl .nx-public-page-hero h1{line-height:1.25}
/* Structural containers deliberately stay in their designed geometry. */
body.rtl .nx-hero,body.rtl .nx-public-card-grid,body.rtl .nx-actions{direction:ltr}
body.rtl .nx-copy,body.rtl .nx-public-card{direction:rtl}


/* v1.4.4 — complete Arabic component alignment without structural reversal */
body.rtl .nx-strip-grid,
body.rtl .nx-grid,
body.rtl .nx-feature-head { direction:rtl; }
body.rtl .nx-stat,
body.rtl .nx-stat strong,
body.rtl .nx-feature-head,
body.rtl .nx-feature-head > div,
body.rtl .nx-feature-head h2,
body.rtl .nx-feature-head .nx-kicker,
body.rtl .nx-features .nx-card,
body.rtl .nx-features .nx-card b,
body.rtl .nx-features .nx-card p {
  direction:rtl;
  text-align:right;
  unicode-bidi:plaintext;
}
body.rtl .nx-stat { border-right:0; border-left:1px solid rgba(255,255,255,.15); }
body.rtl .nx-stat:last-child { border-left:0; }
body.rtl .nx-feature-head { justify-content:flex-start; }
body.rtl .nx-feature-head .nx-logo-hero { margin-left:24px; margin-right:0; }
body.rtl .nx-features { text-align:right; }
@media(max-width:850px){
  body.rtl .nx-stat { border-left:1px solid rgba(255,255,255,.15); }
}


/* v1.4.5 — complete Arabic homepage component alignment.
   Text components are RTL/right aligned; structural grids remain unchanged. */
body.rtl .nx-strip .nx-stat,
body.rtl .nx-strip .nx-stat strong,
body.rtl .nx-feature-head > div,
body.rtl .nx-feature-head .nx-kicker,
body.rtl .nx-feature-head h2,
body.rtl .nx-features .nx-card,
body.rtl .nx-features .nx-card b,
body.rtl .nx-features .nx-card p {
  direction: rtl !important;
  text-align: right !important;
  unicode-bidi: plaintext;
}
body.rtl .nx-strip .nx-stat strong,
body.rtl .nx-features .nx-card b {
  display: block;
}
/* Keep grid/card ordering and feature-header geometry stable. */
body.rtl .nx-strip-grid,
body.rtl .nx-features .nx-grid,
body.rtl .nx-feature-head {
  direction: ltr;
}
/* Restore RTL inside the textual child after structural LTR containment. */
body.rtl .nx-feature-head > div,
body.rtl .nx-strip-grid > .nx-stat,
body.rtl .nx-features .nx-grid > .nx-card {
  direction: rtl !important;
}

/* v1.5.2 — ONE hero contract for every public page.
   No image is generated or modified. The existing Nile/pyramids asset is preserved.
   All wording is live localized HTML; the photo layer is language-neutral. */

.nx-hero,
.nx-public-page-hero{
    position:relative !important;
    overflow:hidden !important;
    isolation:isolate;
    background:#06294b !important;
    background-image:none !important;
}

/* Home keeps its deeper hero; subpages use a compact enterprise hero. */
.nx-hero{min-height:500px}
.nx-public-page-hero{min-height:330px;padding-top:64px;padding-bottom:64px}

/* Shared photographic layer. It is decorative only and never contains live copy. */
.nx-hero::after,
.nx-public-page-hero::after{
    content:"";
    position:absolute;
    z-index:-2;
    top:0;
    right:0;
    bottom:0;
    left:48%;
    background-image:url("assets/images/nileaxis-hero.png");
    background-repeat:no-repeat;
    background-size:auto 300%;
    background-position:right 52%;
    pointer-events:none;
}

/* Shared navy readability layer. */
.nx-hero::before,
.nx-public-page-hero::before{
    content:"";
    position:absolute;
    z-index:-1;
    inset:0;
    background:linear-gradient(90deg,#06294b 0%,#06294b 45%,rgba(6,41,75,.96) 51%,rgba(6,41,75,.58) 64%,rgba(6,41,75,.12) 80%);
    pointer-events:none;
}

.nx-hero .nx-wrap,
.nx-public-page-hero .nx-wrap{
    position:relative;
    z-index:1;
}
.nx-hero .nx-copy,
.nx-public-page-hero .nx-wrap{
    max-width:1280px;
}
.nx-hero .nx-copy{width:min(52%,680px)}
.nx-public-page-hero h1,
.nx-public-page-hero p,
.nx-public-page-hero .nx-kicker{
    max-width:690px;
}

/* LTR languages. */
body:not(.rtl) .nx-hero .nx-copy,
body:not(.rtl) .nx-public-page-hero .nx-wrap,
body:not(.rtl) .nx-public-page-hero h1,
body:not(.rtl) .nx-public-page-hero p{
    direction:ltr;
    text-align:left;
}

/* Arabic: text only changes direction; the physical page/photo layout does not flip. */
body.rtl .nx-hero .nx-copy,
body.rtl .nx-hero .nx-copy h1,
body.rtl .nx-hero .nx-copy p,
body.rtl .nx-hero .nx-copy .nx-kicker,
body.rtl .nx-public-page-hero .nx-wrap,
body.rtl .nx-public-page-hero h1,
body.rtl .nx-public-page-hero p,
body.rtl .nx-public-page-hero .nx-kicker{
    direction:rtl;
    text-align:right;
    unicode-bidi:plaintext;
}
body.rtl .nx-hero .nx-copy .nx-kicker,
body.rtl .nx-public-page-hero .nx-kicker{letter-spacing:0}
body.rtl .nx-hero .nx-actions{direction:rtl;justify-content:flex-start}

/* Gold cards stay consistent on every public page. */
.nx-public-card{
    background:#e5ad19 !important;
    color:#06294b !important;
}
.nx-public-card h2,
.nx-public-card h3,
.nx-public-card p,
.nx-public-card li{color:#06294b !important}

/* Responsive: retain the same Nile/pyramids photo as atmosphere without changing locale geometry. */
@media (max-width:900px){
    .nx-hero::after,
    .nx-public-page-hero::after{
        left:0;
        opacity:.38;
        background-size:auto 300%;
        background-position:72% 52%;
    }
    .nx-hero::before,
    .nx-public-page-hero::before{background:rgba(3,29,54,.78)}
    .nx-hero .nx-copy{width:100%;max-width:680px}
}
