/* Global Styles */
* {
    transition: all 0.3s ease;
}

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

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

/* Language-specific styling */
body[data-lang="ar"] {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
}

body[data-lang="en"] {
    font-family: 'Inter', sans-serif;
    direction: ltr;
    text-align: left;
}

/* RTL Navigation adjustments */
body[data-lang="ar"] .flex.space-x-3 {
    flex-direction: row-reverse;
}

body[data-lang="ar"] .flex.space-x-4 {
    flex-direction: row-reverse;
}

body[data-lang="ar"] .space-x-3 > * + * {
    margin-left: 0;
    margin-right: 0.75rem;
}

body[data-lang="ar"] .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

body[data-lang="ar"] .space-x-6 > * + * {
    margin-left: 0;
    margin-right: 1.5rem;
}

/* Hero Section Background */
.hero-bg {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.6), rgba(20, 184, 166, 0.5), rgba(59, 130, 246, 0.3)),
                url('../images/hero-luxury-hotel.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Hero Section Enhancements */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(20, 184, 166, 0.1));
    z-index: 1;
}

/* Floating elements decoration */
.hero-bg::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 50%;
    animation: float 4s ease-in-out infinite;
    z-index: 1;
}

.hero-bg > * {
    position: relative;
    z-index: 2;
}

/* Hero text shadow for better readability */
.hero-bg h1, .hero-bg p {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* Hero section animations */
.hero-bg h1 {
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-bg p {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.hero-bg .bg-white {
    animation: fadeInUp 1s ease-out 1.1s both;
}

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

.hero-bg .bg-white.bg-opacity-25 {
    animation: fadeInUp 1s ease-out 1.1s both, float 3s ease-in-out infinite 2s;
}

/* Responsive hero background */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
        min-height: 80vh;
    }
    
    .hero-bg h1 {
        font-size: 3rem;
    }
    
    .hero-bg p {
        font-size: 1.25rem;
    }
}

/* Hotel Cards */
.hotel-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hotel-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    padding: 2rem;
    text-align: center;
    color: white;
}

.hotel-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hotel-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.hotel-location {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
}

/* Pricing Table */
.pricing-table {
    overflow-x: auto;
}

.pricing-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pricing-table th {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 1rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    border-bottom: 2px solid #3b82f6;
}

.pricing-table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.pricing-table tr:nth-child(even) {
    background-color: #f8fafc;
}

.pricing-table tr:hover {
    background-color: #e0f2fe;
}

.price-highlight {
    font-weight: 700;
    color: #1d4ed8;
}

/* Currency Badge */
.currency-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

body[data-lang="ar"] .currency-badge {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Book Now Button */
.book-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
    text-decoration: none;
    color: white;
}

/* View Hotel Button */
.view-hotel-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.view-hotel-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
    text-decoration: none;
    color: white;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hotel-title {
        font-size: 1.5rem;
    }
    
    .hotel-subtitle {
        font-size: 1rem;
    }
    
    .pricing-table {
        font-size: 0.9rem;
    }
    
    .pricing-table th,
    .pricing-table td {
        padding: 0.5rem;
    }
}

/* Features Section Icons Animation */
.feature-icon {
    transition: transform 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1);
}

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 4px;
}

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

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* Currency Converter Indicator */
.currency-loading {
    position: relative;
}

.currency-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 0.8s linear infinite;
}

/* RTL Currency loading position */
body[data-lang="ar"] .currency-loading::after {
    right: auto;
    left: 30px;
}

/* Enhanced Mobile Experience */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .hotel-card {
        margin-bottom: 2rem;
    }
    
    .pricing-table {
        font-size: 0.8rem;
    }
}

/* Filter Buttons */
.filter-btn {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 2px solid transparent;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.filter-btn:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #475569;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-color: #1d4ed8;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Search Input */
#search-input {
    min-width: 250px;
    font-size: 0.9rem;
}

body[data-lang="ar"] #search-input {
    text-align: right;
}

/* Hotel Grid Layout */
#hotels-container {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    #hotels-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Hotel Card Animations */
.hotel-card.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.hotel-card.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Location Badge */
.location-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body[data-lang="ar"] .location-badge {
    right: auto;
    left: 1rem;
}

/* Statistics Section */
.stats-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* Enhanced Hotel Card */
.hotel-card {
    position: relative;
    overflow: visible;
}

.hotel-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8, #7c3aed, #f59e0b);
    border-radius: 22px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hotel-card:hover::before {
    opacity: 0.1;
}

/* Star Rating */
.star-rating {
    color: #fbbf24;
    margin-left: 0.5rem;
}

body[data-lang="ar"] .star-rating {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Responsive Filter Buttons */
@media (max-width: 640px) {
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    #search-input {
        min-width: 200px;
    }
}

/* Loading State for Search */
.searching {
    opacity: 0.6;
    pointer-events: none;
}

.search-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 0.8s linear infinite;
}

body[data-lang="ar"] .search-loading::after {
    right: auto;
    left: 15px;
}

/* Print Styles */
@media print {
    .no-print, .filter-btn, #search-input, #search-btn {
        display: none;
    }
    
    .hotel-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        margin-bottom: 1rem;
    }
    
    #hotels-container {
        grid-template-columns: 1fr;
    }
}

/* Booking Modal Styles */
#booking-modal {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#booking-modal .bg-white {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

#booking-form input:focus,
#booking-form select:focus,
#booking-form textarea:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#booking-form input[type="date"] {
    color-scheme: light;
}

[data-lang="ar"] #booking-form input[type="date"] {
    direction: ltr;
    text-align: left;
}

/* Modal animations */
#booking-modal.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

#booking-modal:not(.hidden) {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

/* Form validation styles */
#booking-form input:invalid {
    border-color: #ef4444;
}

#booking-form input:valid {
    border-color: #10b981;
}

/* WhatsApp button hover effect */
#booking-form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Responsive modal */
@media (max-width: 640px) {
    #booking-modal .max-w-2xl {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    #booking-modal .p-6 {
        padding: 1rem;
    }
    
    #booking-form .grid {
        grid-template-columns: 1fr;
    }
}