/* Custom CSS for Jude Travel */

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

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

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

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* 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;
}

/* Filter Buttons */
.filter-btn {
    background: white;
    color: #1B2B4A;
    border: 2px solid #e5e7eb;
}

.filter-btn:hover,
.filter-btn.active {
    background: #D4AF37;
    color: #1B2B4A;
    border-color: #D4AF37;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

/* Hotel Cards */
.hotel-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    transform: translateY(0);
}

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

.hotel-card .image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.hotel-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hotel-card:hover .image-container img {
    transform: scale(1.1);
}

.hotel-card .star-rating {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(212, 175, 55, 0.95);
    color: #1B2B4A;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.hotel-card .location-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(27, 43, 74, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.hotel-card .card-content {
    padding: 24px;
}

.hotel-card .hotel-name {
    font-size: 20px;
    font-weight: 700;
    color: #1B2B4A;
    margin-bottom: 8px;
    line-height: 1.3;
}

.hotel-card .hotel-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.price-item {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #D4AF37;
}

.price-item .price-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}

.price-item .price-range {
    font-size: 14px;
    font-weight: 700;
    color: #1B2B4A;
}

.hotel-card .action-buttons {
    display: flex;
    gap: 12px;
}

.btn-primary {
    flex: 1;
    background: #D4AF37;
    color: #1B2B4A;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #B8941F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    flex: 1;
    background: transparent;
    color: #1B2B4A;
    padding: 12px 16px;
    border: 2px solid #1B2B4A;
    border-radius: 8px;
    font-weight: 600;
    text-center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #1B2B4A;
    color: white;
    transform: translateY(-2px);
}

/* Special Badges */
.special-badge {
    display: inline-block;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

.adults-only-badge {
    background: #8b5cf6;
}

.limited-time-badge {
    background: #f59e0b;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #D4AF37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hotel-card .card-content {
        padding: 20px;
    }
    
    .hotel-card .hotel-name {
        font-size: 18px;
    }
    
    .price-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .hotel-card .action-buttons {
        flex-direction: column;
    }
}

/* Fade Animation for Filter */
.hotel-card.fade-out {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

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

/* Back to Top Button */
#scroll-to-top {
    transition: all 0.3s ease;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Hero Section Enhancements */
.hero-gradient {
    background: linear-gradient(135deg, #1B2B4A 0%, #2563eb 50%, #1B2B4A 100%);
}

/* Meal Plan Badges */
.meal-plan {
    display: inline-block;
    background: #10b981;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-top: 8px;
}

.meal-plan.uai {
    background: #10b981; /* Green for Ultra All Inclusive */
}

.meal-plan.ai {
    background: #3b82f6; /* Blue for All Inclusive */
}

.meal-plan.hb {
    background: #f59e0b; /* Orange for Half Board */
}

.meal-plan.bb {
    background: #6b7280; /* Gray for Bed & Breakfast */
}

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

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

/* Price Table Styles */
.price-table-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #e5e7eb;
}

.price-table {
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

.price-table th {
    background: rgba(212, 175, 55, 0.2);
    color: #1B2B4A;
    font-weight: 600;
    text-align: center;
    padding: 12px 8px;
    border-bottom: 2px solid #D4AF37;
}

.price-table th:first-child {
    text-align: left;
    width: 25%;
}

.price-table td {
    padding: 10px 8px;
    border-right: 1px solid #e5e7eb;
}

.price-table td:last-child {
    border-right: none;
}

.price-table tbody tr:hover {
    background-color: #f0f9ff;
}

.price-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.price-table tbody tr:nth-child(even):hover {
    background-color: #f0f9ff;
}

/* Responsive Price Table */
@media (max-width: 768px) {
    .price-table-container {
        padding: 12px;
    }
    
    .price-table {
        font-size: 11px;
    }
    
    .price-table th,
    .price-table td {
        padding: 8px 4px;
    }
    
    .overflow-x-auto {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Price highlight animation */
.price-table td {
    transition: all 0.2s ease;
}

.price-table tbody tr:hover td {
    transform: scale(1.02);
    font-weight: 600;
}

/* Special price styling */
.price-table .child-price {
    color: #2563eb;
    font-weight: 600;
}

/* Language Switcher Styles */
.lang-btn {
    background: transparent;
    color: #1B2B4A;
    border: 2px solid #e5e7eb;
    cursor: pointer;
}

.lang-btn:hover,
.lang-btn.active {
    background: #D4AF37;
    color: #1B2B4A;
    border-color: #D4AF37;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

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

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

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

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

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

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

/* Arabic Font Support */
[dir="rtl"] .font-playfair {
    font-family: 'Amiri', 'Times New Roman', serif;
}

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

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

/* Price Table RTL */
[dir="rtl"] .price-table th:first-child {
    text-align: right;
}

/* Filter buttons RTL */
[dir="rtl"] .flex-wrap {
    flex-direction: row-reverse;
}

/* Language transition */
.lang-transition {
    transition: all 0.3s ease;
    opacity: 1;
}

.lang-transition.changing {
    opacity: 0;
}

/* Hide/Show based on language */
.lang-en[style*="display: none"],
.lang-ar[style*="display: none"] {
    display: none !important;
}

/* Booking Modal Styles */
#booking-modal {
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

#booking-modal .bg-white {
    animation: slideInUp 0.4s ease-out;
}

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

/* Form Input Styles */
#booking-form input,
#booking-form select,
#booking-form textarea {
    transition: all 0.2s ease;
}

#booking-form input:focus,
#booking-form select:focus,
#booking-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* Custom Select Arrow */
#booking-form select {
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
}

/* Form Validation */
#booking-form input:invalid,
#booking-form select:invalid {
    border-color: #ef4444;
}

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

/* Modal Responsive */
@media (max-width: 768px) {
    #booking-modal .max-w-2xl {
        max-width: 95vw;
        margin: 10px;
    }
    
    #booking-modal .p-6 {
        padding: 20px;
    }
    
    #booking-form .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    #booking-form .grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

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

.form-loading button[type="submit"] {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Success Message */
.success-message {
    background: #dcfce7;
    border: 2px solid #16a34a;
    color: #166534;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}