html,body{
    width: 100%;
    height: 100%;
    overflow-x:hidden;
}
body{
    background-color: #0B132B;
    color: #FFFFFF;
    font-family: 'Cairo', sans-serif;
    text-align: center;
    font-weight: bold;
    overflow-x: hidden;
}
h1,h2,h3,h4,span{
    color: #D4AF37;
}
h1{
    color: #FFFFFF;
}
.span{
    font-size:xx-large;
}
header{
    width: 100%;
    height: 100vh;
    background-image: url('المسجد-الاقصى.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0px;
}
.hero-overlay {
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-content {
  text-align: center;
  color: #FFD700;
  padding: 20px 40px;
  border-radius: 10px;
  backdrop-filter: blur(1px);
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.5rem;
}
.icon{
    max-width: 10%;
    margin-top: 15px;
}
a{
    background-color: #030213;
    color: #FFFFFF;
    border-radius: 8px;
    padding: 10px 20px;
}
hr {
    border: none;
    width: 50%;
    height: 3px; 
    background: linear-gradient(to right, #D4AF37, #FFFFFF, #D4AF37);
    margin: 30px auto; 
    border-radius: 2px; 
    box-shadow: 0 2px 6px rgba(0,0,0,0.3); 
}
.hr{
    border: none; 
    height: 2px;
    background: linear-gradient(to right, rgba(212,175,55,0.7), rgba(212,175,55,0.2));
    margin: 15px auto;
    border-radius: 1px;
}
.hr-hr{
    border: none; 
    height: 2px;
    background:  rgba(212,175,55,0.7);
    margin: 15px auto;
    border-radius: 10px;
    max-width:250px ;
}
/*Biography*/
.text-p{
    Background: #1a2744;
    border: #D4AF37 1px solid;
    max-width: 70%;
    margin: 10px auto;
    padding: 50px;
    font-size:x-large;
    border-radius: 10px;
}
.Biography ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 20px;
}

.Biography-li {
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px 5px;
    padding: 50px;
    flex: 0 0 40%;
    max-width: 40%;
    text-align: center;
    box-sizing: border-box;
}
.Biography-li span {
    display: block;          
    font-weight: bolder;    
    font-size: 1.5rem;       
    margin-bottom: 15px;  
    margin-top: 0; 
}
.Biography-li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212,175,55,0.8);
}
/*Upbringing*/
.Upbringing{
    Background: #1a2744;
    border: #D4AF37 4px solid;
    max-width: 70%;
    margin: 10px auto;
    border-radius: 10px;
}
.Upbringing ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 20px;
}
.Upbringing-li {
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px 5px;
    padding: 20px;
    flex: 0 0 40%;
    max-width: 40%;
    text-align: center;
    box-sizing: border-box;
}
.Upbringing-li span {
    display: block;          
    font-weight: bolder;    
    font-size: 1.5rem;       
    margin-bottom: 15px;  
    margin-top: 0; 
}
.Upbringing-li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212,175,55,0.8);
}
.Important-p{
    font-weight: bolder;
    font-size: x-large;
    font-style: italic;
    background: repeating-linear-gradient(
        45deg, 
        rgba(100, 84, 32, 0.4),
        rgba(212, 175, 55, 0.4) 3px, 
        rgba(212, 175, 55, 0) 3px, 
        rgba(212, 175, 55, 0) 8px
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); 
    max-width: 80%;
    margin: 10px auto;
    border-right:10px solid #FFD700;
    border-left:10px solid #FFD700;
    border-radius: 20px;
}
/*MilitaryJourney*/
.MilitaryJourney{
    Background: #1a2744;
    border: #D4AF37 4px solid;
    max-width: 70%;
    margin: 10px auto;
    border-radius: 10px;
}
.MilitaryJourney ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 20px;
}
.MilitaryJourney-li {
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px 5px;
    padding: 20px;
    flex: 0 0 40%;
    max-width: 40%;
    text-align: center;
    box-sizing: border-box;
}
.MilitaryJourney-li span {
    display: block;          
    font-weight: bolder;    
    font-size: 1.5rem;       
    margin-bottom: 15px;  
    margin-top: 0; 
}
.MilitaryJourney-li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212,175,55,0.8);
}
/*AyyubidState*/
.AyyubidState{
    Background: #1a2744;
    border: #D4AF37 4px solid;
    max-width: 70%;
    margin: 10px auto;
    border-radius: 10px;
}
.AyyubidState ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.AyyubidState-li {
    position: relative;
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px auto;
    padding: 20px 20px 20px 50px;
    max-width: 70%;
    text-align: left; 
    box-sizing: border-box;
}

.AyyubidState-li::before {
    content: "✔";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #D4AF37;
    font-size: 1.5rem;
}

.AyyubidState-li span {
    display: block;
    font-weight: bolder;
    font-size: 1.5rem;
    margin-bottom: 10px;
}
.AyyubidState-li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212,175,55,0.8);
}
.AyyubidState-p{
    font-weight: bolder;
    font-size: x-large;
    font-style: italic;
    background-color: rgba(212, 175, 55, 0.2); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 80%;
    margin: 10px auto;
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
}
.span-p{
    display: block;
    font-weight: bolder;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #FFFFFF;
}
img{
    max-width: 50%;
    border-radius: 10px;
    margin: 20px auto;
    border: #D4AF37 2px solid;
}

