/* ==========================================================================
   ABDAL — Specialist RFID Technology
   Brand palette + bilingual (LTR/RTL) responsive styles
   ========================================================================== */
:root {
  --blue:        #1479bf;
  --blue-dark:   #0f5c93;
  --blue-darker: #0b2f4a;
  --ink:         #14202b;
  --slate:       #4a5a68;
  --muted:       #7a8a97;
  --line:        #e4eaef;
  --bg:          #ffffff;
  --bg-soft:     #f4f8fb;
  --bg-dark:     #0d2739;
  --accent:      #c0876a;
  --radius:      14px;
  --shadow:      0 10px 30px rgba(15, 40, 65, 0.08);
  --shadow-lg:   0 24px 60px rgba(15, 40, 65, 0.14);
  --maxw:        1140px;
  --font:        'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.lang-ar { --font: 'Cairo', system-ui, 'Segoe UI', Tahoma, sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 700; font-family: var(--font);
  padding: .85rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-size: .98rem; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(20,121,191,.28); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--blue); border-color: rgba(20,121,191,.35); }
.btn-ghost:hover { background: rgba(20,121,191,.07); }
.btn-sm { padding: .55rem 1.1rem; font-size: .88rem; }
.btn-lg { padding: 1.05rem 2.2rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 150px; }
.brand { display: flex; align-items: center; gap: .85rem; }
.brand-mark { color: var(--blue); width: 120px; height: 120px; display: grid; place-items: center; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-text strong { display: block; font-size: 1.6rem; font-weight: 800; letter-spacing: .04em; line-height: 1; }
.brand-text small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.lang-ar .brand-text small { letter-spacing: 0; text-transform: none; font-size: .72rem; }

.main-nav { display: flex; gap: 1.15rem; margin-inline-start: auto; }
.main-nav a { font-weight: 600; font-size: .92rem; color: var(--slate); position: relative; white-space: nowrap; }
.main-nav a:hover { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: .9rem; }
.lang-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-toggle a { padding: .35rem .7rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.lang-toggle a.active { background: var(--blue); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; background:
  radial-gradient(1200px 500px at 80% -10%, rgba(20,121,191,.10), transparent 60%),
  linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue); background: rgba(20,121,191,.1);
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.hero .lead { font-size: 1.16rem; color: var(--slate); margin: 1.3rem 0 2rem; max-width: 34ch; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-media img {
  width: 100%; border-radius: 20px; box-shadow: var(--shadow-lg); object-fit: cover; aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--blue), var(--blue-darker));
}
.img-missing { min-height: 260px; background: linear-gradient(135deg, var(--blue), var(--blue-darker)); }

/* ---------- Floating hero images (bob + gentle wave) ---------- */
.hero { position: relative; overflow: hidden; }
.hero-float {
  position: absolute; z-index: 3; pointer-events: none; user-select: none;
  filter: drop-shadow(0 18px 28px rgba(15, 40, 65, .28));
  will-change: transform;
}
/* Robot mascot — upper area, drifts slowly */
.float-a {
  width: clamp(90px, 11vw, 155px);
  top: 6%; inset-inline-end: 3%;
  animation: floatWave 7s ease-in-out infinite;
}
/* Handheld reader — lower, offset rhythm so they don't move in lockstep */
.float-b {
  width: clamp(120px, 15vw, 210px);
  bottom: 8%; inset-inline-start: 43%;
  animation: floatWaveAlt 9s ease-in-out infinite;
  animation-delay: -2.5s;
}
@keyframes floatWave {
  0%,  100% { transform: translateY(0)     rotate(-4deg); }
  50%       { transform: translateY(-20px) rotate(4deg); }
}
@keyframes floatWaveAlt {
  0%,  100% { transform: translateY(0)     rotate(3deg); }
  50%       { transform: translateY(-16px) rotate(-3deg); }
}
/* Arabic (RTL): the layout mirrors, which drops the float straight onto the
   hand+scanner in the hero photo. Move it up into the photo's calm blurred
   area and flip it so it faces the same way as the mirrored layout. */
.lang-ar .float-b {
  top: 14%;
  bottom: auto;
  inset-inline-start: 52%;   /* keeps it over the photo, clear of the Arabic headline */
  animation-name: floatWaveAltRtl;
}
@keyframes floatWaveAltRtl {
  0%,  100% { transform: scaleX(-1) translateY(0)     rotate(3deg); }
  50%       { transform: scaleX(-1) translateY(-16px) rotate(-3deg); }
}
/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .hero-float { animation: none; }
}
/* Too cramped on small screens — hide the decoration */
@media (max-width: 900px) {
  .hero-float { display: none; }
}

