/* R2 GARAGE — أنماط الموقع العام */
:root {
  --bg: #0b0b0d;
  --bg-2: #121317;
  --bg-3: #1a1c21;
  --line: #2a2d34;
  --text: #f2f3f5;
  --muted: #a9adb6;
  --red: #e10600;
  --red-dark: #b30500;
  --radius: 14px;
  --container: 1180px;
  --header-h: 68px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
  word-break: break-word;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; }

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; inset-block-start: -60px; inset-inline-start: 12px;
  background: var(--red); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 10px; z-index: 200; text-decoration: none;
  transition: inset-block-start .2s;
}
.skip-link:focus { inset-block-start: 0; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- الهيدر ---------- */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  z-index: 100;
  background: rgba(11, 11, 13, .82);
  backdrop-filter: blur(10px);
  border-block-end: 1px solid rgba(255, 255, 255, .07);
  transition: background .25s;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; min-width: 0;
}
.brand-mark {
  display: grid; place-items: center;
  inline-size: 42px; block-size: 42px;
  background: linear-gradient(140deg, var(--red), #7a0300);
  color: #fff; font-weight: 900; font-size: 15px;
  border-radius: 10px; letter-spacing: .5px;
  flex: 0 0 auto;
}
.brand-text strong {
  font-size: 19px; font-weight: 900; letter-spacing: .6px;
  white-space: nowrap;
}
.nav-list {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0; flex-wrap: wrap;
}
.nav-list a {
  display: block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text); font-size: 15px;
  font-weight: 600; white-space: nowrap;
}
.nav-list a:hover { background: rgba(225, 6, 0, .16); color: #fff; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 11px; cursor: pointer;
}
.menu-bar { inline-size: 22px; block-size: 2px; background: var(--text); border-radius: 2px; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 26px; border-radius: 10px;
  font-family: inherit; font-size: 16px; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s, background .2s, box-shadow .2s;
  min-block-size: 48px; text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--red); color: #fff;
  box-shadow: 0 10px 24px rgba(225, 6, 0, .35);
}
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost {
  background: rgba(255, 255, 255, .06); color: #fff;
  border-color: rgba(255, 255, 255, .35);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-ghost.dark { border-color: var(--line); color: var(--text); }
.btn-primary:disabled, .btn-ghost:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- الهيرو ---------- */
.hero {
  position: relative; min-block-size: clamp(480px, 88vh, 760px);
  display: flex; align-items: center;
  padding-block: calc(var(--header-h) + 40px) 70px;
  overflow: hidden;
}
.hero-media, .hero-fallback { position: absolute; inset: 0; }
.hero-fallback {
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(225, 6, 0, .35), transparent 60%),
    linear-gradient(160deg, #17181d 0%, #0b0b0d 55%, #1d0605 100%);
}
.hero-media img {
  inline-size: 100%; block-size: 100%;
  object-fit: cover; object-position: center;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11, 11, 13, .96) 4%, rgba(11, 11, 13, .55) 45%, rgba(11, 11, 13, .7) 100%);
}
.hero-content { position: relative; z-index: 2; max-inline-size: 760px; }
.hero-badge {
  display: inline-block; margin: 0 0 14px;
  background: rgba(225, 6, 0, .18);
  border: 1px solid rgba(225, 6, 0, .55);
  color: #ffd7d5; padding: 6px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
}
.hero-title {
  font-size: clamp(40px, 9vw, 84px);
  font-weight: 900; margin: 0 0 12px;
  letter-spacing: 1px; direction: ltr; text-align: start;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .6);
}
.hero-text {
  font-size: clamp(16px, 2.6vw, 21px);
  color: #e7e9ec; margin: 0 0 28px; max-inline-size: 620px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-scroll {
  position: absolute; inset-block-end: 18px; inset-inline-start: 50%;
  transform: translateX(50%);
  font-size: 26px; color: var(--muted); text-decoration: none;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateX(50%) translateY(-7px); } }

