/* Custom styles for Live in CDA Real Estate Website */

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

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

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

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

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Hero section enhancements */
.hero {
    background-image: 
        linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="lake-pattern" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="2" fill="%23dbeafe" opacity="0.3"/></pattern></defs><rect width="1000" height="1000" fill="url(%23lake-pattern)"/></svg>');
    background-size: cover;
    background-position: center;
}

/* Navigation enhancements */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: hsl(var(--p));
}

.nav-link.active {
    color: hsl(var(--p));
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background-color: hsl(var(--p));
    border-radius: 1px;
}

/* Property card enhancements */
.property-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.property-image {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

/* Price formatting */
.price-tag {
    background: linear-gradient(135deg, hsl(var(--p)) 0%, hsl(var(--s)) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Status badges */
.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.status-for-sale {
    background-color: hsl(var(--su));
    color: white;
}

.status-pending {
    background-color: hsl(var(--wa));
    color: white;
}

.status-sold {
    background-color: hsl(var(--er));
    color: white;
}

/* Local info cards */
.local-info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.local-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Tab enhancements */
.tabs .tab {
    transition: all 0.3s ease;
}

.tabs .tab:hover {
    background-color: hsl(var(--p) / 0.1);
}

.tabs .tab.tab-active {
    background-color: hsl(var(--p));
    color: white;
}

/* Form enhancements */
.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
    border-color: hsl(var(--p));
    box-shadow: 0 0 0 3px hsl(var(--p) / 0.1);
}

/* Statistics cards */
.stat {
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-2px);
}

/* Contact section enhancements */
#contact {
    background-image: 
        linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
}

/* Modal enhancements */
.modal-box {
    max-height: 90vh;
    overflow-y: auto;
}

/* Image gallery in modal */
.gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.gallery-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gallery-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.gallery-nav.prev {
    left: 1rem;
}

.gallery-nav.next {
    right: 1rem;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .property-image {
        height: 200px;
    }
    
    .gallery-image {
        height: 250px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .modal,
    footer {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .property-card,
    .local-info-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.input:focus,
.select:focus,
.textarea:focus,
.tab:focus {
    outline: 2px solid hsl(var(--p));
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .property-card,
    .local-info-card,
    .stat {
        border: 2px solid hsl(var(--bc));
    }
}