/* ===== Custom Styles for Imelda Dutton Real Estate ===== */

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

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero animations */
.hero-anim {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-anim:nth-child(2) { animation-delay: 0.15s; }
.hero-anim:nth-child(3) { animation-delay: 0.3s; }
.hero-anim:nth-child(4) { animation-delay: 0.45s; }
.hero-anim:nth-child(5) { animation-delay: 0.6s; }

.hero-img {
    animation: scaleIn 1s ease 0.2s forwards;
    opacity: 0;
    transform: scale(0.97);
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.reveal.revealed:nth-child(4) { transition-delay: 0.3s; }

/* About image animation */
.about-img {
    animation: fadeInLeft 0.9s ease forwards;
    opacity: 0;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(15, 52, 96, 0.08);
}

/* ===== Navigation links ===== */
.nav-link {
    position: relative;
}

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

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

/* ===== Mobile menu ===== */
#mobile-menu {
    animation: fadeInUp 0.3s ease;
}

.mobile-link {
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-link:hover {
    color: #4ECDC4;
    padding-left: 8px;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4ECDC4;
}

/* ===== Selection ===== */
::selection {
    background: #4ECDC4;
    color: white;
}

/* ===== Back to top button ===== */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:not(.visible) {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

#back-to-top.visible {
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
}

/* ===== Form select arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Image aspect ratio fallback ===== */
img {
    max-width: 100%;
    height: auto;
}

/* ===== Focus visible ===== */
:focus-visible {
    outline: 2px solid #4ECDC4;
    outline-offset: 2px;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 768px) {
    .hero-anim {
        animation-duration: 0.6s;
    }
}
