/*=====================================================================
  Template: LuxCount - Luxury Real Estate Landing Page
  Author: [Mostafa Hamaad/ApexTemplate]
  Version: 2.7 - Final UX & Visibility Fixes - Formatted
  ---------------------------------------------------------------------
  CONTENTS:
  1. Base Variables (Color & Theme Settings)
  2. Global Styles & Typography
  3. Preloader Styling
  4. Header & Navigation (Logo & Controls)
  5. Hero Section (Countdown & Quick Form)
  6. Section: Feature Icons Grid
  7. Section: Animated Marquee Strip
  8. Section: Project View
  9. Section: Project Map
  10. Interactive Features (Tabs Section)
  11. Booking Form Section
  12. Footer Section
  13. Action Button Animations & Hover Effects
  14. RTL Specific Adjustments
  15. Media Queries (Mobile Responsiveness)
=====================================================================*/

/*---------------------------------------------------------------------
  1. Base Variables (Color & Theme Settings)
---------------------------------------------------------------------*/

/* Base: Dark Mode (Default) Colors */
:root {
    --primary-color: #FFA500; /* Neon Orange/Gold - CTAs and highlights */
    --secondary-color: #00FFFF; /* Neon Cyan/Sky Blue - Accents and links */
    --background-color: #121212; /* Deep Dark Background */
    --text-color: #F8F8F8; /* Light Text */
    --card-background: #1e1e1e; /* Card/Section Background */
    --hero-overlay: rgba(0, 0, 0, 0.85);
    --primary-color-rgb: 255, 165, 0; 
    --secondary-hover-dark: #343a40; /* Dark Grey for CTA hover */
}

/* Light Mode Overrides (if switched) */
body.light-mode {
    --primary-color: #FF8C00; 
    --secondary-color: #00A3A3;
    --background-color: #ffffff;
    --text-color: #343a40;
    --card-background: #f8f9fa;
    --hero-overlay: rgba(0, 0, 0, 0.6);
    --primary-color-rgb: 255, 140, 0;
    --secondary-hover-dark: #343a40;
}

/*---------------------------------------------------------------------
  2. Global Styles & Typography
---------------------------------------------------------------------*/

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.5s, color 0.5s; 
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    color: var(--text-color); 
    font-weight: 600;
}

a {
    color: var(--secondary-color);
    transition: color 0.3s;
}

/* CTA Button Styling: Primary Color and Hover Fix */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--background-color) !important; 
    transition: background-color 0.3s, border-color 0.3s, filter 0.3s;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary-hover-dark) !important; 
    border-color: var(--secondary-hover-dark) !important;
    filter: none;
}

/*---------------------------------------------------------------------
  3. Preloader Styling
---------------------------------------------------------------------*/
.lux-preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--background-color);
    display: flex; justify-content: center; align-items: center;
    flex-direction: column; /* CRITICAL: Stack counter and bar vertically */
    z-index: 9999; transition: opacity 0.5s ease-out;
}
.lux-preloader.hidden { opacity: 0; visibility: hidden; }

/* Ensure the counter text color is visible in both modes */
.lux-preloader #percentage-counter {
    color: var(--primary-color); /* Default orange color (visible against dark background) */
    font-size: 2rem; /* Optional: Adjust font size for better visibility */
    margin-bottom: 15px !important;
}

/* Fix for Light Mode: Use a dark color for visibility against light background */
body.light-mode .lux-preloader #percentage-counter {
    color: var(--text-color, #000000) !important; /* Use main text color or black for contrast */
}

/* Styles for the Progress Bar Container */
.progress-container {
    width: 250px; /* Adjust width as needed */
    height: 8px; /* Height of the bar */
    background-color: var(--card-background); /* Dark background for the bar track */
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3); /* Subtle neon glow */
}

