/* Custom color scheme for IntelliHome REALTY - Dark Red and Gold Theme */

/* Color Variables */
:root {
    --primary-red: #8B0000;        /* Dark red */
    --primary-red-dark: #660000;   /* Darker red for hover states */
    --primary-red-light: #A52A2A;  /* Lighter red for backgrounds */
    --accent-gold: #DAA520;        /* Gold */
    --accent-gold-dark: #B8860B;   /* Darker gold for hover states */
    --accent-gold-light: #F4E4BC;  /* Light gold for backgrounds */
    --text-dark: #2D2D2D;          /* Dark text */
    --text-light: #F5F5F5;         /* Light text */
    --bg-light: #FAFAFA;           /* Light background */
    --bg-dark: #1A1A1A;            /* Dark background */
}

/* Override Tailwind classes with custom colors */
.bg-primary-red {
    background-color: var(--primary-red);
}

.bg-primary-red-dark {
    background-color: var(--primary-red-dark);
}

.bg-primary-red-light {
    background-color: var(--primary-red-light);
}

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

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

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

.text-primary-red {
    color: var(--primary-red);
}

.text-primary-red-dark {
    color: var(--primary-red-dark);
}

.text-accent-gold {
    color: var(--accent-gold);
}

.text-accent-gold-dark {
    color: var(--accent-gold-dark);
}

.border-primary-red {
    border-color: var(--primary-red);
}

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

/* Hover states */
.hover\:bg-primary-red-dark:hover {
    background-color: var(--primary-red-dark);
}

.hover\:bg-accent-gold-dark:hover {
    background-color: var(--accent-gold-dark);
}

.hover\:text-primary-red:hover {
    color: var(--primary-red);
}

.hover\:text-accent-gold:hover {
    color: var(--accent-gold);
}

/* Focus states */
.focus\:ring-primary-red:focus {
    --tw-ring-color: var(--primary-red);
}

.focus\:ring-accent-gold:focus {
    --tw-ring-color: var(--accent-gold);
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
}

.bg-gradient-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-dark) 100%);
}

.bg-gradient-mixed {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--accent-gold) 100%);
}

/* Custom button styles */
.btn-primary {
    background-color: var(--primary-red);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.btn-accent {
    background-color: var(--accent-gold);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background-color: var(--accent-gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
}

/* Card styles */
.card-primary {
    border-left: 4px solid var(--primary-red);
}

.card-accent {
    border-left: 4px solid var(--accent-gold);
}

/* Badge styles */
.badge-primary {
    background-color: var(--primary-red-light);
    color: var(--accent-gold-light);
}

.badge-accent {
    background-color: var(--primary-red-light);
    color: var(--accent-gold-light);
}

/* Navigation styles */
.nav-link {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-red);
}

/* Footer styles */
.footer-dark {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.footer-link {
    color: #CCCCCC;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-gold);
}

/* Property card enhancements */
.property-card {
    transition: all 0.3s ease;
    border: 1px solid #E5E5E5;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.15);
    border-color: var(--primary-red);
}

/* Stats section */
.stats-section {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: white;
}

/* Agent card styles */
.agent-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FEFEFE 100%);
    border: 1px solid #E5E5E5;
}

/* Search form styles */
.search-form {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-gold-light) 100%);
    border: 2px solid var(--accent-gold);
}

/* Mobile Navigation Styles */
.mobile-nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link:hover {
    color: var(--primary-red);
    background-color: #F9FAFB;
    padding-left: 1rem;
}

.mobile-nav-link:active {
    background-color: var(--accent-gold-light);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
#mobile-menu-button:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--primary-red);
}

.mobile-nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-gold);
}

/* Mobile menu shadow and border */
#mobile-menu .bg-white {
    border-top: 2px solid var(--primary-red);
}

/* Language Button Styles */
.language-btn {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.language-btn:hover {
    border-color: var(--primary-red);
    background-color: #FEF2F2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.15);
}

.language-btn.active {
    border-color: var(--primary-red);
    background-color: var(--primary-red);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}

.language-btn.active:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

/* Mobile Language Button Styles */
.mobile-language-btn {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 500;
}

.mobile-language-btn:hover {
    border-color: var(--primary-red);
    background-color: #FEF2F2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.15);
}

.mobile-language-btn.active {
    border-color: var(--primary-red);
    background-color: var(--primary-red);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.2);
}

.mobile-language-btn.active:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

/* Hero Video Background Styles */
.hero-video-section {
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
    /* Performance optimizations */
    will-change: transform;
    backface-visibility: hidden;
    /* Ensure video doesn't interfere with text selection */
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
}

/* Ensure content is above video and overlay */
.hero-video-section .relative.z-10 {
    position: relative;
    z-index: 10;
}

/* Fallback for browsers that don't support video */
.hero-video-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    z-index: 0;
}

/* Hide fallback when video is supported */
.hero-video-section:has(.hero-video)::before {
    display: none;
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        animation: none;
    }
    
    /* For users who prefer reduced motion, show static background instead */
    .hero-video-section {
        background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    }
    
    .hero-video {
        display: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .property-card:hover {
        transform: none;
    }
    
    /* Ensure nav doesn't overflow on very small screens */
    .nav-link {
        white-space: nowrap;
    }
    
    /* Mobile menu max height for smooth scrolling */
    #mobile-menu > div {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    
    /* Adjust language button size on mobile */
    .language-btn {
        min-width: 40px;
        height: 40px;
        font-size: 16px;
        padding: 6px 10px;
    }
    
    /* Mobile video background adjustments */
    .hero-video-section {
        min-height: 70vh;
    }
    
    .hero-video {
        /* Ensure video covers the area properly on mobile */
        min-width: 100%;
        min-height: 100%;
    }
    
    /* Reduce overlay opacity on mobile for better text readability */
    .hero-overlay {
        background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.7) 100%);
    }
}
