/* ==========================================================================
   VARIABLES & THEME (Option B - Dark/Gold Theme)
   ========================================================================== */
:root {
  --bg: #0E1726;
  --bg2: #13203a;
  --panel: #172945;
  --gold: #C9A45C;
  --cyan: #3DD6E0;
  --text: #e7eef7;
  --muted: #9fb0c6;
  --line: rgba(255, 255, 255, 0.09);
  --radius: 16px;

  /* Advanced typography limits */
  --text-base: clamp(1rem, 1vw + 0.8rem, 1.1rem);
  --text-h1: clamp(2rem, 5vw + 1rem, 3rem);
  --text-h2: clamp(1.6rem, 3vw + 0.8rem, 2.2rem);
  --text-h3: clamp(1.1rem, 2vw + 0.6rem, 1.4rem);
}

/* Scrollbar & Selection */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--panel);
  border-radius: 10px;
  border: 1px solid var(--line);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}
::selection {
  background: var(--gold);
  color: #1a1306;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Tajawal', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: var(--text-base);
}

body[dir="ltr"] {
  font-family: 'Inter', 'Tajawal', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.25s ease-in-out;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, 92%);
  margin-inline: auto;
}

/* ==========================================================================
   COMPONENTS
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #e0c084);
  color: #1a1306;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(201, 164, 92, 0.35);
}

.btn-out {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-out:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(61, 214, 224, 0.05);
}

/* ==========================================================================
   LAYOUT SECTIONS
   ========================================================================== */
/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 23, 38, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
}

.logo .mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), #8a6f30);
  color: #11192b;
  display: grid;
  place-items: center;
  font-family: 'Inter';
  font-weight: 900;
  letter-spacing: 0.5px;
}

.nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-inline-start: auto;
  font-weight: 500;
  color: var(--muted);
}

.nav ul a {
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}

.nav ul a:hover {
  color: var(--gold);
}

.nav ul a.active {
  color: var(--text);
  border-color: var(--gold);
}

.lang {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--cyan);
  transition: all 0.3s ease;
}

.lang:hover {
  background: rgba(61, 214, 224, 0.1);
}

.burger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  padding: 4.5rem 0 4rem;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 400px at 80% 10%, rgba(61, 214, 224, 0.16), transparent 60%),
    radial-gradient(600px 500px at 10% 90%, rgba(201, 164, 92, 0.14), transparent 60%);
  pointer-events: none;
}

.hero .inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--cyan);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: var(--text-h1);
  line-height: 1.2;
  font-weight: 900;
  margin-bottom: 1rem;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 60ch;
  margin: 0 auto 1.7rem;
}

