@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Barlow:wght@400;500;600&family=Cairo:wght@700;800;900&family=IBM+Plex+Sans+Arabic:wght@400;500;600&display=swap');

/* ==========================================================================
   BISON design tokens — accent #e00b00 on three layered near-blacks.

   Taken from the BISON brand site (bison-site/assets/css/bison.css) so the
   warranty flow and the marketing site share one palette, one radius scale
   and one pair of type roles.

   The legacy --navy- and --gray- names below are kept because the rest of
   this file was written against the old scale. Each old name is re-pointed at
   whichever BISON token now plays the same role, which flips every rule that
   reads them without an ~80-site find-and-replace. New rules should use the
   brand names directly.

   (Do not write a star followed by a slash anywhere in these comments — it
   closes the comment early, and the parser then eats the whole :root block
   that follows, silently un-defining every token in the file.)
   ========================================================================== */
:root {
  /* Type. Barlow Condensed carries the display role (condensed, uppercase);
     Barlow the body role. Cairo and IBM Plex Sans Arabic are their Arabic
     counterparts and are picked up by per-character fallback, so one stack
     serves both directions. */
  --font-display: 'Barlow Condensed', 'Cairo', system-ui, sans-serif;
  --font-body: 'Barlow', 'IBM Plex Sans Arabic', system-ui, sans-serif;

  /* Brand — the exact values shipped in the logo package. */
  --red: #e00b00;
  --red-hover: #b30900;
  --red-deep: #7a0600;

  /* Surfaces — three layers, none of them pure black. */
  --bg: #0f0e0e;
  --bg-alt: #141313;
  --surface: #1a1818;
  --surface-2: #221f1f;
  --line: #383434;
  --line-soft: rgba(255, 255, 255, 0.08);

  /* Text — body copy is grey, never white. */
  --text: #ffffff;
  --text-dim: #9a9696;
  --text-faint: #6b6767;

  /* Legacy aliases — see the note at the top of this block. */
  --navy-900: var(--bg);
  --navy-800: var(--bg-alt);
  --navy-700: var(--surface);
  --navy-600: var(--red);
  --navy-500: var(--red-hover);
  --navy-400: var(--red-deep);

  --gray-700: var(--surface-2);
  --gray-500: var(--text-dim);
  --gray-300: var(--text-faint);
  --gray-100: var(--line);
  --gray-50: var(--bg-alt);

  --theme-primary: var(--red);
  --theme-primary-hover: var(--red-hover);
  --primary-color: var(--red);
  --primary-light: var(--red);
  --primary-dark: var(--red-hover);
  --secondary-color: var(--text-dim);
  --accent-color: var(--red);

  --search-btn: transparent;
  --search-btn-hover: rgba(224, 11, 0, 0.12);
  --activate-btn: var(--red);
  --activate-btn-hover: var(--red-hover);

  --success-color: #2da05a;
  --success-fg: #7fd6a2;
  --warning-color: #e8a13c;
  --danger-color: var(--red);
  --danger-fg: #ff8b84;
  --light-color: var(--surface);
  --dark-color: var(--text-dim);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --transition-speed: 0.3s;
  --shine-degree: 120deg;
  --shine-color: rgba(255, 255, 255, 0.2);
  --shine-effect: linear-gradient(var(--shine-degree), transparent, var(--shine-color), transparent);
  --shine-transition: all 0.65s ease-in-out;
}

/* Kept for the guarantee certificate in view.php, which is a printed document
   and stays on its own typeset faces. Nothing in the site chrome uses them. */
