:root {
    --purple-dark: #3c1372;
    --purple-medium: #442075;
    --green-dark: #366c54;
    --green-medium: #3e6c5a;
    --gray-cool: #78827f;
    --purple-light: #b2a4c0;
    --white: #ffffff;
    --off-white: #f8f5f9;
    --light-bg: #f9f7fc;
    --card-bg: #ffffff;
    --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 15px 40px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Almarai', sans-serif;
    line-height: 1.8;
    background-color: var(--light-bg);
    color: #333;
    overflow-x: hidden;
    text-align: right;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Almarai', sans-serif;
    font-weight: 800;
    color: var(--purple-dark);
}

html {
    scroll-behavior: smooth;
}

input::placeholder {
    padding: 5px;
}

.me-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.ms-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.text-start {
    text-align: right !important;
}

.text-end {
    text-align: left !important;
}

[dir="rtl"] .scroll-to-top {
    left: auto;
    right: 40px;
}

[dir="rtl"] .social-share-wrapper {
    right: auto;
    left: 40px;
}

[dir="rtl"] .share-tooltip {
    left: auto;
    right: calc(100% + 10px);
}

[dir="rtl"] .share-tooltip::after {
    right: auto;
    left: 100%;
    border-right-color: transparent;
    border-left-color: var(--purple-dark);
}

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--light-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.logo-circle {
    position: relative;
    width: 170px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-circle::after {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

.loader-logo {
    width: 110px;
    height: 110px;
    object-fit: contain;
    z-index: 10;
    animation: logoPulse 2s ease-in-out infinite;
}

.circle-effect {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--purple-dark), var(--green-dark)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: rotate 3s linear infinite;
}

.circle-effect-1 {
    width: 170px;
    height: 170px;
    border-width: 4px;
    animation: rotate 4s linear infinite;
}

.circle-effect-2 {
    width: 145px;
    height: 145px;
    border-width: 3px;
    animation: rotate 3s linear infinite reverse;
}

.circle-effect-3 {
    width: 120px;
    height: 120px;
    border-width: 4px;
    animation: rotate 2s linear infinite;
    background: linear-gradient(45deg, var(--purple-light), var(--green-medium)) border-box;
}

.loader-text {
    font-family: 'Almarai', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple-dark), var(--green-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1.5px;
    animation: textGlow 2s ease-in-out infinite;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.5s ease forwards 0.3s, textGlow 2s ease-in-out infinite 0.5s;
}

.gradient-spinner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1.5s linear infinite;
}

.gradient-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--green-dark) 100%);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 4px;
    animation: pulseBorder 1.5s ease-in-out infinite;
}

.loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--purple-dark), var(--green-dark));
    transform-origin: 0%;
    transform: scaleX(0);
    transition: transform 0.4s ease;
    z-index: 10000;
}

.content-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.scroll-to-top {
    position: fixed;
    bottom: 40px;
    left: 40px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--purple-medium), var(--green-medium));
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    outline: none;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, var(--purple-dark), var(--green-dark));
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(60, 19, 114, 0.25);
}

.scroll-to-top-icon {
    width: 24px;
    height: 24px;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.scroll-to-top:hover .scroll-to-top-icon {
    animation: arrowToTop 1s ease-in-out infinite;
}

.social-share-wrapper {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.share-toggle-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b5998, #4267B2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-medium);
    transition: all 0.4s ease;
    position: relative;
    overflow: visible !important;
    order: 2;
}

.share-toggle-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(59, 89, 152, 0.25);
}

.share-toggle-btn i {
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}

.share-toggle-btn.active i {
    transform: rotate(45deg);
}

.share-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 107, 0.8);
    animation: redRingPulse 2s linear infinite;
    pointer-events: none;
    z-index: -1;
}

.share-pulse-ring:nth-child(2) {
    animation-delay: 1s;
}

.share-toggle-btn.active .share-pulse-ring {
    animation-play-state: paused;
    opacity: 0;
}

.share-icons-container {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    margin-bottom: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
    order: 1;
}

.share-icons-container.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    transform: scale(0);
    opacity: 0;
}

.share-icons-container.show .share-icon {
    animation: iconAppear 0.3s ease forwards;
    animation-delay: calc(var(--i) * 0.1s);
}

.share-icon:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.share-icon i {
    font-size: 1.2rem;
}

.share-icon.facebook {
    background: #4267B2;
    --i: 1;
}

