/* Import Google font - Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  scroll-behavior: smooth;
}
:root {
    --primary-red: #c40101;
    --dark-bg: #050000;
    --text-color: #ffffff;
}
body{
  min-height: 100vh;
  max-height: 1080px;
  /* background: #050000; */
  background: radial-gradient(circle at 50% 0%, #3a0000 0%, #050000 70%), var(--dark-bg);
  /* background: #E3F2FD; */
  color: var(--text-color);
  overflow-x: hidden;
  line-height: 1.6;
}
.ltr{direction: ltr;}
.material-symbols-rounded{
  font-family: 'Material Symbols Rounded';
}
.container-m{
    max-width: 1440px !important;
    margin: 0 auto;
}
.main{
    background: var(--dark-bg);
    padding-bottom: 50px;
}
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    max-height: 1080px;
    z-index: -2;
    background: linear-gradient(to bottom, #c401014d 80%, #050000 100%),url('imgs/bg.webp') no-repeat center center/cover;
    background: cover ;
    filter: brightness(0.6);
}
.container, .video-controls, .video-timer, .options{
  display: flex;
  align-items: center;
  justify-content: center;
}
.hidden{
  display: none;
}

header {
    display: flex;
    position: fixed;
    align-items: center;
    width: 100%;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, #050000cc, transparent);
    backdrop-filter: blur(3px);
    transition: transform 0.3s, opacity 0.3s;
    justify-content: space-between;
    padding: 20px 5%;
    position: fixed;
}
header .container-m{
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1440px;
}
header nav{
    display: flex;
}
.logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.5rem;
    gap: 10px;
}
/* hada */
.logo img { height: 42px; }

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    font-size: 12px;
    text-align: left;
}
.logo-icon {
    background-color: var(--primary-red);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}

.nav-links { display: none; }
.nav-links a {
    color: #998d8d;
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.9rem;
    transition: color 0.3s;
}
.nav-links a:hover {
  color: var(--text-color) !important;
  opacity: 1 !important;
}


.mobile-menu-btn {
    background: none;
    height: 40px;
    width: 40px;
    margin-right: 20px;
    border: 1px solid ;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    display: inline-flex; 
    align-items: center;
    justify-content: center;
}



