/* Day & Night Apartments - Custom Styles */
/* Luxury White & Gold Theme with Modern Animations */
/* Supports both English (LTR) and Arabic (RTL) */

/* ===========================
   CSS Variables
   =========================== */
:root {
    --soft-gold: #D4AF37;
    --gold-hover: #C5A028;
    --slate-grey: #475569;
    --slate-dark: #334155;
    --white: #FFFFFF;
    --light-bg: #F8F9FA;
    --border-color: #E2E8F0;
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--slate-grey);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--slate-dark);
}

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

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

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--soft-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-hover);
}

/* ===========================
   Gold Theme Colors
   =========================== */
.text-gold {
    color: var(--soft-gold);
}

.bg-gold {
    background-color: var(--soft-gold);
}

.border-gold {
    border-color: var(--soft-gold);
}

.hover-gold:hover {
    background-color: var(--gold-hover);
}

/* ===========================
   Button Styles with Premium Animation
   =========================== */
.btn-gold {
    background: var(--soft-gold);
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-gold:hover::before {
    width: 300px;
    height: 300px;
}

.btn-gold:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
}

/* ===========================
   Glassmorphism Effect
   =========================== */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ===========================
   Swiper Custom Styles - Hero
   =========================== */
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--soft-gold);
    background: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.hero-swiper .swiper-pagination-bullet {
    background: var(--slate-grey);
    opacity: 0.5;
    width: 12px;
    height: 12px;
}

.hero-swiper .swiper-pagination-bullet-active {
    background: var(--soft-gold);
    opacity: 1;
    width: 35px;
    border-radius: 6px;
}

/* Hero navigation on mobile */
@media (max-width: 640px) {
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        width: 40px;
        height: 40px;
        background: rgba(212, 175, 55, 0.9);
        color: white;
    }

    .hero-swiper .swiper-button-next:after,
    .hero-swiper .swiper-button-prev:after {
        font-size: 16px;
    }

    .hero-swiper .swiper-button-prev {
        left: 10px;
    }

    .hero-swiper .swiper-button-next {
        right: 10px;
    }
}

/* ===========================
   Swiper Custom Styles - Facilities & Attractions
   =========================== */