/* Styles for the Progress Bar Fill (The moving orange part) */
.progress-bar-fill {
    height: 100%;
    width: 0%; /* Starts at 0, controlled by JavaScript */
    background-color: var(--primary-color); /* Orange color */
    transition: width 0.1s linear; /* Smooth visual update controlled by JS interval */
    border-radius: 4px;
}

/* Ensure the old spinning icon and hidden text styles are removed/updated */
.lux-icon-loader {
    display: none !important; /* Hide old spinner */
}
.preloader-text-hidden {
    display: none !important; 
}
/* Keyframes spin is no longer used but can remain if other elements need it */
@keyframes spin { to { transform: rotate(360deg); } }
/*---------------------------------------------------------------------
  4. Header & Navigation (Logo & Controls)
---------------------------------------------------------------------*/
.main-header {
    background-color: var(--card-background);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1020;
}
/* Logo Size Adjustment */
.main-header .logo a {
    font-size: 1.8rem; 
    font-weight: 700;
    text-decoration: none;
}
.logo-lux {
    color: var(--primary-color);
}
.logo-count {
    color: var(--text-color);
}

/* RTL Switcher Button Styling (Orange) */
#dir-switcher {
    background-color: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
}
#dir-switcher:hover {
    background-color: var(--secondary-hover-dark); 
    border-color: var(--secondary-hover-dark);
}

/* Header Controls Layout - Desktop Spacing */
.header-controls {
    display: flex;
    align-items: center;
}
.header-controls button {
    margin-left: 10px;
}
.header-controls button:first-child {
    margin-left: 0;
}

/* Fixed Buttons (Mode Switch & Scroll Up) */
.mode-switcher-btn, .scroll-up-btn {
    position: fixed; bottom: 20px; right: 20px; z-index: 1000;
    background-color: var(--primary-color); 
    color: var(--background-color);
    border: none;
    width: 45px; height: 45px; border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}
.mode-switcher-btn { right: 80px; }
.scroll-up-btn { opacity: 0; pointer-events: none; }
.scroll-up-btn.visible { opacity: 1; pointer-events: auto; }


/*---------------------------------------------------------------------
  5. Hero Section (Fullscreen Alignment & Form)
---------------------------------------------------------------------*/
.hero-section {
    min-height: 100vh; /* Full viewport height for content visibility */
    background-size: cover; 
    background-position: center;
    position: relative; 
    padding: 100px 0;
    
    /* CRITICAL: Force vertical and horizontal centering for all content */
    display: flex; 
    flex-direction: column; 
    justify-content: center; /* Center Vertically */
    align-items: center; /* Center Flex items (CRITICAL for horizontal centering of .hero-content) */
    text-align: center; /* Center inline content (titles, text) */
}
.hero-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1; 
}
.hero-content {
    position: relative; 
    z-index: 2;
    width: 100%;
    /* Ensure the content container itself is configured for centering (if it's a Flex item) */
    display: flex; /* ADDED: Ensure hero-content is also a flex container */
    flex-direction: column;
    align-items: center; /* ADDED: Center its children */
    
    margin: 0; 
}

.hero-section h1 {
    color: #FFA500;
}
.lead {
    color: #ffffff;
}
.light-mode .lead {
    color: #FFA500;
}
/* Countdown Box Styles */
.timer-box {
    background-color: var(--card-background); 
    border: 1px solid var(--secondary-color);
    padding: 10px 15px; border-radius: 8px;
    min-width: 80px; text-transform: uppercase;
    display: inline-block;
}
.timer-box span { 
    color: var(--primary-color); 
}
.timer-box small { 
    font-size: 0.7rem; 
    color: var(--text-color); 
}
/* Ensure contrast for small text in light mode */
body.light-mode .timer-box small {
    color: #000000; 
}

/* Hero Form Email Field Width */
.quick-lead-form {
    max-width: 550px; 
    margin: 0 auto; /* Ensure the form itself is centered */
}
/*---------------------------------------------------------------------
  6. Section: Feature Icons Grid
---------------------------------------------------------------------*/
.feature-box {
    padding: 20px;
    border-radius: 10px;
    background-color: var(--background-color); 
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1); 
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    /* Uniformity Fix */
    height: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}
