/* Custom Utilities and Animations */

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #374687;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a366b;
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Custom Blob Animation */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* RTL Specific fixes */
.space-x-reverse> :not([hidden])~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

.mr-rtl-2 {
    margin-left: 0.5rem;
}

/* Service Card Hover Glow */
.service-card {
    position: relative;
    z-index: 1;
}

@property --grad-angle {
    syntax: '<angle>';
    initial-value: 135deg;
    inherits: false;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;

    /* 2. Use the variable for the angle */
    background: linear-gradient(var(--grad-angle), #374687, transparent, #D4AF37);

    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    /* 3. Transition the custom property */
    transition: --grad-angle 0.5s ease;
    z-index: -1;
}

.service-card:hover::after {
    /* 4. Change the angle on hover */
    --grad-angle: 225deg;
}

/* Text Input Direction */
input[type="tel"] {
    direction: ltr;
}

input[type="tel"]::placeholder {
    direction: rtl;
    text-align: right;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 70% at 20% 50%, rgba(55, 70, 135, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 50% at 80% 30%, rgba(201, 168, 76, 0.08) 0%, transparent 60%);
}

.hero-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(55, 70, 135, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55, 70, 135, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.07;
    animation: floatShape 8s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #374687;
    border-radius: 50%;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: #c9a84c;
    bottom: 10%;
    right: 5%;
    animation-delay: -3s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: #4e5fa8;
    top: 40%;
    left: 10%;
    animation-delay: -5s;
}

.shape-4 {
    width: 80px;
    height: 80px;
    background: #c9a84c;
    top: 20%;
    right: 25%;
    animation-delay: -2s;
    border-radius: 20px;
    transform: rotate(45deg);
    opacity: .1;
}

@keyframes floatShape {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
    }
}