/* ===== CUSTOM STYLES ===== */

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

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* ===== FLOATING ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

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

.animate-float-delay {
    animation: float-delay 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* ===== SCROLL REVEAL ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ===== NAVBAR SCROLLED STATE ===== */
.nav-scrolled {
    background: rgba(255, 248, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(130, 26, 55, 0.08);
}

.nav-scrolled #nav-logo-text {
    color: #821a37;
}

.nav-scrolled #nav-subtext {
    color: #c42f58;
}

.nav-scrolled .menu-line {
    background: #821a37;
}

/* ===== MOBILE MENU ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

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

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

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

/* Mobile menu active state */
#mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

/* Hamburger animation */
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ===== 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, #821a37, #ff748e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

/* ===== NEIGHBORHOOD CARDS ===== */
.neighborhood-card {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.neighborhood-card img {
    transition: transform 0.7s ease;
}

.neighborhood-card:hover img {
    transform: scale(1.1);
}

/* ===== BUTTON HOVER EFFECTS ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::after {
    opacity: 1;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #dc4d78;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== SELECTION ===== */
::selection {
    background: #fce7eb;
    color: #6b172f;
}

/* ===== FORM SELECT ARROW ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23821a37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

    html {
        scroll-behavior: auto;
    }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .service-card {
        padding: 1.5rem;
    }
}