/* --- القسم الرئيسي (Hero Section) --- */
.hero-container {
    position: relative;
    /* min-height: 100vh; */
    max-height: 1080px;
    background: linear-gradient(to bottom, #0500001a 20%, #050000 90%);
    padding: 100px 5% 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-sticky-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

/* النصوص */
.content-area {
    max-width: 800px;
    z-index: 2;
    text-align: center;
    transition: opacity 0.1s linear;
    margin-bottom: 0;
    will-change: transform, opacity;
}

.content-area h1 {
    font-size: 4.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.content-area p {
    font-size: 1.2rem;
    color: #ddd;
    margin-bottom: 30px;
    font-weight: 300;
}

.buttons-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 5px 15px;
    height: 40px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    justify-content: space-between;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.btn-primary {
    background-color: var(--primary-red);
    width: 55%;
    color: white;
    border: none;
    max-width: 250px;
}

.btn-secondary {
    background-color: transparent;
    width: 40%;
    color: white;
    border: 1px solid white;
}
.btn-secondary.desktop-only{
    min-width:170px;
}
.btn-secondary:hover{
    background-color: #ffffff21;
}

.desktop-only{
    width: 150px;
}
/* --- منطقة الفيديو --- */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: center center;
    will-change: transform, width;
    z-index: 5;
}
.video-c{
    /* filter:  drop-shadow(0px 0px 0.5px #ffffff) drop-shadow(-5px 7px 5px #05000036); */
    z-index: 2;
}
.video-c img , .video-c video{
  width: 500px;
  max-width: 100%;
  border-radius: 10px;
}


/* تعديل: الشفافية 0 في البداية */
.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 30%;
    background: var(--primary-red);
    filter: blur(80px);
    opacity: 0; /* مخفي تماماً في البداية */
    z-index: 1;
    transition: opacity 0.3s ease;
}

/* hada */
/* الزخارف */
.decoration-pattern {
    width: 100px;
    height: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    margin: 10px auto 15px auto;
    opacity: 0.5;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;

    position: relative;
}
.decoration-pattern img{
    position: relative;
    bottom: 0;
    height: 80px;
    opacity: 0.4;
}
.decoration-pattern .p2{
    position: relative;
    bottom: 55px;
}

/* --- محتوى إضافي --- */
.more-content {
    padding: 50px 5% 0px;
    background-color: var(--dark-bg);
    position: relative;
    z-index: 10;
}
.more-content-2{
    padding: 0px 5% 0px;
    position: relative;
}

.more-content h2 { font-size: 2rem; margin-bottom: 20px; }



.btn-w {
    width: 180px !important;
}


@media (max-width: 1175px) {

    .content-area {
        /* mostr */
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 421px;
    }
    .content-area h1 {
        font-size: 3.6rem;
    }

    .content-area p {
        font-size: 1.2rem;
    }
    .buttons-container {
        /* mostr */
        width: 100%;
    }
    .btn-primary {
        width: 50%;
    }
    
    .btn-secondary {
        width: 45%;
    }
    
}
@media (max-width: 432px){
  .hero-container {
    padding: 130px 5% 50px;
  }
    .content-area {
        /* mostr */
        width: 345px;
    }
    .content-area h1 {
        font-size: 3rem;
    }
    .btn{
        padding: 5px 10px;
    }
    .btn-primary {
        width: 45%;
    }
    .btn-secondary {
        width: 50%;
    }
    .btn-secondary.desktop-only{
        min-width:160px;
    }
    .content-area p {
        font-size: 1.1rem;
    }
    .banner-content h2 {
        font-size: 2.2rem;
        margin-bottom: 15px;
        line-height: 1.4;
        color: #fff;
    }

    .banner-content p {
        font-size: 0.73rem;
        color: #ccc;
        margin-bottom: 25px;
        font-weight: 300;
    }
    .scenario-meta{
      font-size: 0.85rem !important;
    }
    .meta-icon{
        height: 16px !important;
    }
}
@media (max-width: 407px){
    .scenario-meta{
      font-size: 0.75rem !important;
    }
}
@media (min-width: 1080px) {
    .nav-links { display: flex; flex: 1; justify-content: center; }
    .mobile-menu-btn { display: none; }
}
/* --- ميديا كويري للحاسوب (Desktop) --- */
@media (min-width: 1024px) {
    header { padding: 30px 8%; }
    .btn-secondary.desktop-only { display: inline-flex; }

    .hero-container {
        height: 100vh; 
        max-height: 1080px;
        padding: 0 5%;
        display: block;
    }

    .hero-sticky-wrapper {
        position: sticky;
        top: 0;
        height: 100vh;
        max-height: 1080px;
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        padding: 0 3%;
        gap: 5%;
    }

    .content-area {
        /* width: 50%; */
        max-width: max-content;
        order: 1;
        text-align: right;
        align-items: flex-start;
    }

    .buttons-container {
        justify-content: flex-start;
    }

    .video-wrapper {
        width: 40%; 
        max-width: 1000px !important;
        order: 2;
    }
    .btn-primary {
        max-width: 55%;
        width: 180px;
    }

    .btn-secondary {
        max-width: 40%;
        max-width: 180px;
    }
}
.container{
  width: 98%;
  user-select: none;
  overflow: hidden;
  max-width: 900px;
  border-radius: 15px;
  /* corner-shape: bevel; */
  /* corner-style-type:beleved; */
  clip-path: polygon(
    15px 0,
    calc(100% - 15px) 0,
    100% 15px,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    15px 100%,
    0 calc(100% - 15px),
    0 15px
  );
  background: #050000;
  aspect-ratio: 16 / 9;
  position: relative;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 540px) {
  .wrapper .video-controls{
    padding: 3px 10px 7px;
  }
  .options input, .progress-area span{
    display: none!important;
  }
  .options button{
    height: 30px;
    width: 30px;
    font-size: 17px;
  }
  .options .video-timer{
    margin-left: 5px;
  }
  .video-timer .separator{
    font-size: 14px;
    margin: 0 2px;
  }
  .options button :where(i, span) {
    line-height: 30px;
  }
  .options button span{
    font-size: 21px;
  }
  .options .video-timer, .progress-area span, .speed-options li, .quality-options li{
    font-size: 12px;
  }
  .playback-content .speed-options , .playback-content .quality-options{
    width: 75px;
    left: -30px;
    bottom: 30px;
  }
  .speed-options li , .quality-options li{
    margin: 1px 0;
    padding: 3px 0 3px 10px;
  }
  .right .pic-in-pic{
    display: none;
  }
  .container{
  clip-path: polygon(
    15px 0,
    calc(100% - 15px) 0,
    100% 15px,
    100% calc(100% - 15px),
    calc(100% - 15px) 100%,
    15px 100%,
    0 calc(100% - 15px),
    0 15px
  );
}
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
    z-index: 2000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}




footer {
    background-color: #050505;
    text-align: center;
    margin-top: 0;
}
.footer-content {
    display: flex;
    padding: 40px 5%;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer {
  align-items: center;
  justify-items: center;
  gap:15px !important;
}
.footer div {
    display: flex;
    justify-content: space-between;
    justify-items: center;
    gap: 15px;
    /* width: 100%; */
}
.footer .mobile-action-btn , .footer .footer-icon{
    transform: translateY(0);
}
.footer-logo {
    height: 40px;
}
.footer-logo img{
    height: 100%;
}
.copyright {
    color: #666;
    font-size: 0.9rem;
}
@media (min-width: 1024px) {
    .carousel-viewport { 
      height: 480px; 
      margin-bottom: 0;
    }
    .cards-wrapper {
      width: 280px;
      top: 60%;
    }
}
@media (max-width: 390px) {
  .mobile-action-btn{
    padding: 3px 15px !important;
  }
}
@media (max-width: 370px) {
  .footer{
    flex-direction: column;
    height: 130px;
  }
  .footer div{
    width: 100%;
  }
  .footer-logo{
    width: min-content !important;
  }
}


.rule-card-i-t{
 display: block;
 align-items: center;
}
.rule-card-img{
  width: 100%;
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rule-card-img img{
  width: 150px;
  border: 1px solid #ffffff4c;
  border-radius: 10px;
}
.rule-card-text{
  width: 100%;
  min-width: calc(100% - 160px);
  padding: 30px 0 0 0 ;

}

@media screen and (min-width: 570px){
  .rule-card-i-t{
    display: flex;
    align-items: center;
  }
  .rule-card-img{
    width: 20%;
    min-width: 160px;
  }
  .rule-card-img img{
    width: 100%;
  }
  .rule-card-text{
    width: 80%;
    min-width: calc(100% - 160px);
    padding: 0 30px 0 0;
  }
}

/* --- Mobile Menu Overlay Styles (New) --- */
.menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000057; /* أسود بشفافية 0.5 */
    z-index: 98; /* تحت القائمة (99) وفوق المحتوى */
    opacity: 0;
    pointer-events: none; /* غير قابلة للنقر وهي مخفية */
    transition: opacity 0.4s ease;
    backdrop-filter: blur(2px); /* تأثير ضبابي جميل (اختياري) */
}

.menu-backdrop.active {
    opacity: 1;
    pointer-events: auto; /* قابلة للنقر الآن */
}

.mobile-menu-overlay {
    position: fixed;
    top: -300px;
    left: 0.5%;
    width: 99%;
    height: 70%;
    min-height: 380px;
    background-image: radial-gradient(circle at top left , #c40101cf 0%, #050000cf 50%);
    backdrop-filter: blur(5px);
    z-index: 99;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease,
                top 0.6s ease;
    padding: 20px 5% 0px;
    border: 1px solid #ffffff3e;
    border-radius: 0 0 30px 30px;
}
.mobile-menu-overlay.active {
    top: 0;
    /* transform: translateY(0); */
    opacity: 1;
    pointer-events: auto;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 60px;
}



.mobile-menu-btn.menu-r {
    animation: rotateIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.mobile-menu-btn.menu-m{
    animation: rotateOut 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes rotateIn {
    0% { transform: rotate(-180deg) scale(0.5); opacity: 0; }
    100% { transform: rotate(0deg) scale(1); opacity: 1; }
}
@keyframes rotateOut {
    0% { transform: rotate(-180deg) scale(0.8); opacity: 0; }
    100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

.mobile-nav-content {
    margin-top: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: right;
    justify-content: center;
    gap: 15px;
    text-align: right;
}

.mobile-nav-link {
    display: block;
    /* text-align: left; */
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.mobile-action-btn {
    height: 35px;
    padding: 3px 25px;
    border: 1px solid #ffffff93;
    border-radius: 50px;
    color: #ffffff93;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease,
                border 0.2s linear,
                color 0.2s linear;
}

.mobile-menu-footer , .footer {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #ffffff46;
    width: 100%;
}
.mobile-menu-footer nav , .footer nav{
    display: flex;
    justify-content: center;
    gap: 15px;
}
.footer-icon {
    width: 35px;
    height: 35px;
    border: 1px solid #ffffff93;
    border-radius: 50%; /* نصف دائرة أو دائرة كاملة حسب التصميم */
    display: flex;
    text-decoration: none;
    align-items: center;
    justify-content: center;
    color: #ffffff93;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.5s ease,
                border 0.2s linear,
                color 0.2s linear;
    padding: 8px;
    /* تصميم يشبه نصف الدائرة في الصورة إذا أردت، أو دائرة عادية */
    clip-path: circle(50% at 50% 50%); 
}
.mobile-action-btn:hover, .footer-icon:hover{
    border: 1px solid #ffffff;
    color: var(--text-color);
}

.footer .footer-icon , .footer .mobile-action-btn {
  opacity: 1;
}
/* Staggered Animations (تتابع الظهور) */
.mobile-menu-overlay.active .mobile-nav-link,
.mobile-menu-overlay.active .mobile-action-btn,
.mobile-menu-overlay.active .footer-icon {
    opacity: 1;
    transform: translateY(0);
    transform: translateX(0);
}

.mobile-menu-overlay.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-action-btn { transition-delay: 0.3s; }
.mobile-menu-overlay.active .footer-icon:nth-child(1) { transition-delay: 0.35s; }
.mobile-menu-overlay.active .footer-icon:nth-child(2) { transition-delay: 0.4s; }
.mobile-menu-overlay.active .footer-icon:nth-child(3) { transition-delay: 0.45s; }