.share-icon.twitter {
    background: #1DA1F2;
    --i: 2;
}

.share-icon.linkedin {
    background: #0077B5;
    --i: 3;
}

.share-icon.whatsapp {
    background: #25D366;
    --i: 4;
}

.share-icon.telegram {
    background: #0088cc;
    --i: 5;
}

.share-icon.email {
    background: var(--green-medium);
    --i: 6;
}

.share-tooltip {
    position: absolute;
    background: var(--purple-dark);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.share-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: var(--purple-dark);
}

.share-icon:hover .share-tooltip {
    opacity: 1;
    visibility: visible;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseBorder {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes arrowToTop {
    0%, 100% {
        transform: rotate(0deg) translateY(0);
    }
    50% {
        transform: rotate(0deg) translateY(-3px);
    }
}

@keyframes redRingPulse {
    0% {
        width: 60px;
        height: 60px;
        opacity: 1;
    }
    70% {
        opacity: 0.7;
    }
    100% {
        width: 90px;
        height: 90px;
        opacity: 0;
    }
}

@keyframes iconAppear {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.12);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 12px rgba(60, 19, 114, 0.35), 0 0 25px rgba(54, 108, 84, 0.25);
    }
    50% {
        text-shadow: 0 0 22px rgba(60, 19, 114, 0.65), 0 0 45px rgba(54, 108, 84, 0.45);
    }
}

@keyframes shimmer {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.35;
        transform: scale(1.15);
    }
    100% {
        opacity: 0;
        transform: scale(1.6);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .page-loader {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .logo-circle {
        width: 150px;
        height: 150px;
    }
    .loader-logo {
        width: 95px;
        height: 95px;
    }
    .circle-effect-1 {
        width: 150px;
        height: 150px;
    }
    .circle-effect-2 {
        width: 125px;
        height: 125px;
    }
    .circle-effect-3 {
        width: 100px;
        height: 100px;
    }
    .loader-text {
        font-size: 1.7rem;
    }
}

@media (max-width: 768px) {
    .logo-circle {
        width: 140px;
        height: 140px;
    }
    .loader-logo {
        width: 90px;
        height: 90px;
    }
    .circle-effect-1 {
        width: 140px;
        height: 140px;
    }
    .circle-effect-2 {
        width: 115px;
        height: 115px;
    }
    .circle-effect-3 {
        width: 90px;
        height: 90px;
    }
    .loader-text {
        font-size: 1.6rem;
    }
    .loader-container {
        gap: 20px;
    }
    .scroll-to-top {
        width: 50px;
        height: 50px;
        bottom: 25px;
        left: 25px;
    }
    .social-share-wrapper {
        bottom: 25px;
        right: 25px;
    }
    .share-toggle-btn {
        width: 50px;
        height: 50px;
    }
    .share-pulse-ring {
        width: 54px;
        height: 54px;
    }
    .share-icon {
        width: 44px;
        height: 44px;
    }
    @keyframes redRingPulse {
        0% {
            width: 54px;
            height: 54px;
            opacity: 1;
        }
        100% {
            width: 80px;
            height: 80px;
            opacity: 0;
        }
    }
}

@media (max-width: 480px) {
    .logo-circle {
        width: 130px;
        height: 130px;
    }
    .loader-logo {
        width: 80px;
        height: 80px;
    }
    .circle-effect-1 {
        width: 130px;
        height: 130px;
        border-width: 3px;
    }
    .circle-effect-2 {
        width: 105px;
        height: 105px;
        border-width: 2.5px;
    }
    .circle-effect-3 {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
    .loader-text {
        font-size: 1.4rem;
    }
    .loader-container {
        gap: 15px;
    }
    .scroll-to-top {
        width: 46px;
        height: 46px;
        bottom: 20px;
        left: 20px;
    }
    .social-share-wrapper {
        bottom: 20px;
        right: 20px;
    }
    .share-toggle-btn {
        width: 46px;
        height: 46px;
    }
    .share-pulse-ring {
        width: 50px;
        height: 50px;
    }
    .share-icon {
        width: 40px;
        height: 40px;
    }
    .share-tooltip {
        display: none;
    }
    @keyframes redRingPulse {
        0% {
            width: 50px;
            height: 50px;
            opacity: 1;
        }
        100% {
            width: 75px;
            height: 75px;
            opacity: 0;
        }
    }
}