/*Battles*/
.Battles{
    
    Background: #1a2744;
    border: #D4AF37 4px solid;
    margin: 10px auto;
    max-width: 95%;
    border-radius: 10px;
}
.Battles ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 20px;
}
.Battles-div-li {
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px 10px;
    padding: 20px;
    flex: 0 0 40%;
    max-width: 40%;
    text-align: center;
    box-sizing: border-box;
}
.Battles-div-li span {
    display: block;          
    font-weight: bolder;    
    font-size: 1.5rem;       
    margin-bottom: 15px;  
    margin-top: 0; 
}
.Battles-div-li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212,175,55,0.8);
}
.quran-p{
    font-weight: bolder;
    font-size: x-large;
    font-style: italic;
    background-color: rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 80%;
    margin: 10px auto;
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
}
.quran-div{
    font-weight: bolder;
    font-size: x-large;
    font-style: italic;
    background-color: rgba(0,0,0,0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 80%;
    margin: 20px auto;
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
}
.quran-div ul{
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 20px;
}
.quran-div li{
    position: relative;
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px auto;
    padding: 20px 20px 20px 50px;
    max-width: 70%;
    text-align: left; 
    box-sizing: border-box;
}
.quran-div li::before {
    content: "✔";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #D4AF37;
    font-size: 1.5rem;
}
.Battles-div-li-div{
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px auto;
    padding: 20px;
    flex: 0 0 70%;
    max-width: 70%;
    text-align: center;
    box-sizing: border-box;
}
.Battles-div-li-div-li{
    background-color: rgba(33, 27, 8, 0.7);
    border: 1px solid #0B132B;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px 10px;
    padding: 20px;
    flex: 0 0 40%;
    max-width: 40%;
    text-align: center;
    box-sizing: border-box;
}
.Battles-div-li-div-li span {
    display: block;          
    font-weight: bolder;    
    font-size: 1.5rem;       
    margin-bottom: 15px;  
    margin-top: 0; 
}
.Battles-div-li-div-li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(185, 183, 174, 0.8);
}
.النتائج{
     font-weight: bolder;
    font-size: x-large;
    font-style: italic;
    background-color: rgba(212, 175, 55, 0.2); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 80%;
    margin: 10px auto;
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
}
/*Castles*/
.Castles-div{
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px auto;
    padding: 20px;
    flex: 0 0 50%;
    max-width: 50%;
    text-align: center;
    box-sizing: border-box;
}
.Castles-div ul{
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 20px;
}
.Castles-div li{
    position: relative;
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 10px auto;
    padding: 20px 20px 20px 50px;
    max-width: 70%;
    text-align: left; 
    box-sizing: border-box;
}
.Castles-div li::before {
    content: "✔";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #D4AF37;
    font-size: 1.5rem;
}
.Castles-div img{
    max-width: 60%;
}
/* Ethics */
.Ethics {
    background: #1a2744;
    border: #D4AF37 4px solid;
    max-width: 70%;
    margin: 30px auto;
    border-radius: 10px;
    padding: 20px;
}

.Ethics ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    gap: 20px;
}

.Ethics li {
    background-color: #1B2541;
    border: 1px solid rgba(212,175,55,0.7);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 40px;
    flex: 0 0 40%;
    max-width: 40%;
    text-align: center;
    box-sizing: border-box;
    transition: 0.3s ease;
}

.Ethics li span {
    display: block;
    font-weight: bolder;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.Ethics li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(212,175,55,0.8);
}

/*footer*/
/* Footer */
#footer {
    background: linear-gradient(
        to top,
        #030213,
        #0B132B
    );
    border-top: 2px solid rgba(212,175,55,0.6);
    padding: 50px 20px;
    margin:20px auto;
    text-align: center;
    max-width: 80%;
}

#footer h2 {
    color: #D4AF37;
    margin-bottom: 25px;
    font-size: 2rem;
}

#footer p {
    color: #E6ECF2;
    font-size: 1.05rem;
    line-height: 1.9;
    margin: 8px auto;
    max-width: 800px;
}

/* Highlight important lines */
#footer p:nth-last-child(1) {
    margin-top: 25px;
    font-size: 0.95rem;
    color: #AAA;
    border-top: 1px solid rgba(212,175,55,0.3);
    padding-top: 15px;
}

/* Subtle hover glow */
#footer:hover {
    box-shadow: 0 -10px 30px rgba(212,175,55,0.15);
}


