/* ==========================================================================
   1. GLOBAL SYSTEM LOCKS & STRUCTURAL BASE
   ========================================================================== */
html, body {
    background-color: #0d1117 !important;
    background-image: none !important;
    color: #c9d1d9 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh !important;
    overflow-x: hidden !important; 
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

header.glass {
    direction: ltr !important;
    background: rgba(13, 17, 23, 0.3) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
}

.burger div { background-color: #ff6a00 !important; }
.search-btn svg { stroke: #ff6a00 !important; }

#search-input {
    direction: rtl !important;
    text-align: right !important;
}

/* ==========================================================================
   2. 🚀 PROPERTY CARD (ORIGINAL SHARP LOOK + SMOOTH ENTRANCE)
   ========================================================================== */
@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Restored original sharp background, 6px borders, and solid colors */
.property-details-card {
    width: 100% !important;
    max-width: 1000px !important; 
    margin: 0 auto !important; 
    padding: 40px !important; 
    border-radius: 6px !important; 
    background: #121212 !important; 
    border: 1px solid rgba(255, 255, 255, 0.15) !important; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6) !important; 
    position: relative !important;
    overflow: hidden !important; 
    
    /* 🎬 Smooth Cinematic Load Animation */
    animation: slideUpFade 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards !important;
}

/* 📍 RESTORED LOCATION BADGE (Sharp Box) */
#detail-title + div {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 6px 14px !important;
    border-radius: 4px !important; /* Back to original sharp square corners */
    transition: all 0.3s ease !important;
    width: auto !important;
    margin-bottom: 35px !important;
}
#detail-title + div:hover {
    background: rgba(255, 106, 0, 0.1) !important;
    border-color: rgba(255, 106, 0, 0.4) !important;
}
#detail-title + div i { color: #ff6a00 !important; }

/* 🎬 INTERACTIVE GALLERY (Sharp Frames) */
.property-gallery {
    position: relative !important;
    width: 100% !important;
    height: 450px !important; 
    border-radius: 6px !important;
    background: #1a1f26 !important; 
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
    margin-bottom: 30px !important;
    overflow: visible !important; 
    transition: all 0.3s ease !important;
}
.property-gallery:hover {
    border-color: rgba(255, 106, 0, 0.4) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7) !important;
}

#detail-img-display {
    width: 100% !important;
    height: 100% !important;
    background-size: contain !important; 
    background-position: center !important;
    background-repeat: no-repeat !important;
    cursor: pointer !important;
    border-radius: 6px !important;
    transition: opacity 0.3s ease !important;
}
#detail-img-display:active {
    opacity: 0.8 !important; /* Visual feedback when tapping/swiping on mobile */
}

/* ==========================================================================
   3. 🚀 SHARP DASHBOARD METRIC CARDS (INTERACTIVE)
   ========================================================================== */
/* Restored transparent backgrounds and simple borders */
.property-details-card div[style*="flex: 1"] {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 4px !important;
    padding: 20px 15px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
    cursor: default;
}
.property-details-card div[style*="flex: 1"]:hover {
    transform: translateY(-4px) !important;
    border-color: #ff6a00 !important;
    background: rgba(255, 106, 0, 0.05) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4) !important;
}
.property-details-card div[style*="flex: 1"] p {
    color: #8b949e !important;
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
    margin-bottom: 8px !important;
    transition: color 0.3s ease !important;
}
.property-details-card div[style*="flex: 1"]:hover p { color: #c9d1d9 !important; }
.property-details-card div[style*="flex: 1"] h3 {
    color: #ffffff !important;
    font-size: 1.4rem !important;
    margin: 0 !important;
}

/* ==========================================================================
   4. UI CONTROLS, RIBBONS & PULSING BUTTONS
   ========================================================================== */
.gallery-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    margin-bottom: 30px !important; 
}

.sleek-arrow-btn {
    background: rgba(22, 27, 34, 0.6) !important;
    color: #8b949e !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 45px !important; 
    height: 38px !important; 
    border-radius: 4px !important; 
    cursor: pointer !important;
    font-size: 0.95rem !important; 
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
}
.sleek-arrow-btn:hover, .sleek-arrow-btn:active {
    background: rgba(255, 106, 0, 0.15) !important;
    color: #ff6a00 !important;
    border-color: #ff6a00 !important;
    transform: translateY(-2px) !important;
}

.sleek-counter {
    color: #c9d1d9 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    background: rgba(22, 27, 34, 0.4) !important;
    padding: 8px 18px !important;
    border-radius: 4px !important; 
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* RESTORED ORIGINAL SHARP ORANGE RIBBON */
.ribbon-price {
    position: absolute;
    top: 20px;
    background: #ff6a00 !important; 
    color: #ffffff;
    padding: 8px 18px;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 20;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4) !important;
    letter-spacing: 0.5px;
    border-radius: 0 4px 4px 0 !important;
}
.ribbon-price::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    border-top: 6px solid #b34a00;
    border-left: 6px solid transparent;
}

/* ACTION BUTTONS */
.return-btn {
    background: rgba(22, 27, 34, 0.5) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #c9d1d9 !important;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    margin-bottom: 25px; 
}

.sub-section-title {
    color: #ffffff; 
    font-size: 1.15rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 20px; 
}

