/* Cairo — Arabic font for sports/fitness brand */
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap");

:root {
  --primary-color: #42c8c9;
  --secondary-color: #d6abd8;
  --text-dark: #020617;
  --text-light: #94a3b8;
  --extra-light: #e2e8f0;
  --white: #ffffff;
  --gradient-1: linear-gradient(to right, #eeb5c6, #b2b4e4, #b3b4e4);
  --gradient-2: linear-gradient(to right, #eeb5c4, #beb0e1, #7ed6d8);
  --max-width: 1200px;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

.section__container {
  max-width: var(--max-width);
  margin: auto;
  padding: 5rem 1rem;
}

.section__header {
  position: relative;
  isolation: isolate;
  font-size: 2rem;
  line-height: 2.75rem;
  max-width: 400px;
}

.section__header::before {
  position: absolute;
  top: -3rem;
  width: max-content;
  font-size: 6rem;
  font-weight: 800;
  line-height: 6rem;
  color: rgba(0, 0, 0, 0.05);
  z-index: -1;
}

.btn {
  padding: 0.75rem 1.5rem;
  outline: none;
  border: none;
  font-size: 1rem;
  font-family: "Cairo", sans-serif;
  color: var(--white);
  background-color: var(--text-dark);
  border-radius: 5px;
  transition: 0.3s;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--primary-color);
}

img {
  display: flex;
  width: 100%;
}

a {
  text-decoration: none;
  transition: 0.3s;
}

ul {
  list-style: none;
}

html,
body {
  scroll-behavior: smooth;
}

body {
  font-family: "Cairo", sans-serif;
}

header {
  overflow: hidden;
}

nav {
  position: fixed;
  isolation: isolate;
  top: 0;
  width: 100%;
  z-index: 9;
}

.nav__header {
  padding: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--text-dark);
}

.nav__logo img {
  max-width: 175px;
}

.nav__logo .logo-dark {
  display: none;
}

.nav__menu__btn {
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}

.nav__links {
  position: absolute;
  bottom: 0;
  /* RTL: use inset-inline-start instead of left:0 so it anchors to the correct side in RTL */
  inset-inline-start: 0;
  width: 100%;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  background-color: var(--text-dark);
  transition: transform 0.5s;
  z-index: -1;
}

.nav__links.open {
  transform: translateY(100%);
}

.nav__links a {
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}

.nav__links a:hover {
  color: var(--primary-color);
}

.nav__btns {
  display: none;
}

.header__container {
  display: grid;
  gap: 2rem;
}

.header__container h1 {
  position: relative;
  isolation: isolate;
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 5rem;
  color: var(--secondary-color);
  font-style: normal;
  text-align: center;
}

.header__container h1::before {
  position: absolute;
  content: "قوّ عزيمتك";
  top: -5rem;
  /* RTL: use inset-inline-start instead of left, so background text sits at the correct side */
  inset-inline-start: -5rem;
  font-size: 8rem;
  font-weight: 800;
  line-height: 10rem;
  color: rgba(0, 0, 0, 0.05);
  z-index: -1;
  white-space: nowrap;
}

.header__container h2 {
  margin-bottom: 2rem;
  font-size: 3rem;
  font-weight: 800;
  line-height: 4rem;
  color: var(--text-dark);
  font-style: normal;
  text-align: center;
}

.header__container p {
  margin-bottom: 2rem;
  color: var(--text-light);
  text-align: center;
}

.header__btn {
  text-align: center;
}

.header__image img {
  max-width: 300px;
  margin-inline: auto;
}

.about {
  overflow: hidden;
}

.about__container {
  display: grid;
  gap: 2rem;
}

.about__image {
  position: relative;
  isolation: isolate;
}

.about__image::before {
  position: absolute;
  content: "";
  top: 50%;
  left: 50%;
  /* RTL note: this decorative blob uses transform to center itself visually —
     kept as-is because it is symmetrical and does not affect layout direction */
  transform: translate(-75%, -50%);
  width: calc(100% - 5rem);
  aspect-ratio: 1;
  background-image: var(--gradient-2);
  border-radius: 100%;
  z-index: -1;
}

.about__image img {
  max-width: 550px;
  margin-inline: auto;
}

.about__content .section__header::before {
  content: "من نحن";
}

.about__content p {
  margin-top: 1rem;
  color: var(--text-light);
}

.about__content p:nth-child(3) {
  margin-bottom: 2rem;
}

.service {
  background-color: var(--text-dark);
  overflow: hidden;
}

.service__container .section__header {
  color: var(--white);
}

.service__container .section__header::before {
  content: "خدماتنا";
  color: rgba(255, 255, 255, 0.1);
}

.service__grid {
  margin-top: 4rem;
  display: grid;
  gap: 2rem;
}

.service__card span {
  font-size: 2rem;
  font-weight: 800;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px var(--white);
  opacity: 0.75;
}

.service__card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
}