.feature-box i {
    color: var(--secondary-color); 
    margin-bottom: 15px;
    font-size: 2.5rem;
}
.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 255, 0.3);
}

/*---------------------------------------------------------------------
  7. Section: Animated Marquee Strip
---------------------------------------------------------------------*/
.marquee-section {
    padding: 20px 0;
    background-color: var(--card-background); 
    overflow: hidden;
    white-space: nowrap;
}
.marquee-content {
    display: inline-block;
    /* Animation for continuous scroll (requires content duplication in HTML) */
    animation: marquee-scroll 25s linear infinite;
}
.marquee-content span {
    color: var(--primary-color); 
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
    -webkit-text-stroke: 0.5px var(--secondary-color); 
}
@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/*---------------------------------------------------------------------
  8. Section: Project View
---------------------------------------------------------------------*/
.project-view-frame {
    border: 5px solid var(--primary-color); 
    border-radius: 15px;
    padding: 10px;
    background-color: var(--card-background);
    box-shadow: 0 0 30px rgba(var(--primary-color-rgb), 0.4);
}
.project-view-frame img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    transition: transform 0.5s ease;
}
.project-view-frame:hover img {
    transform: scale(1.01);
}

/*---------------------------------------------------------------------
  9. Section: Project Map
---------------------------------------------------------------------*/
.map-frame {
    border: 5px solid var(--primary-color);
    border-radius: 15px;
    padding: 15px; 
    background-color: var(--card-background);
    box-shadow: 0 0 30px rgba(var(--primary-color-rgb), 0.4);
    transition: box-shadow 0.5s;
}
/* Map Height Fix */
.map-frame iframe {
    width: 100%;
    height: 550px; 
    border: none;
    display: block;
    border-radius: 10px;
}
.map-info {
    border-left: 3px solid var(--secondary-color); 
    padding-left: 20px;
}

/*---------------------------------------------------------------------
  10. Interactive Features (Tabs Section)
---------------------------------------------------------------------*/
.interactive-features-section {
    background-color: var(--card-background);
}
.feature-tabs .nav-link {
    text-align: left;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    /* Color Fix: Orange when inactive */
    color: var(--primary-color); 
    border: 1px solid var(--primary-color);
    transition: all 0.3s;
    background-color: transparent; 
}
.feature-tabs .nav-link:hover:not(.active) {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
}
.feature-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: var(--background-color); 
    border-color: var(--primary-color);
}

/*---------------------------------------------------------------------
  11. Booking Form Section - (Final Title Contrast Fix Applied)
---------------------------------------------------------------------*/
.booking-section {
    background-color: var(--background-color);
}
.booking-section .card {
    background-color: var(--card-background);
    border: 1px solid var(--primary-color); 
}
/* Fix 1: Ensure general titles (including H4) in the section use the correct light text color */
.booking-section h2, .booking-section h3, .booking-section h4 {
    color: var(--text-color) !important; 
}

/* Fix 2: Explicitly target the H4 card-title for guaranteed high contrast (white) */
.booking-section .card .card-title {
    color: #FFA500 !important; /* Force near-white color for high contrast in dark mode */
}

/* Label Color in Dark Mode (Ensures visibility) */
.booking-section .card .form-label {
    color: var(--text-color); 
}

/*---------------------------------------------------------------------
  12. Footer Section
---------------------------------------------------------------------*/
.footer-section {
    background-color: #0d0d0d; 
    border-top: 1px solid var(--secondary-color);
}
.footer-section a {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: color 0.3s;
}
.footer-section a:hover {
    color: var(--primary-color);
}

/*---------------------------------------------------------------------
  13. Action Button Animations & Hover Effects
---------------------------------------------------------------------*/
.cta-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(var(--primary-color-rgb), 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0); }
}

