/* ============================================
   La Cancion Subdivision - Custom Styles
   ============================================ */

/* Base Reset & Defaults */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #558b2f;
    color: #f8f6f0;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(13, 59, 17, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-logo-text {
    transition: color 0.4s ease;
}

.nav-link-text {
    position: relative;
}

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

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

/* ============================================
   Hero Section
   ============================================ */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, #f8f6f0, transparent);
    z-index: 2;
    pointer-events: none;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #558b2f, #8bc34a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   Testimonial Cards
   ============================================ */
#testimonials .group {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#testimonials .group:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Neighborhood Cards
   ============================================ */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — content is visible
   by default, animation applied via JS only
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Fallback: ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #aed58e;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 80%;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: #558b2f !important;
    box-shadow: 0 0 0 3px rgba(85, 139, 47, 0.15);
}

/* ============================================
   Button Hover Effects
   ============================================ */
button[type="submit"]:hover {
    transform: translateY(-2px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

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

/* ============================================
   Focus Visible
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #558b2f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #hero::before,
    .reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
