/* Custom Styles for Glassmorphism and Animations */

/* Glass Card Effect */
.glass-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(239, 68, 68, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.6);
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

.animate-slide-up-delay {
    animation: slideUp 0.8s ease-out 0.2s both;
}

.animate-slide-up-delay-2 {
    animation: slideUp 0.8s ease-out 0.4s both;
}

/* Scroll animations */
.animate-in {
    animation: slideUp 0.6s ease-out;
}

/* Initial state for scroll animations - Elements are visible by default */
section,
.glass-card,
.product-card {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only apply animation when element comes into view */
section.animate-in,
.glass-card.animate-in,
.product-card.animate-in {
    animation: slideUp 0.6s ease-out;
}

/* Product cards hover effect */
.product-card {
    position: relative;
    overflow: hidden;
}

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

.product-card:hover::before {
    left: 100%;
}

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
}

/* Fix logo blur issue - ensure logo is sharp */
.logo-wrapper {
    position: relative;
    z-index: 10;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.logo-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: auto;
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: auto;
}

/* Modal animations and centering */
#productModal,
#bookingModal,
#paymentModal {
    animation: fadeIn 0.3s ease-out;
}

/* When modal is visible (not hidden), ensure it's flex and centered */
#productModal:not(.hidden),
#bookingModal:not(.hidden),
#paymentModal:not(.hidden) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#productModal .glass-card,
#bookingModal .glass-card,
#paymentModal .glass-card {
    animation: slideUp 0.3s ease-out;
    margin: auto; /* Center the modal content */
    position: relative;
}

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

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Text selection */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: white;
}

/* Input focus effects */
input:focus,
textarea:focus {
    background: rgba(255, 255, 255, 0.15) !important;
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* Shine effect */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shine-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

/* Smooth transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

