/* ===== Arabic & RTL base ===== */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

/* If you want to inherit the English styles and just override, uncomment: */
@import url('style.css?v=9'); 

:root {
  --gold: #B89C6E;
  --gold-2: #bcac88;
  --bg: #EFF2FA;
  --dark: #353535;
}

html {
  direction: rtl;
}

body {
  font-family: 'Tajawal', 'Myriad Pro', 'Segoe UI', 'Helvetica Neue', sans-serif;
  background-color: var(--bg);
  color: #333;
}

/* ===== Header & Nav ===== */
.header {
  background-color: #353535;
  color: #fff;
  height: 200px;
  display: flex;
  align-items: center;
  border-bottom: 4px solid var(--gold-2);
}

.menu-toggle {
  /* move burger to the left in RTL */
  right: auto !important;
  left: 20px !important;
}

.header-container {
  flex-direction: row-reverse; /* logo right, menu left */
}

.logo img {
  height: 150px;
  width: auto;
  object-fit: contain;
}

/* Desktop menu: reverse order */
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex-direction: row-reverse;
}

.main-nav ul li a {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid var(--gold-2);
  border-radius: 50px;
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  background-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.main-nav ul li a:hover,
.main-nav a.active {
  background-color: var(--gold-2);
  color: var(--dark);
}

/* Language switcher (dropdown opens to the left in RTL) */
.lang-switcher { position: relative; }
.lang-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
}
.lang-menu {
  position: absolute;
  left: 0; /* mirror */
  right: auto;
  top: 110%;
  background: #fff;
  color: #333;
  list-style: none;
  padding: 6px 0;
  margin: 0;
  min-width: 140px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: none;
  z-index: 1000;
}
.lang-menu.open { display: block; }
.lang-menu a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
}
.lang-menu a:hover { background: #f2f2f7; }

/* ===== Hero (image slider) ===== */
.hero-slider-jq { border-bottom: 6px solid var(--gold-2); }
.slide-jq { background-position: center; }

/* Mirror content panel to the right, flip border */
.slide-content {
  position: absolute;
  top: 50%;
  right: 50px;
  left: auto;
  transform: translateY(-50%);
  color: #fff;
  max-width: 600px;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-right: 5px solid var(--gold-2);
  border-left: 0;
  text-align: right;
}
.slide-content h1 { line-height: 1.4; }
.slide-content p { line-height: 1.8; }

@media (max-width: 768px) {
  .slide-content {
    right: 20px;
    left: auto;
    max-width: 90%;
  }
}

/* ===== Secondary video hero ===== */
.video-overlay {
  justify-content: right;
  padding-right: 50px;
  padding-left: 0;
}
.video-overlay .slide-content {
  margin-right: 0;
  margin-left: 0;
  text-align: right;
  border-right: 5px solid var(--gold-2);
  border-left: 0;
}

/* ===== About / Objective cards ===== */
.about-section { text-align: center; }
.about-box,
.objective-box {
  text-align: right;
}

/* Flip the ribbon gradient and its rounded side */
.about-box h3,
.objective-box h3 {
  background: linear-gradient(to left, var(--gold-2) 0%, #d9cdb0 100%);
  border-radius: 50px 0 0 50px; /* left pill in RTL */
  width: 80%;
  left: 10%;
  right: auto;
  text-align: right;
  padding: 10px 20px;
  color: #fff;
}

/* Star list bullets on the right in RTL */
.star-list li {
  position: relative;
  padding-right: 30px;
  padding-left: 0;
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.8;
}
.star-list li::before {
  content: '★';
  position: absolute;
  right: 0;
  left: auto;
  top: 2px;
  color: var(--gold-2);
  font-size: 18px;
}

/* ===== News ===== */
.news-section .section-title { text-align: right; }

/* Mirror the card gradient direction and align text right */
.news-box {
  text-align: right;
  background: linear-gradient(to left, var(--gold-2) 80%, #d9cdb0 100%);
}

/* ===== Members ===== */
.members-section .section-title { text-align: center; }
.member-box { text-align: right; }

/* ===== Results ===== */
.results-section { text-align: center; }
.results-section .section-title { text-align: center; }

.results-column { text-align: right; }
.results-header {
  display: flex;
  justify-content: space-between;
  flex-direction: row-reverse; /* Points label on the right side visually */
}
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse; /* rank | team | points mirrors naturally */
  gap: 20%;
}
.team-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-direction: row-reverse; /* flag then name, visually RTL */
}

/* ===== Org chart ===== */
.org-chart-section .section-title { text-align: center; }
.org-name, .org-role { text-align: center; }

/* ===== Info blocks (banner sections) ===== */
/* On wide screens, put text on the right and image on the left for RTL flow */
@media (min-width: 769px) {
  .info-block {
    flex-direction: row-reverse;
  }
}
.info-text { text-align: right; }

/* ===== Mobile nav ===== */
@media (max-width: 768px) {
  .main-nav {
    /* slide menu down from header, anchored to right in RTL */
    right: 0;
    left: auto;
    display: none;
    flex-direction: column;
    background-color: var(--gold);
    position: absolute;
    top: 60px;
    width: 100%;
    padding: 10px 0;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    text-align: right;
  }
  .main-nav.active { display: flex; }

  .main-nav ul { flex-direction: column; padding: 0; direction: rtl; }
  .main-nav li { text-align: right; padding: 10px 16px; }
}

/* ===== Generic RTL helpers (if you also use body.rtl toggle) ===== */
/* If you prefer to keep one CSS file, you can wrap everything above with body.rtl {...} */
/* Example: 
body.rtl html { direction: rtl; }
body.rtl .main-nav ul { flex-direction: row-reverse; }
*/

:root{
  --gold:#B89C6E;      /* your brand gold */
  --ink:#111;
  --paper:#fff;
  --muted:#6b7280;
}
.video-section{padding:clamp(12px,2vw,20px);}
.section-title{margin:0 0 12px;font-size:clamp(18px,2.2vw,24px);font-weight:700;color:var(--ink);}

.video-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:16px;
   max-width: 1100px;  
  margin: 0 auto;     
  justify-content: center;
}
.video-card{
  position:relative;
  border:none;
  padding:0;
  cursor:pointer;
  background:transparent;
  border-radius:16px;
  overflow:hidden;
  outline-offset:4px;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
  transition:transform .2s ease, box-shadow .2s ease;
  aspect-ratio:16/9;
}
.video-card:hover{transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,.12);}
.video-card:focus-visible{outline:3px solid var(--gold);}
.video-card .thumb{
  width:100%;height:100%;object-fit:cover;display:block;
  filter:saturate(1.1) contrast(1.05);
}
.video-card .overlay{
  position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.0) 40%, rgba(0,0,0,.55) 100%);
  display:flex;flex-direction:column;justify-content:flex-end;gap:10px;
  padding:14px;
}
.video-card .play{
  width:52px;height:52px;fill:var(--paper);
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.4));
  transition:transform .2s ease;
}
.video-card:hover .play{transform:translate(-50%,-50%) scale(1.06);}
.video-card .title{
  color:#fff;font-weight:700;font-size:15px;line-height:1.3;text-align:start;
  text-shadow:0 1px 2px rgba(0,0,0,.5);
}
.video-badge{
  position:absolute;right:10px;top:10px;
  background:rgba(0,0,0,.65);color:#fff;border-radius:999px;
  padding:4px 8px;font-size:12px;backdrop-filter:blur(4px);
  border:1px solid rgba(255,255,255,.15);
}

/* Modal */
.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.video-modal[aria-hidden="false"] {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  transition: opacity 0.2s ease;
  z-index: 1; /* behind the dialog */
}

.video-dialog {
  position: relative;
  max-width: min(1000px, 92vw);
  margin: 6vh auto 0;
  z-index: 2; /* above backdrop */
}

.video-modal[aria-hidden="false"] .video-dialog{transform:translateY(0);}
.video-frame-wrap{
  position:relative;width:100%;aspect-ratio:16/9;background:#000;border-radius:18px;overflow:hidden;
  box-shadow:0 16px 60px rgba(0,0,0,.35);
}
.video-frame-wrap iframe{width:100%;height:100%;border:0;display:block}
.modal-close{
  position:absolute;right:-10px;top:-10px;width:40px;height:40px;border-radius:999px;
  border:none;background:var(--paper);color:var(--ink);font-size:28px;line-height:1;
  cursor:pointer;box-shadow:0 6px 20px rgba(0,0,0,.25);
}
.modal-close:hover{background:#f3f4f6}
.modal-caption{
  margin-top:10px;color:#fff;text-align:center;font-weight:600;
}

/* Optional RTL tweak */
html[dir="rtl"] .video-card .title{text-align:end;}

