/* Custom styles for CenCalHomes */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: #c9a227;
    color: #0a1628;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #152d56;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c9a227;
}

/* Navbar transition */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Hero animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero > .max-w-7xl > div > div > div:first-child > * {
    animation: fadeInUp 0.8s ease forwards;
}

#hero > .max-w-7xl > div > div > div:first-child > :nth-child(1) { animation-delay: 0.1s; }
#hero > .max-w-7xl > div > div > div:first-child > :nth-child(2) { animation-delay: 0.2s; }
#hero > .max-w-7xl > div > div > div:first-child > :nth-child(3) { animation-delay: 0.3s; }
#hero > .max-w-7xl > div > div > div:first-child > :nth-child(4) { animation-delay: 0.4s; }
#hero > .max-w-7xl > div > div > div:first-child > :nth-child(5) { animation-delay: 0.5s; }

/* Image hover effect */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Print styles */
@media print {
    #navbar,
    #menuBtn {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .bg-gold-400 {
        background-color: #b8860b !important;
    }
    
    .text-gold-400 {
        color: #b8860b !important;
    }
}
