:root{
  --afaq-primary:#0d6efd;
  --afaq-primary-dark:#0a58ca;
  --afaq-primary-deep:#083b86;
  --afaq-primary-soft:#eef5ff;
  --afaq-page:#f4f8ff;
  --afaq-card:#ffffff;
  --afaq-border:rgba(13,110,253,.12);
  --afaq-text:#1f2d3d;
  --afaq-text-soft:#60748a;
  --afaq-radius:18px;
  --afaq-shadow:0 10px 30px rgba(13,110,253,.10);
}

html,body{height:100%;}
body{min-height:100vh;display:flex;flex-direction:column;background:var(--afaq-page);color:var(--afaq-text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;}
main{flex:1 0 auto;}

.aq-header{background:linear-gradient(135deg,var(--afaq-primary-deep),var(--afaq-primary));color:#fff;}
.aq-header-bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:78px;}
.aq-brand{display:flex;align-items:center;gap:.85rem;text-decoration:none;min-width:0;}
.aq-brand-logo{width:48px;height:48px;object-fit:cover;border-radius:12px;border:1px solid rgba(255,255,255,.25);background:#fff;}
.aq-brand-texts{display:flex;flex-direction:column;line-height:1.1;min-width:0;}
.aq-brand-en,.aq-brand-ar{color:#fff !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.aq-brand-en{font-weight:700;font-size:1.02rem;letter-spacing:.01em;}
.aq-brand-ar{font-size:.84rem;color:#dfeaff !important;}
.aq-menu-toggle{border-color:rgba(255,255,255,.35);display:none;}
.aq-menu-toggle .navbar-toggler-icon{filter:brightness(0) invert(1);}
.aq-nav-shell{display:flex !important;align-items:center;justify-content:flex-end;gap:1rem;flex:1;}
.aq-nav-links,.aq-header-tools{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;}
.aq-nav-links a{color:#fff;text-decoration:none;font-weight:600;padding:.45rem .75rem;border-radius:999px;white-space:nowrap;}
.aq-nav-links a:hover,.aq-nav-links a:focus{background:rgba(255,255,255,.12);color:#fff;}
.aq-header-search{width:180px;}
.aq-header-search .form-control{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.12);color:#fff;}
.aq-header-search .form-control::placeholder{color:#e3eeff;}
.aq-header-search .form-control:focus{background:#fff;color:var(--afaq-text);}
.aq-lang-switcher .btn-outline-light:hover{color:var(--afaq-primary-deep) !important;}

h1,h2,h3,h4,h5,h6,.card-title,.fw-bold,.fw-semibold{color:var(--afaq-text);}
.text-muted,.aq-meta,small,.small{color:var(--afaq-text-soft)!important;}
p,label,li,td,th,div,span{color:inherit;}
a{color:var(--afaq-primary-dark);} a:hover{color:var(--afaq-primary);}

.card,.aq-panel,.aq-kpi,.aq-sidebar-block,.list-group-item,.table,.table td,.table th,.accordion-item{background:var(--afaq-card);color:var(--afaq-text);}
.card,.aq-panel{border:0;border-radius:var(--afaq-radius);box-shadow:var(--afaq-shadow);}
.border,.list-group-item,.table td,.table th,.table-light th,.accordion-item{border-color:var(--afaq-border)!important;}
.table-light th{background:#eef5ff!important;color:var(--afaq-text)!important;}
.table{margin-bottom:0;}
.shadow-soft{box-shadow:var(--afaq-shadow);} 

.btn-dark,.btn-primary,.bg-dark{background:linear-gradient(135deg,var(--afaq-primary-dark),var(--afaq-primary)) !important;border-color:var(--afaq-primary-dark)!important;color:#fff !important;}
.btn-outline-dark{color:var(--afaq-primary-dark);border-color:var(--afaq-primary-dark);}
.btn-outline-dark:hover,.btn-outline-dark:focus{background:var(--afaq-primary-dark);border-color:var(--afaq-primary-dark);color:#fff!important;}
.btn-light{color:var(--afaq-primary-deep)!important;}
.btn-warning{background:#d9ebff;border-color:#d9ebff;color:#083b86;}
.btn-warning:hover{background:#b9d9ff;border-color:#b9d9ff;color:#062f6b;}

.form-control,.form-select{color:var(--afaq-text);background:#fff;}
.form-control::placeholder{color:#90a1b7;}
.form-control:focus,.form-select:focus{border-color:#7db7ff;box-shadow:0 0 0 .25rem rgba(13,110,253,.15);} 
.alert-success,.alert-warning,.alert-secondary,.alert-danger{border:0;border-radius:14px;}
iframe{background:#fff;}

.aq-hero{border-radius:24px;background:radial-gradient(1200px 400px at 20% 0%, rgba(255,255,255,.98), rgba(255,255,255,.88)),linear-gradient(135deg, rgba(13,110,253,.18), rgba(13,110,253,.03));}
.aq-kpi{border-radius:14px;padding:1rem;}
.aq-panel{border:1px solid var(--afaq-border);} 
.aq-section-title{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem;}
.aq-journal-chip{display:inline-flex;align-items:center;gap:.5rem;padding:.45rem .8rem;border-radius:999px;background:var(--afaq-primary-soft);color:var(--afaq-primary-dark);font-size:.9rem;}
.aq-meta-strip{display:flex;flex-wrap:wrap;gap:.6rem 1rem;font-size:.92rem;color:var(--afaq-text-soft);}
.aq-meta-strip span{display:inline-flex;align-items:center;gap:.35rem;}
.aq-article-sidebar .card{position:sticky;top:1.2rem;}
.aq-citation{background:#f8fbff;border:1px dashed rgba(13,110,253,.28);border-radius:14px;padding:1rem;}
.aq-pill{display:inline-block;background:#eef5ff;color:var(--afaq-primary-dark);padding:.3rem .7rem;border-radius:999px;font-size:.85rem;}
.aq-list-link{color:var(--afaq-text);text-decoration:none;}
.aq-list-link:hover{color:var(--afaq-primary-dark);}
.aq-sidebar .list-group-item{border:0;border-bottom:1px solid var(--afaq-border);background:transparent;}
.aq-sidebar .list-group-item:last-child{border-bottom:0;}
.aq-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;}
.aq-mini-card{background:#fff;border:1px solid var(--afaq-border);border-radius:16px;padding:1rem;box-shadow:var(--afaq-shadow);height:100%;}
.aq-mini-card h3{font-size:1rem;margin-bottom:.35rem;}
.aq-mini-card p{font-size:.92rem;color:var(--afaq-text-soft);margin-bottom:0;}
.aq-icon-circle{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:999px;background:var(--afaq-primary-soft);color:var(--afaq-primary-dark);font-weight:700;margin-bottom:.8rem;}

.aq-footer{margin-top:auto;background:#fff;border-top:1px solid var(--afaq-border)!important;color:var(--afaq-text-soft);} 
.aq-footer a{color:var(--afaq-primary-dark);} 
.aq-footer a:hover{color:var(--afaq-primary);} 

html[dir="rtl"] body{font-family:system-ui,"Tahoma","Arial",sans-serif;}
html[dir="rtl"] .aq-header-bar,html[dir="rtl"] .aq-brand,html[dir="rtl"] .aq-nav-shell,html[dir="rtl"] .aq-nav-links,html[dir="rtl"] .aq-header-tools{flex-direction:row-reverse;}
html[dir="rtl"] .aq-brand-texts{align-items:flex-end;}
html[dir="rtl"] .aq-section-title{flex-direction:row-reverse;}
html[dir="rtl"] .aq-meta-strip{justify-content:flex-start;}
html[dir="rtl"] .aq-footer .container{flex-direction:row-reverse;}

@media (max-width: 1199.98px){.aq-header-search{width:140px;}}
@media (max-width: 991.98px){
  .aq-menu-toggle{display:block;}
  .aq-header-bar{min-height:72px;position:relative;}
  .aq-nav-shell{display:block !important;position:absolute;top:100%;left:0;right:0;background:linear-gradient(180deg,var(--afaq-primary),var(--afaq-primary-dark));padding:1rem;border-radius:0 0 18px 18px;box-shadow:var(--afaq-shadow);z-index:1000;}
  .aq-nav-shell:not(.show){display:none !important;}
  .aq-nav-links,.aq-header-tools{flex-direction:column;align-items:stretch;}
  .aq-nav-links a,.aq-header-tools .btn,.aq-header-tools .badge{justify-content:center;text-align:center;}
  .aq-header-search{width:100%;}
  .aq-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 575.98px){.aq-brand-logo{width:42px;height:42px;}.aq-brand-en{font-size:.94rem;}.aq-brand-ar{font-size:.76rem;}.aq-stat-grid{grid-template-columns:1fr;}}

.aq-header {
  background: #0f3b63;
}

.aq-navbar {
  min-height: 80px;
}

.aq-brand {
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.aq-brand-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
}

.aq-brand-texts {
  min-width: 0;
}

.aq-brand-en,
.aq-brand-ar {
  display: block;
  line-height: 1.2;
  white-space: normal;
}

.aq-brand-en {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.aq-brand-ar {
  font-size: 0.9rem;
  color: #e9f2ff;
}

.aq-menu-toggle {
  border-color: rgba(255,255,255,.4);
}

.aq-menu-toggle .navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

.aq-nav-links {
  gap: 0.25rem;
}

.aq-nav-links .nav-link {
  color: #fff;
  padding: 0.5rem 0.75rem;
}

.aq-nav-links .nav-link:hover {
  color: #dbeafe;
}

.aq-header-tools {
  width: 100%;
}

.aq-header-search {
  width: 100%;
}

.aq-header-search input {
  min-width: 0;
}

@media (min-width: 992px) {
  .aq-header-tools {
    width: auto;
  }

  .aq-header-search {
    width: 220px;
  }

  .aq-nav-links {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 991.98px) {
  .aq-navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .aq-brand {
    max-width: calc(100% - 60px);
  }

  .aq-brand-en {
    font-size: 0.95rem;
  }

  .aq-brand-ar {
    font-size: 0.85rem;
  }

  .aq-nav-links {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
  }

  .aq-nav-links .nav-link {
    padding-left: 0;
    padding-right: 0;
  }

  .aq-header-tools {
    margin-top: 1rem;
  }

  .aq-lang-switcher,
  .aq-header-tools .btn,
  .aq-header-tools .badge {
    width: 100%;
  }

  .aq-lang-switcher .btn {
    width: 50%;
  }
}
