/* Custom styles for Oswaldo Homes */

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

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

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

::-webkit-scrollbar-thumb {
    background: #9abf9c;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6f9d70;
}

/* Selection color */
::selection {
    background-color: #c3d9c5;
    color: #1f3422;
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #9abf9c;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animation for reveal elements - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .card-hover {
        transform: none;
        transition: box-shadow 0.3s ease;
    }
    
    .card-hover:hover {
        transform: none;
    }
}

/* Card hover effects */
.card-hover {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.4s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(31, 52, 34, 0.15);
}

/* Button styles */
.btn-primary {
    background: #4d7d50;
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #3a613e;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(77, 125, 80, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

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

/* Hero gradient background */
.hero-gradient {
    background: linear-gradient(135deg, #f2f7f4 0%, #eef5e6 50%, #fefdf8 100%);
}

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

.blob {
    animation: float 6s ease-in-out infinite;
}

.blob:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 7s;
}

.blob:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 8s;
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
}

/* Image hover zoom */
img {
    transition: transform 0.3s ease;
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Print styles */
@media print {
    nav,
    .btn-primary,
    #mobile-menu-btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .hero-gradient {
        background: white;
    }
}

/* High contrast mode support */
@media (forced-colors: active) {
    .card-hover {
        border: 1px solid ButtonText;
    }
}