.service__card p {
  color: var(--text-light);
}

.service__image {
  display: none;
}

.popular {
  overflow: hidden;
}

.popular__container .section__header::before {
  content: "أشهر الحصص";
}

.popular__grid {
  margin-top: 4rem;
  display: grid;
  gap: 1rem;
}

.popular__card {
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--extra-light);
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
}

.popular__card:hover {
  box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1);
}

.popular__card div {
  flex: 1;
}

.popular__card h4 {
  margin-bottom: 5px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.popular__card span {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: 0.3s;
}

/* RTL: arrow slides toward the start (right side) on hover, using negative X */
.popular__card:hover span {
  transform: translateX(-10px);
}

.popular__card p {
  color: var(--text-light);
}

/* ─── Pricing Section ─── */
.pricing {
  overflow: hidden;
  background-color: #f8faff;
}

.pricing__container .section__header::before {
  content: "الاشتراكات";
}

.pricing__grid {
  margin-top: 4rem;
  display: grid;
  gap: 2rem;
}

.pricing__card {
  padding: 2.5rem 2rem;
  background-color: var(--white);
  border: 1px solid var(--extra-light);
  border-radius: 1rem;
  text-align: center;
  transition: 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.pricing__card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.pricing__card--featured {
  background: linear-gradient(135deg, var(--text-dark), #1e3a5f);
  border-color: transparent;
}

.pricing__card--featured h3,
.pricing__card--featured .price,
.pricing__card--featured li {
  color: var(--white);
}

.pricing__card h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
}

.pricing__card .price {
  margin-bottom: 1.5rem;
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-color);
}

.pricing__card ul {
  list-style: none;
  margin-bottom: 2rem;
  display: grid;
  gap: 0.75rem;
}

.pricing__card li {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ─── Facility Section ─── */
.facility__container {
  position: relative;
  isolation: isolate;
  display: grid;
  overflow: hidden;
}

.facility__content {
  padding: 5rem 1rem;
}

.facility__content::before {
  position: absolute;
  content: "";
  background-image: var(--gradient-2);
  grid-area: 1/1/3/2;
  inset: 0;
  z-index: -1;
}

.facility__content .section__header {
  margin-bottom: 1rem;
  color: var(--white);
}

.facility__content .section__header::before {
  content: "مرافقنا";
  color: rgba(255, 255, 255, 0.2);
}

.facility__content p {
  color: var(--white);
}

.facility__content p:not(:last-child) {
  margin-bottom: 1rem;
}

/* ─── Mentors Section ─── */
.mentor__container {
  overflow: hidden;
}

.mentor__container .section__header::before {
  content: "فريقنا";
}

.mentor__grid {
  margin-top: 4rem;
  display: grid;
  gap: 4rem 1rem;
}

.mentor__card img {
  margin-bottom: 1rem;
  border-radius: 2rem;
}

.mentor__card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
}

.mentor__card p {
  font-weight: 500;
  color: var(--text-light);
  text-align: center;
}

/* ─── Banner Section ─── */
.banner {
  position: relative;
  isolation: isolate;
  display: grid;
  overflow: hidden;
}

.banner__content {
  padding: 5rem 1rem;
}

.banner__content::before {
  position: absolute;
  content: "";
  inset: 0;
  grid-area: 1/1/2/4;
  background-image: var(--gradient-1);
  z-index: -1;
}

.banner__content h2 {
  margin-bottom: 1rem;
  font-size: 4rem;
  line-height: 5rem;
  color: var(--white);
}

.banner__content p {
  font-size: 1.2rem;
  color: var(--white);
}

.banner__content p a {
  text-decoration: underline;
  color: var(--white);
}

/* ─── Footer ─── */
.footer {
  background-color: var(--text-dark);
}

.footer__container {
  display: grid;
  gap: 4rem 2rem;
}

.footer__logo img {
  margin-bottom: 2rem;
  max-width: 250px;
}

.footer__col h4 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
}

.footer__links {
  display: grid;
  gap: 1rem;
}

.footer__links :is(li, a) {
  color: var(--text-light);
}

.footer__links a:hover {
  color: var(--white);
}

