
/* =========================================
  1. CSS VARIABLES & RESET
  ========================================= */
:root {
    /* --- Dark Theme Variables (Section 1) --- */
    --bg-dark-main: #050505;
    --bg-dark-card: #1212125e;
    --bg-dark-hover: #121212;
    --accent-red: #c40101;      /* Deep Theater Red */
    --accent-red-hover: linear-gradient(#00000025),#C40101;
    --text-dark-primary: #FFFDFD;
    --text-dark-secondary: #E2E2E2;
    --shadow-cinematic: 0 20px 50px rgba(0,0,0,0.7);

    /* --- Light Theme Variables (Section 2) --- */
    --bg-light-main: #fffcfc;   /* Warm Beige/Off-white */
    --bg-light-card: #FFFDFD;
    --text-light-primary: #2C2C2C;
    --text-light-secondary: #555555;
    --border: #eeeeee2d;
    --border-light: #0500008e;
    --connector-dot: #050000;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.05);

    /* --- Shared --- */
    --font-main: 'IBM Plex Sans Arabic', sans-serif;
    --radius-lg: 25px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);



}

/* Utility */
.container2 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}
.btn > svg{
    /* transition: transform 0.3s ease; */
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0, 1.88);
}
.btn-primary:hover{
    background: var(--accent-red-hover);
}
.btn:hover > svg[data-lucide = arrow-up-left]{
    transform: rotate(45deg) scale(1.05);
}
.btn:hover > svg[data-lucide = arrow-down-left]{
    transform: rotate(-45deg) scale(1.05);
}
/* =========================================
  2. SECTION 1: DARK CINEMATIC (Hero + Scenarios)
  ========================================= */
.dark-section {
    background-color: var(--bg-dark-main);
    background-image: radial-gradient(circle at top right, #1a0505 0%, transparent 50%);
    color: var(--text-dark-primary);
    padding-bottom: 6rem;
    border-bottom: 1px solid #222;
}

/* --- Hero --- */
.hero-wrapper {
    padding: 4rem 0;
}

.hero-card {
    background-color: var(--bg-dark-card);
    border-radius: var(--radius-lg);
    border: 1px solid #eeeeee2d;
    box-shadow: var(--shadow-cinematic);
    display: flex;
    padding: 5px;
    overflow: hidden;
    min-height: 300px;
    position: relative;
}

/* Right Column (Image) - First in HTML for RTL Layout */
.hero-image-col {
    flex: 1.2;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    border-radius: 20px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease;
    filter: brightness(0.8) contrast(1.1);
}

/* Vignette effect on image */
.hero-image-col::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

.hero-card:hover .hero-img {
    transform: scale(1.05);
}

/* Left Column (Text) */
.hero-text-col {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Right aligned in RTL context */
    z-index: 2;
}
.hero-text-col hr{
    width: 100%;
    border: 0;
    border-top: 2.5px dotted #eee;
    opacity: 0.5;
}
.t-m{
  width: 100%;
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}
.icon-mostr{
  height: 30px;
  margin-left: 15px;
}
.title-mostr {
    font-size: 1.8rem !important;
    font-weight: 900;
    line-height: 1.2;
    color: #FFFDFD;
    margin-bottom: 0 !important;
    /* background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; */
}
.join .title-mostr{
    font-size:60px !important;
}
.title-mostr span{
    color: var(--accent-red);
}
.icon-mostr{
  fill: var(--text-dark-primary);
}
.hero-desc {
    color: var(--text-dark-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    width: 100%;
}
.hero-desc-mb{
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}
.hero-desc samp{
  font-weight: bold;
}

/* Red CTA Button */

.btn-icon-arrow {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    transition: transform 0.3s;
}

/* Arrow moves Left in RTL on hover */
.btn-primary:hover .btn-icon-arrow{
    transform: translateX(-5px);
}

/* --- Scenario Selection --- */
.scenarios-wrapper {
    margin-top: 4rem;
    padding-bottom: 150px;
}

.section-header-dark {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
}

.section-title-dark {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark-primary);
}

.scenarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.scenario-card {
    background-color: var(--bg-dark-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    border: 1px solid #eeeeee6c;
    /* border: 1px solid #1a1a1a; */
    display: flex;
    flex-direction: column;
    padding: 5px;
}

.scenario-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    /* background-color: var(--bg-dark-hover); */
    border-color: #eeeeee9f;
}

/* Image Area */
.scenario-img-box {
    height: min-content;
    width: 100%;
    position: relative;
    overflow: hidden;
    position: relative;
    overflow: hidden;
    /* aspect-ratio: 1 / 1; */
    border-radius: 20px;
}
.scenario-img-box h3{
    position: absolute;
    bottom: 15px;
    right: 20px;
    margin: 0 !important;
    z-index: 1;
}
.scenario-img-box h3 samp{
    opacity: 0.6;
    font-weight: 500;
}
.scenario-img-box .icon-mostr{
    position: absolute;
    width: 25px;
    margin: 0;
    bottom: 15px;
    left: 20px;
    z-index: 1;
    opacity: 0.3;
}
.scenario-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* Curtain Overlay */
.scenario-img-box::before {
    height: 100%;
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 60%, rgba(0,0,0,0.9));
    z-index: 1;
}

