:root {
    --primary: #5D2E8F;
    --primary-light: #7b4db3;
    --primary-dark: #4a1c7c;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #212529;
    --success: #28a745;
    --downloader-box-bg: #6c757d; /* لون رمادي للمستطيل */
    --downloader-box-bg-hover: #5a6268; /* لون أغمق عند التحويم */
    --downloader-box-border-radius: 8px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--white);
    color: var(--dark-gray);
    overflow-x: hidden;
}

.dark body {
    background-color: #181818;
    color: var(--white);
}

.section {
    padding: 80px 0;
}

.section-title {
    font-weight: 900;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.navbar {
    background-color: var(--primary);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1031;
}

.navbar-brand img {
    height: 45px; 
    width: auto;
}
.navbar-brand.ms-auto {
    margin-left: 0 !important; 
}

.nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 120px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.phone-mockup-wrapper {
     display: flex;
     justify-content: center;
     align-items: center;
     position: relative;
     z-index: 1;
}
.phone-mockup {
    position: relative;
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
    background-color: #000000; 
    border-radius: 40px;      
    padding: 12px;            
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35); 
}

.dark .phone-mockup { 
    background-color: #222222;
     box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.phone-screen {
    position: relative;
    background-color: #000;    
    border-radius: 28px;      
    overflow: hidden;
    aspect-ratio: 9 / 19.5; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: var(--white);
    text-decoration: none;
}
 .btn-primary:hover {
     background-color: var(--primary-light);
     border-color: var(--primary-light);
     color: var(--white);
 }

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 100%;
    right: auto;
    left: 0;
}

