﻿/* CSS Variables for Safe Area Management */
:root {
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
    /* Dynamic header height */
    --header-height: calc(80px + var(--safe-area-inset-top));
}

/* Base styles remain the same */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #d4d4d4 100%);
    min-height: 100vh;
    color: #2c2c2c;
    direction: rtl;
}

/* Header with Safe Area support */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    /* Safe area padding */
    padding-top: calc(15px + var(--safe-area-inset-top));
    padding-left: calc(20px + var(--safe-area-inset-left));
    padding-right: calc(20px + var(--safe-area-inset-right));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 2px solid rgba(139, 69, 19, 0.3);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.menu-logo-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #A0522D;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    margin-bottom: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #8B4513;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    order: 1;
}

.logo-shield {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    border: 2px solid #A0522D;
}

.logo-image-full {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.brand-name {
    color: #8B4513;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
    order: 2;
    flex: 1;
    text-align: center;
}

.menu-toggle {
    background: none;
    border: none;
    color: #8B4513;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    order: 3;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #D2691E, #8B4513);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    border: 2px solid #A0522D;
}

/* Menu Toggle Button */
.menu-toggle:hover {
    background: rgba(139, 69, 19, 0.1);
    transform: scale(1.1);
}

/* Side Menu with Safe Area */
.side-menu {
    position: fixed;
    top: var(--safe-area-inset-top);
    right: -300px;
    width: 300px;
    height: calc(100vh - var(--safe-area-inset-top) - var(--safe-area-inset-bottom));
    background: linear-gradient(135deg, #f8f8f8 0%, #e0e0e0 100%);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    border-left: 3px solid #8B4513;
    padding-bottom: var(--safe-area-inset-bottom);
}

    .side-menu.active {
        right: 0;
    }

.menu-header {
    padding: 30px 20px;
    border-bottom: 2px solid rgba(139, 69, 19, 0.2);
    text-align: center;
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
}

.menu-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #D2691E, #8B4513);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    border: 3px solid #A0522D;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.menu-title {
    color: #8B4513;
    font-size: 18px;
    font-weight: bold;
}

.menu-items {
    padding: 20px 0;
}

.menu-item {
    display: block;
    padding: 15px 25px;
    color: #555;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
}

    .menu-item:hover {
        background: rgba(139, 69, 19, 0.1);
        color: #8B4513;
        border-right-color: #8B4513;
    }

    .menu-item i {
        margin-left: 12px;
        width: 20px;
        text-align: center;
    }

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

    .overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Main Content with Safe Area */
.main-content {
    margin-top: var(--header-height);
    padding: 0;
    min-height: calc(100vh - var(--header-height) - var(--safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
}

/* Image Slider */
.image-slider {
    position: relative;
    height: 70vh;
    overflow: hidden;
    border-radius: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

    .slide.active {
        opacity: 1;
    }

    .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(139, 69, 19, 0.4), rgba(160, 82, 45, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.slide-content {
    max-width: 600px;
    padding: 20px;
    z-index: 2;
}

.slide-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    line-height: 1.2;
}

.slide-subtitle {
    font-size: 1.3rem;
    color: #f5f5f5;
    margin-bottom: 40px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    line-height: 1.4;
}

/* Slide Indicators */
.slide-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .indicator.active {
        background: #D2691E;
        transform: scale(1.3);
    }

/* CTA Button */
.cta-button {
    background: linear-gradient(135deg, #D2691E, #8B4513);
    color: #fff;
    padding: 18px 50px;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(139, 69, 19, 0.4);
    border: 2px solid #A0522D;
}

    .cta-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(139, 69, 19, 0.6);
        color: #fff;
        background: linear-gradient(135deg, #CD853F, #A0522D);
    }

    .cta-button i {
        font-size: 22px;
    }

/* Bottom Section */
.bottom-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ffffff, #f8f8f8);
    /* Safe area padding */
    padding-bottom: calc(40px + var(--safe-area-inset-bottom));
}

.welcome-text {
    text-align: center;
    max-width: 500px;
}

.welcome-title {
    font-size: 2rem;
    color: #8B4513;
    margin-bottom: 15px;
    font-weight: bold;
}

.welcome-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Footer with Safe Area */
.footer {
    text-align: center;
    padding: 15px 20px;
    color: #888;
    background: rgba(248, 248, 248, 0.9);
    font-size: 0.9rem;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
    /* Safe area padding */
    padding-bottom: calc(15px + var(--safe-area-inset-bottom));
    padding-left: calc(20px + var(--safe-area-inset-left));
    padding-right: calc(20px + var(--safe-area-inset-right));
}

/* Booking specific styles with Safe Area */
.booking-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    /* Safe area support */
    padding-left: calc(20px + var(--safe-area-inset-left));
    padding-right: calc(20px + var(--safe-area-inset-right));
    padding-bottom: calc(40px + var(--safe-area-inset-bottom));
}

/* Form actions with Safe Area */
.form-actions {
    background: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    margin: 20px -20px 0 -20px;
    /* Safe area bottom margin */
    margin-bottom: calc(60px + var(--safe-area-inset-bottom));
    /* Safe area padding */
    padding-bottom: calc(20px + var(--safe-area-inset-bottom));
    padding-left: calc(20px + var(--safe-area-inset-left));
    padding-right: calc(20px + var(--safe-area-inset-right));
}

/* Mobile Optimizations with Safe Area */
@media (max-width: 768px) {
    .brand-name {
        font-size: 18px;
    }

    .slide-title {
        font-size: 2.2rem;
    }

    .slide-subtitle {
        font-size: 1.1rem;
    }

    .cta-button {
        padding: 15px 35px;
        font-size: 18px;
    }

    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-description {
        font-size: 1rem;
    }

    .image-slider {
        height: 55vh;
    }

    .booking-container {
        padding: 15px;
        padding-bottom: calc(30px + var(--safe-area-inset-bottom));
    }

    .form-actions {
        margin-bottom: calc(40px + var(--safe-area-inset-bottom));
    }
}

/* Fallback for older devices without safe-area support */
@supports not (padding: env(safe-area-inset-top)) {
    :root {
        --safe-area-inset-top: 20px;
        --safe-area-inset-bottom: 20px;
        --safe-area-inset-left: 0px;
        --safe-area-inset-right: 0px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-content {
    animation: fadeInUp 1s ease-out;
}

.welcome-text {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}