/* Card Content */
.scenario-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.scenario-content .btn{
    max-width:150px;
    min-width: 130px;
}
.scenario-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #FFFDFD;
}

.scenario-meta {
    display: flex;
    justify-content:space-between;
    gap: 15px;
    color: var(--text-dark-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.scenario-meta hr{
  border: 0;
  border-left: 1px solid var(--text-dark-secondary);
}
.meta-tag {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-icon {
    width: auto;
    height: 20px;
    fill: var(--bg-light-card);
}

.btn-outline-dark {
    margin-top: auto;
    border: 1px solid var(--text-dark-secondary);
    color: var(--text-dark-secondary);
    background: transparent;
    padding: 10px 20px;
    border-radius: 50px;
    text-align: center;
    font-weight: 600;
    transition: 0.3s;
    cursor: pointer;
}

.btn-outline-dark:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(139, 0, 0, 0.1);
}

/* =========================================
  3. SECTION 2: LIGHT HOW-TO-PLAY
  ========================================= */
.light-section {
    background-color: var(--bg-light-main);
    color: var(--text-light-primary);
    /* margin-top: 150px; */
    padding-bottom: 50px;
    position: relative;
}
.light-section::after , .light-section::before{
    content: "";
    position: absolute;
    width: 100%;
    right: 0;
    height: 50px;
    background:url(imgs/pattern2.webp) repeat-x;
    background-size: 100px;
    --ab-s:-50px;
}
.light-section::after{
    top:var(--ab-s);
}
.light-section::before{
    bottom:var(--ab-s);
    transform: rotate(180deg);
}
.htp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4rem;
}

.section-icon-light {
    fill: var(--text-light-primary);
}

.section-title-light {
    color: var(--text-light-primary);
}

/* Grid for Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    /* row-gap: 5rem; */
    margin-bottom: 5rem;
}

/* Step Card */
.step-card {
    background: var(--bg-light-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: var(--connector-dot);
}

/* Step Number Badge */
.step-badge {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--bg-light-main);
    border: 1px solid var(--text-light-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 2rem;
    color: var(--text-light-primary);
    /* position: absolute;
    top: -20px;
    left: 50%; */
    /* transform: translateX(50%); Centered in RTL */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.step-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-light-primary);
}

.step-desc {
    font-size: 0.95rem;
    color: var(--text-light-secondary);
    line-height: 1.6;
}