.btn-outline {
    color: var(--white);
    border: 2px solid var(--white);
    background-color: transparent;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.features {
    position: relative;
}

.dark .features {
    background-color: #222;
}

.feature-card {
    background-color: var(--white);
    border-radius: 15px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.dark .feature-card {
    background-color: #303030;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background-color: var(--primary);
    opacity: 0.05;
    border-radius: 0 0 0 100%;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(93, 46, 143, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.feature-icon i {
    font-size: 32px;
    color: var(--primary);
}

.feature-title {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.feature-desc {
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.7;
}

.dark .feature-desc {
    color: #ddd;
}

.screenshot-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-gray) 100%);
    position: relative;
    overflow: hidden;
}

.dark .screenshot-section {
    background: linear-gradient(135deg, #222 0%, #181818 100%);
}

.screenshot-item {
    display: block;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0.9;
    cursor: pointer;
    text-decoration: none;
}

.screenshot-item:hover {
     transform: translateY(-8px) scale(1.02);
     opacity: 1;
     box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.screenshot-img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-modal .modal-dialog {
    max-width: 800px;
}
.screenshot-modal .modal-content {
    background-color: transparent;
    border: none;
}
.screenshot-modal .modal-body {
    padding: 0;
    position: relative;
}
.screenshot-modal .carousel-item img {
    max-height: 85vh;
    object-fit: contain;
    margin: auto;
    width: 100%;
    border-radius: 10px;
}
.screenshot-modal .carousel-control-prev,
.screenshot-modal .carousel-control-next {
    width: 5%;
    z-index: 5;
}

.screenshot-modal .carousel-control-prev-icon,
.screenshot-modal .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    padding: 15px 10px;
    background-size: 60% 60%;
}
.screenshot-modal .btn-close {
    position: absolute;
    top: -25px;
    right: -15px;
    z-index: 10;
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
    background-color: rgba(0,0,0,0.5);
    border-radius: 50%;
    padding: 0.5em;
}
.screenshot-modal .btn-close:hover {
    opacity: 1;
}

.download {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.download::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 120' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V120H0Z' fill='%23FFFFFF'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: bottom center;
    z-index: 1;
    opacity: 0.1;
}

.download .container {
    position: relative;
    z-index: 2;
}

.download-title {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.download-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    color: rgba(255, 255, 255, 0.9);
}

 .download-item {
     display: inline-block;
     text-align: center;
     margin: 15px 10px;
 }

 .download-label {
     display: block;
     font-size: 0.95rem;
     color: rgba(255, 255, 255, 0.9);
     margin-bottom: 8px;
     font-weight: 500;
 }

 .custom-download-btn {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     background-color: var(--white);
     color: var(--primary);
     border: 1px solid transparent;
     padding: 10px 25px;
     border-radius: 50px;
     font-weight: 700;
     text-decoration: none;
     transition: all 0.3s ease;
     min-width: 180px;
     box-shadow: 0 2px 5px rgba(0,0,0,0.1);
 }

 .custom-download-btn i {
     margin-left: 8px;
     font-size: 1.1em;
 }
 .custom-download-btn span {
    text-transform: uppercase;
 }


 .custom-download-btn:hover {
     background-color: var(--light-gray);
     color: var(--primary-dark);
     transform: translateY(-3px);
     box-shadow: 0 5px 12px rgba(93, 46, 143, 0.2);
 }

/* --- بداية تنسيقات قسم كود Downloader المعدل --- */
.downloader-code-section {
    max-width: 450px; 
    margin-left: auto;
    margin-right: auto;
}

.downloader-code-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white); 
    margin-bottom: 10px !important;
}

.downloader-code-box {
    background-color: var(--downloader-box-bg);
    border-radius: var(--downloader-box-border-radius);
    padding: 15px 20px; 
    display: flex;
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer; /* جعل المستطيل قابلاً للنقر */
    transition: background-color 0.2s ease; /* انتقال سلس للخلفية */
    direction: ltr; 
}

.downloader-code-box:hover {
    background-color: var(--downloader-box-bg-hover); /* تغيير الخلفية عند التحويم */
}

.downloader-code-value {
    font-family: 'Consolas', 'Courier New', monospace; 
    font-size: 1.8rem; 
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px; 
    user-select: all; 
    text-align: left; 
    flex-grow: 1; 
}

.copy-code-icon-visual { /* أيقونة للعرض فقط */
    color: var(--white);
    font-size: 1.6rem; 
    padding-left: 10px; /* مسافة بين الكود والأيقونة */
    transition: transform 0.2s ease;
}

.downloader-code-box:hover .copy-code-icon-visual {
    transform: scale(1.1); /* تكبير الأيقونة عند تحويم الفأرة على المستطيل */
}


.copy-feedback {
    font-size: 0.95rem;
    color: var(--success);
    min-height: 22px; 
    margin-top: 8px !important;
    font-weight: 500;
    transition: opacity 0.3s ease-in-out;
    opacity: 0; /* إخفاء الرسالة مبدئياً */
}

.copy-feedback.show {
    opacity: 1; /* إظهار الرسالة */
}
/* --- نهاية تنسيقات قسم كود Downloader المعدل --- */

 .download-info, .download .d-flex p {
     color: rgba(255, 255, 255, 0.9);
 }

@media (max-width: 991px) {
    .hero {
        padding: 100px 0 80px;
        text-align: center;
    }
    .hero-content .d-flex {
        justify-content: center;
    }
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-subtitle {
        font-size: 1.3rem;
    }
    .phone-mockup-wrapper {
        margin-top: 40px;
    }
    .phone-mockup {
        max-width: 250px;
    }
    .section {
        padding: 60px 0;
    }
    .download-title {
        font-size: 2.3rem;
    }
    .features .row.g-4 {
        --bs-gutter-y: 1.5rem;
    }
    .screenshot-section .row.g-4 {
        --bs-gutter-y: 1.5rem;
    }

    .downloader-code-value {
        font-size: 1.6rem;
    }
    .copy-code-icon-visual {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .hero {
        padding: 80px 0 60px;
         text-align: center;
    }
    .hero-title {
        font-size: 2.3rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
     .phone-mockup-wrapper {
         margin-top: 30px;
     }
     .phone-mockup {
        max-width: 220px;
    }
    .section {
        padding: 50px 0;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .download-title {
        font-size: 1.9rem;
    }
     .feature-card {
        height: auto;
    }
    .screenshot-section .row.g-4 {
         --bs-gutter-y: 1rem;
    }
    .custom-download-btn {
        padding: 8px 20px;
        min-width: 160px;
    }
     .download-label {
         font-size: 0.9rem;
     }
     .download-item {
         margin: 10px 5px;
     }

    .downloader-code-heading {
        font-size: 1rem;
    }
    .downloader-code-box {
        padding: 12px 15px;
    }
    .downloader-code-value {
        font-size: 1.4rem; 
    }
    .copy-code-icon-visual {
        font-size: 1.4rem;
    }
}

/* Custom style for the larger download button */
.custom-download-btn.btn-larger {
    padding: 15px 45px; /* زيادة الحشو الداخلي */
    font-size: 1.25rem; /* تكبير حجم الخط */
    min-width: 280px;   /* زيادة أقل عرض للزر */
    box-shadow: 0 4px 15px rgba(93, 46, 143, 0.25);
}

.custom-download-btn.btn-larger i {
    font-size: 1.3em;  /* تكبير حجم الأيقونة */
    margin-left: 12px; /* زيادة المسافة بين الأيقونة والنص */
}

/* Make the larger button responsive for smaller screens */
@media (max-width: 767px) {
    .custom-download-btn.btn-larger {
        padding: 12px 35px;
        font-size: 1.15rem;
        min-width: 240px;
    }
}
