/* ============================================
   Carmen Eagles Real Estate — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Navbar Scroll State
   ============================================ */
#navbar.scrolled header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ============================================
   Floating Stat Cards Animation
   ============================================ */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(1) {
    animation-delay: 0s;
}

.stat-card:nth-child(2) {
    animation-delay: -1.5s;
}

.stat-card:nth-child(3) {
    animation-delay: -3s;
}

.stat-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

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

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Scroll Reveal Animations
   Only apply when user prefers motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ============================================
   Mobile Menu Transitions
   ============================================ */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

/* ============================================
   Button Hover Effects
   ============================================ */
a[href="#contact"], button[type="submit"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

button[type="submit"]:hover::after {
    transform: translateX(100%);
}

/* ============================================
   Input Focus States
   ============================================ */
input:focus, select:focus, textarea:focus {
    outline: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: #0d9488;
    color: white;
}
