/* AL JUDE Travel Agency - Custom Styles */

/* RTL Support */
[dir="rtl"] {
    font-family: 'Noto Sans Arabic', sans-serif;
}

[dir="ltr"] {
    font-family: 'Inter', sans-serif;
}

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

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

::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #B8941F;
}

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

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

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Hero Section Enhancements */
#home {
    position: relative;
}

/* Background Slideshow */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.slide.active {
    opacity: 1;
    visibility: visible;
}

/* Enhanced animations for luxury hotel photos */
.slide.active {
    animation: luxuryZoom 20s ease-in-out infinite;
}

@keyframes luxuryZoom {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: brightness(1);
    }
    25% {
        transform: scale(1.03) rotate(0.2deg);
        filter: brightness(1.05);
    }
    50% {
        transform: scale(1.08) rotate(0deg);
        filter: brightness(1.1);
    }
    75% {
        transform: scale(1.03) rotate(-0.2deg);
        filter: brightness(1.05);
    }
}

/* Special animation for hotel slides */
.slide[data-title*="Hotel"].active,
.slide[data-title*="Pullman"].active,
.slide[data-title*="Address"].active,
.slide[data-title*="Fairmont"].active {
    animation: hotelShowcase 18s ease-in-out infinite;
}

@keyframes hotelShowcase {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1) contrast(1);
    }
    33% {
        transform: scale(1.06);
        filter: brightness(1.08) contrast(1.1);
    }
    66% {
        transform: scale(1.12);
        filter: brightness(1.15) contrast(1.2);
    }
}

/* Slide Indicators */
.slide-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.slide-indicator.active {
    background: #D4AF37;
    border-color: #D4AF37;
    transform: scale(1.2);
}

.slide-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Slide titles (optional overlay) */
.slide::after {
    content: attr(data-title);
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.slide.active::after {
    opacity: 1;
}

/* Enhanced loading for background images */
.slide {
    background-attachment: fixed;
}

/* Hero content enhancement */
.hero-content {
    position: relative;
    z-index: 15;
    animation: heroFadeInUp 1.5s ease-out;
}

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

/* Slideshow loading animation */
.slideshow-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #1e3a8a, #006633, #D4AF37);
    background-size: 400% 400%;
    animation: gradientShift 3s ease-in-out;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Progress bar for slideshow */
.slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #D4AF37, #B8941F);
    width: 0%;
    animation: slideProgress 5s linear infinite;
    z-index: 25;
    opacity: 0.8;
}

@keyframes slideProgress {
    from { width: 0%; }
    to { width: 100%; }
}

