:root {
    --primary: #5d5cde;
    --gold: #b8860b;
    --brown: #8d6b41;
}

/* Base Styles & Components */
.gradient-text {
    background: linear-gradient(45deg, #5D5CDE, #B8860B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.floating-shape {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-shape:nth-child(1) { 
    top: 20%; 
    left: 10%; 
    animation-delay: 0s; 
}

.floating-shape:nth-child(2) { 
    top: 60%; 
    right: 10%; 
    animation-delay: 2s; 
}

.floating-shape:nth-child(3) { 
    bottom: 20%; 
    left: 20%; 
    animation-delay: 4s; 
}

.bg-primary {
    --tw-bg-opacity: 1;
    background-color: rgb(93 92 222 / var(--tw-bg-opacity, 1));
}

.team-member-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-member-img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(93, 92, 222, 0.5);
}

.team-member-img::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

.team-card {
    perspective: 1000px;
    cursor: pointer;
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.team-card:hover .team-card-inner {
    transform: rotateY(180deg);
}

.team-card-front,
.team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

.team-card-back {
    transform: rotateY(180deg);
}

.skill-bar {
    background: linear-gradient(90deg, #5D5CDE, #B8860B);
    height: 6px;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.skill-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: loading 2s ease-in-out infinite;
}

/* تحسين تأثير الكتابة للنصوص الطويلة */
.typing-animation {
    overflow: hidden;
    border-right: 3px solid #5D5CDE;
    white-space: normal;
    display: inline-block;
    animation: typing 4s steps(80) infinite, blink 1s infinite;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.6;
}

/* إصدار بديل للنصوص القصيرة فقط */
.typing-animation-short {
    overflow: hidden;
    border-right: 3px solid #5D5CDE;
    white-space: nowrap;
    animation: typing-short 3s steps(40) infinite, blink 1s infinite;
}

/* Value Cards Styles */
.value-card {
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(93, 92, 222, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: 1;
}

.value-card:hover::before {
    transform: translateX(100%);
}

.value-card:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(93, 92, 222, 0.05), rgba(93, 92, 222, 0.02));
    box-shadow: 0 20px 40px rgba(93, 92, 222, 0.3);
}

.value-card:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.05), rgba(184, 134, 11, 0.02));
    box-shadow: 0 20px 40px rgba(184, 134, 11, 0.3);
}

.value-card:nth-child(3):hover {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05), rgba(139, 69, 19, 0.02));
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.3);
}

.value-card > * {
    position: relative;
    z-index: 2;
}

.value-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.value-card:hover .value-icon {
    filter: drop-shadow(0 8px 16px rgba(93, 92, 222, 0.3));
    transform: scale(1.1) rotate(5deg);
}

/* Animations */
@keyframes slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(-5px);
    }
    50% {
        transform: translateY(5px);
    }
}

@keyframes zoom-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 10px rgba(93, 92, 222, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(93, 92, 222, 0.8);
    }
    100% {
        box-shadow: 0 0 10px rgba(93, 92, 222, 0.5);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(0);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
    }
    50% { 
        transform: translateX(100%) translateY(100%) rotate(45deg); 
    }
    100% { 
        transform: translateX(-100%) translateY(-100%) rotate(45deg); 
    }
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* تأثير الكتابة المحسن للنصوص الطويلة */
@keyframes typing {
    0% { 
        width: 0; 
        max-height: 0;
        opacity: 0;
    }
    30% { 
        width: 100%; 
        max-height: 200px;
        opacity: 1;
    }
    70% { 
        width: 100%; 
        max-height: 200px;
        opacity: 1;
    }
    90%, 100% { 
        width: 100%; 
        max-height: 200px;
        opacity: 1;
    }
}

/* تأثير الكتابة للنصوص القصيرة */
@keyframes typing-short {
    0%, 90%, 100% { width: 0; }
    30%, 60% { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

@keyframes colorPulse {
    0% { 
        transform: scale(1); 
        filter: brightness(1); 
    }
    50% { 
        transform: scale(1.05); 
        filter: brightness(1.2); 
    }
    100% { 
        transform: scale(1); 
        filter: brightness(1); 
    }
}

@keyframes tada {
    0% { 
        transform: scale3d(1, 1, 1); 
    }
    10%, 20% { 
        transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); 
    }
    30%, 50%, 70%, 90% { 
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); 
    }
    40%, 60%, 80% { 
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); 
    }
    100% { 
        transform: scale3d(1, 1, 1); 
    }
}

