/* Custom animations and utilities */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Premium gradient animation */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] .ml-2 { margin-left: 0; margin-right: 0.5rem; }
[dir="rtl"] .mr-2 { margin-right: 0; margin-left: 0.5rem; }
[dir="rtl"] .ml-4 { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .mr-4 { margin-right: 0; margin-left: 1rem; }
[dir="rtl"] .ml-10 { margin-left: 0; margin-right: 2.5rem; }

/* Dropdown menu styling */
.dropdown-menu {
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
}

.group:hover .dropdown-menu {
    transform: translateY(0);
}

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

/* Property thumbnail active state */
.property-thumb.active {
    border: 2px solid #4169E1;
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.3);
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: #4169E1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1E3A8A;
}

/* Current page highlighting */
.nav-link.current-page {
    color: #4169E1 !important;
    font-weight: 600;
    border-bottom: 2px solid #4169E1;
}

.nav-link.current-page:hover {
    color: #1E3A8A !important;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4169E1;
}

/* Dark mode current page highlighting */
.dark .nav-link.current-page {
    color: #FFD700 !important;
    border-bottom: 2px solid #FFD700;
}

.dark .nav-link.current-page:hover {
    color: #FFEC8B !important;
}

/* Responsive text */
@media (max-width: 640px) {
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Premium card hover effect */
.card-premium {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

/* Card hyperlink alignment fixes */
.card-link {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

.card-link-inline {
    display: inline-flex;
    align-items: center;
}

/* Hover effects */
.hover-lift:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
}

/* Premium hover effects */
.hover-premium {
    transition: all 0.3s ease;
}

.hover-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(65, 105, 225, 0.15);
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Premium button hover effect */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-premium::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-premium:hover::before {
    left: 100%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.2);
}

/* Transition utilities */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Premium transitions */
.transition-premium {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.transform-premium {
    transform: perspective(1000px) rotateY(0deg);
    transition: transform 0.5s ease;
}

.transform-premium:hover {
    transform: perspective(1000px) rotateY(5deg);
}

/* Floating elements */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* Pulse effect */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(65, 105, 225, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(65, 105, 225, 0); }
    100% { box-shadow: 0 0 0 0 rgba(65, 105, 225, 0); }
}

/* Shine effect */
.shine {
    position: relative;
    overflow: hidden;
}

.shine::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.shine:hover::before {
    left: 100%;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
    background: rgba(31, 41, 55, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, #4169E1, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Diagonal stripes */
.diagonal-stripes {
    background-image: repeating-linear-gradient(
        45deg,
        rgba(65, 105, 225, 0.1),
        rgba(65, 105, 225, 0.1) 10px,
        rgba(65, 105, 225, 0.2) 10px,
        rgba(65, 105, 225, 0.2) 20px
    );
}

/* Zigzag border */
.zigzag-border {
    position: relative;
}

.zigzag-border::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: linear-gradient(135deg, transparent 25%, #4169E1 25%, #4169E1 50%, transparent 50%, transparent 75%, #4169E1 75%);
    background-size: 20px 10px;
}

/* Dots pattern */
.dots-pattern {
    background-image: radial-gradient(#4169E1 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Wave animation */
.wave {
    animation: wave 2s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100px); }
}

/* Neon glow */
.neon-glow {
    box-shadow: 0 0 5px #4169E1, 0 0 10px #4169E1, 0 0 15px #4169E1, 0 0 20px #4169E1;
}

/* Text shadow effect */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Border animation */
.border-animation {
    position: relative;
}

.border-animation::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #4169E1;
    box-sizing: border-box;
    transform: scale(1);
    transition: transform 0.3s ease;
    pointer-events: none;
}

.border-animation:hover::before {
    transform: scale(1.05);
}

/* Overlay effect */
.overlay-effect::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.5));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-effect:hover::before {
    opacity: 1;
}

/* Zoom effect */
.zoom-effect {
    overflow: hidden;
}

.zoom-effect img {
    transition: transform 0.5s ease;
}

.zoom-effect:hover img {
    transform: scale(1.1);
}