/* Fallback CSS-only slideshow animation */
.slideshow-container.css-slideshow .slide {
    animation-duration: 20s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.slideshow-container.css-slideshow .slide:nth-child(1) {
    animation-name: slideAnimation;
    animation-delay: 0s;
}

.slideshow-container.css-slideshow .slide:nth-child(2) {
    animation-name: slideAnimation;
    animation-delay: 4s;
}

.slideshow-container.css-slideshow .slide:nth-child(3) {
    animation-name: slideAnimation;
    animation-delay: 8s;
}

.slideshow-container.css-slideshow .slide:nth-child(4) {
    animation-name: slideAnimation;
    animation-delay: 12s;
}

.slideshow-container.css-slideshow .slide:nth-child(5) {
    animation-name: slideAnimation;
    animation-delay: 16s;
}

@keyframes slideAnimation {
    0%, 15% { opacity: 1; visibility: visible; }
    20%, 100% { opacity: 0; visibility: hidden; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .slide {
        background-attachment: scroll;
    }
    
    .slide::after {
        font-size: 12px;
        padding: 6px 12px;
        bottom: 80px;
    }
    
    .slide-indicator {
        width: 10px;
        height: 10px;
    }
    
    .hero-content {
        animation-delay: 0.5s;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .slide,
    .hero-content,
    .slide-indicator {
        animation: none !important;
        transition: none !important;
    }
    
    .slideshow-container::before {
        animation: none;
    }
}

/* Islamic Pattern Background */
.islamic-pattern {
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(212, 175, 55, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 75px 75px, rgba(212, 175, 55, 0.1) 2px, transparent 2px);
    background-size: 100px 100px;
}

/* Package Cards Enhancement */
.package-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.package-card::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: left 0.5s;
}

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

/* Hotel Cards */
.hotel-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.hotel-card:hover {
    border-color: #D4AF37;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Star Rating */
.star-rating {
    color: #D4AF37;
    font-size: 0.9rem;
}

/* Distance Badge */
.distance-badge {
    background: linear-gradient(135deg, #006633, #00804d);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Contact Form Enhancements */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    outline: none;
}

/* Button Enhancements */
.btn-primary {
    background: linear-gradient(135deg, #D4AF37, #B8941F);
    position: relative;
    overflow: hidden;
}

.btn-primary::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: left 0.5s;
}

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

.btn-secondary {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
}

.btn-success {
    background: linear-gradient(135deg, #006633, #00804d);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal Enhancements */
.modal-backdrop {
    backdrop-filter: blur(5px);
}

.modal-content {
    animation: fadeInUp 0.3s ease-out;
}

/* Language Toggle */
#langToggle {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Navigation Enhancements */
nav {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Mobile Menu */
#mobileMenu {
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#mobileMenu a {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#mobileMenu a:last-child {
    border-bottom: none;
}

/* Mobile Menu Toggle Animation */
#mobileMenuToggle i {
    transition: transform 0.3s ease;
}

#mobileMenuToggle:hover i {
    transform: rotate(90deg);
}

/* Section Spacing */
section {
    scroll-margin-top: 100px;
}

/* Typography Enhancements */
.arabic-text {
    font-family: 'Noto Sans Arabic', sans-serif;
    line-height: 1.8;
}

.english-text {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #D4AF37, #B8941F);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Islamic Border */
.islamic-border {
    border: 2px solid;
    border-image: linear-gradient(45deg, #D4AF37, #006633, #1e3a8a) 1;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.25rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
}

/* RTL Specific Styles */
[dir="rtl"] .slide-in-right {
    animation: slideInLeft 0.8s ease-out;
}

[dir="rtl"] .slide-in-left {
    animation: slideInRight 0.8s ease-out;
}

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

[dir="rtl"] .flex-row-reverse {
    flex-direction: row-reverse;
}

/* Price Display Enhancement */
.price-display {
    position: relative;
}

.price-display::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #D4AF37, transparent);
}

/* Package Comparison */
.package-popular {
    position: relative;
    border: 3px solid #D4AF37;
}

.package-popular::after {
    content: 'الأكثر طلباً';
    position: absolute;
    top: -12px;
    right: 20px;
    background: #D4AF37;
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

[dir="ltr"] .package-popular::after {
    content: 'Most Popular';
    right: 20px;
}

/* Testimonial Styles */
.testimonial-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(255, 255, 255, 0.9));
    border-left: 4px solid #D4AF37;
}

[dir="rtl"] .testimonial-card {
    border-left: none;
    border-right: 4px solid #D4AF37;
}

/* Service Icons */
.service-icon {
    transition: all 0.3s ease;
}

.service-icon:hover {
    transform: scale(1.1) rotate(5deg);
    color: #D4AF37;
}

/* Footer Enhancements */
footer {
    background: linear-gradient(135deg, #1a202c, #2d3748);
}

/* Accessibility Improvements */
.focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

/* Orange Hero Text Enhancement */
.text-orange-500 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), 0 0 8px rgba(0, 0, 0, 0.6) !important;
    font-weight: 700 !important;
}

/* Package Cards Text Enhancement */
#packages .bg-islamic-green,
#packages .bg-islamic-gold, 
#packages .bg-islamic-blue {
    color: white !important;
}

#packages .bg-islamic-green *,
#packages .bg-islamic-gold *, 
#packages .bg-islamic-blue * {
    color: white !important;
}

/* Package content areas with strong white background */
#packages .bg-white\/98 {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

/* Force solid white background for package content */
#packages [style*="background-color: rgba(255, 255, 255, 0.98)"] {
    background-color: #ffffff !important;
}

/* Ensure all package text colors are correct */
#packages .text-gray-700 {
    color: #374151 !important;
}

