/* Custom CSS for Santa Elena Land Sale Website */

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

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

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

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

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInDelay 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeInDelay2 1s ease-out 0.6s both;
}

/* Navigation styles */
.nav-link {
    @apply text-gray-700 hover:text-green-600 transition-colors duration-300 font-medium px-2 py-1;
}

/* Responsive navigation improvements */
@media (max-width: 1024px) {
    .nav-link {
        @apply px-1 text-sm;
    }
}

@media (min-width: 1280px) {
    .nav-link {
        @apply px-3;
    }
}

/* Hero section parallax effect */
#inicio {
    background-attachment: fixed;
}

/* Gallery hover effects */
.gallery-item:hover img {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.gallery-item img {
    transition: transform 0.3s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #15803d;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[data-loaded="false"] {
    opacity: 0;
}

img[data-loaded="true"] {
    opacity: 1;
}

/* Map container */
#map {
    border-radius: 0.5rem;
}

/* Contact form focus states */
#contact-form input:focus,
#contact-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* Language toggle animation */
#lang-toggle {
    transition: all 0.3s ease;
}

/* Video container responsive */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Backdrop blur fallback */
@supports not (backdrop-filter: blur(12px)) {
    .backdrop-blur-sm {
        background-color: rgba(255, 255, 255, 0.9);
    }
}

/* Print styles */
@media print {
    .fixed,
    #lang-toggle,
    nav,
    #image-modal {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-green-600 {
        background-color: #000;
    }
    
    .text-green-600 {
        color: #000;
    }
    
    .border-green-600 {
        border-color: #000;
    }
}

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

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #16a34a;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Image lazy loading placeholder */
.img-placeholder {
    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;
    }
}

/* Optimize for mobile performance */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .transform,
    .transition-transform {
        transform: none !important;
        transition: none !important;
    }
    
    /* Optimize hero image for mobile */
    #inicio {
        background-attachment: scroll;
    }
}

/* Optimize for very small screens */
@media (max-width: 320px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-6xl {
        font-size: 2.5rem;
    }
}

/* Optimize for large screens */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
}

/* Ensure proper spacing for touch targets */
@media (hover: none) and (pointer: coarse) {
    button,
    a,
    input,
    textarea {
        min-height: 44px;
        min-width: 44px;
    }
} 