/* Custom CSS for Ewa Jaromski Real Estate */

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

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-float-up {
    animation: floatUp 0.8s ease-out;
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.02) 0%, rgba(22, 101, 52, 0) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

/* Listing card hover effect */
.listing-card {
    position: relative;
}

.listing-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #166534, #66bb6a);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}

.listing-card:hover::after {
    transform: scaleX(1);
}

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

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

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

/* Mobile menu transitions */
#mobile-menu {
    transition: opacity 0.5s ease, pointer-events 0.5s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile menu links */
.mobile-link {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-link:nth-child(2) { animation-delay: 0.2s; }
.mobile-link:nth-child(3) { animation-delay: 0.3s; }
.mobile-link:nth-child(4) { animation-delay: 0.4s; }
.mobile-link:nth-child(5) { animation-delay: 0.5s; }

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

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

#menu-toggle.active .menu-line:nth-child(2) {
    transform: rotate(-45deg) translate(0, 0);
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Form focus styles */
input:focus,
textarea:focus {
    border-color: #166534 !important;
}

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

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

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: 2rem;
    }
    
    .font-serif.text-4xl,
    .font-serif.text-5xl {
        font-size: 2.25rem;
    }
}