@font-face { font-family: Gill; src: url('../fonts/gill-sans-bold.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: Arabic; src: url('../fonts/DroidKufi-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; }
@font-face { font-family: Arabic-Bold; src: url('../fonts/DroidKufi-Bold.ttf') format('truetype'); font-weight: 400; font-style: normal; }

/* ==========================================================================
   Base
   ========================================================================== */
body, main { display: flex; }
body {
  /* Bootstrap's reset hardcodes text-align:left; without this the site's
     RTL Arabic pages inherit that left-alignment on any element that
     doesn't set its own text-align (same root cause found in the admin
     panel — see bison-form.css for the full explanation). */
  text-align: start;
  background: var(--bg);
  min-height: 100vh;
  flex-direction: column;
  padding: 80px 0 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-dim);
  -webkit-font-smoothing: antialiased;
}
/* Arabic sits lower on the line and needs more leading than the Latin body. */
[dir="rtl"] body { line-height: 1.95; }
body * { transition: transform .3s, background-color .3s, color .3s, border-color .3s; }
main { flex: 1 0 auto; flex-direction: column; justify-content: center; align-items: center; }
.container { max-width: 1240px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
/* Arabic has no case, and the tight Latin tracking crowds its joined forms. */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 {
  text-transform: none;
  letter-spacing: 0;
}

::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ==========================================================================
   Header / nav
   ========================================================================== */
header.fixed-top { box-shadow: 0 1px 0 var(--line); }
.text-decoration-none { font-weight: 700; }
[dir="ltr"] .logo-title { font-family: var(--font-display); color: var(--text); letter-spacing: 4px; font-size: 48px; }

header .btn-info,
#mobileMenu .btn-outline-primary:hover {
  background-color: var(--red);
  border-color: var(--red);
  color: #fff;
}
header .btn-info:hover {
  background-color: var(--red-hover);
  border-color: var(--red-hover);
  color: #fff;
}
.btn-info { font-family: var(--font-display) !important; font-size: 18px !important; }

.btn-outline-primary {
  --bs-btn-color: var(--text);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--red);
  --bs-btn-hover-border-color: var(--red);
  --bs-btn-focus-shadow-rgb: 224, 11, 0;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--red-hover);
  --bs-btn-active-border-color: var(--red-hover);
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: var(--text-faint);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--line);
  color: var(--text);
  --bs-gradient: none;
}

#mobileMenuToggle i { transition: transform .3s; }
#mobileMenuToggle[aria-expanded="true"] i { transform: rotate(180deg); }
/* The old #mobileMenu block that lived here (scaleY/opacity/height plus
   padding:0) is gone. bison-site.css owns the drawer now as .nx-nav-mobile,
   and an ID selector outranks a class one however the sheets are ordered — so
   the padding:0 was silently winning and running the drawer's links flush
   into both screen edges. */