.hover-effect-container .card {
    transition: box-shadow 0.3s ease;
}
.hover-effect-container:hover .card {
    box-shadow: 0 0 30px rgba(var(--primary-color-rgb), 0.5);
}

/*---------------------------------------------------------------------
  14. RTL Specific Adjustments
---------------------------------------------------------------------*/

/* Force Hero content to remain CENTERED even when RTL is active, overriding Bootstrap utility classes */
[dir="rtl"] .hero-section { 
    text-align: center !important; 
}
[dir="rtl"] .hero-section .text-md-start { text-align: center !important; }
[dir="rtl"] .hero-section .text-start { text-align: center !important; } 
/* Ensure Flex items (like columns) are centered on Desktop */
[dir="rtl"] .hero-section .justify-content-md-start { justify-content: center !important; } 

/* FIX: Ensure the Countdown Wrapper (#countdown) remains centered in RTL on all screen sizes */
[dir="rtl"] #countdown { 
    justify-content: center !important; 
}

/* Ensure the main content block inside the hero is centered */
[dir="rtl"] .hero-content {
    align-items: center !important; 
}

/* Ensure the lead form remains centered in RTL */
[dir="rtl"] .quick-lead-form { 
    margin: 0 auto !important; 
}

[dir="rtl"] .feature-tabs .nav-link { text-align: right; }

/* RTL Header Controls Spacing */
[dir="rtl"] .header-controls {
    flex-direction: row; 
}
[dir="rtl"] .header-controls button {
    margin-right: 10px; 
    margin-left: 0;
}
[dir="rtl"] .header-controls button:last-child {
    margin-right: 0; 
}

[dir="rtl"] .map-info { 
    border-right: 3px solid var(--secondary-color); 
    border-left: none; 
    padding-right: 20px; 
    padding-left: 0; 
}

/* RTL Tabs styling */
[dir="rtl"] .feature-tabs .nav-link { 
    text-align: right; 
}
[dir="rtl"] .feature-tabs .nav-link i { 
    margin-right: 0; 
    margin-left: 8px; 
}

/* RTL Adjustments for Bootstrap Utility Classes (Margins and Directions) */
[dir="rtl"] .social-links .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
[dir="rtl"] .header-controls .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .alert-info .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .alert-info .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
/* Reverse button icon placement for aesthetic appeal in RTL buttons */
[dir="rtl"] .btn { display: flex; flex-direction: row-reverse; justify-content: center; align-items: center; }
/*---------------------------------------------------------------------
  15. Media Queries (Mobile Responsiveness)
---------------------------------------------------------------------*/

@media (max-width: 767.98px) {
    /* Mobile Counter Size Fix */
    .hero-section .countdown-responsive .display-5 { 
        font-size: 1.5rem; 
    }
    .hero-section .countdown-responsive .timer-box { 
        min-width: 55px; 
        padding: 5px 8px; 
    }
    .hero-section .countdown-responsive small { 
        font-size: 0.6rem; 
    }

    /* Hero Form Placeholder Text Size Fix (Mobile) */
    .quick-lead-form input::placeholder {
        font-size: 0.8rem;
    }
    
    /* Map Section Mobile Adjustments */
    .map-frame iframe {
        height: 350px; 
    }
    .map-info { margin-top: 20px; border-left: none; border-right: none; padding-left: 0; }
    /* Mobile RTL adjustments for map info box */
    [dir="rtl"] .map-info { margin-top: 20px; border-right: none; padding-right: 0; }

    /* Header Controls Mobile Fix: Ensure buttons stay on the right in LTR, left in RTL */
    .header-controls { justify-content: flex-end; }
    [dir="rtl"] .header-controls { justify-content: flex-start; }
    [dir="rtl"] .header-controls button { margin-right: 10px; margin-left: 0; }
    [dir="rtl"] .header-controls button:last-child { margin-right: 0; }
    
    /* Ensure the counter and form are centered (Inherited from Section 14) */
}