/* Animations CSS for Topla Property Landing Page */

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

/* Slide-up animation */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

/* Slide-in-left animation */
@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

/* Slide-in-right animation */
@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Scale animation */
@keyframes scale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scale {
    animation: scale 0.6s ease forwards;
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Feature hover effect */
.feature {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Image hover zoom effect */
.gallery-item img {
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Button hover effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

/* Loading spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s ease-in-out infinite;
}

/* Staggered animations for lists */
.staggered-item {
    opacity: 0;
}

.staggered-item:nth-child(1) {
    animation: slideUp 0.5s ease forwards 0.1s;
}

.staggered-item:nth-child(2) {
    animation: slideUp 0.5s ease forwards 0.2s;
}

.staggered-item:nth-child(3) {
    animation: slideUp 0.5s ease forwards 0.3s;
}

.staggered-item:nth-child(4) {
    animation: slideUp 0.5s ease forwards 0.4s;
}

.staggered-item:nth-child(5) {
    animation: slideUp 0.5s ease forwards 0.5s;
}

.staggered-item:nth-child(6) {
    animation: slideUp 0.5s ease forwards 0.6s;
}

/* Fade-in-on-scroll animations */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Language switcher hover effect */
.language-switcher button {
    transition: all 0.3s ease;
}

.language-switcher button:hover {
    transform: scale(1.1);
}

/* Nav link hover effect */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero content animation delay sequence */
.hero h1 {
    animation-delay: 0.3s;
}

.hero p {
    animation-delay: 0.5s;
}

.hero .cta-buttons {
    animation-delay: 0.7s;
}

/* Lightbox animations */
.lightbox {
    transition: opacity 0.3s ease;
}

.lightbox-content {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    opacity: 1;
    transform: scale(1);
}

/* Prefers reduced motion media query */
@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;
    }
}

/* Reveal Animation for Sections */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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