/* ---------- الأقسام ---------- */
.section { padding-block: 76px; }
.section-dark { background: var(--bg-2); border-block: 1px solid rgba(255, 255, 255, .05); }
.section-title {
  font-size: clamp(26px, 4.5vw, 40px); font-weight: 900;
  position: relative; padding-inline-start: 0; margin-bottom: 6px;
}
.section-title::after {
  content: ""; display: block; inline-size: 64px; block-size: 4px;
  background: var(--red); border-radius: 3px; margin-block-start: 10px;
}
.section-sub { color: var(--muted); margin: 12px 0 34px; font-size: 17px; }
.state-msg { color: var(--muted); text-align: center; padding: 26px 10px; margin: 0; }
.state-msg.empty { border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- نبذة ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: start;
}
.about-text { color: var(--muted); font-size: 17px; margin: 0; }
.about-points {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px;
}
.about-points li {
  background: var(--bg-3); border: 1px solid var(--line);
  border-inline-start: 4px solid var(--red);
  padding: 14px 18px; border-radius: 10px; font-weight: 600;
}

/* ---------- البطاقات ---------- */
.cards-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}
.card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(225, 6, 0, .6); }
.card-media { aspect-ratio: 16 / 10; background: #0e0f12; overflow: hidden; }
.card-media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.card-icon {
  display: grid; place-items: center; font-size: 40px;
  background: linear-gradient(140deg, #1d1f25, #121317);
  color: var(--red); inline-size: 100%; block-size: 100%;
}
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 19px; margin: 0; }
.card-body p { color: var(--muted); margin: 0; font-size: 15px; }
.card-price {
  margin-top: auto; font-weight: 800; color: var(--red);
  font-size: 17px; direction: ltr; text-align: start;
}
.card-price small { color: var(--muted); font-weight: 600; font-size: 13px; display: block; }

/* ---------- المعرض ---------- */
.gallery-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.gallery-item {
  position: relative; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  background: #0e0f12; padding: 0; cursor: pointer;
  aspect-ratio: 4 / 3; display: block; width: 100%;
}
.gallery-item img {
  inline-size: 100%; block-size: 100%; object-fit: cover;
  transition: transform .3s;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-cap {
  position: absolute; inset-inline: 0; inset-block-end: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .88), transparent);
  color: #fff; font-size: 14px; font-weight: 600;
  padding: 26px 12px 10px; text-align: start;
}
.gallery-group-title {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap;
  align-items: baseline; gap: 10px; margin: 12px 0 0;
  font-size: 18px; font-weight: 800;
}
.gallery-group-title small { color: var(--muted); font-weight: 600; }
.gallery-group-title .tag {
  background: rgba(225, 6, 0, .16); color: #ffc9c7;
  border: 1px solid rgba(225, 6, 0, .5);
  font-size: 12px; padding: 2px 10px; border-radius: 999px;
}