/* Dotted Connectors (Pseudo-elements) */
.step-card::after {
    content: '';
    position: absolute;
    top: 50%;
    /* Connects to the LEFT side (Next card in RTL) */
    left: -2.5rem; 
    width: 2.5rem;
    height: 2px;
    border-top: 2px dotted var(--connector-dot);
    transform: translateY(-50%);
    z-index: 0;
    transition: var(--transition);
}
.step-card::before{
    content: url(imgs/arrow.svg);
    position: absolute;
    top: 50%;
    left: 0rem; 
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: translateY(calc(50% - 16px));
    z-index: 0;
    transition: var(--transition);
    animation: step-card 2s infinite;
}
@keyframes step-card{
    0% {left: -10px;
        opacity: 0%; }
    12% {opacity: 100%;}
    25% {left: -3.2rem;
        opacity: 0%; }
    100% {left: -3.2rem; }
}
.step-card:nth-child(2)::before { animation-delay: 0.5s; }
.step-card:nth-child(4)::before { animation-delay: 1s; }
.step-card:nth-child(5)::before { animation-delay: 1.5s; }

.step-card:hover::after{
    transform: translateY(6px);
}
.step-card:hover::before{
    transform: translateY(-3px);
}
/* Remove connector for last card in row */
.step-card:nth-child(3)::after, 
.step-card:nth-child(6)::after
, .step-card:nth-child(3)::before, 
.step-card:nth-child(6)::before
 {
    display: none;
}
/* CTA Footer */
.htp-footer {
    text-align: center;
    border-top: 2px dotted var(--border-light);
    border-bottom: 2px dotted var(--border-light);
    padding: 1.5rem 0;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.footer-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-light-secondary);
}

.btn-outline-light {
    color: var(--text-light-primary);
    border-color: var(--text-light-primary);
    transition: 0.3s;
    min-width: 230px;
}

.btn-outline-light:hover {
    background: var(--text-light-primary);
    color: var(--bg-light-card);
}
.grid-imgs{
    display: flex;
    /* grid-template-columns: auto auto; */
    gap:20px;
    flex-wrap: wrap;
}
.grid-imgs .grid-item:nth-child(1){
    background: url(imgs/مع-الأصحاب.webp) no-repeat center center;
    background-size: cover;
}
.grid-imgs .grid-item:nth-child(2){
    background: url(imgs/مع-العائلة.webp) no-repeat center center;
    background-size: cover;
}
.grid-imgs .grid-item:nth-child(3){
    background: url(imgs/في-المخيم.webp) no-repeat center center;
    background-size: cover;
}
.grid-imgs .grid-item:nth-child(4){
    background: url(imgs/على-البحر-.webp) no-repeat center center , url(imgs/على-البحر.webp) no-repeat center center;
    background-size: cover;
}
.grid-imgs .grid-item{
    position: relative;
    height: 350px;
    border-radius: var(--radius-lg);
    border: 1px solid #343434;
    box-shadow: var(--shadow-cinematic);
    transition: var(--transition);
}
.grid-item:hover{
    transform: scale(1.02);
    border: 1px solid #4b4b4b;
}
.grid-imgs .grid-item:nth-child(1) , .grid-imgs .grid-item:nth-child(4){
    width: calc(40% - 10px);
}
.grid-imgs .grid-item:nth-child(2) , .grid-imgs .grid-item:nth-child(3){
    width: calc(60% - 10px);
}
.grid-text{
    position: absolute;
    height: 80px;
    width: 100%;
    padding: 30px;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.817));
}
.grid-text p{
    font-size: 20px;
    font-weight: 600;
    width: 100%;
    text-align: center;
}

#moments{
    margin-top: 0;
    padding-top:120px !important;
}

#moments nav{
    width: 100%;
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
#moments .btn-primary{
    min-width: 210px !important;
}



.carousel-wrapper {
    width: 100%;
    margin: auto;
    position: relative;
}

.card.active {
  opacity: 1;
}