.footer__links a span {
  font-size: 1.2rem;
  /* RTL: use margin-inline-end instead of margin-right for logical spacing */
  margin-inline-end: 10px;
}

.footer__bar {
  padding: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  border-top: 1px solid var(--text-light);
}

/* ─── WhatsApp Floating Button (Phase 2) ─── */
.whatsapp__btn {
  position: fixed;
  bottom: 2rem;
  /* RTL: anchor to the start (right) side using inset-inline-start — in RTL this is the right edge */
  inset-inline-start: 2rem;
  z-index: 999;
  width: 58px;
  height: 58px;
  background-color: #25d366;
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp__btn:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.55);
}

/* ─── Responsive: 540px+ ─── */
@media (width > 540px) {
  .service__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .popular__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mentor__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__container {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Responsive: 768px+ ─── */
@media (width > 768px) {
  header {
    position: relative;
    isolation: isolate;
  }

  header::before {
    position: absolute;
    content: "";
    /* RTL: use inset-inline-end instead of left:50% so the decorative circle stays
       on the image side (logically the end side) in RTL */
    inset-inline-end: 0;
    bottom: 0;
    width: 65%;
    aspect-ratio: 1;
    background-image: var(--gradient-1);
    border-radius: 100%;
    z-index: -1;
  }

  nav {
    position: static;
    padding: 2rem 1rem;
    max-width: var(--max-width);
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
  }

  .nav__header {
    flex: 1;
    padding: 0;
    background-color: transparent;
  }

  .nav__logo img {
    max-width: 200px;
  }

  .nav__logo .logo-dark {
    display: flex;
  }

  .nav__logo .logo-white {
    display: none;
  }

  .nav__menu__btn {
    display: none;
  }

  .nav__links {
    position: static;
    width: fit-content;
    padding: 0;
    flex-direction: row;
    background-color: transparent;
    transform: none !important;
  }

  .nav__links a {
    color: var(--text-dark);
  }

  .nav__links li:last-child {
    display: none;
  }

  .nav__btns {
    flex: 1;
    display: flex;
    /* RTL: justify-content: flex-start so the button aligns to the logical start (left in LTR, right in RTL) */
    justify-content: flex-start;
  }

  .header__container {
    padding-top: 0;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  /* RTL: text-align: start (logical) instead of left */
  .header__container :is(h1, h2, p, .header__btn) {
    text-align: start;
  }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .popular__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .facility__container {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, calc(var(--max-width) / 2))
      minmax(0, calc(var(--max-width) / 2))
      minmax(0, 1fr);
  }

  .facility__image {
    grid-area: 1/1/2/3;
  }

  .facility__image img {
    height: 100%;
    object-fit: cover;
    /* RTL: use border-end-end-radius / border-start-end-radius (logical) instead of
       border-top-right-radius / border-bottom-right-radius — matches the visual end side in RTL */
    border-start-end-radius: 8rem;
    border-end-end-radius: 8rem;
  }

  .facility__content {
    grid-area: 1/3/2/4;
  }

  .facility__content::before {
    grid-area: 1/2/2/5;
  }

  .mentor__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .banner {
    grid-template-columns:
      minmax(0, 1fr)
      minmax(0, calc(var(--max-width) / 2))
      minmax(0, calc(var(--max-width) / 2))
      minmax(0, 1fr);
  }

  .banner__content {
    grid-area: 1/2/2/3;
  }

  .banner__image {
    grid-area: 1/3/2/5;
  }

  .banner__image img {
    height: 100%;
    object-fit: cover;
    /* RTL: clip-path flipped horizontally — original polygon(10% 0, 100% 0, 100% 100%, 0 100%)
       cuts the left edge; in RTL we flip to cut the right edge: polygon(0 0, 100% 0, 90% 100%, 0 100%) */
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
  }

  .footer__container {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── Responsive: 1024px+ ─── */
@media (width > 1024px) {
  .service__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service__image {
    position: relative;
    isolation: isolate;
    display: flex;
    height: 100%;
    width: 100%;
    grid-area: 1/2/3/3;
  }

  .service__image img {
    position: absolute;
    top: -10rem;
  }

  .popular__card {
    padding: 1.5rem;
  }

  .facility__content {
    /* RTL: padding-inline-start / padding-inline-end instead of padding-inline: 4rem 1rem
       which is already logical — kept as logical shorthand */
    padding-inline: 4rem 1rem;
  }

  .mentor__grid {
    gap: 4rem 2rem;
  }
}