/* ---------- الفيديوهات ---------- */
.videos-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.video-card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.video-thumb {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border: 0; padding: 0; width: 100%; cursor: pointer; display: block;
}
.video-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; opacity: .9; }
.video-thumb .play {
  position: absolute; inset: 0; margin: auto;
  inline-size: 62px; block-size: 62px; border-radius: 50%;
  background: rgba(225, 6, 0, .92); color: #fff;
  display: grid; place-items: center; font-size: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.video-thumb:hover .play { background: var(--red-dark); }
.video-card .card-body h3 { font-size: 17px; }

/* ---------- الآراء ---------- */
.reviews-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  margin-block-end: 36px;
}
.review-card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.stars { color: #f5b301; letter-spacing: 3px; font-size: 18px; direction: ltr; text-align: start; }
.review-text { margin: 0; color: #dcdee3; }
.review-name { margin: auto 0 0; font-weight: 800; color: var(--red); }

/* ---------- النماذج ---------- */
.form-card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(18px, 4vw, 32px);
  max-inline-size: 820px; margin-inline: auto;
}
.form-card h3 { font-size: 21px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-block-end: 16px; min-width: 0; }
.field label { font-weight: 700; font-size: 15px; }
input, select, textarea {
  font-family: inherit; font-size: 16px;
  background: #0e0f12; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; inline-size: 100%;
  min-block-size: 48px;
}
textarea { min-block-size: 96px; resize: vertical; line-height: 1.7; }
input:focus, select:focus, textarea:focus {
  border-color: var(--red); outline: none;
  box-shadow: 0 0 0 3px rgba(225, 6, 0, .25);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--red);
}
.form-msg {
  margin: 0 0 14px; padding: 11px 15px; border-radius: 10px;
  font-weight: 700; font-size: 15px;
}
.form-msg.ok { background: rgba(28, 160, 74, .16); color: #7ee2a8; border: 1px solid rgba(28, 160, 74, .5); }
.form-msg.err { background: rgba(225, 6, 0, .14); color: #ff9d99; border: 1px solid rgba(225, 6, 0, .5); }
.form-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- التواصل ---------- */
.contact-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.contact-card {
  background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; min-width: 0;
}
.contact-card h3 { font-size: 18px; border-block-end: 1px solid var(--line); padding-block-end: 10px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 10px; align-items: flex-start; color: #dcdee3; min-width: 0; }
.contact-list .ico { color: var(--red); font-weight: 900; flex: 0 0 auto; }
.contact-list a { direction: ltr; unicode-bidi: embed; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 18px; }
.social-links a {
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; text-decoration: none; font-weight: 700; font-size: 14px;
}
.social-links a:hover { border-color: var(--red); color: var(--red); }

.hours-table { inline-size: 100%; border-collapse: collapse; }
.hours-table td {
  padding: 9px 6px; border-block-end: 1px solid var(--line); font-size: 15px;
}
.hours-table td:last-child { text-align: end; direction: ltr; color: var(--muted); }
.hours-table tr.closed td { color: var(--muted); }
.hours-table tr.today td { font-weight: 800; color: #fff; }
.hours-table tr.today td:first-child::after {
  content: " (اليوم)"; color: var(--red); font-size: 12px;
}
.map-box {
  border-radius: 10px; overflow: hidden; border: 1px solid var(--line);
  min-block-size: 220px; display: grid; place-items: center; background: #0e0f12;
}
.map-box iframe { inline-size: 100%; block-size: 260px; border: 0; }
.map-box a.btn { padding: 10px 20px; min-block-size: 44px; }

/* ---------- الفوتر ---------- */
.site-footer {
  background: #08080a; border-block-start: 1px solid var(--line);
  padding-block: 30px; margin-block-start: 10px;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 14px;
  justify-content: space-between; align-items: center;
}
.footer-brand { font-weight: 900; font-size: 18px; margin: 0 0 4px; direction: ltr; text-align: start; }
.footer-meta { margin: 0; color: var(--muted); font-size: 14px; }
.footer-copy { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- أزرار عائمة ---------- */
.fab-group {
  position: fixed; inset-block-end: 18px; inset-inline-end: 18px;
  display: flex; flex-direction: column; gap: 10px; z-index: 90;
}
.fab {
  display: grid; place-items: center; text-decoration: none;
  font-weight: 800; font-size: 14px; border-radius: 999px;
  padding: 13px 18px; box-shadow: var(--shadow); color: #fff;
}
.fab-whatsapp { background: #1fae53; }
.fab-call { background: var(--red); }

/* ---------- النوافذ ---------- */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .8); }
.modal-dialog {
  position: relative; background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); inline-size: min(100%, 720px);
  max-block-size: 90vh; overflow: auto; box-shadow: var(--shadow);
}
.modal-dialog.wide { inline-size: min(100%, 960px); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; border-block-end: 1px solid var(--line);
  position: sticky; inset-block-start: 0; background: var(--bg-3); z-index: 2;
}
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-close {
  background: none; border: 1px solid var(--line); color: var(--text);
  inline-size: 40px; block-size: 40px; border-radius: 10px;
  cursor: pointer; font-size: 17px;
}
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal-body { padding: 18px; }
.modal-body > img { inline-size: 100%; border-radius: 10px; }
.lightbox-caption { color: var(--muted); margin: 12px 0 0; }
.video-frame { aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.video-frame iframe, .video-frame video { inline-size: 100%; block-size: 100%; border: 0; }
.video-error { color: #ff9d99; font-weight: 700; margin: 14px 0 0; }

/* ---------- حركات ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- موبايل ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .site-nav {
    position: fixed; inset-block-start: var(--header-h); inset-inline: 0;
    background: rgba(11, 11, 13, .98);
    border-block-end: 1px solid var(--line);
    max-block-size: 0; overflow: hidden; transition: max-block-size .3s ease;
  }
  .site-nav.open { max-block-size: 70vh; overflow-y: auto; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 10px 16px 18px; gap: 2px; }
  .nav-list a { padding: 13px 12px; border-radius: 8px; font-size: 16px; }
  .section { padding-block: 56px; }
  .hero { min-block-size: auto; padding-block: calc(var(--header-h) + 56px) 64px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 400px) {
  .container { width: min(100% - 24px, var(--container)); }
  .hero-actions .btn { inline-size: 100%; }
  .brand-text strong { font-size: 16px; }
  .fab { padding: 12px 14px; font-size: 13px; }
  .btn { padding: 12px 18px; font-size: 15px; }
}
