/* -------------------------------------------------------------------------
   HOMENDO CORE STYLES v16
   -------------------------------------------------------------------------
   Location: /a_assets/css/style.css
   Author: Homendo Dev Team (AI Assisted)
   Date: 2025-Nov-22
   Stack: Bootstrap 5.3+ Override / Modern CSS
   ------------------------------------------------------------------------- */

/* ==========================================================================
   1. VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
    /* Brand Colors (Light Mode Default) */
    --hmdo-blue: #073855;       /* Deep Navy */
    --hmdo-light-blue: #1396e2; /* Links */
    --hmdo-gold: #FFCC33;       /* Actions */
    --hmdo-gold-hover: #e6b800;
    --hmdo-magenta: #d51b73;    /* TimeToSell */
    --hmdo-magenta-dark: #b21560;
    
    /* Neutrals */
    --hmdo-gray-100: #f8f9fa;
    --hmdo-text-body: #4a4a4a;

    /* UI */
    --hmdo-radius: 8px;
    --hmdo-shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --hmdo-font-sans: 'Open Sans', sans-serif;
}

/* DARK MODE OVERRIDES */
/* These values automatically activate when data-bs-theme="dark" */
[data-bs-theme="dark"] {
    --hmdo-blue: #6ea8fe;        /* Lighter blue for readability */
    --hmdo-light-blue: #3dd5f3;  /* Cyan for links */
    --hmdo-text-body: #dee2e6;   /* Light grey text */
    --hmdo-gray-100: #2b3035;    /* Dark grey background */
    --hmdo-shadow-lg: 0 10px 25px rgba(0,0,0,0.5); 
}

/* ==========================================================================
   2. GLOBAL & TYPOGRAPHY
   ========================================================================== */
body {
    font-family: var(--hmdo-font-sans);
    color: var(--bs-body-color);      /* BS5 Variable */
    background-color: var(--bs-body-bg); /* BS5 Variable */
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--hmdo-blue);
    font-weight: 700;
}

