/* ========================================
   Hanna Travel Agency - Animation Styles
   Task 10: Scroll Animations CSS
   ======================================== */

/* ======================
   Scroll Animations
   ====================== */

/* Elements start hidden and offset */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Visible state when in viewport */
.animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grid items */
.animate:nth-child(1) { transition-delay: 0.1s; }
.animate:nth-child(2) { transition-delay: 0.2s; }
.animate:nth-child(3) { transition-delay: 0.3s; }
.animate:nth-child(4) { transition-delay: 0.4s; }
.animate:nth-child(5) { transition-delay: 0.5s; }
.animate:nth-child(6) { transition-delay: 0.6s; }
.animate:nth-child(7) { transition-delay: 0.7s; }
.animate:nth-child(8) { transition-delay: 0.8s; }

/* ======================
   Loading States
   ====================== */

.btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ======================
   Focus Visible (Modern Browsers)
   ====================== */

/* Hide focus styles on mouse click, show on keyboard navigation */
*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}