.avatar img {
  width: 70px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.info h3 {
  margin-bottom: 8px;
  font-size: 20px;
}
.info p {
color: #bababa;
}

.carousel-wrapper .nav {
    
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: white;
  width: 35px;
  height: 35px;
  border: 1px solid var(--text-light-secondary);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;

}

.prev {
  left: -40px;
}

.next {
  right: -40px;
}

.carousel-container {
  overflow: hidden;
}

.carousel {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
  /* التغيير هنا: جعل العناصر تتمدد لتأخذ نفس الارتفاع */
  align-items: stretch;
}

.card {
  min-width: 260px;
  border-radius: var(--radius-lg);
  padding: 20px;
  color: white;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  display: flex;
  border: 1px solid var(--text-light-secondary);
  gap: 20px;
  transition: 0.3s;
  margin: 10px;
  align-items: center;
  flex-shrink: 0;
  height: auto;
  animation: bg-card 2s linear infinite ;
  position: relative;
  overflow: hidden;
}
.card:hover{
    border: 1px solid #949494;
    transform: scale(1.01);
    animation: bg-card 5s linear infinite !important;
}
.card::before {
  content: '';
  position: absolute;
  width: 100%;
  aspect-ratio: 1 / 1;
  top: -50%;
  left: -50%;
  background: radial-gradient(circle, #3f0000cc 20%, transparent 80%);
  animation: move-gradient 3s linear infinite;
  z-index: -1;
}

@keyframes move-gradient {
  0% { transform: translate(0, 0); }
  25% { transform: translate(100%, 0); }
  50% { transform: translate(100%, 100%); }
  75% { transform: translate(0, 100%); }
  100% { transform: translate(0, 0); }
}

@media (min-width: 901px) { .card { width: calc(33.33% - 20px); } }
@media (max-width: 900px) { .card { width: calc(50% - 20px); } }
@media (max-width: 600px) { .card { width: calc(100% - 20px); } }





.banner-wrapper {
    padding: 4rem 0;
}

.banner-card , .join-card {
    background-color: var(--bg-light-card);
    color:var(--text-light-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-cinematic);
    display: flex;
    overflow: hidden;
    min-height: 300px;
    position: relative;
}
.join-card {
    justify-content: space-between;
}

.banner-image-col {
    display: flex;
    justify-content: center;
    align-items: center;
    padding:2px;
    padding-top: 10px;
    flex: 1.2;
    position: relative;
    overflow: none;
    min-height: 300px;
    width: 100%;
    /* aspect-ratio: 23/10;
    background: url(imgs/Animation\ Cards\ Banner\ PC\ 2.gif) no-repeat ;
    background-size: cover;
    position: relative; */
}
.banner-img {
    /* width: 100%; */
    height: 100%;
    max-height: 300px;
    object-fit: cover;
}


/* Left Column (Text) */
.banner-text-col {
    flex: 1;
    padding: calc(2rem + 5px);
    padding-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Right aligned in RTL context */
    z-index: 2;
    max-width: 40%;
}
.banner-text-col .btn{
    max-width: 160px;
    min-width: 145px;
}
.join .btn{
    width: 240px !important;
    min-width: 240px;
}
.banner-text-col h2{
    color:var(--text-light-primary);
}
.banner-desc {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    width: 100%;
}
.banner-desc-mb{
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}
.banner-desc samp{
  font-weight: bold;
}


body {
  background: #000;
  font-family: system-ui, sans-serif;
  color: #fff;
}

.faq {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.faq-item {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--text-light-secondary);
    margin-bottom: 15px;
    overflow: hidden;
    background: radial-gradient(circle at top left, #1a1a1a00, #00000000);
    opacity: .7 ;
    transition: 0.7s;
}
.faq-item.active{
    opacity: 1;
    border: 1px solid #ffffff8a;
    background: radial-gradient(circle at top left, #1a1a1a, #00000000);
}

.faq-header {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  padding: 20px 20px;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-header span {
  text-align: right;
}

.arrow {
  width: 14px;
  height: 14px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
  transition: transform .3s ease  , opacity .6s ease;
}
.faq-item.active .arrow {
  transform: rotate(135deg);
  opacity: 0;
  /* transform: scale(0); */
  pointer-events: none;
}
.faq-content {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  font-size: 0.95rem;
  color: #cfcfcf;
  transition: max-height .4s ease, padding .4s ease;
  position: relative;
}

.faq-content::before {
  content: "";
  display: block;
  border-top: 2.5px dotted rgba(255,255,255,.4);
  margin-bottom: 20px;
}

.faq-item.active .faq-content {
  padding: 10px 20px 20px;
  max-height: 200px;
}
.join .banner-text-col{
    max-width: 78%;
    padding: calc(2rem + 5px);
    background: linear-gradient(to right, var(--bg-light-card), #fffdfdc4),
        url("imgs/bg-join.webp") repeat-x 100%;
    background-size:cover;
    background-position: 0 0 ,0 0%;
    animation: joinMove 3s linear infinite;
    position: relative;
    }
    @keyframes joinMove {
        0% {
            background-position: 0 0 ,0% 0%;
        }
        100% {
            background-position: 0 0 , 99900% 0%;
        }
    } 
.join-image-col{
    padding: 30px;
    width: 22%;
    min-width: 240px;
    display: flex;
    align-items: center;
    /* transform: rotate(90deg); */
    /* flex-direction: column; */
    justify-content: space-between;
    /* aspect-ratio: 2 / 1; */
    /* max-height: 300px; */
    /* width: 300px; */
    border-right: 5px dotted #050000;
    position: relative;
    z-index: 2;
}
.join-image-col::after{
    content: "";
    position: absolute;
    background: #050000;
    border-radius: 50%;
    width: 40px;
    aspect-ratio: 1 / 1;
    top: calc(-40px / 2);
    right:  calc((-40px / 2) - (5px / 2));;
}
.join-image-col::before{
    content: "";
    position: absolute;
    background: #050000;
    border-radius: 50%;
    width: 40px;
    aspect-ratio: 1 / 1;
    bottom: calc(-40px / 2);
    right: calc((-40px / 2) - (5px / 2));;
}
.join-codebar , .join-logo{
    /* width: 50px; */
    height: 100%;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.join-logo img, .join-codebar img{
    /* width: 100%; */
    height: 40px;
    rotate: 90deg;
}
.join-codebar img{
    height: 60px;
}


/* تخطيط القواعد (Sticky Layout) */
.rules-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 37px;
    border-bottom: 3px dotted #333;
}

.rules-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
}

.rules-cards {
    display: flex;
    flex-direction: column;
}

.rule-card {
    background: transparent;
    border: 1px solid #ffffff72;
    border-radius: 15px;
    padding: 30px;
    transition: border-color 0.3s;
}
.rules-cards .faq-item:last-of-type{
    margin: 0 !important;
}
.rule-card:hover {
    border-color: var(--text-color);
}

.rule-card h4 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #fff;
    text-align: right;
}

.rule-card ul {
    list-style: none;
    padding: 0;
    text-align: right;
}
.rule-card ul ul {
    padding-right:30px ;
}

.rule-card ul li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 5px;
    color: #ccc;
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 400;
}
.rule-card ul li span{
    font-weight: bold;
    color: #e2e2e2;
}
.rule-card ul li::before {
    content: "•";
    position: absolute;
    right: 0;
    /* color: var(--primary-red); */
    font-weight: bold;
    font-size: 1.2rem;
}

.rules-title-col p{
    color: #ffffffe1;
}

.rules-title-col b , .rules-content-col b{
    display: block;
    margin: 25px 0 7px;
}
.faq-container .hero-sticky-wrapper{
    max-height: 600px !important;
    justify-content: center;
}
.faq-container{
    max-height: 600px !important;
    min-height: 300px !important;
    padding-bottom: 0;
}
.faq-footer{
    margin-top: 50px;
    max-width: 100%;
    border-width: 3px;
    border-color: #333;
}
.faq-footer .footer-text {
    color: var(--text-dark-secondary);
    opacity: .7 ;
}
.faq-footer .btn{
    max-width: 310px;
    min-width: 310px;
}

#loader{
    background: var(--bg-dark-main);
    position: fixed;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#loader::after{
    content:"";
    width: 100%;
    height: 52%;
    position: absolute;
    background: var(--bg-dark-main);
    top: -1%;
    transition: var(--transition);
}
#loader::before{
    content:"";
    width: 100%;
    height: 52%;
    position: absolute;
    background: var(--bg-dark-main);
    bottom: -1%;
    transition: var(--transition);
}

#loader img{
    height: 80px;
    margin: auto;
    z-index: 9999;
    transition: var(--transition);
}
#loader.hide::after , #loader.hide::before{
    height: 0 !important;
}
#loader.hide{
    background: transparent;
}
#loader.hide img{
    height: 0;
    opacity: 0;
}