.facilities-swiper .swiper-button-next,
.facilities-swiper .swiper-button-prev,
.attractions-swiper .swiper-button-next,
.attractions-swiper .swiper-button-prev {
    color: var(--soft-gold);
    background: rgba(255, 255, 255, 0.95);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.facilities-swiper .swiper-button-next:hover,
.facilities-swiper .swiper-button-prev:hover,
.attractions-swiper .swiper-button-next:hover,
.attractions-swiper .swiper-button-prev:hover {
    background: var(--soft-gold);
    color: white;
    transform: scale(1.1);
}

.facilities-swiper .swiper-button-next:after,
.facilities-swiper .swiper-button-prev:after,
.attractions-swiper .swiper-button-next:after,
.attractions-swiper .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

.facilities-swiper .swiper-pagination-bullet,
.attractions-swiper .swiper-pagination-bullet {
    background: var(--slate-grey);
    opacity: 0.5;
}

.facilities-swiper .swiper-pagination-bullet-active,
.attractions-swiper .swiper-pagination-bullet-active {
    background: var(--soft-gold);
    opacity: 1;
}

/* Make navigation arrows more visible on mobile */
@media (max-width: 640px) {
    .facilities-swiper .swiper-button-next,
    .facilities-swiper .swiper-button-prev,
    .attractions-swiper .swiper-button-next,
    .attractions-swiper .swiper-button-prev {
        width: 36px;
        height: 36px;
        background: rgba(212, 175, 55, 0.9);
        color: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .facilities-swiper .swiper-button-next:after,
    .facilities-swiper .swiper-button-prev:after,
    .attractions-swiper .swiper-button-next:after,
    .attractions-swiper .swiper-button-prev:after {
        font-size: 14px;
    }

    .facilities-swiper .swiper-button-prev,
    .attractions-swiper .swiper-button-prev {
        left: 5px;
    }

    .facilities-swiper .swiper-button-next,
    .attractions-swiper .swiper-button-next {
        right: 5px;
    }
}

/* ===========================
   Gallery Swiper Styles
   =========================== */
.gallery-swiper .swiper-button-next,
.gallery-swiper .swiper-button-prev {
    color: var(--soft-gold);
    background: rgba(255, 255, 255, 0.95);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-swiper .swiper-button-next:hover,
.gallery-swiper .swiper-button-prev:hover {
    background: var(--soft-gold);
    color: white;
    transform: scale(1.1);
}

.gallery-swiper .swiper-button-next:after,
.gallery-swiper .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.gallery-swiper .swiper-pagination-bullet {
    background: var(--slate-grey);
    opacity: 0.5;
    width: 10px;
    height: 10px;
}

.gallery-swiper .swiper-pagination-bullet-active {
    background: var(--soft-gold);
    opacity: 1;
}

@media (max-width: 640px) {
    .gallery-swiper .swiper-button-next,
    .gallery-swiper .swiper-button-prev {
        width: 38px;
        height: 38px;
        background: rgba(212, 175, 55, 0.9);
        color: white;
    }

    .gallery-swiper .swiper-button-next:after,
    .gallery-swiper .swiper-button-prev:after {
        font-size: 14px;
    }

    .gallery-swiper .swiper-button-prev {
        left: 5px;
    }

    .gallery-swiper .swiper-button-next {
        right: 5px;
    }
}

/* ===========================
   Lightbox Styles
   =========================== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-close:hover {
    background: var(--soft-gold);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--soft-gold);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-caption {
    color: white;
    font-size: 18px;
    font-weight: 500;
    margin-top: 20px;
    text-align: center;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 8px;
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        font-size: 14px;
        padding: 0 50px;
    }
}

/* ===========================
   Hero Text Animation
   =========================== */
.hero-title {
    animation: slideUp 1s ease-out forwards;
}

.hero-subtitle {
    animation: slideUp 1s ease-out 0.3s forwards;
    opacity: 0;
}

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

/* ===========================
   Header Shadow on Scroll
   =========================== */
.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ===========================
   Mobile Menu (LTR - English)
   =========================== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* ===========================
   Modern Flatpickr Calendar Styling
   =========================== */
.flatpickr-calendar {
    width: 640px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    border: none !important;
}

/* Larger date cells for better touch targets */
.flatpickr-day {
    height: 48px !important;
    line-height: 48px !important;
    max-width: 48px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    margin: 2px !important;
    border: none !important;
}

/* Start date - full gold with left rounded corners (LTR) */
.flatpickr-day.startRange {
    background: var(--soft-gold) !important;
    color: white !important;
    border-radius: 8px 0 0 8px !important;
}

/* End date - full gold with right rounded corners (LTR) */
.flatpickr-day.endRange {
    background: var(--soft-gold) !important;
    color: white !important;
    border-radius: 0 8px 8px 0 !important;
}

/* In-range dates - light gold background */
.flatpickr-day.inRange {
    background: rgba(212, 175, 55, 0.15) !important;
    border-radius: 0 !important;
    color: var(--slate-dark) !important;
}

/* Both start and end (single night stay) */
.flatpickr-day.startRange.endRange {
    border-radius: 8px !important;
}

/* Selected single date */
.flatpickr-day.selected {
    background: var(--soft-gold) !important;
    color: white !important;
    border-radius: 8px !important;
}

/* Hover effect with scale animation */
.flatpickr-day:hover:not(.flatpickr-disabled) {
    background: rgba(212, 175, 55, 0.2) !important;
    transform: scale(1.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Today indicator with gold border */
.flatpickr-day.today {
    border: 2px solid var(--soft-gold) !important;
    font-weight: 600 !important;
}

/* Month header styling */
.flatpickr-months {
    padding: 10px 0 !important;
    background: white !important;
}

.flatpickr-months .flatpickr-month {
    background: white !important;
    color: var(--slate-dark) !important;
}

.flatpickr-current-month {
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 10px 0 !important;
    color: var(--slate-dark) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: white !important;
    color: var(--slate-dark) !important;
}

/* Navigation arrows */
.flatpickr-prev-month,
.flatpickr-next-month {
    padding: 12px !important;
    fill: var(--soft-gold) !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    fill: var(--gold-hover) !important;
}

/* Weekday headers */
.flatpickr-weekdays {
    background: white !important;
    padding: 10px 0 !important;
}

.flatpickr-weekday {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--slate-grey) !important;
}

/* Disabled dates */
.flatpickr-day.flatpickr-disabled {
    color: #cbd5e1 !important;
    cursor: not-allowed !important;
}

/* Mobile responsive adjustments for Flatpickr */
@media (max-width: 768px) {
    .flatpickr-calendar {
        width: 100% !important;
        max-width: 380px !important;
        padding: 15px !important;
    }

    .flatpickr-day {
        height: 40px !important;
        line-height: 40px !important;
        max-width: 40px !important;
        font-size: 14px !important;
    }

    .flatpickr-current-month {
        font-size: 16px !important;
    }
}

/* ===========================
   Input Styles
   =========================== */
input[type="text"],
input[type="date"],
select {
    color: var(--slate-dark) !important;
}

input::placeholder {
    color: #94a3b8 !important;
}

.flatpickr-input {
    color: var(--slate-dark) !important;
}

/* ===========================
   Card Hover Effects
   =========================== */
.card-hover {
    transition: all 0.3s ease;
}

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

/* ===========================
   Image Hover Zoom
   =========================== */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* ===========================
   Luxury Divider
   =========================== */
.luxury-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--soft-gold), transparent);
    margin: 1.5rem auto;
}

/* ===========================
   Text Selection
   =========================== */
::selection {
    background-color: var(--soft-gold);
    color: white;
}

/* ===========================
   Premium Floating Animation
   =========================== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

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

/* ===========================
   Icon Pulse Animation
   =========================== */
@keyframes pulse-soft {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.icon-pulse:hover {
    animation: pulse-soft 0.6s ease-in-out;
}

/* ===========================
   Responsive Design Utilities
   =========================== */
@media (max-width: 640px) {
    .hero-title {
        font-size: 1.5rem !important;
    }

    .hero-subtitle {
        font-size: 0.875rem !important;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-subtitle {
        font-size: 1.125rem !important;
    }
}

/* ===========================
   ARABIC RTL STYLES
   =========================== */

/* Arabic Font Override */
[dir="rtl"] body {
    font-family: 'Tajawal', 'Inter', sans-serif;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3,
[dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    font-family: 'Tajawal', 'Playfair Display', serif;
}

/* RTL Mobile Menu */
[dir="rtl"] .mobile-menu {
    transform: translateX(-100%);
}

[dir="rtl"] .mobile-menu.active {
    transform: translateX(0);
}

/* RTL Swiper Navigation - Hero */
[dir="rtl"] .hero-swiper .swiper-button-next {
    left: 10px;
    right: auto;
}

[dir="rtl"] .hero-swiper .swiper-button-prev {
    right: 10px;
    left: auto;
}

/* RTL Swiper Navigation - Facilities & Attractions */
[dir="rtl"] .facilities-swiper .swiper-button-next,
[dir="rtl"] .attractions-swiper .swiper-button-next {
    left: 5px;
    right: auto;
}

[dir="rtl"] .facilities-swiper .swiper-button-prev,
[dir="rtl"] .attractions-swiper .swiper-button-prev {
    right: 5px;
    left: auto;
}

/* RTL Swiper Navigation - Gallery */
[dir="rtl"] .gallery-swiper .swiper-button-next {
    left: 5px;
    right: auto;
}

[dir="rtl"] .gallery-swiper .swiper-button-prev {
    right: 5px;
    left: auto;
}

/* RTL Lightbox */
[dir="rtl"] .lightbox-close {
    left: 20px;
    right: auto;
}

[dir="rtl"] .lightbox-prev {
    right: 20px;
    left: auto;
}

[dir="rtl"] .lightbox-next {
    left: 20px;
    right: auto;
}

@media (max-width: 768px) {
    [dir="rtl"] .lightbox-close {
        left: 15px;
    }

    [dir="rtl"] .lightbox-prev {
        right: 10px;
    }

    [dir="rtl"] .lightbox-next {
        left: 10px;
    }
}

/* RTL Flatpickr Calendar */
[dir="rtl"] .flatpickr-day.startRange {
    border-radius: 0 8px 8px 0 !important;
}

[dir="rtl"] .flatpickr-day.endRange {
    border-radius: 8px 0 0 8px !important;
}

/* RTL Spacing Fixes */
[dir="rtl"] .space-x-3 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

[dir="rtl"] .space-x-6 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 1;
}

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

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

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

/* RTL Back to Top Button */
[dir="rtl"] #backToTop {
    left: 1.5rem;
    right: auto;
}

/* RTL Mobile Navigation Arrows */
@media (max-width: 640px) {
    [dir="rtl"] .hero-swiper .swiper-button-next {
        left: 10px;
        right: auto;
    }

    [dir="rtl"] .hero-swiper .swiper-button-prev {
        right: 10px;
        left: auto;
    }

    [dir="rtl"] .facilities-swiper .swiper-button-next,
    [dir="rtl"] .attractions-swiper .swiper-button-next,
    [dir="rtl"] .gallery-swiper .swiper-button-next {
        left: 5px;
        right: auto;
    }

    [dir="rtl"] .facilities-swiper .swiper-button-prev,
    [dir="rtl"] .attractions-swiper .swiper-button-prev,
    [dir="rtl"] .gallery-swiper .swiper-button-prev {
        right: 5px;
        left: auto;
    }
}
