/* ===== Custom Styles for Cherrie Boyer Real Estate ===== */

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

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

::-webkit-scrollbar-track {
    background: #1a1b1f;
}

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

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

/* Navigation transitions */
.nav-logo-text {
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B6B;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

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

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

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

/* Service card hover effect */
.service-card {
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Hero animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-15px) rotate(45deg); }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Intersection Observer animations */
.observe-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.observe-animate.animated {
    opacity: 1;
    transform: translateY(0);
}

.observe-animate.delay-1 { transition-delay: 0.1s; }
.observe-animate.delay-2 { transition-delay: 0.2s; }
.observe-animate.delay-3 { transition-delay: 0.3s; }
.observe-animate.delay-4 { transition-delay: 0.4s; }
.observe-animate.delay-5 { transition-delay: 0.5s; }

/* Mobile menu link hover */
.mobile-menu-link {
    position: relative;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Button ripple effect */
button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
    border-radius: inherit;
}

button:active::after {
    transform: scale(2);
    opacity: 1;
    transition: 0s;
}

/* Neighborhood card overlay */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Pulse animation for hero dot */
@keyframes pulse-custom {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Image hover zoom */
img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent layout shift on images */
img {
    content-visibility: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

/* Print styles */
@media print {
    nav, #contact, .cta-banner {
        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 support */
@media (prefers-contrast: high) {
    .bg-coral-500 {
        background-color: #d44848;
    }
    
    .text-coral-500 {
        color: #d44848;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: #FF6B6B;
    color: white;
}
