/* ==========================================================================
   YourBrand – main stylesheet
   Works for both LTR (English) and RTL (Arabic) via logical properties.
   Palette matches the original site: blue header/footer, gold buttons and
   accents, photo heroes under a black overlay.
   ========================================================================== */

:root {
  --blue: #028fe1;        /* header, footer, links */
  --blue-dark: #0272b4;
  --blue-light: #e6f4fd;
  --gold: #f8c200;        /* buttons, accents */
  --gold-hover: #f1c833;  /* menu hover / active */
  --gold-text: #c99a00;   /* gold that stays readable on white */
  --black: #141006;
  --ink: #222;
  --text: #555;
  --muted: #858e9a;
  --line: #e5e5e5;
  --bg: #fff;
  --bg-soft: #f5f5f5;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, .16);
  --container: 1200px;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

html[lang="ar"] { --font: "Cairo", "Roboto", system-ui, Tahoma, Arial, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }

.skip-link {
  position: absolute; inset-inline-start: -999px; top: 8px;
  background: var(--gold); color: #000; padding: 8px 14px; border-radius: 6px; z-index: 100;
}
.skip-link:focus { inset-inline-start: 8px; color: #000; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.6em; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; transition: .2s ease;
  font-family: inherit;
}
.btn-primary, .btn-gold { background: var(--gold); color: #000; }
.btn-primary:hover, .btn-gold:hover { background: var(--gold-hover); color: #000; transform: translateY(-2px); }
.btn-outline { border-color: rgba(255,255,255,.8); color: #fff; }
.btn-outline:hover { background: #fff; color: #000; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--blue);
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: #fff; letter-spacing: .3px; }
.logo img { height: 36px; width: auto; }
.logo img.wordmark { height: 27px; }
@media (max-width: 400px) { .logo img.wordmark { height: 22px; } }
.logo:hover { color: #fff; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 8px;
  color: #fefefe; font-weight: 500; font-size: .95rem;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold-hover); }
.main-nav .lang-switch a {
  border: 1.5px solid rgba(255,255,255,.85); color: #fff; margin-inline-start: 8px;
  display: flex; align-items: center; gap: 6px;
}
.main-nav .lang-switch a:hover { background: var(--gold); border-color: var(--gold); color: #000; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--gold);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 72px; inset-inline: 0;
    background: #e5e5e5; box-shadow: var(--shadow);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px; }
  .main-nav a { padding: 12px 14px; color: var(--ink); }
  .main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--blue); background: #fff; }
  .main-nav .lang-switch a { margin: 8px 0 0; justify-content: center; border-color: var(--blue); color: var(--blue); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: #000;
  padding: 130px 0 140px;
}
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; background: center / cover no-repeat;
  opacity: 0; transition: opacity .5s ease;
}
.hero-slide.active { opacity: 1; }
.hero::before { /* black overlay, as on the original */
  content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); pointer-events: none; z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; max-width: 760px; margin-bottom: .4em; }
.hero p { font-size: 1.15rem; max-width: 620px; color: rgba(255,255,255,.88); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.page-hero {
  background: #000 url("../img/products/detail-2.jpg") center / cover no-repeat;
  color: #fff; padding: 80px 0; position: relative; overflow: hidden;
}
.page-hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); margin: 0; }
.breadcrumb { color: rgba(255,255,255,.7); font-size: .9rem; margin-top: 8px; }
.breadcrumb a { color: var(--gold); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--black); color: rgba(255,255,255,.85); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 50px; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 2px;
  font-size: .8rem; font-weight: 700; color: var(--gold-text); margin-bottom: 10px;
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.section-head h2, .split h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.section-head .divider, .divider {
  width: 60px; height: 4px; background: var(--gold); border-radius: 2px; margin: 16px auto 0;
}
.split .divider { margin-inline: 0; margin-bottom: 20px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 16/10; object-fit: cover; }
/* YouTube video (thumbnail first, player loads on click) */
.video-embed {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; cursor: pointer;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background: #000 center / cover no-repeat;
}
.video-embed::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); transition: .2s; }
.video-embed:hover::before { background: rgba(0,0,0,.1); }
.video-embed .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; background: var(--gold); box-shadow: 0 6px 20px rgba(0,0,0,.35); transition: .2s;
}
.video-embed .play::after {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 14px 0 14px 24px; border-color: transparent transparent transparent #000;
}
.video-embed:hover .play { transform: translate(-50%, -50%) scale(1.08); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.split img.natural { aspect-ratio: auto; object-fit: contain; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse > :first-child { order: 0; }
}

.lead { font-size: 1.15rem; color: var(--ink); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: var(--gold); line-height: 1.1; }
.stat span { color: rgba(255,255,255,.85); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: .25s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card-img { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: var(--bg-soft); }
.card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card-body p { font-size: .95rem; margin-bottom: 14px; }
.card-link { margin-top: auto; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.card-link::after { content: "→"; transition: .2s; }
html[dir="rtl"] .card-link::after { content: "←"; }
.card:hover .card-link::after { transform: translateX(4px); }
html[dir="rtl"] .card:hover .card-link::after { transform: translateX(-4px); }

/* category tile (home) */
.tile { position: relative; border-radius: var(--radius); overflow: hidden; display: block; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.06); }
.tile span {
  position: absolute; inset: auto 0 0 0; padding: 40px 20px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85));
  color: #fff; font-weight: 700; font-size: 1.15rem;
}
.tile:hover span { color: var(--gold); }