/* ---------- Stats ---------- */
.stats { background: var(--blue-darker); color: #fff; padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; }
.stat-value { display: block; font-size: 2.3rem; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.stat-label { display: block; font-size: .9rem; color: rgba(255,255,255,.72); margin-top: .4rem; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.section-body { color: var(--slate); font-size: 1.1rem; margin-top: .9rem; }
.section-dark .section-body { color: rgba(255,255,255,.72); }

/* ---------- Intro ---------- */
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.check-list { list-style: none; display: grid; gap: .9rem; }
.check-list li {
  position: relative; padding-inline-start: 2.2rem; font-size: 1.05rem; color: var(--ink); font-weight: 500;
}
.check-list li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: 1px;
  width: 26px; height: 26px; background: rgba(20,121,191,.12); color: var(--blue);
  border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
}

/* ---------- Cards (solutions) ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media {
  border-radius: 10px; overflow: hidden; margin-bottom: 18px; background: var(--bg-soft);
  aspect-ratio: 16 / 10; display: grid; place-items: center;
}
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.card > p { color: var(--slate); font-size: .98rem; margin-bottom: 1rem; }

.feature-list { list-style: none; display: grid; gap: .55rem; }
.feature-list li { position: relative; padding-inline-start: 1.4rem; font-size: .95rem; color: var(--slate); }
.feature-list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .58em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
}
.section-dark .feature-list li { color: rgba(255,255,255,.82); }
.section-dark .feature-list li::before { background: var(--accent); }

/* ---------- Applications grid ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.app-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px;
  background: #fff; transition: border-color .2s ease, transform .2s ease;
}
.app-card:hover { border-color: var(--blue); transform: translateY(-3px); }
.app-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; color: var(--blue-dark); }
.app-card p { color: var(--slate); font-size: .96rem; }

/* ---------- Platform / Dashboard ---------- */
.platform-shot {
  max-width: 980px; margin: 0 auto 44px; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 30px 70px rgba(0,0,0,.45);
  background: #0a1f2e;
}
.platform-shot img { width: 100%; display: block; }
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.platform-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 24px 22px; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.platform-card:hover { transform: translateY(-4px); border-color: var(--accent); background: rgba(255,255,255,.08); }
.platform-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: rgba(20,121,191,.22); color: #6cc4f5; margin-bottom: 14px;
}
.platform-icon svg { width: 24px; height: 24px; }
.platform-card h3 { font-size: 1.08rem; font-weight: 700; color: #fff; margin-bottom: .4rem; }
.platform-card p { font-size: .93rem; color: rgba(255,255,255,.72); line-height: 1.55; }
.platform-cta { text-align: center; margin-top: 40px; }

@media (max-width: 1000px) { .platform-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .platform-grid { grid-template-columns: 1fr; } }

/* ---------- Videos ---------- */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.video-card {
  display: flex; flex-direction: column; gap: .85rem; padding: 0; border: none; background: none;
  cursor: pointer; font-family: var(--font); text-align: start; width: 100%;
}
.video-thumb {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--blue-darker); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease, opacity .2s ease; }
.video-card:hover .video-thumb { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.video-card:hover .video-thumb img { transform: scale(1.05); }
.video-play {
  position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%;
  background: rgba(20,121,191,.92); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.3); transition: transform .2s ease, background .2s ease;
}
.video-play svg { width: 30px; height: 30px; margin-inline-start: 3px; }
.video-card:hover .video-play { transform: scale(1.1); background: var(--blue); }
.video-title { font-weight: 700; font-size: 1.05rem; color: var(--ink); }

/* ---------- Video lightbox ---------- */
.video-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.video-modal.open { display: flex; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(6, 20, 32, .82); backdrop-filter: blur(4px); }
.video-modal-body { position: relative; width: 100%; max-width: 900px; z-index: 1; }
.video-embed { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-modal-close {
  position: absolute; top: -46px; inset-inline-end: 0; width: 38px; height: 38px; border: none; cursor: pointer;
  background: rgba(255,255,255,.15); color: #fff; border-radius: 50%; font-size: 1.6rem; line-height: 1;
}
.video-modal-close:hover { background: rgba(255,255,255,.28); }

/* ---------- Benefits & ROI ---------- */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.roi-col {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 32px;
}
.roi-col h3 { font-size: 1.35rem; font-weight: 700; margin-bottom: 1.1rem; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); }
.step-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem;
}
.step h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: .5rem; }
.step p { color: var(--slate); font-size: .95rem; }

