/* Custom CSS for Al Jude Travel */

/* Arabic Font Support */
.font-arabic {
    font-family: 'Tajawal', Arial, sans-serif;
}

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

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

[dir="rtl"] .ml-3 {
    margin-left: 0;
    margin-right: 0.75rem;
}

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

[dir="rtl"] .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

/* Custom 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 backgrounds */
.bg-jordan-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #dc2626 50%, #f59e0b 100%);
}

/* Custom card hover effects */
.destination-card {
    transition: all 0.3s ease;
}

.destination-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

.spinner {
    animation: spin 1s linear infinite;
}

/* Modal styles */
.modal-content {
    max-height: 95vh;
    overflow-y: auto;
}

/* Enhanced modal for larger display */
#hotelModal .bg-white {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#hotelFrame {
    transition: opacity 0.3s ease-in-out;
}

#hotelFrame.loading {
    opacity: 0.5;
}

/* Currency display */
.currency-amount {
    font-weight: 600;
    color: #1e40af;
}

/* Responsive iframe */
.iframe-container {
    position: relative;
    width: 100%;
    height: 80vh;
    border-radius: 0.5rem;
    overflow: hidden;
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Full screen modal adjustments */
@media (min-width: 1024px) {
    #hotelModal .max-w-\[95vw\] {
        max-width: 95vw;
    }
}

/* Mobile modal adjustments */
@media (max-width: 640px) {
    #hotelModal .bg-white {
        margin: 0.5rem;
        max-height: 98vh;
    }
    
    .iframe-container {
        height: 70vh;
    }
}

/* Language toggle animation */
.lang-toggle {
    transition: all 0.3s ease;
}

/* Hero section slideshow styling */
.hero-slideshow {
    width: 100%;
    height: 100%;
}

.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
    transform: scale(1.1);
}

.hero-slideshow .slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-slideshow .slide.next {
    opacity: 0;
    transform: scale(1);
}

/* Slide indicators */
.slide-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-indicator.active span:first-child {
    opacity: 1 !important;
    background-color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

.slide-indicator:hover span:first-child {
    opacity: 1 !important;
}

/* Hero content animations */
.fade-in-up {
    animation: fadeInUp 1s ease-out;
}

/* Navigation arrows styling */
.hero-slideshow ~ button {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-slideshow ~ button:hover {
    background-color: rgba(0, 0, 0, 0.6) !important;
    transform: scale(1.05);
}

/* Responsive hero adjustments */
@media (max-width: 768px) {
    .hero-slideshow .slide {
        background-position: center center;
    }
    
    .slide-indicator {
        margin: 0 0.5rem;
    }
    
    .slide-indicator span:last-child {
        font-size: 0.625rem;
    }
}

/* Ken Burns effect for slides */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.08);
    }
}

.hero-slideshow .slide.active {
    animation: kenBurns 8s ease-out infinite alternate;
}

/* Text shadow for better readability */
#heroTitle, #heroDescription {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    transition: opacity 0.3s ease-in-out;
}

/* Smooth opacity transitions */
.hero-slideshow, #heroTitle, #heroDescription {
    transition: opacity 0.3s ease-in-out;
}

/* Flight Search Section Styling */
#flightSearchWidget {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

#flightSearchWidget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(59, 130, 246, 0.05) 50%, transparent 70%);
    pointer-events: none;
}

/* Flight widget loading state */
#flightSearchWidget:empty::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Flight section cards */
.flight-info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Responsive adjustments for flight section */
@media (max-width: 768px) {
    #flightSearchWidget {
        min-height: 350px;
    }
}

/* Contact card hover effects */
.contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Price display styling */
.price-display {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    display: inline-block;
    font-weight: 600;
}

/* Responsive design improvements */
@media (max-width: 640px) {
    .hero-gradient {
        background-size: 200% 200%;
    }
    
    .destination-card {
        margin-bottom: 1rem;
    }
    
    .iframe-container {
        height: 400px;
    }
}

/* Loading states */
.loading-spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Accessibility improvements */
.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Error states */
.error-message {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.success-message {
    background-color: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}