/* ---------- Gallery / certificates marquee ---------- */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); padding: 10px 0 20px; }
.marquee-track { display: flex; gap: 20px; width: max-content; animation: scroll 180s linear infinite; }
html[dir="rtl"] .marquee-track { animation-name: scroll-rtl; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee img { height: 240px; width: auto; border-radius: 6px; background: #fff; box-shadow: var(--shadow); cursor: zoom-in; }
@keyframes scroll { to { transform: translateX(-50%); } }
@keyframes scroll-rtl { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }
@media (max-width: 560px) { .marquee img { height: 180px; } }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; transition: .25s; }
.gallery img:hover { opacity: .85; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.lightbox {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .9); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 92vw; border-radius: 8px; }

/* ---------- Products page ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.filter-bar button {
  font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); transition: .2s;
}
.filter-bar button:hover { border-color: var(--blue); color: var(--blue); }
.filter-bar button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.category { margin-bottom: 70px; scroll-margin-top: 100px; }
.category[hidden] { display: none; }
.category-head { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 2px solid var(--gold); padding-bottom: 14px; }
.category-head h2 { margin: 0; font-size: 1.8rem; }
.category-head p { margin: 0; max-width: 640px; }

.specs { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.specs li { text-align: center; padding: 12px 4px 0; }
.specs li + li { border-inline-start: 1px solid var(--line); }
.specs strong { display: block; color: var(--blue); font-size: 1.05rem; }
.specs span { font-size: .78rem; color: var(--muted); }
.category .card-img { object-fit: contain; background: #fff; padding: 10px; border-bottom: 1px solid var(--line); }
/* Product photo slider (models with several photos) */
.card-slider { position: relative; border-bottom: 1px solid var(--line); }
.card-slider .card-img { display: none; border-bottom: 0; }
.card-slider .card-img.active { display: block; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.45); color: #fff; font-size: 1.6rem; line-height: 1; padding: 0 0 3px;
  display: grid; place-items: center; transition: .2s;
}
.slide-btn:hover { background: var(--gold); color: #000; }
.slide-btn.prev { inset-inline-start: 10px; }
.slide-btn.next { inset-inline-end: 10px; }
html[dir="rtl"] .slide-btn { transform: translateY(-50%) scaleX(-1); }
.slide-dots { position: absolute; bottom: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.slide-dots button { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: rgba(0,0,0,.25); cursor: pointer; }
.slide-dots button[aria-current="true"] { background: var(--gold); }
.model-tag { display: inline-block; font-size: .75rem; font-weight: 700; color: #000; background: var(--gold); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; align-self: flex-start; }

/* ---------- News ---------- */
.news-date { font-size: .85rem; color: var(--muted); margin-bottom: 6px; display: block; }
.event { margin-bottom: 64px; }
.event:last-child { margin-bottom: 0; }
.event-head { border-inline-start: 4px solid var(--gold); padding-inline-start: 16px; margin-bottom: 20px; }
.event-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.event-head h3 { font-size: 1.5rem; margin-bottom: 4px; }
html[dir="rtl"] .event-head h3 { text-align: right; }
.event-head p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.office { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--bg-soft); margin-bottom: 14px; }
.office .icon { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.office .icon svg { width: 20px; height: 20px; }
.office h3 { font-size: 1rem; margin: 0 0 2px; }
.office p { margin: 0; font-size: .95rem; }
.office a[dir="ltr"] { unicode-bidi: embed; }

.social { display: flex; gap: 10px; margin-top: 24px; }
.social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; transition: .2s; }
.social a:hover { background: var(--gold); color: #000; }
.social svg { width: 18px; height: 18px; }

.form { background: #fff; padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 560px) { .form { padding: 24px 18px; } }
.form h2 { font-size: 1.6rem; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; color: var(--ink); font-size: .9rem; margin-bottom: 6px; }
.field label .req { color: #d33; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink); padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 8px; background: #fff; transition: .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(2,143,225,.15); }
.field textarea { min-height: 140px; resize: vertical; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* spam honeypot */
.form button[disabled] { opacity: .6; cursor: wait; transform: none; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status.ok { color: #1a7f37; }
.form-status.err { color: #c62828; }

/* Map */
.map-tabs { margin-bottom: 24px; }
.map-frame { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--line); aspect-ratio: 16 / 7; }
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 760px) { .map-frame { aspect-ratio: 4 / 3; } }
.map-open { text-align: center; margin: 16px 0 0; }

/* ---------- CTA ---------- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta p { max-width: 600px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue); color: rgba(255,255,255,.9); padding: 64px 0 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #fefefe; }
.site-footer a:hover { color: var(--gold-hover); }
.site-footer .logo { color: #fff; margin-bottom: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.3); padding: 20px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; }
/* Country flag before each footer phone number */
.site-footer .flag {
  display: inline-block; vertical-align: middle; width: 22px; height: 15px; object-fit: cover;
  margin-inline-end: 8px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}

/* WhatsApp icon beside each footer phone number */
.footer-wa {
  display: inline-grid; place-items: center; vertical-align: middle; margin-inline-start: 6px;
  width: 26px; height: 26px; border-radius: 50%; background: #25d366; color: #fff !important; transition: .2s;
}
.footer-wa:hover { background: #fff; color: #25d366 !important; transform: scale(1.08); }
.footer-wa svg { width: 15px; height: 15px; }
.regions { display: flex; gap: 8px; flex-wrap: wrap; }
.regions span { background: rgba(255,255,255,.18); border-radius: 999px; padding: 3px 12px; font-size: .82rem; }


/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