.py-responsive { padding-top: 1.2rem; padding-bottom: 1.2rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-container, [dir="ltr"] footer, [dir="rtl"] footer,
body > footer {
  background-color: var(--bg-alt) !important;
  color: var(--text-faint) !important;
}
body > footer {
  flex-shrink: 0;
  width: 100%;
  padding: 1.4rem 0;
  margin-top: auto;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}
body > footer a { color: var(--text-dim); text-decoration: none; }
body > footer a:hover, .nav-options a:hover { color: var(--red); text-decoration: none; }
footer { font-family: var(--font-body); }

/* ==========================================================================
   Hero (legacy "hero-wrapper" block — no routed page uses it any more; kept
   so default.php still renders in the brand palette if it is ever revived)
   ========================================================================== */
.hero-wrapper {
  background: var(--surface);
  max-width: 900px;
  margin: 40px auto;
  box-shadow: 0 24px 56px -28px rgba(0, 0, 0, .95);
  border-top: 4px solid var(--red);
  border-bottom: 1px solid var(--line-soft);
  animation: 1s ease-out forwards fadeInUp;
  opacity: 0;
  transition: transform .3s, box-shadow .3s;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.hero-wrapper:hover { box-shadow: 0 32px 70px -26px rgba(0, 0, 0, 1); transform: translateY(-5px); }
.hero-banner {
  background: linear-gradient(135deg, var(--red-deep) 0%, var(--red) 55%, #f5180b 100%);
  height: 180px;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}
.hero-content { display: flex; padding: 40px 30px; gap: 40px; align-items: flex-start; background: var(--surface); }
.left-content { flex: 1; }
.logo { font-family: var(--font-display); font-size: 26px; margin-bottom: 5px; color: var(--text); letter-spacing: 1px; }
.tagline { font-style: italic; color: var(--text-dim); margin-bottom: 20px; }
.description { font-size: 15px; line-height: 1.6; max-width: 100%; }
.right-buttons { display: flex; flex-direction: column; gap: 20px; min-width: 200px; }
[dir="rtl"] .right-buttons { margin-top: 70px; }
[dir="ltr"] .right-buttons { margin-top: 40px; }

.footer-section { text-align: center; padding: 50px 20px; }
.footer-section h3 { font-size: 20px; margin-bottom: 25px; }
.footer-buttons { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.footer-buttons a {
  background-color: var(--red);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 16px;
}
.footer-buttons a:hover {
  background-color: var(--red-hover);
  transform: scale(1.05);
  box-shadow: 0 12px 34px -12px rgba(224, 11, 0, .7);
}

/* ==========================================================================
   Buttons (hero action buttons)
   ========================================================================== */
.action-button, header.fixed-top { box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.action-button {
  padding: 1.5rem 3rem;
  font-size: 1.25rem;
  margin: 1rem 0;
  width: 100%;
  max-width: 400px;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .4);
  gap: .5rem;
  transform: scale(1);
  position: relative;
  transition: transform .3s ease-out, box-shadow .3s ease-out, background-color .3s ease-in-out, border-color .3s ease-in-out;
}
.action-button:hover { transform: scale(1.02) translateY(-2px); box-shadow: 0 6px 15px rgba(0, 0, 0, .5); }
.buttons-container { text-align: center; margin-top: 2rem; margin-bottom: 3rem; }
.buttons-container .action-button.search-btn { background-color: var(--search-btn); border-color: var(--line); }
.buttons-container .action-button.search-btn:hover { background-color: var(--search-btn-hover); border-color: var(--red); }
.buttons-container .action-button.activate-btn { background-color: var(--activate-btn); border-color: var(--activate-btn); }
.buttons-container .action-button.activate-btn:hover { background-color: var(--activate-btn-hover); border-color: var(--activate-btn-hover); }
.buttons-container .action-button i { font-size: 1.4rem; }
[dir="rtl"] .button-icon { order: 2; }
[dir="ltr"] .button-icon { order: 1; }

.btn { border-radius: var(--radius-pill); padding: 10px 20px; position: relative; transition: all var(--transition-speed); overflow: hidden; }
.btn::after {
  content: '';
  position: absolute;
  width: 100%; height: 100%; top: 0; left: -100%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0, rgba(255,255,255,.2) 50%, rgba(255,255,255,0) 100%);
  transition: .8s;
}
.btn:hover::after { left: 100%; }
.btn:hover { transform: translateY(-3px) scale(1.02); }
.btn-alt:active, .btn:active { transform: translateY(0) scale(.98); transition: .1s; }

.btn-primary { background: var(--red); border: none; }
.btn-secondary { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--text); }
.btn-info { background: var(--red); border: none; color: #fff; }

.btn-alt {
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--red);
  width: 250px;
  height: 60px;
  font-size: 18px;
  border-radius: var(--radius-pill);
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
}
[dir="rtl"] .btn-alt { padding: 1rem 3rem; }
[dir="ltr"] .btn-alt { padding: 1rem 2rem; }
.btn-alt:hover { color: #fff; transform: translateY(-3px) scale(1.02); box-shadow: 0 12px 34px -12px rgba(224, 11, 0, .7); background: var(--red-hover); }
.btn-altc:hover, .btn-altc:active { background: var(--red-hover) !important; color: #fff !important; }

.activate { background: var(--red); width: 115%; margin-bottom: -35px; font-size: 20px; padding: 10px 20px; }
[dir="rtl"] .activate { margin-right: -40px; }
[dir="ltr"] .activate { margin-left: -40px; }

/* ==========================================================================
   Cards / forms / tables (activation + search pages)
   ========================================================================== */
.card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 56px -28px rgba(0, 0, 0, .95);
  margin-bottom: 40px;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  animation: .8s ease-out fadeIn;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 32px 70px -26px rgba(0, 0, 0, 1); }
.card-header {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 1.2rem;
  background: linear-gradient(135deg, #f5180b 0%, var(--red) 52%, var(--red-hover) 100%);
  color: #fff;
  border: none;
  text-align: center;
}
.card-body { padding: 2rem; }

.btn, .form-label, .search-info { font-weight: 600; }
.form-label { color: var(--text); margin-bottom: .5rem; margin-top: 1rem; }
.form-control {
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  transition: .3s cubic-bezier(.19, 1, .22, 1);
  box-shadow: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.form-control:focus {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(224, 11, 0, .18);
  outline: 0;
}
.form-control:focus::placeholder { opacity: .5; transform: translateX(10px); transition: .3s; }
.form-control::placeholder { color: var(--text-faint); opacity: 1; }
.required-field::after { content: "*"; color: var(--red); margin-inline-start: 4px; }
.serial-feedback { font-size: .875em; margin-top: .5rem; transition: all var(--transition-speed); }

.requirements-note {
  background-color: var(--bg);
  padding: 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  border-inline-start: 3px solid var(--red);
  color: var(--text-dim);
  margin-bottom: 25px;
  transition: all var(--transition-speed);
}
.requirements-note:hover { border-color: rgba(224, 11, 0, .38); }

.search-info { margin-bottom: 20px; padding: 12px 16px; background-color: var(--surface-2); color: var(--text-dim); border-radius: var(--radius-sm); animation: .5s fadeIn; }

.table { border-radius: var(--radius-md); overflow: hidden; }
.table th {
  background: var(--bg);
  padding: .75rem .5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  border: none;
  border-bottom: 2px solid var(--line);
}
.table td { padding: 15px; vertical-align: middle; border-color: var(--line-soft); }
html[dir="rtl"] .table, html[dir="rtl"] .table th { text-align: center; }
.table tr { transition: all var(--transition-speed); position: relative; }
.table tr:hover { background-color: var(--surface-2); z-index: 2; }
.table tr:hover td:first-child { border-inline-start: 3px solid var(--red); }

/* ==========================================================================
   Alerts / loader / overlay
   ========================================================================== */
.alert-box { max-height: 0; transition: max-height .5s ease-out; overflow: hidden; }
.alert-box.show { max-height: 200px; }
.alert {
  border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 0; border: none;
  border-inline-start: 3px solid transparent;
  transform: translateY(-20px); opacity: 0;
  transition: .4s cubic-bezier(.19, 1, .22, 1);
  cursor: default; position: relative;
}
#resultsSection:not(.hidden), .alert.show { transform: translateY(0); opacity: 1; }
.alert.show { margin-bottom: 20px !important; }
.alert-danger { background-color: rgba(224, 11, 0, .1); color: var(--danger-fg); border-inline-start-color: var(--red); }
.alert-success { background-color: rgba(45, 160, 90, .1); color: var(--success-fg); border-inline-start-color: var(--success-color); }
.alert-info { background-color: var(--surface-2); color: var(--text-dim); border-inline-start-color: var(--line); }
.alert-warning { background-color: rgba(232, 161, 60, .1); color: #f0be7d; border-inline-start-color: var(--warning-color); }

.alert-container { padding: 0 20px; margin-bottom: 20px; transition: .4s cubic-bezier(.19, 1, .22, 1); max-height: 100px; overflow: hidden; }
.alert-container:empty { max-height: 0; margin-bottom: 0; }
.hidden { display: none; }

#overlay.visible { opacity: 1; visibility: visible; backdrop-filter: blur(5px); }
.loader { width: 80px; height: 80px; perspective: 800px; position: relative; }
.loader::after, .loader::before {
  content: ""; position: absolute; width: 100%; height: 100%; border-radius: 50%;
  background: linear-gradient(135deg, #f5180b, var(--red-deep));
  opacity: .7; animation: 2s ease-in-out infinite pulse-loader;
  box-shadow: 0 0 20px rgba(224, 11, 0, .5);
}
.loader::after { animation-delay: -1s; background: linear-gradient(135deg, var(--red), var(--red-hover)); }
#spinner {
  width: 60px; height: 60px; border: 4px solid rgba(255, 255, 255, .1); border-radius: 50%;
  border-top: 4px solid #fff; border-left: 4px solid #fff; position: absolute; top: 10px; left: 10px;
  animation: 1s linear infinite spin; box-shadow: 0 0 10px rgba(255, 255, 255, .2);
}

/* ==========================================================================
   Logo / hero (legacy "logo-container" block used on some pages)
   ========================================================================== */
.logo-container {
  margin: 1rem 0; width: 100%;
  text-align: center; margin-bottom: 30px; opacity: 0; animation: 1s forwards fadeInDown;
  padding: 30px 20px; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: 0 24px 56px -28px rgba(0, 0, 0, .95);
  transform: translateZ(0); margin-top: 40px; position: relative;
}
.logo-container img { max-width: 200px; height: auto; margin-bottom: 1rem; animation: .8s ease-out fadeInDown; transition: transform .3s, filter .3s; }
.logo-container img:hover { transform: scale(1.05); filter: brightness(1.1); }
.logo-container h1 { color: var(--text); margin-bottom: 5px; font-size: 60px; }
.logo-image { width: 150px; height: 150px; object-fit: contain; margin-bottom: 10px; animation: 2s infinite pulse; }
.logo-title { font-family: var(--font-display); color: var(--text); margin-top: 1rem; font-size: 1.9rem; font-weight: 700; letter-spacing: 1px; animation: .8s ease-out fadeInUp; }
.logo-subtitle { font-size: 1.2rem; color: var(--text-dim); opacity: 0; animation: 1s .5s forwards fadeIn; }
[dir="ltr"] h5 { font-size: 20px; }

/* ==========================================================================
   Utilities / spacing
   ========================================================================== */
[dir="rtl"] .me-2 { margin-left: .5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-1 { margin-left: .25rem !important; margin-right: 0 !important; }
[dir="rtl"] .ms-2 { margin-right: .5rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-1 { margin-right: .25rem !important; margin-left: 0 !important; }
.margin-inline-end-1 { margin-inline-end: .25rem !important; }
.margin-inline-end-2 { margin-inline-end: .5rem !important; }
.margin-inline-start-1 { margin-inline-start: .25rem !important; }
.margin-inline-start-2 { margin-inline-start: .5rem !important; }

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeInDown { 0%, from { opacity: 0; transform: translateY(-20px); } 100%, to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes pulse-loader { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes spin { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.1); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes subtle-pulse { 0%, 100% { box-shadow: 0 0 0 rgba(224, 11, 0, 0); } 50% { box-shadow: 0 0 8px rgba(224, 11, 0, .5); } }
.animated-field { animation: 2s ease-in-out subtle-pulse; }

@media (prefers-reduced-motion: reduce) {
  body * { transition: none !important; }
  .btn:hover, .card:hover, .action-button:hover { transform: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
  .logo-title { font-size: 1.75rem; }
  .action-button { min-width: 280px; padding: 1.2rem 2rem; font-size: 1.1rem; margin: 1rem 0; }
  .buttons-container { padding: 0 1rem; }
  .py-responsive { padding-top: 1rem; padding-bottom: 1rem; }
  .logo-container { margin: 1rem 0 3rem; }
  header nav { flex-direction: row; justify-content: space-between; }
  .hero-content { flex-direction: column; align-items: center; text-align: center; }
  .right-buttons { margin-top: 0 !important; justify-content: center; gap: 15px; }
  .btnc { width: 220px !important; height: 58px !important; padding: 15px 20px !important; }
  [dir="rtl"] .btnc { padding: 12px 20px !important; }
  .gnotice { font-size: 13px !important; margin-bottom: 25px !important; }
  [dir="rtl"] .logo-container h1 { font-size: 18px !important; }
  .searchh5 { font-size: 19px !important; }
}
@media (max-width: 480px) {
  .action-button { min-width: 240px; padding: 1rem 1.5rem; }
  .logo-title { font-size: 1.5rem; }
  .logo-container { margin: 1.5rem 0 2rem; }
}