/* ---------- Downloads ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dl-card {
  display: flex; align-items: center; gap: 18px; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--blue); }
.dl-icon {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(20,121,191,.1); color: var(--blue);
}
.dl-icon svg { width: 24px; height: 24px; }
.dl-text { flex: 1; min-width: 0; }
.dl-text strong { display: block; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.dl-text small { display: block; font-size: .9rem; color: var(--slate); margin-top: 2px; }
.dl-cta {
  flex: 0 0 auto; font-size: .85rem; font-weight: 700; color: var(--blue);
  background: rgba(20,121,191,.08); padding: .5rem .9rem; border-radius: 999px; white-space: nowrap;
}
.dl-card:hover .dl-cta { background: var(--blue); color: #fff; }
@media (max-width: 760px) {
  .dl-grid { grid-template-columns: 1fr; }
  .dl-cta { display: none; }
}

/* ---------- Contact CTA ---------- */
.cta-section { background:
  radial-gradient(900px 400px at 50% 0%, rgba(20,121,191,.12), transparent 60%), var(--bg-soft); }
.cta-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.cta-inner .section-body { margin-bottom: 1.8rem; }
.contact-row { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
.contact-item { font-weight: 600; color: var(--slate); }
.contact-item:hover { color: var(--blue); }

/* ---------- Contact form (expands from the CTA) ---------- */
#contactToggle .chev { width: 18px; height: 18px; transition: transform .3s ease; }
#contactToggle.is-open .chev { transform: rotate(180deg); }

.contact-form-wrap {
  display: grid; grid-template-rows: 0fr;              /* collapsed */
  transition: grid-template-rows .38s ease, opacity .3s ease, margin-top .3s ease;
  opacity: 0; margin-top: 0; text-align: start;
}
/* The clipping element must carry NO padding/border of its own — a box can't
   shrink below its own padding, which would leave a phantom gap when collapsed.
   So .cf-inner does the clipping and .contact-form holds the padding. */
.cf-inner { overflow: hidden; min-height: 0; }
.contact-form-wrap.open { grid-template-rows: 1fr; opacity: 1; margin-top: 28px; }
.contact-form-wrap:not(.open) { visibility: hidden; }
.contact-form-wrap.open { visibility: visible; }

.contact-form {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; box-shadow: var(--shadow); display: grid; gap: 16px;
  max-width: 640px; margin: 0 auto;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cf-field { display: grid; gap: 6px; }
.cf-field > span { font-size: .85rem; font-weight: 700; color: var(--slate); }
.cf-field b { color: #d24545; }
.cf-field i { font-weight: 500; font-style: normal; color: var(--muted); }
.cf-field input, .cf-field select, .cf-field textarea {
  width: 100%; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 10px;
  font-size: .98rem; font-family: var(--font); color: var(--ink); background: #fff; resize: vertical;
}
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus {
  outline: 2px solid rgba(20,121,191,.3); border-color: var(--blue);
}
.cf-field select { cursor: pointer; }
/* Arabic: keep the select text on the correct side */
.lang-ar .cf-field select, .lang-ar .cf-field input, .lang-ar .cf-field textarea { text-align: start; }

.cf-status { font-size: .92rem; font-weight: 600; margin: 0; min-height: 0; }
.cf-status.ok  { color: #1b7a3d; background: #e7f7ec; padding: .75rem .9rem; border-radius: 10px; }
.cf-status.err { color: #b02525; background: #fdecec; padding: .75rem .9rem; border-radius: 10px; }
.cf-submit { justify-self: start; }
.lang-ar .cf-submit { justify-self: start; }

@media (max-width: 560px) {
  .cf-row { grid-template-columns: 1fr; }
  .contact-form { padding: 20px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-darker); color: rgba(255,255,255,.82); padding: 54px 0 30px; }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; max-width: 560px; }
.footer-brand .brand-mark { color: #fff; flex: 0 0 auto; }
.footer-brand strong { color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: .04em; }
.footer-brand p { font-size: .96rem; margin-top: .4rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); font-size: .9rem;
}
.footer-admin { color: rgba(255,255,255,.6); }
.footer-admin:hover { color: #fff; }

/* ---------- Responsive ---------- */
/* Collapse to the hamburger before the nav has a chance to wrap */
@media (max-width: 1200px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .main-nav {
    display: flex; position: absolute; top: 150px; inset-inline: 0; flex-direction: column;
    background: #fff; padding: 18px 24px; gap: 1rem; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .hero-grid, .intro-grid, .cards-2 { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .cards-3, .cards-grid, .steps { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .cards-3, .cards-grid, .steps { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { padding: 48px 0; }
  .brand-text small { display: none; }
  /* Keep the taller header from dominating small screens */
  .header-inner { height: 100px; }
  .brand-mark { width: 76px; height: 76px; }
  body.nav-open .main-nav { top: 100px; }
}