@media (min-width: 1024px) {
    .rules-container {
        flex-direction: row; /* جعل العنوان والمحتوى جنبًا إلى جنب */
        align-items: flex-start;
    }
    
    .rules-title-col {
        width: 30%;
        position: sticky;
        top: 120px; /* تثبيت العنوان عند التمرير */
        text-align: right;
    }
        
    .rules-content-col {
        width: 70%;
    }
}
/* =========================================
  4. RESPONSIVE QUERIES
  ========================================= */
@media (max-width: 992px) {
    .hero-card {
        flex-direction: column-reverse; /* Stack text below image on mobile? No, text top is better usually, let's keep it row but stack */
        flex-direction: column;
    }
    /* Since we want image on top visually in mobile:
      In HTML: Image is first. 
      Flex col: Image Top, Text Bottom. Correct.
    */
    
    .hero-image-col, .hero-text-col {
        flex: none;
        width: 100%;
    }
    
    .hero-text-col {
        padding: 1.5rem;
        /* text-align: center; */
        /* align-items: center; */
    }
    .hero-text-col .btn{
        min-width: 130px;
        max-width: 200px;
    }
    .hero-desc {
        font-size: 0.95rem;
        line-height: 1.8;
    }
    .hero-image-col { height: 250px; min-height: 250px; }

    /* Grid Adjustments */
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Fix Connectors for 2-col */
    .step-card::after , .step-card::before { display: none; } /* Clear all */
    .step-card:nth-child(odd)::after , .step-card:nth-child(odd)::before{ display: block; } /* Add back for pairs */

    .step-card::before{
    animation: step-card 1.5s infinite;}

    @keyframes step-card{
        0% {left: -10px;
            opacity: 0%; }
        16% {opacity: 100%;}
        33% {left: -3.2rem;
            opacity: 0%; }
        100% {left: -3.2rem; }
    }
    .step-card:nth-child(3)::before { animation-delay: 0.5s; }
    .step-card:nth-child(5)::before { animation-delay: 1s; }


    .grid-imgs .grid-item{
        height: 350px;
    }
    .grid-imgs .grid-item:nth-child(1) , .grid-imgs .grid-item:nth-child(4){
        width: calc(100%);
    }
    .grid-imgs .grid-item:nth-child(2) , .grid-imgs .grid-item:nth-child(3){
        width: calc(100%);
    }

    .banner-card{
        flex-direction: column;
    }
    .banner-text-col , .join .banner-text-col{
        max-width: 100%;
        width: 100% !important;
    }
    .banner-image-col::after{
        display: none;
    }
    .banner-img{display: none;}
    .banner-image-col {
        flex: 1.2;
        position: relative;
        overflow: hidden;
        min-height: 300px;
        width: 100%;
        aspect-ratio: 23/10;
        background: url(imgs/Cards-Banner.webp) repeat-x ;
        background-size: cover;
        animation: bgMove 9000s linear infinite;
        position: relative;
    }
    @keyframes bgMove {
        0% {
            background-position: 0% 0%;
        }
        100% {
            background-position: 100000% 0%;
        }
    } 
}