a {
    color: var(--hmdo-light-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover { color: var(--hmdo-blue); }

/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */
.navigation-wrapper {
    background: var(--bs-body-bg); /* Adapts to theme */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1030;
}

.navbar-brand img { transition: transform 0.3s ease; }
.navbar-brand:hover img { transform: scale(1.02); }

.nav-link {
    color: var(--hmdo-blue) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
}
.nav-link:hover { color: var(--hmdo-light-blue) !important; }

/* Dropdowns */
.dropdown-menu {
    border: 1px solid var(--bs-border-color);
    box-shadow: var(--hmdo-shadow-lg);
    border-radius: var(--hmdo-radius);
    margin-top: 10px;
    background-color: var(--bs-body-bg); /* Adapts to theme */
}

.dropdown-item { 
    padding: 8px 20px; 
    font-size: 0.95rem; 
    color: var(--bs-body-color);
}

.dropdown-item:hover { 
    background-color: var(--bs-tertiary-bg); /* Adapts to theme */
    color: var(--hmdo-light-blue); 
}

/* ==========================================================================
   4. HERO CAROUSEL
   ========================================================================== */
#homeCarousel { background-color: #000; }

.slide-hero {
    height: 65vh;
    min-height: 500px;
    max-height: 780px;
    object-fit: cover;
    object-position: center;
    opacity: 0.9; 
    filter: brightness(0.9) contrast(1.1); 
}

@media (max-width: 768px) {
    .slide-hero { height: 50vh; min-height: 300px; }
}

.hero-overlay {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    pointer-events: none;
}

/* Fix text readability over hero images */
.hero-text-container { z-index: 10; position: relative; }

/* ==========================================================================
   5. SEARCH BOX
   ========================================================================== */
.search-box-wrapper {
    position: relative;
    margin-top: -120px;
    z-index: 100;
    padding-bottom: 40px;
}

.search-box {
    /* Using RGBA for glass effect, works best on light mode */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--hmdo-radius);
    box-shadow: var(--hmdo-shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Dark Mode adjustment for Search Box */
[data-bs-theme="dark"] .search-box {
    background: rgba(33, 37, 41, 0.95);
    border-color: rgba(255,255,255,0.1);
}

.nav-pills .nav-link {
    color: var(--hmdo-blue);
    border-radius: 50px;
    padding: 8px 25px;
    font-weight: 700;
    margin-right: 10px;
}
/* In Dark Mode, make non-active pills lighter so they are visible */
[data-bs-theme="dark"] .nav-pills .nav-link:not(.active) {
    color: var(--bs-body-color);
}

.nav-pills .nav-link.active { background-color: var(--hmdo-blue); color: #fff; }

.form-select, .form-control {
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 0.95rem;
}
.form-select:focus {
    border-color: var(--hmdo-light-blue);
    box-shadow: 0 0 0 0.25rem rgba(19, 150, 226, 0.25);
}

/* ==========================================================================
   6. UI ELEMENTS
   ========================================================================== */
.btn-search-action {
    background-color: var(--hmdo-gold);
    color: #000; /* Force black text on Gold for contrast */
    font-weight: 800;
    border: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    padding: 10px 20px;
}
.btn-search-action:hover {
    background-color: var(--hmdo-gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255, 204, 51, 0.4);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--hmdo-shadow-lg) !important;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
#page-footer {
    /* Use Bootstrap Tertiary BG (adapts to dark/light) */
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color);
    font-size: 0.9rem;
    border-top: 1px solid var(--bs-border-color) !important;
}
#page-footer h5 { font-size: 1rem; font-weight: 800; color: var(--hmdo-blue); }
#page-footer a { color: var(--bs-body-color); }
#page-footer a:hover { color: var(--hmdo-light-blue); text-decoration: none; }

/* ==========================================================================
   8. MODERN OMNIBAR SEARCH (2025)
   ========================================================================== */
.omnibar-container { position: relative; z-index: 10; }

.omnibar-switcher .nav-link {
    background: rgba(0,0,0,0.4); 
    color: #fff; 
    border: 1px solid rgba(255,255,255,0.3);
    margin: 0 5px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}
.omnibar-switcher .nav-link.active {
    background: #fff; 
    color: var(--hmdo-blue); /* This variable now switches in dark mode */
    border-color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Omnibar Dark Mode Adjustments */
[data-bs-theme="dark"] .omnibar-switcher .nav-link.active {
    background: var(--bs-body-bg);
    border-color: var(--bs-border-color);
}

.omnibar-field label { font-size: 0.7rem; letter-spacing: 0.5px; }

.btn-search-pill {
    background: linear-gradient(135deg, var(--hmdo-magenta) 0%, #b21560 100%);
    border: none;
    transition: transform 0.2s;
}
.btn-search-pill:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(213, 27, 115, 0.4);
}

/* ==========================================================================
   9. MEGA MENU & UTILITIES
   ========================================================================== */
@media (min-width: 1200px) {
    /* Static parent allows absolute child to span full width */
    .navbar-nav .nav-item.has-megamenu { position: static; }

    .dropdown-menu.megamenu {
        position: absolute;
        top: 90%; 
        left: 0;
        right: 0;
        width: 100%;
        margin-top: 0;
        border-radius: 0 0 8px 8px;
        /* Use BS borders/bg for theme support */
        border-top: 1px solid var(--bs-border-color);
        background-color: var(--bs-body-bg);
    }
    
    /* Desktop Hover Support */
    .dropdown-hover:hover > .dropdown-menu {
        display: block;
        margin-top: 0; 
    }
}

/* Text Utilities for Contrast */
.text-primary { color: var(--hmdo-blue) !important; }
.text-gold { color: var(--hmdo-gold) !important; }
.bg-gold { background-color: var(--hmdo-gold) !important; }

.text-shadow-sm { text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.text-shadow-lg { text-shadow: 0 2px 4px rgba(0,0,0,0.7); }