@media (max-width: 576px) {

    /* Header */
    header {
        height: 80vh;
    }

    .hero-content {
        padding: 20px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .icon {
        max-width: 25%;
    }

    /* Text blocks */
    .text-p,
    .Important-p,
    .AyyubidState-p,
    .quran-p,
    .quran-div,
    .النتائج {
        max-width: 95%;
        padding: 20px;
        font-size: 1rem;
    }

    /* Cards → عمود واحد */
    .Biography-li,
    .Upbringing-li,
    .MilitaryJourney-li,
    .Battles-div-li,
    .Battles-div-li-div-li,
    .Castles-div {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 20px;
    }

    /* Lists blocks */
    .AyyubidState-li,
    .quran-div li,
    .Castles-div li {
        max-width: 100%;
        padding-left: 45px;
        font-size: 0.95rem;
    }

    /* Sections containers */
    .Upbringing,
    .MilitaryJourney,
    .AyyubidState,
    .Battles {
        max-width: 95%;
    }

    /* Images */
    img,
    .Castles-div img {
        max-width: 95%;
    }

    /* Footer */
    #footer {
        max-width: 95%;
        padding: 30px 15px;
    }

    #footer h2 {
        font-size: 1.6rem;
    }

    #footer p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
}
@media (max-width: 992px) {

    /* Hero */
    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }

    /* Cards → عمودين */
    .Biography-li,
    .Upbringing-li,
    .MilitaryJourney-li,
    .Battles-div-li,
    .Battles-div-li-div-li {
        flex: 0 0 80%;
        max-width: 80%;
    }

    .Castles-div {
        flex: 0 0 80%;
        max-width: 80%;
    }

    /* Text sections */
    .text-p,
    .Upbringing,
    .MilitaryJourney,
    .AyyubidState,
    .quran-div {
        max-width: 90%;
    }

    img {
        max-width: 75%;
    }

    #footer {
        max-width: 90%;
    }
}
@media (min-width: 1400px) {

    .text-p,
    .Upbringing,
    .MilitaryJourney,
    .AyyubidState,
    .quran-div {
        max-width: 60%;
    }

    .Biography-li,
    .Upbringing-li,
    .MilitaryJourney-li,
    .Battles-div-li {
        flex: 0 0 35%;
        max-width: 35%;
    }
}
@media (max-width: 576px) {

    .Ethics {
        max-width: 95%;
        padding: 15px;
    }

    .Ethics li {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 20px;
        font-size: 0.95rem;
    }

    .Ethics li span {
        font-size: 1.3rem;
    }
}
@media (max-width: 992px) {

    .Ethics {
        max-width: 90%;
    }

    .Ethics li {
        flex: 0 0 80%;
        max-width: 80%;
    }
}
@media (min-width: 1400px) {

    .Ethics {
        max-width: 60%;
    }

    .Ethics li {
        flex: 0 0 35%;
        max-width: 35%;
    }
}
/* CSS */
.qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0B132B, #1C2541);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.3);
    width: 90%;          /* يتقلص تلقائي على الشاشات الصغيرة */
    max-width: 300px;    /* لا يكبر كثير على الشاشات الكبيرة */
    margin: 2rem auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qrcode-container:hover {
    transform: scale(1.05);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.5);
}

.qrcode-img {
    border-radius: 1rem;
    border: 2px solid #D4AF37;
    width: 100%;       /* يتكيف مع حجم الحاوية */
    height: auto;      /* يحافظ على نسبة الطول والعرض */
    max-width: 250px;  /* لا يصبح أكبر من اللازم */
    object-fit: cover;
    margin-bottom: 1rem;
}

.qrcode-text {
    color: #FFFFFF;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
}
/* CSS */
.qrcode-container {
    display: flex;
    flex-direction: column; /* الصورة تحت النص أو فوق النص حسب الرغبة */
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0B132B, #1C2541); /* خلفية هادئة ومتناسقة */
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    width: fit-content; /* يحافظ على الحجم الطبيعي للصورة */
    margin: 20px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qrcode-container:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.qrcode-img {
    border-radius: 15px;
    border: 2px solid #D4AF37; /* خط ذهبي حول الصورة يرفع الفخامة */
    width: 300px; /* أو أي حجم مناسب */
    height: 300px;
    object-fit: cover;
    margin-bottom: 10px;
}

.qrcode-text {
    color: #FFFFFF;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

/* تحسين العرض على الشاشات الصغيرة */
@media (max-width: 480px) {
    .qrcode-container {
        padding: 1rem;
        max-width: 90%;
    }

    .qrcode-text {
        font-size: 0.9rem;
    }
}

/* ========== إصلاح مشكلة ظهور قسم Battles ========== */
.Battles,
.Battles-div,
.النتائج {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.Battles ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 0 !important;
    gap: 20px !important;
}

.Battles-div-li {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #1B2541 !important;
    border: 1px solid rgba(212,175,55,0.7) !important;
    border-radius: 10px !important;
    padding: 20px !important;
    margin: 10px !important;
    flex: 0 0 40% !important;
    max-width: 40% !important;
    box-sizing: border-box !important;
}

.النتائج {
    background-color: rgba(212, 175, 55, 0.2) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    max-width: 80% !important;
    margin: 20px auto !important;
    border-radius: 20px !important;
    padding: 35px 25px !important;
}

/* للهواتف */
@media (max-width: 576px) {
    .Battles-div-li {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .النتائج {
        max-width: 95% !important;
        padding: 20px !important;
    }
}