@media (max-width: 897px) {
    .join-card{
        flex-direction: column;
    }
    .join .banner-text-col{
        background: linear-gradient(to top, var(--bg-light-card), #fffdfdde),
            url("imgs/bg-join-2.webp") repeat-y 100%;
        background-size:cover;
        background-position: 0 0 ,0 0%;
        animation: joinMove 90s linear infinite;
        position: relative;
    }
    @keyframes joinMove {
        0% {
            background-position: 0 0 ,0% 0%;
        }
        100% {
            background-position: 0 0 , 0% 1000%;
        }
    }
    .join-image-col{
        padding: 40px 20px 20px;
        width: 100%;
        align-items: center;
        flex-direction: column;
        border-right:none;
        border-top: 4px dotted #050000;
        gap: 30px;
    }
    .join-image-col::after{
        width: 40px;
        top: calc((-40px / 2) - (4px / 2));
        right:  calc(100% - (40px / 2));
    }
    .join-image-col::before{
        width: 40px;
        top: calc((-40px / 2) - (4px / 2));
        left: calc(-40px / 2);
    }
    .join-logo img, .join-codebar img{
        rotate: 0deg;
    }
    .join-codebar , .join-logo{
        width: 100%;
    }
    .join-codebar img{
        width: 100%;
    }
}

@media (max-width: 600px) {
    .title-mostr { font-size: 2rem; }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .step-card:nth-child(6)::after , .step-card:nth-child(6)::before{ display: none !important; }
    .step-card::after , .step-card::before{ display: block !important; }

    .step-card::after {
        content: '';
        position: absolute;
        left: 50%;
        /* Connects to the LEFT side (Next card in RTL) */
        top: auto !important;
        bottom: -3.9rem !important; 
        height: 2.5rem;
        width: 2px;
        border-top: 0px #00000000;
        border-left: 2px dotted var(--connector-dot);
        transform: translateY(-50%);
        z-index: 0;
        transition: var(--transition);
    }
    .step-card:hover::after{
        transform: translateY(-20px) !important;
    }.step-card:hover::before{
        transform:  rotate(-90deg) !important;
    }
    .step-card::before{
        content: url(imgs/arrow.svg);
        position: absolute;
        left: calc(50% - 8px);
        top: auto !important;
        bottom: 0rem;
        width: 12px;
        height: 12px;
        opacity: 0;
        transform: rotate(-90deg);
        z-index: 0;
        animation: step-card 3s infinite;
    }
    @keyframes step-card{
        0% {bottom: 0;
            opacity: 0%; }

        16% {opacity: 100%;}

        33% {bottom: -3.9rem;
            opacity: 0%; }

        100% {bottom: -3.9rem; }
    }
    .scenarios-grid { grid-template-columns: 1fr; }
    
    .step-card:nth-child(1)::before { animation-delay: 0.5s; }
    .step-card:nth-child(2)::before { animation-delay: 1s; }
    .step-card:nth-child(3)::before { animation-delay: 1.5s; }
    .step-card:nth-child(4)::before { animation-delay: 2s; }
    .step-card:nth-child(5)::before { animation-delay: 2.5s; }

    .container2 { padding: 0 1.25rem; }
    .htp-footer {
        flex-direction: column;
    }
    .join .title-mostr {
        font-size: 50px !important;
    }
}
@media (max-width: 432px){
    .card{
        flex-direction: column;
        gap: 10px;
    }
    .info h3 , .info p{
        text-align: center;
    }
    .avatar img {
        width: 90px;
    }
    .prev {
        left: -30px;
    }

    .next {
        right: -30px;
    }
    /* .join .title-mostr {
        font-size: 40px !important;
    } */
}