.social-glass-btn {
    background: rgba(22, 27, 34, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #c9d1d9 !important;
    padding: 14px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
}
.social-glass-btn:hover {
    border: 1px solid #ff6a00 !important;
    color: #ffffff !important;
    transform: translateY(-3px);
}

/* 🟢 RADIATING WHATSAPP PULSE ANIMATION (Kept alive) */
@keyframes breathingGlow {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.whatsapp-shine-btn {
    background: #25D366 !important; /* Flat solid green to match sharp theme */
    border: none !important;
    color: #ffffff !important;
    padding: 16px 30px;
    border-radius: 6px;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 350px;
    position: relative;
    overflow: hidden;
    animation: breathingGlow 2.5s infinite !important; /* Constant Pulse */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.whatsapp-shine-btn:hover {
    transform: translateY(-4px);
    animation: none !important; /* Stops pulsing on hover */
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6) !important;
}
.whatsapp-shine-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -150%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    animation: shine-sweep 6s infinite; 
}
@keyframes shine-sweep { 0% { left: -150%; } 20% { left: 200%; } 100% { left: 200%; } }

/* ==========================================================================
   5. FULLSCREEN INTERACTIVE MEDIA MODAL
   ========================================================================== */
.fullscreen-modal {
    display: none; 
    position: fixed;
    z-index: 999999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(5, 7, 10, 0.98) !important; 
    backdrop-filter: blur(20px) !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.modal-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain; 
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05) !important;
    transition: transform 0.3s ease !important;
}
.close-modal {
    position: absolute;
    top: 25px;
    color: #ffffff;
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
    line-height: 1;
}
.close-modal:hover { color: #ff6a00; transform: scale(1.1); }
.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(22, 27, 34, 0.8);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 55px; 
    height: 55px; 
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000000;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.modal-arrow:hover { background: #ff6a00; transform: translateY(-50%) scale(1.1); }
.modal-counter {
    position: absolute;
    bottom: 30px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 24px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
}

/* ==========================================================================
   6. RTL/LTR DIRECTIONAL SMART CONFIGURATIONS
   ========================================================================== */
#detail-desc {
    padding: 25px !important;
    border-radius: 4px !important;
    line-height: 1.9 !important;
    color: #c9d1d9 !important;
    transition: all 0.3s ease !important;
    border: 1px solid transparent !important;
}

html[dir="rtl"] #detail-desc {
    background: linear-gradient(-90deg, rgba(255,255,255,0.03), transparent) !important;
    border-right: 3px solid #30363d !important;
}
html[dir="rtl"] #detail-desc:hover {
    background: linear-gradient(-90deg, rgba(255,106,0,0.05), transparent) !important;
    border-right-color: #ff6a00 !important;
}

html[dir="ltr"] #detail-desc {
    background: linear-gradient(90deg, rgba(255,255,255,0.03), transparent) !important;
    border-left: 3px solid #30363d !important;
}
html[dir="ltr"] #detail-desc:hover {
    background: linear-gradient(90deg, rgba(255,106,0,0.05), transparent) !important;
    border-left-color: #ff6a00 !important;
}

/* ==========================================================================
   7. FLAWLESS MOBILE & VIEWPORT BREAKPOINTS
   ========================================================================== */
@media screen and (max-width: 768px) {
    .section-padding { padding-top: 100px !important; padding-left: 0 !important; padding-right: 0 !important; }
    .container { width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
    
    .property-details-card {
        width: 100% !important; max-width: 100% !important; margin: 0 !important;
        padding: 30px 0 40px 0 !important; border-radius: 0 !important; border-left: none !important; border-right: none !important;
    }
    
    .property-details-card div[style*="flex: 1"] {
        flex: 1 1 40% !important; 
        padding: 15px !important;
    }
    .property-details-card div[style*="flex: 1"] h3 {
        font-size: 1.3rem !important;
    }
    
    .property-gallery {
        height: 300px !important; margin-bottom: 20px !important; margin-top: 45px !important; 
        border-radius: 0 !important; border-left: none !important; border-right: none !important; width: 100% !important; overflow: visible !important;
    }
    #detail-img-display { border-radius: 0 !important; }

    /* 👑 MOBILE RIBBON: Solid Orange, Crisp Corners, Lifted above the picture box */
    .ribbon-price {
        font-size: 1.1rem !important; 
        padding: 6px 16px !important; 
        top: -36px !important; 
        left: 20px !important; 
        right: auto !important;
        background: #ff6a00 !important;
        border-radius: 4px !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4) !important;
    }
    .ribbon-price::before { display: none !important; }

    .mobile-safe-padding { padding: 0 20px !important; box-sizing: border-box !important; width: 100% !important; }
    .gallery-controls { margin-bottom: 25px !important; }
    .sleek-arrow-btn { width: 40px !important; height: 32px !important; font-size: 0.85rem !important; }
    
    .modal-arrow { width: 40px; height: 40px; font-size: 1rem; }
    .modal-img { max-width: 100vw; max-height: 70vh; }
    .close-modal { top: 15px; font-size: 35px; }

    .nav-links li { margin: 15px 0 !important; width: 70% !important; max-width: none !important; }
    .nav-links a {
        display: block !important; width: 100% !important; padding: 15px 20px !important;
        background: rgba(255, 255, 255, 0.02) !important; border: none !important;
        border-radius: 4px !important; text-align: center !important; color: #ffffff !important; font-size: 1rem !important;
    }
}
/* ==========================================================================
   8. 👑 ARABIC RTL GALLERY ARROW DIRECTION CORRECTION
   ========================================================================== */
html[dir="rtl"] .sleek-arrow-btn i,
html[dir="rtl"] .modal-arrow i {
    transform: rotate(180deg) !important;
}