.hero-cta {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-strip {
  position: relative;
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.hero-strip .ph {
  aspect-ratio: 1;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s ease;
}

.hero-strip .ph:hover {
  transform: translateY(-4px);
}

.hero-strip img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

/* Stats */
.stats {
  background: var(--bg2);
  border-block: 1px solid var(--line);
}

.stats .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 0;
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 1.9rem;
  font-family: 'Inter';
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Standard Section */
section {
  padding: 4rem 0;
}

.head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.4rem;
}

.head .kicker {
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.head h2 {
  font-size: var(--text-h2);
  margin: 0.5rem 0;
  font-weight: 800;
}

.head p {
  color: var(--muted);
}

.center-link {
  text-align: center;
  margin-top: 2rem;
}

/* Division Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  display: block;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.card:hover::after {
  transform: scaleX(1);
}

.card .ico {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  margin-bottom: 1rem;
  transition: background 0.3s ease;
}

.card:hover .ico {
  background: rgba(201, 164, 92, 0.15);
}

.card h3 {
  font-size: var(--text-h3);
  margin-bottom: 0.5rem;
}

.card .more {
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.9rem;
}

/* Products grid */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.product {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
  border-color: rgba(201, 164, 92, 0.4);
}

.product .thumb {
  aspect-ratio: 1;
  background: #fff;
  display: grid;
  place-items: center;
  padding: 0.8rem;
}

.product .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product:hover .thumb img {
  transform: scale(1.05);
}

.product .p-body {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product h3 {
  font-size: 0.98rem;
  line-height: 1.4;
}

.product .req {
  margin-top: auto;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Division Page Hero */
.page-hero {
  position: relative;
  padding: 3.2rem 0;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
}

.page-hero h1 {
  font-size: var(--text-h1);
  font-weight: 900;
  margin-bottom: 0.4rem;
}

.page-hero p {
  color: var(--muted);
}

.cat-block {
  margin-bottom: 3rem;
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.3rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.cat-head .cat-ico {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.cat-head h2 {
  font-size: var(--text-h2);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.about-art {
  aspect-ratio: 16 / 12;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
  background: #fff;
  display: grid;
  place-items: center;
}

.about-art img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.about ul {
  list-style: none;
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

.about li {
  display: flex;
  gap: 0.6rem;
  color: var(--muted);
}

.about li::before {
  content: "◆";
  color: var(--gold);
}

.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 1rem;
}

.mv {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.mv h3 {
  color: var(--gold);
  margin-bottom: 0.5rem;
  font-size: var(--text-h3);
}

.mv p {
  color: var(--muted);
}

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.2rem;
}

.value {
  text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1rem;
  transition: transform 0.3s ease;
}

.value:hover {
  transform: translateY(-4px);
}

.value .vico {
  font-size: 1.8rem;
  margin-bottom: 0.6rem;
}

.value h4 {
  margin-bottom: 0.3rem;
}

.value p {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Contact Section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.2rem;
  align-items: start;
}

.info-list {
  display: grid;
  gap: 1rem;
}

.info {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: transform 0.3s;
}

.info:hover {
  transform: translateX(-4px);
}

body[dir="ltr"] .info:hover {
  transform: translateX(4px);
}

.info .i-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(61, 214, 224, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--cyan);
}

.info h4 {
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.info p {
  color: var(--muted);
  font-size: 0.92rem;
}

form {
  background: linear-gradient(180deg, var(--panel), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}

.field input, .field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.field input:focus, .field textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(61, 214, 224, 0.15);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
}

.row2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Footer */
footer {
  background: #0a1120;
  border-top: 1px solid var(--line);
  padding: 2.8rem 0 1.4rem;
  margin-top: 1rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

footer h4 {
  color: #fff;
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

footer ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--muted);
}

footer a:hover, footer a:focus-visible {
  color: var(--gold);
  outline: none;
}

footer a:focus-visible {
  text-decoration: underline;
}

.copy {
  text-align: center;
  border-top: 1px solid var(--line);
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ==========================================================================
   MEDIA QUERIES (Reduced)
   ========================================================================== */
@media (max-width: 900px) {
  .nav ul {
    display: none;
  }
  
  .burger {
    display: block;
    margin-inline-start: auto;
  }
  
  .nav ul.open {
    display: flex;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    background: var(--bg2);
    padding: 1rem;
    border-bottom: 1px solid var(--line);
  }
}

/* ==========================================================================
   ENHANCEMENTS (shared): semantics, scroll-reveal, back-to-top, mobile menu, scrollspy
   ========================================================================== */
main { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

#backToTop {
  position: fixed; bottom: 1.4rem; inset-inline-end: 1.4rem;
  width: 46px; height: 46px; border: none; border-radius: 50%;
  background: var(--gold, var(--brand, var(--blue, #1A6FB5))); color: #fff;
  font-size: 1.3rem; line-height: 1; cursor: pointer; z-index: 60;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s; box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
#backToTop.show { opacity: 1; visibility: visible; transform: none; }
#backToTop:hover { transform: translateY(-3px); }

.nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity .3s ease; z-index: 45;
}
.nav-overlay.show { opacity: 1; visibility: visible; }
body.menu-open { overflow: hidden; }

.cat-nav {
  display: flex; gap: .5rem; flex-wrap: wrap;
  padding: 0 0 1.2rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line);
}
.cat-nav a {
  padding: .4rem .95rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
  border: 1px solid var(--line); color: inherit; white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.cat-nav a:hover { border-color: var(--gold, var(--brand, var(--blue, #1A6FB5))); }
.cat-nav a.active { background: var(--gold, var(--brand, var(--blue, #1A6FB5))); color: #fff; border-color: transparent; }
