/* Tailwind CSS via CDN will be loaded */
/* Custom Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* RTL/LTR Support for spacing */
[dir="rtl"] .space-x-reverse > * + * {
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="ltr"] .space-x-reverse > * + * {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Font family for different languages */
[dir="rtl"] body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="ltr"] body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Header Styles - Glassmorphism */
.header {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(28, 141, 157, 0.95) 0%, rgba(11, 31, 58, 0.95) 100%);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-radius: 20px;
    box-shadow: none;
    border: none;
    min-height: 6rem;
}

.header nav a {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header.scrolled {
    background: linear-gradient(135deg, rgba(28, 141, 157, 0.98) 0%, rgba(11, 31, 58, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    box-shadow: none;
    border: none;
}

.header.hidden-nav {
    background: rgba(255, 255, 255, 1) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* تغيير لون جميع عناصر القائمة عند hidden-nav */
.header.hidden-nav nav a,
.header.hidden-nav nav span,
.header.hidden-nav nav i,
.header.hidden-nav nav .text-white,
.header.hidden-nav a.text-white,
.header.hidden-nav span.text-white {
    color: #6b7280 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* استثناء النص داخل الأيقونة الزرقاء - يجب أن يبقى أبيض */
.header.hidden-nav .bg-gradient-to-br,
.header.hidden-nav .bg-gradient-to-br span,
.header.hidden-nav .bg-gradient-to-br .text-white {
    color: #ffffff !important;
}

.header.hidden-nav nav a:hover {
    color: #1c8d9d !important;
}

.header.hidden-nav nav a.border-b-2 {
    border-color: #1c8d9d !important;
    color: #1c8d9d !important;
}

.header.hidden-nav .h-5.w-px {
    background-color: #e5e7eb !important;
    opacity: 1 !important;
}

/* Logo text in white background - تغيير لون نص الشعار */
.header.hidden-nav .text-2xl.text-white,
.header.hidden-nav .text-xs.text-white {
    color: #4b5563 !important;
}

/* Logo image styling - تنسيق صورة الشعار */
.header img[alt*="Logo"] {
    height: 3rem;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* عند hidden-nav - قد نحتاج لشعار داكن */
.header.hidden-nav img[alt*="Logo"] {
    filter: brightness(0) saturate(100%) invert(30%) sepia(8%) saturate(1000%) hue-rotate(180deg) brightness(95%) contrast(85%);
}

/* تغيير لون جميع الروابط والنصوص في القائمة - قاعدة إضافية للتأكد */
.header.hidden-nav > div a,
.header.hidden-nav > div span,
.header.hidden-nav > div .text-white {
    color: #6b7280 !important;
}

/* استثناء الأيقونة الزرقاء مرة أخرى للتأكد */
.header.hidden-nav .bg-gradient-to-br,
.header.hidden-nav .bg-gradient-to-br * {
    color: #ffffff !important;
}

/* Keep logo icon primary color */
.header.hidden-nav .bg-gradient-to-br {
    background: linear-gradient(135deg, #1c8d9d 0%, #0b1f3a 100%) !important;
}

/* Ensure text is white when at top (no hidden-nav class) */
.header:not(.hidden-nav) nav a,
.header:not(.hidden-nav) nav span.text-white,
.header:not(.hidden-nav) nav i,
.header:not(.hidden-nav) .text-white {
    color: #ffffff !important;
}

/* Ensure language switcher text is white at top */
.header:not(.hidden-nav) .h-5.w-px {
    background-color: rgba(255, 255, 255, 0.5) !important;
}

/* Ensure background stays gradient when at top - قاعدة قوية لضمان الخلفية المتدرجة */
.header:not(.hidden-nav) {
    background: linear-gradient(135deg, rgba(28, 141, 157, 0.95) 0%, rgba(11, 31, 58, 0.95) 100%) !important;
    backdrop-filter: blur(20px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(200%) !important;
}

/* عند scrolled بدون hidden-nav - الحفاظ على الخلفية المتدرجة */
.header.scrolled:not(.hidden-nav) {
    background: linear-gradient(135deg, rgba(28, 141, 157, 0.98) 0%, rgba(11, 31, 58, 0.98) 100%) !important;
    backdrop-filter: blur(20px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(200%) !important;
}

/* Hero Section */
.hero-section {
    min-height: 90vh;
    display: flex;
    align-items: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1c8d9d 0%, #0b1f3a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .header {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        max-width: calc(100% - 1rem);
        border-radius: 15px;
    }
}

/* Nav Link Active State */
.nav-link.active {
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    padding-bottom: 2px;
}

/* Smooth transitions for header */
.header nav a {
    transition: all 0.2s ease;
}

/* Hover effects for glassmorphism header */
.header nav a:hover {
    transform: translateY(-1px);
}

/* Service Image Effects */
.service-image-container {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* تأثيرات الصورة قبل hover (الحالة العادية) */
.service-image {
    filter: grayscale(30%) brightness(0.85) contrast(0.95) blur(0.5px);
    transform: scale(1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Overlay خفيف في الحالة العادية */
.service-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.3) 0%, rgba(28, 141, 157, 0.2) 100%);
    opacity: 1;
    transition: opacity 0.6s ease;
    z-index: 1;
    border-radius: 0.75rem;
    pointer-events: none;
}

/* تأثير إطار خفيف في الحالة العادية */
.service-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(28, 141, 157, 0.2);
    border-radius: 0.75rem;
    opacity: 1;
    transition: all 0.6s ease;
    z-index: 2;
    pointer-events: none;
    box-shadow: inset 0 0 30px rgba(11, 31, 58, 0.1);
}

/* تأثيرات الصورة بعد hover */
.service-image-container:hover .service-image {
    filter: grayscale(0%) brightness(1.15) contrast(1.15) saturate(1.3) blur(0px);
    transform: scale(1.15);
}

/* إزالة Overlay الداكن عند hover */
.service-image-container:hover::before {
    opacity: 0;
    background: linear-gradient(135deg, rgba(28, 141, 157, 0.1) 0%, rgba(11, 31, 58, 0.1) 100%);
}

/* تأثير إطار ملون عند hover */
.service-image-container:hover::after {
    border-color: rgba(28, 141, 157, 0.6);
    box-shadow: 
        inset 0 0 60px rgba(28, 141, 157, 0.3),
        0 0 30px rgba(28, 141, 157, 0.4);
    opacity: 1;
}

/* تأثير إضافي: خط متوهج في الأسفل عند hover */
.service-image-container {
    background: linear-gradient(to bottom, transparent, rgba(28, 141, 157, 0.05));
    transition: background 0.6s ease;
}

.service-image-container:hover {
    background: linear-gradient(to bottom, transparent, rgba(28, 141, 157, 0.15));
}

/* تأثيرات خاصة لكارد صياغة العقود */
.contracts-image-container .service-image {
    filter: none;
}

.contracts-image-container:hover .service-image {
    filter: brightness(1.1) contrast(1.05);
}

/* Corporate Values - Wave Fill Animation */
.hover-fill-circle,
.center-value-circle {
    position: relative;
    z-index: 1;
}

.hover-fill-circle::before,
.center-value-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #0b1f3a;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    transition: none;
}

.hover-fill-circle:hover::before,
.center-value-circle:hover::before {
    animation: waveFill 1s ease-out forwards;
}

@keyframes waveFill {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    30% {
        opacity: 0.9;
    }
    60% {
        opacity: 0.95;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 1;
    }
}

.hover-fill-circle:hover,
.center-value-circle:hover {
    border-color: rgba(11, 31, 58, 0.7);
}

.hover-fill-circle > *,
.center-value-circle > * {
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}

.hover-fill-circle:hover h3,
.center-value-circle:hover h3 {
    color: #ffffff;
}

.hover-fill-circle:hover p,
.center-value-circle:hover p {
    color: rgba(255, 255, 255, 0.95);
}

