/* ============================================
   A TO Z Estate Solution's — Custom Styles
   ============================================ */

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

@keyframes scrollDot {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    50% {
        transform: translateY(6px);
        opacity: 1;
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
}

.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animate-scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

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

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

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

.nav-link.active {
    color: #0f3460;
    font-weight: 600;
}

/* ---- Navbar shadow on scroll ---- */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ---- Mobile menu hamburger animation ---- */
#mobile-menu-btn.open #hamburger-lines span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn.open #hamburger-lines span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.open #hamburger-lines span:nth-child(3) {
    width: 1.5rem;
    transform: translateY(-4px) rotate(-45deg);
}

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Staggered children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; }
.reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; }
.reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.4s; }
.reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.5s; }

.reveal-stagger.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Back to top visibility ---- */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---- Solution card top border on hover ---- */
.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0f3460, #e2a03f);
    border-radius: 1rem 1rem 0 0;
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

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

/* ---- Form focus states ---- */
form input:focus,
form select:focus,
form textarea:focus {
    border-color: #e2a03f;
    box-shadow: 0 0 0 3px rgba(226, 160, 63, 0.15);
}

/* ---- Smooth scroll for all anchors ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Selection color ---- */
::selection {
    background-color: #0f3460;
    color: white;
}

/* ---- Map dot pulse ---- */
.map-dot span:last-child {
    animation-duration: 2s;
}

/* ---- Loading spinner for form submit ---- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---- Responsive tweaks ---- */
/* ---- Print styles ---- */
@media print {
    #navbar,
    #whatsapp-fab,
    #back-to-top,
    .animate-ping {
        display: none !important;
    }
}