.value-card:hover {
    animation: colorPulse 2s ease-in-out infinite;
}

/* Additional animation classes for Tailwind */
.animate-slide-in {
    animation: slide-in 0.5s ease-out;
}

.animate-bounce-slow {
    animation: bounce-slow 2s infinite;
}

.animate-zoom-pulse {
    animation: zoom-pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-wiggle {
    animation: wiggle 1s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

.animate-tada {
    animation: tada 2s ease-in-out infinite;
}

/* تحسينات النصوص للقراءة */
.readable-text {
    color: #1f2937 !important; /* رمادي داكن */
}

.dark .readable-text {
    color: #f9fafb !important; /* أبيض فاتح في الوضع المظلم */
}

.readable-text-light {
    color: #374151 !important; /* رمادي متوسط */
}

.dark .readable-text-light {
    color: #e5e7eb !important; /* رمادي فاتح في الوضع المظلم */
}

.enhanced-gradient-text {
    background: linear-gradient(45deg, #1e40af, #b45309);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.dark .enhanced-gradient-text {
    background: linear-gradient(45deg, #3b82f6, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-text {
    color: #111827 !important;
}

.dark .card-text {
    color: #f3f4f6 !important;
}

.section-subtitle {
    color: #4b5563 !important;
}

.dark .section-subtitle {
    color: #d1d5db !important;
}

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
    .value-card:nth-child(1):hover {
        background: linear-gradient(135deg, rgba(93, 92, 222, 0.1), rgba(93, 92, 222, 0.05));
    }
    
    .value-card:nth-child(2):hover {
        background: linear-gradient(135deg, rgba(184, 134, 11, 0.1), rgba(184, 134, 11, 0.05));
    }
    
    .value-card:nth-child(3):hover {
        background: linear-gradient(135deg, rgba(139, 69, 19, 0.1), rgba(139, 69, 19, 0.05));
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-member-img {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
    
    .value-card {
        margin-bottom: 1rem;
    }
    
    /* إزالة تأثير الكتابة على الأجهزة المحمولة للنصوص الطويلة */
    .typing-animation {
        animation: none;
        border-right: none;
        white-space: normal;
    }
    
    /* الاحتفاظ بالتأثير للنصوص القصيرة فقط */
    .typing-animation-short {
        animation: typing-short 2s steps(40) infinite, blink 1s infinite;
    }
    
    .readable-text {
        color: #1f2937 !important;
    }
    
    .dark .readable-text {
        color: #f9fafb !important;
    }
    
    .readable-text-light {
        color: #374151 !important;
    }
    
    .dark .readable-text-light {
        color: #e5e7eb !important;
    }
}

/* تحسينات إضافية للأجهزة الصغيرة جداً */
@media (max-width: 480px) {
    .typing-animation,
    .typing-animation-short {
        animation: none;
        border-right: none;
        white-space: normal;
    }


} 

/* تحسينات خط IBM Plex Sans Arabic */
.font-ibm-arabic {
    font-family: 'IBM Plex Sans Arabic', sans-serif !important;
}

/* تحسين الأوزان المختلفة لخط IBM */
.ibm-thin { font-weight: 100; }
.ibm-extralight { font-weight: 200; }
.ibm-light { font-weight: 300; }
.ibm-regular { font-weight: 400; }
.ibm-medium { font-weight: 500; }
.ibm-semibold { font-weight: 600; }
.ibm-bold { font-weight: 700; }

/* تحسين عرض النصوص العربية مع خط IBM */
.ibm-arabic-text {
    font-family: 'IBM Plex Sans Arabic', sans-serif !important;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* تحسين العناوين مع خط IBM */
.ibm-heading {
    font-family: 'IBM Plex Sans Arabic', sans-serif !important;
    font-weight: 600;
    line-height: 1.4;
}

/* تحسين النصوص العادية مع خط IBM */
.ibm-body {
    font-family: 'IBM Plex Sans Arabic', sans-serif !important;
    font-weight: 400;
    line-height: 1.7;
}

/* تحسين عرض الأرقام مع خط IBM */
.ibm-numbers {
    font-family: 'IBM Plex Sans Arabic', sans-serif !important;
    font-feature-settings: 'tnum' 1; /* Tabular numbers */
}