/* ==========================================================
   additions.css
   Layers on top of the existing style.css. Adds:
   1) Language switcher button (EN/AR)
   2) "Work in Motion" / video section (reuses portfolio-grid look)
   3) RTL overrides, scoped to [dir="rtl"] so the English page
      is completely unaffected
   ========================================================== */

/* ---------- 1. Language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 24px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}
.lang-switch:hover {
  border-color: rgba(0, 0, 0, 0.4);
  background-color: rgba(0, 0, 0, 0.03);
}
[dir="rtl"] .lang-switch {
  margin-inline-start: 0;
  margin-inline-end: 24px;
}

/* ---------- 2. Video section ---------- */
/* Reuses .section, .wrap, .section-head, .eyebrow, .portfolio-grid,
   .p-card, .p-card-img, .p-label, .p-label-cat, .p-label-name from
   the existing stylesheet so it matches the portfolio section
   automatically. Only the video-specific bits are added here. */

.p-card-img video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Reels stay equal in a six-item, three-column grid. */
.video-grid {
  grid-template-rows: none;
  align-items: start;
}

.video-grid .video-card {
  grid-column: auto;
  grid-row: auto;
}

.video-grid .reel-frame {
  aspect-ratio: 9 / 16;
  overflow: hidden;
  position: relative;
  background: var(--charcoal-mid);
}

.video-grid .reel-frame video {
  position: absolute;
  inset: 0;
}

.video-grid .p-label {
  position: relative;
  min-height: 76px;
  background: var(--charcoal-mid);
}

.video-grid .video-card:hover .reel-frame video {
  transform: scale(1.04);
  transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}

.video-card {
  position: relative;
  cursor: pointer;
}

.video-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-play-badge svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
  opacity: 0.95;
}

.video-section .portfolio-cta-note {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 3. RTL overrides (Arabic page only) ---------- */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav-wrap {
  flex-direction: row-reverse;
}

[dir="rtl"] nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero-inner {
  direction: rtl;
}

[dir="rtl"] .hero-actions {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

[dir="rtl"] .contact-item {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .contact-icon {
  margin-inline-end: 0;
  margin-inline-start: 14px;
}

[dir="rtl"] .social-links {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

[dir="rtl"] .social-link {
  flex-direction: row-reverse;
}

[dir="rtl"] .testi-author {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .testi-av {
  margin-inline-end: 0;
  margin-inline-start: 12px;
}

[dir="rtl"] .form-row {
  flex-direction: row-reverse;
}

[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] textarea {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] select {
  background-position: left 14px center;
}

[dir="rtl"] .footer-credit {
  direction: rtl;
}

/* Arabic type: swap the display/body fonts for something that
   actually renders Arabic well. Cairo mirrors the clean geometric
   role Jost plays; Amiri mirrors the elegant serif role Cormorant
   Garamond plays for headings. */
[dir="rtl"] body {
  font-family: "Cairo", "Jost", sans-serif;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] .logo,
[dir="rtl"] blockquote {
  font-family: "Amiri", "Cormorant Garamond", serif;
}

[dir="rtl"] em {
  font-style: normal;
  font-weight: 600;
}

.p-card-img video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.video-card {
  position: relative;
  cursor: pointer;
}

.video-play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-play-badge svg {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45));
  opacity: 0.95;
}

/* ---------- Reel-style video grid (6 videos, 3 per row) ---------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.reel-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 14px;
}

.reel-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (max-width: 900px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media(max-width:960px){
  .video-grid{grid-template-columns:repeat(2,1fr)}
}

@media(max-width:600px){
  .video-grid{grid-template-columns:1fr;gap:18px}
  .video-grid .reel-frame{aspect-ratio:9 / 16}
}