#packages .text-islamic-gold {
    color: #D4AF37 !important;
}

#packages .text-islamic-blue {
    color: #1e3a8a !important;
}

#packages .text-islamic-green {
    color: #006633 !important;
}

/* Show All Packages Button Styling */
.show-packages-btn {
    background: linear-gradient(135deg, #D4AF37, #B8941F);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.show-packages-btn:hover {
    background: linear-gradient(135deg, #B8941F, #9A7A1A);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.show-packages-btn:active {
    transform: translateY(0);
}

/* PDF Icon styling */
.show-packages-btn .fa-file-pdf {
    color: #ffffff;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-islamic-gold {
        background-color: #000000 !important;
        color: #ffffff !important;
    }
    
    .text-islamic-gold {
        color: #000000 !important;
    }
    
    .text-orange-500 {
        color: #000000 !important;
        background-color: #ffffff !important;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-bounce {
        animation: none;
    }
}

/* Logo Styling */
.logo-hero {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    animation: fadeInScale 1s ease-out;
}

.logo-hero:hover {
    transform: scale(1.05);
}

.logo-nav {
    transition: all 0.3s ease;
}

.logo-nav:hover {
    transform: scale(1.1);
}

.logo-footer {
    transition: transform 0.3s ease;
}

.logo-footer:hover {
    transform: rotate(5deg) scale(1.05);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Logo Loading State */
.logo-loading {
    background: linear-gradient(45deg, #D4AF37, #006633);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Custom Utilities */
.bg-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 102, 51, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(30, 58, 138, 0.1) 0%, transparent 50%);
}

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

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Spacing Utilities */
.space-y-12 > * + * {
    margin-top: 3rem;
}

.space-x-12 > * + * {
    margin-left: 3rem;
}

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

/* Interactive Elements */
.interactive-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.interactive-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.interactive-card:active {
    transform: translateY(-2px) scale(1.01);
}

/* Image Enhancement Animations */
.section-image {
    transition: all 0.5s ease;
    filter: brightness(1) contrast(1) saturate(1);
}

.section-image:hover {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.1) saturate(1.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Package background images */
.package-bg {
    transition: all 0.7s ease;
}

.group:hover .package-bg {
    transform: scale(1.1);
    opacity: 0.3;
}

/* Enhanced package cards with visible backgrounds */
.package-card {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.package-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
    filter: brightness(0.8) contrast(1.2);
}

.group:hover .package-bg-img {
    transform: scale(1.08);
    filter: brightness(1) contrast(1.3);
}

/* Enhanced visibility for package backgrounds */
.package-card .absolute {
    z-index: 1;
}

.package-card .relative.z-10 {
    z-index: 10;
}

/* Enhanced text readability */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Package card content area with enhanced background */
.package-content {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Enhanced contrast for Arabic text */
.lang-ar {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Better text contrast in package cards */
.package-card .text-gray-700 {
    color: rgb(55, 65, 81) !important;
    font-weight: 500;
}

/* Enhanced readability for package headers */
.package-header {
    background: linear-gradient(135deg, var(--header-color-1), var(--header-color-2));
    position: relative;
    z-index: 20;
}

.package-header h3,
.package-header p {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 1px 1px 3px rgba(0, 0, 0, 0.6);
    color: white !important;
    font-weight: bold;
}

/* Hotel showcase images */
.hotel-showcase img {
    transition: all 0.4s ease;
}

.hotel-showcase img:hover {
    transform: translateY(-5px) scale(1.1);
    filter: brightness(1.2);
}

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

.floating-image {
    animation: float 6s ease-in-out infinite;
}

/* Image reveal animation */
@keyframes imageReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reveal-image {
    animation: imageReveal 1s ease-out;
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
}

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

/* Custom Checkbox and Radio Styles */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #D4AF37;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.custom-checkbox:checked {
    background-color: #D4AF37;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.warning {
    background-color: #f59e0b;
}

[dir="rtl"] .notification {
    right: auto;
    left: 20px;
    transform: translateX(-100%);
}

[dir="rtl"] .notification.show {
    transform: translateX(0);
}